You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@unomi.apache.org by sh...@apache.org on 2020/05/14 19:33:18 UTC
svn commit: r1877746 [10/12] - in /unomi/website: ./ assets/css/
assets/images/ assets/js/vendor/
Modified: unomi/website/assets/js/vendor/bootstrap.js
URL: http://svn.apache.org/viewvc/unomi/website/assets/js/vendor/bootstrap.js?rev=1877746&r1=1877745&r2=1877746&view=diff
==============================================================================
--- unomi/website/assets/js/vendor/bootstrap.js (original)
+++ unomi/website/assets/js/vendor/bootstrap.js Thu May 14 19:33:17 2020
@@ -1,13 +1,13 @@
/*!
- * Bootstrap v4.1.1 (https://getbootstrap.com/)
- * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap v4.4.1 (https://getbootstrap.com/)
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
- (factory((global.bootstrap = {}),global.jQuery,global.Popper));
-}(this, (function (exports,$,Popper) { 'use strict';
+ (global = global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
+}(this, (function (exports, $, Popper) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
@@ -43,20 +43,35 @@
return obj;
}
- function _objectSpread(target) {
+ 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] : {};
- var ownKeys = Object.keys(source);
- if (typeof Object.getOwnPropertySymbols === 'function') {
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
- }));
+ 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));
+ });
}
-
- ownKeys.forEach(function (key) {
- _defineProperty(target, key, source[key]);
- });
}
return target;
@@ -70,3846 +85,4423 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.1.1): util.js
+ * Bootstrap (v4.4.1): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
+ /**
+ * ------------------------------------------------------------------------
+ * Private TransitionEnd Helpers
+ * ------------------------------------------------------------------------
+ */
- var Util = function ($$$1) {
- /**
- * ------------------------------------------------------------------------
- * Private TransitionEnd Helpers
- * ------------------------------------------------------------------------
- */
- var TRANSITION_END = 'transitionend';
- var MAX_UID = 1000000;
- var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
-
- function toType(obj) {
- return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
- }
+ var TRANSITION_END = 'transitionend';
+ var MAX_UID = 1000000;
+ var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
- function getSpecialTransitionEndEvent() {
- return {
- bindType: TRANSITION_END,
- delegateType: TRANSITION_END,
- handle: function handle(event) {
- if ($$$1(event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
- }
+ function toType(obj) {
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ }
- return undefined; // eslint-disable-line no-undefined
+ function getSpecialTransitionEndEvent() {
+ return {
+ bindType: TRANSITION_END,
+ delegateType: TRANSITION_END,
+ handle: function handle(event) {
+ if ($(event.target).is(this)) {
+ return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
- };
- }
- function transitionEndEmulator(duration) {
- var _this = this;
-
- var called = false;
- $$$1(this).one(Util.TRANSITION_END, function () {
- called = true;
- });
- setTimeout(function () {
- if (!called) {
- Util.triggerTransitionEnd(_this);
- }
- }, duration);
- return this;
- }
+ return undefined; // eslint-disable-line no-undefined
+ }
+ };
+ }
- function setTransitionEndSupport() {
- $$$1.fn.emulateTransitionEnd = transitionEndEmulator;
- $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
- }
- /**
- * --------------------------------------------------------------------------
- * Public Util Api
- * --------------------------------------------------------------------------
- */
-
-
- var Util = {
- TRANSITION_END: 'bsTransitionEnd',
- getUID: function getUID(prefix) {
- do {
- // eslint-disable-next-line no-bitwise
- prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
- } while (document.getElementById(prefix));
-
- return prefix;
- },
- getSelectorFromElement: function getSelectorFromElement(element) {
- var selector = element.getAttribute('data-target');
-
- if (!selector || selector === '#') {
- selector = element.getAttribute('href') || '';
- }
-
- try {
- var $selector = $$$1(document).find(selector);
- return $selector.length > 0 ? selector : null;
- } catch (err) {
- return null;
- }
- },
- getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
- if (!element) {
- return 0;
- } // Get transition-duration of the element
-
-
- var transitionDuration = $$$1(element).css('transition-duration');
- var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found
-
- if (!floatTransitionDuration) {
- return 0;
- } // If multiple durations are defined, take the first
-
-
- transitionDuration = transitionDuration.split(',')[0];
- return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
- },
- reflow: function reflow(element) {
- return element.offsetHeight;
- },
- triggerTransitionEnd: function triggerTransitionEnd(element) {
- $$$1(element).trigger(TRANSITION_END);
- },
- // TODO: Remove in v5
- supportsTransitionEnd: function supportsTransitionEnd() {
- return Boolean(TRANSITION_END);
- },
- isElement: function isElement(obj) {
- return (obj[0] || obj).nodeType;
- },
- typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
- for (var property in configTypes) {
- if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
- var expectedTypes = configTypes[property];
- var value = config[property];
- var valueType = value && Util.isElement(value) ? 'element' : toType(value);
+ function transitionEndEmulator(duration) {
+ var _this = this;
- if (!new RegExp(expectedTypes).test(valueType)) {
- throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
- }
- }
- }
+ var called = false;
+ $(this).one(Util.TRANSITION_END, function () {
+ called = true;
+ });
+ setTimeout(function () {
+ if (!called) {
+ Util.triggerTransitionEnd(_this);
}
- };
- setTransitionEndSupport();
- return Util;
- }($);
+ }, duration);
+ return this;
+ }
+ function setTransitionEndSupport() {
+ $.fn.emulateTransitionEnd = transitionEndEmulator;
+ $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
+ }
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.1.1): alert.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Public Util Api
* --------------------------------------------------------------------------
*/
- var Alert = function ($$$1) {
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
- var NAME = 'alert';
- var VERSION = '4.1.1';
- var DATA_KEY = 'bs.alert';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
- var Selector = {
- DISMISS: '[data-dismiss="alert"]'
- };
- var Event = {
- CLOSE: "close" + EVENT_KEY,
- CLOSED: "closed" + EVENT_KEY,
- CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
- };
- var ClassName = {
- ALERT: 'alert',
- FADE: 'fade',
- SHOW: 'show'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
- };
+ var Util = {
+ TRANSITION_END: 'bsTransitionEnd',
+ getUID: function getUID(prefix) {
+ do {
+ // eslint-disable-next-line no-bitwise
+ prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
+ } while (document.getElementById(prefix));
+
+ return prefix;
+ },
+ getSelectorFromElement: function getSelectorFromElement(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
+ }
- var Alert =
- /*#__PURE__*/
- function () {
- function Alert(element) {
- this._element = element;
- } // Getters
+ try {
+ return document.querySelector(selector) ? selector : null;
+ } catch (err) {
+ return null;
+ }
+ },
+ getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var transitionDuration = $(element).css('transition-duration');
+ var transitionDelay = $(element).css('transition-delay');
+ var floatTransitionDuration = parseFloat(transitionDuration);
+ var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
+
+ if (!floatTransitionDuration && !floatTransitionDelay) {
+ return 0;
+ } // If multiple durations are defined, take the first
+
+
+ transitionDuration = transitionDuration.split(',')[0];
+ transitionDelay = transitionDelay.split(',')[0];
+ return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
+ },
+ reflow: function reflow(element) {
+ return element.offsetHeight;
+ },
+ triggerTransitionEnd: function triggerTransitionEnd(element) {
+ $(element).trigger(TRANSITION_END);
+ },
+ // TODO: Remove in v5
+ supportsTransitionEnd: function supportsTransitionEnd() {
+ return Boolean(TRANSITION_END);
+ },
+ isElement: function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ },
+ typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
+ for (var property in configTypes) {
+ if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && Util.isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
+ }
+ }
+ }
+ },
+ findShadowRoot: function findShadowRoot(element) {
+ if (!document.documentElement.attachShadow) {
+ return null;
+ } // Can find the shadow root otherwise it'll return the document
- var _proto = Alert.prototype;
+ if (typeof element.getRootNode === 'function') {
+ var root = element.getRootNode();
+ return root instanceof ShadowRoot ? root : null;
+ }
- // Public
- _proto.close = function close(element) {
- var rootElement = this._element;
+ if (element instanceof ShadowRoot) {
+ return element;
+ } // when we don't find a shadow root
- if (element) {
- rootElement = this._getRootElement(element);
- }
- var customEvent = this._triggerCloseEvent(rootElement);
+ if (!element.parentNode) {
+ return null;
+ }
- if (customEvent.isDefaultPrevented()) {
- return;
- }
+ return Util.findShadowRoot(element.parentNode);
+ },
+ jQueryDetection: function jQueryDetection() {
+ if (typeof $ === 'undefined') {
+ throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
+ }
- this._removeElement(rootElement);
- };
+ var version = $.fn.jquery.split(' ')[0].split('.');
+ var minMajor = 1;
+ var ltMajor = 2;
+ var minMinor = 9;
+ var minPatch = 1;
+ var maxMajor = 4;
- _proto.dispose = function dispose() {
- $$$1.removeData(this._element, DATA_KEY);
- this._element = null;
- }; // Private
+ if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
+ throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
+ }
+ }
+ };
+ Util.jQueryDetection();
+ setTransitionEndSupport();
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
- _proto._getRootElement = function _getRootElement(element) {
- var selector = Util.getSelectorFromElement(element);
- var parent = false;
+ var NAME = 'alert';
+ var VERSION = '4.4.1';
+ var DATA_KEY = 'bs.alert';
+ var EVENT_KEY = "." + DATA_KEY;
+ var DATA_API_KEY = '.data-api';
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ var Selector = {
+ DISMISS: '[data-dismiss="alert"]'
+ };
+ var Event = {
+ CLOSE: "close" + EVENT_KEY,
+ CLOSED: "closed" + EVENT_KEY,
+ CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
+ };
+ var ClassName = {
+ ALERT: 'alert',
+ FADE: 'fade',
+ SHOW: 'show'
+ };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- if (selector) {
- parent = $$$1(selector)[0];
- }
+ var Alert =
+ /*#__PURE__*/
+ function () {
+ function Alert(element) {
+ this._element = element;
+ } // Getters
+
+
+ var _proto = Alert.prototype;
+
+ // Public
+ _proto.close = function close(element) {
+ var rootElement = this._element;
- if (!parent) {
- parent = $$$1(element).closest("." + ClassName.ALERT)[0];
- }
+ if (element) {
+ rootElement = this._getRootElement(element);
+ }
- return parent;
- };
+ var customEvent = this._triggerCloseEvent(rootElement);
- _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
- var closeEvent = $$$1.Event(Event.CLOSE);
- $$$1(element).trigger(closeEvent);
- return closeEvent;
- };
+ if (customEvent.isDefaultPrevented()) {
+ return;
+ }
- _proto._removeElement = function _removeElement(element) {
- var _this = this;
+ this._removeElement(rootElement);
+ };
- $$$1(element).removeClass(ClassName.SHOW);
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY);
+ this._element = null;
+ } // Private
+ ;
+
+ _proto._getRootElement = function _getRootElement(element) {
+ var selector = Util.getSelectorFromElement(element);
+ var parent = false;
- if (!$$$1(element).hasClass(ClassName.FADE)) {
- this._destroyElement(element);
+ if (selector) {
+ parent = document.querySelector(selector);
+ }
- return;
- }
+ if (!parent) {
+ parent = $(element).closest("." + ClassName.ALERT)[0];
+ }
- var transitionDuration = Util.getTransitionDurationFromElement(element);
- $$$1(element).one(Util.TRANSITION_END, function (event) {
- return _this._destroyElement(element, event);
- }).emulateTransitionEnd(transitionDuration);
- };
+ return parent;
+ };
- _proto._destroyElement = function _destroyElement(element) {
- $$$1(element).detach().trigger(Event.CLOSED).remove();
- }; // Static
+ _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
+ var closeEvent = $.Event(Event.CLOSE);
+ $(element).trigger(closeEvent);
+ return closeEvent;
+ };
+ _proto._removeElement = function _removeElement(element) {
+ var _this = this;
- Alert._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var $element = $$$1(this);
- var data = $element.data(DATA_KEY);
+ $(element).removeClass(ClassName.SHOW);
- if (!data) {
- data = new Alert(this);
- $element.data(DATA_KEY, data);
- }
+ if (!$(element).hasClass(ClassName.FADE)) {
+ this._destroyElement(element);
- if (config === 'close') {
- data[config](this);
- }
- });
- };
+ return;
+ }
- Alert._handleDismiss = function _handleDismiss(alertInstance) {
- return function (event) {
- if (event) {
- event.preventDefault();
- }
+ var transitionDuration = Util.getTransitionDurationFromElement(element);
+ $(element).one(Util.TRANSITION_END, function (event) {
+ return _this._destroyElement(element, event);
+ }).emulateTransitionEnd(transitionDuration);
+ };
- alertInstance.close(this);
- };
- };
+ _proto._destroyElement = function _destroyElement(element) {
+ $(element).detach().trigger(Event.CLOSED).remove();
+ } // Static
+ ;
- _createClass(Alert, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }]);
-
- return Alert;
- }();
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
-
- $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $$$1.fn[NAME] = Alert._jQueryInterface;
- $$$1.fn[NAME].Constructor = Alert;
-
- $$$1.fn[NAME].noConflict = function () {
- $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
- return Alert._jQueryInterface;
+ Alert._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var $element = $(this);
+ var data = $element.data(DATA_KEY);
+
+ if (!data) {
+ data = new Alert(this);
+ $element.data(DATA_KEY, data);
+ }
+
+ if (config === 'close') {
+ data[config](this);
+ }
+ });
};
+ Alert._handleDismiss = function _handleDismiss(alertInstance) {
+ return function (event) {
+ if (event) {
+ event.preventDefault();
+ }
+
+ alertInstance.close(this);
+ };
+ };
+
+ _createClass(Alert, null, [{
+ key: "VERSION",
+ get: function get() {
+ return VERSION;
+ }
+ }]);
+
return Alert;
- }($);
+ }();
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.1): button.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
*/
- var Button = function ($$$1) {
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
- var NAME = 'button';
- var VERSION = '4.1.1';
- var DATA_KEY = 'bs.button';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
- var ClassName = {
- ACTIVE: 'active',
- BUTTON: 'btn',
- FOCUS: 'focus'
- };
- var Selector = {
- DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
- DATA_TOGGLE: '[data-toggle="buttons"]',
- INPUT: 'input',
- ACTIVE: '.active',
- BUTTON: '.btn'
- };
- var Event = {
- CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
- FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ $.fn[NAME] = Alert._jQueryInterface;
+ $.fn[NAME].Constructor = Alert;
- };
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Alert._jQueryInterface;
+ };
- var Button =
- /*#__PURE__*/
- function () {
- function Button(element) {
- this._element = element;
- } // Getters
-
-
- var _proto = Button.prototype;
-
- // Public
- _proto.toggle = function toggle() {
- var triggerChangeEvent = true;
- var addAriaPressed = true;
- var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
-
- if (rootElement) {
- var input = $$$1(this._element).find(Selector.INPUT)[0];
-
- if (input) {
- if (input.type === 'radio') {
- if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) {
- triggerChangeEvent = false;
- } else {
- var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0];
-
- if (activeElement) {
- $$$1(activeElement).removeClass(ClassName.ACTIVE);
- }
- }
- }
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
- if (triggerChangeEvent) {
- if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
- return;
- }
+ var NAME$1 = 'button';
+ var VERSION$1 = '4.4.1';
+ var DATA_KEY$1 = 'bs.button';
+ var EVENT_KEY$1 = "." + DATA_KEY$1;
+ var DATA_API_KEY$1 = '.data-api';
+ var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
+ var ClassName$1 = {
+ ACTIVE: 'active',
+ BUTTON: 'btn',
+ FOCUS: 'focus'
+ };
+ var Selector$1 = {
+ DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
+ DATA_TOGGLES: '[data-toggle="buttons"]',
+ DATA_TOGGLE: '[data-toggle="button"]',
+ DATA_TOGGLES_BUTTONS: '[data-toggle="buttons"] .btn',
+ INPUT: 'input:not([type="hidden"])',
+ ACTIVE: '.active',
+ BUTTON: '.btn'
+ };
+ var Event$1 = {
+ CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
+ FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1),
+ LOAD_DATA_API: "load" + EVENT_KEY$1 + DATA_API_KEY$1
+ };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ var Button =
+ /*#__PURE__*/
+ function () {
+ function Button(element) {
+ this._element = element;
+ } // Getters
+
+
+ var _proto = Button.prototype;
+
+ // Public
+ _proto.toggle = function toggle() {
+ var triggerChangeEvent = true;
+ var addAriaPressed = true;
+ var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLES)[0];
+
+ if (rootElement) {
+ var input = this._element.querySelector(Selector$1.INPUT);
+
+ if (input) {
+ if (input.type === 'radio') {
+ if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
+ triggerChangeEvent = false;
+ } else {
+ var activeElement = rootElement.querySelector(Selector$1.ACTIVE);
- input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE);
- $$$1(input).trigger('change');
+ if (activeElement) {
+ $(activeElement).removeClass(ClassName$1.ACTIVE);
+ }
+ }
+ } else if (input.type === 'checkbox') {
+ if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName$1.ACTIVE)) {
+ triggerChangeEvent = false;
}
+ } else {
+ // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
+ triggerChangeEvent = false;
+ }
- input.focus();
- addAriaPressed = false;
+ if (triggerChangeEvent) {
+ input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
+ $(input).trigger('change');
}
+
+ input.focus();
+ addAriaPressed = false;
}
+ }
+ if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
if (addAriaPressed) {
- this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE));
+ this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));
}
if (triggerChangeEvent) {
- $$$1(this._element).toggleClass(ClassName.ACTIVE);
+ $(this._element).toggleClass(ClassName$1.ACTIVE);
}
- };
+ }
+ };
- _proto.dispose = function dispose() {
- $$$1.removeData(this._element, DATA_KEY);
- this._element = null;
- }; // Static
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY$1);
+ this._element = null;
+ } // Static
+ ;
+
+ Button._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY$1);
+
+ if (!data) {
+ data = new Button(this);
+ $(this).data(DATA_KEY$1, data);
+ }
+ if (config === 'toggle') {
+ data[config]();
+ }
+ });
+ };
- Button._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $$$1(this).data(DATA_KEY);
+ _createClass(Button, null, [{
+ key: "VERSION",
+ get: function get() {
+ return VERSION$1;
+ }
+ }]);
- if (!data) {
- data = new Button(this);
- $$$1(this).data(DATA_KEY, data);
- }
+ return Button;
+ }();
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
- if (config === 'toggle') {
- data[config]();
- }
- });
- };
- _createClass(Button, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }]);
-
- return Button;
- }();
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
+ $(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
+ var button = event.target;
+ if (!$(button).hasClass(ClassName$1.BUTTON)) {
+ button = $(button).closest(Selector$1.BUTTON)[0];
+ }
- $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
- event.preventDefault();
- var button = event.target;
+ if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
+ event.preventDefault(); // work around Firefox bug #1540995
+ } else {
+ var inputBtn = button.querySelector(Selector$1.INPUT);
+
+ if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
+ event.preventDefault(); // work around Firefox bug #1540995
- if (!$$$1(button).hasClass(ClassName.BUTTON)) {
- button = $$$1(button).closest(Selector.BUTTON);
+ return;
}
- Button._jQueryInterface.call($$$1(button), 'toggle');
- }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
- var button = $$$1(event.target).closest(Selector.BUTTON)[0];
- $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
- });
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $$$1.fn[NAME] = Button._jQueryInterface;
- $$$1.fn[NAME].Constructor = Button;
-
- $$$1.fn[NAME].noConflict = function () {
- $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
- return Button._jQueryInterface;
- };
+ Button._jQueryInterface.call($(button), 'toggle');
+ }
+ }).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
+ var button = $(event.target).closest(Selector$1.BUTTON)[0];
+ $(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type));
+ });
+ $(window).on(Event$1.LOAD_DATA_API, function () {
+ // ensure correct active class is set to match the controls' actual values/states
+ // find all checkboxes/readio buttons inside data-toggle groups
+ var buttons = [].slice.call(document.querySelectorAll(Selector$1.DATA_TOGGLES_BUTTONS));
+
+ for (var i = 0, len = buttons.length; i < len; i++) {
+ var button = buttons[i];
+ var input = button.querySelector(Selector$1.INPUT);
+
+ if (input.checked || input.hasAttribute('checked')) {
+ button.classList.add(ClassName$1.ACTIVE);
+ } else {
+ button.classList.remove(ClassName$1.ACTIVE);
+ }
+ } // find all button toggles
- return Button;
- }($);
+ buttons = [].slice.call(document.querySelectorAll(Selector$1.DATA_TOGGLE));
+
+ for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
+ var _button = buttons[_i];
+
+ if (_button.getAttribute('aria-pressed') === 'true') {
+ _button.classList.add(ClassName$1.ACTIVE);
+ } else {
+ _button.classList.remove(ClassName$1.ACTIVE);
+ }
+ }
+ });
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.1): carousel.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
*/
- var Carousel = function ($$$1) {
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
- var NAME = 'carousel';
- var VERSION = '4.1.1';
- var DATA_KEY = 'bs.carousel';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
- var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
-
- var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
-
- var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
-
- var Default = {
- interval: 5000,
- keyboard: true,
- slide: false,
- pause: 'hover',
- wrap: true
- };
- var DefaultType = {
- interval: '(number|boolean)',
- keyboard: 'boolean',
- slide: '(boolean|string)',
- pause: '(string|boolean)',
- wrap: 'boolean'
- };
- var Direction = {
- NEXT: 'next',
- PREV: 'prev',
- LEFT: 'left',
- RIGHT: 'right'
- };
- var Event = {
- SLIDE: "slide" + EVENT_KEY,
- SLID: "slid" + EVENT_KEY,
- KEYDOWN: "keydown" + EVENT_KEY,
- MOUSEENTER: "mouseenter" + EVENT_KEY,
- MOUSELEAVE: "mouseleave" + EVENT_KEY,
- TOUCHEND: "touchend" + EVENT_KEY,
- LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
- CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
- };
- var ClassName = {
- CAROUSEL: 'carousel',
- ACTIVE: 'active',
- SLIDE: 'slide',
- RIGHT: 'carousel-item-right',
- LEFT: 'carousel-item-left',
- NEXT: 'carousel-item-next',
- PREV: 'carousel-item-prev',
- ITEM: 'carousel-item'
- };
- var Selector = {
- ACTIVE: '.active',
- ACTIVE_ITEM: '.active.carousel-item',
- ITEM: '.carousel-item',
- NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
- INDICATORS: '.carousel-indicators',
- DATA_SLIDE: '[data-slide], [data-slide-to]',
- DATA_RIDE: '[data-ride="carousel"]'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ $.fn[NAME$1] = Button._jQueryInterface;
+ $.fn[NAME$1].Constructor = Button;
- };
+ $.fn[NAME$1].noConflict = function () {
+ $.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
+ return Button._jQueryInterface;
+ };
- var Carousel =
- /*#__PURE__*/
- function () {
- function Carousel(element, config) {
- this._items = null;
- this._interval = null;
- this._activeElement = null;
- this._isPaused = false;
- this._isSliding = false;
- this.touchTimeout = null;
- this._config = this._getConfig(config);
- this._element = $$$1(element)[0];
- this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0];
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
- this._addEventListeners();
- } // Getters
+ var NAME$2 = 'carousel';
+ var VERSION$2 = '4.4.1';
+ var DATA_KEY$2 = 'bs.carousel';
+ var EVENT_KEY$2 = "." + DATA_KEY$2;
+ var DATA_API_KEY$2 = '.data-api';
+ var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
+ var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
+
+ var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
+
+ var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
+
+ var SWIPE_THRESHOLD = 40;
+ var Default = {
+ interval: 5000,
+ keyboard: true,
+ slide: false,
+ pause: 'hover',
+ wrap: true,
+ touch: true
+ };
+ var DefaultType = {
+ interval: '(number|boolean)',
+ keyboard: 'boolean',
+ slide: '(boolean|string)',
+ pause: '(string|boolean)',
+ wrap: 'boolean',
+ touch: 'boolean'
+ };
+ var Direction = {
+ NEXT: 'next',
+ PREV: 'prev',
+ LEFT: 'left',
+ RIGHT: 'right'
+ };
+ var Event$2 = {
+ SLIDE: "slide" + EVENT_KEY$2,
+ SLID: "slid" + EVENT_KEY$2,
+ KEYDOWN: "keydown" + EVENT_KEY$2,
+ MOUSEENTER: "mouseenter" + EVENT_KEY$2,
+ MOUSELEAVE: "mouseleave" + EVENT_KEY$2,
+ TOUCHSTART: "touchstart" + EVENT_KEY$2,
+ TOUCHMOVE: "touchmove" + EVENT_KEY$2,
+ TOUCHEND: "touchend" + EVENT_KEY$2,
+ POINTERDOWN: "pointerdown" + EVENT_KEY$2,
+ POINTERUP: "pointerup" + EVENT_KEY$2,
+ DRAG_START: "dragstart" + EVENT_KEY$2,
+ LOAD_DATA_API: "load" + EVENT_KEY$2 + DATA_API_KEY$2,
+ CLICK_DATA_API: "click" + EVENT_KEY$2 + DATA_API_KEY$2
+ };
+ var ClassName$2 = {
+ CAROUSEL: 'carousel',
+ ACTIVE: 'active',
+ SLIDE: 'slide',
+ RIGHT: 'carousel-item-right',
+ LEFT: 'carousel-item-left',
+ NEXT: 'carousel-item-next',
+ PREV: 'carousel-item-prev',
+ ITEM: 'carousel-item',
+ POINTER_EVENT: 'pointer-event'
+ };
+ var Selector$2 = {
+ ACTIVE: '.active',
+ ACTIVE_ITEM: '.active.carousel-item',
+ ITEM: '.carousel-item',
+ ITEM_IMG: '.carousel-item img',
+ NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
+ INDICATORS: '.carousel-indicators',
+ DATA_SLIDE: '[data-slide], [data-slide-to]',
+ DATA_RIDE: '[data-ride="carousel"]'
+ };
+ var PointerType = {
+ TOUCH: 'touch',
+ PEN: 'pen'
+ };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ var Carousel =
+ /*#__PURE__*/
+ function () {
+ function Carousel(element, config) {
+ this._items = null;
+ this._interval = null;
+ this._activeElement = null;
+ this._isPaused = false;
+ this._isSliding = false;
+ this.touchTimeout = null;
+ this.touchStartX = 0;
+ this.touchDeltaX = 0;
+ this._config = this._getConfig(config);
+ this._element = element;
+ this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS);
+ this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
+ this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
+
+ this._addEventListeners();
+ } // Getters
+
+
+ var _proto = Carousel.prototype;
+
+ // Public
+ _proto.next = function next() {
+ if (!this._isSliding) {
+ this._slide(Direction.NEXT);
+ }
+ };
- var _proto = Carousel.prototype;
+ _proto.nextWhenVisible = function nextWhenVisible() {
+ // Don't call next when the page isn't visible
+ // or the carousel or its parent isn't visible
+ if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
+ this.next();
+ }
+ };
- // Public
- _proto.next = function next() {
- if (!this._isSliding) {
- this._slide(Direction.NEXT);
- }
- };
+ _proto.prev = function prev() {
+ if (!this._isSliding) {
+ this._slide(Direction.PREV);
+ }
+ };
- _proto.nextWhenVisible = function nextWhenVisible() {
- // Don't call next when the page isn't visible
- // or the carousel or its parent isn't visible
- if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
- this.next();
- }
- };
+ _proto.pause = function pause(event) {
+ if (!event) {
+ this._isPaused = true;
+ }
- _proto.prev = function prev() {
- if (!this._isSliding) {
- this._slide(Direction.PREV);
- }
- };
+ if (this._element.querySelector(Selector$2.NEXT_PREV)) {
+ Util.triggerTransitionEnd(this._element);
+ this.cycle(true);
+ }
- _proto.pause = function pause(event) {
- if (!event) {
- this._isPaused = true;
- }
+ clearInterval(this._interval);
+ this._interval = null;
+ };
- if ($$$1(this._element).find(Selector.NEXT_PREV)[0]) {
- Util.triggerTransitionEnd(this._element);
- this.cycle(true);
- }
+ _proto.cycle = function cycle(event) {
+ if (!event) {
+ this._isPaused = false;
+ }
+ if (this._interval) {
clearInterval(this._interval);
this._interval = null;
- };
+ }
- _proto.cycle = function cycle(event) {
- if (!event) {
- this._isPaused = false;
- }
+ if (this._config.interval && !this._isPaused) {
+ this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
+ }
+ };
- if (this._interval) {
- clearInterval(this._interval);
- this._interval = null;
- }
+ _proto.to = function to(index) {
+ var _this = this;
- if (this._config.interval && !this._isPaused) {
- this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
- }
- };
+ this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
- _proto.to = function to(index) {
- var _this = this;
+ var activeIndex = this._getItemIndex(this._activeElement);
- this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
+ if (index > this._items.length - 1 || index < 0) {
+ return;
+ }
- var activeIndex = this._getItemIndex(this._activeElement);
+ if (this._isSliding) {
+ $(this._element).one(Event$2.SLID, function () {
+ return _this.to(index);
+ });
+ return;
+ }
- if (index > this._items.length - 1 || index < 0) {
- return;
- }
+ if (activeIndex === index) {
+ this.pause();
+ this.cycle();
+ return;
+ }
- if (this._isSliding) {
- $$$1(this._element).one(Event.SLID, function () {
- return _this.to(index);
- });
- return;
- }
+ var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
- if (activeIndex === index) {
- this.pause();
- this.cycle();
- return;
- }
+ this._slide(direction, this._items[index]);
+ };
- var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
+ _proto.dispose = function dispose() {
+ $(this._element).off(EVENT_KEY$2);
+ $.removeData(this._element, DATA_KEY$2);
+ this._items = null;
+ this._config = null;
+ this._element = null;
+ this._interval = null;
+ this._isPaused = null;
+ this._isSliding = null;
+ this._activeElement = null;
+ this._indicatorsElement = null;
+ } // Private
+ ;
+
+ _proto._getConfig = function _getConfig(config) {
+ config = _objectSpread2({}, Default, {}, config);
+ Util.typeCheckConfig(NAME$2, config, DefaultType);
+ return config;
+ };
- this._slide(direction, this._items[index]);
- };
+ _proto._handleSwipe = function _handleSwipe() {
+ var absDeltax = Math.abs(this.touchDeltaX);
- _proto.dispose = function dispose() {
- $$$1(this._element).off(EVENT_KEY);
- $$$1.removeData(this._element, DATA_KEY);
- this._items = null;
- this._config = null;
- this._element = null;
- this._interval = null;
- this._isPaused = null;
- this._isSliding = null;
- this._activeElement = null;
- this._indicatorsElement = null;
- }; // Private
+ if (absDeltax <= SWIPE_THRESHOLD) {
+ return;
+ }
+ var direction = absDeltax / this.touchDeltaX;
+ this.touchDeltaX = 0; // swipe left
- _proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, Default, config);
- Util.typeCheckConfig(NAME, config, DefaultType);
- return config;
- };
+ if (direction > 0) {
+ this.prev();
+ } // swipe right
- _proto._addEventListeners = function _addEventListeners() {
- var _this2 = this;
- if (this._config.keyboard) {
- $$$1(this._element).on(Event.KEYDOWN, function (event) {
- return _this2._keydown(event);
- });
- }
+ if (direction < 0) {
+ this.next();
+ }
+ };
- if (this._config.pause === 'hover') {
- $$$1(this._element).on(Event.MOUSEENTER, function (event) {
- return _this2.pause(event);
- }).on(Event.MOUSELEAVE, function (event) {
- return _this2.cycle(event);
- });
+ _proto._addEventListeners = function _addEventListeners() {
+ var _this2 = this;
- if ('ontouchstart' in document.documentElement) {
- // If it's a touch-enabled device, mouseenter/leave are fired as
- // part of the mouse compatibility events on first tap - the carousel
- // would stop cycling until user tapped out of it;
- // here, we listen for touchend, explicitly pause the carousel
- // (as if it's the second time we tap on it, mouseenter compat event
- // is NOT fired) and after a timeout (to allow for mouse compatibility
- // events to fire) we explicitly restart cycling
- $$$1(this._element).on(Event.TOUCHEND, function () {
- _this2.pause();
+ if (this._config.keyboard) {
+ $(this._element).on(Event$2.KEYDOWN, function (event) {
+ return _this2._keydown(event);
+ });
+ }
- if (_this2.touchTimeout) {
- clearTimeout(_this2.touchTimeout);
- }
+ if (this._config.pause === 'hover') {
+ $(this._element).on(Event$2.MOUSEENTER, function (event) {
+ return _this2.pause(event);
+ }).on(Event$2.MOUSELEAVE, function (event) {
+ return _this2.cycle(event);
+ });
+ }
- _this2.touchTimeout = setTimeout(function (event) {
- return _this2.cycle(event);
- }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
- });
- }
- }
- };
+ if (this._config.touch) {
+ this._addTouchEventListeners();
+ }
+ };
- _proto._keydown = function _keydown(event) {
- if (/input|textarea/i.test(event.target.tagName)) {
- return;
- }
+ _proto._addTouchEventListeners = function _addTouchEventListeners() {
+ var _this3 = this;
- switch (event.which) {
- case ARROW_LEFT_KEYCODE:
- event.preventDefault();
- this.prev();
- break;
-
- case ARROW_RIGHT_KEYCODE:
- event.preventDefault();
- this.next();
- break;
+ if (!this._touchSupported) {
+ return;
+ }
- default:
+ var start = function start(event) {
+ if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
+ _this3.touchStartX = event.originalEvent.clientX;
+ } else if (!_this3._pointerEvent) {
+ _this3.touchStartX = event.originalEvent.touches[0].clientX;
}
};
- _proto._getItemIndex = function _getItemIndex(element) {
- this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM));
- return this._items.indexOf(element);
+ var move = function move(event) {
+ // ensure swiping with one touch and not pinching
+ if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
+ _this3.touchDeltaX = 0;
+ } else {
+ _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
+ }
};
- _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
- var isNextDirection = direction === Direction.NEXT;
- var isPrevDirection = direction === Direction.PREV;
+ var end = function end(event) {
+ if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
+ _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
+ }
- var activeIndex = this._getItemIndex(activeElement);
+ _this3._handleSwipe();
- var lastItemIndex = this._items.length - 1;
- var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
+ if (_this3._config.pause === 'hover') {
+ // If it's a touch-enabled device, mouseenter/leave are fired as
+ // part of the mouse compatibility events on first tap - the carousel
+ // would stop cycling until user tapped out of it;
+ // here, we listen for touchend, explicitly pause the carousel
+ // (as if it's the second time we tap on it, mouseenter compat event
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
+ // events to fire) we explicitly restart cycling
+ _this3.pause();
- if (isGoingToWrap && !this._config.wrap) {
- return activeElement;
- }
+ if (_this3.touchTimeout) {
+ clearTimeout(_this3.touchTimeout);
+ }
- var delta = direction === Direction.PREV ? -1 : 1;
- var itemIndex = (activeIndex + delta) % this._items.length;
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
+ _this3.touchTimeout = setTimeout(function (event) {
+ return _this3.cycle(event);
+ }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
+ }
};
- _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
- var targetIndex = this._getItemIndex(relatedTarget);
-
- var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]);
+ $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) {
+ return e.preventDefault();
+ });
- var slideEvent = $$$1.Event(Event.SLIDE, {
- relatedTarget: relatedTarget,
- direction: eventDirectionName,
- from: fromIndex,
- to: targetIndex
+ if (this._pointerEvent) {
+ $(this._element).on(Event$2.POINTERDOWN, function (event) {
+ return start(event);
+ });
+ $(this._element).on(Event$2.POINTERUP, function (event) {
+ return end(event);
});
- $$$1(this._element).trigger(slideEvent);
- return slideEvent;
- };
- _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
- if (this._indicatorsElement) {
- $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
+ this._element.classList.add(ClassName$2.POINTER_EVENT);
+ } else {
+ $(this._element).on(Event$2.TOUCHSTART, function (event) {
+ return start(event);
+ });
+ $(this._element).on(Event$2.TOUCHMOVE, function (event) {
+ return move(event);
+ });
+ $(this._element).on(Event$2.TOUCHEND, function (event) {
+ return end(event);
+ });
+ }
+ };
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
+ _proto._keydown = function _keydown(event) {
+ if (/input|textarea/i.test(event.target.tagName)) {
+ return;
+ }
- if (nextIndicator) {
- $$$1(nextIndicator).addClass(ClassName.ACTIVE);
- }
- }
- };
+ switch (event.which) {
+ case ARROW_LEFT_KEYCODE:
+ event.preventDefault();
+ this.prev();
+ break;
- _proto._slide = function _slide(direction, element) {
- var _this3 = this;
+ case ARROW_RIGHT_KEYCODE:
+ event.preventDefault();
+ this.next();
+ break;
+ }
+ };
- var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
+ _proto._getItemIndex = function _getItemIndex(element) {
+ this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : [];
+ return this._items.indexOf(element);
+ };
- var activeElementIndex = this._getItemIndex(activeElement);
+ _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
+ var isNextDirection = direction === Direction.NEXT;
+ var isPrevDirection = direction === Direction.PREV;
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
+ var activeIndex = this._getItemIndex(activeElement);
- var nextElementIndex = this._getItemIndex(nextElement);
+ var lastItemIndex = this._items.length - 1;
+ var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
- var isCycling = Boolean(this._interval);
- var directionalClassName;
- var orderClassName;
- var eventDirectionName;
+ if (isGoingToWrap && !this._config.wrap) {
+ return activeElement;
+ }
- if (direction === Direction.NEXT) {
- directionalClassName = ClassName.LEFT;
- orderClassName = ClassName.NEXT;
- eventDirectionName = Direction.LEFT;
- } else {
- directionalClassName = ClassName.RIGHT;
- orderClassName = ClassName.PREV;
- eventDirectionName = Direction.RIGHT;
- }
+ var delta = direction === Direction.PREV ? -1 : 1;
+ var itemIndex = (activeIndex + delta) % this._items.length;
+ return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
+ };
- if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
- this._isSliding = false;
- return;
- }
+ _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
+ var targetIndex = this._getItemIndex(relatedTarget);
- var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
+ var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM));
- if (slideEvent.isDefaultPrevented()) {
- return;
- }
+ var slideEvent = $.Event(Event$2.SLIDE, {
+ relatedTarget: relatedTarget,
+ direction: eventDirectionName,
+ from: fromIndex,
+ to: targetIndex
+ });
+ $(this._element).trigger(slideEvent);
+ return slideEvent;
+ };
- if (!activeElement || !nextElement) {
- // Some weirdness is happening, so we bail
- return;
- }
+ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
+ if (this._indicatorsElement) {
+ var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE));
+ $(indicators).removeClass(ClassName$2.ACTIVE);
- this._isSliding = true;
+ var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
- if (isCycling) {
- this.pause();
+ if (nextIndicator) {
+ $(nextIndicator).addClass(ClassName$2.ACTIVE);
}
+ }
+ };
- this._setActiveIndicatorElement(nextElement);
+ _proto._slide = function _slide(direction, element) {
+ var _this4 = this;
- var slidEvent = $$$1.Event(Event.SLID, {
- relatedTarget: nextElement,
- direction: eventDirectionName,
- from: activeElementIndex,
- to: nextElementIndex
- });
+ var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
- if ($$$1(this._element).hasClass(ClassName.SLIDE)) {
- $$$1(nextElement).addClass(orderClassName);
- Util.reflow(nextElement);
- $$$1(activeElement).addClass(directionalClassName);
- $$$1(nextElement).addClass(directionalClassName);
- var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
- $$$1(activeElement).one(Util.TRANSITION_END, function () {
- $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
- $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
- _this3._isSliding = false;
- setTimeout(function () {
- return $$$1(_this3._element).trigger(slidEvent);
- }, 0);
- }).emulateTransitionEnd(transitionDuration);
- } else {
- $$$1(activeElement).removeClass(ClassName.ACTIVE);
- $$$1(nextElement).addClass(ClassName.ACTIVE);
- this._isSliding = false;
- $$$1(this._element).trigger(slidEvent);
- }
+ var activeElementIndex = this._getItemIndex(activeElement);
- if (isCycling) {
- this.cycle();
- }
- }; // Static
+ var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
+ var nextElementIndex = this._getItemIndex(nextElement);
+
+ var isCycling = Boolean(this._interval);
+ var directionalClassName;
+ var orderClassName;
+ var eventDirectionName;
+
+ if (direction === Direction.NEXT) {
+ directionalClassName = ClassName$2.LEFT;
+ orderClassName = ClassName$2.NEXT;
+ eventDirectionName = Direction.LEFT;
+ } else {
+ directionalClassName = ClassName$2.RIGHT;
+ orderClassName = ClassName$2.PREV;
+ eventDirectionName = Direction.RIGHT;
+ }
- Carousel._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $$$1(this).data(DATA_KEY);
+ if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) {
+ this._isSliding = false;
+ return;
+ }
- var _config = _objectSpread({}, Default, $$$1(this).data());
+ var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
- if (typeof config === 'object') {
- _config = _objectSpread({}, _config, config);
- }
+ if (slideEvent.isDefaultPrevented()) {
+ return;
+ }
- var action = typeof config === 'string' ? config : _config.slide;
+ if (!activeElement || !nextElement) {
+ // Some weirdness is happening, so we bail
+ return;
+ }
- if (!data) {
- data = new Carousel(this, _config);
- $$$1(this).data(DATA_KEY, data);
- }
+ this._isSliding = true;
- if (typeof config === 'number') {
- data.to(config);
- } else if (typeof action === 'string') {
- if (typeof data[action] === 'undefined') {
- throw new TypeError("No method named \"" + action + "\"");
- }
+ if (isCycling) {
+ this.pause();
+ }
- data[action]();
- } else if (_config.interval) {
- data.pause();
- data.cycle();
- }
- });
- };
+ this._setActiveIndicatorElement(nextElement);
- Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
- var selector = Util.getSelectorFromElement(this);
+ var slidEvent = $.Event(Event$2.SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ });
- if (!selector) {
- return;
+ if ($(this._element).hasClass(ClassName$2.SLIDE)) {
+ $(nextElement).addClass(orderClassName);
+ Util.reflow(nextElement);
+ $(activeElement).addClass(directionalClassName);
+ $(nextElement).addClass(directionalClassName);
+ var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
+
+ if (nextElementInterval) {
+ this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
+ this._config.interval = nextElementInterval;
+ } else {
+ this._config.interval = this._config.defaultInterval || this._config.interval;
}
- var target = $$$1(selector)[0];
+ var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
+ $(activeElement).one(Util.TRANSITION_END, function () {
+ $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE);
+ $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName);
+ _this4._isSliding = false;
+ setTimeout(function () {
+ return $(_this4._element).trigger(slidEvent);
+ }, 0);
+ }).emulateTransitionEnd(transitionDuration);
+ } else {
+ $(activeElement).removeClass(ClassName$2.ACTIVE);
+ $(nextElement).addClass(ClassName$2.ACTIVE);
+ this._isSliding = false;
+ $(this._element).trigger(slidEvent);
+ }
- if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
- return;
- }
+ if (isCycling) {
+ this.cycle();
+ }
+ } // Static
+ ;
- var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data());
+ Carousel._jQueryInterface = function _jQueryInterface(config) {
+ return this.each(function () {
+ var data = $(this).data(DATA_KEY$2);
- var slideIndex = this.getAttribute('data-slide-to');
+ var _config = _objectSpread2({}, Default, {}, $(this).data());
- if (slideIndex) {
- config.interval = false;
+ if (typeof config === 'object') {
+ _config = _objectSpread2({}, _config, {}, config);
}
- Carousel._jQueryInterface.call($$$1(target), config);
+ var action = typeof config === 'string' ? config : _config.slide;
- if (slideIndex) {
- $$$1(target).data(DATA_KEY).to(slideIndex);
+ if (!data) {
+ data = new Carousel(this, _config);
+ $(this).data(DATA_KEY$2, data);
}
- event.preventDefault();
- };
-
- _createClass(Carousel, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }]);
-
- return Carousel;
- }();
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
-
- $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
- $$$1(window).on(Event.LOAD_DATA_API, function () {
- $$$1(Selector.DATA_RIDE).each(function () {
- var $carousel = $$$1(this);
+ if (typeof config === 'number') {
+ data.to(config);
+ } else if (typeof action === 'string') {
+ if (typeof data[action] === 'undefined') {
+ throw new TypeError("No method named \"" + action + "\"");
+ }
- Carousel._jQueryInterface.call($carousel, $carousel.data());
+ data[action]();
+ } else if (_config.interval && _config.ride) {
+ data.pause();
+ data.cycle();
+ }
});
- });
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $$$1.fn[NAME] = Carousel._jQueryInterface;
- $$$1.fn[NAME].Constructor = Carousel;
-
- $$$1.fn[NAME].noConflict = function () {
- $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
- return Carousel._jQueryInterface;
};
- return Carousel;
- }($);
+ Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
+ var selector = Util.getSelectorFromElement(this);
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.1): collapse.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
+ if (!selector) {
+ return;
+ }
- var Collapse = function ($$$1) {
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
- var NAME = 'collapse';
- var VERSION = '4.1.1';
- var DATA_KEY = 'bs.collapse';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
- var Default = {
- toggle: true,
- parent: ''
- };
- var DefaultType = {
- toggle: 'boolean',
- parent: '(string|element)'
- };
- var Event = {
- SHOW: "show" + EVENT_KEY,
- SHOWN: "shown" + EVENT_KEY,
- HIDE: "hide" + EVENT_KEY,
- HIDDEN: "hidden" + EVENT_KEY,
- CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
- };
- var ClassName = {
- SHOW: 'show',
- COLLAPSE: 'collapse',
- COLLAPSING: 'collapsing',
- COLLAPSED: 'collapsed'
- };
- var Dimension = {
- WIDTH: 'width',
- HEIGHT: 'height'
- };
- var Selector = {
- ACTIVES: '.show, .collapsing',
- DATA_TOGGLE: '[data-toggle="collapse"]'
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ var target = $(selector)[0];
- };
+ if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) {
+ return;
+ }
- var Collapse =
- /*#__PURE__*/
- function () {
- function Collapse(element, config) {
- this._isTransitioning = false;
- this._element = element;
- this._config = this._getConfig(config);
- this._triggerArray = $$$1.makeArray($$$1("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
- var tabToggles = $$$1(Selector.DATA_TOGGLE);
+ var config = _objectSpread2({}, $(target).data(), {}, $(this).data());
- for (var i = 0; i < tabToggles.length; i++) {
- var elem = tabToggles[i];
- var selector = Util.getSelectorFromElement(elem);
+ var slideIndex = this.getAttribute('data-slide-to');
- if (selector !== null && $$$1(selector).filter(element).length > 0) {
- this._selector = selector;
+ if (slideIndex) {
+ config.interval = false;
+ }
- this._triggerArray.push(elem);
- }
- }
+ Carousel._jQueryInterface.call($(target), config);
- this._parent = this._config.parent ? this._getParent() : null;
+ if (slideIndex) {
+ $(target).data(DATA_KEY$2).to(slideIndex);
+ }
- if (!this._config.parent) {
- this._addAriaAndCollapsedClass(this._element, this._triggerArray);
- }
+ event.preventDefault();
+ };
- if (this._config.toggle) {
- this.toggle();
- }
- } // Getters
+ _createClass(Carousel, null, [{
+ key: "VERSION",
+ get: function get() {
+ return VERSION$2;
+ }
+ }, {
+ key: "Default",
+ get: function get() {
+ return Default;
+ }
+ }]);
+ return Carousel;
+ }();
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
- var _proto = Collapse.prototype;
- // Public
- _proto.toggle = function toggle() {
- if ($$$1(this._element).hasClass(ClassName.SHOW)) {
- this.hide();
- } else {
- this.show();
- }
- };
+ $(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
+ $(window).on(Event$2.LOAD_DATA_API, function () {
+ var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE));
- _proto.show = function show() {
- var _this = this;
+ for (var i = 0, len = carousels.length; i < len; i++) {
+ var $carousel = $(carousels[i]);
- if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) {
- return;
- }
+ Carousel._jQueryInterface.call($carousel, $carousel.data());
+ }
+ });
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
- var actives;
- var activesData;
+ $.fn[NAME$2] = Carousel._jQueryInterface;
+ $.fn[NAME$2].Constructor = Carousel;
- if (this._parent) {
- actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]"));
+ $.fn[NAME$2].noConflict = function () {
+ $.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
+ return Carousel._jQueryInterface;
+ };
- if (actives.length === 0) {
- actives = null;
- }
- }
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
- if (actives) {
- activesData = $$$1(actives).not(this._selector).data(DATA_KEY);
+ var NAME$3 = 'collapse';
+ var VERSION$3 = '4.4.1';
+ var DATA_KEY$3 = 'bs.collapse';
+ var EVENT_KEY$3 = "." + DATA_KEY$3;
+ var DATA_API_KEY$3 = '.data-api';
+ var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
+ var Default$1 = {
+ toggle: true,
+ parent: ''
+ };
+ var DefaultType$1 = {
+ toggle: 'boolean',
+ parent: '(string|element)'
+ };
+ var Event$3 = {
+ SHOW: "show" + EVENT_KEY$3,
+ SHOWN: "shown" + EVENT_KEY$3,
+ HIDE: "hide" + EVENT_KEY$3,
+ HIDDEN: "hidden" + EVENT_KEY$3,
+ CLICK_DATA_API: "click" + EVENT_KEY$3 + DATA_API_KEY$3
+ };
+ var ClassName$3 = {
+ SHOW: 'show',
+ COLLAPSE: 'collapse',
+ COLLAPSING: 'collapsing',
+ COLLAPSED: 'collapsed'
+ };
+ var Dimension = {
+ WIDTH: 'width',
+ HEIGHT: 'height'
+ };
+ var Selector$3 = {
+ ACTIVES: '.show, .collapsing',
+ DATA_TOGGLE: '[data-toggle="collapse"]'
+ };
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- if (activesData && activesData._isTransitioning) {
- return;
- }
- }
+ var Collapse =
+ /*#__PURE__*/
+ function () {
+ function Collapse(element, config) {
+ this._isTransitioning = false;
+ this._element = element;
+ this._config = this._getConfig(config);
+ this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
+ var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE));
+
+ for (var i = 0, len = toggleList.length; i < len; i++) {
+ var elem = toggleList[i];
+ var selector = Util.getSelectorFromElement(elem);
+ var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
+ return foundElem === element;
+ });
- var startEvent = $$$1.Event(Event.SHOW);
- $$$1(this._element).trigger(startEvent);
+ if (selector !== null && filterElement.length > 0) {
+ this._selector = selector;
- if (startEvent.isDefaultPrevented()) {
- return;
+ this._triggerArray.push(elem);
}
+ }
- if (actives) {
- Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide');
+ this._parent = this._config.parent ? this._getParent() : null;
- if (!activesData) {
- $$$1(actives).data(DATA_KEY, null);
- }
- }
+ if (!this._config.parent) {
+ this._addAriaAndCollapsedClass(this._element, this._triggerArray);
+ }
- var dimension = this._getDimension();
+ if (this._config.toggle) {
+ this.toggle();
+ }
+ } // Getters
- $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
- this._element.style[dimension] = 0;
- if (this._triggerArray.length > 0) {
- $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
- }
+ var _proto = Collapse.prototype;
- this.setTransitioning(true);
+ // Public
+ _proto.toggle = function toggle() {
+ if ($(this._element).hasClass(ClassName$3.SHOW)) {
+ this.hide();
+ } else {
+ this.show();
+ }
+ };
- var complete = function complete() {
- $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
- _this._element.style[dimension] = '';
+ _proto.show = function show() {
+ var _this = this;
- _this.setTransitioning(false);
+ if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) {
+ return;
+ }
- $$$1(_this._element).trigger(Event.SHOWN);
- };
+ var actives;
+ var activesData;
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
- var scrollSize = "scroll" + capitalizedDimension;
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- this._element.style[dimension] = this._element[scrollSize] + "px";
- };
+ if (this._parent) {
+ actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) {
+ if (typeof _this._config.parent === 'string') {
+ return elem.getAttribute('data-parent') === _this._config.parent;
+ }
- _proto.hide = function hide() {
- var _this2 = this;
+ return elem.classList.contains(ClassName$3.COLLAPSE);
+ });
- if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {
- return;
+ if (actives.length === 0) {
+ actives = null;
}
+ }
- var startEvent = $$$1.Event(Event.HIDE);
- $$$1(this._element).trigger(startEvent);
+ if (actives) {
+ activesData = $(actives).not(this._selector).data(DATA_KEY$3);
- if (startEvent.isDefaultPrevented()) {
+ if (activesData && activesData._isTransitioning) {
return;
}
+ }
- var dimension = this._getDimension();
-
- this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
- Util.reflow(this._element);
- $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
+ var startEvent = $.Event(Event$3.SHOW);
+ $(this._element).trigger(startEvent);
- if (this._triggerArray.length > 0) {
- for (var i = 0; i < this._triggerArray.length; i++) {
- var trigger = this._triggerArray[i];
- var selector = Util.getSelectorFromElement(trigger);
+ if (startEvent.isDefaultPrevented()) {
+ return;
+ }
- if (selector !== null) {
- var $elem = $$$1(selector);
+ if (actives) {
+ Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
- if (!$elem.hasClass(ClassName.SHOW)) {
- $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
- }
- }
- }
+ if (!activesData) {
+ $(actives).data(DATA_KEY$3, null);
}
+ }
- this.setTransitioning(true);
+ var dimension = this._getDimension();
- var complete = function complete() {
- _this2.setTransitioning(false);
+ $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING);
+ this._element.style[dimension] = 0;
- $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
- };
+ if (this._triggerArray.length) {
+ $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true);
+ }
- this._element.style[dimension] = '';
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- };
+ this.setTransitioning(true);
- _proto.setTransitioning = function setTransitioning(isTransitioning) {
- this._isTransitioning = isTransitioning;
- };
+ var complete = function complete() {
+ $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW);
+ _this._element.style[dimension] = '';
- _proto.dispose = function dispose() {
- $$$1.removeData(this._element, DATA_KEY);
- this._config = null;
- this._parent = null;
- this._element = null;
- this._triggerArray = null;
- this._isTransitioning = null;
- }; // Private
-
-
- _proto._getConfig = function _getConfig(config) {
- config = _objectSpread({}, Default, config);
- config.toggle = Boolean(config.toggle); // Coerce string values
+ _this.setTransitioning(false);
- Util.typeCheckConfig(NAME, config, DefaultType);
- return config;
+ $(_this._element).trigger(Event$3.SHOWN);
};
- _proto._getDimension = function _getDimension() {
- var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH);
- return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
- };
+ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
+ var scrollSize = "scroll" + capitalizedDimension;
+ var transitionDuration = Util.getTransitionDurationFromElement(this._element);
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ this._element.style[dimension] = this._element[scrollSize] + "px";
+ };
- _proto._getParent = function _getParent() {
- var _this3 = this;
+ _proto.hide = function hide() {
+ var _this2 = this;
- var parent = null;
+ if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) {
+ return;
+ }
- if (Util.isElement(this._config.parent)) {
- parent = this._config.parent; // It's a jQuery object
+ var startEvent = $.Event(Event$3.HIDE);
+ $(this._element).trigger(startEvent);
- if (typeof this._config.parent.jquery !== 'undefined') {
- parent = this._config.parent[0];
- }
- } else {
- parent = $$$1(this._config.parent)[0];
- }
+ if (startEvent.isDefaultPrevented()) {
+ return;
+ }
- var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
- $$$1(parent).find(selector).each(function (i, element) {
- _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
- });
- return parent;
- };
+ var dimension = this._getDimension();
+
+ this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
+ Util.reflow(this._element);
+ $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW);
+ var triggerArrayLength = this._triggerArray.length;
+
+ if (triggerArrayLength > 0) {
+ for (var i = 0; i < triggerArrayLength; i++) {
+ var trigger = this._triggerArray[i];
+ var selector = Util.getSelectorFromElement(trigger);
- _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
- if (element) {
- var isOpen = $$$1(element).hasClass(ClassName.SHOW);
+ if (selector !== null) {
+ var $elem = $([].slice.call(document.querySelectorAll(selector)));
- if (triggerArray.length > 0) {
- $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
+ if (!$elem.hasClass(ClassName$3.SHOW)) {
+ $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false);
+ }
}
}
- }; // Static
+ }
+ this.setTransitioning(true);
- Collapse._getTargetFromElement = function _getTargetFromElement(element) {
- var selector = Util.getSelectorFromElement(element);
- return selector ? $$$1(selector)[0] : null;
+ var complete = function complete() {
+ _this2.setTransitioning(false);
+
+ $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN);
};
- Collapse._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $$$1(this);
- var data = $this.data(DATA_KEY);
+ this._element.style[dimension] = '';
+ var transitionDuration = Util.getTransitionDurationFromElement(this._element);
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ };
- var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {});
+ _proto.setTransitioning = function setTransitioning(isTransitioning) {
+ this._isTransitioning = isTransitioning;
+ };
- if (!data && _config.toggle && /show|hide/.test(config)) {
- _config.toggle = false;
- }
+ _proto.dispose = function dispose() {
+ $.removeData(this._element, DATA_KEY$3);
+ this._config = null;
+ this._parent = null;
+ this._element = null;
+ this._triggerArray = null;
+ this._isTransitioning = null;
+ } // Private
+ ;
- if (!data) {
- data = new Collapse(this, _config);
- $this.data(DATA_KEY, data);
- }
+ _proto._getConfig = function _getConfig(config) {
+ config = _objectSpread2({}, Default$1, {}, config);
+ config.toggle = Boolean(config.toggle); // Coerce string values
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
- }
+ Util.typeCheckConfig(NAME$3, config, DefaultType$1);
+ return config;
+ };
- data[config]();
- }
- });
- };
+ _proto._getDimension = function _getDimension() {
+ var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
+ return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
+ };
- _createClass(Collapse, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }]);
-
- return Collapse;
- }();
- /**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
- */
-
-
- $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
- // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
- if (event.currentTarget.tagName === 'A') {
- event.preventDefault();
- }
+ _proto._getParent = function _getParent() {
+ var _this3 = this;
- var $trigger = $$$1(this);
- var selector = Util.getSelectorFromElement(this);
- $$$1(selector).each(function () {
- var $target = $$$1(this);
- var data = $target.data(DATA_KEY);
- var config = data ? 'toggle' : $trigger.data();
+ var parent;
+
+ if (Util.isElement(this._config.parent)) {
+ parent = this._config.parent; // It's a jQuery object
- Collapse._jQueryInterface.call($target, config);
+ if (typeof this._config.parent.jquery !== 'undefined') {
+ parent = this._config.parent[0];
+ }
+ } else {
+ parent = document.querySelector(this._config.parent);
+ }
+
+ var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
+ var children = [].slice.call(parent.querySelectorAll(selector));
+ $(children).each(function (i, element) {
+ _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
});
- });
- /**
- * ------------------------------------------------------------------------
- * jQuery
- * ------------------------------------------------------------------------
- */
-
- $$$1.fn[NAME] = Collapse._jQueryInterface;
- $$$1.fn[NAME].Constructor = Collapse;
-
- $$$1.fn[NAME].noConflict = function () {
- $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
- return Collapse._jQueryInterface;
+ return parent;
};
- return Collapse;
- }($);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.1.1): dropdown.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
+ _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
+ var isOpen = $(element).hasClass(ClassName$3.SHOW);
- var Dropdown = function ($$$1) {
- /**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
- */
- var NAME = 'dropdown';
- var VERSION = '4.1.1';
- var DATA_KEY = 'bs.dropdown';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
- var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
-
- var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
-
- var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
-
- var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
-
- var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
-
- var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
-
- var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
- var Event = {
[... 4981 lines stripped ...]