diff --git a/Frontend/dashboard.html b/Frontend/_dashboard.html similarity index 100% rename from Frontend/dashboard.html rename to Frontend/_dashboard.html diff --git a/Frontend/index.html b/Frontend/index.html index 335daa5..4b52e66 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -2061,7 +2061,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li diff --git a/Frontend/js/bootstrap.js b/Frontend/js/bootstrap.js deleted file mode 100644 index da59f0e..0000000 --- a/Frontend/js/bootstrap.js +++ /dev/null @@ -1,4435 +0,0 @@ -/*! - * Bootstrap v4.3.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) : - (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; - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - 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; - } - - return obj; - } - - function _objectSpread(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; - })); - } - - ownKeys.forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } - - return target; - } - - function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; - } - - /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.3.1): util.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- - */ - /** - * ------------------------------------------------------------------------ - * 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(); - } - - 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 - } - - return undefined; // eslint-disable-line no-undefined - } - }; - } - - function transitionEndEmulator(duration) { - var _this = this; - - var called = false; - $(this).one(Util.TRANSITION_END, function () { - called = true; - }); - setTimeout(function () { - if (!called) { - Util.triggerTransitionEnd(_this); - } - }, duration); - return this; - } - - function setTransitionEndSupport() { - $.fn.emulateTransitionEnd = transitionEndEmulator; - $.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 === '#') { - var hrefAttr = element.getAttribute('href'); - selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; - } - - 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 - - - if (typeof element.getRootNode === 'function') { - var root = element.getRootNode(); - return root instanceof ShadowRoot ? root : null; - } - - if (element instanceof ShadowRoot) { - return element; - } // when we don't find a shadow root - - - if (!element.parentNode) { - return null; - } - - return Util.findShadowRoot(element.parentNode); - } - }; - setTransitionEndSupport(); - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME = 'alert'; - var VERSION = '4.3.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 - * ------------------------------------------------------------------------ - */ - - }; - - 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 (element) { - rootElement = this._getRootElement(element); - } - - var customEvent = this._triggerCloseEvent(rootElement); - - if (customEvent.isDefaultPrevented()) { - return; - } - - this._removeElement(rootElement); - }; - - _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 (selector) { - parent = document.querySelector(selector); - } - - if (!parent) { - parent = $(element).closest("." + ClassName.ALERT)[0]; - } - - return parent; - }; - - _proto._triggerCloseEvent = function _triggerCloseEvent(element) { - var closeEvent = $.Event(Event.CLOSE); - $(element).trigger(closeEvent); - return closeEvent; - }; - - _proto._removeElement = function _removeElement(element) { - var _this = this; - - $(element).removeClass(ClassName.SHOW); - - if (!$(element).hasClass(ClassName.FADE)) { - this._destroyElement(element); - - return; - } - - var transitionDuration = Util.getTransitionDurationFromElement(element); - $(element).one(Util.TRANSITION_END, function (event) { - return _this._destroyElement(element, event); - }).emulateTransitionEnd(transitionDuration); - }; - - _proto._destroyElement = function _destroyElement(element) { - $(element).detach().trigger(Event.CLOSED).remove(); - } // Static - ; - - 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())); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.fn[NAME] = Alert._jQueryInterface; - $.fn[NAME].Constructor = Alert; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Alert._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$1 = 'button'; - var VERSION$1 = '4.3.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_TOGGLE: '[data-toggle="buttons"]', - 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) - /** - * ------------------------------------------------------------------------ - * 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_TOGGLE)[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); - - if (activeElement) { - $(activeElement).removeClass(ClassName$1.ACTIVE); - } - } - } - - if (triggerChangeEvent) { - if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { - return; - } - - input.checked = !this._element.classList.contains(ClassName$1.ACTIVE); - $(input).trigger('change'); - } - - input.focus(); - addAriaPressed = false; - } - } - - if (addAriaPressed) { - this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE)); - } - - if (triggerChangeEvent) { - $(this._element).toggleClass(ClassName$1.ACTIVE); - } - }; - - _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](); - } - }); - }; - - _createClass(Button, null, [{ - key: "VERSION", - get: function get() { - return VERSION$1; - } - }]); - - return Button; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - - - $(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) { - event.preventDefault(); - var button = event.target; - - if (!$(button).hasClass(ClassName$1.BUTTON)) { - button = $(button).closest(Selector$1.BUTTON); - } - - 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)); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.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; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$2 = 'carousel'; - var VERSION$2 = '4.3.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); - } - }; - - _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(); - } - }; - - _proto.prev = function prev() { - if (!this._isSliding) { - this._slide(Direction.PREV); - } - }; - - _proto.pause = function pause(event) { - if (!event) { - this._isPaused = true; - } - - if (this._element.querySelector(Selector$2.NEXT_PREV)) { - Util.triggerTransitionEnd(this._element); - this.cycle(true); - } - - clearInterval(this._interval); - this._interval = null; - }; - - _proto.cycle = function cycle(event) { - if (!event) { - this._isPaused = false; - } - - if (this._interval) { - clearInterval(this._interval); - this._interval = null; - } - - if (this._config.interval && !this._isPaused) { - this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); - } - }; - - _proto.to = function to(index) { - var _this = this; - - this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); - - var activeIndex = this._getItemIndex(this._activeElement); - - if (index > this._items.length - 1 || index < 0) { - return; - } - - if (this._isSliding) { - $(this._element).one(Event$2.SLID, function () { - return _this.to(index); - }); - return; - } - - if (activeIndex === index) { - this.pause(); - this.cycle(); - return; - } - - var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; - - this._slide(direction, this._items[index]); - }; - - _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 = _objectSpread({}, Default, config); - Util.typeCheckConfig(NAME$2, config, DefaultType); - return config; - }; - - _proto._handleSwipe = function _handleSwipe() { - var absDeltax = Math.abs(this.touchDeltaX); - - if (absDeltax <= SWIPE_THRESHOLD) { - return; - } - - var direction = absDeltax / this.touchDeltaX; // swipe left - - if (direction > 0) { - this.prev(); - } // swipe right - - - if (direction < 0) { - this.next(); - } - }; - - _proto._addEventListeners = function _addEventListeners() { - var _this2 = this; - - if (this._config.keyboard) { - $(this._element).on(Event$2.KEYDOWN, function (event) { - return _this2._keydown(event); - }); - } - - 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); - }); - } - - if (this._config.touch) { - this._addTouchEventListeners(); - } - }; - - _proto._addTouchEventListeners = function _addTouchEventListeners() { - var _this3 = this; - - if (!this._touchSupported) { - return; - } - - 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; - } - }; - - 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; - } - }; - - var end = function end(event) { - if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { - _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX; - } - - _this3._handleSwipe(); - - 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 (_this3.touchTimeout) { - clearTimeout(_this3.touchTimeout); - } - - _this3.touchTimeout = setTimeout(function (event) { - return _this3.cycle(event); - }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval); - } - }; - - $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) { - return e.preventDefault(); - }); - - 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); - }); - - 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); - }); - } - }; - - _proto._keydown = function _keydown(event) { - if (/input|textarea/i.test(event.target.tagName)) { - return; - } - - switch (event.which) { - case ARROW_LEFT_KEYCODE: - event.preventDefault(); - this.prev(); - break; - - case ARROW_RIGHT_KEYCODE: - event.preventDefault(); - this.next(); - break; - - default: - } - }; - - _proto._getItemIndex = function _getItemIndex(element) { - this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : []; - return this._items.indexOf(element); - }; - - _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { - var isNextDirection = direction === Direction.NEXT; - var isPrevDirection = direction === Direction.PREV; - - var activeIndex = this._getItemIndex(activeElement); - - var lastItemIndex = this._items.length - 1; - var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; - - if (isGoingToWrap && !this._config.wrap) { - return activeElement; - } - - 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]; - }; - - _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { - var targetIndex = this._getItemIndex(relatedTarget); - - var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM)); - - var slideEvent = $.Event(Event$2.SLIDE, { - relatedTarget: relatedTarget, - direction: eventDirectionName, - from: fromIndex, - to: targetIndex - }); - $(this._element).trigger(slideEvent); - return slideEvent; - }; - - _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { - if (this._indicatorsElement) { - var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE)); - $(indicators).removeClass(ClassName$2.ACTIVE); - - var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; - - if (nextIndicator) { - $(nextIndicator).addClass(ClassName$2.ACTIVE); - } - } - }; - - _proto._slide = function _slide(direction, element) { - var _this4 = this; - - var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); - - var activeElementIndex = this._getItemIndex(activeElement); - - 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; - } - - if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) { - this._isSliding = false; - return; - } - - var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); - - if (slideEvent.isDefaultPrevented()) { - return; - } - - if (!activeElement || !nextElement) { - // Some weirdness is happening, so we bail - return; - } - - this._isSliding = true; - - if (isCycling) { - this.pause(); - } - - this._setActiveIndicatorElement(nextElement); - - var slidEvent = $.Event(Event$2.SLID, { - relatedTarget: nextElement, - direction: eventDirectionName, - from: activeElementIndex, - to: nextElementIndex - }); - - 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 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 (isCycling) { - this.cycle(); - } - } // Static - ; - - Carousel._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$2); - - var _config = _objectSpread({}, Default, $(this).data()); - - if (typeof config === 'object') { - _config = _objectSpread({}, _config, config); - } - - var action = typeof config === 'string' ? config : _config.slide; - - if (!data) { - data = new Carousel(this, _config); - $(this).data(DATA_KEY$2, data); - } - - if (typeof config === 'number') { - data.to(config); - } else if (typeof action === 'string') { - if (typeof data[action] === 'undefined') { - throw new TypeError("No method named \"" + action + "\""); - } - - data[action](); - } else if (_config.interval && _config.ride) { - data.pause(); - data.cycle(); - } - }); - }; - - Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { - var selector = Util.getSelectorFromElement(this); - - if (!selector) { - return; - } - - var target = $(selector)[0]; - - if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) { - return; - } - - var config = _objectSpread({}, $(target).data(), $(this).data()); - - var slideIndex = this.getAttribute('data-slide-to'); - - if (slideIndex) { - config.interval = false; - } - - Carousel._jQueryInterface.call($(target), config); - - if (slideIndex) { - $(target).data(DATA_KEY$2).to(slideIndex); - } - - event.preventDefault(); - }; - - _createClass(Carousel, null, [{ - key: "VERSION", - get: function get() { - return VERSION$2; - } - }, { - key: "Default", - get: function get() { - return Default; - } - }]); - - return Carousel; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - - - $(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)); - - for (var i = 0, len = carousels.length; i < len; i++) { - var $carousel = $(carousels[i]); - - Carousel._jQueryInterface.call($carousel, $carousel.data()); - } - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.fn[NAME$2] = Carousel._jQueryInterface; - $.fn[NAME$2].Constructor = Carousel; - - $.fn[NAME$2].noConflict = function () { - $.fn[NAME$2] = JQUERY_NO_CONFLICT$2; - return Carousel._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$3 = 'collapse'; - var VERSION$3 = '4.3.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 - * ------------------------------------------------------------------------ - */ - - }; - - 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; - }); - - if (selector !== null && filterElement.length > 0) { - this._selector = selector; - - this._triggerArray.push(elem); - } - } - - this._parent = this._config.parent ? this._getParent() : null; - - if (!this._config.parent) { - this._addAriaAndCollapsedClass(this._element, this._triggerArray); - } - - if (this._config.toggle) { - this.toggle(); - } - } // Getters - - - var _proto = Collapse.prototype; - - // Public - _proto.toggle = function toggle() { - if ($(this._element).hasClass(ClassName$3.SHOW)) { - this.hide(); - } else { - this.show(); - } - }; - - _proto.show = function show() { - var _this = this; - - if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) { - return; - } - - var actives; - var activesData; - - 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; - } - - return elem.classList.contains(ClassName$3.COLLAPSE); - }); - - if (actives.length === 0) { - actives = null; - } - } - - if (actives) { - activesData = $(actives).not(this._selector).data(DATA_KEY$3); - - if (activesData && activesData._isTransitioning) { - return; - } - } - - var startEvent = $.Event(Event$3.SHOW); - $(this._element).trigger(startEvent); - - if (startEvent.isDefaultPrevented()) { - return; - } - - if (actives) { - Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide'); - - if (!activesData) { - $(actives).data(DATA_KEY$3, null); - } - } - - var dimension = this._getDimension(); - - $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING); - this._element.style[dimension] = 0; - - if (this._triggerArray.length) { - $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true); - } - - this.setTransitioning(true); - - var complete = function complete() { - $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW); - _this._element.style[dimension] = ''; - - _this.setTransitioning(false); - - $(_this._element).trigger(Event$3.SHOWN); - }; - - 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.hide = function hide() { - var _this2 = this; - - if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) { - return; - } - - var startEvent = $.Event(Event$3.HIDE); - $(this._element).trigger(startEvent); - - if (startEvent.isDefaultPrevented()) { - return; - } - - 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); - - if (selector !== null) { - var $elem = $([].slice.call(document.querySelectorAll(selector))); - - if (!$elem.hasClass(ClassName$3.SHOW)) { - $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false); - } - } - } - } - - this.setTransitioning(true); - - var complete = function complete() { - _this2.setTransitioning(false); - - $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN); - }; - - this._element.style[dimension] = ''; - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - }; - - _proto.setTransitioning = function setTransitioning(isTransitioning) { - this._isTransitioning = isTransitioning; - }; - - _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 - ; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default$1, config); - config.toggle = Boolean(config.toggle); // Coerce string values - - Util.typeCheckConfig(NAME$3, config, DefaultType$1); - return config; - }; - - _proto._getDimension = function _getDimension() { - var hasWidth = $(this._element).hasClass(Dimension.WIDTH); - return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; - }; - - _proto._getParent = function _getParent() { - var _this3 = this; - - var parent; - - if (Util.isElement(this._config.parent)) { - parent = this._config.parent; // It's a jQuery object - - 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]); - }); - return parent; - }; - - _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { - var isOpen = $(element).hasClass(ClassName$3.SHOW); - - if (triggerArray.length) { - $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); - } - } // Static - ; - - Collapse._getTargetFromElement = function _getTargetFromElement(element) { - var selector = Util.getSelectorFromElement(element); - return selector ? document.querySelector(selector) : null; - }; - - Collapse._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var $this = $(this); - var data = $this.data(DATA_KEY$3); - - var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {}); - - if (!data && _config.toggle && /show|hide/.test(config)) { - _config.toggle = false; - } - - if (!data) { - data = new Collapse(this, _config); - $this.data(DATA_KEY$3, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](); - } - }); - }; - - _createClass(Collapse, null, [{ - key: "VERSION", - get: function get() { - return VERSION$3; - } - }, { - key: "Default", - get: function get() { - return Default$1; - } - }]); - - return Collapse; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - - - $(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) { - // preventDefault only for elements (which change the URL) not inside the collapsible element - if (event.currentTarget.tagName === 'A') { - event.preventDefault(); - } - - var $trigger = $(this); - var selector = Util.getSelectorFromElement(this); - var selectors = [].slice.call(document.querySelectorAll(selector)); - $(selectors).each(function () { - var $target = $(this); - var data = $target.data(DATA_KEY$3); - var config = data ? 'toggle' : $trigger.data(); - - Collapse._jQueryInterface.call($target, config); - }); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.fn[NAME$3] = Collapse._jQueryInterface; - $.fn[NAME$3].Constructor = Collapse; - - $.fn[NAME$3].noConflict = function () { - $.fn[NAME$3] = JQUERY_NO_CONFLICT$3; - return Collapse._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$4 = 'dropdown'; - var VERSION$4 = '4.3.1'; - var DATA_KEY$4 = 'bs.dropdown'; - var EVENT_KEY$4 = "." + DATA_KEY$4; - var DATA_API_KEY$4 = '.data-api'; - var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4]; - 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$4 = { - HIDE: "hide" + EVENT_KEY$4, - HIDDEN: "hidden" + EVENT_KEY$4, - SHOW: "show" + EVENT_KEY$4, - SHOWN: "shown" + EVENT_KEY$4, - CLICK: "click" + EVENT_KEY$4, - CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4, - KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4, - KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4 - }; - var ClassName$4 = { - DISABLED: 'disabled', - SHOW: 'show', - DROPUP: 'dropup', - DROPRIGHT: 'dropright', - DROPLEFT: 'dropleft', - MENURIGHT: 'dropdown-menu-right', - MENULEFT: 'dropdown-menu-left', - POSITION_STATIC: 'position-static' - }; - var Selector$4 = { - DATA_TOGGLE: '[data-toggle="dropdown"]', - FORM_CHILD: '.dropdown form', - MENU: '.dropdown-menu', - NAVBAR_NAV: '.navbar-nav', - VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' - }; - var AttachmentMap = { - TOP: 'top-start', - TOPEND: 'top-end', - BOTTOM: 'bottom-start', - BOTTOMEND: 'bottom-end', - RIGHT: 'right-start', - RIGHTEND: 'right-end', - LEFT: 'left-start', - LEFTEND: 'left-end' - }; - var Default$2 = { - offset: 0, - flip: true, - boundary: 'scrollParent', - reference: 'toggle', - display: 'dynamic' - }; - var DefaultType$2 = { - offset: '(number|string|function)', - flip: 'boolean', - boundary: '(string|element)', - reference: '(string|element)', - display: 'string' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Dropdown = - /*#__PURE__*/ - function () { - function Dropdown(element, config) { - this._element = element; - this._popper = null; - this._config = this._getConfig(config); - this._menu = this._getMenuElement(); - this._inNavbar = this._detectNavbar(); - - this._addEventListeners(); - } // Getters - - - var _proto = Dropdown.prototype; - - // Public - _proto.toggle = function toggle() { - if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) { - return; - } - - var parent = Dropdown._getParentFromElement(this._element); - - var isActive = $(this._menu).hasClass(ClassName$4.SHOW); - - Dropdown._clearMenus(); - - if (isActive) { - return; - } - - var relatedTarget = { - relatedTarget: this._element - }; - var showEvent = $.Event(Event$4.SHOW, relatedTarget); - $(parent).trigger(showEvent); - - if (showEvent.isDefaultPrevented()) { - return; - } // Disable totally Popper.js for Dropdown in Navbar - - - if (!this._inNavbar) { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)'); - } - - var referenceElement = this._element; - - if (this._config.reference === 'parent') { - referenceElement = parent; - } else if (Util.isElement(this._config.reference)) { - referenceElement = this._config.reference; // Check if it's jQuery element - - if (typeof this._config.reference.jquery !== 'undefined') { - referenceElement = this._config.reference[0]; - } - } // If boundary is not `scrollParent`, then set position to `static` - // to allow the menu to "escape" the scroll parent's boundaries - // https://github.com/twbs/bootstrap/issues/24251 - - - if (this._config.boundary !== 'scrollParent') { - $(parent).addClass(ClassName$4.POSITION_STATIC); - } - - this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); - } // If this is a touch-enabled device we add extra - // empty mouseover listeners to the body's immediate children; - // only needed because of broken event delegation on iOS - // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html - - - if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) { - $(document.body).children().on('mouseover', null, $.noop); - } - - this._element.focus(); - - this._element.setAttribute('aria-expanded', true); - - $(this._menu).toggleClass(ClassName$4.SHOW); - $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); - }; - - _proto.show = function show() { - if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) { - return; - } - - var relatedTarget = { - relatedTarget: this._element - }; - var showEvent = $.Event(Event$4.SHOW, relatedTarget); - - var parent = Dropdown._getParentFromElement(this._element); - - $(parent).trigger(showEvent); - - if (showEvent.isDefaultPrevented()) { - return; - } - - $(this._menu).toggleClass(ClassName$4.SHOW); - $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); - }; - - _proto.hide = function hide() { - if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) { - return; - } - - var relatedTarget = { - relatedTarget: this._element - }; - var hideEvent = $.Event(Event$4.HIDE, relatedTarget); - - var parent = Dropdown._getParentFromElement(this._element); - - $(parent).trigger(hideEvent); - - if (hideEvent.isDefaultPrevented()) { - return; - } - - $(this._menu).toggleClass(ClassName$4.SHOW); - $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); - }; - - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY$4); - $(this._element).off(EVENT_KEY$4); - this._element = null; - this._menu = null; - - if (this._popper !== null) { - this._popper.destroy(); - - this._popper = null; - } - }; - - _proto.update = function update() { - this._inNavbar = this._detectNavbar(); - - if (this._popper !== null) { - this._popper.scheduleUpdate(); - } - } // Private - ; - - _proto._addEventListeners = function _addEventListeners() { - var _this = this; - - $(this._element).on(Event$4.CLICK, function (event) { - event.preventDefault(); - event.stopPropagation(); - - _this.toggle(); - }); - }; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config); - Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); - return config; - }; - - _proto._getMenuElement = function _getMenuElement() { - if (!this._menu) { - var parent = Dropdown._getParentFromElement(this._element); - - if (parent) { - this._menu = parent.querySelector(Selector$4.MENU); - } - } - - return this._menu; - }; - - _proto._getPlacement = function _getPlacement() { - var $parentDropdown = $(this._element.parentNode); - var placement = AttachmentMap.BOTTOM; // Handle dropup - - if ($parentDropdown.hasClass(ClassName$4.DROPUP)) { - placement = AttachmentMap.TOP; - - if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { - placement = AttachmentMap.TOPEND; - } - } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) { - placement = AttachmentMap.RIGHT; - } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) { - placement = AttachmentMap.LEFT; - } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { - placement = AttachmentMap.BOTTOMEND; - } - - return placement; - }; - - _proto._detectNavbar = function _detectNavbar() { - return $(this._element).closest('.navbar').length > 0; - }; - - _proto._getOffset = function _getOffset() { - var _this2 = this; - - var offset = {}; - - if (typeof this._config.offset === 'function') { - offset.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); - return data; - }; - } else { - offset.offset = this._config.offset; - } - - return offset; - }; - - _proto._getPopperConfig = function _getPopperConfig() { - var popperConfig = { - placement: this._getPlacement(), - modifiers: { - offset: this._getOffset(), - flip: { - enabled: this._config.flip - }, - preventOverflow: { - boundariesElement: this._config.boundary - } - } // Disable Popper.js if we have a static display - - }; - - if (this._config.display === 'static') { - popperConfig.modifiers.applyStyle = { - enabled: false - }; - } - - return popperConfig; - } // Static - ; - - Dropdown._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$4); - - var _config = typeof config === 'object' ? config : null; - - if (!data) { - data = new Dropdown(this, _config); - $(this).data(DATA_KEY$4, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](); - } - }); - }; - - Dropdown._clearMenus = function _clearMenus(event) { - if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { - return; - } - - var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE)); - - for (var i = 0, len = toggles.length; i < len; i++) { - var parent = Dropdown._getParentFromElement(toggles[i]); - - var context = $(toggles[i]).data(DATA_KEY$4); - var relatedTarget = { - relatedTarget: toggles[i] - }; - - if (event && event.type === 'click') { - relatedTarget.clickEvent = event; - } - - if (!context) { - continue; - } - - var dropdownMenu = context._menu; - - if (!$(parent).hasClass(ClassName$4.SHOW)) { - continue; - } - - if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { - continue; - } - - var hideEvent = $.Event(Event$4.HIDE, relatedTarget); - $(parent).trigger(hideEvent); - - if (hideEvent.isDefaultPrevented()) { - continue; - } // If this is a touch-enabled device we remove the extra - // empty mouseover listeners we added for iOS support - - - if ('ontouchstart' in document.documentElement) { - $(document.body).children().off('mouseover', null, $.noop); - } - - toggles[i].setAttribute('aria-expanded', 'false'); - $(dropdownMenu).removeClass(ClassName$4.SHOW); - $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); - } - }; - - Dropdown._getParentFromElement = function _getParentFromElement(element) { - var parent; - var selector = Util.getSelectorFromElement(element); - - if (selector) { - parent = document.querySelector(selector); - } - - return parent || element.parentNode; - } // eslint-disable-next-line complexity - ; - - Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { - // If not input/textarea: - // - And not a key in REGEXP_KEYDOWN => not a dropdown command - // If input/textarea: - // - If space key => not a dropdown command - // - If key is other than escape - // - If key is not up or down => not a dropdown command - // - If trigger inside the menu => not a dropdown command - if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { - return; - } - - event.preventDefault(); - event.stopPropagation(); - - if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) { - return; - } - - var parent = Dropdown._getParentFromElement(this); - - var isActive = $(parent).hasClass(ClassName$4.SHOW); - - if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { - if (event.which === ESCAPE_KEYCODE) { - var toggle = parent.querySelector(Selector$4.DATA_TOGGLE); - $(toggle).trigger('focus'); - } - - $(this).trigger('click'); - return; - } - - var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)); - - if (items.length === 0) { - return; - } - - var index = items.indexOf(event.target); - - if (event.which === ARROW_UP_KEYCODE && index > 0) { - // Up - index--; - } - - if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { - // Down - index++; - } - - if (index < 0) { - index = 0; - } - - items[index].focus(); - }; - - _createClass(Dropdown, null, [{ - key: "VERSION", - get: function get() { - return VERSION$4; - } - }, { - key: "Default", - get: function get() { - return Default$2; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType$2; - } - }]); - - return Dropdown; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - - - $(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) { - event.preventDefault(); - event.stopPropagation(); - - Dropdown._jQueryInterface.call($(this), 'toggle'); - }).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) { - e.stopPropagation(); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.fn[NAME$4] = Dropdown._jQueryInterface; - $.fn[NAME$4].Constructor = Dropdown; - - $.fn[NAME$4].noConflict = function () { - $.fn[NAME$4] = JQUERY_NO_CONFLICT$4; - return Dropdown._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$5 = 'modal'; - var VERSION$5 = '4.3.1'; - var DATA_KEY$5 = 'bs.modal'; - var EVENT_KEY$5 = "." + DATA_KEY$5; - var DATA_API_KEY$5 = '.data-api'; - var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5]; - var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key - - var Default$3 = { - backdrop: true, - keyboard: true, - focus: true, - show: true - }; - var DefaultType$3 = { - backdrop: '(boolean|string)', - keyboard: 'boolean', - focus: 'boolean', - show: 'boolean' - }; - var Event$5 = { - HIDE: "hide" + EVENT_KEY$5, - HIDDEN: "hidden" + EVENT_KEY$5, - SHOW: "show" + EVENT_KEY$5, - SHOWN: "shown" + EVENT_KEY$5, - FOCUSIN: "focusin" + EVENT_KEY$5, - RESIZE: "resize" + EVENT_KEY$5, - CLICK_DISMISS: "click.dismiss" + EVENT_KEY$5, - KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY$5, - MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5, - MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5, - CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5 - }; - var ClassName$5 = { - SCROLLABLE: 'modal-dialog-scrollable', - SCROLLBAR_MEASURER: 'modal-scrollbar-measure', - BACKDROP: 'modal-backdrop', - OPEN: 'modal-open', - FADE: 'fade', - SHOW: 'show' - }; - var Selector$5 = { - DIALOG: '.modal-dialog', - MODAL_BODY: '.modal-body', - DATA_TOGGLE: '[data-toggle="modal"]', - DATA_DISMISS: '[data-dismiss="modal"]', - FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', - STICKY_CONTENT: '.sticky-top' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Modal = - /*#__PURE__*/ - function () { - function Modal(element, config) { - this._config = this._getConfig(config); - this._element = element; - this._dialog = element.querySelector(Selector$5.DIALOG); - this._backdrop = null; - this._isShown = false; - this._isBodyOverflowing = false; - this._ignoreBackdropClick = false; - this._isTransitioning = false; - this._scrollbarWidth = 0; - } // Getters - - - var _proto = Modal.prototype; - - // Public - _proto.toggle = function toggle(relatedTarget) { - return this._isShown ? this.hide() : this.show(relatedTarget); - }; - - _proto.show = function show(relatedTarget) { - var _this = this; - - if (this._isShown || this._isTransitioning) { - return; - } - - if ($(this._element).hasClass(ClassName$5.FADE)) { - this._isTransitioning = true; - } - - var showEvent = $.Event(Event$5.SHOW, { - relatedTarget: relatedTarget - }); - $(this._element).trigger(showEvent); - - if (this._isShown || showEvent.isDefaultPrevented()) { - return; - } - - this._isShown = true; - - this._checkScrollbar(); - - this._setScrollbar(); - - this._adjustDialog(); - - this._setEscapeEvent(); - - this._setResizeEvent(); - - $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) { - return _this.hide(event); - }); - $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () { - $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) { - if ($(event.target).is(_this._element)) { - _this._ignoreBackdropClick = true; - } - }); - }); - - this._showBackdrop(function () { - return _this._showElement(relatedTarget); - }); - }; - - _proto.hide = function hide(event) { - var _this2 = this; - - if (event) { - event.preventDefault(); - } - - if (!this._isShown || this._isTransitioning) { - return; - } - - var hideEvent = $.Event(Event$5.HIDE); - $(this._element).trigger(hideEvent); - - if (!this._isShown || hideEvent.isDefaultPrevented()) { - return; - } - - this._isShown = false; - var transition = $(this._element).hasClass(ClassName$5.FADE); - - if (transition) { - this._isTransitioning = true; - } - - this._setEscapeEvent(); - - this._setResizeEvent(); - - $(document).off(Event$5.FOCUSIN); - $(this._element).removeClass(ClassName$5.SHOW); - $(this._element).off(Event$5.CLICK_DISMISS); - $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS); - - if (transition) { - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element).one(Util.TRANSITION_END, function (event) { - return _this2._hideModal(event); - }).emulateTransitionEnd(transitionDuration); - } else { - this._hideModal(); - } - }; - - _proto.dispose = function dispose() { - [window, this._element, this._dialog].forEach(function (htmlElement) { - return $(htmlElement).off(EVENT_KEY$5); - }); - /** - * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` - * Do not move `document` in `htmlElements` array - * It will remove `Event.CLICK_DATA_API` event that should remain - */ - - $(document).off(Event$5.FOCUSIN); - $.removeData(this._element, DATA_KEY$5); - this._config = null; - this._element = null; - this._dialog = null; - this._backdrop = null; - this._isShown = null; - this._isBodyOverflowing = null; - this._ignoreBackdropClick = null; - this._isTransitioning = null; - this._scrollbarWidth = null; - }; - - _proto.handleUpdate = function handleUpdate() { - this._adjustDialog(); - } // Private - ; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default$3, config); - Util.typeCheckConfig(NAME$5, config, DefaultType$3); - return config; - }; - - _proto._showElement = function _showElement(relatedTarget) { - var _this3 = this; - - var transition = $(this._element).hasClass(ClassName$5.FADE); - - if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { - // Don't move modal's DOM position - document.body.appendChild(this._element); - } - - this._element.style.display = 'block'; - - this._element.removeAttribute('aria-hidden'); - - this._element.setAttribute('aria-modal', true); - - if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { - this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; - } else { - this._element.scrollTop = 0; - } - - if (transition) { - Util.reflow(this._element); - } - - $(this._element).addClass(ClassName$5.SHOW); - - if (this._config.focus) { - this._enforceFocus(); - } - - var shownEvent = $.Event(Event$5.SHOWN, { - relatedTarget: relatedTarget - }); - - var transitionComplete = function transitionComplete() { - if (_this3._config.focus) { - _this3._element.focus(); - } - - _this3._isTransitioning = false; - $(_this3._element).trigger(shownEvent); - }; - - if (transition) { - var transitionDuration = Util.getTransitionDurationFromElement(this._dialog); - $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); - } else { - transitionComplete(); - } - }; - - _proto._enforceFocus = function _enforceFocus() { - var _this4 = this; - - $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop - .on(Event$5.FOCUSIN, function (event) { - if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) { - _this4._element.focus(); - } - }); - }; - - _proto._setEscapeEvent = function _setEscapeEvent() { - var _this5 = this; - - if (this._isShown && this._config.keyboard) { - $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) { - if (event.which === ESCAPE_KEYCODE$1) { - event.preventDefault(); - - _this5.hide(); - } - }); - } else if (!this._isShown) { - $(this._element).off(Event$5.KEYDOWN_DISMISS); - } - }; - - _proto._setResizeEvent = function _setResizeEvent() { - var _this6 = this; - - if (this._isShown) { - $(window).on(Event$5.RESIZE, function (event) { - return _this6.handleUpdate(event); - }); - } else { - $(window).off(Event$5.RESIZE); - } - }; - - _proto._hideModal = function _hideModal() { - var _this7 = this; - - this._element.style.display = 'none'; - - this._element.setAttribute('aria-hidden', true); - - this._element.removeAttribute('aria-modal'); - - this._isTransitioning = false; - - this._showBackdrop(function () { - $(document.body).removeClass(ClassName$5.OPEN); - - _this7._resetAdjustments(); - - _this7._resetScrollbar(); - - $(_this7._element).trigger(Event$5.HIDDEN); - }); - }; - - _proto._removeBackdrop = function _removeBackdrop() { - if (this._backdrop) { - $(this._backdrop).remove(); - this._backdrop = null; - } - }; - - _proto._showBackdrop = function _showBackdrop(callback) { - var _this8 = this; - - var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : ''; - - if (this._isShown && this._config.backdrop) { - this._backdrop = document.createElement('div'); - this._backdrop.className = ClassName$5.BACKDROP; - - if (animate) { - this._backdrop.classList.add(animate); - } - - $(this._backdrop).appendTo(document.body); - $(this._element).on(Event$5.CLICK_DISMISS, function (event) { - if (_this8._ignoreBackdropClick) { - _this8._ignoreBackdropClick = false; - return; - } - - if (event.target !== event.currentTarget) { - return; - } - - if (_this8._config.backdrop === 'static') { - _this8._element.focus(); - } else { - _this8.hide(); - } - }); - - if (animate) { - Util.reflow(this._backdrop); - } - - $(this._backdrop).addClass(ClassName$5.SHOW); - - if (!callback) { - return; - } - - if (!animate) { - callback(); - return; - } - - var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); - $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); - } else if (!this._isShown && this._backdrop) { - $(this._backdrop).removeClass(ClassName$5.SHOW); - - var callbackRemove = function callbackRemove() { - _this8._removeBackdrop(); - - if (callback) { - callback(); - } - }; - - if ($(this._element).hasClass(ClassName$5.FADE)) { - var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); - - $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); - } else { - callbackRemove(); - } - } else if (callback) { - callback(); - } - } // ---------------------------------------------------------------------- - // the following methods are used to handle overflowing modals - // todo (fat): these should probably be refactored out of modal.js - // ---------------------------------------------------------------------- - ; - - _proto._adjustDialog = function _adjustDialog() { - var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; - - if (!this._isBodyOverflowing && isModalOverflowing) { - this._element.style.paddingLeft = this._scrollbarWidth + "px"; - } - - if (this._isBodyOverflowing && !isModalOverflowing) { - this._element.style.paddingRight = this._scrollbarWidth + "px"; - } - }; - - _proto._resetAdjustments = function _resetAdjustments() { - this._element.style.paddingLeft = ''; - this._element.style.paddingRight = ''; - }; - - _proto._checkScrollbar = function _checkScrollbar() { - var rect = document.body.getBoundingClientRect(); - this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; - this._scrollbarWidth = this._getScrollbarWidth(); - }; - - _proto._setScrollbar = function _setScrollbar() { - var _this9 = this; - - if (this._isBodyOverflowing) { - // Note: DOMNode.style.paddingRight returns the actual value or '' if not set - // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set - var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); - var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding - - $(fixedContent).each(function (index, element) { - var actualPadding = element.style.paddingRight; - var calculatedPadding = $(element).css('padding-right'); - $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); - }); // Adjust sticky content margin - - $(stickyContent).each(function (index, element) { - var actualMargin = element.style.marginRight; - var calculatedMargin = $(element).css('margin-right'); - $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); - }); // Adjust body padding - - var actualPadding = document.body.style.paddingRight; - var calculatedPadding = $(document.body).css('padding-right'); - $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); - } - - $(document.body).addClass(ClassName$5.OPEN); - }; - - _proto._resetScrollbar = function _resetScrollbar() { - // Restore fixed content padding - var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); - $(fixedContent).each(function (index, element) { - var padding = $(element).data('padding-right'); - $(element).removeData('padding-right'); - element.style.paddingRight = padding ? padding : ''; - }); // Restore sticky content - - var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT)); - $(elements).each(function (index, element) { - var margin = $(element).data('margin-right'); - - if (typeof margin !== 'undefined') { - $(element).css('margin-right', margin).removeData('margin-right'); - } - }); // Restore body padding - - var padding = $(document.body).data('padding-right'); - $(document.body).removeData('padding-right'); - document.body.style.paddingRight = padding ? padding : ''; - }; - - _proto._getScrollbarWidth = function _getScrollbarWidth() { - // thx d.walsh - var scrollDiv = document.createElement('div'); - scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER; - document.body.appendChild(scrollDiv); - var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; - document.body.removeChild(scrollDiv); - return scrollbarWidth; - } // Static - ; - - Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { - return this.each(function () { - var data = $(this).data(DATA_KEY$5); - - var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {}); - - if (!data) { - data = new Modal(this, _config); - $(this).data(DATA_KEY$5, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](relatedTarget); - } else if (_config.show) { - data.show(relatedTarget); - } - }); - }; - - _createClass(Modal, null, [{ - key: "VERSION", - get: function get() { - return VERSION$5; - } - }, { - key: "Default", - get: function get() { - return Default$3; - } - }]); - - return Modal; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - - - $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) { - var _this10 = this; - - var target; - var selector = Util.getSelectorFromElement(this); - - if (selector) { - target = document.querySelector(selector); - } - - var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data()); - - if (this.tagName === 'A' || this.tagName === 'AREA') { - event.preventDefault(); - } - - var $target = $(target).one(Event$5.SHOW, function (showEvent) { - if (showEvent.isDefaultPrevented()) { - // Only register focus restorer if modal will actually get shown - return; - } - - $target.one(Event$5.HIDDEN, function () { - if ($(_this10).is(':visible')) { - _this10.focus(); - } - }); - }); - - Modal._jQueryInterface.call($(target), config, this); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.fn[NAME$5] = Modal._jQueryInterface; - $.fn[NAME$5].Constructor = Modal; - - $.fn[NAME$5].noConflict = function () { - $.fn[NAME$5] = JQUERY_NO_CONFLICT$5; - return Modal._jQueryInterface; - }; - - /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.3.1): tools/sanitizer.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- - */ - var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']; - var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; - var DefaultWhitelist = { - // Global attributes allowed on any supplied element below. - '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], - a: ['target', 'href', 'title', 'rel'], - area: [], - b: [], - br: [], - col: [], - code: [], - div: [], - em: [], - hr: [], - h1: [], - h2: [], - h3: [], - h4: [], - h5: [], - h6: [], - i: [], - img: ['src', 'alt', 'title', 'width', 'height'], - li: [], - ol: [], - p: [], - pre: [], - s: [], - small: [], - span: [], - sub: [], - sup: [], - strong: [], - u: [], - ul: [] - /** - * A pattern that recognizes a commonly useful subset of URLs that are safe. - * - * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts - */ - - }; - var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi; - /** - * A pattern that matches safe data URLs. Only matches image, video and audio types. - * - * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts - */ - - var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i; - - function allowedAttribute(attr, allowedAttributeList) { - var attrName = attr.nodeName.toLowerCase(); - - if (allowedAttributeList.indexOf(attrName) !== -1) { - if (uriAttrs.indexOf(attrName) !== -1) { - return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); - } - - return true; - } - - var regExp = allowedAttributeList.filter(function (attrRegex) { - return attrRegex instanceof RegExp; - }); // Check if a regular expression validates the attribute. - - for (var i = 0, l = regExp.length; i < l; i++) { - if (attrName.match(regExp[i])) { - return true; - } - } - - return false; - } - - function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { - if (unsafeHtml.length === 0) { - return unsafeHtml; - } - - if (sanitizeFn && typeof sanitizeFn === 'function') { - return sanitizeFn(unsafeHtml); - } - - var domParser = new window.DOMParser(); - var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); - var whitelistKeys = Object.keys(whiteList); - var elements = [].slice.call(createdDocument.body.querySelectorAll('*')); - - var _loop = function _loop(i, len) { - var el = elements[i]; - var elName = el.nodeName.toLowerCase(); - - if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { - el.parentNode.removeChild(el); - return "continue"; - } - - var attributeList = [].slice.call(el.attributes); - var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); - attributeList.forEach(function (attr) { - if (!allowedAttribute(attr, whitelistedAttributes)) { - el.removeAttribute(attr.nodeName); - } - }); - }; - - for (var i = 0, len = elements.length; i < len; i++) { - var _ret = _loop(i, len); - - if (_ret === "continue") continue; - } - - return createdDocument.body.innerHTML; - } - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$6 = 'tooltip'; - var VERSION$6 = '4.3.1'; - var DATA_KEY$6 = 'bs.tooltip'; - var EVENT_KEY$6 = "." + DATA_KEY$6; - var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; - var CLASS_PREFIX = 'bs-tooltip'; - var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); - var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; - var DefaultType$4 = { - animation: 'boolean', - template: 'string', - title: '(string|element|function)', - trigger: 'string', - delay: '(number|object)', - html: 'boolean', - selector: '(string|boolean)', - placement: '(string|function)', - offset: '(number|string|function)', - container: '(string|element|boolean)', - fallbackPlacement: '(string|array)', - boundary: '(string|element)', - sanitize: 'boolean', - sanitizeFn: '(null|function)', - whiteList: 'object' - }; - var AttachmentMap$1 = { - AUTO: 'auto', - TOP: 'top', - RIGHT: 'right', - BOTTOM: 'bottom', - LEFT: 'left' - }; - var Default$4 = { - animation: true, - template: '' + '' + '', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - selector: false, - placement: 'top', - offset: 0, - container: false, - fallbackPlacement: 'flip', - boundary: 'scrollParent', - sanitize: true, - sanitizeFn: null, - whiteList: DefaultWhitelist - }; - var HoverState = { - SHOW: 'show', - OUT: 'out' - }; - var Event$6 = { - HIDE: "hide" + EVENT_KEY$6, - HIDDEN: "hidden" + EVENT_KEY$6, - SHOW: "show" + EVENT_KEY$6, - SHOWN: "shown" + EVENT_KEY$6, - INSERTED: "inserted" + EVENT_KEY$6, - CLICK: "click" + EVENT_KEY$6, - FOCUSIN: "focusin" + EVENT_KEY$6, - FOCUSOUT: "focusout" + EVENT_KEY$6, - MOUSEENTER: "mouseenter" + EVENT_KEY$6, - MOUSELEAVE: "mouseleave" + EVENT_KEY$6 - }; - var ClassName$6 = { - FADE: 'fade', - SHOW: 'show' - }; - var Selector$6 = { - TOOLTIP: '.tooltip', - TOOLTIP_INNER: '.tooltip-inner', - ARROW: '.arrow' - }; - var Trigger = { - HOVER: 'hover', - FOCUS: 'focus', - CLICK: 'click', - MANUAL: 'manual' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Tooltip = - /*#__PURE__*/ - function () { - function Tooltip(element, config) { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)'); - } // private - - - this._isEnabled = true; - this._timeout = 0; - this._hoverState = ''; - this._activeTrigger = {}; - this._popper = null; // Protected - - this.element = element; - this.config = this._getConfig(config); - this.tip = null; - - this._setListeners(); - } // Getters - - - var _proto = Tooltip.prototype; - - // Public - _proto.enable = function enable() { - this._isEnabled = true; - }; - - _proto.disable = function disable() { - this._isEnabled = false; - }; - - _proto.toggleEnabled = function toggleEnabled() { - this._isEnabled = !this._isEnabled; - }; - - _proto.toggle = function toggle(event) { - if (!this._isEnabled) { - return; - } - - if (event) { - var dataKey = this.constructor.DATA_KEY; - var context = $(event.currentTarget).data(dataKey); - - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); - } - - context._activeTrigger.click = !context._activeTrigger.click; - - if (context._isWithActiveTrigger()) { - context._enter(null, context); - } else { - context._leave(null, context); - } - } else { - if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) { - this._leave(null, this); - - return; - } - - this._enter(null, this); - } - }; - - _proto.dispose = function dispose() { - clearTimeout(this._timeout); - $.removeData(this.element, this.constructor.DATA_KEY); - $(this.element).off(this.constructor.EVENT_KEY); - $(this.element).closest('.modal').off('hide.bs.modal'); - - if (this.tip) { - $(this.tip).remove(); - } - - this._isEnabled = null; - this._timeout = null; - this._hoverState = null; - this._activeTrigger = null; - - if (this._popper !== null) { - this._popper.destroy(); - } - - this._popper = null; - this.element = null; - this.config = null; - this.tip = null; - }; - - _proto.show = function show() { - var _this = this; - - if ($(this.element).css('display') === 'none') { - throw new Error('Please use show on visible elements'); - } - - var showEvent = $.Event(this.constructor.Event.SHOW); - - if (this.isWithContent() && this._isEnabled) { - $(this.element).trigger(showEvent); - var shadowRoot = Util.findShadowRoot(this.element); - var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); - - if (showEvent.isDefaultPrevented() || !isInTheDom) { - return; - } - - var tip = this.getTipElement(); - var tipId = Util.getUID(this.constructor.NAME); - tip.setAttribute('id', tipId); - this.element.setAttribute('aria-describedby', tipId); - this.setContent(); - - if (this.config.animation) { - $(tip).addClass(ClassName$6.FADE); - } - - var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; - - var attachment = this._getAttachment(placement); - - this.addAttachmentClass(attachment); - - var container = this._getContainer(); - - $(tip).data(this.constructor.DATA_KEY, this); - - if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { - $(tip).appendTo(container); - } - - $(this.element).trigger(this.constructor.Event.INSERTED); - this._popper = new Popper(this.element, tip, { - placement: attachment, - modifiers: { - offset: this._getOffset(), - flip: { - behavior: this.config.fallbackPlacement - }, - arrow: { - element: Selector$6.ARROW - }, - preventOverflow: { - boundariesElement: this.config.boundary - } - }, - onCreate: function onCreate(data) { - if (data.originalPlacement !== data.placement) { - _this._handlePopperPlacementChange(data); - } - }, - onUpdate: function onUpdate(data) { - return _this._handlePopperPlacementChange(data); - } - }); - $(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra - // empty mouseover listeners to the body's immediate children; - // only needed because of broken event delegation on iOS - // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html - - if ('ontouchstart' in document.documentElement) { - $(document.body).children().on('mouseover', null, $.noop); - } - - var complete = function complete() { - if (_this.config.animation) { - _this._fixTransition(); - } - - var prevHoverState = _this._hoverState; - _this._hoverState = null; - $(_this.element).trigger(_this.constructor.Event.SHOWN); - - if (prevHoverState === HoverState.OUT) { - _this._leave(null, _this); - } - }; - - if ($(this.tip).hasClass(ClassName$6.FADE)) { - var transitionDuration = Util.getTransitionDurationFromElement(this.tip); - $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } - } - }; - - _proto.hide = function hide(callback) { - var _this2 = this; - - var tip = this.getTipElement(); - var hideEvent = $.Event(this.constructor.Event.HIDE); - - var complete = function complete() { - if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { - tip.parentNode.removeChild(tip); - } - - _this2._cleanTipClass(); - - _this2.element.removeAttribute('aria-describedby'); - - $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); - - if (_this2._popper !== null) { - _this2._popper.destroy(); - } - - if (callback) { - callback(); - } - }; - - $(this.element).trigger(hideEvent); - - if (hideEvent.isDefaultPrevented()) { - return; - } - - $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra - // empty mouseover listeners we added for iOS support - - if ('ontouchstart' in document.documentElement) { - $(document.body).children().off('mouseover', null, $.noop); - } - - this._activeTrigger[Trigger.CLICK] = false; - this._activeTrigger[Trigger.FOCUS] = false; - this._activeTrigger[Trigger.HOVER] = false; - - if ($(this.tip).hasClass(ClassName$6.FADE)) { - var transitionDuration = Util.getTransitionDurationFromElement(tip); - $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } - - this._hoverState = ''; - }; - - _proto.update = function update() { - if (this._popper !== null) { - this._popper.scheduleUpdate(); - } - } // Protected - ; - - _proto.isWithContent = function isWithContent() { - return Boolean(this.getTitle()); - }; - - _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); - }; - - _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $(this.config.template)[0]; - return this.tip; - }; - - _proto.setContent = function setContent() { - var tip = this.getTipElement(); - this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle()); - $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW); - }; - - _proto.setElementContent = function setElementContent($element, content) { - if (typeof content === 'object' && (content.nodeType || content.jquery)) { - // Content is a DOM node or a jQuery - if (this.config.html) { - if (!$(content).parent().is($element)) { - $element.empty().append(content); - } - } else { - $element.text($(content).text()); - } - - return; - } - - if (this.config.html) { - if (this.config.sanitize) { - content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); - } - - $element.html(content); - } else { - $element.text(content); - } - }; - - _proto.getTitle = function getTitle() { - var title = this.element.getAttribute('data-original-title'); - - if (!title) { - title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; - } - - return title; - } // Private - ; - - _proto._getOffset = function _getOffset() { - var _this3 = this; - - var offset = {}; - - if (typeof this.config.offset === 'function') { - offset.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); - return data; - }; - } else { - offset.offset = this.config.offset; - } - - return offset; - }; - - _proto._getContainer = function _getContainer() { - if (this.config.container === false) { - return document.body; - } - - if (Util.isElement(this.config.container)) { - return $(this.config.container); - } - - return $(document).find(this.config.container); - }; - - _proto._getAttachment = function _getAttachment(placement) { - return AttachmentMap$1[placement.toUpperCase()]; - }; - - _proto._setListeners = function _setListeners() { - var _this4 = this; - - var triggers = this.config.trigger.split(' '); - triggers.forEach(function (trigger) { - if (trigger === 'click') { - $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { - return _this4.toggle(event); - }); - } else if (trigger !== Trigger.MANUAL) { - var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; - var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; - $(_this4.element).on(eventIn, _this4.config.selector, function (event) { - return _this4._enter(event); - }).on(eventOut, _this4.config.selector, function (event) { - return _this4._leave(event); - }); - } - }); - $(this.element).closest('.modal').on('hide.bs.modal', function () { - if (_this4.element) { - _this4.hide(); - } - }); - - if (this.config.selector) { - this.config = _objectSpread({}, this.config, { - trigger: 'manual', - selector: '' - }); - } else { - this._fixTitle(); - } - }; - - _proto._fixTitle = function _fixTitle() { - var titleType = typeof this.element.getAttribute('data-original-title'); - - if (this.element.getAttribute('title') || titleType !== 'string') { - this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); - this.element.setAttribute('title', ''); - } - }; - - _proto._enter = function _enter(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || $(event.currentTarget).data(dataKey); - - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); - } - - if (event) { - context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; - } - - if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) { - context._hoverState = HoverState.SHOW; - return; - } - - clearTimeout(context._timeout); - context._hoverState = HoverState.SHOW; - - if (!context.config.delay || !context.config.delay.show) { - context.show(); - return; - } - - context._timeout = setTimeout(function () { - if (context._hoverState === HoverState.SHOW) { - context.show(); - } - }, context.config.delay.show); - }; - - _proto._leave = function _leave(event, context) { - var dataKey = this.constructor.DATA_KEY; - context = context || $(event.currentTarget).data(dataKey); - - if (!context) { - context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); - } - - if (event) { - context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; - } - - if (context._isWithActiveTrigger()) { - return; - } - - clearTimeout(context._timeout); - context._hoverState = HoverState.OUT; - - if (!context.config.delay || !context.config.delay.hide) { - context.hide(); - return; - } - - context._timeout = setTimeout(function () { - if (context._hoverState === HoverState.OUT) { - context.hide(); - } - }, context.config.delay.hide); - }; - - _proto._isWithActiveTrigger = function _isWithActiveTrigger() { - for (var trigger in this._activeTrigger) { - if (this._activeTrigger[trigger]) { - return true; - } - } - - return false; - }; - - _proto._getConfig = function _getConfig(config) { - var dataAttributes = $(this.element).data(); - Object.keys(dataAttributes).forEach(function (dataAttr) { - if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { - delete dataAttributes[dataAttr]; - } - }); - config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); - - if (typeof config.delay === 'number') { - config.delay = { - show: config.delay, - hide: config.delay - }; - } - - if (typeof config.title === 'number') { - config.title = config.title.toString(); - } - - if (typeof config.content === 'number') { - config.content = config.content.toString(); - } - - Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType); - - if (config.sanitize) { - config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); - } - - return config; - }; - - _proto._getDelegateConfig = function _getDelegateConfig() { - var config = {}; - - if (this.config) { - for (var key in this.config) { - if (this.constructor.Default[key] !== this.config[key]) { - config[key] = this.config[key]; - } - } - } - - return config; - }; - - _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $(this.getTipElement()); - var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); - - if (tabClass !== null && tabClass.length) { - $tip.removeClass(tabClass.join('')); - } - }; - - _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { - var popperInstance = popperData.instance; - this.tip = popperInstance.popper; - - this._cleanTipClass(); - - this.addAttachmentClass(this._getAttachment(popperData.placement)); - }; - - _proto._fixTransition = function _fixTransition() { - var tip = this.getTipElement(); - var initConfigAnimation = this.config.animation; - - if (tip.getAttribute('x-placement') !== null) { - return; - } - - $(tip).removeClass(ClassName$6.FADE); - this.config.animation = false; - this.hide(); - this.show(); - this.config.animation = initConfigAnimation; - } // Static - ; - - Tooltip._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$6); - - var _config = typeof config === 'object' && config; - - if (!data && /dispose|hide/.test(config)) { - return; - } - - if (!data) { - data = new Tooltip(this, _config); - $(this).data(DATA_KEY$6, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](); - } - }); - }; - - _createClass(Tooltip, null, [{ - key: "VERSION", - get: function get() { - return VERSION$6; - } - }, { - key: "Default", - get: function get() { - return Default$4; - } - }, { - key: "NAME", - get: function get() { - return NAME$6; - } - }, { - key: "DATA_KEY", - get: function get() { - return DATA_KEY$6; - } - }, { - key: "Event", - get: function get() { - return Event$6; - } - }, { - key: "EVENT_KEY", - get: function get() { - return EVENT_KEY$6; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType$4; - } - }]); - - return Tooltip; - }(); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - - $.fn[NAME$6] = Tooltip._jQueryInterface; - $.fn[NAME$6].Constructor = Tooltip; - - $.fn[NAME$6].noConflict = function () { - $.fn[NAME$6] = JQUERY_NO_CONFLICT$6; - return Tooltip._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$7 = 'popover'; - var VERSION$7 = '4.3.1'; - 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 = _objectSpread({}, Tooltip.Default, { - placement: 'right', - trigger: 'click', - content: '', - template: '' + '' + '' + '' - }); - - var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, { - content: '(string|element|function)' - }); - - var ClassName$7 = { - FADE: 'fade', - SHOW: 'show' - }; - var Selector$7 = { - TITLE: '.popover-header', - CONTENT: '.popover-body' - }; - var Event$7 = { - HIDE: "hide" + EVENT_KEY$7, - HIDDEN: "hidden" + EVENT_KEY$7, - SHOW: "show" + EVENT_KEY$7, - SHOWN: "shown" + EVENT_KEY$7, - INSERTED: "inserted" + EVENT_KEY$7, - CLICK: "click" + EVENT_KEY$7, - FOCUSIN: "focusin" + EVENT_KEY$7, - FOCUSOUT: "focusout" + EVENT_KEY$7, - MOUSEENTER: "mouseenter" + EVENT_KEY$7, - MOUSELEAVE: "mouseleave" + EVENT_KEY$7 - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Popover = - /*#__PURE__*/ - function (_Tooltip) { - _inheritsLoose(Popover, _Tooltip); - - function Popover() { - return _Tooltip.apply(this, arguments) || this; - } - - var _proto = Popover.prototype; - - // Overrides - _proto.isWithContent = function isWithContent() { - return this.getTitle() || this._getContent(); - }; - - _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); - }; - - _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $(this.config.template)[0]; - return this.tip; - }; - - _proto.setContent = function setContent() { - var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events - - this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle()); - - var content = this._getContent(); - - if (typeof content === 'function') { - content = content.call(this.element); - } - - this.setElementContent($tip.find(Selector$7.CONTENT), content); - $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW); - } // Private - ; - - _proto._getContent = function _getContent() { - return this.element.getAttribute('data-content') || this.config.content; - }; - - _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $(this.getTipElement()); - var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1); - - if (tabClass !== null && tabClass.length > 0) { - $tip.removeClass(tabClass.join('')); - } - } // Static - ; - - Popover._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$7); - - var _config = typeof config === 'object' ? config : null; - - if (!data && /dispose|hide/.test(config)) { - return; - } - - if (!data) { - data = new Popover(this, _config); - $(this).data(DATA_KEY$7, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](); - } - }); - }; - - _createClass(Popover, null, [{ - key: "VERSION", - // Getters - get: function get() { - return VERSION$7; - } - }, { - key: "Default", - get: function get() { - return Default$5; - } - }, { - key: "NAME", - get: function get() { - return NAME$7; - } - }, { - key: "DATA_KEY", - get: function get() { - return DATA_KEY$7; - } - }, { - key: "Event", - get: function get() { - return Event$7; - } - }, { - key: "EVENT_KEY", - get: function get() { - return EVENT_KEY$7; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType$5; - } - }]); - - return Popover; - }(Tooltip); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - - $.fn[NAME$7] = Popover._jQueryInterface; - $.fn[NAME$7].Constructor = Popover; - - $.fn[NAME$7].noConflict = function () { - $.fn[NAME$7] = JQUERY_NO_CONFLICT$7; - return Popover._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$8 = 'scrollspy'; - var VERSION$8 = '4.3.1'; - var DATA_KEY$8 = 'bs.scrollspy'; - var EVENT_KEY$8 = "." + DATA_KEY$8; - var DATA_API_KEY$6 = '.data-api'; - var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8]; - var Default$6 = { - offset: 10, - method: 'auto', - target: '' - }; - var DefaultType$6 = { - offset: 'number', - method: 'string', - target: '(string|element)' - }; - var Event$8 = { - ACTIVATE: "activate" + EVENT_KEY$8, - SCROLL: "scroll" + EVENT_KEY$8, - LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6 - }; - var ClassName$8 = { - DROPDOWN_ITEM: 'dropdown-item', - DROPDOWN_MENU: 'dropdown-menu', - ACTIVE: 'active' - }; - var Selector$8 = { - DATA_SPY: '[data-spy="scroll"]', - ACTIVE: '.active', - NAV_LIST_GROUP: '.nav, .list-group', - NAV_LINKS: '.nav-link', - NAV_ITEMS: '.nav-item', - LIST_ITEMS: '.list-group-item', - DROPDOWN: '.dropdown', - DROPDOWN_ITEMS: '.dropdown-item', - DROPDOWN_TOGGLE: '.dropdown-toggle' - }; - var OffsetMethod = { - OFFSET: 'offset', - POSITION: 'position' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var ScrollSpy = - /*#__PURE__*/ - function () { - function ScrollSpy(element, config) { - var _this = this; - - this._element = element; - this._scrollElement = element.tagName === 'BODY' ? window : element; - this._config = this._getConfig(config); - this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS); - this._offsets = []; - this._targets = []; - this._activeTarget = null; - this._scrollHeight = 0; - $(this._scrollElement).on(Event$8.SCROLL, function (event) { - return _this._process(event); - }); - this.refresh(); - - this._process(); - } // Getters - - - var _proto = ScrollSpy.prototype; - - // Public - _proto.refresh = function refresh() { - var _this2 = this; - - var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; - var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; - var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; - this._offsets = []; - this._targets = []; - this._scrollHeight = this._getScrollHeight(); - var targets = [].slice.call(document.querySelectorAll(this._selector)); - targets.map(function (element) { - var target; - var targetSelector = Util.getSelectorFromElement(element); - - if (targetSelector) { - target = document.querySelector(targetSelector); - } - - if (target) { - var targetBCR = target.getBoundingClientRect(); - - if (targetBCR.width || targetBCR.height) { - // TODO (fat): remove sketch reliance on jQuery position/offset - return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; - } - } - - return null; - }).filter(function (item) { - return item; - }).sort(function (a, b) { - return a[0] - b[0]; - }).forEach(function (item) { - _this2._offsets.push(item[0]); - - _this2._targets.push(item[1]); - }); - }; - - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY$8); - $(this._scrollElement).off(EVENT_KEY$8); - this._element = null; - this._scrollElement = null; - this._config = null; - this._selector = null; - this._offsets = null; - this._targets = null; - this._activeTarget = null; - this._scrollHeight = null; - } // Private - ; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {}); - - if (typeof config.target !== 'string') { - var id = $(config.target).attr('id'); - - if (!id) { - id = Util.getUID(NAME$8); - $(config.target).attr('id', id); - } - - config.target = "#" + id; - } - - Util.typeCheckConfig(NAME$8, config, DefaultType$6); - return config; - }; - - _proto._getScrollTop = function _getScrollTop() { - return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; - }; - - _proto._getScrollHeight = function _getScrollHeight() { - return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); - }; - - _proto._getOffsetHeight = function _getOffsetHeight() { - return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; - }; - - _proto._process = function _process() { - var scrollTop = this._getScrollTop() + this._config.offset; - - var scrollHeight = this._getScrollHeight(); - - var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); - - if (this._scrollHeight !== scrollHeight) { - this.refresh(); - } - - if (scrollTop >= maxScroll) { - var target = this._targets[this._targets.length - 1]; - - if (this._activeTarget !== target) { - this._activate(target); - } - - return; - } - - if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { - this._activeTarget = null; - - this._clear(); - - return; - } - - var offsetLength = this._offsets.length; - - for (var i = offsetLength; i--;) { - var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); - - if (isActiveTarget) { - this._activate(this._targets[i]); - } - } - }; - - _proto._activate = function _activate(target) { - this._activeTarget = target; - - this._clear(); - - var queries = this._selector.split(',').map(function (selector) { - return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; - }); - - var $link = $([].slice.call(document.querySelectorAll(queries.join(',')))); - - if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) { - $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE); - $link.addClass(ClassName$8.ACTIVE); - } else { - // Set triggered link as active - $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active - // With both and markup a parent is the previous sibling of any nav ancestor - - $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).addClass(ClassName$8.ACTIVE); // Handle special case when .nav-link is inside .nav-item - - $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_ITEMS).children(Selector$8.NAV_LINKS).addClass(ClassName$8.ACTIVE); - } - - $(this._scrollElement).trigger(Event$8.ACTIVATE, { - relatedTarget: target - }); - }; - - _proto._clear = function _clear() { - [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) { - return node.classList.contains(ClassName$8.ACTIVE); - }).forEach(function (node) { - return node.classList.remove(ClassName$8.ACTIVE); - }); - } // Static - ; - - ScrollSpy._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY$8); - - var _config = typeof config === 'object' && config; - - if (!data) { - data = new ScrollSpy(this, _config); - $(this).data(DATA_KEY$8, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](); - } - }); - }; - - _createClass(ScrollSpy, null, [{ - key: "VERSION", - get: function get() { - return VERSION$8; - } - }, { - key: "Default", - get: function get() { - return Default$6; - } - }]); - - return ScrollSpy; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - - - $(window).on(Event$8.LOAD_DATA_API, function () { - var scrollSpys = [].slice.call(document.querySelectorAll(Selector$8.DATA_SPY)); - var scrollSpysLength = scrollSpys.length; - - for (var i = scrollSpysLength; i--;) { - var $spy = $(scrollSpys[i]); - - ScrollSpy._jQueryInterface.call($spy, $spy.data()); - } - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.fn[NAME$8] = ScrollSpy._jQueryInterface; - $.fn[NAME$8].Constructor = ScrollSpy; - - $.fn[NAME$8].noConflict = function () { - $.fn[NAME$8] = JQUERY_NO_CONFLICT$8; - return ScrollSpy._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$9 = 'tab'; - var VERSION$9 = '4.3.1'; - var DATA_KEY$9 = 'bs.tab'; - var EVENT_KEY$9 = "." + DATA_KEY$9; - var DATA_API_KEY$7 = '.data-api'; - var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9]; - var Event$9 = { - HIDE: "hide" + EVENT_KEY$9, - HIDDEN: "hidden" + EVENT_KEY$9, - SHOW: "show" + EVENT_KEY$9, - SHOWN: "shown" + EVENT_KEY$9, - CLICK_DATA_API: "click" + EVENT_KEY$9 + DATA_API_KEY$7 - }; - var ClassName$9 = { - DROPDOWN_MENU: 'dropdown-menu', - ACTIVE: 'active', - DISABLED: 'disabled', - FADE: 'fade', - SHOW: 'show' - }; - var Selector$9 = { - DROPDOWN: '.dropdown', - NAV_LIST_GROUP: '.nav, .list-group', - ACTIVE: '.active', - ACTIVE_UL: '> li > .active', - DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', - DROPDOWN_TOGGLE: '.dropdown-toggle', - DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Tab = - /*#__PURE__*/ - function () { - function Tab(element) { - this._element = element; - } // Getters - - - var _proto = Tab.prototype; - - // Public - _proto.show = function show() { - var _this = this; - - if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) { - return; - } - - var target; - var previous; - var listElement = $(this._element).closest(Selector$9.NAV_LIST_GROUP)[0]; - var selector = Util.getSelectorFromElement(this._element); - - if (listElement) { - var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE; - previous = $.makeArray($(listElement).find(itemSelector)); - previous = previous[previous.length - 1]; - } - - var hideEvent = $.Event(Event$9.HIDE, { - relatedTarget: this._element - }); - var showEvent = $.Event(Event$9.SHOW, { - relatedTarget: previous - }); - - if (previous) { - $(previous).trigger(hideEvent); - } - - $(this._element).trigger(showEvent); - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { - return; - } - - if (selector) { - target = document.querySelector(selector); - } - - this._activate(this._element, listElement); - - var complete = function complete() { - var hiddenEvent = $.Event(Event$9.HIDDEN, { - relatedTarget: _this._element - }); - var shownEvent = $.Event(Event$9.SHOWN, { - relatedTarget: previous - }); - $(previous).trigger(hiddenEvent); - $(_this._element).trigger(shownEvent); - }; - - if (target) { - this._activate(target, target.parentNode, complete); - } else { - complete(); - } - }; - - _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY$9); - this._element = null; - } // Private - ; - - _proto._activate = function _activate(element, container, callback) { - var _this2 = this; - - var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE); - var active = activeElements[0]; - var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE); - - var complete = function complete() { - return _this2._transitionComplete(element, active, callback); - }; - - if (active && isTransitioning) { - var transitionDuration = Util.getTransitionDurationFromElement(active); - $(active).removeClass(ClassName$9.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } - }; - - _proto._transitionComplete = function _transitionComplete(element, active, callback) { - if (active) { - $(active).removeClass(ClassName$9.ACTIVE); - var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0]; - - if (dropdownChild) { - $(dropdownChild).removeClass(ClassName$9.ACTIVE); - } - - if (active.getAttribute('role') === 'tab') { - active.setAttribute('aria-selected', false); - } - } - - $(element).addClass(ClassName$9.ACTIVE); - - if (element.getAttribute('role') === 'tab') { - element.setAttribute('aria-selected', true); - } - - Util.reflow(element); - - if (element.classList.contains(ClassName$9.FADE)) { - element.classList.add(ClassName$9.SHOW); - } - - if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) { - var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0]; - - if (dropdownElement) { - var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE)); - $(dropdownToggleList).addClass(ClassName$9.ACTIVE); - } - - element.setAttribute('aria-expanded', true); - } - - if (callback) { - callback(); - } - } // Static - ; - - Tab._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var $this = $(this); - var data = $this.data(DATA_KEY$9); - - if (!data) { - data = new Tab(this); - $this.data(DATA_KEY$9, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](); - } - }); - }; - - _createClass(Tab, null, [{ - key: "VERSION", - get: function get() { - return VERSION$9; - } - }]); - - return Tab; - }(); - /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ - */ - - - $(document).on(Event$9.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) { - event.preventDefault(); - - Tab._jQueryInterface.call($(this), 'show'); - }); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - $.fn[NAME$9] = Tab._jQueryInterface; - $.fn[NAME$9].Constructor = Tab; - - $.fn[NAME$9].noConflict = function () { - $.fn[NAME$9] = JQUERY_NO_CONFLICT$9; - return Tab._jQueryInterface; - }; - - /** - * ------------------------------------------------------------------------ - * Constants - * ------------------------------------------------------------------------ - */ - - var NAME$a = 'toast'; - var VERSION$a = '4.3.1'; - var DATA_KEY$a = 'bs.toast'; - var EVENT_KEY$a = "." + DATA_KEY$a; - var JQUERY_NO_CONFLICT$a = $.fn[NAME$a]; - var Event$a = { - CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a, - HIDE: "hide" + EVENT_KEY$a, - HIDDEN: "hidden" + EVENT_KEY$a, - SHOW: "show" + EVENT_KEY$a, - SHOWN: "shown" + EVENT_KEY$a - }; - var ClassName$a = { - FADE: 'fade', - HIDE: 'hide', - SHOW: 'show', - SHOWING: 'showing' - }; - var DefaultType$7 = { - animation: 'boolean', - autohide: 'boolean', - delay: 'number' - }; - var Default$7 = { - animation: true, - autohide: true, - delay: 500 - }; - var Selector$a = { - DATA_DISMISS: '[data-dismiss="toast"]' - /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ - */ - - }; - - var Toast = - /*#__PURE__*/ - function () { - function Toast(element, config) { - this._element = element; - this._config = this._getConfig(config); - this._timeout = null; - - this._setListeners(); - } // Getters - - - var _proto = Toast.prototype; - - // Public - _proto.show = function show() { - var _this = this; - - $(this._element).trigger(Event$a.SHOW); - - if (this._config.animation) { - this._element.classList.add(ClassName$a.FADE); - } - - var complete = function complete() { - _this._element.classList.remove(ClassName$a.SHOWING); - - _this._element.classList.add(ClassName$a.SHOW); - - $(_this._element).trigger(Event$a.SHOWN); - - if (_this._config.autohide) { - _this.hide(); - } - }; - - this._element.classList.remove(ClassName$a.HIDE); - - this._element.classList.add(ClassName$a.SHOWING); - - if (this._config.animation) { - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } - }; - - _proto.hide = function hide(withoutTimeout) { - var _this2 = this; - - if (!this._element.classList.contains(ClassName$a.SHOW)) { - return; - } - - $(this._element).trigger(Event$a.HIDE); - - if (withoutTimeout) { - this._close(); - } else { - this._timeout = setTimeout(function () { - _this2._close(); - }, this._config.delay); - } - }; - - _proto.dispose = function dispose() { - clearTimeout(this._timeout); - this._timeout = null; - - if (this._element.classList.contains(ClassName$a.SHOW)) { - this._element.classList.remove(ClassName$a.SHOW); - } - - $(this._element).off(Event$a.CLICK_DISMISS); - $.removeData(this._element, DATA_KEY$a); - this._element = null; - this._config = null; - } // Private - ; - - _proto._getConfig = function _getConfig(config) { - config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {}); - Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType); - return config; - }; - - _proto._setListeners = function _setListeners() { - var _this3 = this; - - $(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () { - return _this3.hide(true); - }); - }; - - _proto._close = function _close() { - var _this4 = this; - - var complete = function complete() { - _this4._element.classList.add(ClassName$a.HIDE); - - $(_this4._element).trigger(Event$a.HIDDEN); - }; - - this._element.classList.remove(ClassName$a.SHOW); - - if (this._config.animation) { - var transitionDuration = Util.getTransitionDurationFromElement(this._element); - $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); - } else { - complete(); - } - } // Static - ; - - Toast._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var $element = $(this); - var data = $element.data(DATA_KEY$a); - - var _config = typeof config === 'object' && config; - - if (!data) { - data = new Toast(this, _config); - $element.data(DATA_KEY$a, data); - } - - if (typeof config === 'string') { - if (typeof data[config] === 'undefined') { - throw new TypeError("No method named \"" + config + "\""); - } - - data[config](this); - } - }); - }; - - _createClass(Toast, null, [{ - key: "VERSION", - get: function get() { - return VERSION$a; - } - }, { - key: "DefaultType", - get: function get() { - return DefaultType$7; - } - }, { - key: "Default", - get: function get() { - return Default$7; - } - }]); - - return Toast; - }(); - /** - * ------------------------------------------------------------------------ - * jQuery - * ------------------------------------------------------------------------ - */ - - - $.fn[NAME$a] = Toast._jQueryInterface; - $.fn[NAME$a].Constructor = Toast; - - $.fn[NAME$a].noConflict = function () { - $.fn[NAME$a] = JQUERY_NO_CONFLICT$a; - return Toast._jQueryInterface; - }; - - /** - * -------------------------------------------------------------------------- - * Bootstrap (v4.3.1): index.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- - */ - - (function () { - if (typeof $ === 'undefined') { - throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); - } - - var version = $.fn.jquery.split(' ')[0].split('.'); - var minMajor = 1; - var ltMajor = 2; - var minMinor = 9; - var minPatch = 1; - var maxMajor = 4; - - 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'); - } - })(); - - exports.Util = Util; - exports.Alert = Alert; - exports.Button = Button; - exports.Carousel = Carousel; - exports.Collapse = Collapse; - exports.Dropdown = Dropdown; - exports.Modal = Modal; - exports.Popover = Popover; - exports.Scrollspy = ScrollSpy; - exports.Tab = Tab; - exports.Toast = Toast; - exports.Tooltip = Tooltip; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=bootstrap.js.map diff --git a/Frontend/js/bootstrap.js.map b/Frontend/js/bootstrap.js.map deleted file mode 100644 index 70b358f..0000000 --- a/Frontend/js/bootstrap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bootstrap.js","sources":["../../js/src/util.js","../../js/src/alert.js","../../js/src/button.js","../../js/src/carousel.js","../../js/src/collapse.js","../../js/src/dropdown.js","../../js/src/modal.js","../../js/src/tools/sanitizer.js","../../js/src/tooltip.js","../../js/src/popover.js","../../js/src/scrollspy.js","../../js/src/tab.js","../../js/src/toast.js","../../js/src/index.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n\nconst TRANSITION_END = 'transitionend'\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nfunction toType(obj) {\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\nfunction getSpecialTransitionEndEvent() {\n return {\n bindType: TRANSITION_END,\n delegateType: TRANSITION_END,\n handle(event) {\n if ($(event.target).is(this)) {\n return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params\n }\n return undefined // eslint-disable-line no-undefined\n }\n }\n}\n\nfunction transitionEndEmulator(duration) {\n let called = false\n\n $(this).one(Util.TRANSITION_END, () => {\n called = true\n })\n\n setTimeout(() => {\n if (!called) {\n Util.triggerTransitionEnd(this)\n }\n }, duration)\n\n return this\n}\n\nfunction setTransitionEndSupport() {\n $.fn.emulateTransitionEnd = transitionEndEmulator\n $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst Util = {\n\n TRANSITION_END: 'bsTransitionEnd',\n\n getUID(prefix) {\n do {\n // eslint-disable-next-line no-bitwise\n prefix += ~~(Math.random() * MAX_UID) // \"~~\" acts like a faster Math.floor() here\n } while (document.getElementById(prefix))\n return prefix\n },\n\n getSelectorFromElement(element) {\n let selector = element.getAttribute('data-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''\n }\n\n try {\n return document.querySelector(selector) ? selector : null\n } catch (err) {\n return null\n }\n },\n\n getTransitionDurationFromElement(element) {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let transitionDuration = $(element).css('transition-duration')\n let transitionDelay = $(element).css('transition-delay')\n\n const floatTransitionDuration = parseFloat(transitionDuration)\n const floatTransitionDelay = parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n },\n\n reflow(element) {\n return element.offsetHeight\n },\n\n triggerTransitionEnd(element) {\n $(element).trigger(TRANSITION_END)\n },\n\n // TODO: Remove in v5\n supportsTransitionEnd() {\n return Boolean(TRANSITION_END)\n },\n\n isElement(obj) {\n return (obj[0] || obj).nodeType\n },\n\n typeCheckConfig(componentName, config, configTypes) {\n for (const property in configTypes) {\n if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && Util.isElement(value)\n ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n }\n }\n },\n\n findShadowRoot(element) {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return Util.findShadowRoot(element.parentNode)\n }\n}\n\nsetTransitionEndSupport()\n\nexport default Util\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Selector = {\n DISMISS : '[data-dismiss=\"alert\"]'\n}\n\nconst Event = {\n CLOSE : `close${EVENT_KEY}`,\n CLOSED : `closed${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n ALERT : 'alert',\n FADE : 'fade',\n SHOW : 'show'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n close(element) {\n let rootElement = this._element\n if (element) {\n rootElement = this._getRootElement(element)\n }\n\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent.isDefaultPrevented()) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _getRootElement(element) {\n const selector = Util.getSelectorFromElement(element)\n let parent = false\n\n if (selector) {\n parent = document.querySelector(selector)\n }\n\n if (!parent) {\n parent = $(element).closest(`.${ClassName.ALERT}`)[0]\n }\n\n return parent\n }\n\n _triggerCloseEvent(element) {\n const closeEvent = $.Event(Event.CLOSE)\n\n $(element).trigger(closeEvent)\n return closeEvent\n }\n\n _removeElement(element) {\n $(element).removeClass(ClassName.SHOW)\n\n if (!$(element).hasClass(ClassName.FADE)) {\n this._destroyElement(element)\n return\n }\n\n const transitionDuration = Util.getTransitionDurationFromElement(element)\n\n $(element)\n .one(Util.TRANSITION_END, (event) => this._destroyElement(element, event))\n .emulateTransitionEnd(transitionDuration)\n }\n\n _destroyElement(element) {\n $(element)\n .detach()\n .trigger(Event.CLOSED)\n .remove()\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n $element.data(DATA_KEY, data)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(\n Event.CLICK_DATA_API,\n Selector.DISMISS,\n Alert._handleDismiss(new Alert())\n)\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Alert._jQueryInterface\n$.fn[NAME].Constructor = Alert\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert._jQueryInterface\n}\n\nexport default Alert\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst ClassName = {\n ACTIVE : 'active',\n BUTTON : 'btn',\n FOCUS : 'focus'\n}\n\nconst Selector = {\n DATA_TOGGLE_CARROT : '[data-toggle^=\"button\"]',\n DATA_TOGGLE : '[data-toggle=\"buttons\"]',\n INPUT : 'input:not([type=\"hidden\"])',\n ACTIVE : '.active',\n BUTTON : '.btn'\n}\n\nconst Event = {\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` +\n `blur${EVENT_KEY}${DATA_API_KEY}`\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n toggle() {\n let triggerChangeEvent = true\n let addAriaPressed = true\n const rootElement = $(this._element).closest(\n Selector.DATA_TOGGLE\n )[0]\n\n if (rootElement) {\n const input = this._element.querySelector(Selector.INPUT)\n\n if (input) {\n if (input.type === 'radio') {\n if (input.checked &&\n this._element.classList.contains(ClassName.ACTIVE)) {\n triggerChangeEvent = false\n } else {\n const activeElement = rootElement.querySelector(Selector.ACTIVE)\n\n if (activeElement) {\n $(activeElement).removeClass(ClassName.ACTIVE)\n }\n }\n }\n\n if (triggerChangeEvent) {\n if (input.hasAttribute('disabled') ||\n rootElement.hasAttribute('disabled') ||\n input.classList.contains('disabled') ||\n rootElement.classList.contains('disabled')) {\n return\n }\n input.checked = !this._element.classList.contains(ClassName.ACTIVE)\n $(input).trigger('change')\n }\n\n input.focus()\n addAriaPressed = false\n }\n }\n\n if (addAriaPressed) {\n this._element.setAttribute('aria-pressed',\n !this._element.classList.contains(ClassName.ACTIVE))\n }\n\n if (triggerChangeEvent) {\n $(this._element).toggleClass(ClassName.ACTIVE)\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n event.preventDefault()\n\n let button = event.target\n\n if (!$(button).hasClass(ClassName.BUTTON)) {\n button = $(button).closest(Selector.BUTTON)\n }\n\n Button._jQueryInterface.call($(button), 'toggle')\n })\n .on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n const button = $(event.target).closest(Selector.BUTTON)[0]\n $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))\n })\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Button._jQueryInterface\n$.fn[NAME].Constructor = Button\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Button._jQueryInterface\n}\n\nexport default Button\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key\nconst ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval : 5000,\n keyboard : true,\n slide : false,\n pause : 'hover',\n wrap : true,\n touch : true\n}\n\nconst DefaultType = {\n interval : '(number|boolean)',\n keyboard : 'boolean',\n slide : '(boolean|string)',\n pause : '(string|boolean)',\n wrap : 'boolean',\n touch : 'boolean'\n}\n\nconst Direction = {\n NEXT : 'next',\n PREV : 'prev',\n LEFT : 'left',\n RIGHT : 'right'\n}\n\nconst Event = {\n SLIDE : `slide${EVENT_KEY}`,\n SLID : `slid${EVENT_KEY}`,\n KEYDOWN : `keydown${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`,\n TOUCHSTART : `touchstart${EVENT_KEY}`,\n TOUCHMOVE : `touchmove${EVENT_KEY}`,\n TOUCHEND : `touchend${EVENT_KEY}`,\n POINTERDOWN : `pointerdown${EVENT_KEY}`,\n POINTERUP : `pointerup${EVENT_KEY}`,\n DRAG_START : `dragstart${EVENT_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n CAROUSEL : 'carousel',\n ACTIVE : 'active',\n SLIDE : 'slide',\n RIGHT : 'carousel-item-right',\n LEFT : 'carousel-item-left',\n NEXT : 'carousel-item-next',\n PREV : 'carousel-item-prev',\n ITEM : 'carousel-item',\n POINTER_EVENT : 'pointer-event'\n}\n\nconst Selector = {\n ACTIVE : '.active',\n ACTIVE_ITEM : '.active.carousel-item',\n ITEM : '.carousel-item',\n ITEM_IMG : '.carousel-item img',\n NEXT_PREV : '.carousel-item-next, .carousel-item-prev',\n INDICATORS : '.carousel-indicators',\n DATA_SLIDE : '[data-slide], [data-slide-to]',\n DATA_RIDE : '[data-ride=\"carousel\"]'\n}\n\nconst PointerType = {\n TOUCH : 'touch',\n PEN : 'pen'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel {\n constructor(element, config) {\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._element = element\n this._indicatorsElement = this._element.querySelector(Selector.INDICATORS)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden &&\n ($(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden')) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (this._element.querySelector(Selector.NEXT_PREV)) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM)\n\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(Event.SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const direction = index > activeIndex\n ? Direction.NEXT\n : Direction.PREV\n\n this._slide(direction, this._items[index])\n }\n\n dispose() {\n $(this._element).off(EVENT_KEY)\n $.removeData(this._element, DATA_KEY)\n\n this._items = null\n this._config = null\n this._element = null\n this._interval = null\n this._isPaused = null\n this._isSliding = null\n this._activeElement = null\n this._indicatorsElement = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n // swipe left\n if (direction > 0) {\n this.prev()\n }\n\n // swipe right\n if (direction < 0) {\n this.next()\n }\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element)\n .on(Event.KEYDOWN, (event) => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n $(this._element)\n .on(Event.MOUSEENTER, (event) => this.pause(event))\n .on(Event.MOUSELEAVE, (event) => this.cycle(event))\n }\n\n if (this._config.touch) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n if (!this._touchSupported) {\n return\n }\n\n const start = (event) => {\n if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n this.touchStartX = event.originalEvent.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.originalEvent.touches[0].clientX\n }\n }\n\n const move = (event) => {\n // ensure swiping with one touch and not pinching\n if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {\n this.touchDeltaX = 0\n } else {\n this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX\n }\n }\n\n const end = (event) => {\n if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n this.touchDeltaX = event.originalEvent.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n this.touchTimeout = setTimeout((event) => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n }\n }\n\n $(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START, (e) => e.preventDefault())\n if (this._pointerEvent) {\n $(this._element).on(Event.POINTERDOWN, (event) => start(event))\n $(this._element).on(Event.POINTERUP, (event) => end(event))\n\n this._element.classList.add(ClassName.POINTER_EVENT)\n } else {\n $(this._element).on(Event.TOUCHSTART, (event) => start(event))\n $(this._element).on(Event.TOUCHMOVE, (event) => move(event))\n $(this._element).on(Event.TOUCHEND, (event) => end(event))\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n switch (event.which) {\n case ARROW_LEFT_KEYCODE:\n event.preventDefault()\n this.prev()\n break\n case ARROW_RIGHT_KEYCODE:\n event.preventDefault()\n this.next()\n break\n default:\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode\n ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM))\n : []\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n const isNextDirection = direction === Direction.NEXT\n const isPrevDirection = direction === Direction.PREV\n const activeIndex = this._getItemIndex(activeElement)\n const lastItemIndex = this._items.length - 1\n const isGoingToWrap = isPrevDirection && activeIndex === 0 ||\n isNextDirection && activeIndex === lastItemIndex\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n const delta = direction === Direction.PREV ? -1 : 1\n const itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1\n ? this._items[this._items.length - 1] : this._items[itemIndex]\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM))\n const slideEvent = $.Event(Event.SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n\n $(this._element).trigger(slideEvent)\n\n return slideEvent\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE))\n $(indicators)\n .removeClass(ClassName.ACTIVE)\n\n const nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n $(nextIndicator).addClass(ClassName.ACTIVE)\n }\n }\n }\n\n _slide(direction, element) {\n const activeElement = this._element.querySelector(Selector.ACTIVE_ITEM)\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || activeElement &&\n this._getItemByDirection(direction, activeElement)\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n let directionalClassName\n let orderClassName\n let eventDirectionName\n\n if (direction === Direction.NEXT) {\n directionalClassName = ClassName.LEFT\n orderClassName = ClassName.NEXT\n eventDirectionName = Direction.LEFT\n } else {\n directionalClassName = ClassName.RIGHT\n orderClassName = ClassName.PREV\n eventDirectionName = Direction.RIGHT\n }\n\n if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {\n this._isSliding = false\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.isDefaultPrevented()) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n\n const slidEvent = $.Event(Event.SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n\n if ($(this._element).hasClass(ClassName.SLIDE)) {\n $(nextElement).addClass(orderClassName)\n\n Util.reflow(nextElement)\n\n $(activeElement).addClass(directionalClassName)\n $(nextElement).addClass(directionalClassName)\n\n const nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10)\n if (nextElementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval\n this._config.interval = nextElementInterval\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval\n }\n\n const transitionDuration = Util.getTransitionDurationFromElement(activeElement)\n\n $(activeElement)\n .one(Util.TRANSITION_END, () => {\n $(nextElement)\n .removeClass(`${directionalClassName} ${orderClassName}`)\n .addClass(ClassName.ACTIVE)\n\n $(activeElement).removeClass(`${ClassName.ACTIVE} ${orderClassName} ${directionalClassName}`)\n\n this._isSliding = false\n\n setTimeout(() => $(this._element).trigger(slidEvent), 0)\n })\n .emulateTransitionEnd(transitionDuration)\n } else {\n $(activeElement).removeClass(ClassName.ACTIVE)\n $(nextElement).addClass(ClassName.ACTIVE)\n\n this._isSliding = false\n $(this._element).trigger(slidEvent)\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = {\n ...Default,\n ...$(this).data()\n }\n\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n data[action]()\n } else if (_config.interval && _config.ride) {\n data.pause()\n data.cycle()\n }\n })\n }\n\n static _dataApiClickHandler(event) {\n const selector = Util.getSelectorFromElement(this)\n\n if (!selector) {\n return\n }\n\n const target = $(selector)[0]\n\n if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {\n return\n }\n\n const config = {\n ...$(target).data(),\n ...$(this).data()\n }\n const slideIndex = this.getAttribute('data-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel._jQueryInterface.call($(target), config)\n\n if (slideIndex) {\n $(target).data(DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)\n\n$(window).on(Event.LOAD_DATA_API, () => {\n const carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE))\n for (let i = 0, len = carousels.length; i < len; i++) {\n const $carousel = $(carousels[i])\n Carousel._jQueryInterface.call($carousel, $carousel.data())\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Carousel._jQueryInterface\n$.fn[NAME].Constructor = Carousel\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel._jQueryInterface\n}\n\nexport default Carousel\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'collapse'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Default = {\n toggle : true,\n parent : ''\n}\n\nconst DefaultType = {\n toggle : 'boolean',\n parent : '(string|element)'\n}\n\nconst Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n SHOW : 'show',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n}\n\nconst Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n}\n\nconst Selector = {\n ACTIVES : '.show, .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse {\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = [].slice.call(document.querySelectorAll(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n\n const toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i]\n const selector = Util.getSelectorFromElement(elem)\n const filterElement = [].slice.call(document.querySelectorAll(selector))\n .filter((foundElem) => foundElem === element)\n\n if (selector !== null && filterElement.length > 0) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle() {\n if ($(this._element).hasClass(ClassName.SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES))\n .filter((elem) => {\n if (typeof this._config.parent === 'string') {\n return elem.getAttribute('data-parent') === this._config.parent\n }\n\n return elem.classList.contains(ClassName.COLLAPSE)\n })\n\n if (actives.length === 0) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).not(this._selector).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n const dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n const startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.SHOW)\n\n const triggerArrayLength = this._triggerArray.length\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i]\n const selector = Util.getSelectorFromElement(trigger)\n\n if (selector !== null) {\n const $elem = $([].slice.call(document.querySelectorAll(selector)))\n if (!$elem.hasClass(ClassName.SHOW)) {\n $(trigger).addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = ''\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n const hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent\n\n if (Util.isElement(this._config.parent)) {\n parent = this._config.parent\n\n // It's a jQuery object\n if (typeof this._config.parent.jquery !== 'undefined') {\n parent = this._config.parent[0]\n }\n } else {\n parent = document.querySelector(this._config.parent)\n }\n\n const selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n const children = [].slice.call(parent.querySelectorAll(selector))\n $(children).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n const isOpen = $(element).hasClass(ClassName.SHOW)\n\n if (triggerArray.length) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n\n // Static\n\n static _getTargetFromElement(element) {\n const selector = Util.getSelectorFromElement(element)\n return selector ? document.querySelector(selector) : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $this = $(this)\n let data = $this.data(DATA_KEY)\n const _config = {\n ...Default,\n ...$this.data(),\n ...typeof config === 'object' && config ? config : {}\n }\n\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.currentTarget.tagName === 'A') {\n event.preventDefault()\n }\n\n const $trigger = $(this)\n const selector = Util.getSelectorFromElement(this)\n const selectors = [].slice.call(document.querySelectorAll(selector))\n\n $(selectors).each(function () {\n const $target = $(this)\n const data = $target.data(DATA_KEY)\n const config = data ? 'toggle' : $trigger.data()\n Collapse._jQueryInterface.call($target, config)\n })\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Collapse._jQueryInterface\n$.fn[NAME].Constructor = Collapse\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n}\n\nexport default Collapse\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'dropdown'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\nconst SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key\nconst TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key\nconst ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key\nconst ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key\nconst RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`,\n KEYUP_DATA_API : `keyup${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n DISABLED : 'disabled',\n SHOW : 'show',\n DROPUP : 'dropup',\n DROPRIGHT : 'dropright',\n DROPLEFT : 'dropleft',\n MENURIGHT : 'dropdown-menu-right',\n MENULEFT : 'dropdown-menu-left',\n POSITION_STATIC : 'position-static'\n}\n\nconst Selector = {\n DATA_TOGGLE : '[data-toggle=\"dropdown\"]',\n FORM_CHILD : '.dropdown form',\n MENU : '.dropdown-menu',\n NAVBAR_NAV : '.navbar-nav',\n VISIBLE_ITEMS : '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n}\n\nconst AttachmentMap = {\n TOP : 'top-start',\n TOPEND : 'top-end',\n BOTTOM : 'bottom-start',\n BOTTOMEND : 'bottom-end',\n RIGHT : 'right-start',\n RIGHTEND : 'right-end',\n LEFT : 'left-start',\n LEFTEND : 'left-end'\n}\n\nconst Default = {\n offset : 0,\n flip : true,\n boundary : 'scrollParent',\n reference : 'toggle',\n display : 'dynamic'\n}\n\nconst DefaultType = {\n offset : '(number|string|function)',\n flip : 'boolean',\n boundary : '(string|element)',\n reference : '(string|element)',\n display : 'string'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown {\n constructor(element, config) {\n this._element = element\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n toggle() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {\n return\n }\n\n const parent = Dropdown._getParentFromElement(this._element)\n const isActive = $(this._menu).hasClass(ClassName.SHOW)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n const showEvent = $.Event(Event.SHOW, relatedTarget)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return\n }\n\n // Disable totally Popper.js for Dropdown in Navbar\n if (!this._inNavbar) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper.js (https://popper.js.org/)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = parent\n } else if (Util.isElement(this._config.reference)) {\n referenceElement = this._config.reference\n\n // Check if it's jQuery element\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0]\n }\n }\n\n // If boundary is not `scrollParent`, then set position to `static`\n // to allow the menu to \"escape\" the scroll parent's boundaries\n // https://github.com/twbs/bootstrap/issues/24251\n if (this._config.boundary !== 'scrollParent') {\n $(parent).addClass(ClassName.POSITION_STATIC)\n }\n this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig())\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n $(parent).closest(Selector.NAVBAR_NAV).length === 0) {\n $(document.body).children().on('mouseover', null, $.noop)\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n $(this._menu).toggleClass(ClassName.SHOW)\n $(parent)\n .toggleClass(ClassName.SHOW)\n .trigger($.Event(Event.SHOWN, relatedTarget))\n }\n\n show() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n const showEvent = $.Event(Event.SHOW, relatedTarget)\n const parent = Dropdown._getParentFromElement(this._element)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return\n }\n\n $(this._menu).toggleClass(ClassName.SHOW)\n $(parent)\n .toggleClass(ClassName.SHOW)\n .trigger($.Event(Event.SHOWN, relatedTarget))\n }\n\n hide() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n const hideEvent = $.Event(Event.HIDE, relatedTarget)\n const parent = Dropdown._getParentFromElement(this._element)\n\n $(parent).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(this._menu).toggleClass(ClassName.SHOW)\n $(parent)\n .toggleClass(ClassName.SHOW)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n this._menu = null\n if (this._popper !== null) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Private\n\n _addEventListeners() {\n $(this._element).on(Event.CLICK, (event) => {\n event.preventDefault()\n event.stopPropagation()\n this.toggle()\n })\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...$(this._element).data(),\n ...config\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getMenuElement() {\n if (!this._menu) {\n const parent = Dropdown._getParentFromElement(this._element)\n\n if (parent) {\n this._menu = parent.querySelector(Selector.MENU)\n }\n }\n return this._menu\n }\n\n _getPlacement() {\n const $parentDropdown = $(this._element.parentNode)\n let placement = AttachmentMap.BOTTOM\n\n // Handle dropup\n if ($parentDropdown.hasClass(ClassName.DROPUP)) {\n placement = AttachmentMap.TOP\n if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.TOPEND\n }\n } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {\n placement = AttachmentMap.RIGHT\n } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {\n placement = AttachmentMap.LEFT\n } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.BOTTOMEND\n }\n return placement\n }\n\n _detectNavbar() {\n return $(this._element).closest('.navbar').length > 0\n }\n\n _getOffset() {\n const offset = {}\n\n if (typeof this._config.offset === 'function') {\n offset.fn = (data) => {\n data.offsets = {\n ...data.offsets,\n ...this._config.offset(data.offsets, this._element) || {}\n }\n\n return data\n }\n } else {\n offset.offset = this._config.offset\n }\n\n return offset\n }\n\n _getPopperConfig() {\n const popperConfig = {\n placement: this._getPlacement(),\n modifiers: {\n offset: this._getOffset(),\n flip: {\n enabled: this._config.flip\n },\n preventOverflow: {\n boundariesElement: this._config.boundary\n }\n }\n }\n\n // Disable Popper.js if we have a static display\n if (this._config.display === 'static') {\n popperConfig.modifiers.applyStyle = {\n enabled: false\n }\n }\n\n return popperConfig\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH ||\n event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n return\n }\n\n const toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const parent = Dropdown._getParentFromElement(toggles[i])\n const context = $(toggles[i]).data(DATA_KEY)\n const relatedTarget = {\n relatedTarget: toggles[i]\n }\n\n if (event && event.type === 'click') {\n relatedTarget.clickEvent = event\n }\n\n if (!context) {\n continue\n }\n\n const dropdownMenu = context._menu\n if (!$(parent).hasClass(ClassName.SHOW)) {\n continue\n }\n\n if (event && (event.type === 'click' &&\n /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) &&\n $.contains(parent, event.target)) {\n continue\n }\n\n const hideEvent = $.Event(Event.HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $(document.body).children().off('mouseover', null, $.noop)\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n $(dropdownMenu).removeClass(ClassName.SHOW)\n $(parent)\n .removeClass(ClassName.SHOW)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n const selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = document.querySelector(selector)\n }\n\n return parent || element.parentNode\n }\n\n // eslint-disable-next-line complexity\n static _dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName)\n ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&\n (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||\n $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return\n }\n\n const parent = Dropdown._getParentFromElement(this)\n const isActive = $(parent).hasClass(ClassName.SHOW)\n\n if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n if (event.which === ESCAPE_KEYCODE) {\n const toggle = parent.querySelector(Selector.DATA_TOGGLE)\n $(toggle).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n const items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS))\n\n if (items.length === 0) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up\n index--\n }\n\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler)\n .on(`${Event.CLICK_DATA_API} ${Event.KEYUP_DATA_API}`, Dropdown._clearMenus)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n event.stopPropagation()\n Dropdown._jQueryInterface.call($(this), 'toggle')\n })\n .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {\n e.stopPropagation()\n })\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Dropdown._jQueryInterface\n$.fn[NAME].Constructor = Dropdown\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n}\n\n\nexport default Dropdown\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'modal'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n\nconst Default = {\n backdrop : true,\n keyboard : true,\n focus : true,\n show : true\n}\n\nconst DefaultType = {\n backdrop : '(boolean|string)',\n keyboard : 'boolean',\n focus : 'boolean',\n show : 'boolean'\n}\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n RESIZE : `resize${EVENT_KEY}`,\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,\n MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,\n MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n SCROLLABLE : 'modal-dialog-scrollable',\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure',\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n SHOW : 'show'\n}\n\nconst Selector = {\n DIALOG : '.modal-dialog',\n MODAL_BODY : '.modal-body',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',\n STICKY_CONTENT : '.sticky-top'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Modal {\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = element.querySelector(Selector.DIALOG)\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._isTransitioning = false\n this._scrollbarWidth = 0\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return\n }\n\n if ($(this._element).hasClass(ClassName.FADE)) {\n this._isTransitioning = true\n }\n\n const showEvent = $.Event(Event.SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n this._adjustDialog()\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n (event) => this.hide(event)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {\n $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n if (!this._isShown || this._isTransitioning) {\n return\n }\n\n const hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n const transition = $(this._element).hasClass(ClassName.FADE)\n\n if (transition) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.SHOW)\n\n $(this._element).off(Event.CLICK_DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS)\n\n\n if (transition) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, (event) => this._hideModal(event))\n .emulateTransitionEnd(transitionDuration)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n [window, this._element, this._dialog]\n .forEach((htmlElement) => $(htmlElement).off(EVENT_KEY))\n\n /**\n * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `Event.CLICK_DATA_API` event that should remain\n */\n $(document).off(Event.FOCUSIN)\n\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._isTransitioning = null\n this._scrollbarWidth = null\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n const transition = $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n\n if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) {\n this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0\n } else {\n this._element.scrollTop = 0\n }\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const shownEvent = $.Event(Event.SHOWN, {\n relatedTarget\n })\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n this._isTransitioning = false\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._dialog)\n\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // Guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (document !== event.target &&\n this._element !== event.target &&\n $(this._element).has(event.target).length === 0) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n if (event.which === ESCAPE_KEYCODE) {\n event.preventDefault()\n this.hide()\n }\n })\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, (event) => this.handleUpdate(event))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._isTransitioning = false\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n const animate = $(this._element).hasClass(ClassName.FADE)\n ? ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n this._backdrop.classList.add(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(Event.CLICK_DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (animate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.SHOW)\n\n if (!callback) {\n return\n }\n\n if (!animate) {\n callback()\n return\n }\n\n const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(backdropTransitionDuration)\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.SHOW)\n\n const callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if ($(this._element).hasClass(ClassName.FADE)) {\n const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(backdropTransitionDuration)\n } else {\n callbackRemove()\n }\n } else if (callback) {\n callback()\n }\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n const rect = document.body.getBoundingClientRect()\n this._isBodyOverflowing = rect.left + rect.right < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n if (this._isBodyOverflowing) {\n // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT))\n const stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT))\n\n // Adjust fixed content padding\n $(fixedContent).each((index, element) => {\n const actualPadding = element.style.paddingRight\n const calculatedPadding = $(element).css('padding-right')\n $(element)\n .data('padding-right', actualPadding)\n .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n })\n\n // Adjust sticky content margin\n $(stickyContent).each((index, element) => {\n const actualMargin = element.style.marginRight\n const calculatedMargin = $(element).css('margin-right')\n $(element)\n .data('margin-right', actualMargin)\n .css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`)\n })\n\n // Adjust body padding\n const actualPadding = document.body.style.paddingRight\n const calculatedPadding = $(document.body).css('padding-right')\n $(document.body)\n .data('padding-right', actualPadding)\n .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n }\n\n $(document.body).addClass(ClassName.OPEN)\n }\n\n _resetScrollbar() {\n // Restore fixed content padding\n const fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT))\n $(fixedContent).each((index, element) => {\n const padding = $(element).data('padding-right')\n $(element).removeData('padding-right')\n element.style.paddingRight = padding ? padding : ''\n })\n\n // Restore sticky content\n const elements = [].slice.call(document.querySelectorAll(`${Selector.STICKY_CONTENT}`))\n $(elements).each((index, element) => {\n const margin = $(element).data('margin-right')\n if (typeof margin !== 'undefined') {\n $(element).css('margin-right', margin).removeData('margin-right')\n }\n })\n\n // Restore body padding\n const padding = $(document.body).data('padding-right')\n $(document.body).removeData('padding-right')\n document.body.style.paddingRight = padding ? padding : ''\n }\n\n _getScrollbarWidth() { // thx d.walsh\n const scrollDiv = document.createElement('div')\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n // Static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = {\n ...Default,\n ...$(this).data(),\n ...typeof config === 'object' && config ? config : {}\n }\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n let target\n const selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = document.querySelector(selector)\n }\n\n const config = $(target).data(DATA_KEY)\n ? 'toggle' : {\n ...$(target).data(),\n ...$(this).data()\n }\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault()\n }\n\n const $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // Only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Modal._jQueryInterface\n$.fn[NAME].Constructor = Modal\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n}\n\nexport default Modal\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): tools/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = [\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n]\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\nexport const DefaultWhitelist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n}\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i\n\nfunction allowedAttribute(attr, allowedAttributeList) {\n const attrName = attr.nodeName.toLowerCase()\n\n if (allowedAttributeList.indexOf(attrName) !== -1) {\n if (uriAttrs.indexOf(attrName) !== -1) {\n return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n }\n\n return true\n }\n\n const regExp = allowedAttributeList.filter((attrRegex) => attrRegex instanceof RegExp)\n\n // Check if a regular expression validates the attribute.\n for (let i = 0, l = regExp.length; i < l; i++) {\n if (attrName.match(regExp[i])) {\n return true\n }\n }\n\n return false\n}\n\nexport function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n if (unsafeHtml.length === 0) {\n return unsafeHtml\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml)\n }\n\n const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const whitelistKeys = Object.keys(whiteList)\n const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i]\n const elName = el.nodeName.toLowerCase()\n\n if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {\n el.parentNode.removeChild(el)\n\n continue\n }\n\n const attributeList = [].slice.call(el.attributes)\n const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n attributeList.forEach((attr) => {\n if (!allowedAttribute(attr, whitelistedAttributes)) {\n el.removeAttribute(attr.nodeName)\n }\n })\n }\n\n return createdDocument.body.innerHTML\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n DefaultWhitelist,\n sanitizeHtml\n} from './tools/sanitizer'\nimport $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tooltip'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\nconst DefaultType = {\n animation : 'boolean',\n template : 'string',\n title : '(string|element|function)',\n trigger : 'string',\n delay : '(number|object)',\n html : 'boolean',\n selector : '(string|boolean)',\n placement : '(string|function)',\n offset : '(number|string|function)',\n container : '(string|element|boolean)',\n fallbackPlacement : '(string|array)',\n boundary : '(string|element)',\n sanitize : 'boolean',\n sanitizeFn : '(null|function)',\n whiteList : 'object'\n}\n\nconst AttachmentMap = {\n AUTO : 'auto',\n TOP : 'top',\n RIGHT : 'right',\n BOTTOM : 'bottom',\n LEFT : 'left'\n}\n\nconst Default = {\n animation : true,\n template : '' +\n '' +\n '',\n trigger : 'hover focus',\n title : '',\n delay : 0,\n html : false,\n selector : false,\n placement : 'top',\n offset : 0,\n container : false,\n fallbackPlacement : 'flip',\n boundary : 'scrollParent',\n sanitize : true,\n sanitizeFn : null,\n whiteList : DefaultWhitelist\n}\n\nconst HoverState = {\n SHOW : 'show',\n OUT : 'out'\n}\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n}\n\nconst ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n}\n\nconst Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner',\n ARROW : '.arrow'\n}\n\nconst Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n}\n\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip {\n constructor(element, config) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper.js (https://popper.js.org/)')\n }\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const dataKey = this.constructor.DATA_KEY\n let context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n $.removeData(this.element, this.constructor.DATA_KEY)\n\n $(this.element).off(this.constructor.EVENT_KEY)\n $(this.element).closest('.modal').off('hide.bs.modal')\n\n if (this.tip) {\n $(this.tip).remove()\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n if (this._popper !== null) {\n this._popper.destroy()\n }\n\n this._popper = null\n this.element = null\n this.config = null\n this.tip = null\n }\n\n show() {\n if ($(this.element).css('display') === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n const showEvent = $.Event(this.constructor.Event.SHOW)\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n const shadowRoot = Util.findShadowRoot(this.element)\n const isInTheDom = $.contains(\n shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n const placement = typeof this.config.placement === 'function'\n ? this.config.placement.call(this, tip, this.element)\n : this.config.placement\n\n const attachment = this._getAttachment(placement)\n this.addAttachmentClass(attachment)\n\n const container = this._getContainer()\n $(tip).data(this.constructor.DATA_KEY, this)\n\n if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {\n $(tip).appendTo(container)\n }\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._popper = new Popper(this.element, tip, {\n placement: attachment,\n modifiers: {\n offset: this._getOffset(),\n flip: {\n behavior: this.config.fallbackPlacement\n },\n arrow: {\n element: Selector.ARROW\n },\n preventOverflow: {\n boundariesElement: this.config.boundary\n }\n },\n onCreate: (data) => {\n if (data.originalPlacement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n },\n onUpdate: (data) => this._handlePopperPlacementChange(data)\n })\n\n $(tip).addClass(ClassName.SHOW)\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n $(document.body).children().on('mouseover', null, $.noop)\n }\n\n const complete = () => {\n if (this.config.animation) {\n this._fixTransition()\n }\n const prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HoverState.OUT) {\n this._leave(null, this)\n }\n }\n\n if ($(this.tip).hasClass(ClassName.FADE)) {\n const transitionDuration = Util.getTransitionDurationFromElement(this.tip)\n\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n }\n\n hide(callback) {\n const tip = this.getTipElement()\n const hideEvent = $.Event(this.constructor.Event.HIDE)\n const complete = () => {\n if (this._hoverState !== HoverState.SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n if (this._popper !== null) {\n this._popper.destroy()\n }\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(ClassName.SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $(document.body).children().off('mouseover', null, $.noop)\n }\n\n this._activeTrigger[Trigger.CLICK] = false\n this._activeTrigger[Trigger.FOCUS] = false\n this._activeTrigger[Trigger.HOVER] = false\n\n if ($(this.tip).hasClass(ClassName.FADE)) {\n const transitionDuration = Util.getTransitionDurationFromElement(tip)\n\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle())\n $(tip).removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n setElementContent($element, content) {\n if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n // Content is a DOM node or a jQuery\n if (this.config.html) {\n if (!$(content).parent().is($element)) {\n $element.empty().append(content)\n }\n } else {\n $element.text($(content).text())\n }\n\n return\n }\n\n if (this.config.html) {\n if (this.config.sanitize) {\n content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn)\n }\n\n $element.html(content)\n } else {\n $element.text(content)\n }\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function'\n ? this.config.title.call(this.element)\n : this.config.title\n }\n\n return title\n }\n\n // Private\n\n _getOffset() {\n const offset = {}\n\n if (typeof this.config.offset === 'function') {\n offset.fn = (data) => {\n data.offsets = {\n ...data.offsets,\n ...this.config.offset(data.offsets, this.element) || {}\n }\n\n return data\n }\n } else {\n offset.offset = this.config.offset\n }\n\n return offset\n }\n\n _getContainer() {\n if (this.config.container === false) {\n return document.body\n }\n\n if (Util.isElement(this.config.container)) {\n return $(this.config.container)\n }\n\n return $(document).find(this.config.container)\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n (event) => this.toggle(event)\n )\n } else if (trigger !== Trigger.MANUAL) {\n const eventIn = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSEENTER\n : this.constructor.Event.FOCUSIN\n const eventOut = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSELEAVE\n : this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n (event) => this._enter(event)\n )\n .on(\n eventOut,\n this.config.selector,\n (event) => this._leave(event)\n )\n }\n })\n\n $(this.element).closest('.modal').on(\n 'hide.bs.modal',\n () => {\n if (this.element) {\n this.hide()\n }\n }\n )\n\n if (this.config.selector) {\n this.config = {\n ...this.config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const titleType = typeof this.element.getAttribute('data-original-title')\n\n if (this.element.getAttribute('title') || titleType !== 'string') {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {\n context._hoverState = HoverState.SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.SHOW\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.SHOW) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n const dataAttributes = $(this.element).data()\n\n Object.keys(dataAttributes)\n .forEach((dataAttr) => {\n if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {\n delete dataAttributes[dataAttr]\n }\n })\n\n config = {\n ...this.constructor.Default,\n ...dataAttributes,\n ...typeof config === 'object' && config ? config : {}\n }\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this.config) {\n for (const key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n const popperInstance = popperData.instance\n this.tip = popperInstance.popper\n this._cleanTipClass()\n this.addAttachmentClass(this._getAttachment(popperData.placement))\n }\n\n _fixTransition() {\n const tip = this.getTipElement()\n const initConfigAnimation = this.config.animation\n\n if (tip.getAttribute('x-placement') !== null) {\n return\n }\n\n $(tip).removeClass(ClassName.FADE)\n this.config.animation = false\n this.hide()\n this.show()\n this.config.animation = initConfigAnimation\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Tooltip._jQueryInterface\n$.fn[NAME].Constructor = Tooltip\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n}\n\nexport default Tooltip\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'popover'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n ...Tooltip.Default,\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '' +\n '' +\n '' +\n ''\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content : '(string|element|function)'\n}\n\nconst ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n}\n\nconst Selector = {\n TITLE : '.popover-header',\n CONTENT : '.popover-body'\n}\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const $tip = $(this.getTipElement())\n\n // We use append for html objects to maintain js events\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this.element)\n }\n this.setElementContent($tip.find(Selector.CONTENT), content)\n\n $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n // Private\n\n _getContent() {\n return this.element.getAttribute('data-content') ||\n this.config.content\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Popover._jQueryInterface\n$.fn[NAME].Constructor = Popover\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n}\n\nexport default Popover\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'scrollspy'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Default = {\n offset : 10,\n method : 'auto',\n target : ''\n}\n\nconst DefaultType = {\n offset : 'number',\n method : 'string',\n target : '(string|element)'\n}\n\nconst Event = {\n ACTIVATE : `activate${EVENT_KEY}`,\n SCROLL : `scroll${EVENT_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n DROPDOWN_ITEM : 'dropdown-item',\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active'\n}\n\nconst Selector = {\n DATA_SPY : '[data-spy=\"scroll\"]',\n ACTIVE : '.active',\n NAV_LIST_GROUP : '.nav, .list-group',\n NAV_LINKS : '.nav-link',\n NAV_ITEMS : '.nav-item',\n LIST_ITEMS : '.list-group-item',\n DROPDOWN : '.dropdown',\n DROPDOWN_ITEMS : '.dropdown-item',\n DROPDOWN_TOGGLE : '.dropdown-toggle'\n}\n\nconst OffsetMethod = {\n OFFSET : 'offset',\n POSITION : 'position'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass ScrollSpy {\n constructor(element, config) {\n this._element = element\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${Selector.NAV_LINKS},` +\n `${this._config.target} ${Selector.LIST_ITEMS},` +\n `${this._config.target} ${Selector.DROPDOWN_ITEMS}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n $(this._scrollElement).on(Event.SCROLL, (event) => this._process(event))\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window\n ? OffsetMethod.OFFSET : OffsetMethod.POSITION\n\n const offsetMethod = this._config.method === 'auto'\n ? autoMethod : this._config.method\n\n const offsetBase = offsetMethod === OffsetMethod.POSITION\n ? this._getScrollTop() : 0\n\n this._offsets = []\n this._targets = []\n\n this._scrollHeight = this._getScrollHeight()\n\n const targets = [].slice.call(document.querySelectorAll(this._selector))\n\n targets\n .map((element) => {\n let target\n const targetSelector = Util.getSelectorFromElement(element)\n\n if (targetSelector) {\n target = document.querySelector(targetSelector)\n }\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n // TODO (fat): remove sketch reliance on jQuery position/offset\n return [\n $(target)[offsetMethod]().top + offsetBase,\n targetSelector\n ]\n }\n }\n return null\n })\n .filter((item) => item)\n .sort((a, b) => a[0] - b[0])\n .forEach((item) => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._scrollElement).off(EVENT_KEY)\n\n this._element = null\n this._scrollElement = null\n this._config = null\n this._selector = null\n this._offsets = null\n this._targets = null\n this._activeTarget = null\n this._scrollHeight = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...typeof config === 'object' && config ? config : {}\n }\n\n if (typeof config.target !== 'string') {\n let id = $(config.target).attr('id')\n if (!id) {\n id = Util.getUID(NAME)\n $(config.target).attr('id', id)\n }\n config.target = `#${id}`\n }\n\n Util.typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window\n ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window\n ? window.innerHeight : this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset +\n scrollHeight -\n this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n const offsetLength = this._offsets.length\n for (let i = offsetLength; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' ||\n scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n const queries = this._selector\n .split(',')\n .map((selector) => `${selector}[data-target=\"${target}\"],${selector}[href=\"${target}\"]`)\n\n const $link = $([].slice.call(document.querySelectorAll(queries.join(','))))\n\n if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {\n $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)\n $link.addClass(ClassName.ACTIVE)\n } else {\n // Set triggered link as active\n $link.addClass(ClassName.ACTIVE)\n // Set triggered links parents as active\n // With both and markup a parent is the previous sibling of any nav ancestor\n $link.parents(Selector.NAV_LIST_GROUP).prev(`${Selector.NAV_LINKS}, ${Selector.LIST_ITEMS}`).addClass(ClassName.ACTIVE)\n // Handle special case when .nav-link is inside .nav-item\n $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE)\n }\n\n $(this._scrollElement).trigger(Event.ACTIVATE, {\n relatedTarget: target\n })\n }\n\n _clear() {\n [].slice.call(document.querySelectorAll(this._selector))\n .filter((node) => node.classList.contains(ClassName.ACTIVE))\n .forEach((node) => node.classList.remove(ClassName.ACTIVE))\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new ScrollSpy(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(window).on(Event.LOAD_DATA_API, () => {\n const scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY))\n const scrollSpysLength = scrollSpys.length\n\n for (let i = scrollSpysLength; i--;) {\n const $spy = $(scrollSpys[i])\n ScrollSpy._jQueryInterface.call($spy, $spy.data())\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = ScrollSpy._jQueryInterface\n$.fn[NAME].Constructor = ScrollSpy\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return ScrollSpy._jQueryInterface\n}\n\nexport default ScrollSpy\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tab'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n DISABLED : 'disabled',\n FADE : 'fade',\n SHOW : 'show'\n}\n\nconst Selector = {\n DROPDOWN : '.dropdown',\n NAV_LIST_GROUP : '.nav, .list-group',\n ACTIVE : '.active',\n ACTIVE_UL : '> li > .active',\n DATA_TOGGLE : '[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]',\n DROPDOWN_TOGGLE : '.dropdown-toggle',\n DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tab {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n show() {\n if (this._element.parentNode &&\n this._element.parentNode.nodeType === Node.ELEMENT_NODE &&\n $(this._element).hasClass(ClassName.ACTIVE) ||\n $(this._element).hasClass(ClassName.DISABLED)) {\n return\n }\n\n let target\n let previous\n const listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0]\n const selector = Util.getSelectorFromElement(this._element)\n\n if (listElement) {\n const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE\n previous = $.makeArray($(listElement).find(itemSelector))\n previous = previous[previous.length - 1]\n }\n\n const hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n const showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n hideEvent.isDefaultPrevented()) {\n return\n }\n\n if (selector) {\n target = document.querySelector(selector)\n }\n\n this._activate(\n this._element,\n listElement\n )\n\n const complete = () => {\n const hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n const shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _activate(element, container, callback) {\n const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL')\n ? $(container).find(Selector.ACTIVE_UL)\n : $(container).children(Selector.ACTIVE)\n\n const active = activeElements[0]\n const isTransitioning = callback && (active && $(active).hasClass(ClassName.FADE))\n const complete = () => this._transitionComplete(\n element,\n active,\n callback\n )\n\n if (active && isTransitioning) {\n const transitionDuration = Util.getTransitionDurationFromElement(active)\n\n $(active)\n .removeClass(ClassName.SHOW)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n _transitionComplete(element, active, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n const dropdownChild = $(active.parentNode).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false)\n }\n }\n\n $(element).addClass(ClassName.ACTIVE)\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true)\n }\n\n Util.reflow(element)\n\n if (element.classList.contains(ClassName.FADE)) {\n element.classList.add(ClassName.SHOW)\n }\n\n if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {\n const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]\n\n if (dropdownElement) {\n const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE))\n\n $(dropdownToggleList).addClass(ClassName.ACTIVE)\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Tab._jQueryInterface\n$.fn[NAME].Constructor = Tab\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n}\n\nexport default Tab\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'toast'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Event = {\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`\n}\n\nconst ClassName = {\n FADE : 'fade',\n HIDE : 'hide',\n SHOW : 'show',\n SHOWING : 'showing'\n}\n\nconst DefaultType = {\n animation : 'boolean',\n autohide : 'boolean',\n delay : 'number'\n}\n\nconst Default = {\n animation : true,\n autohide : true,\n delay : 500\n}\n\nconst Selector = {\n DATA_DISMISS : '[data-dismiss=\"toast\"]'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Toast {\n constructor(element, config) {\n this._element = element\n this._config = this._getConfig(config)\n this._timeout = null\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n show() {\n $(this._element).trigger(Event.SHOW)\n\n if (this._config.animation) {\n this._element.classList.add(ClassName.FADE)\n }\n\n const complete = () => {\n this._element.classList.remove(ClassName.SHOWING)\n this._element.classList.add(ClassName.SHOW)\n\n $(this._element).trigger(Event.SHOWN)\n\n if (this._config.autohide) {\n this.hide()\n }\n }\n\n this._element.classList.remove(ClassName.HIDE)\n this._element.classList.add(ClassName.SHOWING)\n if (this._config.animation) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n hide(withoutTimeout) {\n if (!this._element.classList.contains(ClassName.SHOW)) {\n return\n }\n\n $(this._element).trigger(Event.HIDE)\n\n if (withoutTimeout) {\n this._close()\n } else {\n this._timeout = setTimeout(() => {\n this._close()\n }, this._config.delay)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n this._timeout = null\n\n if (this._element.classList.contains(ClassName.SHOW)) {\n this._element.classList.remove(ClassName.SHOW)\n }\n\n $(this._element).off(Event.CLICK_DISMISS)\n\n $.removeData(this._element, DATA_KEY)\n this._element = null\n this._config = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...$(this._element).data(),\n ...typeof config === 'object' && config ? config : {}\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _setListeners() {\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n () => this.hide(true)\n )\n }\n\n _close() {\n const complete = () => {\n this._element.classList.add(ClassName.HIDE)\n $(this._element).trigger(Event.HIDDEN)\n }\n\n this._element.classList.remove(ClassName.SHOW)\n if (this._config.animation) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new Toast(this, _config)\n $element.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Toast._jQueryInterface\n$.fn[NAME].Constructor = Toast\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Toast._jQueryInterface\n}\n\nexport default Toast\n","import $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './dropdown'\nimport Modal from './modal'\nimport Popover from './popover'\nimport Scrollspy from './scrollspy'\nimport Tab from './tab'\nimport Toast from './toast'\nimport Tooltip from './tooltip'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n(() => {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n})()\n\nexport {\n Util,\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Popover,\n Scrollspy,\n Tab,\n Toast,\n Tooltip\n}\n"],"names":["TRANSITION_END","MAX_UID","MILLISECONDS_MULTIPLIER","toType","obj","toString","call","match","toLowerCase","getSpecialTransitionEndEvent","bindType","delegateType","handle","event","$","target","is","handleObj","handler","apply","arguments","undefined","transitionEndEmulator","duration","called","one","Util","setTimeout","triggerTransitionEnd","setTransitionEndSupport","fn","emulateTransitionEnd","special","getUID","prefix","Math","random","document","getElementById","getSelectorFromElement","element","selector","getAttribute","hrefAttr","trim","querySelector","err","getTransitionDurationFromElement","transitionDuration","css","transitionDelay","floatTransitionDuration","parseFloat","floatTransitionDelay","split","reflow","offsetHeight","trigger","supportsTransitionEnd","Boolean","isElement","nodeType","typeCheckConfig","componentName","config","configTypes","property","Object","prototype","hasOwnProperty","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","findShadowRoot","documentElement","attachShadow","getRootNode","root","ShadowRoot","parentNode","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","Selector","DISMISS","Event","CLOSE","CLOSED","CLICK_DATA_API","ClassName","ALERT","FADE","SHOW","Alert","_element","close","rootElement","_getRootElement","customEvent","_triggerCloseEvent","isDefaultPrevented","_removeElement","dispose","removeData","parent","closest","closeEvent","removeClass","hasClass","_destroyElement","detach","remove","_jQueryInterface","each","$element","data","_handleDismiss","alertInstance","preventDefault","on","Constructor","noConflict","ACTIVE","BUTTON","FOCUS","DATA_TOGGLE_CARROT","DATA_TOGGLE","INPUT","FOCUS_BLUR_DATA_API","Button","toggle","triggerChangeEvent","addAriaPressed","input","type","checked","classList","contains","activeElement","hasAttribute","focus","setAttribute","toggleClass","button","ARROW_LEFT_KEYCODE","ARROW_RIGHT_KEYCODE","TOUCHEVENT_COMPAT_WAIT","SWIPE_THRESHOLD","Default","interval","keyboard","slide","pause","wrap","touch","DefaultType","Direction","NEXT","PREV","LEFT","RIGHT","SLIDE","SLID","KEYDOWN","MOUSEENTER","MOUSELEAVE","TOUCHSTART","TOUCHMOVE","TOUCHEND","POINTERDOWN","POINTERUP","DRAG_START","LOAD_DATA_API","CAROUSEL","ITEM","POINTER_EVENT","ACTIVE_ITEM","ITEM_IMG","NEXT_PREV","INDICATORS","DATA_SLIDE","DATA_RIDE","PointerType","TOUCH","PEN","Carousel","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","_touchSupported","navigator","maxTouchPoints","_pointerEvent","window","PointerEvent","MSPointerEvent","_addEventListeners","next","_slide","nextWhenVisible","hidden","prev","cycle","clearInterval","setInterval","visibilityState","bind","to","index","activeIndex","_getItemIndex","length","direction","off","_handleSwipe","absDeltax","abs","_keydown","_addTouchEventListeners","start","originalEvent","pointerType","clientX","touches","move","end","clearTimeout","querySelectorAll","e","add","tagName","which","slice","indexOf","_getItemByDirection","isNextDirection","isPrevDirection","lastItemIndex","isGoingToWrap","delta","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","slideEvent","from","_setActiveIndicatorElement","indicators","nextIndicator","children","addClass","activeElementIndex","nextElement","nextElementIndex","isCycling","directionalClassName","orderClassName","slidEvent","nextElementInterval","parseInt","defaultInterval","action","TypeError","ride","_dataApiClickHandler","slideIndex","carousels","i","len","$carousel","SHOWN","HIDE","HIDDEN","COLLAPSE","COLLAPSING","COLLAPSED","Dimension","WIDTH","HEIGHT","ACTIVES","Collapse","_isTransitioning","_triggerArray","id","toggleList","elem","filterElement","filter","foundElem","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","hide","show","actives","activesData","not","startEvent","dimension","_getDimension","style","attr","setTransitioning","complete","capitalizedDimension","scrollSize","getBoundingClientRect","triggerArrayLength","$elem","isTransitioning","hasWidth","jquery","_getTargetFromElement","triggerArray","isOpen","$this","currentTarget","$trigger","selectors","$target","ESCAPE_KEYCODE","SPACE_KEYCODE","TAB_KEYCODE","ARROW_UP_KEYCODE","ARROW_DOWN_KEYCODE","RIGHT_MOUSE_BUTTON_WHICH","REGEXP_KEYDOWN","CLICK","KEYDOWN_DATA_API","KEYUP_DATA_API","DISABLED","DROPUP","DROPRIGHT","DROPLEFT","MENURIGHT","MENULEFT","POSITION_STATIC","FORM_CHILD","MENU","NAVBAR_NAV","VISIBLE_ITEMS","AttachmentMap","TOP","TOPEND","BOTTOM","BOTTOMEND","RIGHTEND","LEFTEND","offset","flip","boundary","reference","display","Dropdown","_popper","_menu","_getMenuElement","_inNavbar","_detectNavbar","disabled","_getParentFromElement","isActive","_clearMenus","showEvent","Popper","referenceElement","_getPopperConfig","body","noop","hideEvent","destroy","update","scheduleUpdate","stopPropagation","constructor","_getPlacement","$parentDropdown","placement","_getOffset","offsets","popperConfig","modifiers","enabled","preventOverflow","boundariesElement","applyStyle","toggles","context","clickEvent","dropdownMenu","_dataApiKeydownHandler","items","backdrop","FOCUSIN","RESIZE","CLICK_DISMISS","KEYDOWN_DISMISS","MOUSEUP_DISMISS","MOUSEDOWN_DISMISS","SCROLLABLE","SCROLLBAR_MEASURER","BACKDROP","OPEN","DIALOG","MODAL_BODY","DATA_DISMISS","FIXED_CONTENT","STICKY_CONTENT","Modal","_dialog","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_scrollbarWidth","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","_showBackdrop","_showElement","transition","_hideModal","forEach","htmlElement","handleUpdate","Node","ELEMENT_NODE","appendChild","removeAttribute","scrollTop","_enforceFocus","shownEvent","transitionComplete","has","_resetAdjustments","_resetScrollbar","_removeBackdrop","callback","animate","createElement","className","appendTo","backdropTransitionDuration","callbackRemove","isModalOverflowing","scrollHeight","clientHeight","paddingLeft","paddingRight","rect","left","right","innerWidth","_getScrollbarWidth","fixedContent","stickyContent","actualPadding","calculatedPadding","actualMargin","marginRight","calculatedMargin","padding","elements","margin","scrollDiv","scrollbarWidth","width","clientWidth","removeChild","uriAttrs","ARIA_ATTRIBUTE_PATTERN","DefaultWhitelist","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attrName","nodeName","nodeValue","regExp","attrRegex","l","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","domParser","DOMParser","createdDocument","parseFromString","whitelistKeys","keys","el","elName","attributeList","attributes","whitelistedAttributes","concat","innerHTML","CLASS_PREFIX","BSCLS_PREFIX_REGEX","DISALLOWED_ATTRIBUTES","animation","template","title","delay","html","container","fallbackPlacement","sanitize","AUTO","HoverState","OUT","INSERTED","FOCUSOUT","TOOLTIP","TOOLTIP_INNER","ARROW","Trigger","HOVER","MANUAL","Tooltip","_isEnabled","_timeout","_hoverState","_activeTrigger","tip","_setListeners","enable","disable","toggleEnabled","dataKey","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","isWithContent","shadowRoot","isInTheDom","ownerDocument","tipId","setContent","attachment","_getAttachment","addAttachmentClass","_getContainer","behavior","arrow","onCreate","originalPlacement","_handlePopperPlacementChange","onUpdate","_fixTransition","prevHoverState","_cleanTipClass","getTitle","setElementContent","content","empty","append","text","find","triggers","eventIn","eventOut","_fixTitle","titleType","dataAttributes","dataAttr","key","$tip","tabClass","join","popperData","popperInstance","instance","popper","initConfigAnimation","TITLE","CONTENT","Popover","_getContent","method","ACTIVATE","SCROLL","DROPDOWN_ITEM","DROPDOWN_MENU","DATA_SPY","NAV_LIST_GROUP","NAV_LINKS","NAV_ITEMS","LIST_ITEMS","DROPDOWN","DROPDOWN_ITEMS","DROPDOWN_TOGGLE","OffsetMethod","OFFSET","POSITION","ScrollSpy","_scrollElement","_offsets","_targets","_activeTarget","_scrollHeight","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targets","map","targetSelector","targetBCR","height","top","item","sort","pageYOffset","max","_getOffsetHeight","innerHeight","maxScroll","_activate","_clear","offsetLength","isActiveTarget","queries","$link","parents","node","scrollSpys","scrollSpysLength","$spy","ACTIVE_UL","DROPDOWN_ACTIVE_CHILD","Tab","previous","listElement","itemSelector","makeArray","hiddenEvent","activeElements","active","_transitionComplete","dropdownChild","dropdownElement","dropdownToggleList","SHOWING","autohide","Toast","withoutTimeout","_close","version","minMajor","ltMajor","minMinor","minPatch","maxMajor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;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,SAAJ,CAAc,kGAAd,CAAN;EACD;;EAED,MAAM0a,OAAO,GAAGnrB,CAAC,CAACgB,EAAF,CAAK4S,MAAL,CAAYpR,KAAZ,CAAkB,GAAlB,EAAuB,CAAvB,EAA0BA,KAA1B,CAAgC,GAAhC,CAAhB;EACA,MAAM4oB,QAAQ,GAAG,CAAjB;EACA,MAAMC,OAAO,GAAG,CAAhB;EACA,MAAMC,QAAQ,GAAG,CAAjB;EACA,MAAMC,QAAQ,GAAG,CAAjB;EACA,MAAMC,QAAQ,GAAG,CAAjB;;EAEA,MAAIL,OAAO,CAAC,CAAD,CAAP,GAAaE,OAAb,IAAwBF,OAAO,CAAC,CAAD,CAAP,GAAaG,QAArC,IAAiDH,OAAO,CAAC,CAAD,CAAP,KAAeC,QAAf,IAA2BD,OAAO,CAAC,CAAD,CAAP,KAAeG,QAA1C,IAAsDH,OAAO,CAAC,CAAD,CAAP,GAAaI,QAApH,IAAgIJ,OAAO,CAAC,CAAD,CAAP,IAAcK,QAAlJ,EAA4J;EAC1J,UAAM,IAAI3nB,KAAJ,CAAU,8EAAV,CAAN;EACD;EACF,CAfD;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/Frontend/js/yourteam/plugins/yt-tab.js b/Frontend/js/yourteam/plugins/yt-tab.js new file mode 100644 index 0000000..0da1daa --- /dev/null +++ b/Frontend/js/yourteam/plugins/yt-tab.js @@ -0,0 +1,48 @@ + + +var _ytTabInited = [] +$(function () { + $("[data-tabname][data-target]:not([data-tabrole='child'])").each(function (index, value) { + let tabName = $(value).data("tabname"); + if (_ytTabInited.indexOf(tabName) == -1) { + var ytTab = new YTTab({ tabName: tabName }) + _ytTabInited.push(tabName); + } + }) +}) + +class YTTab { + constructor(option = {}) { + this.tabName = option.tabName ?? null; + } + + init(); + + init() { + $(`[data-tabname=${this.tabName}][data-target][data-tabrole='child']`).css("display", "none"); + $(`[data-tabname=${this.tabName}][data-target][data-tabrole='child']`).first().show(); + + this.event(); + } + + event() { + // custom tab + // example : + // + // + $("body").on("click", `[data-tabname=${this.tabName}][data-target]`, function () { + let target = $(this).data("target"); + let obj = this; + let tabName = $(target).data("tabname"); + if (tabName) { + if ($(target).data("tabrole") == "child") { + $(obj).trigger("yt:tab:show"); + $(`[data-tabname='${tabName}'][data-tabrole='child']`).css("opacity", 0).hide(); + $(target).show().animate({ opacity: 1 }, 200, function () { + $(obj).trigger("yt:tab:shown"); + }); + } + } + }) + } +} diff --git a/Frontend/js/yourteam/plugins/yt-tooltip.js b/Frontend/js/yourteam/plugins/yt-tooltip.js new file mode 100644 index 0000000..9a5cca2 --- /dev/null +++ b/Frontend/js/yourteam/plugins/yt-tooltip.js @@ -0,0 +1,108 @@ +$.fn.YTTooltip = function (option) { + let eleArr = []; + + this.each(function (index, value) { + + let obj = { + ele: value, + isShowArr: [], + html: $(option.html) || '', + tooltipDiv: null, + direction: option.direction || 'bottom', + toggle: "click", + hideTooltipEvent: hideTooltipEvent, + onShow: option.onShow || null, + }; + + if (obj.toggle == "hover") { + obj.toggle == "mouseenter" + } + + $(obj.ele).on(obj.toggle, function () { + let tooId = $(this).data("yttooltipid"); + let display = "flex"; + //顯示 tooltip 程序 及 存入已顯示紀錄arr + if (!tooId || obj.isShowArr.indexOf(tooId) == -1) { + let ranId = Math.floor((Math.random() * (9999999 - 1000000)) + 1000000); + obj.isShowArr.push(ranId); + let clone = $(obj.html); + //body 元素 高寬 + let bodyWidth = $("body")[0].offsetWidth; + let bodyHeight = $("body")[0].offsetHeight; + //計算引用元素 offset + let offset = $(this).offset(); + //引用元素 高寬 + let width = $(this)[0].offsetWidth; + let height = $(this)[0].offsetHeight; + + $(this).data("yttooltipid", ranId); + $(clone).attr("id", "yt_tooltip_" + ranId) + $("body").append(clone); + obj.tooltipDiv = clone; + //顯示 tooltip + $(clone).css({ "display": display, "position": "absolute" }); + obj.onShow ? obj.onShow(clone,obj) : ""; + //tooltip 高寬 + let toolWidth = $(clone)[0].offsetWidth; + let toolHeight = $(clone)[0].offsetHeight; + + let left = offset.left + width + toolWidth > bodyWidth ? offset.left - toolWidth : offset.left + width; + let top = offset.top + height + toolHeight > bodyHeight ? offset.top - toolHeight : offset.top + height; + + //計算 位置 + if (obj.direction == "left") { + left = offset.left < toolWidth ? offset.left + width + 5 : offset.left - toolWidth - 10; + } else if (obj.direction == "right") { + left = offset.left + toolWidth + width > bodyWidth ? offset.left - toolWidth - 10 : offset.left + width + 10; + } else if (obj.direction == "bottom") { + top = offset.top + toolHeight + height > bodyHeight ? offset.top - toolHeight - 10 : offset.top + height + 10; + } else if (obj.direction == "top") { + top = offset.top < toolHeight ? offset.top + height + 5 : offset.top - toolHeight - 10; + } + + if (obj.direction == "left" || obj.direction == "right") { + $(clone).css({ left: left, top: offset.top }); + } else if (obj.direction == "top" || obj.direction == "bottom"){ + $(clone).css({ left: offset.left, top: top}); + } + } else { + obj.hideTooltipEvent(tooId); + } + + if (obj.toggle == "hover") { + $(obj.tooltipDiv).off("mouseover").on("mouseover", function () { + $(this).css("display", "flex"); + }) + $(obj.tooltipDiv).off("mouseleave").on("mouseleave", function () { + let tooId = $(this).attr("id").split("yt_tooltip_")[1]; + obj.hideTooltipEvent(tooId); + }) + } + }) + + if (obj.toggle == "hover") { + $(obj.ele).on("mouseleave", function (e) { + let tooId = $(this).data("yttooltipid"); + hideTooltipEvent(tooId); + e.stopPropagation(); + }) + } + + + function hideTooltipEvent(tooId) { + $("#yt_tooltip_" + tooId).hide(); + setTimeout(function () { + if ($("#yt_tooltip_" + tooId).css("display") == "none") { + obj.isShowArr.splice($.inArray(tooId, obj.isShowArr), 1); + $("#yt_tooltip_" + tooId).remove(); + } + }, 100) + } + + eleArr.push(obj); + }) + + let result = eleArr.filter(x => this.toArray().findIndex(y => y == x.ele) != -1)[0]; + + return result; +} \ No newline at end of file diff --git a/Frontend/js/yourteam/yourteam.ajax.class.js b/Frontend/js/yourteam/yourteam.ajax.class.js new file mode 100644 index 0000000..ac23527 --- /dev/null +++ b/Frontend/js/yourteam/yourteam.ajax.class.js @@ -0,0 +1,250 @@ +var YourTeam = YourTeam || {}; +/** + * This is a description of the Ajax constructor function. + * @class Ajax + * @classdesc This is a description of the Ajax class. + * @author Darren Chen @2021/02/06 + * @copyright Darren Chen @Your Team Co., Ltd. 2021 + */ +class Ajax { + /** + * constructor + * @constructor + * @param {String} apiUrl API URL. def="". + * @param {String} sendData the data object which you will be send. def= null. + * @param {Fcnction} successFunction successFunction. def=null.(use def successFunction) + * @param {Fcnction} errorFunction errorFunction. def=null.(use def successFunction) + * @param {String} type HTTP METHOD. def="GET". + * @param {Object} conType content type + * @param {String} dataType data format. def="JSON". + * @param {String} isAsync the api synchronization. def=false. + * @return {Object} this + */ + constructor(apiUrl = "", sendData = null, successFunction = null, errorFunction = null, type = "GET", isAsync = false, conType = this.contentType.Json, dataType = "JSON") { + this.conType = conType; + this.apiUrl = apiUrl; + this.isAsync = isAsync; + this.type = type; + this.dataType = dataType; + this.sendData = sendData; + if (successFunction) this.successFunction = successFunction; + if (errorFunction) this.errorFunction = errorFunction; + return this; + } + /** + * dataToString + * @description convert the data object to string + * @param {Object} data API URL. def="". + * @return {String} strJsonData + */ + dataToString = function (data) { + let strJsonData = data ? (data.Data ? JSON.stringify(data.Data) : null) : null; + return strJsonData; + } + /** + * beforeSendFunction + * @description beforeSendFunction + */ + beforeSendFunction = function () { + + } + /** + * successFunction + * @description successFunction + * @param {Object} data the data object from the api return + * @return {Object} data + */ + successFunction = function (data) { + return data; + } + /** + * errorFunction + * @description errorFunction + * @param {Object} xhr HTTP STATUS + * @param {Object} ajaxOptions the ajax option message + * @param {String} thrownError the error message + */ + errorFunction = function (xhr, ajaxOptions, thrownError) { + if (xhr.status != "201" && xhr.status != "204") { + console.log(xhr.status); + console.log(thrownError); + window.alert("執行失敗,請聯絡客服人員。"); + } else if (xhr.status == "401") { + window.alert("登入時間超時,請重新登入!"); + location.href = "~/Login/Login"; + } + } + /** + * completeFunction + * @description completeFunction + */ + completeFunction = function () { + + } + /** + * content type + * @description content type + */ + contentType = { + Json: 1, + FormData : 2 + } + /** + * enum + * @description enum + * @param {Object} eo object + * @return {Object} enum + */ + enums(eo) { + var enums = function () { }; + for (var key in eo) { + var enumObject = new enums(); + enums[key] = eo[key]; + } + return enums; + } + /** + * send + * @description send + * @param {Object} conType content type + * @param {Object} sendData send data + * @param {Function} successFunction the ajax success function + * @param {Function} errorFunction the ajax error function + * @return {Object} this + */ + send = function (conType = this.contentType.Json, sendData = null, successFunction = null, errorFunction = null) { + + if (!CheckMultiSend(this.apiUrl, this.type, this.dataToString(this.sendData))) { //連點防呆 + return false; + } + if (sendData) { + this.sendData = sendData; + } + if (successFunction) { + this.successFunction = successFunction; + } + if (errorFunction) { + this.errorFunction = errorFunction; + } + if (conType === this.contentType.Json) { + $.ajax({ + url: this.apiUrl, + async: this.isAsync, + type: this.type, + dataType: this.dataType, + traditional: true, + contentType: "application/json; charset=utf-8", + data: this.dataToString(this.sendData), + + //cache: false, + //processData: false, + + beforeSend: this.beforeSendFunction, + success: this.successFunction, + error: this.errorFunction, + complete: this.completeFunction, + statusCode: { + 201: this.successFunction + } + }); + } + else if (conType === this.contentType.FormData) { + $.ajax({ + url: this.apiUrl, + async: this.isAsync, + type: this.type, + dataType: this.dataType, + + traditional: true, + + contentType: false, + enctype: 'multipart/form-data', + data: this.sendData, + cache: false, + processData: false, + beforeSend: this.beforeSendFunction, + success: this.successFunction, + error: this.errorFunction, + complete: this.completeFunction + }); + alert(conType); + } + else { + console.error("the content type is null."); + } + return this; + } +} +YourTeam.Ajax = YourTeam.Ajax || Ajax; + +var ckeckMultiSendArr = []; +function CheckMultiSend(url, type, data) { + //根據 url type data + let text = String(url) + String(type); + if (type != "GET") { + if (ckeckMultiSendArr.indexOf(text) == -1) { + ckeckMultiSendArr.unshift(text); + let timer = setInterval(function () { + ckeckMultiSendArr.splice(0); + clearInterval(timer); + }, 500) + } else { + return false + } + } + return true; +} +//var YourTeamAjax = { +// apiUrl: "", +// isAsync: false, +// type: "GET", +// dataType: "JSON", +// sendData: null, +// dataToString: function (data) { +// let strJsonData = data ? (data.Data ? JSON.stringify(data.Data) : null) : null; +// return strJsonData; +// }, +// beforeSendFunction: function () { +// $.blockUI({ message: ' Loding...' }); +// }, +// successFunction: function (data) { +// return data; +// }, +// errorFunction: function (xhr, ajaxOptions, thrownError) { +// if (xhr.status != "201") { +// console.log(xhr.status); +// console.log(thrownError); +// window.alert("執行失敗,請聯絡YourTeam客服人員。"); +// } +// }, +// completeFunction: function () { +// $.unblockUI(); +// }, +// send: function (sendData = null, successFunction = null, errorFunction = null) { +// if (sendData) { +// this.sendData = sendData; +// } +// if (successFunction) { +// this.successFunction = successFunction; +// } +// if (errorFunction) { +// this.errorFunction = errorFunction; +// } +// $.ajax({ +// url: this.apiUrl, +// async: this.isAsync, +// type: this.type, +// dataType: this.dataType, +// traditional: true, +// contentType: "application/json; charset=utf-8", +// data: this.dataToString(this.sendData), +// beforeSend: this.beforeSendFunction, +// success: this.successFunction, +// error: this.errorFunction, +// complete: this.completeFunction, +// statusCode: { +// 201: this.successFunction +// } +// }); +// } +//}; diff --git a/Frontend/js/yourteam/yourteam.chartjs.class.js b/Frontend/js/yourteam/yourteam.chartjs.class.js new file mode 100644 index 0000000..2154fa1 --- /dev/null +++ b/Frontend/js/yourteam/yourteam.chartjs.class.js @@ -0,0 +1,320 @@ +var YourTeam = YourTeam || {}; +YourTeam.Chartjs = YourTeam.Chartjs || {}; +class Bar { + constructor() { + } + /* + * @deprecated since version 0.1 + * @description 初始化Bar基本圖表 + * @param {String} cvsId the canvas`s id + * @param {Array} aryLabelsX X軸標籤值(String Array) + * @param {Array} aryVluesY Y軸量值(Integer Array) + * @param {String} strTitle the title of the chart;def value = null + * @returns {Object} chart element + */ + initBasesss(cvsId, aryLabels, aryVlues, strTitle = null) { + //function newDate(days) { + // return new YourTeam.Utility.DateHelper().getChangeDateTime(false, '/', 0, 0, days); + //} + let myDatasets = []; + let objJson = {}; + for (let i = 0; i < aryVlues.length; i++) { + objJson = {}; + objJson.label = aryLabels[i]; + objJson.data = [aryVlues[i]]; + objJson.borderColor = "rgba(220,20,20,1)"; + objJson.backgroundColor = "rgba(220,20,20,0.5)"; + myDatasets.push(objJson); + } + + let config = { + type: "bar", + data: { + //labels: [newDate(-5), newDate(-4), newDate(-3), newDate(-2), newDate(-1), newDate(0)], + labels: aryLabels, + datasets: myDatasets + //datasets: [{ + // //data: [2, 5, 3, 4, 7, 3], + // data: aryVlues, + // borderColor: "rgba(220,20,20,1)", + // backgroundColor: "rgba(220,20,20,0.5)" + //}] + }, + options: { + legend: { + display: true, + labels: { + fontColor: 'rgb(255, 99, 132)' + } + }, + scales: { + xAxes: [{ + type: "category", + labels: aryLabels + }], + yAxes: [{ + ticks: { + beginAtZero: true + } + }] + }, + title: { + display: (strTitle) ? true : false, + text: (strTitle) ? strTitle : "" + } + } + } + let ctx = document.getElementById(cvsId).getContext("2d"); + //window.myLine = new Chart(ctx, config); + return new Chart(ctx, config); + } + /* + * @deprecated since version 0.1 + * @description 初始化Bar基本圖表 + * @param {String} cvsId the canvas`s id + * @param {Array} aryLabelsX X軸標籤值(String Array) + * @param {Array} aryVluesY Y軸量值(Integer Array) + * @param {String} strTitle the title of the chart;def value = null + * @param {String} type the chart is vertical or horizontal ;def value = "bar" (vertical), "horizontalBar" (horizontal) + * @returns {Object} chart element + */ + initBase(cvsId, aryLabels, aryVlues, strLabel = null, strTitle = null, chart = null,type="bar",animation = null) { + //function newDate(days) { + // return new YourTeam.Utility.DateHelper().getChangeDateTime(false, '/', 0, 0, days); + //} + if (chart !== null) { + chart.destroy(); + } + let myDatasets = []; + let objJson = {}; + let valLabelObj = {}; + + objJson.backgroundColor = []; + + objJson.label = strLabel ?? ""; + for (let i = 0; i < aryVlues.length; i++) { + objJson.borderColor = "rgba(220,20,20,1)"; + objJson.backgroundColor.push("rgba(" + random(0, 255) + "," + random(0, 255) + "," + random(0, 255) + ",0.5)"); + } + objJson.data = aryVlues; + myDatasets.push(objJson); + + + let config = { + type: type, + data: { + //labels: [newDate(-5), newDate(-4), newDate(-3), newDate(-2), newDate(-1), newDate(0)], + labels: aryLabels, + datasets: myDatasets + //datasets: [{ + // //data: [2, 5, 3, 4, 7, 3], + // data: aryVlues, + // borderColor: "rgba(220,20,20,1)", + // backgroundColor: "rgba(220,20,20,0.5)" + //}] + }, + options: { + indexAxis: 'y', + legend: { + labels: { + generateLabels: function (chart) { + let labels = chart.data.labels; + let dataset = chart.data.datasets[0]; + let legend = labels.map(function (label, index) { + return { + datasetIndex: 0, + fillStyle: dataset.backgroundColor && dataset.backgroundColor[index], + strokeStyle: dataset.borderColor && dataset.borderColor[index], + lineWidth: 0, + text: label + } + }); + return legend; + } + }, + onClick: null + }, + + scales: { + xAxes: [{ + + ticks: { + beginAtZero: true, + callback: function (value, index, values) { + if (value.length > 10) { + value = value.substring(0, 10) + "..."; + } + return value; + }, + }, + }], + yAxes: [{ + ticks: { + beginAtZero: true + } + }], + + }, + animation: animation, + title: { + display: (strTitle) ? true : false, + text: (strTitle) ? strTitle : "" + }, + tooltips: { + callbacks: { + //label: function (tooltipItem) { + // console.log(tooltipItem) + // return tooltipItem.yLabel; + //}, + //title: function (tooltipItem) { + // console.log(tooltipItem) + // return tooltipItem.xLabel + //} + } + }, + }, + + } + let ctx = document.getElementById(cvsId).getContext("2d"); + //window.myLine = new Chart(ctx, config); + return new Chart(ctx, config); + } + /* + * @deprecated since version 0.1 + * @description 初始化Bar日期基本圖表 + * @param {String} cvsId the canvas`s id + * @param {Array} aryLabelsX X軸標籤值(Date Array) + * @param {Array} aryVluesY Y軸量值(Integer Array) + * @param {String} strTitle the title of the chart;def value = null + * @returns {Object} chart element + */ + initBaseDate(cvsId, aryLabels, aryVlues, strTitle = null, chart = null) { + //function newDate(days) { + // return new YourTeam.Utility.DateHelper().getChangeDateTime(false, '/', 0, 0, days); + //} + if (chart !== null) { + chart.destroy(); + } + let config = { + type: "bar", + data: { + //labels: [newDate(-5), newDate(-4), newDate(-3), newDate(-2), newDate(-1), newDate(0)], + labels: aryLabels, + datasets: [{ + //data: [2, 5, 3, 4, 7, 3], + data: aryVlues, + borderColor: "rgba(220,20,20,1)", + backgroundColor: "rgba(220,20,20,0.5)" + }] + }, + options: { + scales: { + xAxes: [{ + type: "time", + time: { + unit: "day", + round: "day", + displayFormats: { + day: "YYYY/MM/DD" + } + } + }], + yAxes: [{ + ticks: { + beginAtZero: true + } + }] + }, + title: { + display: (strTitle) ? true : false, + text: (strTitle) ? strTitle : "" + }, + + } + } + let ctx = document.getElementById(cvsId).getContext("2d"); + //window.myLine = new Chart(ctx, config); + return new Chart(ctx, config); + } +} +YourTeam.Chartjs.Bar = YourTeam.Chartjs.BarHelper || Bar; + + + +class Pie { + constructor() { + } + /* + * @deprecated since version 0.1 + * @description 初始化Pie基本圖表 + * @param {String} cvsId the canvas`s id + * @param {Array} aryLabels 標籤值(String Array) + * @param {Array} aryVlues 量值(Integer Array) + * @param {String} strTitle the title of the chart;def value = null + * @param {Integer} borderWidth the width of the border;def value = 1 + * @param {Array} aryStrBgColor the rgba or color code with the backaround;def value = null + * @param {Array} aryStrBorderColor the rgba or color code with the border;def value = null + * @returns {Object} chart element + */ + + + + initBase(cvsId, aryLabels, aryVlues, strTitle = null, chart = null, borderWidth = 1, aryStrBgColor = null, aryStrBorderColor = null) + { + if (chart !== null) { + chart.destroy(); + } + if (!aryStrBgColor) { + aryStrBgColor = []; + for (let i = 0; i < aryVlues.length; i++) { + aryStrBgColor.push('rgb(' + random(0, 255) + ', ' + random(0, 255) + ', ' + random(0, 255) + ')'); + } + } + if (!aryStrBorderColor) { + aryStrBorderColor = []; + for (let i = 0; i < aryVlues.length; i++) { + aryStrBorderColor.push('rgb(255,255,255)'); + } + } + let config = { + type: (aryVlues.length % 2) ? "doughnut" :"doughnut", + data: { + labels: aryLabels, + datasets: [{ + data: aryVlues, + backgroundColor: aryStrBgColor, + borderColor: aryStrBorderColor, + borderWidth: borderWidth + }] + }, + options: { + //cutoutPercentage: 40, + cutoutPercentage: 60, + maintainAspectRatio: false, + responsive: false, + legend: { + display: false, + }, + + title: { + display: (strTitle) ? true : false, + text: (strTitle) ? strTitle : "" + }, + tooltips: { + position: 'nearest', + xAlign: "left", + yAlign: 'center' + } + } + } + let ctx = document.getElementById(cvsId).getContext("2d"); + //window.myLine = new Chart(ctx, config); + return new Chart(ctx, config); + } +} +YourTeam.Chartjs.Pie = YourTeam.Chartjs.PieHelper || Pie; + + +function random(min, max) { + return Math.floor(Math.random() * max) + min; +} \ No newline at end of file diff --git a/Frontend/js/yourteam/yourteam.ckeditor5.init.js b/Frontend/js/yourteam/yourteam.ckeditor5.init.js new file mode 100644 index 0000000..26e2f71 --- /dev/null +++ b/Frontend/js/yourteam/yourteam.ckeditor5.init.js @@ -0,0 +1,211 @@ +var editor = []; +$(function () { + initCkeditor() +}) + +/* --Uplaod Adapater */ +//class MyUploadAdapter { +// constructor(loader) { +// this.loader = loader; +// } +// // start upload methods +// upload() { +// return new Promise((resolve, reject) => { +// // 使用 FileReader() 物件讀取檔案 +// const reader = this.reader = new window.FileReader(); + +// // 觸發錯誤事件,以 reject 丟回 Promise 失敗原因 +// reader.addEventListener('error', err => { +// reject(err); +// }); +// // 觸發 abort 事件時,以 reject() ,使 Promise 失敗 +// reader.addEventListener('abort', () => { +// reject(); +// }); + +// // 告訴 FileReader 物件用 url 格式讀取,用於設定 img.src 性質 +// this.loader.file.then(file => { + +// console.log(file) + +// // 觸發 load 事件後,resolve 丟回物件完成 Promise +// reader.addEventListener('load', () => { +// //file.src = reader.result; +// let myFile = new BICYCLER.Utility.File(); +// let myMath = new BICYCLER.Utility.Math(); +// let strExtName = "", strOrgName = "", strSaveName = "" +// strSaveName = myMath.guid().replace(' ', ''); +// strExtName = myFile.getFileExtension(file.name); +// strOrgName = (strExtName === null || strExtName === "") ? file.name : file.name.replace('.' + strExtName, ''); + +// editorImage.push(file) +// resolve({ +// filename: file.name, +// orgname: strOrgName, +// savename: strSaveName, +// extname: strExtName, +// size: file.size, +// urls: { +// default: reader.result +// } +// }); +// }); +// reader.readAsDataURL(file); +// }); + +// //this.loader.read().then(data => { +// // editor.editing.view.change(writer => { +// // writer.setAttribute('src', data, viewImg); +// // }); +// //}); +// }); +// } +// // start abort() +// abort() { +// // 觸發 FileReader abort 事件 +// this.reader.abort(); +// } +//} + +function initCkeditor() { + return new Promise((resolve) => { + let toolbar = { + toolbar: { + items: [ + 'heading', + '|', + 'fontfamily', 'fontsize', 'fontColor', 'fontBackgroundColor', + '|', + 'bold', 'italic', 'underline', 'strikethrough', + '-', + 'alignment', 'numberedList', 'bulletedList', + '|', + 'indent', 'outdent', + '|', + 'link', 'blockquote', /*'ckfinder ,'*/ 'insertTable', + '|', + 'undo', 'redo', + '|', + 'fullScreen' + ], + shouldNotGroupWhenFull: true, + language: "zh", + }, + image: { + toolbar: [ + 'toggleImageCaption', 'linkImage', + '|', + 'imageStyle:alignBlockLeft', 'imageStyle:alignCenter', 'imageStyle:alignBlockRight', 'imageStyle:wrapText', + "|", + 'resizeImage:original', 'resizeImage:25', 'resizeImage:50', 'resizeImage:75' + ], + }, + table: { + contentToolbar: ['tableProperties', 'tableCellProperties', 'tableRow', 'tableColumn', 'mergeTableCells'] + }, + //image介面刪除callback + //imageRemoveEvent: { + // additionalElementTypes: null, + // callback: (imagesSrc, nodeObjects) => { + // console.log('callback called', imagesSrc, nodeObjects) + // } + //}, + ckfinder: { + //ckfinder 連接器 + uploadUrl: '/By_Admin/CKfinder/CKfinder/connector?command=Init&type=Images&lang=zh-tw&langCode=zh-tw', + options: { + language: 'zh-tw', + resourceType: 'Images' + } + } + } + + $("[data-toggle^=ckeditor]").each((index, value) => { + //取得原有element class + let oriWidth = $(value).css("width"); + let oriMaxWidth = $(value).css("max-width"); + + ClassicEditor.create(value, toolbar) + .then(NewEditor => { + if ($("[data-toggle^=ckeditor]").length == 1) { + editor = NewEditor; + + //讀進來的Source element disabled時,該CKEditor => enableReadOnlyMode('secret string') + if ($(value).prop("disabled") == true) { + editor.enableReadOnlyMode('bicycler'); + } + + //剪貼簿讀進來不呈現樣式 + //const plugin = editor.plugins.get('Clipboard'); + //plugin.on('inputTransformation', (evt, data) => { + // const dataTransfer = data.dataTransfer; + // data.content = editor.data.processor.toView(regexTextToHtml(dataTransfer.getData('text/plain'))); + //}) + + //上傳照片(非CKfinder)配置UploadAdapter + //editor.plugins.get('FileRepository').createUploadAdapter = loader => { + // console.log(editor.plugins.get('FileRepository')) + // return new MyUploadAdapter(loader) + //} + + //放入原有col- class + $(editor.ui.view.element).css("width", oriWidth); + $(editor.ui.view.element).css("max-width", oriMaxWidth); + + resolve(); + } else { + let sub = $(value).data("toggle").split("ckeditor")[1]; + editor[sub] = NewEditor + + //讀進來的Source element disabled時,該CKEditor => enableReadOnlyMode('secret string') + if ($(value).prop("disabled") == true) { + editor[sub].enableReadOnlyMode('2421ww'); + } + + //貼上時指文字呈現 + //const plugin = editor[sub].plugins.get('Clipboard'); + //plugin.on('inputTransformation', (evt, data) => { + // const dataTransfer = data.dataTransfer; + // data.content = editor[sub].data.processor.toView(regexTextToHtml(dataTransfer.getData('text/plain'))); + //}) + + //上傳照片(非CKfinder)配置UploadAdapter + editor[sub].plugins.get('FileRepository').createUploadAdapter = loader => { + console.log(editor[sub].plugins.get('FileRepository')) + return new MyUploadAdapter(loader) + } + + //放入原有col- class + $(editor[sub].ui.view.element).css("width", oriWidth); + $(editor[sub].ui.view.element).css("max-width", oriMaxWidth); + + resolve(); + } + }) + .catch(err => { + console.error(err.stack); + resolve(); + }); + }) + }) + +} + +function regexTextToHtml(text) { + let data = text; + data = data.replace(/\r/gm, ""); + data = data.replace(/\n\n/gm, "\n"); + data = data.replace(/^/gm, ""); + data = data.replace(/\n|\n\n/gm, ""); + return data; +} + +function regexHtmlToText(html) { + let data = html; + data = data.replace(//gm, ""); + data = data.replace(/<\/p>/gm, "\n"); + data = data.replace(/ /gm, " "); + data = data.replace(/ /gm, " "); + data = data.replace(/ /gm, " "); + return data; +} \ No newline at end of file diff --git a/Frontend/js/yourteam/yourteam.jquery.datatables.js b/Frontend/js/yourteam/yourteam.jquery.datatables.js new file mode 100644 index 0000000..1023322 --- /dev/null +++ b/Frontend/js/yourteam/yourteam.jquery.datatables.js @@ -0,0 +1,644 @@ +var YourTeam = YourTeam || {}; +YourTeam.JqDataTables = YourTeam.JqDataTables || {}; +/* @deprecated since version 0.2 +* @description change datatables prototype language +* @author Darren Chen +* @date 2018/04/18 +*/ +$.fn.dataTable.defaults.oLanguage = { + "sProcessing": "等待中...", + "sLengthMenu": "顯示 _MENU_ 項結果", + "sZeroRecords": "沒有匹配結果", + "sInfo": "顯示第 _START_ 至 _END_ 項結果,共 _TOTAL_ 項", + "sInfoEmpty": "顯示第 0 至 0 項結果,共 0 項", + "sInfoFiltered": "(由 _MAX_ 項結果過濾)", + "sInfoPostFix": "", + "sSearch": "搜索:", + "sUrl": "", + "sThousands": "", + "sEmptyTable": "表中數據為空", + "sLoadingRecords": "載入中...", + "sInfoThousands": ",", + "oPaginate": { + "sFirst": "首頁", + "sPrevious": "上頁", + "sNext": "下頁", + "sLast": "末頁" + }, + "oAria": { + "sSortAscending": ": 以升序排列此列", + "sSortDescending": ": 以降序排列此列" + } +}; + +/* @deprecated since version 0.1 +* @description init the jq datatables no data with the page ui +* @param {String} tag jq datatables id(#id) or class(.class) +* @param {Array} colnum_defs these is colnum def. with init the table +* @param {function} initComplete after init complete run a function +* @param {function} drawCallback after draw complete run a function +* @author Darren Chen +* @date 2020/12/10 +*/ +function fnInitJqDataTablesNoData(tag, dataSet = null, columns = null, columnDefs = null, initComplete = null, drawCallback = null, rowsGroup = null, rowGroup = null, dom = '<"toolbar">frtipl' ) { + let fnDrawCallBack = function () { + drawCallback != null ? drawCallback() : ""; + let api = this.api(); + $(".dataTables_scrollBody").css("overflow", "auto"); + if (api.rows().data().length <= 1) { + $(".dataTables_scrollBody").css("overflow", "visible"); + } + } + let table = null; + let oTable = { + "sDom": dom, + "data": dataSet, + "autoWidth": true, + "processing": true, + "columns": columns, + "aoColumnDefs": columnDefs, + "stateSave": true, + "pagingType": "full_numbers_custom", + "destroy": false, + "initComplete": initComplete, + "drawCallback": fnDrawCallBack, + "rowsGroup": rowsGroup, + "rowGroup": rowGroup, + "retrieve": true, + "responsive": { + details: { + + target: '.dt-mobile-btn', + type: "column", + renderer: function (api, rowIdx, columns) { + var data = $.map(columns, function (col, i) { + return col.hidden ? + '' + + '' + col.title + ':' + ' ' + + '' + col.data + '' + + '' : + ''; + }).join(''); + + return data ? + $('').append(data) : + false; + }, + + }, + }, + + } + + let time = 0; + table = $(tag).DataTable(oTable); + table.on('processing', function (e, settings, processing) { + //過100ms的讀取才秀出loading + setTimeout(function () { + time == 1 ? loadingSetting("show", "dtProcessing") : ""; + }, 100); + + if (processing && time == 0) { //第一次讀取processing = true + time = 1; + } else if (!processing && time == 1 ) { //結束讀取後processing = false + loadingSetting("hide", "dtProcessing"); + time = 0; + } + }) + table.on('responsive-display', function (e, datatable, row, showHide, update ) { + table.columns.adjust(); + }); + return table; +} + +function fnInitJqDataTables(tag, colnum_defs = null, initComplete = null, drawCallback = null) { + return $(tag).DataTable({ + "dom": '<"toolbar"><"wrapper"ti>', + //"responsive": true, + "autoWidth": true, + //"aoColumns": columns, + "aoColumnDefs": colnum_defs, + "initComplete": initComplete, + "drawCallback": drawCallback, + + }); +} + +/* @deprecated since version 1.1 +* @description init jq datatables use jQuery AJAX +* @param {String} API url +* @param {String} table id (#id) +* @param {Object} data +* @param {Object} columns +* @param {Object} columns_def +* @param {Object} order +* @param {String} table header button id (#id) +* @param {String} html tag string with the header +* @return {String} JSON string +* @author Darren Chen +* @date 2020/12/11 +*/ +function fnInitJqDataTablesAjax(apiUrl, tag, sendData = null, columns, columns_def, initComplete = null, drawCallback = null, rowsGroup = null, rowGroup = null ,order = null, btn = null, dom = null) { + //$(tag).dataTable().fnClearTable(); + //let sData = data ? (data.Data ? JSON.stringify(data.Data) : null) : null; + if (sendData == null) { + sendData = function (json) { + console.log("讀取列表", json) + return json; + } + } + + let fnDrawCallBack = function () { + drawCallback != null ? drawCallback() : ""; + let api = this.api(); + $(".dataTables_scrollBody").css("overflow", "auto"); + if (api.rows().data().length <= 1) { + $(".dataTables_scrollBody").css("overflow", "visible"); + } + } + let table = null; + try { + let oTable = { + "ajax": { + method: "GET", + url: apiUrl, + cache: true, + async:false, + dataSrc: sendData, + }, + "responsive": { + details: { + target: '.dt-mobile-btn', + renderer: function (api, rowIdx, columns) { + var data = $.map(columns, function (col, i) { + return col.hidden ? + '' + + '' + col.title + ':' + ' ' + + '' + col.data + '' + + '' : + ''; + }).join(''); + + return data ? + $('').append(data) : + false; + } + }, + }, + "data": null, + "EmptyTable": true, + "destroy": true, + "processing": false, + "sDom":'<"toolbar">frtipl', + "pagingType": $(window).width() < 768 ? "simple" : "full_numbers_custom", + //"responsive": true, + "autoWidth": true, + "aoColumns": columns, + "aoColumnDefs": columns_def, + "deferRender": true, + "fixedColumns": true, + "stateSave": true, + "scrollX": true, + "scrollY": "700px", + "scrollCollapse": true, + "autoWidth": true, + //"sScrollY": "480px", + "orderMulti": true, + "header": "#liaison_header", + "initComplete": initComplete, + "drawCallback": fnDrawCallBack, + "rowGroup": rowGroup, + "rowsGroup": rowsGroup, + + }; + if (order) { + oTable.order = order; + } + if (dom) { + oTable.dom = dom; + } + + let time = 0; + table = $(tag).DataTable(oTable); + table.on('processing', function (e, settings, processing) { + //過100ms的讀取才秀出loading + setTimeout(function () { + time == 1 ? loadingSetting("show", "dtProcessing") : ""; + }, 100); + + if (processing && time != 1) { //第一次讀取processing = true + time = 1; + } else if (!processing && time == 1) { //結束讀取後processing = false + loadingSetting("hide", "dtProcessing"); + time = 0; + } + }) + } + catch (e) { + console.error(e); + } + + return table; +} + +function fnInitJqDataTablesOdata(apiUrl, tag, sendData, columns, columns_def, drawCallback = null, order = null) { + //$(tag).dataTable().fnClearTable(); + //let sData = data ? (data.Data ? JSON.stringify(data.Data) : null) : null; + let table = null; + try { + let oTable = { + "sAjaxSource": apiUrl, + "iODataVersion": 3, + "aoColumns": columns, + "aoColumnDefs": columns_def, + "fnServerData": fnServerOData, // required + "bProcessing": true, + "bServerSide": true, // optional + "bDestroy": true, + "bUseODataViaJSONP": false, // set to true if using cross-domain requests + "sDom": '<"toolbar">f<"selector">rtipl', + "stateSave": true, + }; + if (order) { + oTable.order = order; + } + table = $(tag).DataTable(oTable); + + } + catch (e) { + console.error(e); + } + + return table; +} + +function fnInitJqDataTablesServerSideAjax(apiUrl, tag, sendData, columns, columns_def, initComplete = null, drawCallback = null, rowsGroup = null, rowGroup = null, order = null, btn = null, dom = null) { + //$(tag).dataTable().fnClearTable(); + //let sData = data ? (data.Data ? JSON.stringify(data.Data) : null) : null; + let table = null; + + let fnDrawCallBack = function () { + let api = this.api(); + + drawCallback != null ? drawCallback(api) : ""; + //若只有一列 overflow改為 visible (tooltip/popover 不會阻擋) + $(".dataTables_scrollBody").css("overflow", "auto"); + if (api.rows().data().length <= 1) { + $(".dataTables_scrollBody").css("overflow", "visible"); + } + + } + try { + let oTable = { + "sAjaxSource": apiUrl, + //"ajax": { + // "method":"POST", + // "url": apiUrl, + //}, + "responsive": { + details: { + renderer: function (api, rowIdx, columns) { + var data = $.map(columns, function (col, i) { + return col.hidden ? + '' + + '' + col.title + ':' + ' ' + + '' + col.data + '' + + '' : + ''; + }).join(''); + + return data ? + $('').append(data) : + false; + } + }, + }, + "fnServerParams": sendData, + "data": null, + "EmptyTable": true, + "destroy": true, + "processing": false, + "sDom": '<"toolbar">f<"selector">rtipl', + "paging": true, + "pagingType": $(window).width() < 768 ? "simple" : "full_numbers_custom", + //"responsive": true, + "autoWidth": true, + "aoColumns": columns, + "aoColumnDefs": columns_def, + "deferRender": true, + "fixedColumns": true, + "stateSave": true, + "stateSaveParams": function (settings, data) { + //紀錄該頁是否有篩選Filter + if ($(".column_filter")) { + let saveFilterArr = []; + + $(".column_filter input:checkbox:checked").each(function (i, v) { + let id = $(v)[0].id; + saveFilterArr.push(id); + }) + data.CustomFilter = JSON.stringify(saveFilterArr); //把勾選的篩選儲存到datatable state + } + }, + "scrollX": true, + "scrollY": "700px", + "scrollCollapse": true, + "autoWidth": true, + //"sScrollY": "480px", + "orderMulti": true, + "bServerSide": true, + "header": "#liaison_header", + "initComplete": initComplete, + "drawCallback": fnDrawCallBack, + "rowGroup": rowGroup, + "rowsGroup": rowsGroup, + + }; + if (order) { + oTable.order = order; + } + if (dom) { + oTable.dom = dom; + } + + let time = 0; + + table = $(tag).DataTable(oTable); + $.fn.DataTable.ext.pager.numbers_length = 9; + + console.log($.fn.DataTable.ext.pager) + table.on('processing', function (e, settings, processing) { + //過100ms的讀取才秀出loading + setTimeout(function () { + time == 1 ? loadingSetting("show", "pageload") : ""; + }, 100); + + if (processing && time == 0) { //第一次讀取processing = true + time = 1; + } else if (!processing && time == 1 && tableStatus != 2){ //結束讀取後processing = false + loadingSetting("hide", "pageload"); + time = 0; + } + }) + + table.on('xhr', function (e, settings, json, xhr) { + console.log("讀取列表", json.aaData); + + }) + + table.on('page', function (e, setting) { + $(`${tag}_wrapper .dataTables_scrollBody`).scrollTop(0); + pageScrollPos = 0; + }) + } + catch (e) { + console.error(e); + } + + return table; +} + +YourTeam.JqDataTables.getTableByOdata = fnInitJqDataTablesOdata; +YourTeam.JqDataTables.getTableByAjax = fnInitJqDataTablesAjax; +YourTeam.JqDataTables.getTableByServerSideAjax = fnInitJqDataTablesServerSideAjax; +YourTeam.JqDataTables.getTableByStatic = fnInitJqDataTablesNoData; +YourTeam.JqDataTables.getTableByNoAjax = fnInitJqDataTables; + +/* @deprecated since version 1.1 +* @description add one new row with the jq datatables +* @param {Object} table the jq datatables +* @param {Object} item one JSON item with the data Object +* @param {Object} data the data Object +* @return +* @author Darren Chen +* @date 2020/12/11 +*/ +function fnJqDataTablesNewRow(table, itemSpace) { + let isSuccess = false; + try { + table.row.add(itemSpace).draw(false); + } + catch (e) { + console.error(e); + return isSuccess; + } + return isSuccess; +} +YourTeam.JqDataTables.newRow = fnJqDataTablesNewRow; + +/* @deprecated since version 1.1 +* @description add one row and data with the jq datatables +* @param {Object} table the jq datatables +* @param {Object} item one JSON item with the data Object +* @param {Object} data the data Object +* @return +* @author Darren Chen +* @date 2020/12/11 +*/ +function fnJqDataTablesAddRow(table, item) { + let isSuccess = false; + try { + if (table && item) { + table.row.add(item).draw(false); + } + } + catch (e) { + console.error(e); + return isSuccess; + } + return isSuccess; +} +YourTeam.JqDataTables.addRow = fnJqDataTablesAddRow; + +/* @deprecated since version 1.1 +* @description remove one row and data with the jq datatables +* @param {String} tableId the datatables`s id +* @param {String} elementSelector the jq selector with remove row element +* @return {Bollean} isSuccess +* @author Darren Chen +* @date 2020/12/11 +*/ +function fnJqDataTablesRemoveRow(tableId, elementSelector) { + let isSuccess = false; + try { + $('#' + tableId + ' tbody').on('click', elementSelector, function () { + table.row($(this).parents('tr')).remove().draw(false); + }); + isSuccess = true; + } + catch (e) { + console.error(e); + return isSuccess; + } + return isSuccess; +} +YourTeam.JqDataTables.removeRow = fnJqDataTablesRemoveRow; + +/* @deprecated since version 0.3 +* @description display buton +* @param {Boolean} have create power? +* @param {Boolean} have edit power? +* @param {Boolean} have delete power? +* @param {Boolean} have print power? +* @return {String} +* @author Darren Chen +* @date 2018/04/18 +*/ +function showControlItem(Create, Edit, Delete, Print) { + if (Create) { + $("#btnCreat").show(); + $("#ERP_insert").show(); + } + else { + $("#btnCreat").hide(); + $("#ERP_insert").hide(); + } + if (Edit) { + $("a.green").show(); + $("#date_check").show(); + } + else { + $("a.green").hide(); + $("#date_check").hide(); + } + if (Delete) { + $("#checkDelete").show(); + $("#date_check").show(); + $("a.red").show(); + } + else { + $("#checkDelete").hide(); + $("#date_check").hide(); + $("a.red").hide(); + } + if (Print) { + $("a[name='print']").show(); + } + else { + $("a[name='print']").hide(); + } +} + +let hide_star = "********"; + +/* @deprecated since version 0.2 +* @description replace the field +* @param {String} the element id +* @param {Boolean} ready only +* @author Darren Chen +* @date 2018/04/18 +*/ +function hide_field(tag, is_readonly = null) { + var text = ""; + $(tag).each(function () { + if ($(this).prop("tagName").toLowerCase() === "input") { + text = $(this).val().toString(); + if (text === "-999999999") { + $(this).val(hide_star); + } + } + else if ($(this).prop("tagName").toLowerCase() === "div") { + text = $(this).text().toString(); + if (text === "-999999999") { + $(this).text(hide_star); + } + } + else if ($(this).prop("tagName").toLowerCase() === "td") { + text = $(this).text().toString(); + if (text === "-999999999") { + $(this).text(hide_star); + } + } + if (is_readonly) { + $(this).prop("readonly", true); + } + }); +} + +/* @deprecated since version 0.1 +* @description 阻止ServerSide Datatable 在特定時間內傳出大量值 +* @author JunHao Lin +* @date 2021/12/22 +*/ +function serverSideExecLimit() { + let lastTime; + $($.fn.dataTable.tables(true)).on('order.dt page.dt search.dt xhr.dt', function (e, settings, ordArr) { + + //排序時Callback會回傳兩次,所以判斷時間差只抓取一次 + //(時間差之內的排序執行 || 換頁執行 || 搜尋執行) + if (settings.oInit.bServerSide == true) { + if (((e.timeStamp - lastTime <= 300 && (e.handleObj.origType == "order") || e.handleObj.origType == "page" || e.handleObj.origType == "search")) && settings.oAjaxData != undefined && (settings.oAjaxData).length != 0) { + + if (tableStatus == 0) { //tableStatus = 0 | 還沒觸發執行 + tableStatus = 1 //tableStatus = 1 | 已觸發執行,可接受執行 + calEventTime = setInterval(function () { //計數五秒 + if (timeNum == 5) { //若到第五秒 + pageEventNum = searchEventNum = orderEventNum = 0 //執行次數復歸 + timeNum = 0 //秒數歸零 + tableStatus = 0 //狀態復歸 + clearInterval(calEventTime) //計數關閉 + } + timeNum++; //秒數++ + }, 1000) + } + //在五秒之內,排序執行超過五次 + if (timeNum < 5 && orderEventNum >= 5 && e.handleObj.origType == "order" && tableStatus == 1) { + tableStatus = 2; + } + //在五秒之內,搜尋執行超過五次 + if (timeNum < 5 && searchEventNum >= 10 && e.handleObj.origType == "search" && tableStatus == 1) { + tableStatus = 2; + } + //在五秒之內,換頁執行超過五次 + if (timeNum < 5 && pageEventNum >= 5 && e.handleObj.origType == "page" && tableStatus == 1) { + tableStatus = 2; + } + //執行次數++ + switch (e.handleObj.origType) { + case "order": + orderEventNum++; + break; + case "search": + searchEventNum++; + break; + case "page": + pageEventNum++; + break; + } + + //tableStatus = 2 | 已觸發執行,不可接受執行(超出執行條件) + if (tableStatus == 2) { + showAlert("danger", "執行次數過多!") + loadingSetting("show","dtServerSide"); //出現loading + setTimeout(function () { + loadingSetting("hide", "dtServerSide"); + pageEventNum = searchEventNum = orderEventNum = 0 //執行次數復歸 + timeNum = 0 //秒數歸零 + tableStatus = 0 //狀態復歸 + clearInterval(calEventTime) //計數關閉 + }, 5000) + } + } + } + lastTime = e.timeStamp; //時間差 + + }).DataTable() +} +YourTeam.JqDataTables.limitServerSideExec = serverSideExecLimit; + +function sortNumbersIgnoreText(a, b, high) { + var reg = /[+-]?((\d+(\.\d*)?)|\.\d+)([eE][+-]?[0-9]+)?/; + a = a.match(reg); + a = a !== null ? parseFloat(a[0]) : high; + b = b.match(reg); + b = b !== null ? parseFloat(b[0]) : high; + return ((a < b) ? -1 : ((a > b) ? 1 : 0)); +} +jQuery.extend(jQuery.fn.dataTableExt.oSort, { + "sort-numbers-ignore-text-asc": function (a, b) { + return sortNumbersIgnoreText(a, b, Number.POSITIVE_INFINITY); + }, + "sort-numbers-ignore-text-desc": function (a, b) { + return sortNumbersIgnoreText(a, b, Number.NEGATIVE_INFINITY) * -1; + } +}); diff --git a/Frontend/js/yourteam/yourteam.utility.class.js b/Frontend/js/yourteam/yourteam.utility.class.js new file mode 100644 index 0000000..1266ee7 --- /dev/null +++ b/Frontend/js/yourteam/yourteam.utility.class.js @@ -0,0 +1,946 @@ +var YourTeam = YourTeam || {}; +YourTeam.Utility = YourTeam.Utility || {}; +class UrlHelper { + constructor() { + } + /* @deprecated since version 0.2 + * @description get the param value + * @param {String} sName url param name + * @return {String} + * @author Darren Chen + * @date 2018/04/18 + */ + param = function (sName) { + this._sName = sName; + let sReg = new RegExp("(^|&)" + _sName + "=([^&]*)(&|$)"); //創建一個含有目標参数的正則表達式對象 + let sMatchTarget = window.location.search.substr(1).match(sReg); //匹配目標参數 + if (sMatchTarget !== null) { + return unescape(sMatchTarget[2]); + } + return null; //返回参數值 + } + /* @deprecated since version 0.2 + * @description get the param value form the page`s url + * @param {String} sName url param name + * @param {String} sPageName url page name + * @return {String} + * @author Darren Chen + * @date 2018/04/18 + */ + paramForPage = function (sName, sPageName) { + this.prototype = fnGetUrlParam; + let str = this.prototype(sName); + this._sPageName = sPageName; + if (str !== null && window.location.href.indexOf(_sPageName) !== -1) { + return str; + } + //if (location.pathname) { + // var sReg = new RegExp("(^|&)" + sName + "=([^&]*)(&|$)"); //創建一個含有目標参数的正則表達式對象 + // var sMatchTarget = window.location.search.substr(1).match(sReg); //匹配目標参數 + // if (sMatchTarget !== null && window.location.href.indexOf(sPageName) !== -1) { + // return unescape(sMatchTarget[2]); + // } + //} + return null; //返回参數值 + } +} +YourTeam.Utility.Url = YourTeam.Utility.Url || UrlHelper; + +class UIOperat { + constructor() { + } + /* @deprecated since version 0.1 + * @description disabled all element in the page (close out some element) + * @param {Array} aOutElementId close out element array + * @return + * @author Darren Chen + * @date 2018/04/22 + */ + disabledAllElement = function (aOutElementId) { + let aElement = document.getElementsByTagName("input"); + fnSetAllElementDisabled(aElement, aOutElementId); + + aElement = document.getElementsByTagName("textarea"); + fnSetAllElementDisabled(aElement, aOutElementId); + + aElement = document.getElementsByTagName("select"); + fnSetAllElementDisabled(aElement, aOutElementId); + + aElement = document.getElementsByTagName("button"); + fnSetAllElementDisabled(aElement, aOutElementId); + + //aElement = document.getElementsByTagName("label"); + //for (var i = 0; i < aElement.length; i++) { + // for (var ii = 0; ii < aOutElementId.length; ii++) { + // if (aElement[i] != aOutElementId[ii]) + // aElement[i].setAttribute("style", "pointer-events:none;display:block;"); + // } + //} + } + /* @deprecated since version 0.1 + * @description set all element disabled (close out some element) + * @param {Array} aElement element array + * @param {Array} aOutElementId close out element array + * @return + * @author Darren Chen + * @date 2018/04/22 + */ + setAllElementDisabled = function (aElement, aOutElementId) { + for (let i = 0; i < aElement.length; i++) { + + for (let ii = 0; ii < aOutElementId.length; ii++) { + if (aElement[i] !== aOutElementId[ii]) + aElement[i].disabled = true; + } + + } + } + + /* @deprecated since version 0.1 + * @description get checked checkboxs (array) for this project + * @param {string} checkBoxName the delete checkbox`s element name + * @return + * @author Darren Chen + * @date 2018/07/24 + */ + getCheckedArray(checkBoxName = "id") { + return $('input:checkbox[name=' + checkBoxName + ']:checked').map(function () { + return $(this).val(); + }).get(); + } +} +YourTeam.Utility.UIOperat = YourTeam.Utility.UIOperat || UIOperat; + +class UIData { + constructor() { + } + /* @deprecated since version 0.1 + * @description get checked checkboxs + * @param {String} checkBoxName the delete checkbox`s element name + * @return ex."551,676,991,188,457,125" + * @author Darren Chen + * @date 2018/07/24 + */ + checkBoxValueJoin = function (checkBoxName) { + return $('input:checkbox[name=' + checkBoxName + ']:checked').map(function () { + return $(this).val(); + }).get().join(','); + } + /* @deprecated since version 0.1 + * @description get checked checkboxs + * @param {String} checkBoxName the delete checkbox`s element name + * @return ex."551,676,991,188,457,125" + * @author Darren Chen + * @date 2018/07/24 + */ + checkBoxValueArray = function (checkBoxName) { + let ary = []; + $('input:checkbox[name=' + checkBoxName + ']:checked').each(function (index, element) { + ary.push($(element).val()); + }); + return ary; + } + /* @deprecated since version 0.1 + * @description Convrt Int To Float + * @param {String} number ori number + * @param {String} keepNum keep number after . + * @return {String} + * @author Darren Chen + * @date 2019/12/31 + */ + convrtIntToFloat = function (number, keepNum) { + let zeroNumber = fnPaddingRight("1", keepNum + 1, "0"); + zeroNumber = parseInt(zeroNumber); + return Math.round(parseFloat(number) * zeroNumber) / zeroNumber; + } + /* @deprecated since version 0.1 + * @description The string Padding Left char + * @param {String} str ori string + * @param {Number} lenght will get string`s lenght + * @param {String} add char + * @return {String} + * @author Darren Chen + * @date 2019/12/31 + */ + paddingLeft = function (str, lenght, char) { + if (str.length >= lenght) + return str; + else + return fnPaddingLeft(char + str, lenght); + } + /* @deprecated since version 0.1 + * @description The string Padding Right char + * @param {String} str ori string + * @param {Number} lenght will get string`s lenght + * @param {String} add char + * @return {String} + * @author Darren Chen + * @date 2019/12/31 + */ + paddingRight = function (str, lenght, char) { + if (str.length >= lenght) + return str; + else + return fnPaddingRight(str + char, lenght); + } +} +YourTeam.Utility.UIData = YourTeam.Utility.UIData || UIData; + +class CookieHelper { + constructor() { + } + /* @deprecated since version 0.1 + * @description Create a simple cookie (The duration is preset to 2 days) + * @param {String} name name with the cookie + * @param {String} value value with the cookie + * @return + * @author Darren Chen + * @date 2018/07/24 + */ + create = function (name, value) { + let expires = new Date(); + //有效時間保存 2 天 2*24*60*60*1000 + expires.setTime(expires.getTime() + 172800000); + document.cookie = name + "=" + escape(value) + ";expires=" + expires.toGMTString(); + } + /* @deprecated since version 0.1 + * @description Get the cookie value by cookie name + * @param {String} name name with the cookie + * @return {String} + * @author Darren Chen + * @date 2018/07/24 + */ + get(name) { + let arg = escape(name) + "="; + let nameLen = arg.length; + let cookieLen = document.cookie.length; + let i = 0; + while (i < cookieLen) { + let j = i + nameLen; + if (document.cookie.substring(i, j) === arg) return this.getByIndex(j); + i = document.cookie.indexOf(" ", i) + 1; + if (i === 0) break; + } + return null; + } + /* @deprecated since version 0.1 + * @description Get the cookie value by index + * @param {Number} index name with the cookie + * @return {String} + * @author Darren Chen + * @date 2018/07/24 + */ + getByIndex(startIndex) { + let endIndex = document.cookie.indexOf(";", startIndex); + if (endIndex === -1) endIndex = document.cookie.length; + return unescape(document.cookie.substring(startIndex, endIndex)); + } + + /* @deprecated since version 0.1 + * @description Remove the cookie by cookie name + * @param {String} name name with the cookie + * @return {Boolean} + * @author Darren Chen + * @date 2021/05/27 + */ + remove(name) { + document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"; + if (this.get(name) === null || this.get(name) === "undefined") { + return true; + } + return false; + } +} +YourTeam.Utility.Cookie = YourTeam.Utility.Cookie || CookieHelper; + +var mathHelperRandomNotRepeatNum = []; +class MathHelper { + constructor() { + } + /* + * @deprecated since version 0.1 + * @description 取得隨機值 + * @param {Number} min 最小值 + * @param {Number} max 最大值 + * @returns {Number} + */ + random(min, max) { + return Math.floor(Math.random() * max) + min; + } + + /* + * @deprecated since version 0.1 + * @description 取得GUID + * @param {String} str 分隔符號,預設值'-'。 + * @param {Boolean} isUpperCase 是否大寫,預設值true。 + * @returns {String} + */ + guid(str = null, isUpperCase = true) { + let strGuid = 'xxxxxxxx-xxxx-0xxx-yxyx-xxxxxxxxxxxx'; + if (str) { + strGuid = strGuid.replace('-', str); + } + strGuid = strGuid.replace(/[xy]/g, function (c) { + var string = Math.random() * 16 | 0, v = c === 'x' ? string : (string & 0x3 | 0x8); + return string.toString(16); + }); + if (isUpperCase) { + strGuid.toUpperCase(); + } + return strGuid; + } + /* + * @deprecated since version 0.1 + * @description 四捨五入取小數點後2位 + * @param {Number} num 數值 + * @returns {Number} + */ + roundRight2p(num) { + return +(Math.round(num + "e+2") + "e-2"); + } + /* + * @deprecated since version 0.1 + * @description 四捨五入取小數點後2位 + * @param {Number} num 數值 + * @returns {Number} + */ + roundRight2p2(num) { + let m = Number((Math.abs(num) * 100).toPrecision(15)); + return Math.round(m) / 100 * Math.sign(num); + } +} +YourTeam.Utility.Math = YourTeam.Utility.Math || MathHelper; + +class DateHelper { + constructor() { + } + /* + * @deprecated since version 0.1 + * @description 取得現在時間(yyyy-MM-dd) + * @param {Boolean} isTwYear it`s Taiwan year? + * @returns {String} + */ + getNow = function (isTwYear = false) { + let d = new Date(); + let year = isTwYear ? d.getFullYear() - 1911 : d.getFullYear(); + let month = d.getMonth() + 1; + let day = d.getDate(); + + let now = year + '-' + + (month < 10 ? '0' : '') + month + '-' + + (day < 10 ? '0' : '') + day; + + return now; + } + /* + * @deprecated since version 0.1 + * @description 取得日期時間(2020/02/02 PM 18:05:25) + * @param {Boolean} isTwYear it`s Taiwan year? + * @param {String} dateInterval 最小值 + * @param {Boolean} isPadZero 最大值 + * @param {Number} timeTagType 時間前戳標記 1:AM/PM 2:上午/下午 + * @returns {String} + */ + getNowHaveTimeTag = function (isTwYear = false, dateInterval = '/', isPadZero = true, timeTagType = 1) { + let now = new Date(); + let years = isTwYear ? now.getFullYear() - 1911 : now.getFullYear(); + let months = now.getMonth(); + let days = now.getDay(); + let hours = now.getHours(); + let minutes = now.getMinutes(); + let seconds = now.getSeconds(); + + let dateValue = years; + let timeValue = ((hours >= 12) ? "下午 " : "上午 "); + if (timeTagType === 2) timeValue = ((hours >= 12) ? "AM " : "PM "); + if (isPadZero) { + dateValue += (dateInterval + ((months < 10) ? "0" : "") + months); + dateValue += (dateInterval + ((days < 10) ? "0" : "") + days); + timeValue += ((hours > 12) ? "0" + (hours - 12) : hours); + timeValue += ((minutes < 10) ? ":0" : ":") + minutes; + timeValue += ((seconds < 10) ? ":0" : ":") + seconds; + } + else { + dateValue += (dateInterval + months); + dateValue += (dateInterval + days); + timeValue += ((hours > 12) ? hours - 12 : hours); + timeValue += minutes; + timeValue += seconds; + } + return dateValue + " " + timeValue; + } + /* + * @deprecated since version 0.1 + * @description 取得日期時間(2020/02/02 18:05:25) + * @param {Boolean} isTwYear it`s Taiwan year? + * @param {String} dateInterval 日期間隔字元 + * @param {Boolean} isPadZero 是否補0 + * @returns {String} 回傳時間字串 + */ + getNowChangeInterval = function (isTwYear = false, dateInterval = '/', isPadZero = true) { + let today = new Date(); + let year = isTwYear ? today.getFullYear() - 1911 : today.getFullYear(); + let currentDateTime = + year + dateInterval + ((isPadZero && today.getMonth() + 1 < 10) ? '0' : '') + + (today.getMonth() + 1) + dateInterval + ((isPadZero && today.getDate() < 10) ? '0' : '') + + today.getDate() + ' ' + ((isPadZero && today.getHours() < 10) ? '0' : '') + + today.getHours() + ':' + ((isPadZero && today.getMinutes() < 10) ? '0' : '') + + today.getMinutes(); + return currentDateTime; + } + /* + * @deprecated since version 0.1 + * @description 取得加減的日期時間(2020/02/02 18:05:25) + * @param {Boolean} isTwYear it`s Taiwan year? + * @param {String} dateInterval 日期間隔字元 + * @param {Boolean} isPadZero 是否補0 + * @returns {String} 回傳時間字串 + */ + getChangeDateTime(isTwYear = false, dateInterval = '/', addYears = 0, addMonths = 0, addDays = 0, isPadZero = true) { + let today = new Date(); + let year = isTwYear ? today.getFullYear() - 1911 : today.getFullYear(); + if (addYears > year || addMonths > today.getMonth() || addDays > today.getDate()) { + return false; + } + let date = + (year + addYears) + dateInterval + ((isPadZero && today.getMonth() + addMonths + 1 < 10) ? '0' : '') + + (today.getMonth() + addMonths + 1) + dateInterval + ((isPadZero && today.getDate() + addDays < 10) ? '0' : '') + + (today.getDate() + addDays); + return date; + } + /* + * @deprecated since version 0.1 + * @description 取得禮拜/週幾(禮拜五) + * @param {String} dayPreString 前置詞 (禮拜/週/周) + * @returns {String} 回傳時間字串 + */ + getWeekDay(dayPreString = "") { + let day = ""; + let day_list = ['日', '一', '二', '三', '四', '五', '六']; + + let today = new Date(); + let dayGet = today.getDay(); // or "new Date().getDay()"; + if (dayPreString === "") { + day = "(" + day_list[dayGet] + ")"; + } else { + day = dayPreString + day_list[dayGet]; + } + return day; + } + /* + * @deprecated since version 0.1 + * @description 取得月份天數 + * @param {Number} year 年份 (def null) + * @param {Number} month 月份 (def null) + * @returns {Number} 回傳月份天數 + */ + getMonthDayCount(year=null,month=null) { + let myYear = year; + let myMonth = month; + let myDate,myDayCount; + + if (!myYear) { + myYear = new Date().getFullYear(); + } + if (!myMonth) { + myMonth = new Date().getMonth(); + } + + //宣告日期物件 + myDate = new Date(myYear, myMonth+1, 0); + //取得天數 + myDayCount = myDate.getDate(); + + return daycount; + } + /* + * @deprecated since version 0.1 + * @description 取得月份最後一天的日期字串 + * @param {Number} year 年份 (def null) + * @param {Number} month 月份 (def null) + * @returns {String} 回傳月份天數字串 + */ + getMonthLastDateStr(year = null, month = null) { + let myYear = year; + let myMonth = month; + let daycount; + if (!myYear) { + myYear = new Date().getFullYear(); + } + if (!myMonth) { + myMonth = new Date().getMonth(); + } + daycount = this.getMonthDayCount(year, month); + let myMonthLastDate = myYear + "/" + + (myMonth < 10) ? "0" : "" + myMonth + "/" + + (daycount < 10) ? "0" : "" + daycount; + + return myMonthLastDate; + } +} +YourTeam.Utility.DateHelper = YourTeam.Utility.DateHelper || DateHelper; + +class File { + constructor() { + } + readAndPreviewImages(files, containerId, imgWidth = null, imgHeight = null, frontHtml = null, backHtml = null, funDoSomeThing = null, limitMaxSize = null, limitMinSize = 0,limitFun = null) { + let htmlImg = ""; + let container = document.getElementById(containerId); + let width = imgWidth ? imgWidth + "px" : "auto"; + let height = imgHeight ? imgHeight + "px" : "auto"; + let myMath = new YourTeam.Utility.Math(); + let myFile = new YourTeam.Utility.File(); + let strExtName = "",strOrgName=""; + for (let i = 0; i < files.length; i++) { + let file = files[i]; + if (limitMaxSize != null) { + if (file.size / 1024 < limitMinSize || file.size / 1024 > limitMaxSize) { + limitFun ? limitFun() : ""; + return false + } + } + htmlImg = ""; + if (/\.(jpe?g|png|gif)$/i.test(file.name)) { + + let reader = new FileReader(); + reader.addEventListener("load", function () { + let image = new Image(); + let src = this.result; + image.src = this.result; + + image.onload = function () { + strExtName = myFile.getFileExtension(file.name); + strOrgName = (strExtName === null || strExtName === "") ? file.name : file.name.replace('.' + strExtName, ''); + htmlImg = frontHtml + '' + + backHtml; + container.insertAdjacentHTML("afterBegin", htmlImg); + //$("[name=" + removeClickTagName + "]").on("click", function (e) { + // e.preventDefault(); + // $(this).closest(removeTag).remove(); + //}); + if (i === files.length - 1 && funDoSomeThing) { + funDoSomeThing(); + } + } + }); + reader.readAsDataURL(file); + } else { + if (showAlert) { + showAlert("danger", "只支援圖片格式"); + } + else { + alert("只支援圖片格式"); + } + } + } + } + + readAndPreviewFiles(files, containerId, imgWidth = null, imgHeight = null, frontHtml = null, backHtml = null, funDoSomeThing = null) { + let htmlImg = ""; + let container = document.getElementById(containerId); + let width = imgWidth ? imgWidth + "px" : "128px"; + let height = imgHeight ? imgHeight + "px" : "86px"; + let myMath = new YourTeam.Utility.Math(); + let myFile = new YourTeam.Utility.File(); + let strExtName = "", strOrgName = "", strSaveName = ""; + + for (let i = 0; i < files.length; i++) { + let file = files[i]; + htmlImg = ""; + //alert(/\.(xls?x|doc?x|ptt?x|pdf|zip|rar|7zip|txt|odt|xml|rtf|ods|odp|pps?x)$/i.test(file.name)); + if (/\.(xls?x|doc?x|ptt?x|pdf|zip|rar|7zip|txt|odt|xml|rtf|ods|odp|pps?x)$/i.test(file.name)) { + + if (file.size == 0) { //檔案大小為0時不會產生base64,需防呆 + showAlert("danger", "無法上傳大小為0的檔案"); + return false; + } + + //先新增a標籤 在套上src 可能解決多檔案上傳時無法讀取到最後上傳檔案的問題 + strSaveName = myMath.guid().replace(' ', ''); + strExtName = myFile.getFileExtension(file.name); + strOrgName = (strExtName === null || strExtName === "") ? file.name : file.name.replace('.' + strExtName, ''); + + htmlImg = frontHtml + '' + strOrgName + '.' + strExtName + '' + + backHtml; + container.insertAdjacentHTML("afterBegin", htmlImg); + let reader = new FileReader(); + + reader.addEventListener("load", function (event) { + $($(container).find("a")[i]).attr("href", this.result); + if (i === files.length - 1 && funDoSomeThing) { + funDoSomeThing(); + } + }); + reader.readAsDataURL(file); + + } else { + if (showAlert) { + showAlert("danger", "只支援文件格式"); + } else { + alert("只支援文件格式"); + } + } + } + } + async getBase64Image(path, callback) { + //生成canvas + var canvas = document.createElement('canvas'); + var ctx = canvas.getContext('2d'); + var img = new Image(); + img.src = path; + img.setAttribute("crossOrigin", "Anonymous"); + img.onload = await function () { + return new Promise((resolve) => { + //默認按比例壓縮 + var w = this.width, + h = this.height; + var quality = 0.95; // 默認圖片質量為0.7 + + // 創建屬性節點 + canvas.setAttribute("width", w); + canvas.setAttribute("height", h); + + ctx.drawImage(this, 0, 0, w, h); + // quality值越小,所繪制出的圖像越模糊 + var base64 = canvas.toDataURL('image/jpeg', quality); + // 回調函數返回base64的值 + callback(base64); + resolve(); + }) + }; + } + + getFileExtension(filename) { + return filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase(); + } +} +YourTeam.Utility.File = YourTeam.Utility.File || File; + + +/* @deprecated since version 0.1 +* @description jQuery Ajax Cors Setings (JSONP) +* @return +* @author Darren Chen +* @date 2018/07/24 +*/ +///// +//var script = document.createElement("script"); //Make a script DOM node +//script.src = "/Scripts/YourTeam/js/yourteam.jq.ajax.cors.js"; //Set it's src to the provided URL +//document.head.appendChild(script); //Add it to the end of the head section of the page (could change 'head' to 'body' to add it to the end of the body section instead) + +///* @deprecated since version 0.2 +//* @description get the param value +//* @param {String} sName url param name +//* @return {String} +//* @author Darren Chen +//* @date 2018/04/18 +//*/ +//function fnGetUrlParam(sName) { +// this._sName = sName; +// let sReg = new RegExp("(^|&)" + _sName + "=([^&]*)(&|$)"); //創建一個含有目標参数的正則表達式對象 +// let sMatchTarget = window.location.search.substr(1).match(sReg); //匹配目標参數 +// if (sMatchTarget !== null) { +// return unescape(sMatchTarget[2]); +// } +// return null; //返回参數值 +//} +///* @deprecated since version 0.2 +//* @description get the param value form the page`s url +//* @param {String} sName url param name +//* @param {String} sPageName url page name +//* @return {String} +//* @author Darren Chen +//* @date 2018/04/18 +//*/ +//function fnGetUrlParamForPage(sName, sPageName) { +// this.prototype = fnGetUrlParam; +// let str = this.prototype(sName); +// this._sPageName = sPageName; +// if (str !== null && window.location.href.indexOf(_sPageName) !== -1) { +// return str; +// } +// //if (location.pathname) { +// // var sReg = new RegExp("(^|&)" + sName + "=([^&]*)(&|$)"); //創建一個含有目標参数的正則表達式對象 +// // var sMatchTarget = window.location.search.substr(1).match(sReg); //匹配目標参數 +// // if (sMatchTarget !== null && window.location.href.indexOf(sPageName) !== -1) { +// // return unescape(sMatchTarget[2]); +// // } +// //} +// return null; //返回参數值 +//} +///* @deprecated since version 0.1 +//* @description disabled all element in the page (close out some element) +//* @param {Array} aOutElementId close out element array +//* @return +//* @author Darren Chen +//* @date 2018/04/22 +//*/ +//function fnDisabledAllElement(aOutElementId) { +// let aElement = document.getElementsByTagName("input"); +// fnSetAllElementDisabled(aElement, aOutElementId); + +// aElement = document.getElementsByTagName("textarea"); +// fnSetAllElementDisabled(aElement, aOutElementId); + +// aElement = document.getElementsByTagName("select"); +// fnSetAllElementDisabled(aElement, aOutElementId); + +// aElement = document.getElementsByTagName("button"); +// fnSetAllElementDisabled(aElement, aOutElementId); + +// //aElement = document.getElementsByTagName("label"); +// //for (var i = 0; i < aElement.length; i++) { +// // for (var ii = 0; ii < aOutElementId.length; ii++) { +// // if (aElement[i] != aOutElementId[ii]) +// // aElement[i].setAttribute("style", "pointer-events:none;display:block;"); +// // } +// //} +//} +///* @deprecated since version 0.1 +//* @description set all element disabled (close out some element) +//* @param {Array} aElement element array +//* @param {Array} aOutElementId close out element array +//* @return +//* @author Darren Chen +//* @date 2018/04/22 +//*/ +//function fnSetAllElementDisabled(aElement, aOutElementId) { +// for (let i = 0; i < aElement.length; i++) { + +// for (let ii = 0; ii < aOutElementId.length; ii++) { +// if (aElement[i] !== aOutElementId[ii]) +// aElement[i].disabled = true; +// } + +// } +//} +///* @deprecated since version 0.1 +//* @description get checked checkboxs +//* @param {String} checkBoxName the delete checkbox`s element name +//* @return +//* @author Darren Chen +//* @date 2018/07/24 +//*/ +//function fnGetCheckedValue(checkBoxName) { +// return $('input:checkbox[name=' + checkBoxName + ']:checked').map(function () { +// return $(this).val(); +// }).get().join(','); +//} +///* @deprecated since version 0.1 +//* @description Create a simple cookie (The duration is preset to 2 days) +//* @param {String} name name with the cookie +//* @param {String} value value with the cookie +//* @return +//* @author Darren Chen +//* @date 2018/07/24 +//*/ +//function fnCreateCookie(name, value) { +// let expires = new Date(); +// //有效時間保存 2 天 2*24*60*60*1000 +// expires.setTime(expires.getTime() + 172800000); +// document.cookie = name + "=" + escape(value) + ";expires=" + expires.toGMTString(); +//} +///* @deprecated since version 0.1 +//* @description Get the cookie value by cookie name +//* @param {String} name name with the cookie +//* @return +//* @author Darren Chen +//* @date 2018/07/24 +//*/ +//function fnGetCookie(name) { +// let arg = escape(name) + "="; +// let nameLen = arg.length; +// let cookieLen = document.cookie.length; +// let i = 0; +// while (i < cookieLen) { +// let j = i + nameLen; +// if (document.cookie.substring(i, j) === arg) return getCookieValueByIndex(j); +// i = document.cookie.indexOf(" ", i) + 1; +// if (i === 0) break; +// } +// return null; +//} +///* @deprecated since version 0.1 +//* @description Get the cookie value by index +//* @param {Number} index name with the cookie +//* @return +//* @author Darren Chen +//* @date 2018/07/24 +//*/ +//function fnGetCookieValueByIndex(startIndex) { +// let endIndex = document.cookie.indexOf(";", startIndex); +// if (endIndex === -1) endIndex = document.cookie.length; +// return unescape(document.cookie.substring(startIndex, endIndex)); +//} +///* +//* @deprecated since version 0.1 +//* @description 取得隨機值 +//* @param {Number} min 最小值 +//* @param {Number} max 最大值 +//* @returns {Number} +//*/ +//function fnGetRandom(min, max) { +// return Math.floor(Math.random() * max) + min; +//} +///* +// * @deprecated since version 0.1 +// * @description 取得現在時間(yyyy-MM-dd) +// * @param {Boolean} isTwYear it`s Taiwan year? +// * @returns {String} +// */ +//function fnGetNow(isTwYear = false) { +// let d = new Date(); +// let year = isTwYear ? d.getFullYear() - 1911 : d.getFullYear(); +// let month = d.getMonth() + 1; +// let day = d.getDate(); + +// let now = year + '-' + +// (month < 10 ? '0' : '') + month + '-' + +// (day < 10 ? '0' : '') + day; + +// return now; +//} +///* +// * @deprecated since version 0.1 +// * @description 取得日期時間(2020/02/02 PM 18:05:25) +// * @param {Boolean} isTwYear it`s Taiwan year? +// * @param {String} dateInterval 最小值 +// * @param {Boolean} isPadZero 最大值 +// * @param {Number} timeTagType 時間前戳標記 1:AM/PM 2:上午/下午 +// * @returns {String} +// */ +//function fnShowDateTimeNow(isTwYear = false, dateInterval = '/', isPadZero = true, timeTagType = 1) { +// let now = new Date(); +// let years = isTwYear ? now.getFullYear() - 1911 : now.getFullYear(); +// let months = now.getMonth(); +// let days = now.getDay(); +// let hours = now.getHours(); +// let minutes = now.getMinutes(); +// let seconds = now.getSeconds(); + +// let dateValue = years; +// let timeValue = ((hours >= 12) ? "下午 " : "上午 "); +// if (timeTagType === 2) timeValue = ((hours >= 12) ? "AM " : "PM "); +// if (isPadZero) { +// dateValue += (dateInterval + ((months < 10) ? "0" : "") + months); +// dateValue += (dateInterval + ((days < 10) ? "0" : "") + days); +// timeValue += ((hours > 12) ? "0" + (hours - 12) : hours); +// timeValue += ((minutes < 10) ? ":0" : ":") + minutes; +// timeValue += ((seconds < 10) ? ":0" : ":") + seconds; +// } +// else { +// dateValue += (dateInterval + months); +// dateValue += (dateInterval + days); +// timeValue += ((hours > 12) ? hours - 12 : hours); +// timeValue += minutes; +// timeValue += seconds; +// } +// return dateValue + " " + timeValue; +//} +///* +// * @deprecated since version 0.1 +// * @description 取得日期時間(2020/02/02 18:05:25) +// * @param {Boolean} isTwYear it`s Taiwan year? +// * @param {String} dateInterval 日期間隔字元 +// * @param {Boolean} isPadZero 是否補0 +// * @returns {string} 回傳時間字串 +// */ +//function fnGetDateTimeNow(isTwYear = false, dateInterval = '/', isPadZero = true) { +// let today = new Date(); +// let year = isTwYear ? today.getFullYear() - 1911 : today.getFullYear(); +// let currentDateTime = +// year + dateInterval + ((isPadZero && today.getMonth() + 1 < 10) ? '0' : '') + +// (today.getMonth() + 1) + dateInterval + ((isPadZero && today.getDate() < 10) ? '0' : '') + +// today.getDate() + ' ' + ((isPadZero && today.getHours() < 10) ? '0' : '') + +// today.getHours() + ':' + ((isPadZero && today.getMinutes() < 10) ? '0' : '') + +// today.getMinutes(); +// return currentDateTime; +//} +///* +// * @deprecated since version 0.1 +// * @description 取得加減的日期時間(2020/02/02 18:05:25) +// * @param {Boolean} isTwYear it`s Taiwan year? +// * @param {String} dateInterval 日期間隔字元 +// * @param {Boolean} isPadZero 是否補0 +// * @returns {string} 回傳時間字串 +// */ +//function fnGetDate(isTwYear = false, dateInterval = '/', addYears = 0, addMonths = 0, addDays = 0, isPadZero = true) { +// let today = new Date(); +// let year = isTwYear ? today.getFullYear() - 1911 : today.getFullYear(); +// if (addYears > year || addMonths > today.getMonth() || addDays > today.getDate()) { +// return false; +// } +// let date = +// (year + addYears) + dateInterval + ((isPadZero && today.getMonth() + addMonths + 1 < 10) ? '0' : '') + +// (today.getMonth() + addMonths + 1) + dateInterval + ((isPadZero && today.getDate() + addDays < 10) ? '0' : '') + +// (today.getDate() + addDays); +// return date; +//} +///* +// * @deprecated since version 0.1 +// * @description 取得禮拜/週幾(禮拜五) +// * @param {String} dayPreString 前置詞 (禮拜/週/周) +// * @returns {string} 回傳時間字串 +// */ +//function fnGetDay(dayPreString = "") { +// let day = ""; +// let day_list = ['日', '一', '二', '三', '四', '五', '六']; + +// let today = new Date(); +// let dayGet = today.getDay(); // or "new Date().getDay()"; +// if (dayPreString === "") { +// day = "(" + day_list[dayGet] + ")"; +// } else { +// day = dayPreString + day_list[dayGet]; +// } +// return day; +//} +///* @deprecated since version 0.1 +//* @description Convrt Int To Float +//* @param {String} number ori number +//* @param {String} keepNum keep number after . +//* @return {String} +//* @author Darren Chen +//* @date 2019/12/31 +//*/ +//function fnConvrtIntToFloat(number, keepNum) { +// let zeroNumber = fnPaddingRight("1", keepNum + 1, "0"); +// zeroNumber = parseInt(zeroNumber); +// return Math.round(parseFloat(number) * zeroNumber) / zeroNumber; +//} +///* @deprecated since version 0.1 +//* @description The string Padding Left char +//* @param {String} str ori string +//* @param {Number} lenght will get string`s lenght +//* @param {String} add char +//* @return {String} +//* @author Darren Chen +//* @date 2019/12/31 +//*/ +//function fnPaddingLeft(str, lenght, char) { +// if (str.length >= lenght) +// return str; +// else +// return fnPaddingLeft(char + str, lenght); +//} +///* @deprecated since version 0.1 +//* @description The string Padding Right char +//* @param {String} str ori string +//* @param {Number} lenght will get string`s lenght +//* @param {String} add char +//* @return {String} +//* @author Darren Chen +//* @date 2019/12/31 +//*/ +//function fnPaddingRight(str, lenght, char) { +// if (str.length >= lenght) +// return str; +// else +// return fnPaddingRight(str + char, lenght); +//} + + + +
"); + data = data.replace(/\n|\n\n/gm, "
/gm, ""); + data = data.replace(/<\/p>/gm, "\n"); + data = data.replace(/ /gm, " "); + data = data.replace(/ /gm, " "); + data = data.replace(/ /gm, " "); + return data; +} \ No newline at end of file diff --git a/Frontend/js/yourteam/yourteam.jquery.datatables.js b/Frontend/js/yourteam/yourteam.jquery.datatables.js new file mode 100644 index 0000000..1023322 --- /dev/null +++ b/Frontend/js/yourteam/yourteam.jquery.datatables.js @@ -0,0 +1,644 @@ +var YourTeam = YourTeam || {}; +YourTeam.JqDataTables = YourTeam.JqDataTables || {}; +/* @deprecated since version 0.2 +* @description change datatables prototype language +* @author Darren Chen +* @date 2018/04/18 +*/ +$.fn.dataTable.defaults.oLanguage = { + "sProcessing": "等待中...", + "sLengthMenu": "顯示 _MENU_ 項結果", + "sZeroRecords": "沒有匹配結果", + "sInfo": "顯示第 _START_ 至 _END_ 項結果,共 _TOTAL_ 項", + "sInfoEmpty": "顯示第 0 至 0 項結果,共 0 項", + "sInfoFiltered": "(由 _MAX_ 項結果過濾)", + "sInfoPostFix": "", + "sSearch": "搜索:", + "sUrl": "", + "sThousands": "", + "sEmptyTable": "表中數據為空", + "sLoadingRecords": "載入中...", + "sInfoThousands": ",", + "oPaginate": { + "sFirst": "首頁", + "sPrevious": "上頁", + "sNext": "下頁", + "sLast": "末頁" + }, + "oAria": { + "sSortAscending": ": 以升序排列此列", + "sSortDescending": ": 以降序排列此列" + } +}; + +/* @deprecated since version 0.1 +* @description init the jq datatables no data with the page ui +* @param {String} tag jq datatables id(#id) or class(.class) +* @param {Array} colnum_defs these is colnum def. with init the table +* @param {function} initComplete after init complete run a function +* @param {function} drawCallback after draw complete run a function +* @author Darren Chen +* @date 2020/12/10 +*/ +function fnInitJqDataTablesNoData(tag, dataSet = null, columns = null, columnDefs = null, initComplete = null, drawCallback = null, rowsGroup = null, rowGroup = null, dom = '<"toolbar">frtipl' ) { + let fnDrawCallBack = function () { + drawCallback != null ? drawCallback() : ""; + let api = this.api(); + $(".dataTables_scrollBody").css("overflow", "auto"); + if (api.rows().data().length <= 1) { + $(".dataTables_scrollBody").css("overflow", "visible"); + } + } + let table = null; + let oTable = { + "sDom": dom, + "data": dataSet, + "autoWidth": true, + "processing": true, + "columns": columns, + "aoColumnDefs": columnDefs, + "stateSave": true, + "pagingType": "full_numbers_custom", + "destroy": false, + "initComplete": initComplete, + "drawCallback": fnDrawCallBack, + "rowsGroup": rowsGroup, + "rowGroup": rowGroup, + "retrieve": true, + "responsive": { + details: { + + target: '.dt-mobile-btn', + type: "column", + renderer: function (api, rowIdx, columns) { + var data = $.map(columns, function (col, i) { + return col.hidden ? + '