2 * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com)
3 * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 if (typeof jQuery
=== 'undefined') {
8 throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
12 var version
= $.fn
.jquery
.split(' ')[0].split('.')
13 if ((version
[0] < 2 && version
[1] < 9) || (version
[0] == 1 && version
[1] == 9 && version
[2] < 1) || (version
[0] >= 4)) {
14 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
21 var _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
; };
23 var _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
; }; }();
25 function _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
; }
27 function _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
; }
29 function _classCallCheck(instance
, Constructor
) { if (!(instance
instanceof Constructor
)) { throw new TypeError("Cannot call a class as a function"); } }
32 * --------------------------------------------------------------------------
33 * Bootstrap (v4.0.0-alpha.6): util.js
34 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
35 * --------------------------------------------------------------------------
38 var Util = function ($) {
41 * ------------------------------------------------------------------------
42 * Private TransitionEnd Helpers
43 * ------------------------------------------------------------------------
46 var transition
= false;
48 var MAX_UID
= 1000000;
50 var TransitionEndEvent
= {
51 WebkitTransition
: 'webkitTransitionEnd',
52 MozTransition
: 'transitionend',
53 OTransition
: 'oTransitionEnd otransitionend',
54 transition
: 'transitionend'
57 // shoutout AngusCroll (https://goo.gl/pxwQGp)
58 function toType(obj
) {
59 return {}.toString
.call(obj
).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
62 function isElement(obj
) {
63 return (obj
[0] || obj
).nodeType
;
66 function getSpecialTransitionEndEvent() {
68 bindType
: transition
.end
,
69 delegateType
: transition
.end
,
70 handle
: function handle(event
) {
71 if ($(event
.target
).is(this)) {
72 return event
.handleObj
.handler
.apply(this, arguments
); // eslint-disable-line prefer-rest-params
79 function transitionEndTest() {
84 var el
= document
.createElement('bootstrap');
86 for (var name
in TransitionEndEvent
) {
87 if (el
.style
[name
] !== undefined) {
89 end
: TransitionEndEvent
[name
]
97 function transitionEndEmulator(duration
) {
102 $(this).one(Util
.TRANSITION_END
, function () {
106 setTimeout(function () {
108 Util
.triggerTransitionEnd(_this
);
115 function setTransitionEndSupport() {
116 transition
= transitionEndTest();
118 $.fn
.emulateTransitionEnd
= transitionEndEmulator
;
120 if (Util
.supportsTransitionEnd()) {
121 $.event
.special
[Util
.TRANSITION_END
] = getSpecialTransitionEndEvent();
126 * --------------------------------------------------------------------------
128 * --------------------------------------------------------------------------
133 TRANSITION_END
: 'bsTransitionEnd',
135 getUID
: function getUID(prefix
) {
137 // eslint-disable-next-line no-bitwise
138 prefix
+= ~~(Math
.random() * MAX_UID
); // "~~" acts like a faster Math.floor() here
139 } while (document
.getElementById(prefix
));
142 getSelectorFromElement
: function getSelectorFromElement(element
) {
143 var selector
= element
.getAttribute('data-target');
146 selector
= element
.getAttribute('href') || '';
147 selector
= /^#[a-z]/i.test(selector
) ? selector
: null;
152 reflow
: function reflow(element
) {
153 return element
.offsetHeight
;
155 triggerTransitionEnd
: function triggerTransitionEnd(element
) {
156 $(element
).trigger(transition
.end
);
158 supportsTransitionEnd
: function supportsTransitionEnd() {
159 return Boolean(transition
);
161 typeCheckConfig
: function typeCheckConfig(componentName
, config
, configTypes
) {
162 for (var property
in configTypes
) {
163 if (configTypes
.hasOwnProperty(property
)) {
164 var expectedTypes
= configTypes
[property
];
165 var value
= config
[property
];
166 var valueType
= value
&& isElement(value
) ? 'element' : toType(value
);
168 if (!new RegExp(expectedTypes
).test(valueType
)) {
169 throw new Error(componentName
.toUpperCase() + ': ' + ('Option "' + property
+ '" provided type "' + valueType
+ '" ') + ('but expected type "' + expectedTypes
+ '".'));
176 setTransitionEndSupport();
182 * --------------------------------------------------------------------------
183 * Bootstrap (v4.0.0-alpha.6): alert.js
184 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
185 * --------------------------------------------------------------------------
188 var Alert = function ($) {
191 * ------------------------------------------------------------------------
193 * ------------------------------------------------------------------------
197 var VERSION
= '4.0.0-alpha.6';
198 var DATA_KEY
= 'bs.alert';
199 var EVENT_KEY
= '.' + DATA_KEY
;
200 var DATA_API_KEY
= '.data-api';
201 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
202 var TRANSITION_DURATION
= 150;
205 DISMISS
: '[data-dismiss="alert"]'
209 CLOSE
: 'close' + EVENT_KEY
,
210 CLOSED
: 'closed' + EVENT_KEY
,
211 CLICK_DATA_API
: 'click' + EVENT_KEY
+ DATA_API_KEY
221 * ------------------------------------------------------------------------
223 * ------------------------------------------------------------------------
226 var Alert = function () {
227 function Alert(element
) {
228 _classCallCheck(this, Alert
);
230 this._element
= element
;
237 Alert
.prototype.close
= function close(element
) {
238 element
= element
|| this._element
;
240 var rootElement
= this._getRootElement(element
);
241 var customEvent
= this._triggerCloseEvent(rootElement
);
243 if (customEvent
.isDefaultPrevented()) {
247 this._removeElement(rootElement
);
250 Alert
.prototype.dispose
= function dispose() {
251 $.removeData(this._element
, DATA_KEY
);
252 this._element
= null;
257 Alert
.prototype._getRootElement
= function _getRootElement(element
) {
258 var selector
= Util
.getSelectorFromElement(element
);
262 parent
= $(selector
)[0];
266 parent
= $(element
).closest('.' + ClassName
.ALERT
)[0];
272 Alert
.prototype._triggerCloseEvent
= function _triggerCloseEvent(element
) {
273 var closeEvent
= $.Event(Event
.CLOSE
);
275 $(element
).trigger(closeEvent
);
279 Alert
.prototype._removeElement
= function _removeElement(element
) {
282 $(element
).removeClass(ClassName
.SHOW
);
284 if (!Util
.supportsTransitionEnd() || !$(element
).hasClass(ClassName
.FADE
)) {
285 this._destroyElement(element
);
289 $(element
).one(Util
.TRANSITION_END
, function (event
) {
290 return _this2
._destroyElement(element
, event
);
291 }).emulateTransitionEnd(TRANSITION_DURATION
);
294 Alert
.prototype._destroyElement
= function _destroyElement(element
) {
295 $(element
).detach().trigger(Event
.CLOSED
).remove();
300 Alert
._jQueryInterface
= function _jQueryInterface(config
) {
301 return this.each(function () {
302 var $element
= $(this);
303 var data
= $element
.data(DATA_KEY
);
306 data
= new Alert(this);
307 $element
.data(DATA_KEY
, data
);
310 if (config
=== 'close') {
316 Alert
._handleDismiss
= function _handleDismiss(alertInstance
) {
317 return function (event
) {
319 event
.preventDefault();
322 alertInstance
.close(this);
326 _createClass(Alert
, null, [{
328 get: function get() {
337 * ------------------------------------------------------------------------
338 * Data Api implementation
339 * ------------------------------------------------------------------------
342 $(document
).on(Event
.CLICK_DATA_API
, Selector
.DISMISS
, Alert
._handleDismiss(new Alert()));
345 * ------------------------------------------------------------------------
347 * ------------------------------------------------------------------------
350 $.fn
[NAME
] = Alert
._jQueryInterface
;
351 $.fn
[NAME
].Constructor
= Alert
;
352 $.fn
[NAME
].noConflict = function () {
353 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
354 return Alert
._jQueryInterface
;
361 * --------------------------------------------------------------------------
362 * Bootstrap (v4.0.0-alpha.6): button.js
363 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
364 * --------------------------------------------------------------------------
367 var Button = function ($) {
370 * ------------------------------------------------------------------------
372 * ------------------------------------------------------------------------
376 var VERSION
= '4.0.0-alpha.6';
377 var DATA_KEY
= 'bs.button';
378 var EVENT_KEY
= '.' + DATA_KEY
;
379 var DATA_API_KEY
= '.data-api';
380 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
389 DATA_TOGGLE_CARROT
: '[data-toggle^="button"]',
390 DATA_TOGGLE
: '[data-toggle="buttons"]',
397 CLICK_DATA_API
: 'click' + EVENT_KEY
+ DATA_API_KEY
,
398 FOCUS_BLUR_DATA_API
: 'focus' + EVENT_KEY
+ DATA_API_KEY
+ ' ' + ('blur' + EVENT_KEY
+ DATA_API_KEY
)
402 * ------------------------------------------------------------------------
404 * ------------------------------------------------------------------------
407 var Button = function () {
408 function Button(element
) {
409 _classCallCheck(this, Button
);
411 this._element
= element
;
418 Button
.prototype.toggle
= function toggle() {
419 var triggerChangeEvent
= true;
420 var rootElement
= $(this._element
).closest(Selector
.DATA_TOGGLE
)[0];
423 var input
= $(this._element
).find(Selector
.INPUT
)[0];
426 if (input
.type
=== 'radio') {
427 if (input
.checked
&& $(this._element
).hasClass(ClassName
.ACTIVE
)) {
428 triggerChangeEvent
= false;
430 var activeElement
= $(rootElement
).find(Selector
.ACTIVE
)[0];
433 $(activeElement
).removeClass(ClassName
.ACTIVE
);
438 if (triggerChangeEvent
) {
439 input
.checked
= !$(this._element
).hasClass(ClassName
.ACTIVE
);
440 $(input
).trigger('change');
447 this._element
.setAttribute('aria-pressed', !$(this._element
).hasClass(ClassName
.ACTIVE
));
449 if (triggerChangeEvent
) {
450 $(this._element
).toggleClass(ClassName
.ACTIVE
);
454 Button
.prototype.dispose
= function dispose() {
455 $.removeData(this._element
, DATA_KEY
);
456 this._element
= null;
461 Button
._jQueryInterface
= function _jQueryInterface(config
) {
462 return this.each(function () {
463 var data
= $(this).data(DATA_KEY
);
466 data
= new Button(this);
467 $(this).data(DATA_KEY
, data
);
470 if (config
=== 'toggle') {
476 _createClass(Button
, null, [{
478 get: function get() {
487 * ------------------------------------------------------------------------
488 * Data Api implementation
489 * ------------------------------------------------------------------------
492 $(document
).on(Event
.CLICK_DATA_API
, Selector
.DATA_TOGGLE_CARROT
, function (event
) {
493 event
.preventDefault();
495 var button
= event
.target
;
497 if (!$(button
).hasClass(ClassName
.BUTTON
)) {
498 button
= $(button
).closest(Selector
.BUTTON
);
501 Button
._jQueryInterface
.call($(button
), 'toggle');
502 }).on(Event
.FOCUS_BLUR_DATA_API
, Selector
.DATA_TOGGLE_CARROT
, function (event
) {
503 var button
= $(event
.target
).closest(Selector
.BUTTON
)[0];
504 $(button
).toggleClass(ClassName
.FOCUS
, /^focus(in)?$/.test(event
.type
));
508 * ------------------------------------------------------------------------
510 * ------------------------------------------------------------------------
513 $.fn
[NAME
] = Button
._jQueryInterface
;
514 $.fn
[NAME
].Constructor
= Button
;
515 $.fn
[NAME
].noConflict = function () {
516 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
517 return Button
._jQueryInterface
;
524 * --------------------------------------------------------------------------
525 * Bootstrap (v4.0.0-alpha.6): carousel.js
526 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
527 * --------------------------------------------------------------------------
530 var Carousel = function ($) {
533 * ------------------------------------------------------------------------
535 * ------------------------------------------------------------------------
538 var NAME
= 'carousel';
539 var VERSION
= '4.0.0-alpha.6';
540 var DATA_KEY
= 'bs.carousel';
541 var EVENT_KEY
= '.' + DATA_KEY
;
542 var DATA_API_KEY
= '.data-api';
543 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
544 var TRANSITION_DURATION
= 600;
545 var ARROW_LEFT_KEYCODE
= 37; // KeyboardEvent.which value for left arrow key
546 var ARROW_RIGHT_KEYCODE
= 39; // KeyboardEvent.which value for right arrow key
557 interval
: '(number|boolean)',
559 slide
: '(boolean|string)',
560 pause
: '(string|boolean)',
572 SLIDE
: 'slide' + EVENT_KEY
,
573 SLID
: 'slid' + EVENT_KEY
,
574 KEYDOWN
: 'keydown' + EVENT_KEY
,
575 MOUSEENTER
: 'mouseenter' + EVENT_KEY
,
576 MOUSELEAVE
: 'mouseleave' + EVENT_KEY
,
577 LOAD_DATA_API
: 'load' + EVENT_KEY
+ DATA_API_KEY
,
578 CLICK_DATA_API
: 'click' + EVENT_KEY
+ DATA_API_KEY
582 CAROUSEL
: 'carousel',
585 RIGHT
: 'carousel-item-right',
586 LEFT
: 'carousel-item-left',
587 NEXT
: 'carousel-item-next',
588 PREV
: 'carousel-item-prev',
589 ITEM
: 'carousel-item'
594 ACTIVE_ITEM
: '.active.carousel-item',
595 ITEM
: '.carousel-item',
596 NEXT_PREV
: '.carousel-item-next, .carousel-item-prev',
597 INDICATORS
: '.carousel-indicators',
598 DATA_SLIDE
: '[data-slide], [data-slide-to]',
599 DATA_RIDE
: '[data-ride="carousel"]'
603 * ------------------------------------------------------------------------
605 * ------------------------------------------------------------------------
608 var Carousel = function () {
609 function Carousel(element
, config
) {
610 _classCallCheck(this, Carousel
);
613 this._interval
= null;
614 this._activeElement
= null;
616 this._isPaused
= false;
617 this._isSliding
= false;
619 this._config
= this._getConfig(config
);
620 this._element
= $(element
)[0];
621 this._indicatorsElement
= $(this._element
).find(Selector
.INDICATORS
)[0];
623 this._addEventListeners();
630 Carousel
.prototype.next
= function next() {
631 if (this._isSliding
) {
632 throw new Error('Carousel is sliding');
634 this._slide(Direction
.NEXT
);
637 Carousel
.prototype.nextWhenVisible
= function nextWhenVisible() {
638 // Don't call next when the page isn't visible
639 if (!document
.hidden
) {
644 Carousel
.prototype.prev
= function prev() {
645 if (this._isSliding
) {
646 throw new Error('Carousel is sliding');
648 this._slide(Direction
.PREVIOUS
);
651 Carousel
.prototype.pause
= function pause(event
) {
653 this._isPaused
= true;
656 if ($(this._element
).find(Selector
.NEXT_PREV
)[0] && Util
.supportsTransitionEnd()) {
657 Util
.triggerTransitionEnd(this._element
);
661 clearInterval(this._interval
);
662 this._interval
= null;
665 Carousel
.prototype.cycle
= function cycle(event
) {
667 this._isPaused
= false;
670 if (this._interval
) {
671 clearInterval(this._interval
);
672 this._interval
= null;
675 if (this._config
.interval
&& !this._isPaused
) {
676 this._interval
= setInterval((document
.visibilityState
? this.nextWhenVisible
: this.next
).bind(this), this._config
.interval
);
680 Carousel
.prototype.to
= function to(index
) {
683 this._activeElement
= $(this._element
).find(Selector
.ACTIVE_ITEM
)[0];
685 var activeIndex
= this._getItemIndex(this._activeElement
);
687 if (index
> this._items
.length
- 1 || index
< 0) {
691 if (this._isSliding
) {
692 $(this._element
).one(Event
.SLID
, function () {
693 return _this3
.to(index
);
698 if (activeIndex
=== index
) {
704 var direction
= index
> activeIndex
? Direction
.NEXT
: Direction
.PREVIOUS
;
706 this._slide(direction
, this._items
[index
]);
709 Carousel
.prototype.dispose
= function dispose() {
710 $(this._element
).off(EVENT_KEY
);
711 $.removeData(this._element
, DATA_KEY
);
715 this._element
= null;
716 this._interval
= null;
717 this._isPaused
= null;
718 this._isSliding
= null;
719 this._activeElement
= null;
720 this._indicatorsElement
= null;
725 Carousel
.prototype._getConfig
= function _getConfig(config
) {
726 config
= $.extend({}, Default
, config
);
727 Util
.typeCheckConfig(NAME
, config
, DefaultType
);
731 Carousel
.prototype._addEventListeners
= function _addEventListeners() {
734 if (this._config
.keyboard
) {
735 $(this._element
).on(Event
.KEYDOWN
, function (event
) {
736 return _this4
._keydown(event
);
740 if (this._config
.pause
=== 'hover' && !('ontouchstart' in document
.documentElement
)) {
741 $(this._element
).on(Event
.MOUSEENTER
, function (event
) {
742 return _this4
.pause(event
);
743 }).on(Event
.MOUSELEAVE
, function (event
) {
744 return _this4
.cycle(event
);
749 Carousel
.prototype._keydown
= function _keydown(event
) {
750 if (/input|textarea/i.test(event
.target
.tagName
)) {
754 switch (event
.which
) {
755 case ARROW_LEFT_KEYCODE
:
756 event
.preventDefault();
759 case ARROW_RIGHT_KEYCODE
:
760 event
.preventDefault();
768 Carousel
.prototype._getItemIndex
= function _getItemIndex(element
) {
769 this._items
= $.makeArray($(element
).parent().find(Selector
.ITEM
));
770 return this._items
.indexOf(element
);
773 Carousel
.prototype._getItemByDirection
= function _getItemByDirection(direction
, activeElement
) {
774 var isNextDirection
= direction
=== Direction
.NEXT
;
775 var isPrevDirection
= direction
=== Direction
.PREVIOUS
;
776 var activeIndex
= this._getItemIndex(activeElement
);
777 var lastItemIndex
= this._items
.length
- 1;
778 var isGoingToWrap
= isPrevDirection
&& activeIndex
=== 0 || isNextDirection
&& activeIndex
=== lastItemIndex
;
780 if (isGoingToWrap
&& !this._config
.wrap
) {
781 return activeElement
;
784 var delta
= direction
=== Direction
.PREVIOUS
? -1 : 1;
785 var itemIndex
= (activeIndex
+ delta
) % this._items
.length
;
787 return itemIndex
=== -1 ? this._items
[this._items
.length
- 1] : this._items
[itemIndex
];
790 Carousel
.prototype._triggerSlideEvent
= function _triggerSlideEvent(relatedTarget
, eventDirectionName
) {
791 var slideEvent
= $.Event(Event
.SLIDE
, {
792 relatedTarget
: relatedTarget
,
793 direction
: eventDirectionName
796 $(this._element
).trigger(slideEvent
);
801 Carousel
.prototype._setActiveIndicatorElement
= function _setActiveIndicatorElement(element
) {
802 if (this._indicatorsElement
) {
803 $(this._indicatorsElement
).find(Selector
.ACTIVE
).removeClass(ClassName
.ACTIVE
);
805 var nextIndicator
= this._indicatorsElement
.children
[this._getItemIndex(element
)];
808 $(nextIndicator
).addClass(ClassName
.ACTIVE
);
813 Carousel
.prototype._slide
= function _slide(direction
, element
) {
816 var activeElement
= $(this._element
).find(Selector
.ACTIVE_ITEM
)[0];
817 var nextElement
= element
|| activeElement
&& this._getItemByDirection(direction
, activeElement
);
819 var isCycling
= Boolean(this._interval
);
821 var directionalClassName
= void 0;
822 var orderClassName
= void 0;
823 var eventDirectionName
= void 0;
825 if (direction
=== Direction
.NEXT
) {
826 directionalClassName
= ClassName
.LEFT
;
827 orderClassName
= ClassName
.NEXT
;
828 eventDirectionName
= Direction
.LEFT
;
830 directionalClassName
= ClassName
.RIGHT
;
831 orderClassName
= ClassName
.PREV
;
832 eventDirectionName
= Direction
.RIGHT
;
835 if (nextElement
&& $(nextElement
).hasClass(ClassName
.ACTIVE
)) {
836 this._isSliding
= false;
840 var slideEvent
= this._triggerSlideEvent(nextElement
, eventDirectionName
);
841 if (slideEvent
.isDefaultPrevented()) {
845 if (!activeElement
|| !nextElement
) {
846 // some weirdness is happening, so we bail
850 this._isSliding
= true;
856 this._setActiveIndicatorElement(nextElement
);
858 var slidEvent
= $.Event(Event
.SLID
, {
859 relatedTarget
: nextElement
,
860 direction
: eventDirectionName
863 if (Util
.supportsTransitionEnd() && $(this._element
).hasClass(ClassName
.SLIDE
)) {
865 $(nextElement
).addClass(orderClassName
);
867 Util
.reflow(nextElement
);
869 $(activeElement
).addClass(directionalClassName
);
870 $(nextElement
).addClass(directionalClassName
);
872 $(activeElement
).one(Util
.TRANSITION_END
, function () {
873 $(nextElement
).removeClass(directionalClassName
+ ' ' + orderClassName
).addClass(ClassName
.ACTIVE
);
875 $(activeElement
).removeClass(ClassName
.ACTIVE
+ ' ' + orderClassName
+ ' ' + directionalClassName
);
877 _this5
._isSliding
= false;
879 setTimeout(function () {
880 return $(_this5
._element
).trigger(slidEvent
);
882 }).emulateTransitionEnd(TRANSITION_DURATION
);
884 $(activeElement
).removeClass(ClassName
.ACTIVE
);
885 $(nextElement
).addClass(ClassName
.ACTIVE
);
887 this._isSliding
= false;
888 $(this._element
).trigger(slidEvent
);
898 Carousel
._jQueryInterface
= function _jQueryInterface(config
) {
899 return this.each(function () {
900 var data
= $(this).data(DATA_KEY
);
901 var _config
= $.extend({}, Default
, $(this).data());
903 if ((typeof config
=== 'undefined' ? 'undefined' : _typeof(config
)) === 'object') {
904 $.extend(_config
, config
);
907 var action
= typeof config
=== 'string' ? config
: _config
.slide
;
910 data
= new Carousel(this, _config
);
911 $(this).data(DATA_KEY
, data
);
914 if (typeof config
=== 'number') {
916 } else if (typeof action
=== 'string') {
917 if (data
[action
] === undefined) {
918 throw new Error('No method named "' + action
+ '"');
921 } else if (_config
.interval
) {
928 Carousel
._dataApiClickHandler
= function _dataApiClickHandler(event
) {
929 var selector
= Util
.getSelectorFromElement(this);
935 var target
= $(selector
)[0];
937 if (!target
|| !$(target
).hasClass(ClassName
.CAROUSEL
)) {
941 var config
= $.extend({}, $(target
).data(), $(this).data());
942 var slideIndex
= this.getAttribute('data-slide-to');
945 config
.interval
= false;
948 Carousel
._jQueryInterface
.call($(target
), config
);
951 $(target
).data(DATA_KEY
).to(slideIndex
);
954 event
.preventDefault();
957 _createClass(Carousel
, null, [{
959 get: function get() {
964 get: function get() {
973 * ------------------------------------------------------------------------
974 * Data Api implementation
975 * ------------------------------------------------------------------------
978 $(document
).on(Event
.CLICK_DATA_API
, Selector
.DATA_SLIDE
, Carousel
._dataApiClickHandler
);
980 $(window
).on(Event
.LOAD_DATA_API
, function () {
981 $(Selector
.DATA_RIDE
).each(function () {
982 var $carousel
= $(this);
983 Carousel
._jQueryInterface
.call($carousel
, $carousel
.data());
988 * ------------------------------------------------------------------------
990 * ------------------------------------------------------------------------
993 $.fn
[NAME
] = Carousel
._jQueryInterface
;
994 $.fn
[NAME
].Constructor
= Carousel
;
995 $.fn
[NAME
].noConflict = function () {
996 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
997 return Carousel
._jQueryInterface
;
1004 * --------------------------------------------------------------------------
1005 * Bootstrap (v4.0.0-alpha.6): collapse.js
1006 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1007 * --------------------------------------------------------------------------
1010 var Collapse = function ($) {
1013 * ------------------------------------------------------------------------
1015 * ------------------------------------------------------------------------
1018 var NAME
= 'collapse';
1019 var VERSION
= '4.0.0-alpha.6';
1020 var DATA_KEY
= 'bs.collapse';
1021 var EVENT_KEY
= '.' + DATA_KEY
;
1022 var DATA_API_KEY
= '.data-api';
1023 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
1024 var TRANSITION_DURATION
= 600;
1037 SHOW
: 'show' + EVENT_KEY
,
1038 SHOWN
: 'shown' + EVENT_KEY
,
1039 HIDE
: 'hide' + EVENT_KEY
,
1040 HIDDEN
: 'hidden' + EVENT_KEY
,
1041 CLICK_DATA_API
: 'click' + EVENT_KEY
+ DATA_API_KEY
1046 COLLAPSE
: 'collapse',
1047 COLLAPSING
: 'collapsing',
1048 COLLAPSED
: 'collapsed'
1057 ACTIVES
: '.card > .show, .card > .collapsing',
1058 DATA_TOGGLE
: '[data-toggle="collapse"]'
1062 * ------------------------------------------------------------------------
1064 * ------------------------------------------------------------------------
1067 var Collapse = function () {
1068 function Collapse(element
, config
) {
1069 _classCallCheck(this, Collapse
);
1071 this._isTransitioning
= false;
1072 this._element
= element
;
1073 this._config
= this._getConfig(config
);
1074 this._triggerArray
= $.makeArray($('[data-toggle="collapse"][href="#' + element
.id
+ '"],' + ('[data-toggle="collapse"][data-target="#' + element
.id
+ '"]')));
1076 this._parent
= this._config
.parent
? this._getParent() : null;
1078 if (!this._config
.parent
) {
1079 this._addAriaAndCollapsedClass(this._element
, this._triggerArray
);
1082 if (this._config
.toggle
) {
1091 Collapse
.prototype.toggle
= function toggle() {
1092 if ($(this._element
).hasClass(ClassName
.SHOW
)) {
1099 Collapse
.prototype.show
= function show() {
1102 if (this._isTransitioning
) {
1103 throw new Error('Collapse is transitioning');
1106 if ($(this._element
).hasClass(ClassName
.SHOW
)) {
1110 var actives
= void 0;
1111 var activesData
= void 0;
1114 actives
= $.makeArray($(this._parent
).find(Selector
.ACTIVES
));
1115 if (!actives
.length
) {
1121 activesData
= $(actives
).data(DATA_KEY
);
1122 if (activesData
&& activesData
._isTransitioning
) {
1127 var startEvent
= $.Event(Event
.SHOW
);
1128 $(this._element
).trigger(startEvent
);
1129 if (startEvent
.isDefaultPrevented()) {
1134 Collapse
._jQueryInterface
.call($(actives
), 'hide');
1136 $(actives
).data(DATA_KEY
, null);
1140 var dimension
= this._getDimension();
1142 $(this._element
).removeClass(ClassName
.COLLAPSE
).addClass(ClassName
.COLLAPSING
);
1144 this._element
.style
[dimension
] = 0;
1145 this._element
.setAttribute('aria-expanded', true);
1147 if (this._triggerArray
.length
) {
1148 $(this._triggerArray
).removeClass(ClassName
.COLLAPSED
).attr('aria-expanded', true);
1151 this.setTransitioning(true);
1153 var complete
= function complete() {
1154 $(_this6
._element
).removeClass(ClassName
.COLLAPSING
).addClass(ClassName
.COLLAPSE
).addClass(ClassName
.SHOW
);
1156 _this6
._element
.style
[dimension
] = '';
1158 _this6
.setTransitioning(false);
1160 $(_this6
._element
).trigger(Event
.SHOWN
);
1163 if (!Util
.supportsTransitionEnd()) {
1168 var capitalizedDimension
= dimension
[0].toUpperCase() + dimension
.slice(1);
1169 var scrollSize
= 'scroll' + capitalizedDimension
;
1171 $(this._element
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(TRANSITION_DURATION
);
1173 this._element
.style
[dimension
] = this._element
[scrollSize
] + 'px';
1176 Collapse
.prototype.hide
= function hide() {
1179 if (this._isTransitioning
) {
1180 throw new Error('Collapse is transitioning');
1183 if (!$(this._element
).hasClass(ClassName
.SHOW
)) {
1187 var startEvent
= $.Event(Event
.HIDE
);
1188 $(this._element
).trigger(startEvent
);
1189 if (startEvent
.isDefaultPrevented()) {
1193 var dimension
= this._getDimension();
1194 var offsetDimension
= dimension
=== Dimension
.WIDTH
? 'offsetWidth' : 'offsetHeight';
1196 this._element
.style
[dimension
] = this._element
[offsetDimension
] + 'px';
1198 Util
.reflow(this._element
);
1200 $(this._element
).addClass(ClassName
.COLLAPSING
).removeClass(ClassName
.COLLAPSE
).removeClass(ClassName
.SHOW
);
1202 this._element
.setAttribute('aria-expanded', false);
1204 if (this._triggerArray
.length
) {
1205 $(this._triggerArray
).addClass(ClassName
.COLLAPSED
).attr('aria-expanded', false);
1208 this.setTransitioning(true);
1210 var complete
= function complete() {
1211 _this7
.setTransitioning(false);
1212 $(_this7
._element
).removeClass(ClassName
.COLLAPSING
).addClass(ClassName
.COLLAPSE
).trigger(Event
.HIDDEN
);
1215 this._element
.style
[dimension
] = '';
1217 if (!Util
.supportsTransitionEnd()) {
1222 $(this._element
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(TRANSITION_DURATION
);
1225 Collapse
.prototype.setTransitioning
= function setTransitioning(isTransitioning
) {
1226 this._isTransitioning
= isTransitioning
;
1229 Collapse
.prototype.dispose
= function dispose() {
1230 $.removeData(this._element
, DATA_KEY
);
1232 this._config
= null;
1233 this._parent
= null;
1234 this._element
= null;
1235 this._triggerArray
= null;
1236 this._isTransitioning
= null;
1241 Collapse
.prototype._getConfig
= function _getConfig(config
) {
1242 config
= $.extend({}, Default
, config
);
1243 config
.toggle
= Boolean(config
.toggle
); // coerce string values
1244 Util
.typeCheckConfig(NAME
, config
, DefaultType
);
1248 Collapse
.prototype._getDimension
= function _getDimension() {
1249 var hasWidth
= $(this._element
).hasClass(Dimension
.WIDTH
);
1250 return hasWidth
? Dimension
.WIDTH
: Dimension
.HEIGHT
;
1253 Collapse
.prototype._getParent
= function _getParent() {
1256 var parent
= $(this._config
.parent
)[0];
1257 var selector
= '[data-toggle="collapse"][data-parent="' + this._config
.parent
+ '"]';
1259 $(parent
).find(selector
).each(function (i
, element
) {
1260 _this8
._addAriaAndCollapsedClass(Collapse
._getTargetFromElement(element
), [element
]);
1266 Collapse
.prototype._addAriaAndCollapsedClass
= function _addAriaAndCollapsedClass(element
, triggerArray
) {
1268 var isOpen
= $(element
).hasClass(ClassName
.SHOW
);
1269 element
.setAttribute('aria-expanded', isOpen
);
1271 if (triggerArray
.length
) {
1272 $(triggerArray
).toggleClass(ClassName
.COLLAPSED
, !isOpen
).attr('aria-expanded', isOpen
);
1279 Collapse
._getTargetFromElement
= function _getTargetFromElement(element
) {
1280 var selector
= Util
.getSelectorFromElement(element
);
1281 return selector
? $(selector
)[0] : null;
1284 Collapse
._jQueryInterface
= function _jQueryInterface(config
) {
1285 return this.each(function () {
1286 var $this = $(this);
1287 var data
= $this.data(DATA_KEY
);
1288 var _config
= $.extend({}, Default
, $this.data(), (typeof config
=== 'undefined' ? 'undefined' : _typeof(config
)) === 'object' && config
);
1290 if (!data
&& _config
.toggle
&& /show|hide/.test(config
)) {
1291 _config
.toggle
= false;
1295 data
= new Collapse(this, _config
);
1296 $this.data(DATA_KEY
, data
);
1299 if (typeof config
=== 'string') {
1300 if (data
[config
] === undefined) {
1301 throw new Error('No method named "' + config
+ '"');
1308 _createClass(Collapse
, null, [{
1310 get: function get() {
1315 get: function get() {
1324 * ------------------------------------------------------------------------
1325 * Data Api implementation
1326 * ------------------------------------------------------------------------
1329 $(document
).on(Event
.CLICK_DATA_API
, Selector
.DATA_TOGGLE
, function (event
) {
1330 event
.preventDefault();
1332 var target
= Collapse
._getTargetFromElement(this);
1333 var data
= $(target
).data(DATA_KEY
);
1334 var config
= data
? 'toggle' : $(this).data();
1336 Collapse
._jQueryInterface
.call($(target
), config
);
1340 * ------------------------------------------------------------------------
1342 * ------------------------------------------------------------------------
1345 $.fn
[NAME
] = Collapse
._jQueryInterface
;
1346 $.fn
[NAME
].Constructor
= Collapse
;
1347 $.fn
[NAME
].noConflict = function () {
1348 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
1349 return Collapse
._jQueryInterface
;
1356 * --------------------------------------------------------------------------
1357 * Bootstrap (v4.0.0-alpha.6): dropdown.js
1358 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1359 * --------------------------------------------------------------------------
1362 var Dropdown = function ($) {
1365 * ------------------------------------------------------------------------
1367 * ------------------------------------------------------------------------
1370 var NAME
= 'dropdown';
1371 var VERSION
= '4.0.0-alpha.6';
1372 var DATA_KEY
= 'bs.dropdown';
1373 var EVENT_KEY
= '.' + DATA_KEY
;
1374 var DATA_API_KEY
= '.data-api';
1375 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
1376 var ESCAPE_KEYCODE
= 27; // KeyboardEvent.which value for Escape (Esc) key
1377 var ARROW_UP_KEYCODE
= 38; // KeyboardEvent.which value for up arrow key
1378 var ARROW_DOWN_KEYCODE
= 40; // KeyboardEvent.which value for down arrow key
1379 var RIGHT_MOUSE_BUTTON_WHICH
= 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
1382 HIDE
: 'hide' + EVENT_KEY
,
1383 HIDDEN
: 'hidden' + EVENT_KEY
,
1384 SHOW
: 'show' + EVENT_KEY
,
1385 SHOWN
: 'shown' + EVENT_KEY
,
1386 CLICK
: 'click' + EVENT_KEY
,
1387 CLICK_DATA_API
: 'click' + EVENT_KEY
+ DATA_API_KEY
,
1388 FOCUSIN_DATA_API
: 'focusin' + EVENT_KEY
+ DATA_API_KEY
,
1389 KEYDOWN_DATA_API
: 'keydown' + EVENT_KEY
+ DATA_API_KEY
1393 BACKDROP
: 'dropdown-backdrop',
1394 DISABLED
: 'disabled',
1399 BACKDROP
: '.dropdown-backdrop',
1400 DATA_TOGGLE
: '[data-toggle="dropdown"]',
1401 FORM_CHILD
: '.dropdown form',
1402 ROLE_MENU
: '[role="menu"]',
1403 ROLE_LISTBOX
: '[role="listbox"]',
1404 NAVBAR_NAV
: '.navbar-nav',
1405 VISIBLE_ITEMS
: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a'
1409 * ------------------------------------------------------------------------
1411 * ------------------------------------------------------------------------
1414 var Dropdown = function () {
1415 function Dropdown(element
) {
1416 _classCallCheck(this, Dropdown
);
1418 this._element
= element
;
1420 this._addEventListeners();
1427 Dropdown
.prototype.toggle
= function toggle() {
1428 if (this.disabled
|| $(this).hasClass(ClassName
.DISABLED
)) {
1432 var parent
= Dropdown
._getParentFromElement(this);
1433 var isActive
= $(parent
).hasClass(ClassName
.SHOW
);
1435 Dropdown
._clearMenus();
1441 if ('ontouchstart' in document
.documentElement
&& !$(parent
).closest(Selector
.NAVBAR_NAV
).length
) {
1443 // if mobile we use a backdrop because click events don't delegate
1444 var dropdown
= document
.createElement('div');
1445 dropdown
.className
= ClassName
.BACKDROP
;
1446 $(dropdown
).insertBefore(this);
1447 $(dropdown
).on('click', Dropdown
._clearMenus
);
1450 var relatedTarget
= {
1453 var showEvent
= $.Event(Event
.SHOW
, relatedTarget
);
1455 $(parent
).trigger(showEvent
);
1457 if (showEvent
.isDefaultPrevented()) {
1462 this.setAttribute('aria-expanded', true);
1464 $(parent
).toggleClass(ClassName
.SHOW
);
1465 $(parent
).trigger($.Event(Event
.SHOWN
, relatedTarget
));
1470 Dropdown
.prototype.dispose
= function dispose() {
1471 $.removeData(this._element
, DATA_KEY
);
1472 $(this._element
).off(EVENT_KEY
);
1473 this._element
= null;
1478 Dropdown
.prototype._addEventListeners
= function _addEventListeners() {
1479 $(this._element
).on(Event
.CLICK
, this.toggle
);
1484 Dropdown
._jQueryInterface
= function _jQueryInterface(config
) {
1485 return this.each(function () {
1486 var data
= $(this).data(DATA_KEY
);
1489 data
= new Dropdown(this);
1490 $(this).data(DATA_KEY
, data
);
1493 if (typeof config
=== 'string') {
1494 if (data
[config
] === undefined) {
1495 throw new Error('No method named "' + config
+ '"');
1497 data
[config
].call(this);
1502 Dropdown
._clearMenus
= function _clearMenus(event
) {
1503 if (event
&& event
.which
=== RIGHT_MOUSE_BUTTON_WHICH
) {
1507 var backdrop
= $(Selector
.BACKDROP
)[0];
1509 backdrop
.parentNode
.removeChild(backdrop
);
1512 var toggles
= $.makeArray($(Selector
.DATA_TOGGLE
));
1514 for (var i
= 0; i
< toggles
.length
; i
++) {
1515 var parent
= Dropdown
._getParentFromElement(toggles
[i
]);
1516 var relatedTarget
= {
1517 relatedTarget
: toggles
[i
]
1520 if (!$(parent
).hasClass(ClassName
.SHOW
)) {
1524 if (event
&& (event
.type
=== 'click' && /input|textarea/i.test(event
.target
.tagName
) || event
.type
=== 'focusin') && $.contains(parent
, event
.target
)) {
1528 var hideEvent
= $.Event(Event
.HIDE
, relatedTarget
);
1529 $(parent
).trigger(hideEvent
);
1530 if (hideEvent
.isDefaultPrevented()) {
1534 toggles
[i
].setAttribute('aria-expanded', 'false');
1536 $(parent
).removeClass(ClassName
.SHOW
).trigger($.Event(Event
.HIDDEN
, relatedTarget
));
1540 Dropdown
._getParentFromElement
= function _getParentFromElement(element
) {
1541 var parent
= void 0;
1542 var selector
= Util
.getSelectorFromElement(element
);
1545 parent
= $(selector
)[0];
1548 return parent
|| element
.parentNode
;
1551 Dropdown
._dataApiKeydownHandler
= function _dataApiKeydownHandler(event
) {
1552 if (!/(38|40|27|32)/.test(event
.which
) || /input|textarea/i.test(event
.target
.tagName
)) {
1556 event
.preventDefault();
1557 event
.stopPropagation();
1559 if (this.disabled
|| $(this).hasClass(ClassName
.DISABLED
)) {
1563 var parent
= Dropdown
._getParentFromElement(this);
1564 var isActive
= $(parent
).hasClass(ClassName
.SHOW
);
1566 if (!isActive
&& event
.which
!== ESCAPE_KEYCODE
|| isActive
&& event
.which
=== ESCAPE_KEYCODE
) {
1568 if (event
.which
=== ESCAPE_KEYCODE
) {
1569 var toggle
= $(parent
).find(Selector
.DATA_TOGGLE
)[0];
1570 $(toggle
).trigger('focus');
1573 $(this).trigger('click');
1577 var items
= $(parent
).find(Selector
.VISIBLE_ITEMS
).get();
1579 if (!items
.length
) {
1583 var index
= items
.indexOf(event
.target
);
1585 if (event
.which
=== ARROW_UP_KEYCODE
&& index
> 0) {
1590 if (event
.which
=== ARROW_DOWN_KEYCODE
&& index
< items
.length
- 1) {
1599 items
[index
].focus();
1602 _createClass(Dropdown
, null, [{
1604 get: function get() {
1613 * ------------------------------------------------------------------------
1614 * Data Api implementation
1615 * ------------------------------------------------------------------------
1618 $(document
).on(Event
.KEYDOWN_DATA_API
, Selector
.DATA_TOGGLE
, Dropdown
._dataApiKeydownHandler
).on(Event
.KEYDOWN_DATA_API
, Selector
.ROLE_MENU
, Dropdown
._dataApiKeydownHandler
).on(Event
.KEYDOWN_DATA_API
, Selector
.ROLE_LISTBOX
, Dropdown
._dataApiKeydownHandler
).on(Event
.CLICK_DATA_API
+ ' ' + Event
.FOCUSIN_DATA_API
, Dropdown
._clearMenus
).on(Event
.CLICK_DATA_API
, Selector
.DATA_TOGGLE
, Dropdown
.prototype.toggle
).on(Event
.CLICK_DATA_API
, Selector
.FORM_CHILD
, function (e
) {
1619 e
.stopPropagation();
1623 * ------------------------------------------------------------------------
1625 * ------------------------------------------------------------------------
1628 $.fn
[NAME
] = Dropdown
._jQueryInterface
;
1629 $.fn
[NAME
].Constructor
= Dropdown
;
1630 $.fn
[NAME
].noConflict = function () {
1631 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
1632 return Dropdown
._jQueryInterface
;
1639 * --------------------------------------------------------------------------
1640 * Bootstrap (v4.0.0-alpha.6): modal.js
1641 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1642 * --------------------------------------------------------------------------
1645 var Modal = function ($) {
1648 * ------------------------------------------------------------------------
1650 * ------------------------------------------------------------------------
1654 var VERSION
= '4.0.0-alpha.6';
1655 var DATA_KEY
= 'bs.modal';
1656 var EVENT_KEY
= '.' + DATA_KEY
;
1657 var DATA_API_KEY
= '.data-api';
1658 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
1659 var TRANSITION_DURATION
= 300;
1660 var BACKDROP_TRANSITION_DURATION
= 150;
1661 var ESCAPE_KEYCODE
= 27; // KeyboardEvent.which value for Escape (Esc) key
1671 backdrop
: '(boolean|string)',
1672 keyboard
: 'boolean',
1678 HIDE
: 'hide' + EVENT_KEY
,
1679 HIDDEN
: 'hidden' + EVENT_KEY
,
1680 SHOW
: 'show' + EVENT_KEY
,
1681 SHOWN
: 'shown' + EVENT_KEY
,
1682 FOCUSIN
: 'focusin' + EVENT_KEY
,
1683 RESIZE
: 'resize' + EVENT_KEY
,
1684 CLICK_DISMISS
: 'click.dismiss' + EVENT_KEY
,
1685 KEYDOWN_DISMISS
: 'keydown.dismiss' + EVENT_KEY
,
1686 MOUSEUP_DISMISS
: 'mouseup.dismiss' + EVENT_KEY
,
1687 MOUSEDOWN_DISMISS
: 'mousedown.dismiss' + EVENT_KEY
,
1688 CLICK_DATA_API
: 'click' + EVENT_KEY
+ DATA_API_KEY
1692 SCROLLBAR_MEASURER
: 'modal-scrollbar-measure',
1693 BACKDROP
: 'modal-backdrop',
1700 DIALOG
: '.modal-dialog',
1701 DATA_TOGGLE
: '[data-toggle="modal"]',
1702 DATA_DISMISS
: '[data-dismiss="modal"]',
1703 FIXED_CONTENT
: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
1707 * ------------------------------------------------------------------------
1709 * ------------------------------------------------------------------------
1712 var Modal = function () {
1713 function Modal(element
, config
) {
1714 _classCallCheck(this, Modal
);
1716 this._config
= this._getConfig(config
);
1717 this._element
= element
;
1718 this._dialog
= $(element
).find(Selector
.DIALOG
)[0];
1719 this._backdrop
= null;
1720 this._isShown
= false;
1721 this._isBodyOverflowing
= false;
1722 this._ignoreBackdropClick
= false;
1723 this._isTransitioning
= false;
1724 this._originalBodyPadding
= 0;
1725 this._scrollbarWidth
= 0;
1732 Modal
.prototype.toggle
= function toggle(relatedTarget
) {
1733 return this._isShown
? this.hide() : this.show(relatedTarget
);
1736 Modal
.prototype.show
= function show(relatedTarget
) {
1739 if (this._isTransitioning
) {
1740 throw new Error('Modal is transitioning');
1743 if (Util
.supportsTransitionEnd() && $(this._element
).hasClass(ClassName
.FADE
)) {
1744 this._isTransitioning
= true;
1746 var showEvent
= $.Event(Event
.SHOW
, {
1747 relatedTarget
: relatedTarget
1750 $(this._element
).trigger(showEvent
);
1752 if (this._isShown
|| showEvent
.isDefaultPrevented()) {
1756 this._isShown
= true;
1758 this._checkScrollbar();
1759 this._setScrollbar();
1761 $(document
.body
).addClass(ClassName
.OPEN
);
1763 this._setEscapeEvent();
1764 this._setResizeEvent();
1766 $(this._element
).on(Event
.CLICK_DISMISS
, Selector
.DATA_DISMISS
, function (event
) {
1767 return _this9
.hide(event
);
1770 $(this._dialog
).on(Event
.MOUSEDOWN_DISMISS
, function () {
1771 $(_this9
._element
).one(Event
.MOUSEUP_DISMISS
, function (event
) {
1772 if ($(event
.target
).is(_this9
._element
)) {
1773 _this9
._ignoreBackdropClick
= true;
1778 this._showBackdrop(function () {
1779 return _this9
._showElement(relatedTarget
);
1783 Modal
.prototype.hide
= function hide(event
) {
1787 event
.preventDefault();
1790 if (this._isTransitioning
) {
1791 throw new Error('Modal is transitioning');
1794 var transition
= Util
.supportsTransitionEnd() && $(this._element
).hasClass(ClassName
.FADE
);
1796 this._isTransitioning
= true;
1799 var hideEvent
= $.Event(Event
.HIDE
);
1800 $(this._element
).trigger(hideEvent
);
1802 if (!this._isShown
|| hideEvent
.isDefaultPrevented()) {
1806 this._isShown
= false;
1808 this._setEscapeEvent();
1809 this._setResizeEvent();
1811 $(document
).off(Event
.FOCUSIN
);
1813 $(this._element
).removeClass(ClassName
.SHOW
);
1815 $(this._element
).off(Event
.CLICK_DISMISS
);
1816 $(this._dialog
).off(Event
.MOUSEDOWN_DISMISS
);
1819 $(this._element
).one(Util
.TRANSITION_END
, function (event
) {
1820 return _this10
._hideModal(event
);
1821 }).emulateTransitionEnd(TRANSITION_DURATION
);
1827 Modal
.prototype.dispose
= function dispose() {
1828 $.removeData(this._element
, DATA_KEY
);
1830 $(window
, document
, this._element
, this._backdrop
).off(EVENT_KEY
);
1832 this._config
= null;
1833 this._element
= null;
1834 this._dialog
= null;
1835 this._backdrop
= null;
1836 this._isShown
= null;
1837 this._isBodyOverflowing
= null;
1838 this._ignoreBackdropClick
= null;
1839 this._originalBodyPadding
= null;
1840 this._scrollbarWidth
= null;
1845 Modal
.prototype._getConfig
= function _getConfig(config
) {
1846 config
= $.extend({}, Default
, config
);
1847 Util
.typeCheckConfig(NAME
, config
, DefaultType
);
1851 Modal
.prototype._showElement
= function _showElement(relatedTarget
) {
1854 var transition
= Util
.supportsTransitionEnd() && $(this._element
).hasClass(ClassName
.FADE
);
1856 if (!this._element
.parentNode
|| this._element
.parentNode
.nodeType
!== Node
.ELEMENT_NODE
) {
1857 // don't move modals dom position
1858 document
.body
.appendChild(this._element
);
1861 this._element
.style
.display
= 'block';
1862 this._element
.removeAttribute('aria-hidden');
1863 this._element
.scrollTop
= 0;
1866 Util
.reflow(this._element
);
1869 $(this._element
).addClass(ClassName
.SHOW
);
1871 if (this._config
.focus
) {
1872 this._enforceFocus();
1875 var shownEvent
= $.Event(Event
.SHOWN
, {
1876 relatedTarget
: relatedTarget
1879 var transitionComplete
= function transitionComplete() {
1880 if (_this11
._config
.focus
) {
1881 _this11
._element
.focus();
1883 _this11
._isTransitioning
= false;
1884 $(_this11
._element
).trigger(shownEvent
);
1888 $(this._dialog
).one(Util
.TRANSITION_END
, transitionComplete
).emulateTransitionEnd(TRANSITION_DURATION
);
1890 transitionComplete();
1894 Modal
.prototype._enforceFocus
= function _enforceFocus() {
1897 $(document
).off(Event
.FOCUSIN
) // guard against infinite focus loop
1898 .on(Event
.FOCUSIN
, function (event
) {
1899 if (document
!== event
.target
&& _this12
._element
!== event
.target
&& !$(_this12
._element
).has(event
.target
).length
) {
1900 _this12
._element
.focus();
1905 Modal
.prototype._setEscapeEvent
= function _setEscapeEvent() {
1908 if (this._isShown
&& this._config
.keyboard
) {
1909 $(this._element
).on(Event
.KEYDOWN_DISMISS
, function (event
) {
1910 if (event
.which
=== ESCAPE_KEYCODE
) {
1914 } else if (!this._isShown
) {
1915 $(this._element
).off(Event
.KEYDOWN_DISMISS
);
1919 Modal
.prototype._setResizeEvent
= function _setResizeEvent() {
1922 if (this._isShown
) {
1923 $(window
).on(Event
.RESIZE
, function (event
) {
1924 return _this14
._handleUpdate(event
);
1927 $(window
).off(Event
.RESIZE
);
1931 Modal
.prototype._hideModal
= function _hideModal() {
1934 this._element
.style
.display
= 'none';
1935 this._element
.setAttribute('aria-hidden', 'true');
1936 this._isTransitioning
= false;
1937 this._showBackdrop(function () {
1938 $(document
.body
).removeClass(ClassName
.OPEN
);
1939 _this15
._resetAdjustments();
1940 _this15
._resetScrollbar();
1941 $(_this15
._element
).trigger(Event
.HIDDEN
);
1945 Modal
.prototype._removeBackdrop
= function _removeBackdrop() {
1946 if (this._backdrop
) {
1947 $(this._backdrop
).remove();
1948 this._backdrop
= null;
1952 Modal
.prototype._showBackdrop
= function _showBackdrop(callback
) {
1955 var animate
= $(this._element
).hasClass(ClassName
.FADE
) ? ClassName
.FADE
: '';
1957 if (this._isShown
&& this._config
.backdrop
) {
1958 var doAnimate
= Util
.supportsTransitionEnd() && animate
;
1960 this._backdrop
= document
.createElement('div');
1961 this._backdrop
.className
= ClassName
.BACKDROP
;
1964 $(this._backdrop
).addClass(animate
);
1967 $(this._backdrop
).appendTo(document
.body
);
1969 $(this._element
).on(Event
.CLICK_DISMISS
, function (event
) {
1970 if (_this16
._ignoreBackdropClick
) {
1971 _this16
._ignoreBackdropClick
= false;
1974 if (event
.target
!== event
.currentTarget
) {
1977 if (_this16
._config
.backdrop
=== 'static') {
1978 _this16
._element
.focus();
1985 Util
.reflow(this._backdrop
);
1988 $(this._backdrop
).addClass(ClassName
.SHOW
);
1999 $(this._backdrop
).one(Util
.TRANSITION_END
, callback
).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION
);
2000 } else if (!this._isShown
&& this._backdrop
) {
2001 $(this._backdrop
).removeClass(ClassName
.SHOW
);
2003 var callbackRemove
= function callbackRemove() {
2004 _this16
._removeBackdrop();
2010 if (Util
.supportsTransitionEnd() && $(this._element
).hasClass(ClassName
.FADE
)) {
2011 $(this._backdrop
).one(Util
.TRANSITION_END
, callbackRemove
).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION
);
2015 } else if (callback
) {
2020 // ----------------------------------------------------------------------
2021 // the following methods are used to handle overflowing modals
2022 // todo (fat): these should probably be refactored out of modal.js
2023 // ----------------------------------------------------------------------
2025 Modal
.prototype._handleUpdate
= function _handleUpdate() {
2026 this._adjustDialog();
2029 Modal
.prototype._adjustDialog
= function _adjustDialog() {
2030 var isModalOverflowing
= this._element
.scrollHeight
> document
.documentElement
.clientHeight
;
2032 if (!this._isBodyOverflowing
&& isModalOverflowing
) {
2033 this._element
.style
.paddingLeft
= this._scrollbarWidth
+ 'px';
2036 if (this._isBodyOverflowing
&& !isModalOverflowing
) {
2037 this._element
.style
.paddingRight
= this._scrollbarWidth
+ 'px';
2041 Modal
.prototype._resetAdjustments
= function _resetAdjustments() {
2042 this._element
.style
.paddingLeft
= '';
2043 this._element
.style
.paddingRight
= '';
2046 Modal
.prototype._checkScrollbar
= function _checkScrollbar() {
2047 this._isBodyOverflowing
= document
.body
.clientWidth
< window
.innerWidth
;
2048 this._scrollbarWidth
= this._getScrollbarWidth();
2051 Modal
.prototype._setScrollbar
= function _setScrollbar() {
2052 var bodyPadding
= parseInt($(Selector
.FIXED_CONTENT
).css('padding-right') || 0, 10);
2054 this._originalBodyPadding
= document
.body
.style
.paddingRight
|| '';
2056 if (this._isBodyOverflowing
) {
2057 document
.body
.style
.paddingRight
= bodyPadding
+ this._scrollbarWidth
+ 'px';
2061 Modal
.prototype._resetScrollbar
= function _resetScrollbar() {
2062 document
.body
.style
.paddingRight
= this._originalBodyPadding
;
2065 Modal
.prototype._getScrollbarWidth
= function _getScrollbarWidth() {
2067 var scrollDiv
= document
.createElement('div');
2068 scrollDiv
.className
= ClassName
.SCROLLBAR_MEASURER
;
2069 document
.body
.appendChild(scrollDiv
);
2070 var scrollbarWidth
= scrollDiv
.offsetWidth
- scrollDiv
.clientWidth
;
2071 document
.body
.removeChild(scrollDiv
);
2072 return scrollbarWidth
;
2077 Modal
._jQueryInterface
= function _jQueryInterface(config
, relatedTarget
) {
2078 return this.each(function () {
2079 var data
= $(this).data(DATA_KEY
);
2080 var _config
= $.extend({}, Modal
.Default
, $(this).data(), (typeof config
=== 'undefined' ? 'undefined' : _typeof(config
)) === 'object' && config
);
2083 data
= new Modal(this, _config
);
2084 $(this).data(DATA_KEY
, data
);
2087 if (typeof config
=== 'string') {
2088 if (data
[config
] === undefined) {
2089 throw new Error('No method named "' + config
+ '"');
2091 data
[config
](relatedTarget
);
2092 } else if (_config
.show
) {
2093 data
.show(relatedTarget
);
2098 _createClass(Modal
, null, [{
2100 get: function get() {
2105 get: function get() {
2114 * ------------------------------------------------------------------------
2115 * Data Api implementation
2116 * ------------------------------------------------------------------------
2119 $(document
).on(Event
.CLICK_DATA_API
, Selector
.DATA_TOGGLE
, function (event
) {
2122 var target
= void 0;
2123 var selector
= Util
.getSelectorFromElement(this);
2126 target
= $(selector
)[0];
2129 var config
= $(target
).data(DATA_KEY
) ? 'toggle' : $.extend({}, $(target
).data(), $(this).data());
2131 if (this.tagName
=== 'A' || this.tagName
=== 'AREA') {
2132 event
.preventDefault();
2135 var $target
= $(target
).one(Event
.SHOW
, function (showEvent
) {
2136 if (showEvent
.isDefaultPrevented()) {
2137 // only register focus restorer if modal will actually get shown
2141 $target
.one(Event
.HIDDEN
, function () {
2142 if ($(_this17
).is(':visible')) {
2148 Modal
._jQueryInterface
.call($(target
), config
, this);
2152 * ------------------------------------------------------------------------
2154 * ------------------------------------------------------------------------
2157 $.fn
[NAME
] = Modal
._jQueryInterface
;
2158 $.fn
[NAME
].Constructor
= Modal
;
2159 $.fn
[NAME
].noConflict = function () {
2160 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
2161 return Modal
._jQueryInterface
;
2168 * --------------------------------------------------------------------------
2169 * Bootstrap (v4.0.0-alpha.6): scrollspy.js
2170 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2171 * --------------------------------------------------------------------------
2174 var ScrollSpy = function ($) {
2177 * ------------------------------------------------------------------------
2179 * ------------------------------------------------------------------------
2182 var NAME
= 'scrollspy';
2183 var VERSION
= '4.0.0-alpha.6';
2184 var DATA_KEY
= 'bs.scrollspy';
2185 var EVENT_KEY
= '.' + DATA_KEY
;
2186 var DATA_API_KEY
= '.data-api';
2187 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
2198 target
: '(string|element)'
2202 ACTIVATE
: 'activate' + EVENT_KEY
,
2203 SCROLL
: 'scroll' + EVENT_KEY
,
2204 LOAD_DATA_API
: 'load' + EVENT_KEY
+ DATA_API_KEY
2208 DROPDOWN_ITEM
: 'dropdown-item',
2209 DROPDOWN_MENU
: 'dropdown-menu',
2210 NAV_LINK
: 'nav-link',
2216 DATA_SPY
: '[data-spy="scroll"]',
2218 LIST_ITEM
: '.list-item',
2220 LI_DROPDOWN
: 'li.dropdown',
2221 NAV_LINKS
: '.nav-link',
2222 DROPDOWN
: '.dropdown',
2223 DROPDOWN_ITEMS
: '.dropdown-item',
2224 DROPDOWN_TOGGLE
: '.dropdown-toggle'
2227 var OffsetMethod
= {
2229 POSITION
: 'position'
2233 * ------------------------------------------------------------------------
2235 * ------------------------------------------------------------------------
2238 var ScrollSpy = function () {
2239 function ScrollSpy(element
, config
) {
2242 _classCallCheck(this, ScrollSpy
);
2244 this._element
= element
;
2245 this._scrollElement
= element
.tagName
=== 'BODY' ? window
: element
;
2246 this._config
= this._getConfig(config
);
2247 this._selector
= this._config
.target
+ ' ' + Selector
.NAV_LINKS
+ ',' + (this._config
.target
+ ' ' + Selector
.DROPDOWN_ITEMS
);
2250 this._activeTarget
= null;
2251 this._scrollHeight
= 0;
2253 $(this._scrollElement
).on(Event
.SCROLL
, function (event
) {
2254 return _this18
._process(event
);
2265 ScrollSpy
.prototype.refresh
= function refresh() {
2268 var autoMethod
= this._scrollElement
!== this._scrollElement
.window
? OffsetMethod
.POSITION
: OffsetMethod
.OFFSET
;
2270 var offsetMethod
= this._config
.method
=== 'auto' ? autoMethod
: this._config
.method
;
2272 var offsetBase
= offsetMethod
=== OffsetMethod
.POSITION
? this._getScrollTop() : 0;
2277 this._scrollHeight
= this._getScrollHeight();
2279 var targets
= $.makeArray($(this._selector
));
2281 targets
.map(function (element
) {
2282 var target
= void 0;
2283 var targetSelector
= Util
.getSelectorFromElement(element
);
2285 if (targetSelector
) {
2286 target
= $(targetSelector
)[0];
2289 if (target
&& (target
.offsetWidth
|| target
.offsetHeight
)) {
2290 // todo (fat): remove sketch reliance on jQuery position/offset
2291 return [$(target
)[offsetMethod
]().top
+ offsetBase
, targetSelector
];
2294 }).filter(function (item
) {
2296 }).sort(function (a
, b
) {
2298 }).forEach(function (item
) {
2299 _this19
._offsets
.push(item
[0]);
2300 _this19
._targets
.push(item
[1]);
2304 ScrollSpy
.prototype.dispose
= function dispose() {
2305 $.removeData(this._element
, DATA_KEY
);
2306 $(this._scrollElement
).off(EVENT_KEY
);
2308 this._element
= null;
2309 this._scrollElement
= null;
2310 this._config
= null;
2311 this._selector
= null;
2312 this._offsets
= null;
2313 this._targets
= null;
2314 this._activeTarget
= null;
2315 this._scrollHeight
= null;
2320 ScrollSpy
.prototype._getConfig
= function _getConfig(config
) {
2321 config
= $.extend({}, Default
, config
);
2323 if (typeof config
.target
!== 'string') {
2324 var id
= $(config
.target
).attr('id');
2326 id
= Util
.getUID(NAME
);
2327 $(config
.target
).attr('id', id
);
2329 config
.target
= '#' + id
;
2332 Util
.typeCheckConfig(NAME
, config
, DefaultType
);
2337 ScrollSpy
.prototype._getScrollTop
= function _getScrollTop() {
2338 return this._scrollElement
=== window
? this._scrollElement
.pageYOffset
: this._scrollElement
.scrollTop
;
2341 ScrollSpy
.prototype._getScrollHeight
= function _getScrollHeight() {
2342 return this._scrollElement
.scrollHeight
|| Math
.max(document
.body
.scrollHeight
, document
.documentElement
.scrollHeight
);
2345 ScrollSpy
.prototype._getOffsetHeight
= function _getOffsetHeight() {
2346 return this._scrollElement
=== window
? window
.innerHeight
: this._scrollElement
.offsetHeight
;
2349 ScrollSpy
.prototype._process
= function _process() {
2350 var scrollTop
= this._getScrollTop() + this._config
.offset
;
2351 var scrollHeight
= this._getScrollHeight();
2352 var maxScroll
= this._config
.offset
+ scrollHeight
- this._getOffsetHeight();
2354 if (this._scrollHeight
!== scrollHeight
) {
2358 if (scrollTop
>= maxScroll
) {
2359 var target
= this._targets
[this._targets
.length
- 1];
2361 if (this._activeTarget
!== target
) {
2362 this._activate(target
);
2367 if (this._activeTarget
&& scrollTop
< this._offsets
[0] && this._offsets
[0] > 0) {
2368 this._activeTarget
= null;
2373 for (var i
= this._offsets
.length
; i
--;) {
2374 var isActiveTarget
= this._activeTarget
!== this._targets
[i
] && scrollTop
>= this._offsets
[i
] && (this._offsets
[i
+ 1] === undefined || scrollTop
< this._offsets
[i
+ 1]);
2376 if (isActiveTarget
) {
2377 this._activate(this._targets
[i
]);
2382 ScrollSpy
.prototype._activate
= function _activate(target
) {
2383 this._activeTarget
= target
;
2387 var queries
= this._selector
.split(',');
2388 queries
= queries
.map(function (selector
) {
2389 return selector
+ '[data-target="' + target
+ '"],' + (selector
+ '[href="' + target
+ '"]');
2392 var $link
= $(queries
.join(','));
2394 if ($link
.hasClass(ClassName
.DROPDOWN_ITEM
)) {
2395 $link
.closest(Selector
.DROPDOWN
).find(Selector
.DROPDOWN_TOGGLE
).addClass(ClassName
.ACTIVE
);
2396 $link
.addClass(ClassName
.ACTIVE
);
2398 // todo (fat) this is kinda sus...
2399 // recursively add actives to tested nav-links
2400 $link
.parents(Selector
.LI
).find('> ' + Selector
.NAV_LINKS
).addClass(ClassName
.ACTIVE
);
2403 $(this._scrollElement
).trigger(Event
.ACTIVATE
, {
2404 relatedTarget
: target
2408 ScrollSpy
.prototype._clear
= function _clear() {
2409 $(this._selector
).filter(Selector
.ACTIVE
).removeClass(ClassName
.ACTIVE
);
2414 ScrollSpy
._jQueryInterface
= function _jQueryInterface(config
) {
2415 return this.each(function () {
2416 var data
= $(this).data(DATA_KEY
);
2417 var _config
= (typeof config
=== 'undefined' ? 'undefined' : _typeof(config
)) === 'object' && config
;
2420 data
= new ScrollSpy(this, _config
);
2421 $(this).data(DATA_KEY
, data
);
2424 if (typeof config
=== 'string') {
2425 if (data
[config
] === undefined) {
2426 throw new Error('No method named "' + config
+ '"');
2433 _createClass(ScrollSpy
, null, [{
2435 get: function get() {
2440 get: function get() {
2449 * ------------------------------------------------------------------------
2450 * Data Api implementation
2451 * ------------------------------------------------------------------------
2454 $(window
).on(Event
.LOAD_DATA_API
, function () {
2455 var scrollSpys
= $.makeArray($(Selector
.DATA_SPY
));
2457 for (var i
= scrollSpys
.length
; i
--;) {
2458 var $spy
= $(scrollSpys
[i
]);
2459 ScrollSpy
._jQueryInterface
.call($spy
, $spy
.data());
2464 * ------------------------------------------------------------------------
2466 * ------------------------------------------------------------------------
2469 $.fn
[NAME
] = ScrollSpy
._jQueryInterface
;
2470 $.fn
[NAME
].Constructor
= ScrollSpy
;
2471 $.fn
[NAME
].noConflict = function () {
2472 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
2473 return ScrollSpy
._jQueryInterface
;
2480 * --------------------------------------------------------------------------
2481 * Bootstrap (v4.0.0-alpha.6): tab.js
2482 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2483 * --------------------------------------------------------------------------
2486 var Tab = function ($) {
2489 * ------------------------------------------------------------------------
2491 * ------------------------------------------------------------------------
2495 var VERSION
= '4.0.0-alpha.6';
2496 var DATA_KEY
= 'bs.tab';
2497 var EVENT_KEY
= '.' + DATA_KEY
;
2498 var DATA_API_KEY
= '.data-api';
2499 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
2500 var TRANSITION_DURATION
= 150;
2503 HIDE
: 'hide' + EVENT_KEY
,
2504 HIDDEN
: 'hidden' + EVENT_KEY
,
2505 SHOW
: 'show' + EVENT_KEY
,
2506 SHOWN
: 'shown' + EVENT_KEY
,
2507 CLICK_DATA_API
: 'click' + EVENT_KEY
+ DATA_API_KEY
2511 DROPDOWN_MENU
: 'dropdown-menu',
2513 DISABLED
: 'disabled',
2521 DROPDOWN
: '.dropdown',
2522 LIST
: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)',
2523 FADE_CHILD
: '> .nav-item .fade, > .fade',
2525 ACTIVE_CHILD
: '> .nav-item > .active, > .active',
2526 DATA_TOGGLE
: '[data-toggle="tab"], [data-toggle="pill"]',
2527 DROPDOWN_TOGGLE
: '.dropdown-toggle',
2528 DROPDOWN_ACTIVE_CHILD
: '> .dropdown-menu .active'
2532 * ------------------------------------------------------------------------
2534 * ------------------------------------------------------------------------
2537 var Tab = function () {
2538 function Tab(element
) {
2539 _classCallCheck(this, Tab
);
2541 this._element
= element
;
2548 Tab
.prototype.show
= function show() {
2551 if (this._element
.parentNode
&& this._element
.parentNode
.nodeType
=== Node
.ELEMENT_NODE
&& $(this._element
).hasClass(ClassName
.ACTIVE
) || $(this._element
).hasClass(ClassName
.DISABLED
)) {
2555 var target
= void 0;
2556 var previous
= void 0;
2557 var listElement
= $(this._element
).closest(Selector
.LIST
)[0];
2558 var selector
= Util
.getSelectorFromElement(this._element
);
2561 previous
= $.makeArray($(listElement
).find(Selector
.ACTIVE
));
2562 previous
= previous
[previous
.length
- 1];
2565 var hideEvent
= $.Event(Event
.HIDE
, {
2566 relatedTarget
: this._element
2569 var showEvent
= $.Event(Event
.SHOW
, {
2570 relatedTarget
: previous
2574 $(previous
).trigger(hideEvent
);
2577 $(this._element
).trigger(showEvent
);
2579 if (showEvent
.isDefaultPrevented() || hideEvent
.isDefaultPrevented()) {
2584 target
= $(selector
)[0];
2587 this._activate(this._element
, listElement
);
2589 var complete
= function complete() {
2590 var hiddenEvent
= $.Event(Event
.HIDDEN
, {
2591 relatedTarget
: _this20
._element
2594 var shownEvent
= $.Event(Event
.SHOWN
, {
2595 relatedTarget
: previous
2598 $(previous
).trigger(hiddenEvent
);
2599 $(_this20
._element
).trigger(shownEvent
);
2603 this._activate(target
, target
.parentNode
, complete
);
2609 Tab
.prototype.dispose
= function dispose() {
2610 $.removeClass(this._element
, DATA_KEY
);
2611 this._element
= null;
2616 Tab
.prototype._activate
= function _activate(element
, container
, callback
) {
2619 var active
= $(container
).find(Selector
.ACTIVE_CHILD
)[0];
2620 var isTransitioning
= callback
&& Util
.supportsTransitionEnd() && (active
&& $(active
).hasClass(ClassName
.FADE
) || Boolean($(container
).find(Selector
.FADE_CHILD
)[0]));
2622 var complete
= function complete() {
2623 return _this21
._transitionComplete(element
, active
, isTransitioning
, callback
);
2626 if (active
&& isTransitioning
) {
2627 $(active
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(TRANSITION_DURATION
);
2633 $(active
).removeClass(ClassName
.SHOW
);
2637 Tab
.prototype._transitionComplete
= function _transitionComplete(element
, active
, isTransitioning
, callback
) {
2639 $(active
).removeClass(ClassName
.ACTIVE
);
2641 var dropdownChild
= $(active
.parentNode
).find(Selector
.DROPDOWN_ACTIVE_CHILD
)[0];
2643 if (dropdownChild
) {
2644 $(dropdownChild
).removeClass(ClassName
.ACTIVE
);
2647 active
.setAttribute('aria-expanded', false);
2650 $(element
).addClass(ClassName
.ACTIVE
);
2651 element
.setAttribute('aria-expanded', true);
2653 if (isTransitioning
) {
2654 Util
.reflow(element
);
2655 $(element
).addClass(ClassName
.SHOW
);
2657 $(element
).removeClass(ClassName
.FADE
);
2660 if (element
.parentNode
&& $(element
.parentNode
).hasClass(ClassName
.DROPDOWN_MENU
)) {
2662 var dropdownElement
= $(element
).closest(Selector
.DROPDOWN
)[0];
2663 if (dropdownElement
) {
2664 $(dropdownElement
).find(Selector
.DROPDOWN_TOGGLE
).addClass(ClassName
.ACTIVE
);
2667 element
.setAttribute('aria-expanded', true);
2677 Tab
._jQueryInterface
= function _jQueryInterface(config
) {
2678 return this.each(function () {
2679 var $this = $(this);
2680 var data
= $this.data(DATA_KEY
);
2683 data
= new Tab(this);
2684 $this.data(DATA_KEY
, data
);
2687 if (typeof config
=== 'string') {
2688 if (data
[config
] === undefined) {
2689 throw new Error('No method named "' + config
+ '"');
2696 _createClass(Tab
, null, [{
2698 get: function get() {
2707 * ------------------------------------------------------------------------
2708 * Data Api implementation
2709 * ------------------------------------------------------------------------
2712 $(document
).on(Event
.CLICK_DATA_API
, Selector
.DATA_TOGGLE
, function (event
) {
2713 event
.preventDefault();
2714 Tab
._jQueryInterface
.call($(this), 'show');
2718 * ------------------------------------------------------------------------
2720 * ------------------------------------------------------------------------
2723 $.fn
[NAME
] = Tab
._jQueryInterface
;
2724 $.fn
[NAME
].Constructor
= Tab
;
2725 $.fn
[NAME
].noConflict = function () {
2726 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
2727 return Tab
._jQueryInterface
;
2736 * --------------------------------------------------------------------------
2737 * Bootstrap (v4.0.0-alpha.6): tooltip.js
2738 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2739 * --------------------------------------------------------------------------
2742 var Tooltip = function ($) {
2745 * Check for Tether dependency
2746 * Tether - http://tether.io/
2748 if (typeof Tether
=== 'undefined') {
2749 throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
2753 * ------------------------------------------------------------------------
2755 * ------------------------------------------------------------------------
2758 var NAME
= 'tooltip';
2759 var VERSION
= '4.0.0-alpha.6';
2760 var DATA_KEY
= 'bs.tooltip';
2761 var EVENT_KEY
= '.' + DATA_KEY
;
2762 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
2763 var TRANSITION_DURATION
= 150;
2764 var CLASS_PREFIX
= 'bs-tether';
2768 template
: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>',
2769 trigger
: 'hover focus',
2781 animation
: 'boolean',
2783 title
: '(string|element|function)',
2785 delay
: '(number|object)',
2787 selector
: '(string|boolean)',
2788 placement
: '(string|function)',
2790 constraints
: 'array',
2791 container
: '(string|element|boolean)'
2794 var AttachmentMap
= {
2795 TOP
: 'bottom center',
2796 RIGHT
: 'middle left',
2797 BOTTOM
: 'top center',
2798 LEFT
: 'middle right'
2807 HIDE
: 'hide' + EVENT_KEY
,
2808 HIDDEN
: 'hidden' + EVENT_KEY
,
2809 SHOW
: 'show' + EVENT_KEY
,
2810 SHOWN
: 'shown' + EVENT_KEY
,
2811 INSERTED
: 'inserted' + EVENT_KEY
,
2812 CLICK
: 'click' + EVENT_KEY
,
2813 FOCUSIN
: 'focusin' + EVENT_KEY
,
2814 FOCUSOUT
: 'focusout' + EVENT_KEY
,
2815 MOUSEENTER
: 'mouseenter' + EVENT_KEY
,
2816 MOUSELEAVE
: 'mouseleave' + EVENT_KEY
2825 TOOLTIP
: '.tooltip',
2826 TOOLTIP_INNER
: '.tooltip-inner'
2842 * ------------------------------------------------------------------------
2844 * ------------------------------------------------------------------------
2847 var Tooltip = function () {
2848 function Tooltip(element
, config
) {
2849 _classCallCheck(this, Tooltip
);
2852 this._isEnabled
= true;
2854 this._hoverState
= '';
2855 this._activeTrigger
= {};
2856 this._isTransitioning
= false;
2857 this._tether
= null;
2860 this.element
= element
;
2861 this.config
= this._getConfig(config
);
2864 this._setListeners();
2871 Tooltip
.prototype.enable
= function enable() {
2872 this._isEnabled
= true;
2875 Tooltip
.prototype.disable
= function disable() {
2876 this._isEnabled
= false;
2879 Tooltip
.prototype.toggleEnabled
= function toggleEnabled() {
2880 this._isEnabled
= !this._isEnabled
;
2883 Tooltip
.prototype.toggle
= function toggle(event
) {
2885 var dataKey
= this.constructor.DATA_KEY
;
2886 var context
= $(event
.currentTarget
).data(dataKey
);
2889 context
= new this.constructor(event
.currentTarget
, this._getDelegateConfig());
2890 $(event
.currentTarget
).data(dataKey
, context
);
2893 context
._activeTrigger
.click
= !context
._activeTrigger
.click
;
2895 if (context
._isWithActiveTrigger()) {
2896 context
._enter(null, context
);
2898 context
._leave(null, context
);
2902 if ($(this.getTipElement()).hasClass(ClassName
.SHOW
)) {
2903 this._leave(null, this);
2907 this._enter(null, this);
2911 Tooltip
.prototype.dispose
= function dispose() {
2912 clearTimeout(this._timeout
);
2914 this.cleanupTether();
2916 $.removeData(this.element
, this.constructor.DATA_KEY
);
2918 $(this.element
).off(this.constructor.EVENT_KEY
);
2919 $(this.element
).closest('.modal').off('hide.bs.modal');
2922 $(this.tip
).remove();
2925 this._isEnabled
= null;
2926 this._timeout
= null;
2927 this._hoverState
= null;
2928 this._activeTrigger
= null;
2929 this._tether
= null;
2931 this.element
= null;
2936 Tooltip
.prototype.show
= function show() {
2939 if ($(this.element
).css('display') === 'none') {
2940 throw new Error('Please use show on visible elements');
2943 var showEvent
= $.Event(this.constructor.Event
.SHOW
);
2944 if (this.isWithContent() && this._isEnabled
) {
2945 if (this._isTransitioning
) {
2946 throw new Error('Tooltip is transitioning');
2948 $(this.element
).trigger(showEvent
);
2950 var isInTheDom
= $.contains(this.element
.ownerDocument
.documentElement
, this.element
);
2952 if (showEvent
.isDefaultPrevented() || !isInTheDom
) {
2956 var tip
= this.getTipElement();
2957 var tipId
= Util
.getUID(this.constructor.NAME
);
2959 tip
.setAttribute('id', tipId
);
2960 this.element
.setAttribute('aria-describedby', tipId
);
2964 if (this.config
.animation
) {
2965 $(tip
).addClass(ClassName
.FADE
);
2968 var placement
= typeof this.config
.placement
=== 'function' ? this.config
.placement
.call(this, tip
, this.element
) : this.config
.placement
;
2970 var attachment
= this._getAttachment(placement
);
2972 var container
= this.config
.container
=== false ? document
.body
: $(this.config
.container
);
2974 $(tip
).data(this.constructor.DATA_KEY
, this).appendTo(container
);
2976 $(this.element
).trigger(this.constructor.Event
.INSERTED
);
2978 this._tether
= new Tether({
2979 attachment
: attachment
,
2981 target
: this.element
,
2982 classes
: TetherClass
,
2983 classPrefix
: CLASS_PREFIX
,
2984 offset
: this.config
.offset
,
2985 constraints
: this.config
.constraints
,
2986 addTargetClasses
: false
2990 this._tether
.position();
2992 $(tip
).addClass(ClassName
.SHOW
);
2994 var complete
= function complete() {
2995 var prevHoverState
= _this22
._hoverState
;
2996 _this22
._hoverState
= null;
2997 _this22
._isTransitioning
= false;
2999 $(_this22
.element
).trigger(_this22
.constructor.Event
.SHOWN
);
3001 if (prevHoverState
=== HoverState
.OUT
) {
3002 _this22
._leave(null, _this22
);
3006 if (Util
.supportsTransitionEnd() && $(this.tip
).hasClass(ClassName
.FADE
)) {
3007 this._isTransitioning
= true;
3008 $(this.tip
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(Tooltip
._TRANSITION_DURATION
);
3016 Tooltip
.prototype.hide
= function hide(callback
) {
3019 var tip
= this.getTipElement();
3020 var hideEvent
= $.Event(this.constructor.Event
.HIDE
);
3021 if (this._isTransitioning
) {
3022 throw new Error('Tooltip is transitioning');
3024 var complete
= function complete() {
3025 if (_this23
._hoverState
!== HoverState
.SHOW
&& tip
.parentNode
) {
3026 tip
.parentNode
.removeChild(tip
);
3029 _this23
.element
.removeAttribute('aria-describedby');
3030 $(_this23
.element
).trigger(_this23
.constructor.Event
.HIDDEN
);
3031 _this23
._isTransitioning
= false;
3032 _this23
.cleanupTether();
3039 $(this.element
).trigger(hideEvent
);
3041 if (hideEvent
.isDefaultPrevented()) {
3045 $(tip
).removeClass(ClassName
.SHOW
);
3047 this._activeTrigger
[Trigger
.CLICK
] = false;
3048 this._activeTrigger
[Trigger
.FOCUS
] = false;
3049 this._activeTrigger
[Trigger
.HOVER
] = false;
3051 if (Util
.supportsTransitionEnd() && $(this.tip
).hasClass(ClassName
.FADE
)) {
3052 this._isTransitioning
= true;
3053 $(tip
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(TRANSITION_DURATION
);
3058 this._hoverState
= '';
3063 Tooltip
.prototype.isWithContent
= function isWithContent() {
3064 return Boolean(this.getTitle());
3067 Tooltip
.prototype.getTipElement
= function getTipElement() {
3068 return this.tip
= this.tip
|| $(this.config
.template
)[0];
3071 Tooltip
.prototype.setContent
= function setContent() {
3072 var $tip
= $(this.getTipElement());
3074 this.setElementContent($tip
.find(Selector
.TOOLTIP_INNER
), this.getTitle());
3076 $tip
.removeClass(ClassName
.FADE
+ ' ' + ClassName
.SHOW
);
3078 this.cleanupTether();
3081 Tooltip
.prototype.setElementContent
= function setElementContent($element
, content
) {
3082 var html
= this.config
.html
;
3083 if ((typeof content
=== 'undefined' ? 'undefined' : _typeof(content
)) === 'object' && (content
.nodeType
|| content
.jquery
)) {
3084 // content is a DOM node or a jQuery
3086 if (!$(content
).parent().is($element
)) {
3087 $element
.empty().append(content
);
3090 $element
.text($(content
).text());
3093 $element
[html
? 'html' : 'text'](content
);
3097 Tooltip
.prototype.getTitle
= function getTitle() {
3098 var title
= this.element
.getAttribute('data-original-title');
3101 title
= typeof this.config
.title
=== 'function' ? this.config
.title
.call(this.element
) : this.config
.title
;
3107 Tooltip
.prototype.cleanupTether
= function cleanupTether() {
3109 this._tether
.destroy();
3115 Tooltip
.prototype._getAttachment
= function _getAttachment(placement
) {
3116 return AttachmentMap
[placement
.toUpperCase()];
3119 Tooltip
.prototype._setListeners
= function _setListeners() {
3122 var triggers
= this.config
.trigger
.split(' ');
3124 triggers
.forEach(function (trigger
) {
3125 if (trigger
=== 'click') {
3126 $(_this24
.element
).on(_this24
.constructor.Event
.CLICK
, _this24
.config
.selector
, function (event
) {
3127 return _this24
.toggle(event
);
3129 } else if (trigger
!== Trigger
.MANUAL
) {
3130 var eventIn
= trigger
=== Trigger
.HOVER
? _this24
.constructor.Event
.MOUSEENTER
: _this24
.constructor.Event
.FOCUSIN
;
3131 var eventOut
= trigger
=== Trigger
.HOVER
? _this24
.constructor.Event
.MOUSELEAVE
: _this24
.constructor.Event
.FOCUSOUT
;
3133 $(_this24
.element
).on(eventIn
, _this24
.config
.selector
, function (event
) {
3134 return _this24
._enter(event
);
3135 }).on(eventOut
, _this24
.config
.selector
, function (event
) {
3136 return _this24
._leave(event
);
3140 $(_this24
.element
).closest('.modal').on('hide.bs.modal', function () {
3141 return _this24
.hide();
3145 if (this.config
.selector
) {
3146 this.config
= $.extend({}, this.config
, {
3155 Tooltip
.prototype._fixTitle
= function _fixTitle() {
3156 var titleType
= _typeof(this.element
.getAttribute('data-original-title'));
3157 if (this.element
.getAttribute('title') || titleType
!== 'string') {
3158 this.element
.setAttribute('data-original-title', this.element
.getAttribute('title') || '');
3159 this.element
.setAttribute('title', '');
3163 Tooltip
.prototype._enter
= function _enter(event
, context
) {
3164 var dataKey
= this.constructor.DATA_KEY
;
3166 context
= context
|| $(event
.currentTarget
).data(dataKey
);
3169 context
= new this.constructor(event
.currentTarget
, this._getDelegateConfig());
3170 $(event
.currentTarget
).data(dataKey
, context
);
3174 context
._activeTrigger
[event
.type
=== 'focusin' ? Trigger
.FOCUS
: Trigger
.HOVER
] = true;
3177 if ($(context
.getTipElement()).hasClass(ClassName
.SHOW
) || context
._hoverState
=== HoverState
.SHOW
) {
3178 context
._hoverState
= HoverState
.SHOW
;
3182 clearTimeout(context
._timeout
);
3184 context
._hoverState
= HoverState
.SHOW
;
3186 if (!context
.config
.delay
|| !context
.config
.delay
.show
) {
3191 context
._timeout
= setTimeout(function () {
3192 if (context
._hoverState
=== HoverState
.SHOW
) {
3195 }, context
.config
.delay
.show
);
3198 Tooltip
.prototype._leave
= function _leave(event
, context
) {
3199 var dataKey
= this.constructor.DATA_KEY
;
3201 context
= context
|| $(event
.currentTarget
).data(dataKey
);
3204 context
= new this.constructor(event
.currentTarget
, this._getDelegateConfig());
3205 $(event
.currentTarget
).data(dataKey
, context
);
3209 context
._activeTrigger
[event
.type
=== 'focusout' ? Trigger
.FOCUS
: Trigger
.HOVER
] = false;
3212 if (context
._isWithActiveTrigger()) {
3216 clearTimeout(context
._timeout
);
3218 context
._hoverState
= HoverState
.OUT
;
3220 if (!context
.config
.delay
|| !context
.config
.delay
.hide
) {
3225 context
._timeout
= setTimeout(function () {
3226 if (context
._hoverState
=== HoverState
.OUT
) {
3229 }, context
.config
.delay
.hide
);
3232 Tooltip
.prototype._isWithActiveTrigger
= function _isWithActiveTrigger() {
3233 for (var trigger
in this._activeTrigger
) {
3234 if (this._activeTrigger
[trigger
]) {
3242 Tooltip
.prototype._getConfig
= function _getConfig(config
) {
3243 config
= $.extend({}, this.constructor.Default
, $(this.element
).data(), config
);
3245 if (config
.delay
&& typeof config
.delay
=== 'number') {
3252 Util
.typeCheckConfig(NAME
, config
, this.constructor.DefaultType
);
3257 Tooltip
.prototype._getDelegateConfig
= function _getDelegateConfig() {
3261 for (var key
in this.config
) {
3262 if (this.constructor.Default
[key
] !== this.config
[key
]) {
3263 config
[key
] = this.config
[key
];
3273 Tooltip
._jQueryInterface
= function _jQueryInterface(config
) {
3274 return this.each(function () {
3275 var data
= $(this).data(DATA_KEY
);
3276 var _config
= (typeof config
=== 'undefined' ? 'undefined' : _typeof(config
)) === 'object' && config
;
3278 if (!data
&& /dispose|hide/.test(config
)) {
3283 data
= new Tooltip(this, _config
);
3284 $(this).data(DATA_KEY
, data
);
3287 if (typeof config
=== 'string') {
3288 if (data
[config
] === undefined) {
3289 throw new Error('No method named "' + config
+ '"');
3296 _createClass(Tooltip
, null, [{
3298 get: function get() {
3303 get: function get() {
3308 get: function get() {
3313 get: function get() {
3318 get: function get() {
3323 get: function get() {
3328 get: function get() {
3337 * ------------------------------------------------------------------------
3339 * ------------------------------------------------------------------------
3342 $.fn
[NAME
] = Tooltip
._jQueryInterface
;
3343 $.fn
[NAME
].Constructor
= Tooltip
;
3344 $.fn
[NAME
].noConflict = function () {
3345 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
3346 return Tooltip
._jQueryInterface
;
3353 * --------------------------------------------------------------------------
3354 * Bootstrap (v4.0.0-alpha.6): popover.js
3355 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3356 * --------------------------------------------------------------------------
3359 var Popover = function ($) {
3362 * ------------------------------------------------------------------------
3364 * ------------------------------------------------------------------------
3367 var NAME
= 'popover';
3368 var VERSION
= '4.0.0-alpha.6';
3369 var DATA_KEY
= 'bs.popover';
3370 var EVENT_KEY
= '.' + DATA_KEY
;
3371 var JQUERY_NO_CONFLICT
= $.fn
[NAME
];
3373 var Default
= $.extend({}, Tooltip
.Default
, {
3377 template
: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
3380 var DefaultType
= $.extend({}, Tooltip
.DefaultType
, {
3381 content
: '(string|element|function)'
3390 TITLE
: '.popover-title',
3391 CONTENT
: '.popover-content'
3395 HIDE
: 'hide' + EVENT_KEY
,
3396 HIDDEN
: 'hidden' + EVENT_KEY
,
3397 SHOW
: 'show' + EVENT_KEY
,
3398 SHOWN
: 'shown' + EVENT_KEY
,
3399 INSERTED
: 'inserted' + EVENT_KEY
,
3400 CLICK
: 'click' + EVENT_KEY
,
3401 FOCUSIN
: 'focusin' + EVENT_KEY
,
3402 FOCUSOUT
: 'focusout' + EVENT_KEY
,
3403 MOUSEENTER
: 'mouseenter' + EVENT_KEY
,
3404 MOUSELEAVE
: 'mouseleave' + EVENT_KEY
3408 * ------------------------------------------------------------------------
3410 * ------------------------------------------------------------------------
3413 var Popover = function (_Tooltip
) {
3414 _inherits(Popover
, _Tooltip
);
3416 function Popover() {
3417 _classCallCheck(this, Popover
);
3419 return _possibleConstructorReturn(this, _Tooltip
.apply(this, arguments
));
3424 Popover
.prototype.isWithContent
= function isWithContent() {
3425 return this.getTitle() || this._getContent();
3428 Popover
.prototype.getTipElement
= function getTipElement() {
3429 return this.tip
= this.tip
|| $(this.config
.template
)[0];
3432 Popover
.prototype.setContent
= function setContent() {
3433 var $tip
= $(this.getTipElement());
3435 // we use append for html objects to maintain js events
3436 this.setElementContent($tip
.find(Selector
.TITLE
), this.getTitle());
3437 this.setElementContent($tip
.find(Selector
.CONTENT
), this._getContent());
3439 $tip
.removeClass(ClassName
.FADE
+ ' ' + ClassName
.SHOW
);
3441 this.cleanupTether();
3446 Popover
.prototype._getContent
= function _getContent() {
3447 return this.element
.getAttribute('data-content') || (typeof this.config
.content
=== 'function' ? this.config
.content
.call(this.element
) : this.config
.content
);
3452 Popover
._jQueryInterface
= function _jQueryInterface(config
) {
3453 return this.each(function () {
3454 var data
= $(this).data(DATA_KEY
);
3455 var _config
= (typeof config
=== 'undefined' ? 'undefined' : _typeof(config
)) === 'object' ? config
: null;
3457 if (!data
&& /destroy|hide/.test(config
)) {
3462 data
= new Popover(this, _config
);
3463 $(this).data(DATA_KEY
, data
);
3466 if (typeof config
=== 'string') {
3467 if (data
[config
] === undefined) {
3468 throw new Error('No method named "' + config
+ '"');
3475 _createClass(Popover
, null, [{
3481 get: function get() {
3486 get: function get() {
3491 get: function get() {
3496 get: function get() {
3501 get: function get() {
3506 get: function get() {
3511 get: function get() {
3520 * ------------------------------------------------------------------------
3522 * ------------------------------------------------------------------------
3525 $.fn
[NAME
] = Popover
._jQueryInterface
;
3526 $.fn
[NAME
].Constructor
= Popover
;
3527 $.fn
[NAME
].noConflict = function () {
3528 $.fn
[NAME
] = JQUERY_NO_CONFLICT
;
3529 return Popover
._jQueryInterface
;