Path: blob/master/sites/whatsapp-phishing/vendor/bootstrap/js/bootstrap.js
739 views
/*!1* Bootstrap v4.0.0-beta (https://getbootstrap.com)2* Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)3* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)4*/56if (typeof jQuery === 'undefined') {7throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')8}910(function ($) {11var version = $.fn.jquery.split(' ')[0].split('.')12if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {13throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')14}15})(jQuery);1617(function () {18var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };1920var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();2122function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }2324function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }2526function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }2728/**29* --------------------------------------------------------------------------30* Bootstrap (v4.0.0-beta): util.js31* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)32* --------------------------------------------------------------------------33*/3435var Util = function ($) {3637/**38* ------------------------------------------------------------------------39* Private TransitionEnd Helpers40* ------------------------------------------------------------------------41*/4243var transition = false;4445var MAX_UID = 1000000;4647var TransitionEndEvent = {48WebkitTransition: 'webkitTransitionEnd',49MozTransition: 'transitionend',50OTransition: 'oTransitionEnd otransitionend',51transition: 'transitionend'5253// shoutout AngusCroll (https://goo.gl/pxwQGp)54};function toType(obj) {55return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();56}5758function isElement(obj) {59return (obj[0] || obj).nodeType;60}6162function getSpecialTransitionEndEvent() {63return {64bindType: transition.end,65delegateType: transition.end,66handle: function handle(event) {67if ($(event.target).is(this)) {68return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params69}70return undefined;71}72};73}7475function transitionEndTest() {76if (window.QUnit) {77return false;78}7980var el = document.createElement('bootstrap');8182for (var name in TransitionEndEvent) {83if (el.style[name] !== undefined) {84return {85end: TransitionEndEvent[name]86};87}88}8990return false;91}9293function transitionEndEmulator(duration) {94var _this = this;9596var called = false;9798$(this).one(Util.TRANSITION_END, function () {99called = true;100});101102setTimeout(function () {103if (!called) {104Util.triggerTransitionEnd(_this);105}106}, duration);107108return this;109}110111function setTransitionEndSupport() {112transition = transitionEndTest();113114$.fn.emulateTransitionEnd = transitionEndEmulator;115116if (Util.supportsTransitionEnd()) {117$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();118}119}120121/**122* --------------------------------------------------------------------------123* Public Util Api124* --------------------------------------------------------------------------125*/126127var Util = {128129TRANSITION_END: 'bsTransitionEnd',130131getUID: function getUID(prefix) {132do {133// eslint-disable-next-line no-bitwise134prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here135} while (document.getElementById(prefix));136return prefix;137},138getSelectorFromElement: function getSelectorFromElement(element) {139var selector = element.getAttribute('data-target');140if (!selector || selector === '#') {141selector = element.getAttribute('href') || '';142}143144try {145var $selector = $(selector);146return $selector.length > 0 ? selector : null;147} catch (error) {148return null;149}150},151reflow: function reflow(element) {152return element.offsetHeight;153},154triggerTransitionEnd: function triggerTransitionEnd(element) {155$(element).trigger(transition.end);156},157supportsTransitionEnd: function supportsTransitionEnd() {158return Boolean(transition);159},160typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {161for (var property in configTypes) {162if (configTypes.hasOwnProperty(property)) {163var expectedTypes = configTypes[property];164var value = config[property];165var valueType = value && isElement(value) ? 'element' : toType(value);166167if (!new RegExp(expectedTypes).test(valueType)) {168throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));169}170}171}172}173};174175setTransitionEndSupport();176177return Util;178}(jQuery);179180/**181* --------------------------------------------------------------------------182* Bootstrap (v4.0.0-beta): alert.js183* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)184* --------------------------------------------------------------------------185*/186187var Alert = function ($) {188189/**190* ------------------------------------------------------------------------191* Constants192* ------------------------------------------------------------------------193*/194195var NAME = 'alert';196var VERSION = '4.0.0-beta';197var DATA_KEY = 'bs.alert';198var EVENT_KEY = '.' + DATA_KEY;199var DATA_API_KEY = '.data-api';200var JQUERY_NO_CONFLICT = $.fn[NAME];201var TRANSITION_DURATION = 150;202203var Selector = {204DISMISS: '[data-dismiss="alert"]'205};206207var Event = {208CLOSE: 'close' + EVENT_KEY,209CLOSED: 'closed' + EVENT_KEY,210CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY211};212213var ClassName = {214ALERT: 'alert',215FADE: 'fade',216SHOW: 'show'217218/**219* ------------------------------------------------------------------------220* Class Definition221* ------------------------------------------------------------------------222*/223224};225var Alert = function () {226function Alert(element) {227_classCallCheck(this, Alert);228229this._element = element;230}231232// getters233234// public235236Alert.prototype.close = function close(element) {237element = element || this._element;238239var rootElement = this._getRootElement(element);240var customEvent = this._triggerCloseEvent(rootElement);241242if (customEvent.isDefaultPrevented()) {243return;244}245246this._removeElement(rootElement);247};248249Alert.prototype.dispose = function dispose() {250$.removeData(this._element, DATA_KEY);251this._element = null;252};253254// private255256Alert.prototype._getRootElement = function _getRootElement(element) {257var selector = Util.getSelectorFromElement(element);258var parent = false;259260if (selector) {261parent = $(selector)[0];262}263264if (!parent) {265parent = $(element).closest('.' + ClassName.ALERT)[0];266}267268return parent;269};270271Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {272var closeEvent = $.Event(Event.CLOSE);273274$(element).trigger(closeEvent);275return closeEvent;276};277278Alert.prototype._removeElement = function _removeElement(element) {279var _this2 = this;280281$(element).removeClass(ClassName.SHOW);282283if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {284this._destroyElement(element);285return;286}287288$(element).one(Util.TRANSITION_END, function (event) {289return _this2._destroyElement(element, event);290}).emulateTransitionEnd(TRANSITION_DURATION);291};292293Alert.prototype._destroyElement = function _destroyElement(element) {294$(element).detach().trigger(Event.CLOSED).remove();295};296297// static298299Alert._jQueryInterface = function _jQueryInterface(config) {300return this.each(function () {301var $element = $(this);302var data = $element.data(DATA_KEY);303304if (!data) {305data = new Alert(this);306$element.data(DATA_KEY, data);307}308309if (config === 'close') {310data[config](this);311}312});313};314315Alert._handleDismiss = function _handleDismiss(alertInstance) {316return function (event) {317if (event) {318event.preventDefault();319}320321alertInstance.close(this);322};323};324325_createClass(Alert, null, [{326key: 'VERSION',327get: function get() {328return VERSION;329}330}]);331332return Alert;333}();334335/**336* ------------------------------------------------------------------------337* Data Api implementation338* ------------------------------------------------------------------------339*/340341$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));342343/**344* ------------------------------------------------------------------------345* jQuery346* ------------------------------------------------------------------------347*/348349$.fn[NAME] = Alert._jQueryInterface;350$.fn[NAME].Constructor = Alert;351$.fn[NAME].noConflict = function () {352$.fn[NAME] = JQUERY_NO_CONFLICT;353return Alert._jQueryInterface;354};355356return Alert;357}(jQuery);358359/**360* --------------------------------------------------------------------------361* Bootstrap (v4.0.0-beta): button.js362* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)363* --------------------------------------------------------------------------364*/365366var Button = function ($) {367368/**369* ------------------------------------------------------------------------370* Constants371* ------------------------------------------------------------------------372*/373374var NAME = 'button';375var VERSION = '4.0.0-beta';376var DATA_KEY = 'bs.button';377var EVENT_KEY = '.' + DATA_KEY;378var DATA_API_KEY = '.data-api';379var JQUERY_NO_CONFLICT = $.fn[NAME];380381var ClassName = {382ACTIVE: 'active',383BUTTON: 'btn',384FOCUS: 'focus'385};386387var Selector = {388DATA_TOGGLE_CARROT: '[data-toggle^="button"]',389DATA_TOGGLE: '[data-toggle="buttons"]',390INPUT: 'input',391ACTIVE: '.active',392BUTTON: '.btn'393};394395var Event = {396CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,397FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)398399/**400* ------------------------------------------------------------------------401* Class Definition402* ------------------------------------------------------------------------403*/404405};406var Button = function () {407function Button(element) {408_classCallCheck(this, Button);409410this._element = element;411}412413// getters414415// public416417Button.prototype.toggle = function toggle() {418var triggerChangeEvent = true;419var addAriaPressed = true;420var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];421422if (rootElement) {423var input = $(this._element).find(Selector.INPUT)[0];424425if (input) {426if (input.type === 'radio') {427if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {428triggerChangeEvent = false;429} else {430var activeElement = $(rootElement).find(Selector.ACTIVE)[0];431432if (activeElement) {433$(activeElement).removeClass(ClassName.ACTIVE);434}435}436}437438if (triggerChangeEvent) {439if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {440return;441}442input.checked = !$(this._element).hasClass(ClassName.ACTIVE);443$(input).trigger('change');444}445446input.focus();447addAriaPressed = false;448}449}450451if (addAriaPressed) {452this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));453}454455if (triggerChangeEvent) {456$(this._element).toggleClass(ClassName.ACTIVE);457}458};459460Button.prototype.dispose = function dispose() {461$.removeData(this._element, DATA_KEY);462this._element = null;463};464465// static466467Button._jQueryInterface = function _jQueryInterface(config) {468return this.each(function () {469var data = $(this).data(DATA_KEY);470471if (!data) {472data = new Button(this);473$(this).data(DATA_KEY, data);474}475476if (config === 'toggle') {477data[config]();478}479});480};481482_createClass(Button, null, [{483key: 'VERSION',484get: function get() {485return VERSION;486}487}]);488489return Button;490}();491492/**493* ------------------------------------------------------------------------494* Data Api implementation495* ------------------------------------------------------------------------496*/497498$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {499event.preventDefault();500501var button = event.target;502503if (!$(button).hasClass(ClassName.BUTTON)) {504button = $(button).closest(Selector.BUTTON);505}506507Button._jQueryInterface.call($(button), 'toggle');508}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {509var button = $(event.target).closest(Selector.BUTTON)[0];510$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));511});512513/**514* ------------------------------------------------------------------------515* jQuery516* ------------------------------------------------------------------------517*/518519$.fn[NAME] = Button._jQueryInterface;520$.fn[NAME].Constructor = Button;521$.fn[NAME].noConflict = function () {522$.fn[NAME] = JQUERY_NO_CONFLICT;523return Button._jQueryInterface;524};525526return Button;527}(jQuery);528529/**530* --------------------------------------------------------------------------531* Bootstrap (v4.0.0-beta): carousel.js532* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)533* --------------------------------------------------------------------------534*/535536var Carousel = function ($) {537538/**539* ------------------------------------------------------------------------540* Constants541* ------------------------------------------------------------------------542*/543544var NAME = 'carousel';545var VERSION = '4.0.0-beta';546var DATA_KEY = 'bs.carousel';547var EVENT_KEY = '.' + DATA_KEY;548var DATA_API_KEY = '.data-api';549var JQUERY_NO_CONFLICT = $.fn[NAME];550var TRANSITION_DURATION = 600;551var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key552var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key553var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch554555var Default = {556interval: 5000,557keyboard: true,558slide: false,559pause: 'hover',560wrap: true561};562563var DefaultType = {564interval: '(number|boolean)',565keyboard: 'boolean',566slide: '(boolean|string)',567pause: '(string|boolean)',568wrap: 'boolean'569};570571var Direction = {572NEXT: 'next',573PREV: 'prev',574LEFT: 'left',575RIGHT: 'right'576};577578var Event = {579SLIDE: 'slide' + EVENT_KEY,580SLID: 'slid' + EVENT_KEY,581KEYDOWN: 'keydown' + EVENT_KEY,582MOUSEENTER: 'mouseenter' + EVENT_KEY,583MOUSELEAVE: 'mouseleave' + EVENT_KEY,584TOUCHEND: 'touchend' + EVENT_KEY,585LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,586CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY587};588589var ClassName = {590CAROUSEL: 'carousel',591ACTIVE: 'active',592SLIDE: 'slide',593RIGHT: 'carousel-item-right',594LEFT: 'carousel-item-left',595NEXT: 'carousel-item-next',596PREV: 'carousel-item-prev',597ITEM: 'carousel-item'598};599600var Selector = {601ACTIVE: '.active',602ACTIVE_ITEM: '.active.carousel-item',603ITEM: '.carousel-item',604NEXT_PREV: '.carousel-item-next, .carousel-item-prev',605INDICATORS: '.carousel-indicators',606DATA_SLIDE: '[data-slide], [data-slide-to]',607DATA_RIDE: '[data-ride="carousel"]'608609/**610* ------------------------------------------------------------------------611* Class Definition612* ------------------------------------------------------------------------613*/614615};616var Carousel = function () {617function Carousel(element, config) {618_classCallCheck(this, Carousel);619620this._items = null;621this._interval = null;622this._activeElement = null;623624this._isPaused = false;625this._isSliding = false;626627this.touchTimeout = null;628629this._config = this._getConfig(config);630this._element = $(element)[0];631this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];632633this._addEventListeners();634}635636// getters637638// public639640Carousel.prototype.next = function next() {641if (!this._isSliding) {642this._slide(Direction.NEXT);643}644};645646Carousel.prototype.nextWhenVisible = function nextWhenVisible() {647// Don't call next when the page isn't visible648if (!document.hidden) {649this.next();650}651};652653Carousel.prototype.prev = function prev() {654if (!this._isSliding) {655this._slide(Direction.PREV);656}657};658659Carousel.prototype.pause = function pause(event) {660if (!event) {661this._isPaused = true;662}663664if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {665Util.triggerTransitionEnd(this._element);666this.cycle(true);667}668669clearInterval(this._interval);670this._interval = null;671};672673Carousel.prototype.cycle = function cycle(event) {674if (!event) {675this._isPaused = false;676}677678if (this._interval) {679clearInterval(this._interval);680this._interval = null;681}682683if (this._config.interval && !this._isPaused) {684this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);685}686};687688Carousel.prototype.to = function to(index) {689var _this3 = this;690691this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];692693var activeIndex = this._getItemIndex(this._activeElement);694695if (index > this._items.length - 1 || index < 0) {696return;697}698699if (this._isSliding) {700$(this._element).one(Event.SLID, function () {701return _this3.to(index);702});703return;704}705706if (activeIndex === index) {707this.pause();708this.cycle();709return;710}711712var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;713714this._slide(direction, this._items[index]);715};716717Carousel.prototype.dispose = function dispose() {718$(this._element).off(EVENT_KEY);719$.removeData(this._element, DATA_KEY);720721this._items = null;722this._config = null;723this._element = null;724this._interval = null;725this._isPaused = null;726this._isSliding = null;727this._activeElement = null;728this._indicatorsElement = null;729};730731// private732733Carousel.prototype._getConfig = function _getConfig(config) {734config = $.extend({}, Default, config);735Util.typeCheckConfig(NAME, config, DefaultType);736return config;737};738739Carousel.prototype._addEventListeners = function _addEventListeners() {740var _this4 = this;741742if (this._config.keyboard) {743$(this._element).on(Event.KEYDOWN, function (event) {744return _this4._keydown(event);745});746}747748if (this._config.pause === 'hover') {749$(this._element).on(Event.MOUSEENTER, function (event) {750return _this4.pause(event);751}).on(Event.MOUSELEAVE, function (event) {752return _this4.cycle(event);753});754if ('ontouchstart' in document.documentElement) {755// if it's a touch-enabled device, mouseenter/leave are fired as756// part of the mouse compatibility events on first tap - the carousel757// would stop cycling until user tapped out of it;758// here, we listen for touchend, explicitly pause the carousel759// (as if it's the second time we tap on it, mouseenter compat event760// is NOT fired) and after a timeout (to allow for mouse compatibility761// events to fire) we explicitly restart cycling762$(this._element).on(Event.TOUCHEND, function () {763_this4.pause();764if (_this4.touchTimeout) {765clearTimeout(_this4.touchTimeout);766}767_this4.touchTimeout = setTimeout(function (event) {768return _this4.cycle(event);769}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);770});771}772}773};774775Carousel.prototype._keydown = function _keydown(event) {776if (/input|textarea/i.test(event.target.tagName)) {777return;778}779780switch (event.which) {781case ARROW_LEFT_KEYCODE:782event.preventDefault();783this.prev();784break;785case ARROW_RIGHT_KEYCODE:786event.preventDefault();787this.next();788break;789default:790return;791}792};793794Carousel.prototype._getItemIndex = function _getItemIndex(element) {795this._items = $.makeArray($(element).parent().find(Selector.ITEM));796return this._items.indexOf(element);797};798799Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) {800var isNextDirection = direction === Direction.NEXT;801var isPrevDirection = direction === Direction.PREV;802var activeIndex = this._getItemIndex(activeElement);803var lastItemIndex = this._items.length - 1;804var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;805806if (isGoingToWrap && !this._config.wrap) {807return activeElement;808}809810var delta = direction === Direction.PREV ? -1 : 1;811var itemIndex = (activeIndex + delta) % this._items.length;812813return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];814};815816Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {817var targetIndex = this._getItemIndex(relatedTarget);818var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]);819var slideEvent = $.Event(Event.SLIDE, {820relatedTarget: relatedTarget,821direction: eventDirectionName,822from: fromIndex,823to: targetIndex824});825826$(this._element).trigger(slideEvent);827828return slideEvent;829};830831Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {832if (this._indicatorsElement) {833$(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);834835var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];836837if (nextIndicator) {838$(nextIndicator).addClass(ClassName.ACTIVE);839}840}841};842843Carousel.prototype._slide = function _slide(direction, element) {844var _this5 = this;845846var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];847var activeElementIndex = this._getItemIndex(activeElement);848var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);849var nextElementIndex = this._getItemIndex(nextElement);850var isCycling = Boolean(this._interval);851852var directionalClassName = void 0;853var orderClassName = void 0;854var eventDirectionName = void 0;855856if (direction === Direction.NEXT) {857directionalClassName = ClassName.LEFT;858orderClassName = ClassName.NEXT;859eventDirectionName = Direction.LEFT;860} else {861directionalClassName = ClassName.RIGHT;862orderClassName = ClassName.PREV;863eventDirectionName = Direction.RIGHT;864}865866if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {867this._isSliding = false;868return;869}870871var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);872if (slideEvent.isDefaultPrevented()) {873return;874}875876if (!activeElement || !nextElement) {877// some weirdness is happening, so we bail878return;879}880881this._isSliding = true;882883if (isCycling) {884this.pause();885}886887this._setActiveIndicatorElement(nextElement);888889var slidEvent = $.Event(Event.SLID, {890relatedTarget: nextElement,891direction: eventDirectionName,892from: activeElementIndex,893to: nextElementIndex894});895896if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {897898$(nextElement).addClass(orderClassName);899900Util.reflow(nextElement);901902$(activeElement).addClass(directionalClassName);903$(nextElement).addClass(directionalClassName);904905$(activeElement).one(Util.TRANSITION_END, function () {906$(nextElement).removeClass(directionalClassName + ' ' + orderClassName).addClass(ClassName.ACTIVE);907908$(activeElement).removeClass(ClassName.ACTIVE + ' ' + orderClassName + ' ' + directionalClassName);909910_this5._isSliding = false;911912setTimeout(function () {913return $(_this5._element).trigger(slidEvent);914}, 0);915}).emulateTransitionEnd(TRANSITION_DURATION);916} else {917$(activeElement).removeClass(ClassName.ACTIVE);918$(nextElement).addClass(ClassName.ACTIVE);919920this._isSliding = false;921$(this._element).trigger(slidEvent);922}923924if (isCycling) {925this.cycle();926}927};928929// static930931Carousel._jQueryInterface = function _jQueryInterface(config) {932return this.each(function () {933var data = $(this).data(DATA_KEY);934var _config = $.extend({}, Default, $(this).data());935936if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {937$.extend(_config, config);938}939940var action = typeof config === 'string' ? config : _config.slide;941942if (!data) {943data = new Carousel(this, _config);944$(this).data(DATA_KEY, data);945}946947if (typeof config === 'number') {948data.to(config);949} else if (typeof action === 'string') {950if (data[action] === undefined) {951throw new Error('No method named "' + action + '"');952}953data[action]();954} else if (_config.interval) {955data.pause();956data.cycle();957}958});959};960961Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {962var selector = Util.getSelectorFromElement(this);963964if (!selector) {965return;966}967968var target = $(selector)[0];969970if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {971return;972}973974var config = $.extend({}, $(target).data(), $(this).data());975var slideIndex = this.getAttribute('data-slide-to');976977if (slideIndex) {978config.interval = false;979}980981Carousel._jQueryInterface.call($(target), config);982983if (slideIndex) {984$(target).data(DATA_KEY).to(slideIndex);985}986987event.preventDefault();988};989990_createClass(Carousel, null, [{991key: 'VERSION',992get: function get() {993return VERSION;994}995}, {996key: 'Default',997get: function get() {998return Default;999}1000}]);10011002return Carousel;1003}();10041005/**1006* ------------------------------------------------------------------------1007* Data Api implementation1008* ------------------------------------------------------------------------1009*/10101011$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);10121013$(window).on(Event.LOAD_DATA_API, function () {1014$(Selector.DATA_RIDE).each(function () {1015var $carousel = $(this);1016Carousel._jQueryInterface.call($carousel, $carousel.data());1017});1018});10191020/**1021* ------------------------------------------------------------------------1022* jQuery1023* ------------------------------------------------------------------------1024*/10251026$.fn[NAME] = Carousel._jQueryInterface;1027$.fn[NAME].Constructor = Carousel;1028$.fn[NAME].noConflict = function () {1029$.fn[NAME] = JQUERY_NO_CONFLICT;1030return Carousel._jQueryInterface;1031};10321033return Carousel;1034}(jQuery);10351036/**1037* --------------------------------------------------------------------------1038* Bootstrap (v4.0.0-beta): collapse.js1039* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)1040* --------------------------------------------------------------------------1041*/10421043var Collapse = function ($) {10441045/**1046* ------------------------------------------------------------------------1047* Constants1048* ------------------------------------------------------------------------1049*/10501051var NAME = 'collapse';1052var VERSION = '4.0.0-beta';1053var DATA_KEY = 'bs.collapse';1054var EVENT_KEY = '.' + DATA_KEY;1055var DATA_API_KEY = '.data-api';1056var JQUERY_NO_CONFLICT = $.fn[NAME];1057var TRANSITION_DURATION = 600;10581059var Default = {1060toggle: true,1061parent: ''1062};10631064var DefaultType = {1065toggle: 'boolean',1066parent: 'string'1067};10681069var Event = {1070SHOW: 'show' + EVENT_KEY,1071SHOWN: 'shown' + EVENT_KEY,1072HIDE: 'hide' + EVENT_KEY,1073HIDDEN: 'hidden' + EVENT_KEY,1074CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY1075};10761077var ClassName = {1078SHOW: 'show',1079COLLAPSE: 'collapse',1080COLLAPSING: 'collapsing',1081COLLAPSED: 'collapsed'1082};10831084var Dimension = {1085WIDTH: 'width',1086HEIGHT: 'height'1087};10881089var Selector = {1090ACTIVES: '.show, .collapsing',1091DATA_TOGGLE: '[data-toggle="collapse"]'10921093/**1094* ------------------------------------------------------------------------1095* Class Definition1096* ------------------------------------------------------------------------1097*/10981099};1100var Collapse = function () {1101function Collapse(element, config) {1102_classCallCheck(this, Collapse);11031104this._isTransitioning = false;1105this._element = element;1106this._config = this._getConfig(config);1107this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));1108var tabToggles = $(Selector.DATA_TOGGLE);1109for (var i = 0; i < tabToggles.length; i++) {1110var elem = tabToggles[i];1111var selector = Util.getSelectorFromElement(elem);1112if (selector !== null && $(selector).filter(element).length > 0) {1113this._triggerArray.push(elem);1114}1115}11161117this._parent = this._config.parent ? this._getParent() : null;11181119if (!this._config.parent) {1120this._addAriaAndCollapsedClass(this._element, this._triggerArray);1121}11221123if (this._config.toggle) {1124this.toggle();1125}1126}11271128// getters11291130// public11311132Collapse.prototype.toggle = function toggle() {1133if ($(this._element).hasClass(ClassName.SHOW)) {1134this.hide();1135} else {1136this.show();1137}1138};11391140Collapse.prototype.show = function show() {1141var _this6 = this;11421143if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {1144return;1145}11461147var actives = void 0;1148var activesData = void 0;11491150if (this._parent) {1151actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES));1152if (!actives.length) {1153actives = null;1154}1155}11561157if (actives) {1158activesData = $(actives).data(DATA_KEY);1159if (activesData && activesData._isTransitioning) {1160return;1161}1162}11631164var startEvent = $.Event(Event.SHOW);1165$(this._element).trigger(startEvent);1166if (startEvent.isDefaultPrevented()) {1167return;1168}11691170if (actives) {1171Collapse._jQueryInterface.call($(actives), 'hide');1172if (!activesData) {1173$(actives).data(DATA_KEY, null);1174}1175}11761177var dimension = this._getDimension();11781179$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);11801181this._element.style[dimension] = 0;11821183if (this._triggerArray.length) {1184$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);1185}11861187this.setTransitioning(true);11881189var complete = function complete() {1190$(_this6._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);11911192_this6._element.style[dimension] = '';11931194_this6.setTransitioning(false);11951196$(_this6._element).trigger(Event.SHOWN);1197};11981199if (!Util.supportsTransitionEnd()) {1200complete();1201return;1202}12031204var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);1205var scrollSize = 'scroll' + capitalizedDimension;12061207$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);12081209this._element.style[dimension] = this._element[scrollSize] + 'px';1210};12111212Collapse.prototype.hide = function hide() {1213var _this7 = this;12141215if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {1216return;1217}12181219var startEvent = $.Event(Event.HIDE);1220$(this._element).trigger(startEvent);1221if (startEvent.isDefaultPrevented()) {1222return;1223}12241225var dimension = this._getDimension();12261227this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + 'px';12281229Util.reflow(this._element);12301231$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);12321233if (this._triggerArray.length) {1234for (var i = 0; i < this._triggerArray.length; i++) {1235var trigger = this._triggerArray[i];1236var selector = Util.getSelectorFromElement(trigger);1237if (selector !== null) {1238var $elem = $(selector);1239if (!$elem.hasClass(ClassName.SHOW)) {1240$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);1241}1242}1243}1244}12451246this.setTransitioning(true);12471248var complete = function complete() {1249_this7.setTransitioning(false);1250$(_this7._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);1251};12521253this._element.style[dimension] = '';12541255if (!Util.supportsTransitionEnd()) {1256complete();1257return;1258}12591260$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);1261};12621263Collapse.prototype.setTransitioning = function setTransitioning(isTransitioning) {1264this._isTransitioning = isTransitioning;1265};12661267Collapse.prototype.dispose = function dispose() {1268$.removeData(this._element, DATA_KEY);12691270this._config = null;1271this._parent = null;1272this._element = null;1273this._triggerArray = null;1274this._isTransitioning = null;1275};12761277// private12781279Collapse.prototype._getConfig = function _getConfig(config) {1280config = $.extend({}, Default, config);1281config.toggle = Boolean(config.toggle); // coerce string values1282Util.typeCheckConfig(NAME, config, DefaultType);1283return config;1284};12851286Collapse.prototype._getDimension = function _getDimension() {1287var hasWidth = $(this._element).hasClass(Dimension.WIDTH);1288return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;1289};12901291Collapse.prototype._getParent = function _getParent() {1292var _this8 = this;12931294var parent = $(this._config.parent)[0];1295var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';12961297$(parent).find(selector).each(function (i, element) {1298_this8._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);1299});13001301return parent;1302};13031304Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {1305if (element) {1306var isOpen = $(element).hasClass(ClassName.SHOW);13071308if (triggerArray.length) {1309$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);1310}1311}1312};13131314// static13151316Collapse._getTargetFromElement = function _getTargetFromElement(element) {1317var selector = Util.getSelectorFromElement(element);1318return selector ? $(selector)[0] : null;1319};13201321Collapse._jQueryInterface = function _jQueryInterface(config) {1322return this.each(function () {1323var $this = $(this);1324var data = $this.data(DATA_KEY);1325var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);13261327if (!data && _config.toggle && /show|hide/.test(config)) {1328_config.toggle = false;1329}13301331if (!data) {1332data = new Collapse(this, _config);1333$this.data(DATA_KEY, data);1334}13351336if (typeof config === 'string') {1337if (data[config] === undefined) {1338throw new Error('No method named "' + config + '"');1339}1340data[config]();1341}1342});1343};13441345_createClass(Collapse, null, [{1346key: 'VERSION',1347get: function get() {1348return VERSION;1349}1350}, {1351key: 'Default',1352get: function get() {1353return Default;1354}1355}]);13561357return Collapse;1358}();13591360/**1361* ------------------------------------------------------------------------1362* Data Api implementation1363* ------------------------------------------------------------------------1364*/13651366$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {1367if (!/input|textarea/i.test(event.target.tagName)) {1368event.preventDefault();1369}13701371var $trigger = $(this);1372var selector = Util.getSelectorFromElement(this);1373$(selector).each(function () {1374var $target = $(this);1375var data = $target.data(DATA_KEY);1376var config = data ? 'toggle' : $trigger.data();1377Collapse._jQueryInterface.call($target, config);1378});1379});13801381/**1382* ------------------------------------------------------------------------1383* jQuery1384* ------------------------------------------------------------------------1385*/13861387$.fn[NAME] = Collapse._jQueryInterface;1388$.fn[NAME].Constructor = Collapse;1389$.fn[NAME].noConflict = function () {1390$.fn[NAME] = JQUERY_NO_CONFLICT;1391return Collapse._jQueryInterface;1392};13931394return Collapse;1395}(jQuery);13961397/* global Popper */13981399/**1400* --------------------------------------------------------------------------1401* Bootstrap (v4.0.0-beta): dropdown.js1402* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)1403* --------------------------------------------------------------------------1404*/14051406var Dropdown = function ($) {14071408/**1409* Check for Popper dependency1410* Popper - https://popper.js.org1411*/1412if (typeof Popper === 'undefined') {1413throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');1414}14151416/**1417* ------------------------------------------------------------------------1418* Constants1419* ------------------------------------------------------------------------1420*/14211422var NAME = 'dropdown';1423var VERSION = '4.0.0-beta';1424var DATA_KEY = 'bs.dropdown';1425var EVENT_KEY = '.' + DATA_KEY;1426var DATA_API_KEY = '.data-api';1427var JQUERY_NO_CONFLICT = $.fn[NAME];1428var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key1429var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key1430var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key1431var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key1432var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key1433var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)1434var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + '|' + ARROW_DOWN_KEYCODE + '|' + ESCAPE_KEYCODE);14351436var Event = {1437HIDE: 'hide' + EVENT_KEY,1438HIDDEN: 'hidden' + EVENT_KEY,1439SHOW: 'show' + EVENT_KEY,1440SHOWN: 'shown' + EVENT_KEY,1441CLICK: 'click' + EVENT_KEY,1442CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,1443KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY,1444KEYUP_DATA_API: 'keyup' + EVENT_KEY + DATA_API_KEY1445};14461447var ClassName = {1448DISABLED: 'disabled',1449SHOW: 'show',1450DROPUP: 'dropup',1451MENURIGHT: 'dropdown-menu-right',1452MENULEFT: 'dropdown-menu-left'1453};14541455var Selector = {1456DATA_TOGGLE: '[data-toggle="dropdown"]',1457FORM_CHILD: '.dropdown form',1458MENU: '.dropdown-menu',1459NAVBAR_NAV: '.navbar-nav',1460VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'1461};14621463var AttachmentMap = {1464TOP: 'top-start',1465TOPEND: 'top-end',1466BOTTOM: 'bottom-start',1467BOTTOMEND: 'bottom-end'1468};14691470var Default = {1471placement: AttachmentMap.BOTTOM,1472offset: 0,1473flip: true1474};14751476var DefaultType = {1477placement: 'string',1478offset: '(number|string)',1479flip: 'boolean'14801481/**1482* ------------------------------------------------------------------------1483* Class Definition1484* ------------------------------------------------------------------------1485*/14861487};1488var Dropdown = function () {1489function Dropdown(element, config) {1490_classCallCheck(this, Dropdown);14911492this._element = element;1493this._popper = null;1494this._config = this._getConfig(config);1495this._menu = this._getMenuElement();1496this._inNavbar = this._detectNavbar();14971498this._addEventListeners();1499}15001501// getters15021503// public15041505Dropdown.prototype.toggle = function toggle() {1506if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {1507return;1508}15091510var parent = Dropdown._getParentFromElement(this._element);1511var isActive = $(this._menu).hasClass(ClassName.SHOW);15121513Dropdown._clearMenus();15141515if (isActive) {1516return;1517}15181519var relatedTarget = {1520relatedTarget: this._element1521};1522var showEvent = $.Event(Event.SHOW, relatedTarget);15231524$(parent).trigger(showEvent);15251526if (showEvent.isDefaultPrevented()) {1527return;1528}15291530var element = this._element;1531// for dropup with alignment we use the parent as popper container1532if ($(parent).hasClass(ClassName.DROPUP)) {1533if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {1534element = parent;1535}1536}1537this._popper = new Popper(element, this._menu, this._getPopperConfig());15381539// if this is a touch-enabled device we add extra1540// empty mouseover listeners to the body's immediate children;1541// only needed because of broken event delegation on iOS1542// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html1543if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {1544$('body').children().on('mouseover', null, $.noop);1545}15461547this._element.focus();1548this._element.setAttribute('aria-expanded', true);15491550$(this._menu).toggleClass(ClassName.SHOW);1551$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));1552};15531554Dropdown.prototype.dispose = function dispose() {1555$.removeData(this._element, DATA_KEY);1556$(this._element).off(EVENT_KEY);1557this._element = null;1558this._menu = null;1559if (this._popper !== null) {1560this._popper.destroy();1561}1562this._popper = null;1563};15641565Dropdown.prototype.update = function update() {1566this._inNavbar = this._detectNavbar();1567if (this._popper !== null) {1568this._popper.scheduleUpdate();1569}1570};15711572// private15731574Dropdown.prototype._addEventListeners = function _addEventListeners() {1575var _this9 = this;15761577$(this._element).on(Event.CLICK, function (event) {1578event.preventDefault();1579event.stopPropagation();1580_this9.toggle();1581});1582};15831584Dropdown.prototype._getConfig = function _getConfig(config) {1585var elementData = $(this._element).data();1586if (elementData.placement !== undefined) {1587elementData.placement = AttachmentMap[elementData.placement.toUpperCase()];1588}15891590config = $.extend({}, this.constructor.Default, $(this._element).data(), config);15911592Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);15931594return config;1595};15961597Dropdown.prototype._getMenuElement = function _getMenuElement() {1598if (!this._menu) {1599var parent = Dropdown._getParentFromElement(this._element);1600this._menu = $(parent).find(Selector.MENU)[0];1601}1602return this._menu;1603};16041605Dropdown.prototype._getPlacement = function _getPlacement() {1606var $parentDropdown = $(this._element).parent();1607var placement = this._config.placement;16081609// Handle dropup1610if ($parentDropdown.hasClass(ClassName.DROPUP) || this._config.placement === AttachmentMap.TOP) {1611placement = AttachmentMap.TOP;1612if ($(this._menu).hasClass(ClassName.MENURIGHT)) {1613placement = AttachmentMap.TOPEND;1614}1615} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {1616placement = AttachmentMap.BOTTOMEND;1617}1618return placement;1619};16201621Dropdown.prototype._detectNavbar = function _detectNavbar() {1622return $(this._element).closest('.navbar').length > 0;1623};16241625Dropdown.prototype._getPopperConfig = function _getPopperConfig() {1626var popperConfig = {1627placement: this._getPlacement(),1628modifiers: {1629offset: {1630offset: this._config.offset1631},1632flip: {1633enabled: this._config.flip1634}1635}16361637// Disable Popper.js for Dropdown in Navbar1638};if (this._inNavbar) {1639popperConfig.modifiers.applyStyle = {1640enabled: !this._inNavbar1641};1642}1643return popperConfig;1644};16451646// static16471648Dropdown._jQueryInterface = function _jQueryInterface(config) {1649return this.each(function () {1650var data = $(this).data(DATA_KEY);1651var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;16521653if (!data) {1654data = new Dropdown(this, _config);1655$(this).data(DATA_KEY, data);1656}16571658if (typeof config === 'string') {1659if (data[config] === undefined) {1660throw new Error('No method named "' + config + '"');1661}1662data[config]();1663}1664});1665};16661667Dropdown._clearMenus = function _clearMenus(event) {1668if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {1669return;1670}16711672var toggles = $.makeArray($(Selector.DATA_TOGGLE));1673for (var i = 0; i < toggles.length; i++) {1674var parent = Dropdown._getParentFromElement(toggles[i]);1675var context = $(toggles[i]).data(DATA_KEY);1676var relatedTarget = {1677relatedTarget: toggles[i]1678};16791680if (!context) {1681continue;1682}16831684var dropdownMenu = context._menu;1685if (!$(parent).hasClass(ClassName.SHOW)) {1686continue;1687}16881689if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {1690continue;1691}16921693var hideEvent = $.Event(Event.HIDE, relatedTarget);1694$(parent).trigger(hideEvent);1695if (hideEvent.isDefaultPrevented()) {1696continue;1697}16981699// if this is a touch-enabled device we remove the extra1700// empty mouseover listeners we added for iOS support1701if ('ontouchstart' in document.documentElement) {1702$('body').children().off('mouseover', null, $.noop);1703}17041705toggles[i].setAttribute('aria-expanded', 'false');17061707$(dropdownMenu).removeClass(ClassName.SHOW);1708$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));1709}1710};17111712Dropdown._getParentFromElement = function _getParentFromElement(element) {1713var parent = void 0;1714var selector = Util.getSelectorFromElement(element);17151716if (selector) {1717parent = $(selector)[0];1718}17191720return parent || element.parentNode;1721};17221723Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {1724if (!REGEXP_KEYDOWN.test(event.which) || /button/i.test(event.target.tagName) && event.which === SPACE_KEYCODE || /input|textarea/i.test(event.target.tagName)) {1725return;1726}17271728event.preventDefault();1729event.stopPropagation();17301731if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {1732return;1733}17341735var parent = Dropdown._getParentFromElement(this);1736var isActive = $(parent).hasClass(ClassName.SHOW);17371738if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {17391740if (event.which === ESCAPE_KEYCODE) {1741var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];1742$(toggle).trigger('focus');1743}17441745$(this).trigger('click');1746return;1747}17481749var items = $(parent).find(Selector.VISIBLE_ITEMS).get();17501751if (!items.length) {1752return;1753}17541755var index = items.indexOf(event.target);17561757if (event.which === ARROW_UP_KEYCODE && index > 0) {1758// up1759index--;1760}17611762if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {1763// down1764index++;1765}17661767if (index < 0) {1768index = 0;1769}17701771items[index].focus();1772};17731774_createClass(Dropdown, null, [{1775key: 'VERSION',1776get: function get() {1777return VERSION;1778}1779}, {1780key: 'Default',1781get: function get() {1782return Default;1783}1784}, {1785key: 'DefaultType',1786get: function get() {1787return DefaultType;1788}1789}]);17901791return Dropdown;1792}();17931794/**1795* ------------------------------------------------------------------------1796* Data Api implementation1797* ------------------------------------------------------------------------1798*/17991800$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {1801event.preventDefault();1802event.stopPropagation();1803Dropdown._jQueryInterface.call($(this), 'toggle');1804}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {1805e.stopPropagation();1806});18071808/**1809* ------------------------------------------------------------------------1810* jQuery1811* ------------------------------------------------------------------------1812*/18131814$.fn[NAME] = Dropdown._jQueryInterface;1815$.fn[NAME].Constructor = Dropdown;1816$.fn[NAME].noConflict = function () {1817$.fn[NAME] = JQUERY_NO_CONFLICT;1818return Dropdown._jQueryInterface;1819};18201821return Dropdown;1822}(jQuery);18231824/**1825* --------------------------------------------------------------------------1826* Bootstrap (v4.0.0-beta): modal.js1827* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)1828* --------------------------------------------------------------------------1829*/18301831var Modal = function ($) {18321833/**1834* ------------------------------------------------------------------------1835* Constants1836* ------------------------------------------------------------------------1837*/18381839var NAME = 'modal';1840var VERSION = '4.0.0-beta';1841var DATA_KEY = 'bs.modal';1842var EVENT_KEY = '.' + DATA_KEY;1843var DATA_API_KEY = '.data-api';1844var JQUERY_NO_CONFLICT = $.fn[NAME];1845var TRANSITION_DURATION = 300;1846var BACKDROP_TRANSITION_DURATION = 150;1847var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key18481849var Default = {1850backdrop: true,1851keyboard: true,1852focus: true,1853show: true1854};18551856var DefaultType = {1857backdrop: '(boolean|string)',1858keyboard: 'boolean',1859focus: 'boolean',1860show: 'boolean'1861};18621863var Event = {1864HIDE: 'hide' + EVENT_KEY,1865HIDDEN: 'hidden' + EVENT_KEY,1866SHOW: 'show' + EVENT_KEY,1867SHOWN: 'shown' + EVENT_KEY,1868FOCUSIN: 'focusin' + EVENT_KEY,1869RESIZE: 'resize' + EVENT_KEY,1870CLICK_DISMISS: 'click.dismiss' + EVENT_KEY,1871KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY,1872MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY,1873MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY,1874CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY1875};18761877var ClassName = {1878SCROLLBAR_MEASURER: 'modal-scrollbar-measure',1879BACKDROP: 'modal-backdrop',1880OPEN: 'modal-open',1881FADE: 'fade',1882SHOW: 'show'1883};18841885var Selector = {1886DIALOG: '.modal-dialog',1887DATA_TOGGLE: '[data-toggle="modal"]',1888DATA_DISMISS: '[data-dismiss="modal"]',1889FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',1890NAVBAR_TOGGLER: '.navbar-toggler'18911892/**1893* ------------------------------------------------------------------------1894* Class Definition1895* ------------------------------------------------------------------------1896*/18971898};1899var Modal = function () {1900function Modal(element, config) {1901_classCallCheck(this, Modal);19021903this._config = this._getConfig(config);1904this._element = element;1905this._dialog = $(element).find(Selector.DIALOG)[0];1906this._backdrop = null;1907this._isShown = false;1908this._isBodyOverflowing = false;1909this._ignoreBackdropClick = false;1910this._originalBodyPadding = 0;1911this._scrollbarWidth = 0;1912}19131914// getters19151916// public19171918Modal.prototype.toggle = function toggle(relatedTarget) {1919return this._isShown ? this.hide() : this.show(relatedTarget);1920};19211922Modal.prototype.show = function show(relatedTarget) {1923var _this10 = this;19241925if (this._isTransitioning) {1926return;1927}19281929if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {1930this._isTransitioning = true;1931}19321933var showEvent = $.Event(Event.SHOW, {1934relatedTarget: relatedTarget1935});19361937$(this._element).trigger(showEvent);19381939if (this._isShown || showEvent.isDefaultPrevented()) {1940return;1941}19421943this._isShown = true;19441945this._checkScrollbar();1946this._setScrollbar();19471948$(document.body).addClass(ClassName.OPEN);19491950this._setEscapeEvent();1951this._setResizeEvent();19521953$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {1954return _this10.hide(event);1955});19561957$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {1958$(_this10._element).one(Event.MOUSEUP_DISMISS, function (event) {1959if ($(event.target).is(_this10._element)) {1960_this10._ignoreBackdropClick = true;1961}1962});1963});19641965this._showBackdrop(function () {1966return _this10._showElement(relatedTarget);1967});1968};19691970Modal.prototype.hide = function hide(event) {1971var _this11 = this;19721973if (event) {1974event.preventDefault();1975}19761977if (this._isTransitioning || !this._isShown) {1978return;1979}19801981var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);19821983if (transition) {1984this._isTransitioning = true;1985}19861987var hideEvent = $.Event(Event.HIDE);19881989$(this._element).trigger(hideEvent);19901991if (!this._isShown || hideEvent.isDefaultPrevented()) {1992return;1993}19941995this._isShown = false;19961997this._setEscapeEvent();1998this._setResizeEvent();19992000$(document).off(Event.FOCUSIN);20012002$(this._element).removeClass(ClassName.SHOW);20032004$(this._element).off(Event.CLICK_DISMISS);2005$(this._dialog).off(Event.MOUSEDOWN_DISMISS);20062007if (transition) {20082009$(this._element).one(Util.TRANSITION_END, function (event) {2010return _this11._hideModal(event);2011}).emulateTransitionEnd(TRANSITION_DURATION);2012} else {2013this._hideModal();2014}2015};20162017Modal.prototype.dispose = function dispose() {2018$.removeData(this._element, DATA_KEY);20192020$(window, document, this._element, this._backdrop).off(EVENT_KEY);20212022this._config = null;2023this._element = null;2024this._dialog = null;2025this._backdrop = null;2026this._isShown = null;2027this._isBodyOverflowing = null;2028this._ignoreBackdropClick = null;2029this._scrollbarWidth = null;2030};20312032Modal.prototype.handleUpdate = function handleUpdate() {2033this._adjustDialog();2034};20352036// private20372038Modal.prototype._getConfig = function _getConfig(config) {2039config = $.extend({}, Default, config);2040Util.typeCheckConfig(NAME, config, DefaultType);2041return config;2042};20432044Modal.prototype._showElement = function _showElement(relatedTarget) {2045var _this12 = this;20462047var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);20482049if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {2050// don't move modals dom position2051document.body.appendChild(this._element);2052}20532054this._element.style.display = 'block';2055this._element.removeAttribute('aria-hidden');2056this._element.scrollTop = 0;20572058if (transition) {2059Util.reflow(this._element);2060}20612062$(this._element).addClass(ClassName.SHOW);20632064if (this._config.focus) {2065this._enforceFocus();2066}20672068var shownEvent = $.Event(Event.SHOWN, {2069relatedTarget: relatedTarget2070});20712072var transitionComplete = function transitionComplete() {2073if (_this12._config.focus) {2074_this12._element.focus();2075}2076_this12._isTransitioning = false;2077$(_this12._element).trigger(shownEvent);2078};20792080if (transition) {2081$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);2082} else {2083transitionComplete();2084}2085};20862087Modal.prototype._enforceFocus = function _enforceFocus() {2088var _this13 = this;20892090$(document).off(Event.FOCUSIN) // guard against infinite focus loop2091.on(Event.FOCUSIN, function (event) {2092if (document !== event.target && _this13._element !== event.target && !$(_this13._element).has(event.target).length) {2093_this13._element.focus();2094}2095});2096};20972098Modal.prototype._setEscapeEvent = function _setEscapeEvent() {2099var _this14 = this;21002101if (this._isShown && this._config.keyboard) {2102$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {2103if (event.which === ESCAPE_KEYCODE) {2104event.preventDefault();2105_this14.hide();2106}2107});2108} else if (!this._isShown) {2109$(this._element).off(Event.KEYDOWN_DISMISS);2110}2111};21122113Modal.prototype._setResizeEvent = function _setResizeEvent() {2114var _this15 = this;21152116if (this._isShown) {2117$(window).on(Event.RESIZE, function (event) {2118return _this15.handleUpdate(event);2119});2120} else {2121$(window).off(Event.RESIZE);2122}2123};21242125Modal.prototype._hideModal = function _hideModal() {2126var _this16 = this;21272128this._element.style.display = 'none';2129this._element.setAttribute('aria-hidden', true);2130this._isTransitioning = false;2131this._showBackdrop(function () {2132$(document.body).removeClass(ClassName.OPEN);2133_this16._resetAdjustments();2134_this16._resetScrollbar();2135$(_this16._element).trigger(Event.HIDDEN);2136});2137};21382139Modal.prototype._removeBackdrop = function _removeBackdrop() {2140if (this._backdrop) {2141$(this._backdrop).remove();2142this._backdrop = null;2143}2144};21452146Modal.prototype._showBackdrop = function _showBackdrop(callback) {2147var _this17 = this;21482149var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';21502151if (this._isShown && this._config.backdrop) {2152var doAnimate = Util.supportsTransitionEnd() && animate;21532154this._backdrop = document.createElement('div');2155this._backdrop.className = ClassName.BACKDROP;21562157if (animate) {2158$(this._backdrop).addClass(animate);2159}21602161$(this._backdrop).appendTo(document.body);21622163$(this._element).on(Event.CLICK_DISMISS, function (event) {2164if (_this17._ignoreBackdropClick) {2165_this17._ignoreBackdropClick = false;2166return;2167}2168if (event.target !== event.currentTarget) {2169return;2170}2171if (_this17._config.backdrop === 'static') {2172_this17._element.focus();2173} else {2174_this17.hide();2175}2176});21772178if (doAnimate) {2179Util.reflow(this._backdrop);2180}21812182$(this._backdrop).addClass(ClassName.SHOW);21832184if (!callback) {2185return;2186}21872188if (!doAnimate) {2189callback();2190return;2191}21922193$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);2194} else if (!this._isShown && this._backdrop) {2195$(this._backdrop).removeClass(ClassName.SHOW);21962197var callbackRemove = function callbackRemove() {2198_this17._removeBackdrop();2199if (callback) {2200callback();2201}2202};22032204if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {2205$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);2206} else {2207callbackRemove();2208}2209} else if (callback) {2210callback();2211}2212};22132214// ----------------------------------------------------------------------2215// the following methods are used to handle overflowing modals2216// todo (fat): these should probably be refactored out of modal.js2217// ----------------------------------------------------------------------22182219Modal.prototype._adjustDialog = function _adjustDialog() {2220var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;22212222if (!this._isBodyOverflowing && isModalOverflowing) {2223this._element.style.paddingLeft = this._scrollbarWidth + 'px';2224}22252226if (this._isBodyOverflowing && !isModalOverflowing) {2227this._element.style.paddingRight = this._scrollbarWidth + 'px';2228}2229};22302231Modal.prototype._resetAdjustments = function _resetAdjustments() {2232this._element.style.paddingLeft = '';2233this._element.style.paddingRight = '';2234};22352236Modal.prototype._checkScrollbar = function _checkScrollbar() {2237this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;2238this._scrollbarWidth = this._getScrollbarWidth();2239};22402241Modal.prototype._setScrollbar = function _setScrollbar() {2242var _this18 = this;22432244if (this._isBodyOverflowing) {2245// Note: DOMNode.style.paddingRight returns the actual value or '' if not set2246// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set22472248// Adjust fixed content padding2249$(Selector.FIXED_CONTENT).each(function (index, element) {2250var actualPadding = $(element)[0].style.paddingRight;2251var calculatedPadding = $(element).css('padding-right');2252$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this18._scrollbarWidth + 'px');2253});22542255// Adjust navbar-toggler margin2256$(Selector.NAVBAR_TOGGLER).each(function (index, element) {2257var actualMargin = $(element)[0].style.marginRight;2258var calculatedMargin = $(element).css('margin-right');2259$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this18._scrollbarWidth + 'px');2260});22612262// Adjust body padding2263var actualPadding = document.body.style.paddingRight;2264var calculatedPadding = $('body').css('padding-right');2265$('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + 'px');2266}2267};22682269Modal.prototype._resetScrollbar = function _resetScrollbar() {2270// Restore fixed content padding2271$(Selector.FIXED_CONTENT).each(function (index, element) {2272var padding = $(element).data('padding-right');2273if (typeof padding !== 'undefined') {2274$(element).css('padding-right', padding).removeData('padding-right');2275}2276});22772278// Restore navbar-toggler margin2279$(Selector.NAVBAR_TOGGLER).each(function (index, element) {2280var margin = $(element).data('margin-right');2281if (typeof margin !== 'undefined') {2282$(element).css('margin-right', margin).removeData('margin-right');2283}2284});22852286// Restore body padding2287var padding = $('body').data('padding-right');2288if (typeof padding !== 'undefined') {2289$('body').css('padding-right', padding).removeData('padding-right');2290}2291};22922293Modal.prototype._getScrollbarWidth = function _getScrollbarWidth() {2294// thx d.walsh2295var scrollDiv = document.createElement('div');2296scrollDiv.className = ClassName.SCROLLBAR_MEASURER;2297document.body.appendChild(scrollDiv);2298var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;2299document.body.removeChild(scrollDiv);2300return scrollbarWidth;2301};23022303// static23042305Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {2306return this.each(function () {2307var data = $(this).data(DATA_KEY);2308var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);23092310if (!data) {2311data = new Modal(this, _config);2312$(this).data(DATA_KEY, data);2313}23142315if (typeof config === 'string') {2316if (data[config] === undefined) {2317throw new Error('No method named "' + config + '"');2318}2319data[config](relatedTarget);2320} else if (_config.show) {2321data.show(relatedTarget);2322}2323});2324};23252326_createClass(Modal, null, [{2327key: 'VERSION',2328get: function get() {2329return VERSION;2330}2331}, {2332key: 'Default',2333get: function get() {2334return Default;2335}2336}]);23372338return Modal;2339}();23402341/**2342* ------------------------------------------------------------------------2343* Data Api implementation2344* ------------------------------------------------------------------------2345*/23462347$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {2348var _this19 = this;23492350var target = void 0;2351var selector = Util.getSelectorFromElement(this);23522353if (selector) {2354target = $(selector)[0];2355}23562357var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());23582359if (this.tagName === 'A' || this.tagName === 'AREA') {2360event.preventDefault();2361}23622363var $target = $(target).one(Event.SHOW, function (showEvent) {2364if (showEvent.isDefaultPrevented()) {2365// only register focus restorer if modal will actually get shown2366return;2367}23682369$target.one(Event.HIDDEN, function () {2370if ($(_this19).is(':visible')) {2371_this19.focus();2372}2373});2374});23752376Modal._jQueryInterface.call($(target), config, this);2377});23782379/**2380* ------------------------------------------------------------------------2381* jQuery2382* ------------------------------------------------------------------------2383*/23842385$.fn[NAME] = Modal._jQueryInterface;2386$.fn[NAME].Constructor = Modal;2387$.fn[NAME].noConflict = function () {2388$.fn[NAME] = JQUERY_NO_CONFLICT;2389return Modal._jQueryInterface;2390};23912392return Modal;2393}(jQuery);23942395/**2396* --------------------------------------------------------------------------2397* Bootstrap (v4.0.0-beta): scrollspy.js2398* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)2399* --------------------------------------------------------------------------2400*/24012402var ScrollSpy = function ($) {24032404/**2405* ------------------------------------------------------------------------2406* Constants2407* ------------------------------------------------------------------------2408*/24092410var NAME = 'scrollspy';2411var VERSION = '4.0.0-beta';2412var DATA_KEY = 'bs.scrollspy';2413var EVENT_KEY = '.' + DATA_KEY;2414var DATA_API_KEY = '.data-api';2415var JQUERY_NO_CONFLICT = $.fn[NAME];24162417var Default = {2418offset: 10,2419method: 'auto',2420target: ''2421};24222423var DefaultType = {2424offset: 'number',2425method: 'string',2426target: '(string|element)'2427};24282429var Event = {2430ACTIVATE: 'activate' + EVENT_KEY,2431SCROLL: 'scroll' + EVENT_KEY,2432LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY2433};24342435var ClassName = {2436DROPDOWN_ITEM: 'dropdown-item',2437DROPDOWN_MENU: 'dropdown-menu',2438ACTIVE: 'active'2439};24402441var Selector = {2442DATA_SPY: '[data-spy="scroll"]',2443ACTIVE: '.active',2444NAV_LIST_GROUP: '.nav, .list-group',2445NAV_LINKS: '.nav-link',2446LIST_ITEMS: '.list-group-item',2447DROPDOWN: '.dropdown',2448DROPDOWN_ITEMS: '.dropdown-item',2449DROPDOWN_TOGGLE: '.dropdown-toggle'2450};24512452var OffsetMethod = {2453OFFSET: 'offset',2454POSITION: 'position'24552456/**2457* ------------------------------------------------------------------------2458* Class Definition2459* ------------------------------------------------------------------------2460*/24612462};2463var ScrollSpy = function () {2464function ScrollSpy(element, config) {2465var _this20 = this;24662467_classCallCheck(this, ScrollSpy);24682469this._element = element;2470this._scrollElement = element.tagName === 'BODY' ? window : element;2471this._config = this._getConfig(config);2472this._selector = this._config.target + ' ' + Selector.NAV_LINKS + ',' + (this._config.target + ' ' + Selector.LIST_ITEMS + ',') + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS);2473this._offsets = [];2474this._targets = [];2475this._activeTarget = null;2476this._scrollHeight = 0;24772478$(this._scrollElement).on(Event.SCROLL, function (event) {2479return _this20._process(event);2480});24812482this.refresh();2483this._process();2484}24852486// getters24872488// public24892490ScrollSpy.prototype.refresh = function refresh() {2491var _this21 = this;24922493var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;24942495var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;24962497var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;24982499this._offsets = [];2500this._targets = [];25012502this._scrollHeight = this._getScrollHeight();25032504var targets = $.makeArray($(this._selector));25052506targets.map(function (element) {2507var target = void 0;2508var targetSelector = Util.getSelectorFromElement(element);25092510if (targetSelector) {2511target = $(targetSelector)[0];2512}25132514if (target) {2515var targetBCR = target.getBoundingClientRect();2516if (targetBCR.width || targetBCR.height) {2517// todo (fat): remove sketch reliance on jQuery position/offset2518return [$(target)[offsetMethod]().top + offsetBase, targetSelector];2519}2520}2521return null;2522}).filter(function (item) {2523return item;2524}).sort(function (a, b) {2525return a[0] - b[0];2526}).forEach(function (item) {2527_this21._offsets.push(item[0]);2528_this21._targets.push(item[1]);2529});2530};25312532ScrollSpy.prototype.dispose = function dispose() {2533$.removeData(this._element, DATA_KEY);2534$(this._scrollElement).off(EVENT_KEY);25352536this._element = null;2537this._scrollElement = null;2538this._config = null;2539this._selector = null;2540this._offsets = null;2541this._targets = null;2542this._activeTarget = null;2543this._scrollHeight = null;2544};25452546// private25472548ScrollSpy.prototype._getConfig = function _getConfig(config) {2549config = $.extend({}, Default, config);25502551if (typeof config.target !== 'string') {2552var id = $(config.target).attr('id');2553if (!id) {2554id = Util.getUID(NAME);2555$(config.target).attr('id', id);2556}2557config.target = '#' + id;2558}25592560Util.typeCheckConfig(NAME, config, DefaultType);25612562return config;2563};25642565ScrollSpy.prototype._getScrollTop = function _getScrollTop() {2566return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;2567};25682569ScrollSpy.prototype._getScrollHeight = function _getScrollHeight() {2570return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);2571};25722573ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {2574return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;2575};25762577ScrollSpy.prototype._process = function _process() {2578var scrollTop = this._getScrollTop() + this._config.offset;2579var scrollHeight = this._getScrollHeight();2580var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();25812582if (this._scrollHeight !== scrollHeight) {2583this.refresh();2584}25852586if (scrollTop >= maxScroll) {2587var target = this._targets[this._targets.length - 1];25882589if (this._activeTarget !== target) {2590this._activate(target);2591}2592return;2593}25942595if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {2596this._activeTarget = null;2597this._clear();2598return;2599}26002601for (var i = this._offsets.length; i--;) {2602var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);26032604if (isActiveTarget) {2605this._activate(this._targets[i]);2606}2607}2608};26092610ScrollSpy.prototype._activate = function _activate(target) {2611this._activeTarget = target;26122613this._clear();26142615var queries = this._selector.split(',');2616queries = queries.map(function (selector) {2617return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');2618});26192620var $link = $(queries.join(','));26212622if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {2623$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);2624$link.addClass(ClassName.ACTIVE);2625} else {2626// Set triggered link as active2627$link.addClass(ClassName.ACTIVE);2628// Set triggered links parents as active2629// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor2630$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ', ' + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE);2631}26322633$(this._scrollElement).trigger(Event.ACTIVATE, {2634relatedTarget: target2635});2636};26372638ScrollSpy.prototype._clear = function _clear() {2639$(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);2640};26412642// static26432644ScrollSpy._jQueryInterface = function _jQueryInterface(config) {2645return this.each(function () {2646var data = $(this).data(DATA_KEY);2647var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;26482649if (!data) {2650data = new ScrollSpy(this, _config);2651$(this).data(DATA_KEY, data);2652}26532654if (typeof config === 'string') {2655if (data[config] === undefined) {2656throw new Error('No method named "' + config + '"');2657}2658data[config]();2659}2660});2661};26622663_createClass(ScrollSpy, null, [{2664key: 'VERSION',2665get: function get() {2666return VERSION;2667}2668}, {2669key: 'Default',2670get: function get() {2671return Default;2672}2673}]);26742675return ScrollSpy;2676}();26772678/**2679* ------------------------------------------------------------------------2680* Data Api implementation2681* ------------------------------------------------------------------------2682*/26832684$(window).on(Event.LOAD_DATA_API, function () {2685var scrollSpys = $.makeArray($(Selector.DATA_SPY));26862687for (var i = scrollSpys.length; i--;) {2688var $spy = $(scrollSpys[i]);2689ScrollSpy._jQueryInterface.call($spy, $spy.data());2690}2691});26922693/**2694* ------------------------------------------------------------------------2695* jQuery2696* ------------------------------------------------------------------------2697*/26982699$.fn[NAME] = ScrollSpy._jQueryInterface;2700$.fn[NAME].Constructor = ScrollSpy;2701$.fn[NAME].noConflict = function () {2702$.fn[NAME] = JQUERY_NO_CONFLICT;2703return ScrollSpy._jQueryInterface;2704};27052706return ScrollSpy;2707}(jQuery);27082709/**2710* --------------------------------------------------------------------------2711* Bootstrap (v4.0.0-beta): tab.js2712* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)2713* --------------------------------------------------------------------------2714*/27152716var Tab = function ($) {27172718/**2719* ------------------------------------------------------------------------2720* Constants2721* ------------------------------------------------------------------------2722*/27232724var NAME = 'tab';2725var VERSION = '4.0.0-beta';2726var DATA_KEY = 'bs.tab';2727var EVENT_KEY = '.' + DATA_KEY;2728var DATA_API_KEY = '.data-api';2729var JQUERY_NO_CONFLICT = $.fn[NAME];2730var TRANSITION_DURATION = 150;27312732var Event = {2733HIDE: 'hide' + EVENT_KEY,2734HIDDEN: 'hidden' + EVENT_KEY,2735SHOW: 'show' + EVENT_KEY,2736SHOWN: 'shown' + EVENT_KEY,2737CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY2738};27392740var ClassName = {2741DROPDOWN_MENU: 'dropdown-menu',2742ACTIVE: 'active',2743DISABLED: 'disabled',2744FADE: 'fade',2745SHOW: 'show'2746};27472748var Selector = {2749DROPDOWN: '.dropdown',2750NAV_LIST_GROUP: '.nav, .list-group',2751ACTIVE: '.active',2752DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',2753DROPDOWN_TOGGLE: '.dropdown-toggle',2754DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'27552756/**2757* ------------------------------------------------------------------------2758* Class Definition2759* ------------------------------------------------------------------------2760*/27612762};2763var Tab = function () {2764function Tab(element) {2765_classCallCheck(this, Tab);27662767this._element = element;2768}27692770// getters27712772// public27732774Tab.prototype.show = function show() {2775var _this22 = this;27762777if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {2778return;2779}27802781var target = void 0;2782var previous = void 0;2783var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];2784var selector = Util.getSelectorFromElement(this._element);27852786if (listElement) {2787previous = $.makeArray($(listElement).find(Selector.ACTIVE));2788previous = previous[previous.length - 1];2789}27902791var hideEvent = $.Event(Event.HIDE, {2792relatedTarget: this._element2793});27942795var showEvent = $.Event(Event.SHOW, {2796relatedTarget: previous2797});27982799if (previous) {2800$(previous).trigger(hideEvent);2801}28022803$(this._element).trigger(showEvent);28042805if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {2806return;2807}28082809if (selector) {2810target = $(selector)[0];2811}28122813this._activate(this._element, listElement);28142815var complete = function complete() {2816var hiddenEvent = $.Event(Event.HIDDEN, {2817relatedTarget: _this22._element2818});28192820var shownEvent = $.Event(Event.SHOWN, {2821relatedTarget: previous2822});28232824$(previous).trigger(hiddenEvent);2825$(_this22._element).trigger(shownEvent);2826};28272828if (target) {2829this._activate(target, target.parentNode, complete);2830} else {2831complete();2832}2833};28342835Tab.prototype.dispose = function dispose() {2836$.removeData(this._element, DATA_KEY);2837this._element = null;2838};28392840// private28412842Tab.prototype._activate = function _activate(element, container, callback) {2843var _this23 = this;28442845var active = $(container).find(Selector.ACTIVE)[0];2846var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);28472848var complete = function complete() {2849return _this23._transitionComplete(element, active, isTransitioning, callback);2850};28512852if (active && isTransitioning) {2853$(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);2854} else {2855complete();2856}28572858if (active) {2859$(active).removeClass(ClassName.SHOW);2860}2861};28622863Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {2864if (active) {2865$(active).removeClass(ClassName.ACTIVE);28662867var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];28682869if (dropdownChild) {2870$(dropdownChild).removeClass(ClassName.ACTIVE);2871}28722873active.setAttribute('aria-expanded', false);2874}28752876$(element).addClass(ClassName.ACTIVE);2877element.setAttribute('aria-expanded', true);28782879if (isTransitioning) {2880Util.reflow(element);2881$(element).addClass(ClassName.SHOW);2882} else {2883$(element).removeClass(ClassName.FADE);2884}28852886if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {28872888var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];2889if (dropdownElement) {2890$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);2891}28922893element.setAttribute('aria-expanded', true);2894}28952896if (callback) {2897callback();2898}2899};29002901// static29022903Tab._jQueryInterface = function _jQueryInterface(config) {2904return this.each(function () {2905var $this = $(this);2906var data = $this.data(DATA_KEY);29072908if (!data) {2909data = new Tab(this);2910$this.data(DATA_KEY, data);2911}29122913if (typeof config === 'string') {2914if (data[config] === undefined) {2915throw new Error('No method named "' + config + '"');2916}2917data[config]();2918}2919});2920};29212922_createClass(Tab, null, [{2923key: 'VERSION',2924get: function get() {2925return VERSION;2926}2927}]);29282929return Tab;2930}();29312932/**2933* ------------------------------------------------------------------------2934* Data Api implementation2935* ------------------------------------------------------------------------2936*/29372938$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {2939event.preventDefault();2940Tab._jQueryInterface.call($(this), 'show');2941});29422943/**2944* ------------------------------------------------------------------------2945* jQuery2946* ------------------------------------------------------------------------2947*/29482949$.fn[NAME] = Tab._jQueryInterface;2950$.fn[NAME].Constructor = Tab;2951$.fn[NAME].noConflict = function () {2952$.fn[NAME] = JQUERY_NO_CONFLICT;2953return Tab._jQueryInterface;2954};29552956return Tab;2957}(jQuery);29582959/* global Popper */29602961/**2962* --------------------------------------------------------------------------2963* Bootstrap (v4.0.0-beta): tooltip.js2964* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)2965* --------------------------------------------------------------------------2966*/29672968var Tooltip = function ($) {29692970/**2971* Check for Popper dependency2972* Popper - https://popper.js.org2973*/2974if (typeof Popper === 'undefined') {2975throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');2976}29772978/**2979* ------------------------------------------------------------------------2980* Constants2981* ------------------------------------------------------------------------2982*/29832984var NAME = 'tooltip';2985var VERSION = '4.0.0-beta';2986var DATA_KEY = 'bs.tooltip';2987var EVENT_KEY = '.' + DATA_KEY;2988var JQUERY_NO_CONFLICT = $.fn[NAME];2989var TRANSITION_DURATION = 150;2990var CLASS_PREFIX = 'bs-tooltip';2991var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');29922993var DefaultType = {2994animation: 'boolean',2995template: 'string',2996title: '(string|element|function)',2997trigger: 'string',2998delay: '(number|object)',2999html: 'boolean',3000selector: '(string|boolean)',3001placement: '(string|function)',3002offset: '(number|string)',3003container: '(string|element|boolean)',3004fallbackPlacement: '(string|array)'3005};30063007var AttachmentMap = {3008AUTO: 'auto',3009TOP: 'top',3010RIGHT: 'right',3011BOTTOM: 'bottom',3012LEFT: 'left'3013};30143015var Default = {3016animation: true,3017template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',3018trigger: 'hover focus',3019title: '',3020delay: 0,3021html: false,3022selector: false,3023placement: 'top',3024offset: 0,3025container: false,3026fallbackPlacement: 'flip'3027};30283029var HoverState = {3030SHOW: 'show',3031OUT: 'out'3032};30333034var Event = {3035HIDE: 'hide' + EVENT_KEY,3036HIDDEN: 'hidden' + EVENT_KEY,3037SHOW: 'show' + EVENT_KEY,3038SHOWN: 'shown' + EVENT_KEY,3039INSERTED: 'inserted' + EVENT_KEY,3040CLICK: 'click' + EVENT_KEY,3041FOCUSIN: 'focusin' + EVENT_KEY,3042FOCUSOUT: 'focusout' + EVENT_KEY,3043MOUSEENTER: 'mouseenter' + EVENT_KEY,3044MOUSELEAVE: 'mouseleave' + EVENT_KEY3045};30463047var ClassName = {3048FADE: 'fade',3049SHOW: 'show'3050};30513052var Selector = {3053TOOLTIP: '.tooltip',3054TOOLTIP_INNER: '.tooltip-inner',3055ARROW: '.arrow'3056};30573058var Trigger = {3059HOVER: 'hover',3060FOCUS: 'focus',3061CLICK: 'click',3062MANUAL: 'manual'30633064/**3065* ------------------------------------------------------------------------3066* Class Definition3067* ------------------------------------------------------------------------3068*/30693070};3071var Tooltip = function () {3072function Tooltip(element, config) {3073_classCallCheck(this, Tooltip);30743075// private3076this._isEnabled = true;3077this._timeout = 0;3078this._hoverState = '';3079this._activeTrigger = {};3080this._popper = null;30813082// protected3083this.element = element;3084this.config = this._getConfig(config);3085this.tip = null;30863087this._setListeners();3088}30893090// getters30913092// public30933094Tooltip.prototype.enable = function enable() {3095this._isEnabled = true;3096};30973098Tooltip.prototype.disable = function disable() {3099this._isEnabled = false;3100};31013102Tooltip.prototype.toggleEnabled = function toggleEnabled() {3103this._isEnabled = !this._isEnabled;3104};31053106Tooltip.prototype.toggle = function toggle(event) {3107if (event) {3108var dataKey = this.constructor.DATA_KEY;3109var context = $(event.currentTarget).data(dataKey);31103111if (!context) {3112context = new this.constructor(event.currentTarget, this._getDelegateConfig());3113$(event.currentTarget).data(dataKey, context);3114}31153116context._activeTrigger.click = !context._activeTrigger.click;31173118if (context._isWithActiveTrigger()) {3119context._enter(null, context);3120} else {3121context._leave(null, context);3122}3123} else {31243125if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {3126this._leave(null, this);3127return;3128}31293130this._enter(null, this);3131}3132};31333134Tooltip.prototype.dispose = function dispose() {3135clearTimeout(this._timeout);31363137$.removeData(this.element, this.constructor.DATA_KEY);31383139$(this.element).off(this.constructor.EVENT_KEY);3140$(this.element).closest('.modal').off('hide.bs.modal');31413142if (this.tip) {3143$(this.tip).remove();3144}31453146this._isEnabled = null;3147this._timeout = null;3148this._hoverState = null;3149this._activeTrigger = null;3150if (this._popper !== null) {3151this._popper.destroy();3152}3153this._popper = null;31543155this.element = null;3156this.config = null;3157this.tip = null;3158};31593160Tooltip.prototype.show = function show() {3161var _this24 = this;31623163if ($(this.element).css('display') === 'none') {3164throw new Error('Please use show on visible elements');3165}31663167var showEvent = $.Event(this.constructor.Event.SHOW);3168if (this.isWithContent() && this._isEnabled) {3169$(this.element).trigger(showEvent);31703171var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);31723173if (showEvent.isDefaultPrevented() || !isInTheDom) {3174return;3175}31763177var tip = this.getTipElement();3178var tipId = Util.getUID(this.constructor.NAME);31793180tip.setAttribute('id', tipId);3181this.element.setAttribute('aria-describedby', tipId);31823183this.setContent();31843185if (this.config.animation) {3186$(tip).addClass(ClassName.FADE);3187}31883189var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;31903191var attachment = this._getAttachment(placement);3192this.addAttachmentClass(attachment);31933194var container = this.config.container === false ? document.body : $(this.config.container);31953196$(tip).data(this.constructor.DATA_KEY, this);31973198if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {3199$(tip).appendTo(container);3200}32013202$(this.element).trigger(this.constructor.Event.INSERTED);32033204this._popper = new Popper(this.element, tip, {3205placement: attachment,3206modifiers: {3207offset: {3208offset: this.config.offset3209},3210flip: {3211behavior: this.config.fallbackPlacement3212},3213arrow: {3214element: Selector.ARROW3215}3216},3217onCreate: function onCreate(data) {3218if (data.originalPlacement !== data.placement) {3219_this24._handlePopperPlacementChange(data);3220}3221},3222onUpdate: function onUpdate(data) {3223_this24._handlePopperPlacementChange(data);3224}3225});32263227$(tip).addClass(ClassName.SHOW);32283229// if this is a touch-enabled device we add extra3230// empty mouseover listeners to the body's immediate children;3231// only needed because of broken event delegation on iOS3232// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html3233if ('ontouchstart' in document.documentElement) {3234$('body').children().on('mouseover', null, $.noop);3235}32363237var complete = function complete() {3238if (_this24.config.animation) {3239_this24._fixTransition();3240}3241var prevHoverState = _this24._hoverState;3242_this24._hoverState = null;32433244$(_this24.element).trigger(_this24.constructor.Event.SHOWN);32453246if (prevHoverState === HoverState.OUT) {3247_this24._leave(null, _this24);3248}3249};32503251if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {3252$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);3253} else {3254complete();3255}3256}3257};32583259Tooltip.prototype.hide = function hide(callback) {3260var _this25 = this;32613262var tip = this.getTipElement();3263var hideEvent = $.Event(this.constructor.Event.HIDE);3264var complete = function complete() {3265if (_this25._hoverState !== HoverState.SHOW && tip.parentNode) {3266tip.parentNode.removeChild(tip);3267}32683269_this25._cleanTipClass();3270_this25.element.removeAttribute('aria-describedby');3271$(_this25.element).trigger(_this25.constructor.Event.HIDDEN);3272if (_this25._popper !== null) {3273_this25._popper.destroy();3274}32753276if (callback) {3277callback();3278}3279};32803281$(this.element).trigger(hideEvent);32823283if (hideEvent.isDefaultPrevented()) {3284return;3285}32863287$(tip).removeClass(ClassName.SHOW);32883289// if this is a touch-enabled device we remove the extra3290// empty mouseover listeners we added for iOS support3291if ('ontouchstart' in document.documentElement) {3292$('body').children().off('mouseover', null, $.noop);3293}32943295this._activeTrigger[Trigger.CLICK] = false;3296this._activeTrigger[Trigger.FOCUS] = false;3297this._activeTrigger[Trigger.HOVER] = false;32983299if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {33003301$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);3302} else {3303complete();3304}33053306this._hoverState = '';3307};33083309Tooltip.prototype.update = function update() {3310if (this._popper !== null) {3311this._popper.scheduleUpdate();3312}3313};33143315// protected33163317Tooltip.prototype.isWithContent = function isWithContent() {3318return Boolean(this.getTitle());3319};33203321Tooltip.prototype.addAttachmentClass = function addAttachmentClass(attachment) {3322$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);3323};33243325Tooltip.prototype.getTipElement = function getTipElement() {3326return this.tip = this.tip || $(this.config.template)[0];3327};33283329Tooltip.prototype.setContent = function setContent() {3330var $tip = $(this.getTipElement());3331this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());3332$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);3333};33343335Tooltip.prototype.setElementContent = function setElementContent($element, content) {3336var html = this.config.html;3337if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) {3338// content is a DOM node or a jQuery3339if (html) {3340if (!$(content).parent().is($element)) {3341$element.empty().append(content);3342}3343} else {3344$element.text($(content).text());3345}3346} else {3347$element[html ? 'html' : 'text'](content);3348}3349};33503351Tooltip.prototype.getTitle = function getTitle() {3352var title = this.element.getAttribute('data-original-title');33533354if (!title) {3355title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;3356}33573358return title;3359};33603361// private33623363Tooltip.prototype._getAttachment = function _getAttachment(placement) {3364return AttachmentMap[placement.toUpperCase()];3365};33663367Tooltip.prototype._setListeners = function _setListeners() {3368var _this26 = this;33693370var triggers = this.config.trigger.split(' ');33713372triggers.forEach(function (trigger) {3373if (trigger === 'click') {3374$(_this26.element).on(_this26.constructor.Event.CLICK, _this26.config.selector, function (event) {3375return _this26.toggle(event);3376});3377} else if (trigger !== Trigger.MANUAL) {3378var eventIn = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSEENTER : _this26.constructor.Event.FOCUSIN;3379var eventOut = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSELEAVE : _this26.constructor.Event.FOCUSOUT;33803381$(_this26.element).on(eventIn, _this26.config.selector, function (event) {3382return _this26._enter(event);3383}).on(eventOut, _this26.config.selector, function (event) {3384return _this26._leave(event);3385});3386}33873388$(_this26.element).closest('.modal').on('hide.bs.modal', function () {3389return _this26.hide();3390});3391});33923393if (this.config.selector) {3394this.config = $.extend({}, this.config, {3395trigger: 'manual',3396selector: ''3397});3398} else {3399this._fixTitle();3400}3401};34023403Tooltip.prototype._fixTitle = function _fixTitle() {3404var titleType = _typeof(this.element.getAttribute('data-original-title'));3405if (this.element.getAttribute('title') || titleType !== 'string') {3406this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');3407this.element.setAttribute('title', '');3408}3409};34103411Tooltip.prototype._enter = function _enter(event, context) {3412var dataKey = this.constructor.DATA_KEY;34133414context = context || $(event.currentTarget).data(dataKey);34153416if (!context) {3417context = new this.constructor(event.currentTarget, this._getDelegateConfig());3418$(event.currentTarget).data(dataKey, context);3419}34203421if (event) {3422context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;3423}34243425if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {3426context._hoverState = HoverState.SHOW;3427return;3428}34293430clearTimeout(context._timeout);34313432context._hoverState = HoverState.SHOW;34333434if (!context.config.delay || !context.config.delay.show) {3435context.show();3436return;3437}34383439context._timeout = setTimeout(function () {3440if (context._hoverState === HoverState.SHOW) {3441context.show();3442}3443}, context.config.delay.show);3444};34453446Tooltip.prototype._leave = function _leave(event, context) {3447var dataKey = this.constructor.DATA_KEY;34483449context = context || $(event.currentTarget).data(dataKey);34503451if (!context) {3452context = new this.constructor(event.currentTarget, this._getDelegateConfig());3453$(event.currentTarget).data(dataKey, context);3454}34553456if (event) {3457context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;3458}34593460if (context._isWithActiveTrigger()) {3461return;3462}34633464clearTimeout(context._timeout);34653466context._hoverState = HoverState.OUT;34673468if (!context.config.delay || !context.config.delay.hide) {3469context.hide();3470return;3471}34723473context._timeout = setTimeout(function () {3474if (context._hoverState === HoverState.OUT) {3475context.hide();3476}3477}, context.config.delay.hide);3478};34793480Tooltip.prototype._isWithActiveTrigger = function _isWithActiveTrigger() {3481for (var trigger in this._activeTrigger) {3482if (this._activeTrigger[trigger]) {3483return true;3484}3485}34863487return false;3488};34893490Tooltip.prototype._getConfig = function _getConfig(config) {3491config = $.extend({}, this.constructor.Default, $(this.element).data(), config);34923493if (config.delay && typeof config.delay === 'number') {3494config.delay = {3495show: config.delay,3496hide: config.delay3497};3498}34993500if (config.title && typeof config.title === 'number') {3501config.title = config.title.toString();3502}35033504if (config.content && typeof config.content === 'number') {3505config.content = config.content.toString();3506}35073508Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);35093510return config;3511};35123513Tooltip.prototype._getDelegateConfig = function _getDelegateConfig() {3514var config = {};35153516if (this.config) {3517for (var key in this.config) {3518if (this.constructor.Default[key] !== this.config[key]) {3519config[key] = this.config[key];3520}3521}3522}35233524return config;3525};35263527Tooltip.prototype._cleanTipClass = function _cleanTipClass() {3528var $tip = $(this.getTipElement());3529var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);3530if (tabClass !== null && tabClass.length > 0) {3531$tip.removeClass(tabClass.join(''));3532}3533};35343535Tooltip.prototype._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {3536this._cleanTipClass();3537this.addAttachmentClass(this._getAttachment(data.placement));3538};35393540Tooltip.prototype._fixTransition = function _fixTransition() {3541var tip = this.getTipElement();3542var initConfigAnimation = this.config.animation;3543if (tip.getAttribute('x-placement') !== null) {3544return;3545}3546$(tip).removeClass(ClassName.FADE);3547this.config.animation = false;3548this.hide();3549this.show();3550this.config.animation = initConfigAnimation;3551};35523553// static35543555Tooltip._jQueryInterface = function _jQueryInterface(config) {3556return this.each(function () {3557var data = $(this).data(DATA_KEY);3558var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config;35593560if (!data && /dispose|hide/.test(config)) {3561return;3562}35633564if (!data) {3565data = new Tooltip(this, _config);3566$(this).data(DATA_KEY, data);3567}35683569if (typeof config === 'string') {3570if (data[config] === undefined) {3571throw new Error('No method named "' + config + '"');3572}3573data[config]();3574}3575});3576};35773578_createClass(Tooltip, null, [{3579key: 'VERSION',3580get: function get() {3581return VERSION;3582}3583}, {3584key: 'Default',3585get: function get() {3586return Default;3587}3588}, {3589key: 'NAME',3590get: function get() {3591return NAME;3592}3593}, {3594key: 'DATA_KEY',3595get: function get() {3596return DATA_KEY;3597}3598}, {3599key: 'Event',3600get: function get() {3601return Event;3602}3603}, {3604key: 'EVENT_KEY',3605get: function get() {3606return EVENT_KEY;3607}3608}, {3609key: 'DefaultType',3610get: function get() {3611return DefaultType;3612}3613}]);36143615return Tooltip;3616}();36173618/**3619* ------------------------------------------------------------------------3620* jQuery3621* ------------------------------------------------------------------------3622*/36233624$.fn[NAME] = Tooltip._jQueryInterface;3625$.fn[NAME].Constructor = Tooltip;3626$.fn[NAME].noConflict = function () {3627$.fn[NAME] = JQUERY_NO_CONFLICT;3628return Tooltip._jQueryInterface;3629};36303631return Tooltip;3632}(jQuery);36333634/**3635* --------------------------------------------------------------------------3636* Bootstrap (v4.0.0-beta): popover.js3637* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)3638* --------------------------------------------------------------------------3639*/36403641var Popover = function ($) {36423643/**3644* ------------------------------------------------------------------------3645* Constants3646* ------------------------------------------------------------------------3647*/36483649var NAME = 'popover';3650var VERSION = '4.0.0-beta';3651var DATA_KEY = 'bs.popover';3652var EVENT_KEY = '.' + DATA_KEY;3653var JQUERY_NO_CONFLICT = $.fn[NAME];3654var CLASS_PREFIX = 'bs-popover';3655var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');36563657var Default = $.extend({}, Tooltip.Default, {3658placement: 'right',3659trigger: 'click',3660content: '',3661template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'3662});36633664var DefaultType = $.extend({}, Tooltip.DefaultType, {3665content: '(string|element|function)'3666});36673668var ClassName = {3669FADE: 'fade',3670SHOW: 'show'3671};36723673var Selector = {3674TITLE: '.popover-header',3675CONTENT: '.popover-body'3676};36773678var Event = {3679HIDE: 'hide' + EVENT_KEY,3680HIDDEN: 'hidden' + EVENT_KEY,3681SHOW: 'show' + EVENT_KEY,3682SHOWN: 'shown' + EVENT_KEY,3683INSERTED: 'inserted' + EVENT_KEY,3684CLICK: 'click' + EVENT_KEY,3685FOCUSIN: 'focusin' + EVENT_KEY,3686FOCUSOUT: 'focusout' + EVENT_KEY,3687MOUSEENTER: 'mouseenter' + EVENT_KEY,3688MOUSELEAVE: 'mouseleave' + EVENT_KEY36893690/**3691* ------------------------------------------------------------------------3692* Class Definition3693* ------------------------------------------------------------------------3694*/36953696};3697var Popover = function (_Tooltip) {3698_inherits(Popover, _Tooltip);36993700function Popover() {3701_classCallCheck(this, Popover);37023703return _possibleConstructorReturn(this, _Tooltip.apply(this, arguments));3704}37053706// overrides37073708Popover.prototype.isWithContent = function isWithContent() {3709return this.getTitle() || this._getContent();3710};37113712Popover.prototype.addAttachmentClass = function addAttachmentClass(attachment) {3713$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);3714};37153716Popover.prototype.getTipElement = function getTipElement() {3717return this.tip = this.tip || $(this.config.template)[0];3718};37193720Popover.prototype.setContent = function setContent() {3721var $tip = $(this.getTipElement());37223723// we use append for html objects to maintain js events3724this.setElementContent($tip.find(Selector.TITLE), this.getTitle());3725this.setElementContent($tip.find(Selector.CONTENT), this._getContent());37263727$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);3728};37293730// private37313732Popover.prototype._getContent = function _getContent() {3733return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);3734};37353736Popover.prototype._cleanTipClass = function _cleanTipClass() {3737var $tip = $(this.getTipElement());3738var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);3739if (tabClass !== null && tabClass.length > 0) {3740$tip.removeClass(tabClass.join(''));3741}3742};37433744// static37453746Popover._jQueryInterface = function _jQueryInterface(config) {3747return this.each(function () {3748var data = $(this).data(DATA_KEY);3749var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;37503751if (!data && /destroy|hide/.test(config)) {3752return;3753}37543755if (!data) {3756data = new Popover(this, _config);3757$(this).data(DATA_KEY, data);3758}37593760if (typeof config === 'string') {3761if (data[config] === undefined) {3762throw new Error('No method named "' + config + '"');3763}3764data[config]();3765}3766});3767};37683769_createClass(Popover, null, [{3770key: 'VERSION',377137723773// getters37743775get: function get() {3776return VERSION;3777}3778}, {3779key: 'Default',3780get: function get() {3781return Default;3782}3783}, {3784key: 'NAME',3785get: function get() {3786return NAME;3787}3788}, {3789key: 'DATA_KEY',3790get: function get() {3791return DATA_KEY;3792}3793}, {3794key: 'Event',3795get: function get() {3796return Event;3797}3798}, {3799key: 'EVENT_KEY',3800get: function get() {3801return EVENT_KEY;3802}3803}, {3804key: 'DefaultType',3805get: function get() {3806return DefaultType;3807}3808}]);38093810return Popover;3811}(Tooltip);38123813/**3814* ------------------------------------------------------------------------3815* jQuery3816* ------------------------------------------------------------------------3817*/38183819$.fn[NAME] = Popover._jQueryInterface;3820$.fn[NAME].Constructor = Popover;3821$.fn[NAME].noConflict = function () {3822$.fn[NAME] = JQUERY_NO_CONFLICT;3823return Popover._jQueryInterface;3824};38253826return Popover;3827}(jQuery);382838293830})();38313832