OSDN Git Service

Merge pull request #17 from Bytom/dev_tool
[bytom/vapor.git] / tools / side_chain_tool / web / node_modules / bootstrap / dist / js / bootstrap.bundle.js
1 /*!
2   * Bootstrap v4.1.3 (https://getbootstrap.com/)
3   * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5   */
6 (function (global, factory) {
7   typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
8   typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
9   (factory((global.bootstrap = {}),global.jQuery));
10 }(this, (function (exports,$) { 'use strict';
11
12   $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
14   function _defineProperties(target, props) {
15     for (var i = 0; i < props.length; i++) {
16       var descriptor = props[i];
17       descriptor.enumerable = descriptor.enumerable || false;
18       descriptor.configurable = true;
19       if ("value" in descriptor) descriptor.writable = true;
20       Object.defineProperty(target, descriptor.key, descriptor);
21     }
22   }
23
24   function _createClass(Constructor, protoProps, staticProps) {
25     if (protoProps) _defineProperties(Constructor.prototype, protoProps);
26     if (staticProps) _defineProperties(Constructor, staticProps);
27     return Constructor;
28   }
29
30   function _defineProperty(obj, key, value) {
31     if (key in obj) {
32       Object.defineProperty(obj, key, {
33         value: value,
34         enumerable: true,
35         configurable: true,
36         writable: true
37       });
38     } else {
39       obj[key] = value;
40     }
41
42     return obj;
43   }
44
45   function _objectSpread(target) {
46     for (var i = 1; i < arguments.length; i++) {
47       var source = arguments[i] != null ? arguments[i] : {};
48       var ownKeys = Object.keys(source);
49
50       if (typeof Object.getOwnPropertySymbols === 'function') {
51         ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
52           return Object.getOwnPropertyDescriptor(source, sym).enumerable;
53         }));
54       }
55
56       ownKeys.forEach(function (key) {
57         _defineProperty(target, key, source[key]);
58       });
59     }
60
61     return target;
62   }
63
64   function _inheritsLoose(subClass, superClass) {
65     subClass.prototype = Object.create(superClass.prototype);
66     subClass.prototype.constructor = subClass;
67     subClass.__proto__ = superClass;
68   }
69
70   /**
71    * --------------------------------------------------------------------------
72    * Bootstrap (v4.1.3): util.js
73    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
74    * --------------------------------------------------------------------------
75    */
76
77   var Util = function ($$$1) {
78     /**
79      * ------------------------------------------------------------------------
80      * Private TransitionEnd Helpers
81      * ------------------------------------------------------------------------
82      */
83     var TRANSITION_END = 'transitionend';
84     var MAX_UID = 1000000;
85     var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
86
87     function toType(obj) {
88       return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
89     }
90
91     function getSpecialTransitionEndEvent() {
92       return {
93         bindType: TRANSITION_END,
94         delegateType: TRANSITION_END,
95         handle: function handle(event) {
96           if ($$$1(event.target).is(this)) {
97             return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
98           }
99
100           return undefined; // eslint-disable-line no-undefined
101         }
102       };
103     }
104
105     function transitionEndEmulator(duration) {
106       var _this = this;
107
108       var called = false;
109       $$$1(this).one(Util.TRANSITION_END, function () {
110         called = true;
111       });
112       setTimeout(function () {
113         if (!called) {
114           Util.triggerTransitionEnd(_this);
115         }
116       }, duration);
117       return this;
118     }
119
120     function setTransitionEndSupport() {
121       $$$1.fn.emulateTransitionEnd = transitionEndEmulator;
122       $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
123     }
124     /**
125      * --------------------------------------------------------------------------
126      * Public Util Api
127      * --------------------------------------------------------------------------
128      */
129
130
131     var Util = {
132       TRANSITION_END: 'bsTransitionEnd',
133       getUID: function getUID(prefix) {
134         do {
135           // eslint-disable-next-line no-bitwise
136           prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
137         } while (document.getElementById(prefix));
138
139         return prefix;
140       },
141       getSelectorFromElement: function getSelectorFromElement(element) {
142         var selector = element.getAttribute('data-target');
143
144         if (!selector || selector === '#') {
145           selector = element.getAttribute('href') || '';
146         }
147
148         try {
149           return document.querySelector(selector) ? selector : null;
150         } catch (err) {
151           return null;
152         }
153       },
154       getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
155         if (!element) {
156           return 0;
157         } // Get transition-duration of the element
158
159
160         var transitionDuration = $$$1(element).css('transition-duration');
161         var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found
162
163         if (!floatTransitionDuration) {
164           return 0;
165         } // If multiple durations are defined, take the first
166
167
168         transitionDuration = transitionDuration.split(',')[0];
169         return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
170       },
171       reflow: function reflow(element) {
172         return element.offsetHeight;
173       },
174       triggerTransitionEnd: function triggerTransitionEnd(element) {
175         $$$1(element).trigger(TRANSITION_END);
176       },
177       // TODO: Remove in v5
178       supportsTransitionEnd: function supportsTransitionEnd() {
179         return Boolean(TRANSITION_END);
180       },
181       isElement: function isElement(obj) {
182         return (obj[0] || obj).nodeType;
183       },
184       typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
185         for (var property in configTypes) {
186           if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
187             var expectedTypes = configTypes[property];
188             var value = config[property];
189             var valueType = value && Util.isElement(value) ? 'element' : toType(value);
190
191             if (!new RegExp(expectedTypes).test(valueType)) {
192               throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
193             }
194           }
195         }
196       }
197     };
198     setTransitionEndSupport();
199     return Util;
200   }($);
201
202   /**
203    * --------------------------------------------------------------------------
204    * Bootstrap (v4.1.3): alert.js
205    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
206    * --------------------------------------------------------------------------
207    */
208
209   var Alert = function ($$$1) {
210     /**
211      * ------------------------------------------------------------------------
212      * Constants
213      * ------------------------------------------------------------------------
214      */
215     var NAME = 'alert';
216     var VERSION = '4.1.3';
217     var DATA_KEY = 'bs.alert';
218     var EVENT_KEY = "." + DATA_KEY;
219     var DATA_API_KEY = '.data-api';
220     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
221     var Selector = {
222       DISMISS: '[data-dismiss="alert"]'
223     };
224     var Event = {
225       CLOSE: "close" + EVENT_KEY,
226       CLOSED: "closed" + EVENT_KEY,
227       CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
228     };
229     var ClassName = {
230       ALERT: 'alert',
231       FADE: 'fade',
232       SHOW: 'show'
233       /**
234        * ------------------------------------------------------------------------
235        * Class Definition
236        * ------------------------------------------------------------------------
237        */
238
239     };
240
241     var Alert =
242     /*#__PURE__*/
243     function () {
244       function Alert(element) {
245         this._element = element;
246       } // Getters
247
248
249       var _proto = Alert.prototype;
250
251       // Public
252       _proto.close = function close(element) {
253         var rootElement = this._element;
254
255         if (element) {
256           rootElement = this._getRootElement(element);
257         }
258
259         var customEvent = this._triggerCloseEvent(rootElement);
260
261         if (customEvent.isDefaultPrevented()) {
262           return;
263         }
264
265         this._removeElement(rootElement);
266       };
267
268       _proto.dispose = function dispose() {
269         $$$1.removeData(this._element, DATA_KEY);
270         this._element = null;
271       }; // Private
272
273
274       _proto._getRootElement = function _getRootElement(element) {
275         var selector = Util.getSelectorFromElement(element);
276         var parent = false;
277
278         if (selector) {
279           parent = document.querySelector(selector);
280         }
281
282         if (!parent) {
283           parent = $$$1(element).closest("." + ClassName.ALERT)[0];
284         }
285
286         return parent;
287       };
288
289       _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
290         var closeEvent = $$$1.Event(Event.CLOSE);
291         $$$1(element).trigger(closeEvent);
292         return closeEvent;
293       };
294
295       _proto._removeElement = function _removeElement(element) {
296         var _this = this;
297
298         $$$1(element).removeClass(ClassName.SHOW);
299
300         if (!$$$1(element).hasClass(ClassName.FADE)) {
301           this._destroyElement(element);
302
303           return;
304         }
305
306         var transitionDuration = Util.getTransitionDurationFromElement(element);
307         $$$1(element).one(Util.TRANSITION_END, function (event) {
308           return _this._destroyElement(element, event);
309         }).emulateTransitionEnd(transitionDuration);
310       };
311
312       _proto._destroyElement = function _destroyElement(element) {
313         $$$1(element).detach().trigger(Event.CLOSED).remove();
314       }; // Static
315
316
317       Alert._jQueryInterface = function _jQueryInterface(config) {
318         return this.each(function () {
319           var $element = $$$1(this);
320           var data = $element.data(DATA_KEY);
321
322           if (!data) {
323             data = new Alert(this);
324             $element.data(DATA_KEY, data);
325           }
326
327           if (config === 'close') {
328             data[config](this);
329           }
330         });
331       };
332
333       Alert._handleDismiss = function _handleDismiss(alertInstance) {
334         return function (event) {
335           if (event) {
336             event.preventDefault();
337           }
338
339           alertInstance.close(this);
340         };
341       };
342
343       _createClass(Alert, null, [{
344         key: "VERSION",
345         get: function get() {
346           return VERSION;
347         }
348       }]);
349
350       return Alert;
351     }();
352     /**
353      * ------------------------------------------------------------------------
354      * Data Api implementation
355      * ------------------------------------------------------------------------
356      */
357
358
359     $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
360     /**
361      * ------------------------------------------------------------------------
362      * jQuery
363      * ------------------------------------------------------------------------
364      */
365
366     $$$1.fn[NAME] = Alert._jQueryInterface;
367     $$$1.fn[NAME].Constructor = Alert;
368
369     $$$1.fn[NAME].noConflict = function () {
370       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
371       return Alert._jQueryInterface;
372     };
373
374     return Alert;
375   }($);
376
377   /**
378    * --------------------------------------------------------------------------
379    * Bootstrap (v4.1.3): button.js
380    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
381    * --------------------------------------------------------------------------
382    */
383
384   var Button = function ($$$1) {
385     /**
386      * ------------------------------------------------------------------------
387      * Constants
388      * ------------------------------------------------------------------------
389      */
390     var NAME = 'button';
391     var VERSION = '4.1.3';
392     var DATA_KEY = 'bs.button';
393     var EVENT_KEY = "." + DATA_KEY;
394     var DATA_API_KEY = '.data-api';
395     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
396     var ClassName = {
397       ACTIVE: 'active',
398       BUTTON: 'btn',
399       FOCUS: 'focus'
400     };
401     var Selector = {
402       DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
403       DATA_TOGGLE: '[data-toggle="buttons"]',
404       INPUT: 'input',
405       ACTIVE: '.active',
406       BUTTON: '.btn'
407     };
408     var Event = {
409       CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
410       FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
411       /**
412        * ------------------------------------------------------------------------
413        * Class Definition
414        * ------------------------------------------------------------------------
415        */
416
417     };
418
419     var Button =
420     /*#__PURE__*/
421     function () {
422       function Button(element) {
423         this._element = element;
424       } // Getters
425
426
427       var _proto = Button.prototype;
428
429       // Public
430       _proto.toggle = function toggle() {
431         var triggerChangeEvent = true;
432         var addAriaPressed = true;
433         var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
434
435         if (rootElement) {
436           var input = this._element.querySelector(Selector.INPUT);
437
438           if (input) {
439             if (input.type === 'radio') {
440               if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
441                 triggerChangeEvent = false;
442               } else {
443                 var activeElement = rootElement.querySelector(Selector.ACTIVE);
444
445                 if (activeElement) {
446                   $$$1(activeElement).removeClass(ClassName.ACTIVE);
447                 }
448               }
449             }
450
451             if (triggerChangeEvent) {
452               if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
453                 return;
454               }
455
456               input.checked = !this._element.classList.contains(ClassName.ACTIVE);
457               $$$1(input).trigger('change');
458             }
459
460             input.focus();
461             addAriaPressed = false;
462           }
463         }
464
465         if (addAriaPressed) {
466           this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
467         }
468
469         if (triggerChangeEvent) {
470           $$$1(this._element).toggleClass(ClassName.ACTIVE);
471         }
472       };
473
474       _proto.dispose = function dispose() {
475         $$$1.removeData(this._element, DATA_KEY);
476         this._element = null;
477       }; // Static
478
479
480       Button._jQueryInterface = function _jQueryInterface(config) {
481         return this.each(function () {
482           var data = $$$1(this).data(DATA_KEY);
483
484           if (!data) {
485             data = new Button(this);
486             $$$1(this).data(DATA_KEY, data);
487           }
488
489           if (config === 'toggle') {
490             data[config]();
491           }
492         });
493       };
494
495       _createClass(Button, null, [{
496         key: "VERSION",
497         get: function get() {
498           return VERSION;
499         }
500       }]);
501
502       return Button;
503     }();
504     /**
505      * ------------------------------------------------------------------------
506      * Data Api implementation
507      * ------------------------------------------------------------------------
508      */
509
510
511     $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
512       event.preventDefault();
513       var button = event.target;
514
515       if (!$$$1(button).hasClass(ClassName.BUTTON)) {
516         button = $$$1(button).closest(Selector.BUTTON);
517       }
518
519       Button._jQueryInterface.call($$$1(button), 'toggle');
520     }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
521       var button = $$$1(event.target).closest(Selector.BUTTON)[0];
522       $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
523     });
524     /**
525      * ------------------------------------------------------------------------
526      * jQuery
527      * ------------------------------------------------------------------------
528      */
529
530     $$$1.fn[NAME] = Button._jQueryInterface;
531     $$$1.fn[NAME].Constructor = Button;
532
533     $$$1.fn[NAME].noConflict = function () {
534       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
535       return Button._jQueryInterface;
536     };
537
538     return Button;
539   }($);
540
541   /**
542    * --------------------------------------------------------------------------
543    * Bootstrap (v4.1.3): carousel.js
544    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
545    * --------------------------------------------------------------------------
546    */
547
548   var Carousel = function ($$$1) {
549     /**
550      * ------------------------------------------------------------------------
551      * Constants
552      * ------------------------------------------------------------------------
553      */
554     var NAME = 'carousel';
555     var VERSION = '4.1.3';
556     var DATA_KEY = 'bs.carousel';
557     var EVENT_KEY = "." + DATA_KEY;
558     var DATA_API_KEY = '.data-api';
559     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
560     var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
561
562     var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
563
564     var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
565
566     var Default = {
567       interval: 5000,
568       keyboard: true,
569       slide: false,
570       pause: 'hover',
571       wrap: true
572     };
573     var DefaultType = {
574       interval: '(number|boolean)',
575       keyboard: 'boolean',
576       slide: '(boolean|string)',
577       pause: '(string|boolean)',
578       wrap: 'boolean'
579     };
580     var Direction = {
581       NEXT: 'next',
582       PREV: 'prev',
583       LEFT: 'left',
584       RIGHT: 'right'
585     };
586     var Event = {
587       SLIDE: "slide" + EVENT_KEY,
588       SLID: "slid" + EVENT_KEY,
589       KEYDOWN: "keydown" + EVENT_KEY,
590       MOUSEENTER: "mouseenter" + EVENT_KEY,
591       MOUSELEAVE: "mouseleave" + EVENT_KEY,
592       TOUCHEND: "touchend" + EVENT_KEY,
593       LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
594       CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
595     };
596     var ClassName = {
597       CAROUSEL: 'carousel',
598       ACTIVE: 'active',
599       SLIDE: 'slide',
600       RIGHT: 'carousel-item-right',
601       LEFT: 'carousel-item-left',
602       NEXT: 'carousel-item-next',
603       PREV: 'carousel-item-prev',
604       ITEM: 'carousel-item'
605     };
606     var Selector = {
607       ACTIVE: '.active',
608       ACTIVE_ITEM: '.active.carousel-item',
609       ITEM: '.carousel-item',
610       NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
611       INDICATORS: '.carousel-indicators',
612       DATA_SLIDE: '[data-slide], [data-slide-to]',
613       DATA_RIDE: '[data-ride="carousel"]'
614       /**
615        * ------------------------------------------------------------------------
616        * Class Definition
617        * ------------------------------------------------------------------------
618        */
619
620     };
621
622     var Carousel =
623     /*#__PURE__*/
624     function () {
625       function Carousel(element, config) {
626         this._items = null;
627         this._interval = null;
628         this._activeElement = null;
629         this._isPaused = false;
630         this._isSliding = false;
631         this.touchTimeout = null;
632         this._config = this._getConfig(config);
633         this._element = $$$1(element)[0];
634         this._indicatorsElement = this._element.querySelector(Selector.INDICATORS);
635
636         this._addEventListeners();
637       } // Getters
638
639
640       var _proto = Carousel.prototype;
641
642       // Public
643       _proto.next = function next() {
644         if (!this._isSliding) {
645           this._slide(Direction.NEXT);
646         }
647       };
648
649       _proto.nextWhenVisible = function nextWhenVisible() {
650         // Don't call next when the page isn't visible
651         // or the carousel or its parent isn't visible
652         if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
653           this.next();
654         }
655       };
656
657       _proto.prev = function prev() {
658         if (!this._isSliding) {
659           this._slide(Direction.PREV);
660         }
661       };
662
663       _proto.pause = function pause(event) {
664         if (!event) {
665           this._isPaused = true;
666         }
667
668         if (this._element.querySelector(Selector.NEXT_PREV)) {
669           Util.triggerTransitionEnd(this._element);
670           this.cycle(true);
671         }
672
673         clearInterval(this._interval);
674         this._interval = null;
675       };
676
677       _proto.cycle = function cycle(event) {
678         if (!event) {
679           this._isPaused = false;
680         }
681
682         if (this._interval) {
683           clearInterval(this._interval);
684           this._interval = null;
685         }
686
687         if (this._config.interval && !this._isPaused) {
688           this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
689         }
690       };
691
692       _proto.to = function to(index) {
693         var _this = this;
694
695         this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
696
697         var activeIndex = this._getItemIndex(this._activeElement);
698
699         if (index > this._items.length - 1 || index < 0) {
700           return;
701         }
702
703         if (this._isSliding) {
704           $$$1(this._element).one(Event.SLID, function () {
705             return _this.to(index);
706           });
707           return;
708         }
709
710         if (activeIndex === index) {
711           this.pause();
712           this.cycle();
713           return;
714         }
715
716         var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
717
718         this._slide(direction, this._items[index]);
719       };
720
721       _proto.dispose = function dispose() {
722         $$$1(this._element).off(EVENT_KEY);
723         $$$1.removeData(this._element, DATA_KEY);
724         this._items = null;
725         this._config = null;
726         this._element = null;
727         this._interval = null;
728         this._isPaused = null;
729         this._isSliding = null;
730         this._activeElement = null;
731         this._indicatorsElement = null;
732       }; // Private
733
734
735       _proto._getConfig = function _getConfig(config) {
736         config = _objectSpread({}, Default, config);
737         Util.typeCheckConfig(NAME, config, DefaultType);
738         return config;
739       };
740
741       _proto._addEventListeners = function _addEventListeners() {
742         var _this2 = this;
743
744         if (this._config.keyboard) {
745           $$$1(this._element).on(Event.KEYDOWN, function (event) {
746             return _this2._keydown(event);
747           });
748         }
749
750         if (this._config.pause === 'hover') {
751           $$$1(this._element).on(Event.MOUSEENTER, function (event) {
752             return _this2.pause(event);
753           }).on(Event.MOUSELEAVE, function (event) {
754             return _this2.cycle(event);
755           });
756
757           if ('ontouchstart' in document.documentElement) {
758             // If it's a touch-enabled device, mouseenter/leave are fired as
759             // part of the mouse compatibility events on first tap - the carousel
760             // would stop cycling until user tapped out of it;
761             // here, we listen for touchend, explicitly pause the carousel
762             // (as if it's the second time we tap on it, mouseenter compat event
763             // is NOT fired) and after a timeout (to allow for mouse compatibility
764             // events to fire) we explicitly restart cycling
765             $$$1(this._element).on(Event.TOUCHEND, function () {
766               _this2.pause();
767
768               if (_this2.touchTimeout) {
769                 clearTimeout(_this2.touchTimeout);
770               }
771
772               _this2.touchTimeout = setTimeout(function (event) {
773                 return _this2.cycle(event);
774               }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
775             });
776           }
777         }
778       };
779
780       _proto._keydown = function _keydown(event) {
781         if (/input|textarea/i.test(event.target.tagName)) {
782           return;
783         }
784
785         switch (event.which) {
786           case ARROW_LEFT_KEYCODE:
787             event.preventDefault();
788             this.prev();
789             break;
790
791           case ARROW_RIGHT_KEYCODE:
792             event.preventDefault();
793             this.next();
794             break;
795
796           default:
797         }
798       };
799
800       _proto._getItemIndex = function _getItemIndex(element) {
801         this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : [];
802         return this._items.indexOf(element);
803       };
804
805       _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
806         var isNextDirection = direction === Direction.NEXT;
807         var isPrevDirection = direction === Direction.PREV;
808
809         var activeIndex = this._getItemIndex(activeElement);
810
811         var lastItemIndex = this._items.length - 1;
812         var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
813
814         if (isGoingToWrap && !this._config.wrap) {
815           return activeElement;
816         }
817
818         var delta = direction === Direction.PREV ? -1 : 1;
819         var itemIndex = (activeIndex + delta) % this._items.length;
820         return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
821       };
822
823       _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
824         var targetIndex = this._getItemIndex(relatedTarget);
825
826         var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
827
828         var slideEvent = $$$1.Event(Event.SLIDE, {
829           relatedTarget: relatedTarget,
830           direction: eventDirectionName,
831           from: fromIndex,
832           to: targetIndex
833         });
834         $$$1(this._element).trigger(slideEvent);
835         return slideEvent;
836       };
837
838       _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
839         if (this._indicatorsElement) {
840           var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
841           $$$1(indicators).removeClass(ClassName.ACTIVE);
842
843           var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
844
845           if (nextIndicator) {
846             $$$1(nextIndicator).addClass(ClassName.ACTIVE);
847           }
848         }
849       };
850
851       _proto._slide = function _slide(direction, element) {
852         var _this3 = this;
853
854         var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
855
856         var activeElementIndex = this._getItemIndex(activeElement);
857
858         var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
859
860         var nextElementIndex = this._getItemIndex(nextElement);
861
862         var isCycling = Boolean(this._interval);
863         var directionalClassName;
864         var orderClassName;
865         var eventDirectionName;
866
867         if (direction === Direction.NEXT) {
868           directionalClassName = ClassName.LEFT;
869           orderClassName = ClassName.NEXT;
870           eventDirectionName = Direction.LEFT;
871         } else {
872           directionalClassName = ClassName.RIGHT;
873           orderClassName = ClassName.PREV;
874           eventDirectionName = Direction.RIGHT;
875         }
876
877         if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
878           this._isSliding = false;
879           return;
880         }
881
882         var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
883
884         if (slideEvent.isDefaultPrevented()) {
885           return;
886         }
887
888         if (!activeElement || !nextElement) {
889           // Some weirdness is happening, so we bail
890           return;
891         }
892
893         this._isSliding = true;
894
895         if (isCycling) {
896           this.pause();
897         }
898
899         this._setActiveIndicatorElement(nextElement);
900
901         var slidEvent = $$$1.Event(Event.SLID, {
902           relatedTarget: nextElement,
903           direction: eventDirectionName,
904           from: activeElementIndex,
905           to: nextElementIndex
906         });
907
908         if ($$$1(this._element).hasClass(ClassName.SLIDE)) {
909           $$$1(nextElement).addClass(orderClassName);
910           Util.reflow(nextElement);
911           $$$1(activeElement).addClass(directionalClassName);
912           $$$1(nextElement).addClass(directionalClassName);
913           var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
914           $$$1(activeElement).one(Util.TRANSITION_END, function () {
915             $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
916             $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
917             _this3._isSliding = false;
918             setTimeout(function () {
919               return $$$1(_this3._element).trigger(slidEvent);
920             }, 0);
921           }).emulateTransitionEnd(transitionDuration);
922         } else {
923           $$$1(activeElement).removeClass(ClassName.ACTIVE);
924           $$$1(nextElement).addClass(ClassName.ACTIVE);
925           this._isSliding = false;
926           $$$1(this._element).trigger(slidEvent);
927         }
928
929         if (isCycling) {
930           this.cycle();
931         }
932       }; // Static
933
934
935       Carousel._jQueryInterface = function _jQueryInterface(config) {
936         return this.each(function () {
937           var data = $$$1(this).data(DATA_KEY);
938
939           var _config = _objectSpread({}, Default, $$$1(this).data());
940
941           if (typeof config === 'object') {
942             _config = _objectSpread({}, _config, config);
943           }
944
945           var action = typeof config === 'string' ? config : _config.slide;
946
947           if (!data) {
948             data = new Carousel(this, _config);
949             $$$1(this).data(DATA_KEY, data);
950           }
951
952           if (typeof config === 'number') {
953             data.to(config);
954           } else if (typeof action === 'string') {
955             if (typeof data[action] === 'undefined') {
956               throw new TypeError("No method named \"" + action + "\"");
957             }
958
959             data[action]();
960           } else if (_config.interval) {
961             data.pause();
962             data.cycle();
963           }
964         });
965       };
966
967       Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
968         var selector = Util.getSelectorFromElement(this);
969
970         if (!selector) {
971           return;
972         }
973
974         var target = $$$1(selector)[0];
975
976         if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
977           return;
978         }
979
980         var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data());
981
982         var slideIndex = this.getAttribute('data-slide-to');
983
984         if (slideIndex) {
985           config.interval = false;
986         }
987
988         Carousel._jQueryInterface.call($$$1(target), config);
989
990         if (slideIndex) {
991           $$$1(target).data(DATA_KEY).to(slideIndex);
992         }
993
994         event.preventDefault();
995       };
996
997       _createClass(Carousel, null, [{
998         key: "VERSION",
999         get: function get() {
1000           return VERSION;
1001         }
1002       }, {
1003         key: "Default",
1004         get: function get() {
1005           return Default;
1006         }
1007       }]);
1008
1009       return Carousel;
1010     }();
1011     /**
1012      * ------------------------------------------------------------------------
1013      * Data Api implementation
1014      * ------------------------------------------------------------------------
1015      */
1016
1017
1018     $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
1019     $$$1(window).on(Event.LOAD_DATA_API, function () {
1020       var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE));
1021
1022       for (var i = 0, len = carousels.length; i < len; i++) {
1023         var $carousel = $$$1(carousels[i]);
1024
1025         Carousel._jQueryInterface.call($carousel, $carousel.data());
1026       }
1027     });
1028     /**
1029      * ------------------------------------------------------------------------
1030      * jQuery
1031      * ------------------------------------------------------------------------
1032      */
1033
1034     $$$1.fn[NAME] = Carousel._jQueryInterface;
1035     $$$1.fn[NAME].Constructor = Carousel;
1036
1037     $$$1.fn[NAME].noConflict = function () {
1038       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
1039       return Carousel._jQueryInterface;
1040     };
1041
1042     return Carousel;
1043   }($);
1044
1045   /**
1046    * --------------------------------------------------------------------------
1047    * Bootstrap (v4.1.3): collapse.js
1048    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1049    * --------------------------------------------------------------------------
1050    */
1051
1052   var Collapse = function ($$$1) {
1053     /**
1054      * ------------------------------------------------------------------------
1055      * Constants
1056      * ------------------------------------------------------------------------
1057      */
1058     var NAME = 'collapse';
1059     var VERSION = '4.1.3';
1060     var DATA_KEY = 'bs.collapse';
1061     var EVENT_KEY = "." + DATA_KEY;
1062     var DATA_API_KEY = '.data-api';
1063     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
1064     var Default = {
1065       toggle: true,
1066       parent: ''
1067     };
1068     var DefaultType = {
1069       toggle: 'boolean',
1070       parent: '(string|element)'
1071     };
1072     var Event = {
1073       SHOW: "show" + EVENT_KEY,
1074       SHOWN: "shown" + EVENT_KEY,
1075       HIDE: "hide" + EVENT_KEY,
1076       HIDDEN: "hidden" + EVENT_KEY,
1077       CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
1078     };
1079     var ClassName = {
1080       SHOW: 'show',
1081       COLLAPSE: 'collapse',
1082       COLLAPSING: 'collapsing',
1083       COLLAPSED: 'collapsed'
1084     };
1085     var Dimension = {
1086       WIDTH: 'width',
1087       HEIGHT: 'height'
1088     };
1089     var Selector = {
1090       ACTIVES: '.show, .collapsing',
1091       DATA_TOGGLE: '[data-toggle="collapse"]'
1092       /**
1093        * ------------------------------------------------------------------------
1094        * Class Definition
1095        * ------------------------------------------------------------------------
1096        */
1097
1098     };
1099
1100     var Collapse =
1101     /*#__PURE__*/
1102     function () {
1103       function Collapse(element, config) {
1104         this._isTransitioning = false;
1105         this._element = element;
1106         this._config = this._getConfig(config);
1107         this._triggerArray = $$$1.makeArray(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
1108         var toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
1109
1110         for (var i = 0, len = toggleList.length; i < len; i++) {
1111           var elem = toggleList[i];
1112           var selector = Util.getSelectorFromElement(elem);
1113           var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
1114             return foundElem === element;
1115           });
1116
1117           if (selector !== null && filterElement.length > 0) {
1118             this._selector = selector;
1119
1120             this._triggerArray.push(elem);
1121           }
1122         }
1123
1124         this._parent = this._config.parent ? this._getParent() : null;
1125
1126         if (!this._config.parent) {
1127           this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1128         }
1129
1130         if (this._config.toggle) {
1131           this.toggle();
1132         }
1133       } // Getters
1134
1135
1136       var _proto = Collapse.prototype;
1137
1138       // Public
1139       _proto.toggle = function toggle() {
1140         if ($$$1(this._element).hasClass(ClassName.SHOW)) {
1141           this.hide();
1142         } else {
1143           this.show();
1144         }
1145       };
1146
1147       _proto.show = function show() {
1148         var _this = this;
1149
1150         if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) {
1151           return;
1152         }
1153
1154         var actives;
1155         var activesData;
1156
1157         if (this._parent) {
1158           actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function (elem) {
1159             return elem.getAttribute('data-parent') === _this._config.parent;
1160           });
1161
1162           if (actives.length === 0) {
1163             actives = null;
1164           }
1165         }
1166
1167         if (actives) {
1168           activesData = $$$1(actives).not(this._selector).data(DATA_KEY);
1169
1170           if (activesData && activesData._isTransitioning) {
1171             return;
1172           }
1173         }
1174
1175         var startEvent = $$$1.Event(Event.SHOW);
1176         $$$1(this._element).trigger(startEvent);
1177
1178         if (startEvent.isDefaultPrevented()) {
1179           return;
1180         }
1181
1182         if (actives) {
1183           Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide');
1184
1185           if (!activesData) {
1186             $$$1(actives).data(DATA_KEY, null);
1187           }
1188         }
1189
1190         var dimension = this._getDimension();
1191
1192         $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
1193         this._element.style[dimension] = 0;
1194
1195         if (this._triggerArray.length) {
1196           $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
1197         }
1198
1199         this.setTransitioning(true);
1200
1201         var complete = function complete() {
1202           $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
1203           _this._element.style[dimension] = '';
1204
1205           _this.setTransitioning(false);
1206
1207           $$$1(_this._element).trigger(Event.SHOWN);
1208         };
1209
1210         var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1211         var scrollSize = "scroll" + capitalizedDimension;
1212         var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1213         $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1214         this._element.style[dimension] = this._element[scrollSize] + "px";
1215       };
1216
1217       _proto.hide = function hide() {
1218         var _this2 = this;
1219
1220         if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {
1221           return;
1222         }
1223
1224         var startEvent = $$$1.Event(Event.HIDE);
1225         $$$1(this._element).trigger(startEvent);
1226
1227         if (startEvent.isDefaultPrevented()) {
1228           return;
1229         }
1230
1231         var dimension = this._getDimension();
1232
1233         this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1234         Util.reflow(this._element);
1235         $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
1236         var triggerArrayLength = this._triggerArray.length;
1237
1238         if (triggerArrayLength > 0) {
1239           for (var i = 0; i < triggerArrayLength; i++) {
1240             var trigger = this._triggerArray[i];
1241             var selector = Util.getSelectorFromElement(trigger);
1242
1243             if (selector !== null) {
1244               var $elem = $$$1([].slice.call(document.querySelectorAll(selector)));
1245
1246               if (!$elem.hasClass(ClassName.SHOW)) {
1247                 $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
1248               }
1249             }
1250           }
1251         }
1252
1253         this.setTransitioning(true);
1254
1255         var complete = function complete() {
1256           _this2.setTransitioning(false);
1257
1258           $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
1259         };
1260
1261         this._element.style[dimension] = '';
1262         var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1263         $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1264       };
1265
1266       _proto.setTransitioning = function setTransitioning(isTransitioning) {
1267         this._isTransitioning = isTransitioning;
1268       };
1269
1270       _proto.dispose = function dispose() {
1271         $$$1.removeData(this._element, DATA_KEY);
1272         this._config = null;
1273         this._parent = null;
1274         this._element = null;
1275         this._triggerArray = null;
1276         this._isTransitioning = null;
1277       }; // Private
1278
1279
1280       _proto._getConfig = function _getConfig(config) {
1281         config = _objectSpread({}, Default, config);
1282         config.toggle = Boolean(config.toggle); // Coerce string values
1283
1284         Util.typeCheckConfig(NAME, config, DefaultType);
1285         return config;
1286       };
1287
1288       _proto._getDimension = function _getDimension() {
1289         var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH);
1290         return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1291       };
1292
1293       _proto._getParent = function _getParent() {
1294         var _this3 = this;
1295
1296         var parent = null;
1297
1298         if (Util.isElement(this._config.parent)) {
1299           parent = this._config.parent; // It's a jQuery object
1300
1301           if (typeof this._config.parent.jquery !== 'undefined') {
1302             parent = this._config.parent[0];
1303           }
1304         } else {
1305           parent = document.querySelector(this._config.parent);
1306         }
1307
1308         var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
1309         var children = [].slice.call(parent.querySelectorAll(selector));
1310         $$$1(children).each(function (i, element) {
1311           _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1312         });
1313         return parent;
1314       };
1315
1316       _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1317         if (element) {
1318           var isOpen = $$$1(element).hasClass(ClassName.SHOW);
1319
1320           if (triggerArray.length) {
1321             $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1322           }
1323         }
1324       }; // Static
1325
1326
1327       Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1328         var selector = Util.getSelectorFromElement(element);
1329         return selector ? document.querySelector(selector) : null;
1330       };
1331
1332       Collapse._jQueryInterface = function _jQueryInterface(config) {
1333         return this.each(function () {
1334           var $this = $$$1(this);
1335           var data = $this.data(DATA_KEY);
1336
1337           var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {});
1338
1339           if (!data && _config.toggle && /show|hide/.test(config)) {
1340             _config.toggle = false;
1341           }
1342
1343           if (!data) {
1344             data = new Collapse(this, _config);
1345             $this.data(DATA_KEY, data);
1346           }
1347
1348           if (typeof config === 'string') {
1349             if (typeof data[config] === 'undefined') {
1350               throw new TypeError("No method named \"" + config + "\"");
1351             }
1352
1353             data[config]();
1354           }
1355         });
1356       };
1357
1358       _createClass(Collapse, null, [{
1359         key: "VERSION",
1360         get: function get() {
1361           return VERSION;
1362         }
1363       }, {
1364         key: "Default",
1365         get: function get() {
1366           return Default;
1367         }
1368       }]);
1369
1370       return Collapse;
1371     }();
1372     /**
1373      * ------------------------------------------------------------------------
1374      * Data Api implementation
1375      * ------------------------------------------------------------------------
1376      */
1377
1378
1379     $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
1380       // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1381       if (event.currentTarget.tagName === 'A') {
1382         event.preventDefault();
1383       }
1384
1385       var $trigger = $$$1(this);
1386       var selector = Util.getSelectorFromElement(this);
1387       var selectors = [].slice.call(document.querySelectorAll(selector));
1388       $$$1(selectors).each(function () {
1389         var $target = $$$1(this);
1390         var data = $target.data(DATA_KEY);
1391         var config = data ? 'toggle' : $trigger.data();
1392
1393         Collapse._jQueryInterface.call($target, config);
1394       });
1395     });
1396     /**
1397      * ------------------------------------------------------------------------
1398      * jQuery
1399      * ------------------------------------------------------------------------
1400      */
1401
1402     $$$1.fn[NAME] = Collapse._jQueryInterface;
1403     $$$1.fn[NAME].Constructor = Collapse;
1404
1405     $$$1.fn[NAME].noConflict = function () {
1406       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
1407       return Collapse._jQueryInterface;
1408     };
1409
1410     return Collapse;
1411   }($);
1412
1413   /**!
1414    * @fileOverview Kickass library to create and place poppers near their reference elements.
1415    * @version 1.14.3
1416    * @license
1417    * Copyright (c) 2016 Federico Zivolo and contributors
1418    *
1419    * Permission is hereby granted, free of charge, to any person obtaining a copy
1420    * of this software and associated documentation files (the "Software"), to deal
1421    * in the Software without restriction, including without limitation the rights
1422    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1423    * copies of the Software, and to permit persons to whom the Software is
1424    * furnished to do so, subject to the following conditions:
1425    *
1426    * The above copyright notice and this permission notice shall be included in all
1427    * copies or substantial portions of the Software.
1428    *
1429    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1430    * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1431    * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1432    * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1433    * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1434    * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1435    * SOFTWARE.
1436    */
1437   var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
1438
1439   var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
1440   var timeoutDuration = 0;
1441   for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
1442     if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
1443       timeoutDuration = 1;
1444       break;
1445     }
1446   }
1447
1448   function microtaskDebounce(fn) {
1449     var called = false;
1450     return function () {
1451       if (called) {
1452         return;
1453       }
1454       called = true;
1455       window.Promise.resolve().then(function () {
1456         called = false;
1457         fn();
1458       });
1459     };
1460   }
1461
1462   function taskDebounce(fn) {
1463     var scheduled = false;
1464     return function () {
1465       if (!scheduled) {
1466         scheduled = true;
1467         setTimeout(function () {
1468           scheduled = false;
1469           fn();
1470         }, timeoutDuration);
1471       }
1472     };
1473   }
1474
1475   var supportsMicroTasks = isBrowser && window.Promise;
1476
1477   /**
1478   * Create a debounced version of a method, that's asynchronously deferred
1479   * but called in the minimum time possible.
1480   *
1481   * @method
1482   * @memberof Popper.Utils
1483   * @argument {Function} fn
1484   * @returns {Function}
1485   */
1486   var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
1487
1488   /**
1489    * Check if the given variable is a function
1490    * @method
1491    * @memberof Popper.Utils
1492    * @argument {Any} functionToCheck - variable to check
1493    * @returns {Boolean} answer to: is a function?
1494    */
1495   function isFunction(functionToCheck) {
1496     var getType = {};
1497     return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1498   }
1499
1500   /**
1501    * Get CSS computed property of the given element
1502    * @method
1503    * @memberof Popper.Utils
1504    * @argument {Eement} element
1505    * @argument {String} property
1506    */
1507   function getStyleComputedProperty(element, property) {
1508     if (element.nodeType !== 1) {
1509       return [];
1510     }
1511     // NOTE: 1 DOM access here
1512     var css = getComputedStyle(element, null);
1513     return property ? css[property] : css;
1514   }
1515
1516   /**
1517    * Returns the parentNode or the host of the element
1518    * @method
1519    * @memberof Popper.Utils
1520    * @argument {Element} element
1521    * @returns {Element} parent
1522    */
1523   function getParentNode(element) {
1524     if (element.nodeName === 'HTML') {
1525       return element;
1526     }
1527     return element.parentNode || element.host;
1528   }
1529
1530   /**
1531    * Returns the scrolling parent of the given element
1532    * @method
1533    * @memberof Popper.Utils
1534    * @argument {Element} element
1535    * @returns {Element} scroll parent
1536    */
1537   function getScrollParent(element) {
1538     // Return body, `getScroll` will take care to get the correct `scrollTop` from it
1539     if (!element) {
1540       return document.body;
1541     }
1542
1543     switch (element.nodeName) {
1544       case 'HTML':
1545       case 'BODY':
1546         return element.ownerDocument.body;
1547       case '#document':
1548         return element.body;
1549     }
1550
1551     // Firefox want us to check `-x` and `-y` variations as well
1552
1553     var _getStyleComputedProp = getStyleComputedProperty(element),
1554         overflow = _getStyleComputedProp.overflow,
1555         overflowX = _getStyleComputedProp.overflowX,
1556         overflowY = _getStyleComputedProp.overflowY;
1557
1558     if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
1559       return element;
1560     }
1561
1562     return getScrollParent(getParentNode(element));
1563   }
1564
1565   var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
1566   var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
1567
1568   /**
1569    * Determines if the browser is Internet Explorer
1570    * @method
1571    * @memberof Popper.Utils
1572    * @param {Number} version to check
1573    * @returns {Boolean} isIE
1574    */
1575   function isIE(version) {
1576     if (version === 11) {
1577       return isIE11;
1578     }
1579     if (version === 10) {
1580       return isIE10;
1581     }
1582     return isIE11 || isIE10;
1583   }
1584
1585   /**
1586    * Returns the offset parent of the given element
1587    * @method
1588    * @memberof Popper.Utils
1589    * @argument {Element} element
1590    * @returns {Element} offset parent
1591    */
1592   function getOffsetParent(element) {
1593     if (!element) {
1594       return document.documentElement;
1595     }
1596
1597     var noOffsetParent = isIE(10) ? document.body : null;
1598
1599     // NOTE: 1 DOM access here
1600     var offsetParent = element.offsetParent;
1601     // Skip hidden elements which don't have an offsetParent
1602     while (offsetParent === noOffsetParent && element.nextElementSibling) {
1603       offsetParent = (element = element.nextElementSibling).offsetParent;
1604     }
1605
1606     var nodeName = offsetParent && offsetParent.nodeName;
1607
1608     if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
1609       return element ? element.ownerDocument.documentElement : document.documentElement;
1610     }
1611
1612     // .offsetParent will return the closest TD or TABLE in case
1613     // no offsetParent is present, I hate this job...
1614     if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
1615       return getOffsetParent(offsetParent);
1616     }
1617
1618     return offsetParent;
1619   }
1620
1621   function isOffsetContainer(element) {
1622     var nodeName = element.nodeName;
1623
1624     if (nodeName === 'BODY') {
1625       return false;
1626     }
1627     return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
1628   }
1629
1630   /**
1631    * Finds the root node (document, shadowDOM root) of the given element
1632    * @method
1633    * @memberof Popper.Utils
1634    * @argument {Element} node
1635    * @returns {Element} root node
1636    */
1637   function getRoot(node) {
1638     if (node.parentNode !== null) {
1639       return getRoot(node.parentNode);
1640     }
1641
1642     return node;
1643   }
1644
1645   /**
1646    * Finds the offset parent common to the two provided nodes
1647    * @method
1648    * @memberof Popper.Utils
1649    * @argument {Element} element1
1650    * @argument {Element} element2
1651    * @returns {Element} common offset parent
1652    */
1653   function findCommonOffsetParent(element1, element2) {
1654     // This check is needed to avoid errors in case one of the elements isn't defined for any reason
1655     if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
1656       return document.documentElement;
1657     }
1658
1659     // Here we make sure to give as "start" the element that comes first in the DOM
1660     var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
1661     var start = order ? element1 : element2;
1662     var end = order ? element2 : element1;
1663
1664     // Get common ancestor container
1665     var range = document.createRange();
1666     range.setStart(start, 0);
1667     range.setEnd(end, 0);
1668     var commonAncestorContainer = range.commonAncestorContainer;
1669
1670     // Both nodes are inside #document
1671
1672     if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
1673       if (isOffsetContainer(commonAncestorContainer)) {
1674         return commonAncestorContainer;
1675       }
1676
1677       return getOffsetParent(commonAncestorContainer);
1678     }
1679
1680     // one of the nodes is inside shadowDOM, find which one
1681     var element1root = getRoot(element1);
1682     if (element1root.host) {
1683       return findCommonOffsetParent(element1root.host, element2);
1684     } else {
1685       return findCommonOffsetParent(element1, getRoot(element2).host);
1686     }
1687   }
1688
1689   /**
1690    * Gets the scroll value of the given element in the given side (top and left)
1691    * @method
1692    * @memberof Popper.Utils
1693    * @argument {Element} element
1694    * @argument {String} side `top` or `left`
1695    * @returns {number} amount of scrolled pixels
1696    */
1697   function getScroll(element) {
1698     var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
1699
1700     var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
1701     var nodeName = element.nodeName;
1702
1703     if (nodeName === 'BODY' || nodeName === 'HTML') {
1704       var html = element.ownerDocument.documentElement;
1705       var scrollingElement = element.ownerDocument.scrollingElement || html;
1706       return scrollingElement[upperSide];
1707     }
1708
1709     return element[upperSide];
1710   }
1711
1712   /*
1713    * Sum or subtract the element scroll values (left and top) from a given rect object
1714    * @method
1715    * @memberof Popper.Utils
1716    * @param {Object} rect - Rect object you want to change
1717    * @param {HTMLElement} element - The element from the function reads the scroll values
1718    * @param {Boolean} subtract - set to true if you want to subtract the scroll values
1719    * @return {Object} rect - The modifier rect object
1720    */
1721   function includeScroll(rect, element) {
1722     var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1723
1724     var scrollTop = getScroll(element, 'top');
1725     var scrollLeft = getScroll(element, 'left');
1726     var modifier = subtract ? -1 : 1;
1727     rect.top += scrollTop * modifier;
1728     rect.bottom += scrollTop * modifier;
1729     rect.left += scrollLeft * modifier;
1730     rect.right += scrollLeft * modifier;
1731     return rect;
1732   }
1733
1734   /*
1735    * Helper to detect borders of a given element
1736    * @method
1737    * @memberof Popper.Utils
1738    * @param {CSSStyleDeclaration} styles
1739    * Result of `getStyleComputedProperty` on the given element
1740    * @param {String} axis - `x` or `y`
1741    * @return {number} borders - The borders size of the given axis
1742    */
1743
1744   function getBordersSize(styles, axis) {
1745     var sideA = axis === 'x' ? 'Left' : 'Top';
1746     var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
1747
1748     return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
1749   }
1750
1751   function getSize(axis, body, html, computedStyle) {
1752     return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
1753   }
1754
1755   function getWindowSizes() {
1756     var body = document.body;
1757     var html = document.documentElement;
1758     var computedStyle = isIE(10) && getComputedStyle(html);
1759
1760     return {
1761       height: getSize('Height', body, html, computedStyle),
1762       width: getSize('Width', body, html, computedStyle)
1763     };
1764   }
1765
1766   var classCallCheck = function (instance, Constructor) {
1767     if (!(instance instanceof Constructor)) {
1768       throw new TypeError("Cannot call a class as a function");
1769     }
1770   };
1771
1772   var createClass = function () {
1773     function defineProperties(target, props) {
1774       for (var i = 0; i < props.length; i++) {
1775         var descriptor = props[i];
1776         descriptor.enumerable = descriptor.enumerable || false;
1777         descriptor.configurable = true;
1778         if ("value" in descriptor) descriptor.writable = true;
1779         Object.defineProperty(target, descriptor.key, descriptor);
1780       }
1781     }
1782
1783     return function (Constructor, protoProps, staticProps) {
1784       if (protoProps) defineProperties(Constructor.prototype, protoProps);
1785       if (staticProps) defineProperties(Constructor, staticProps);
1786       return Constructor;
1787     };
1788   }();
1789
1790
1791
1792
1793
1794   var defineProperty = function (obj, key, value) {
1795     if (key in obj) {
1796       Object.defineProperty(obj, key, {
1797         value: value,
1798         enumerable: true,
1799         configurable: true,
1800         writable: true
1801       });
1802     } else {
1803       obj[key] = value;
1804     }
1805
1806     return obj;
1807   };
1808
1809   var _extends = Object.assign || function (target) {
1810     for (var i = 1; i < arguments.length; i++) {
1811       var source = arguments[i];
1812
1813       for (var key in source) {
1814         if (Object.prototype.hasOwnProperty.call(source, key)) {
1815           target[key] = source[key];
1816         }
1817       }
1818     }
1819
1820     return target;
1821   };
1822
1823   /**
1824    * Given element offsets, generate an output similar to getBoundingClientRect
1825    * @method
1826    * @memberof Popper.Utils
1827    * @argument {Object} offsets
1828    * @returns {Object} ClientRect like output
1829    */
1830   function getClientRect(offsets) {
1831     return _extends({}, offsets, {
1832       right: offsets.left + offsets.width,
1833       bottom: offsets.top + offsets.height
1834     });
1835   }
1836
1837   /**
1838    * Get bounding client rect of given element
1839    * @method
1840    * @memberof Popper.Utils
1841    * @param {HTMLElement} element
1842    * @return {Object} client rect
1843    */
1844   function getBoundingClientRect(element) {
1845     var rect = {};
1846
1847     // IE10 10 FIX: Please, don't ask, the element isn't
1848     // considered in DOM in some circumstances...
1849     // This isn't reproducible in IE10 compatibility mode of IE11
1850     try {
1851       if (isIE(10)) {
1852         rect = element.getBoundingClientRect();
1853         var scrollTop = getScroll(element, 'top');
1854         var scrollLeft = getScroll(element, 'left');
1855         rect.top += scrollTop;
1856         rect.left += scrollLeft;
1857         rect.bottom += scrollTop;
1858         rect.right += scrollLeft;
1859       } else {
1860         rect = element.getBoundingClientRect();
1861       }
1862     } catch (e) {}
1863
1864     var result = {
1865       left: rect.left,
1866       top: rect.top,
1867       width: rect.right - rect.left,
1868       height: rect.bottom - rect.top
1869     };
1870
1871     // subtract scrollbar size from sizes
1872     var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
1873     var width = sizes.width || element.clientWidth || result.right - result.left;
1874     var height = sizes.height || element.clientHeight || result.bottom - result.top;
1875
1876     var horizScrollbar = element.offsetWidth - width;
1877     var vertScrollbar = element.offsetHeight - height;
1878
1879     // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
1880     // we make this check conditional for performance reasons
1881     if (horizScrollbar || vertScrollbar) {
1882       var styles = getStyleComputedProperty(element);
1883       horizScrollbar -= getBordersSize(styles, 'x');
1884       vertScrollbar -= getBordersSize(styles, 'y');
1885
1886       result.width -= horizScrollbar;
1887       result.height -= vertScrollbar;
1888     }
1889
1890     return getClientRect(result);
1891   }
1892
1893   function getOffsetRectRelativeToArbitraryNode(children, parent) {
1894     var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1895
1896     var isIE10 = isIE(10);
1897     var isHTML = parent.nodeName === 'HTML';
1898     var childrenRect = getBoundingClientRect(children);
1899     var parentRect = getBoundingClientRect(parent);
1900     var scrollParent = getScrollParent(children);
1901
1902     var styles = getStyleComputedProperty(parent);
1903     var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
1904     var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
1905
1906     // In cases where the parent is fixed, we must ignore negative scroll in offset calc
1907     if (fixedPosition && parent.nodeName === 'HTML') {
1908       parentRect.top = Math.max(parentRect.top, 0);
1909       parentRect.left = Math.max(parentRect.left, 0);
1910     }
1911     var offsets = getClientRect({
1912       top: childrenRect.top - parentRect.top - borderTopWidth,
1913       left: childrenRect.left - parentRect.left - borderLeftWidth,
1914       width: childrenRect.width,
1915       height: childrenRect.height
1916     });
1917     offsets.marginTop = 0;
1918     offsets.marginLeft = 0;
1919
1920     // Subtract margins of documentElement in case it's being used as parent
1921     // we do this only on HTML because it's the only element that behaves
1922     // differently when margins are applied to it. The margins are included in
1923     // the box of the documentElement, in the other cases not.
1924     if (!isIE10 && isHTML) {
1925       var marginTop = parseFloat(styles.marginTop, 10);
1926       var marginLeft = parseFloat(styles.marginLeft, 10);
1927
1928       offsets.top -= borderTopWidth - marginTop;
1929       offsets.bottom -= borderTopWidth - marginTop;
1930       offsets.left -= borderLeftWidth - marginLeft;
1931       offsets.right -= borderLeftWidth - marginLeft;
1932
1933       // Attach marginTop and marginLeft because in some circumstances we may need them
1934       offsets.marginTop = marginTop;
1935       offsets.marginLeft = marginLeft;
1936     }
1937
1938     if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
1939       offsets = includeScroll(offsets, parent);
1940     }
1941
1942     return offsets;
1943   }
1944
1945   function getViewportOffsetRectRelativeToArtbitraryNode(element) {
1946     var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1947
1948     var html = element.ownerDocument.documentElement;
1949     var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
1950     var width = Math.max(html.clientWidth, window.innerWidth || 0);
1951     var height = Math.max(html.clientHeight, window.innerHeight || 0);
1952
1953     var scrollTop = !excludeScroll ? getScroll(html) : 0;
1954     var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
1955
1956     var offset = {
1957       top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
1958       left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
1959       width: width,
1960       height: height
1961     };
1962
1963     return getClientRect(offset);
1964   }
1965
1966   /**
1967    * Check if the given element is fixed or is inside a fixed parent
1968    * @method
1969    * @memberof Popper.Utils
1970    * @argument {Element} element
1971    * @argument {Element} customContainer
1972    * @returns {Boolean} answer to "isFixed?"
1973    */
1974   function isFixed(element) {
1975     var nodeName = element.nodeName;
1976     if (nodeName === 'BODY' || nodeName === 'HTML') {
1977       return false;
1978     }
1979     if (getStyleComputedProperty(element, 'position') === 'fixed') {
1980       return true;
1981     }
1982     return isFixed(getParentNode(element));
1983   }
1984
1985   /**
1986    * Finds the first parent of an element that has a transformed property defined
1987    * @method
1988    * @memberof Popper.Utils
1989    * @argument {Element} element
1990    * @returns {Element} first transformed parent or documentElement
1991    */
1992
1993   function getFixedPositionOffsetParent(element) {
1994     // This check is needed to avoid errors in case one of the elements isn't defined for any reason
1995     if (!element || !element.parentElement || isIE()) {
1996       return document.documentElement;
1997     }
1998     var el = element.parentElement;
1999     while (el && getStyleComputedProperty(el, 'transform') === 'none') {
2000       el = el.parentElement;
2001     }
2002     return el || document.documentElement;
2003   }
2004
2005   /**
2006    * Computed the boundaries limits and return them
2007    * @method
2008    * @memberof Popper.Utils
2009    * @param {HTMLElement} popper
2010    * @param {HTMLElement} reference
2011    * @param {number} padding
2012    * @param {HTMLElement} boundariesElement - Element used to define the boundaries
2013    * @param {Boolean} fixedPosition - Is in fixed position mode
2014    * @returns {Object} Coordinates of the boundaries
2015    */
2016   function getBoundaries(popper, reference, padding, boundariesElement) {
2017     var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
2018
2019     // NOTE: 1 DOM access here
2020
2021     var boundaries = { top: 0, left: 0 };
2022     var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
2023
2024     // Handle viewport case
2025     if (boundariesElement === 'viewport') {
2026       boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
2027     } else {
2028       // Handle other cases based on DOM element used as boundaries
2029       var boundariesNode = void 0;
2030       if (boundariesElement === 'scrollParent') {
2031         boundariesNode = getScrollParent(getParentNode(reference));
2032         if (boundariesNode.nodeName === 'BODY') {
2033           boundariesNode = popper.ownerDocument.documentElement;
2034         }
2035       } else if (boundariesElement === 'window') {
2036         boundariesNode = popper.ownerDocument.documentElement;
2037       } else {
2038         boundariesNode = boundariesElement;
2039       }
2040
2041       var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
2042
2043       // In case of HTML, we need a different computation
2044       if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
2045         var _getWindowSizes = getWindowSizes(),
2046             height = _getWindowSizes.height,
2047             width = _getWindowSizes.width;
2048
2049         boundaries.top += offsets.top - offsets.marginTop;
2050         boundaries.bottom = height + offsets.top;
2051         boundaries.left += offsets.left - offsets.marginLeft;
2052         boundaries.right = width + offsets.left;
2053       } else {
2054         // for all the other DOM elements, this one is good
2055         boundaries = offsets;
2056       }
2057     }
2058
2059     // Add paddings
2060     boundaries.left += padding;
2061     boundaries.top += padding;
2062     boundaries.right -= padding;
2063     boundaries.bottom -= padding;
2064
2065     return boundaries;
2066   }
2067
2068   function getArea(_ref) {
2069     var width = _ref.width,
2070         height = _ref.height;
2071
2072     return width * height;
2073   }
2074
2075   /**
2076    * Utility used to transform the `auto` placement to the placement with more
2077    * available space.
2078    * @method
2079    * @memberof Popper.Utils
2080    * @argument {Object} data - The data object generated by update method
2081    * @argument {Object} options - Modifiers configuration and options
2082    * @returns {Object} The data object, properly modified
2083    */
2084   function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
2085     var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
2086
2087     if (placement.indexOf('auto') === -1) {
2088       return placement;
2089     }
2090
2091     var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
2092
2093     var rects = {
2094       top: {
2095         width: boundaries.width,
2096         height: refRect.top - boundaries.top
2097       },
2098       right: {
2099         width: boundaries.right - refRect.right,
2100         height: boundaries.height
2101       },
2102       bottom: {
2103         width: boundaries.width,
2104         height: boundaries.bottom - refRect.bottom
2105       },
2106       left: {
2107         width: refRect.left - boundaries.left,
2108         height: boundaries.height
2109       }
2110     };
2111
2112     var sortedAreas = Object.keys(rects).map(function (key) {
2113       return _extends({
2114         key: key
2115       }, rects[key], {
2116         area: getArea(rects[key])
2117       });
2118     }).sort(function (a, b) {
2119       return b.area - a.area;
2120     });
2121
2122     var filteredAreas = sortedAreas.filter(function (_ref2) {
2123       var width = _ref2.width,
2124           height = _ref2.height;
2125       return width >= popper.clientWidth && height >= popper.clientHeight;
2126     });
2127
2128     var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
2129
2130     var variation = placement.split('-')[1];
2131
2132     return computedPlacement + (variation ? '-' + variation : '');
2133   }
2134
2135   /**
2136    * Get offsets to the reference element
2137    * @method
2138    * @memberof Popper.Utils
2139    * @param {Object} state
2140    * @param {Element} popper - the popper element
2141    * @param {Element} reference - the reference element (the popper will be relative to this)
2142    * @param {Element} fixedPosition - is in fixed position mode
2143    * @returns {Object} An object containing the offsets which will be applied to the popper
2144    */
2145   function getReferenceOffsets(state, popper, reference) {
2146     var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
2147
2148     var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
2149     return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
2150   }
2151
2152   /**
2153    * Get the outer sizes of the given element (offset size + margins)
2154    * @method
2155    * @memberof Popper.Utils
2156    * @argument {Element} element
2157    * @returns {Object} object containing width and height properties
2158    */
2159   function getOuterSizes(element) {
2160     var styles = getComputedStyle(element);
2161     var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
2162     var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
2163     var result = {
2164       width: element.offsetWidth + y,
2165       height: element.offsetHeight + x
2166     };
2167     return result;
2168   }
2169
2170   /**
2171    * Get the opposite placement of the given one
2172    * @method
2173    * @memberof Popper.Utils
2174    * @argument {String} placement
2175    * @returns {String} flipped placement
2176    */
2177   function getOppositePlacement(placement) {
2178     var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
2179     return placement.replace(/left|right|bottom|top/g, function (matched) {
2180       return hash[matched];
2181     });
2182   }
2183
2184   /**
2185    * Get offsets to the popper
2186    * @method
2187    * @memberof Popper.Utils
2188    * @param {Object} position - CSS position the Popper will get applied
2189    * @param {HTMLElement} popper - the popper element
2190    * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
2191    * @param {String} placement - one of the valid placement options
2192    * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
2193    */
2194   function getPopperOffsets(popper, referenceOffsets, placement) {
2195     placement = placement.split('-')[0];
2196
2197     // Get popper node sizes
2198     var popperRect = getOuterSizes(popper);
2199
2200     // Add position, width and height to our offsets object
2201     var popperOffsets = {
2202       width: popperRect.width,
2203       height: popperRect.height
2204     };
2205
2206     // depending by the popper placement we have to compute its offsets slightly differently
2207     var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
2208     var mainSide = isHoriz ? 'top' : 'left';
2209     var secondarySide = isHoriz ? 'left' : 'top';
2210     var measurement = isHoriz ? 'height' : 'width';
2211     var secondaryMeasurement = !isHoriz ? 'height' : 'width';
2212
2213     popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
2214     if (placement === secondarySide) {
2215       popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
2216     } else {
2217       popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
2218     }
2219
2220     return popperOffsets;
2221   }
2222
2223   /**
2224    * Mimics the `find` method of Array
2225    * @method
2226    * @memberof Popper.Utils
2227    * @argument {Array} arr
2228    * @argument prop
2229    * @argument value
2230    * @returns index or -1
2231    */
2232   function find(arr, check) {
2233     // use native find if supported
2234     if (Array.prototype.find) {
2235       return arr.find(check);
2236     }
2237
2238     // use `filter` to obtain the same behavior of `find`
2239     return arr.filter(check)[0];
2240   }
2241
2242   /**
2243    * Return the index of the matching object
2244    * @method
2245    * @memberof Popper.Utils
2246    * @argument {Array} arr
2247    * @argument prop
2248    * @argument value
2249    * @returns index or -1
2250    */
2251   function findIndex(arr, prop, value) {
2252     // use native findIndex if supported
2253     if (Array.prototype.findIndex) {
2254       return arr.findIndex(function (cur) {
2255         return cur[prop] === value;
2256       });
2257     }
2258
2259     // use `find` + `indexOf` if `findIndex` isn't supported
2260     var match = find(arr, function (obj) {
2261       return obj[prop] === value;
2262     });
2263     return arr.indexOf(match);
2264   }
2265
2266   /**
2267    * Loop trough the list of modifiers and run them in order,
2268    * each of them will then edit the data object.
2269    * @method
2270    * @memberof Popper.Utils
2271    * @param {dataObject} data
2272    * @param {Array} modifiers
2273    * @param {String} ends - Optional modifier name used as stopper
2274    * @returns {dataObject}
2275    */
2276   function runModifiers(modifiers, data, ends) {
2277     var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
2278
2279     modifiersToRun.forEach(function (modifier) {
2280       if (modifier['function']) {
2281         // eslint-disable-line dot-notation
2282         console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
2283       }
2284       var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
2285       if (modifier.enabled && isFunction(fn)) {
2286         // Add properties to offsets to make them a complete clientRect object
2287         // we do this before each modifier to make sure the previous one doesn't
2288         // mess with these values
2289         data.offsets.popper = getClientRect(data.offsets.popper);
2290         data.offsets.reference = getClientRect(data.offsets.reference);
2291
2292         data = fn(data, modifier);
2293       }
2294     });
2295
2296     return data;
2297   }
2298
2299   /**
2300    * Updates the position of the popper, computing the new offsets and applying
2301    * the new style.<br />
2302    * Prefer `scheduleUpdate` over `update` because of performance reasons.
2303    * @method
2304    * @memberof Popper
2305    */
2306   function update() {
2307     // if popper is destroyed, don't perform any further update
2308     if (this.state.isDestroyed) {
2309       return;
2310     }
2311
2312     var data = {
2313       instance: this,
2314       styles: {},
2315       arrowStyles: {},
2316       attributes: {},
2317       flipped: false,
2318       offsets: {}
2319     };
2320
2321     // compute reference element offsets
2322     data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
2323
2324     // compute auto placement, store placement inside the data object,
2325     // modifiers will be able to edit `placement` if needed
2326     // and refer to originalPlacement to know the original value
2327     data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
2328
2329     // store the computed placement inside `originalPlacement`
2330     data.originalPlacement = data.placement;
2331
2332     data.positionFixed = this.options.positionFixed;
2333
2334     // compute the popper offsets
2335     data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
2336
2337     data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
2338
2339     // run the modifiers
2340     data = runModifiers(this.modifiers, data);
2341
2342     // the first `update` will call `onCreate` callback
2343     // the other ones will call `onUpdate` callback
2344     if (!this.state.isCreated) {
2345       this.state.isCreated = true;
2346       this.options.onCreate(data);
2347     } else {
2348       this.options.onUpdate(data);
2349     }
2350   }
2351
2352   /**
2353    * Helper used to know if the given modifier is enabled.
2354    * @method
2355    * @memberof Popper.Utils
2356    * @returns {Boolean}
2357    */
2358   function isModifierEnabled(modifiers, modifierName) {
2359     return modifiers.some(function (_ref) {
2360       var name = _ref.name,
2361           enabled = _ref.enabled;
2362       return enabled && name === modifierName;
2363     });
2364   }
2365
2366   /**
2367    * Get the prefixed supported property name
2368    * @method
2369    * @memberof Popper.Utils
2370    * @argument {String} property (camelCase)
2371    * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
2372    */
2373   function getSupportedPropertyName(property) {
2374     var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
2375     var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
2376
2377     for (var i = 0; i < prefixes.length; i++) {
2378       var prefix = prefixes[i];
2379       var toCheck = prefix ? '' + prefix + upperProp : property;
2380       if (typeof document.body.style[toCheck] !== 'undefined') {
2381         return toCheck;
2382       }
2383     }
2384     return null;
2385   }
2386
2387   /**
2388    * Destroy the popper
2389    * @method
2390    * @memberof Popper
2391    */
2392   function destroy() {
2393     this.state.isDestroyed = true;
2394
2395     // touch DOM only if `applyStyle` modifier is enabled
2396     if (isModifierEnabled(this.modifiers, 'applyStyle')) {
2397       this.popper.removeAttribute('x-placement');
2398       this.popper.style.position = '';
2399       this.popper.style.top = '';
2400       this.popper.style.left = '';
2401       this.popper.style.right = '';
2402       this.popper.style.bottom = '';
2403       this.popper.style.willChange = '';
2404       this.popper.style[getSupportedPropertyName('transform')] = '';
2405     }
2406
2407     this.disableEventListeners();
2408
2409     // remove the popper if user explicity asked for the deletion on destroy
2410     // do not use `remove` because IE11 doesn't support it
2411     if (this.options.removeOnDestroy) {
2412       this.popper.parentNode.removeChild(this.popper);
2413     }
2414     return this;
2415   }
2416
2417   /**
2418    * Get the window associated with the element
2419    * @argument {Element} element
2420    * @returns {Window}
2421    */
2422   function getWindow(element) {
2423     var ownerDocument = element.ownerDocument;
2424     return ownerDocument ? ownerDocument.defaultView : window;
2425   }
2426
2427   function attachToScrollParents(scrollParent, event, callback, scrollParents) {
2428     var isBody = scrollParent.nodeName === 'BODY';
2429     var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
2430     target.addEventListener(event, callback, { passive: true });
2431
2432     if (!isBody) {
2433       attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
2434     }
2435     scrollParents.push(target);
2436   }
2437
2438   /**
2439    * Setup needed event listeners used to update the popper position
2440    * @method
2441    * @memberof Popper.Utils
2442    * @private
2443    */
2444   function setupEventListeners(reference, options, state, updateBound) {
2445     // Resize event listener on window
2446     state.updateBound = updateBound;
2447     getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
2448
2449     // Scroll event listener on scroll parents
2450     var scrollElement = getScrollParent(reference);
2451     attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
2452     state.scrollElement = scrollElement;
2453     state.eventsEnabled = true;
2454
2455     return state;
2456   }
2457
2458   /**
2459    * It will add resize/scroll events and start recalculating
2460    * position of the popper element when they are triggered.
2461    * @method
2462    * @memberof Popper
2463    */
2464   function enableEventListeners() {
2465     if (!this.state.eventsEnabled) {
2466       this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
2467     }
2468   }
2469
2470   /**
2471    * Remove event listeners used to update the popper position
2472    * @method
2473    * @memberof Popper.Utils
2474    * @private
2475    */
2476   function removeEventListeners(reference, state) {
2477     // Remove resize event listener on window
2478     getWindow(reference).removeEventListener('resize', state.updateBound);
2479
2480     // Remove scroll event listener on scroll parents
2481     state.scrollParents.forEach(function (target) {
2482       target.removeEventListener('scroll', state.updateBound);
2483     });
2484
2485     // Reset state
2486     state.updateBound = null;
2487     state.scrollParents = [];
2488     state.scrollElement = null;
2489     state.eventsEnabled = false;
2490     return state;
2491   }
2492
2493   /**
2494    * It will remove resize/scroll events and won't recalculate popper position
2495    * when they are triggered. It also won't trigger onUpdate callback anymore,
2496    * unless you call `update` method manually.
2497    * @method
2498    * @memberof Popper
2499    */
2500   function disableEventListeners() {
2501     if (this.state.eventsEnabled) {
2502       cancelAnimationFrame(this.scheduleUpdate);
2503       this.state = removeEventListeners(this.reference, this.state);
2504     }
2505   }
2506
2507   /**
2508    * Tells if a given input is a number
2509    * @method
2510    * @memberof Popper.Utils
2511    * @param {*} input to check
2512    * @return {Boolean}
2513    */
2514   function isNumeric(n) {
2515     return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2516   }
2517
2518   /**
2519    * Set the style to the given popper
2520    * @method
2521    * @memberof Popper.Utils
2522    * @argument {Element} element - Element to apply the style to
2523    * @argument {Object} styles
2524    * Object with a list of properties and values which will be applied to the element
2525    */
2526   function setStyles(element, styles) {
2527     Object.keys(styles).forEach(function (prop) {
2528       var unit = '';
2529       // add unit if the value is numeric and is one of the following
2530       if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
2531         unit = 'px';
2532       }
2533       element.style[prop] = styles[prop] + unit;
2534     });
2535   }
2536
2537   /**
2538    * Set the attributes to the given popper
2539    * @method
2540    * @memberof Popper.Utils
2541    * @argument {Element} element - Element to apply the attributes to
2542    * @argument {Object} styles
2543    * Object with a list of properties and values which will be applied to the element
2544    */
2545   function setAttributes(element, attributes) {
2546     Object.keys(attributes).forEach(function (prop) {
2547       var value = attributes[prop];
2548       if (value !== false) {
2549         element.setAttribute(prop, attributes[prop]);
2550       } else {
2551         element.removeAttribute(prop);
2552       }
2553     });
2554   }
2555
2556   /**
2557    * @function
2558    * @memberof Modifiers
2559    * @argument {Object} data - The data object generated by `update` method
2560    * @argument {Object} data.styles - List of style properties - values to apply to popper element
2561    * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
2562    * @argument {Object} options - Modifiers configuration and options
2563    * @returns {Object} The same data object
2564    */
2565   function applyStyle(data) {
2566     // any property present in `data.styles` will be applied to the popper,
2567     // in this way we can make the 3rd party modifiers add custom styles to it
2568     // Be aware, modifiers could override the properties defined in the previous
2569     // lines of this modifier!
2570     setStyles(data.instance.popper, data.styles);
2571
2572     // any property present in `data.attributes` will be applied to the popper,
2573     // they will be set as HTML attributes of the element
2574     setAttributes(data.instance.popper, data.attributes);
2575
2576     // if arrowElement is defined and arrowStyles has some properties
2577     if (data.arrowElement && Object.keys(data.arrowStyles).length) {
2578       setStyles(data.arrowElement, data.arrowStyles);
2579     }
2580
2581     return data;
2582   }
2583
2584   /**
2585    * Set the x-placement attribute before everything else because it could be used
2586    * to add margins to the popper margins needs to be calculated to get the
2587    * correct popper offsets.
2588    * @method
2589    * @memberof Popper.modifiers
2590    * @param {HTMLElement} reference - The reference element used to position the popper
2591    * @param {HTMLElement} popper - The HTML element used as popper
2592    * @param {Object} options - Popper.js options
2593    */
2594   function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
2595     // compute reference element offsets
2596     var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
2597
2598     // compute auto placement, store placement inside the data object,
2599     // modifiers will be able to edit `placement` if needed
2600     // and refer to originalPlacement to know the original value
2601     var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
2602
2603     popper.setAttribute('x-placement', placement);
2604
2605     // Apply `position` to popper before anything else because
2606     // without the position applied we can't guarantee correct computations
2607     setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
2608
2609     return options;
2610   }
2611
2612   /**
2613    * @function
2614    * @memberof Modifiers
2615    * @argument {Object} data - The data object generated by `update` method
2616    * @argument {Object} options - Modifiers configuration and options
2617    * @returns {Object} The data object, properly modified
2618    */
2619   function computeStyle(data, options) {
2620     var x = options.x,
2621         y = options.y;
2622     var popper = data.offsets.popper;
2623
2624     // Remove this legacy support in Popper.js v2
2625
2626     var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
2627       return modifier.name === 'applyStyle';
2628     }).gpuAcceleration;
2629     if (legacyGpuAccelerationOption !== undefined) {
2630       console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
2631     }
2632     var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
2633
2634     var offsetParent = getOffsetParent(data.instance.popper);
2635     var offsetParentRect = getBoundingClientRect(offsetParent);
2636
2637     // Styles
2638     var styles = {
2639       position: popper.position
2640     };
2641
2642     // Avoid blurry text by using full pixel integers.
2643     // For pixel-perfect positioning, top/bottom prefers rounded
2644     // values, while left/right prefers floored values.
2645     var offsets = {
2646       left: Math.floor(popper.left),
2647       top: Math.round(popper.top),
2648       bottom: Math.round(popper.bottom),
2649       right: Math.floor(popper.right)
2650     };
2651
2652     var sideA = x === 'bottom' ? 'top' : 'bottom';
2653     var sideB = y === 'right' ? 'left' : 'right';
2654
2655     // if gpuAcceleration is set to `true` and transform is supported,
2656     //  we use `translate3d` to apply the position to the popper we
2657     // automatically use the supported prefixed version if needed
2658     var prefixedProperty = getSupportedPropertyName('transform');
2659
2660     // now, let's make a step back and look at this code closely (wtf?)
2661     // If the content of the popper grows once it's been positioned, it
2662     // may happen that the popper gets misplaced because of the new content
2663     // overflowing its reference element
2664     // To avoid this problem, we provide two options (x and y), which allow
2665     // the consumer to define the offset origin.
2666     // If we position a popper on top of a reference element, we can set
2667     // `x` to `top` to make the popper grow towards its top instead of
2668     // its bottom.
2669     var left = void 0,
2670         top = void 0;
2671     if (sideA === 'bottom') {
2672       top = -offsetParentRect.height + offsets.bottom;
2673     } else {
2674       top = offsets.top;
2675     }
2676     if (sideB === 'right') {
2677       left = -offsetParentRect.width + offsets.right;
2678     } else {
2679       left = offsets.left;
2680     }
2681     if (gpuAcceleration && prefixedProperty) {
2682       styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2683       styles[sideA] = 0;
2684       styles[sideB] = 0;
2685       styles.willChange = 'transform';
2686     } else {
2687       // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
2688       var invertTop = sideA === 'bottom' ? -1 : 1;
2689       var invertLeft = sideB === 'right' ? -1 : 1;
2690       styles[sideA] = top * invertTop;
2691       styles[sideB] = left * invertLeft;
2692       styles.willChange = sideA + ', ' + sideB;
2693     }
2694
2695     // Attributes
2696     var attributes = {
2697       'x-placement': data.placement
2698     };
2699
2700     // Update `data` attributes, styles and arrowStyles
2701     data.attributes = _extends({}, attributes, data.attributes);
2702     data.styles = _extends({}, styles, data.styles);
2703     data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
2704
2705     return data;
2706   }
2707
2708   /**
2709    * Helper used to know if the given modifier depends from another one.<br />
2710    * It checks if the needed modifier is listed and enabled.
2711    * @method
2712    * @memberof Popper.Utils
2713    * @param {Array} modifiers - list of modifiers
2714    * @param {String} requestingName - name of requesting modifier
2715    * @param {String} requestedName - name of requested modifier
2716    * @returns {Boolean}
2717    */
2718   function isModifierRequired(modifiers, requestingName, requestedName) {
2719     var requesting = find(modifiers, function (_ref) {
2720       var name = _ref.name;
2721       return name === requestingName;
2722     });
2723
2724     var isRequired = !!requesting && modifiers.some(function (modifier) {
2725       return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
2726     });
2727
2728     if (!isRequired) {
2729       var _requesting = '`' + requestingName + '`';
2730       var requested = '`' + requestedName + '`';
2731       console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
2732     }
2733     return isRequired;
2734   }
2735
2736   /**
2737    * @function
2738    * @memberof Modifiers
2739    * @argument {Object} data - The data object generated by update method
2740    * @argument {Object} options - Modifiers configuration and options
2741    * @returns {Object} The data object, properly modified
2742    */
2743   function arrow(data, options) {
2744     var _data$offsets$arrow;
2745
2746     // arrow depends on keepTogether in order to work
2747     if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
2748       return data;
2749     }
2750
2751     var arrowElement = options.element;
2752
2753     // if arrowElement is a string, suppose it's a CSS selector
2754     if (typeof arrowElement === 'string') {
2755       arrowElement = data.instance.popper.querySelector(arrowElement);
2756
2757       // if arrowElement is not found, don't run the modifier
2758       if (!arrowElement) {
2759         return data;
2760       }
2761     } else {
2762       // if the arrowElement isn't a query selector we must check that the
2763       // provided DOM node is child of its popper node
2764       if (!data.instance.popper.contains(arrowElement)) {
2765         console.warn('WARNING: `arrow.element` must be child of its popper element!');
2766         return data;
2767       }
2768     }
2769
2770     var placement = data.placement.split('-')[0];
2771     var _data$offsets = data.offsets,
2772         popper = _data$offsets.popper,
2773         reference = _data$offsets.reference;
2774
2775     var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2776
2777     var len = isVertical ? 'height' : 'width';
2778     var sideCapitalized = isVertical ? 'Top' : 'Left';
2779     var side = sideCapitalized.toLowerCase();
2780     var altSide = isVertical ? 'left' : 'top';
2781     var opSide = isVertical ? 'bottom' : 'right';
2782     var arrowElementSize = getOuterSizes(arrowElement)[len];
2783
2784     //
2785     // extends keepTogether behavior making sure the popper and its
2786     // reference have enough pixels in conjuction
2787     //
2788
2789     // top/left side
2790     if (reference[opSide] - arrowElementSize < popper[side]) {
2791       data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
2792     }
2793     // bottom/right side
2794     if (reference[side] + arrowElementSize > popper[opSide]) {
2795       data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
2796     }
2797     data.offsets.popper = getClientRect(data.offsets.popper);
2798
2799     // compute center of the popper
2800     var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
2801
2802     // Compute the sideValue using the updated popper offsets
2803     // take popper margin in account because we don't have this info available
2804     var css = getStyleComputedProperty(data.instance.popper);
2805     var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
2806     var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
2807     var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
2808
2809     // prevent arrowElement from being placed not contiguously to its popper
2810     sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
2811
2812     data.arrowElement = arrowElement;
2813     data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
2814
2815     return data;
2816   }
2817
2818   /**
2819    * Get the opposite placement variation of the given one
2820    * @method
2821    * @memberof Popper.Utils
2822    * @argument {String} placement variation
2823    * @returns {String} flipped placement variation
2824    */
2825   function getOppositeVariation(variation) {
2826     if (variation === 'end') {
2827       return 'start';
2828     } else if (variation === 'start') {
2829       return 'end';
2830     }
2831     return variation;
2832   }
2833
2834   /**
2835    * List of accepted placements to use as values of the `placement` option.<br />
2836    * Valid placements are:
2837    * - `auto`
2838    * - `top`
2839    * - `right`
2840    * - `bottom`
2841    * - `left`
2842    *
2843    * Each placement can have a variation from this list:
2844    * - `-start`
2845    * - `-end`
2846    *
2847    * Variations are interpreted easily if you think of them as the left to right
2848    * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
2849    * is right.<br />
2850    * Vertically (`left` and `right`), `start` is top and `end` is bottom.
2851    *
2852    * Some valid examples are:
2853    * - `top-end` (on top of reference, right aligned)
2854    * - `right-start` (on right of reference, top aligned)
2855    * - `bottom` (on bottom, centered)
2856    * - `auto-right` (on the side with more space available, alignment depends by placement)
2857    *
2858    * @static
2859    * @type {Array}
2860    * @enum {String}
2861    * @readonly
2862    * @method placements
2863    * @memberof Popper
2864    */
2865   var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
2866
2867   // Get rid of `auto` `auto-start` and `auto-end`
2868   var validPlacements = placements.slice(3);
2869
2870   /**
2871    * Given an initial placement, returns all the subsequent placements
2872    * clockwise (or counter-clockwise).
2873    *
2874    * @method
2875    * @memberof Popper.Utils
2876    * @argument {String} placement - A valid placement (it accepts variations)
2877    * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
2878    * @returns {Array} placements including their variations
2879    */
2880   function clockwise(placement) {
2881     var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2882
2883     var index = validPlacements.indexOf(placement);
2884     var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
2885     return counter ? arr.reverse() : arr;
2886   }
2887
2888   var BEHAVIORS = {
2889     FLIP: 'flip',
2890     CLOCKWISE: 'clockwise',
2891     COUNTERCLOCKWISE: 'counterclockwise'
2892   };
2893
2894   /**
2895    * @function
2896    * @memberof Modifiers
2897    * @argument {Object} data - The data object generated by update method
2898    * @argument {Object} options - Modifiers configuration and options
2899    * @returns {Object} The data object, properly modified
2900    */
2901   function flip(data, options) {
2902     // if `inner` modifier is enabled, we can't use the `flip` modifier
2903     if (isModifierEnabled(data.instance.modifiers, 'inner')) {
2904       return data;
2905     }
2906
2907     if (data.flipped && data.placement === data.originalPlacement) {
2908       // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
2909       return data;
2910     }
2911
2912     var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
2913
2914     var placement = data.placement.split('-')[0];
2915     var placementOpposite = getOppositePlacement(placement);
2916     var variation = data.placement.split('-')[1] || '';
2917
2918     var flipOrder = [];
2919
2920     switch (options.behavior) {
2921       case BEHAVIORS.FLIP:
2922         flipOrder = [placement, placementOpposite];
2923         break;
2924       case BEHAVIORS.CLOCKWISE:
2925         flipOrder = clockwise(placement);
2926         break;
2927       case BEHAVIORS.COUNTERCLOCKWISE:
2928         flipOrder = clockwise(placement, true);
2929         break;
2930       default:
2931         flipOrder = options.behavior;
2932     }
2933
2934     flipOrder.forEach(function (step, index) {
2935       if (placement !== step || flipOrder.length === index + 1) {
2936         return data;
2937       }
2938
2939       placement = data.placement.split('-')[0];
2940       placementOpposite = getOppositePlacement(placement);
2941
2942       var popperOffsets = data.offsets.popper;
2943       var refOffsets = data.offsets.reference;
2944
2945       // using floor because the reference offsets may contain decimals we are not going to consider here
2946       var floor = Math.floor;
2947       var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
2948
2949       var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
2950       var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
2951       var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
2952       var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
2953
2954       var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
2955
2956       // flip the variation if required
2957       var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
2958       var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
2959
2960       if (overlapsRef || overflowsBoundaries || flippedVariation) {
2961         // this boolean to detect any flip loop
2962         data.flipped = true;
2963
2964         if (overlapsRef || overflowsBoundaries) {
2965           placement = flipOrder[index + 1];
2966         }
2967
2968         if (flippedVariation) {
2969           variation = getOppositeVariation(variation);
2970         }
2971
2972         data.placement = placement + (variation ? '-' + variation : '');
2973
2974         // this object contains `position`, we want to preserve it along with
2975         // any additional property we may add in the future
2976         data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
2977
2978         data = runModifiers(data.instance.modifiers, data, 'flip');
2979       }
2980     });
2981     return data;
2982   }
2983
2984   /**
2985    * @function
2986    * @memberof Modifiers
2987    * @argument {Object} data - The data object generated by update method
2988    * @argument {Object} options - Modifiers configuration and options
2989    * @returns {Object} The data object, properly modified
2990    */
2991   function keepTogether(data) {
2992     var _data$offsets = data.offsets,
2993         popper = _data$offsets.popper,
2994         reference = _data$offsets.reference;
2995
2996     var placement = data.placement.split('-')[0];
2997     var floor = Math.floor;
2998     var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
2999     var side = isVertical ? 'right' : 'bottom';
3000     var opSide = isVertical ? 'left' : 'top';
3001     var measurement = isVertical ? 'width' : 'height';
3002
3003     if (popper[side] < floor(reference[opSide])) {
3004       data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
3005     }
3006     if (popper[opSide] > floor(reference[side])) {
3007       data.offsets.popper[opSide] = floor(reference[side]);
3008     }
3009
3010     return data;
3011   }
3012
3013   /**
3014    * Converts a string containing value + unit into a px value number
3015    * @function
3016    * @memberof {modifiers~offset}
3017    * @private
3018    * @argument {String} str - Value + unit string
3019    * @argument {String} measurement - `height` or `width`
3020    * @argument {Object} popperOffsets
3021    * @argument {Object} referenceOffsets
3022    * @returns {Number|String}
3023    * Value in pixels, or original string if no values were extracted
3024    */
3025   function toValue(str, measurement, popperOffsets, referenceOffsets) {
3026     // separate value from unit
3027     var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
3028     var value = +split[1];
3029     var unit = split[2];
3030
3031     // If it's not a number it's an operator, I guess
3032     if (!value) {
3033       return str;
3034     }
3035
3036     if (unit.indexOf('%') === 0) {
3037       var element = void 0;
3038       switch (unit) {
3039         case '%p':
3040           element = popperOffsets;
3041           break;
3042         case '%':
3043         case '%r':
3044         default:
3045           element = referenceOffsets;
3046       }
3047
3048       var rect = getClientRect(element);
3049       return rect[measurement] / 100 * value;
3050     } else if (unit === 'vh' || unit === 'vw') {
3051       // if is a vh or vw, we calculate the size based on the viewport
3052       var size = void 0;
3053       if (unit === 'vh') {
3054         size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
3055       } else {
3056         size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
3057       }
3058       return size / 100 * value;
3059     } else {
3060       // if is an explicit pixel unit, we get rid of the unit and keep the value
3061       // if is an implicit unit, it's px, and we return just the value
3062       return value;
3063     }
3064   }
3065
3066   /**
3067    * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
3068    * @function
3069    * @memberof {modifiers~offset}
3070    * @private
3071    * @argument {String} offset
3072    * @argument {Object} popperOffsets
3073    * @argument {Object} referenceOffsets
3074    * @argument {String} basePlacement
3075    * @returns {Array} a two cells array with x and y offsets in numbers
3076    */
3077   function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
3078     var offsets = [0, 0];
3079
3080     // Use height if placement is left or right and index is 0 otherwise use width
3081     // in this way the first offset will use an axis and the second one
3082     // will use the other one
3083     var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
3084
3085     // Split the offset string to obtain a list of values and operands
3086     // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
3087     var fragments = offset.split(/(\+|\-)/).map(function (frag) {
3088       return frag.trim();
3089     });
3090
3091     // Detect if the offset string contains a pair of values or a single one
3092     // they could be separated by comma or space
3093     var divider = fragments.indexOf(find(fragments, function (frag) {
3094       return frag.search(/,|\s/) !== -1;
3095     }));
3096
3097     if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
3098       console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
3099     }
3100
3101     // If divider is found, we divide the list of values and operands to divide
3102     // them by ofset X and Y.
3103     var splitRegex = /\s*,\s*|\s+/;
3104     var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
3105
3106     // Convert the values with units to absolute pixels to allow our computations
3107     ops = ops.map(function (op, index) {
3108       // Most of the units rely on the orientation of the popper
3109       var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
3110       var mergeWithPrevious = false;
3111       return op
3112       // This aggregates any `+` or `-` sign that aren't considered operators
3113       // e.g.: 10 + +5 => [10, +, +5]
3114       .reduce(function (a, b) {
3115         if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
3116           a[a.length - 1] = b;
3117           mergeWithPrevious = true;
3118           return a;
3119         } else if (mergeWithPrevious) {
3120           a[a.length - 1] += b;
3121           mergeWithPrevious = false;
3122           return a;
3123         } else {
3124           return a.concat(b);
3125         }
3126       }, [])
3127       // Here we convert the string values into number values (in px)
3128       .map(function (str) {
3129         return toValue(str, measurement, popperOffsets, referenceOffsets);
3130       });
3131     });
3132
3133     // Loop trough the offsets arrays and execute the operations
3134     ops.forEach(function (op, index) {
3135       op.forEach(function (frag, index2) {
3136         if (isNumeric(frag)) {
3137           offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
3138         }
3139       });
3140     });
3141     return offsets;
3142   }
3143
3144   /**
3145    * @function
3146    * @memberof Modifiers
3147    * @argument {Object} data - The data object generated by update method
3148    * @argument {Object} options - Modifiers configuration and options
3149    * @argument {Number|String} options.offset=0
3150    * The offset value as described in the modifier description
3151    * @returns {Object} The data object, properly modified
3152    */
3153   function offset(data, _ref) {
3154     var offset = _ref.offset;
3155     var placement = data.placement,
3156         _data$offsets = data.offsets,
3157         popper = _data$offsets.popper,
3158         reference = _data$offsets.reference;
3159
3160     var basePlacement = placement.split('-')[0];
3161
3162     var offsets = void 0;
3163     if (isNumeric(+offset)) {
3164       offsets = [+offset, 0];
3165     } else {
3166       offsets = parseOffset(offset, popper, reference, basePlacement);
3167     }
3168
3169     if (basePlacement === 'left') {
3170       popper.top += offsets[0];
3171       popper.left -= offsets[1];
3172     } else if (basePlacement === 'right') {
3173       popper.top += offsets[0];
3174       popper.left += offsets[1];
3175     } else if (basePlacement === 'top') {
3176       popper.left += offsets[0];
3177       popper.top -= offsets[1];
3178     } else if (basePlacement === 'bottom') {
3179       popper.left += offsets[0];
3180       popper.top += offsets[1];
3181     }
3182
3183     data.popper = popper;
3184     return data;
3185   }
3186
3187   /**
3188    * @function
3189    * @memberof Modifiers
3190    * @argument {Object} data - The data object generated by `update` method
3191    * @argument {Object} options - Modifiers configuration and options
3192    * @returns {Object} The data object, properly modified
3193    */
3194   function preventOverflow(data, options) {
3195     var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
3196
3197     // If offsetParent is the reference element, we really want to
3198     // go one step up and use the next offsetParent as reference to
3199     // avoid to make this modifier completely useless and look like broken
3200     if (data.instance.reference === boundariesElement) {
3201       boundariesElement = getOffsetParent(boundariesElement);
3202     }
3203
3204     // NOTE: DOM access here
3205     // resets the popper's position so that the document size can be calculated excluding
3206     // the size of the popper element itself
3207     var transformProp = getSupportedPropertyName('transform');
3208     var popperStyles = data.instance.popper.style; // assignment to help minification
3209     var top = popperStyles.top,
3210         left = popperStyles.left,
3211         transform = popperStyles[transformProp];
3212
3213     popperStyles.top = '';
3214     popperStyles.left = '';
3215     popperStyles[transformProp] = '';
3216
3217     var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
3218
3219     // NOTE: DOM access here
3220     // restores the original style properties after the offsets have been computed
3221     popperStyles.top = top;
3222     popperStyles.left = left;
3223     popperStyles[transformProp] = transform;
3224
3225     options.boundaries = boundaries;
3226
3227     var order = options.priority;
3228     var popper = data.offsets.popper;
3229
3230     var check = {
3231       primary: function primary(placement) {
3232         var value = popper[placement];
3233         if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
3234           value = Math.max(popper[placement], boundaries[placement]);
3235         }
3236         return defineProperty({}, placement, value);
3237       },
3238       secondary: function secondary(placement) {
3239         var mainSide = placement === 'right' ? 'left' : 'top';
3240         var value = popper[mainSide];
3241         if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
3242           value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
3243         }
3244         return defineProperty({}, mainSide, value);
3245       }
3246     };
3247
3248     order.forEach(function (placement) {
3249       var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
3250       popper = _extends({}, popper, check[side](placement));
3251     });
3252
3253     data.offsets.popper = popper;
3254
3255     return data;
3256   }
3257
3258   /**
3259    * @function
3260    * @memberof Modifiers
3261    * @argument {Object} data - The data object generated by `update` method
3262    * @argument {Object} options - Modifiers configuration and options
3263    * @returns {Object} The data object, properly modified
3264    */
3265   function shift(data) {
3266     var placement = data.placement;
3267     var basePlacement = placement.split('-')[0];
3268     var shiftvariation = placement.split('-')[1];
3269
3270     // if shift shiftvariation is specified, run the modifier
3271     if (shiftvariation) {
3272       var _data$offsets = data.offsets,
3273           reference = _data$offsets.reference,
3274           popper = _data$offsets.popper;
3275
3276       var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
3277       var side = isVertical ? 'left' : 'top';
3278       var measurement = isVertical ? 'width' : 'height';
3279
3280       var shiftOffsets = {
3281         start: defineProperty({}, side, reference[side]),
3282         end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
3283       };
3284
3285       data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
3286     }
3287
3288     return data;
3289   }
3290
3291   /**
3292    * @function
3293    * @memberof Modifiers
3294    * @argument {Object} data - The data object generated by update method
3295    * @argument {Object} options - Modifiers configuration and options
3296    * @returns {Object} The data object, properly modified
3297    */
3298   function hide(data) {
3299     if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
3300       return data;
3301     }
3302
3303     var refRect = data.offsets.reference;
3304     var bound = find(data.instance.modifiers, function (modifier) {
3305       return modifier.name === 'preventOverflow';
3306     }).boundaries;
3307
3308     if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
3309       // Avoid unnecessary DOM access if visibility hasn't changed
3310       if (data.hide === true) {
3311         return data;
3312       }
3313
3314       data.hide = true;
3315       data.attributes['x-out-of-boundaries'] = '';
3316     } else {
3317       // Avoid unnecessary DOM access if visibility hasn't changed
3318       if (data.hide === false) {
3319         return data;
3320       }
3321
3322       data.hide = false;
3323       data.attributes['x-out-of-boundaries'] = false;
3324     }
3325
3326     return data;
3327   }
3328
3329   /**
3330    * @function
3331    * @memberof Modifiers
3332    * @argument {Object} data - The data object generated by `update` method
3333    * @argument {Object} options - Modifiers configuration and options
3334    * @returns {Object} The data object, properly modified
3335    */
3336   function inner(data) {
3337     var placement = data.placement;
3338     var basePlacement = placement.split('-')[0];
3339     var _data$offsets = data.offsets,
3340         popper = _data$offsets.popper,
3341         reference = _data$offsets.reference;
3342
3343     var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
3344
3345     var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
3346
3347     popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
3348
3349     data.placement = getOppositePlacement(placement);
3350     data.offsets.popper = getClientRect(popper);
3351
3352     return data;
3353   }
3354
3355   /**
3356    * Modifier function, each modifier can have a function of this type assigned
3357    * to its `fn` property.<br />
3358    * These functions will be called on each update, this means that you must
3359    * make sure they are performant enough to avoid performance bottlenecks.
3360    *
3361    * @function ModifierFn
3362    * @argument {dataObject} data - The data object generated by `update` method
3363    * @argument {Object} options - Modifiers configuration and options
3364    * @returns {dataObject} The data object, properly modified
3365    */
3366
3367   /**
3368    * Modifiers are plugins used to alter the behavior of your poppers.<br />
3369    * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
3370    * needed by the library.
3371    *
3372    * Usually you don't want to override the `order`, `fn` and `onLoad` props.
3373    * All the other properties are configurations that could be tweaked.
3374    * @namespace modifiers
3375    */
3376   var modifiers = {
3377     /**
3378      * Modifier used to shift the popper on the start or end of its reference
3379      * element.<br />
3380      * It will read the variation of the `placement` property.<br />
3381      * It can be one either `-end` or `-start`.
3382      * @memberof modifiers
3383      * @inner
3384      */
3385     shift: {
3386       /** @prop {number} order=100 - Index used to define the order of execution */
3387       order: 100,
3388       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3389       enabled: true,
3390       /** @prop {ModifierFn} */
3391       fn: shift
3392     },
3393
3394     /**
3395      * The `offset` modifier can shift your popper on both its axis.
3396      *
3397      * It accepts the following units:
3398      * - `px` or unitless, interpreted as pixels
3399      * - `%` or `%r`, percentage relative to the length of the reference element
3400      * - `%p`, percentage relative to the length of the popper element
3401      * - `vw`, CSS viewport width unit
3402      * - `vh`, CSS viewport height unit
3403      *
3404      * For length is intended the main axis relative to the placement of the popper.<br />
3405      * This means that if the placement is `top` or `bottom`, the length will be the
3406      * `width`. In case of `left` or `right`, it will be the height.
3407      *
3408      * You can provide a single value (as `Number` or `String`), or a pair of values
3409      * as `String` divided by a comma or one (or more) white spaces.<br />
3410      * The latter is a deprecated method because it leads to confusion and will be
3411      * removed in v2.<br />
3412      * Additionally, it accepts additions and subtractions between different units.
3413      * Note that multiplications and divisions aren't supported.
3414      *
3415      * Valid examples are:
3416      * ```
3417      * 10
3418      * '10%'
3419      * '10, 10'
3420      * '10%, 10'
3421      * '10 + 10%'
3422      * '10 - 5vh + 3%'
3423      * '-10px + 5vh, 5px - 6%'
3424      * ```
3425      * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
3426      * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
3427      * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)
3428      *
3429      * @memberof modifiers
3430      * @inner
3431      */
3432     offset: {
3433       /** @prop {number} order=200 - Index used to define the order of execution */
3434       order: 200,
3435       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3436       enabled: true,
3437       /** @prop {ModifierFn} */
3438       fn: offset,
3439       /** @prop {Number|String} offset=0
3440        * The offset value as described in the modifier description
3441        */
3442       offset: 0
3443     },
3444
3445     /**
3446      * Modifier used to prevent the popper from being positioned outside the boundary.
3447      *
3448      * An scenario exists where the reference itself is not within the boundaries.<br />
3449      * We can say it has "escaped the boundaries" â€” or just "escaped".<br />
3450      * In this case we need to decide whether the popper should either:
3451      *
3452      * - detach from the reference and remain "trapped" in the boundaries, or
3453      * - if it should ignore the boundary and "escape with its reference"
3454      *
3455      * When `escapeWithReference` is set to`true` and reference is completely
3456      * outside its boundaries, the popper will overflow (or completely leave)
3457      * the boundaries in order to remain attached to the edge of the reference.
3458      *
3459      * @memberof modifiers
3460      * @inner
3461      */
3462     preventOverflow: {
3463       /** @prop {number} order=300 - Index used to define the order of execution */
3464       order: 300,
3465       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3466       enabled: true,
3467       /** @prop {ModifierFn} */
3468       fn: preventOverflow,
3469       /**
3470        * @prop {Array} [priority=['left','right','top','bottom']]
3471        * Popper will try to prevent overflow following these priorities by default,
3472        * then, it could overflow on the left and on top of the `boundariesElement`
3473        */
3474       priority: ['left', 'right', 'top', 'bottom'],
3475       /**
3476        * @prop {number} padding=5
3477        * Amount of pixel used to define a minimum distance between the boundaries
3478        * and the popper this makes sure the popper has always a little padding
3479        * between the edges of its container
3480        */
3481       padding: 5,
3482       /**
3483        * @prop {String|HTMLElement} boundariesElement='scrollParent'
3484        * Boundaries used by the modifier, can be `scrollParent`, `window`,
3485        * `viewport` or any DOM element.
3486        */
3487       boundariesElement: 'scrollParent'
3488     },
3489
3490     /**
3491      * Modifier used to make sure the reference and its popper stay near eachothers
3492      * without leaving any gap between the two. Expecially useful when the arrow is
3493      * enabled and you want to assure it to point to its reference element.
3494      * It cares only about the first axis, you can still have poppers with margin
3495      * between the popper and its reference element.
3496      * @memberof modifiers
3497      * @inner
3498      */
3499     keepTogether: {
3500       /** @prop {number} order=400 - Index used to define the order of execution */
3501       order: 400,
3502       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3503       enabled: true,
3504       /** @prop {ModifierFn} */
3505       fn: keepTogether
3506     },
3507
3508     /**
3509      * This modifier is used to move the `arrowElement` of the popper to make
3510      * sure it is positioned between the reference element and its popper element.
3511      * It will read the outer size of the `arrowElement` node to detect how many
3512      * pixels of conjuction are needed.
3513      *
3514      * It has no effect if no `arrowElement` is provided.
3515      * @memberof modifiers
3516      * @inner
3517      */
3518     arrow: {
3519       /** @prop {number} order=500 - Index used to define the order of execution */
3520       order: 500,
3521       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3522       enabled: true,
3523       /** @prop {ModifierFn} */
3524       fn: arrow,
3525       /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
3526       element: '[x-arrow]'
3527     },
3528
3529     /**
3530      * Modifier used to flip the popper's placement when it starts to overlap its
3531      * reference element.
3532      *
3533      * Requires the `preventOverflow` modifier before it in order to work.
3534      *
3535      * **NOTE:** this modifier will interrupt the current update cycle and will
3536      * restart it if it detects the need to flip the placement.
3537      * @memberof modifiers
3538      * @inner
3539      */
3540     flip: {
3541       /** @prop {number} order=600 - Index used to define the order of execution */
3542       order: 600,
3543       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3544       enabled: true,
3545       /** @prop {ModifierFn} */
3546       fn: flip,
3547       /**
3548        * @prop {String|Array} behavior='flip'
3549        * The behavior used to change the popper's placement. It can be one of
3550        * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
3551        * placements (with optional variations).
3552        */
3553       behavior: 'flip',
3554       /**
3555        * @prop {number} padding=5
3556        * The popper will flip if it hits the edges of the `boundariesElement`
3557        */
3558       padding: 5,
3559       /**
3560        * @prop {String|HTMLElement} boundariesElement='viewport'
3561        * The element which will define the boundaries of the popper position,
3562        * the popper will never be placed outside of the defined boundaries
3563        * (except if keepTogether is enabled)
3564        */
3565       boundariesElement: 'viewport'
3566     },
3567
3568     /**
3569      * Modifier used to make the popper flow toward the inner of the reference element.
3570      * By default, when this modifier is disabled, the popper will be placed outside
3571      * the reference element.
3572      * @memberof modifiers
3573      * @inner
3574      */
3575     inner: {
3576       /** @prop {number} order=700 - Index used to define the order of execution */
3577       order: 700,
3578       /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
3579       enabled: false,
3580       /** @prop {ModifierFn} */
3581       fn: inner
3582     },
3583
3584     /**
3585      * Modifier used to hide the popper when its reference element is outside of the
3586      * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
3587      * be used to hide with a CSS selector the popper when its reference is
3588      * out of boundaries.
3589      *
3590      * Requires the `preventOverflow` modifier before it in order to work.
3591      * @memberof modifiers
3592      * @inner
3593      */
3594     hide: {
3595       /** @prop {number} order=800 - Index used to define the order of execution */
3596       order: 800,
3597       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3598       enabled: true,
3599       /** @prop {ModifierFn} */
3600       fn: hide
3601     },
3602
3603     /**
3604      * Computes the style that will be applied to the popper element to gets
3605      * properly positioned.
3606      *
3607      * Note that this modifier will not touch the DOM, it just prepares the styles
3608      * so that `applyStyle` modifier can apply it. This separation is useful
3609      * in case you need to replace `applyStyle` with a custom implementation.
3610      *
3611      * This modifier has `850` as `order` value to maintain backward compatibility
3612      * with previous versions of Popper.js. Expect the modifiers ordering method
3613      * to change in future major versions of the library.
3614      *
3615      * @memberof modifiers
3616      * @inner
3617      */
3618     computeStyle: {
3619       /** @prop {number} order=850 - Index used to define the order of execution */
3620       order: 850,
3621       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3622       enabled: true,
3623       /** @prop {ModifierFn} */
3624       fn: computeStyle,
3625       /**
3626        * @prop {Boolean} gpuAcceleration=true
3627        * If true, it uses the CSS 3d transformation to position the popper.
3628        * Otherwise, it will use the `top` and `left` properties.
3629        */
3630       gpuAcceleration: true,
3631       /**
3632        * @prop {string} [x='bottom']
3633        * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
3634        * Change this if your popper should grow in a direction different from `bottom`
3635        */
3636       x: 'bottom',
3637       /**
3638        * @prop {string} [x='left']
3639        * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
3640        * Change this if your popper should grow in a direction different from `right`
3641        */
3642       y: 'right'
3643     },
3644
3645     /**
3646      * Applies the computed styles to the popper element.
3647      *
3648      * All the DOM manipulations are limited to this modifier. This is useful in case
3649      * you want to integrate Popper.js inside a framework or view library and you
3650      * want to delegate all the DOM manipulations to it.
3651      *
3652      * Note that if you disable this modifier, you must make sure the popper element
3653      * has its position set to `absolute` before Popper.js can do its work!
3654      *
3655      * Just disable this modifier and define you own to achieve the desired effect.
3656      *
3657      * @memberof modifiers
3658      * @inner
3659      */
3660     applyStyle: {
3661       /** @prop {number} order=900 - Index used to define the order of execution */
3662       order: 900,
3663       /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3664       enabled: true,
3665       /** @prop {ModifierFn} */
3666       fn: applyStyle,
3667       /** @prop {Function} */
3668       onLoad: applyStyleOnLoad,
3669       /**
3670        * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
3671        * @prop {Boolean} gpuAcceleration=true
3672        * If true, it uses the CSS 3d transformation to position the popper.
3673        * Otherwise, it will use the `top` and `left` properties.
3674        */
3675       gpuAcceleration: undefined
3676     }
3677   };
3678
3679   /**
3680    * The `dataObject` is an object containing all the informations used by Popper.js
3681    * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
3682    * @name dataObject
3683    * @property {Object} data.instance The Popper.js instance
3684    * @property {String} data.placement Placement applied to popper
3685    * @property {String} data.originalPlacement Placement originally defined on init
3686    * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
3687    * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.
3688    * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
3689    * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)
3690    * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)
3691    * @property {Object} data.boundaries Offsets of the popper boundaries
3692    * @property {Object} data.offsets The measurements of popper, reference and arrow elements.
3693    * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
3694    * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
3695    * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
3696    */
3697
3698   /**
3699    * Default options provided to Popper.js constructor.<br />
3700    * These can be overriden using the `options` argument of Popper.js.<br />
3701    * To override an option, simply pass as 3rd argument an object with the same
3702    * structure of this object, example:
3703    * ```
3704    * new Popper(ref, pop, {
3705    *   modifiers: {
3706    *     preventOverflow: { enabled: false }
3707    *   }
3708    * })
3709    * ```
3710    * @type {Object}
3711    * @static
3712    * @memberof Popper
3713    */
3714   var Defaults = {
3715     /**
3716      * Popper's placement
3717      * @prop {Popper.placements} placement='bottom'
3718      */
3719     placement: 'bottom',
3720
3721     /**
3722      * Set this to true if you want popper to position it self in 'fixed' mode
3723      * @prop {Boolean} positionFixed=false
3724      */
3725     positionFixed: false,
3726
3727     /**
3728      * Whether events (resize, scroll) are initially enabled
3729      * @prop {Boolean} eventsEnabled=true
3730      */
3731     eventsEnabled: true,
3732
3733     /**
3734      * Set to true if you want to automatically remove the popper when
3735      * you call the `destroy` method.
3736      * @prop {Boolean} removeOnDestroy=false
3737      */
3738     removeOnDestroy: false,
3739
3740     /**
3741      * Callback called when the popper is created.<br />
3742      * By default, is set to no-op.<br />
3743      * Access Popper.js instance with `data.instance`.
3744      * @prop {onCreate}
3745      */
3746     onCreate: function onCreate() {},
3747
3748     /**
3749      * Callback called when the popper is updated, this callback is not called
3750      * on the initialization/creation of the popper, but only on subsequent
3751      * updates.<br />
3752      * By default, is set to no-op.<br />
3753      * Access Popper.js instance with `data.instance`.
3754      * @prop {onUpdate}
3755      */
3756     onUpdate: function onUpdate() {},
3757
3758     /**
3759      * List of modifiers used to modify the offsets before they are applied to the popper.
3760      * They provide most of the functionalities of Popper.js
3761      * @prop {modifiers}
3762      */
3763     modifiers: modifiers
3764   };
3765
3766   /**
3767    * @callback onCreate
3768    * @param {dataObject} data
3769    */
3770
3771   /**
3772    * @callback onUpdate
3773    * @param {dataObject} data
3774    */
3775
3776   // Utils
3777   // Methods
3778   var Popper = function () {
3779     /**
3780      * Create a new Popper.js instance
3781      * @class Popper
3782      * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
3783      * @param {HTMLElement} popper - The HTML element used as popper.
3784      * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
3785      * @return {Object} instance - The generated Popper.js instance
3786      */
3787     function Popper(reference, popper) {
3788       var _this = this;
3789
3790       var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3791       classCallCheck(this, Popper);
3792
3793       this.scheduleUpdate = function () {
3794         return requestAnimationFrame(_this.update);
3795       };
3796
3797       // make update() debounced, so that it only runs at most once-per-tick
3798       this.update = debounce(this.update.bind(this));
3799
3800       // with {} we create a new object with the options inside it
3801       this.options = _extends({}, Popper.Defaults, options);
3802
3803       // init state
3804       this.state = {
3805         isDestroyed: false,
3806         isCreated: false,
3807         scrollParents: []
3808       };
3809
3810       // get reference and popper elements (allow jQuery wrappers)
3811       this.reference = reference && reference.jquery ? reference[0] : reference;
3812       this.popper = popper && popper.jquery ? popper[0] : popper;
3813
3814       // Deep merge modifiers options
3815       this.options.modifiers = {};
3816       Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
3817         _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
3818       });
3819
3820       // Refactoring modifiers' list (Object => Array)
3821       this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
3822         return _extends({
3823           name: name
3824         }, _this.options.modifiers[name]);
3825       })
3826       // sort the modifiers by order
3827       .sort(function (a, b) {
3828         return a.order - b.order;
3829       });
3830
3831       // modifiers have the ability to execute arbitrary code when Popper.js get inited
3832       // such code is executed in the same order of its modifier
3833       // they could add new properties to their options configuration
3834       // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
3835       this.modifiers.forEach(function (modifierOptions) {
3836         if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
3837           modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
3838         }
3839       });
3840
3841       // fire the first update to position the popper in the right place
3842       this.update();
3843
3844       var eventsEnabled = this.options.eventsEnabled;
3845       if (eventsEnabled) {
3846         // setup event listeners, they will take care of update the position in specific situations
3847         this.enableEventListeners();
3848       }
3849
3850       this.state.eventsEnabled = eventsEnabled;
3851     }
3852
3853     // We can't use class properties because they don't get listed in the
3854     // class prototype and break stuff like Sinon stubs
3855
3856
3857     createClass(Popper, [{
3858       key: 'update',
3859       value: function update$$1() {
3860         return update.call(this);
3861       }
3862     }, {
3863       key: 'destroy',
3864       value: function destroy$$1() {
3865         return destroy.call(this);
3866       }
3867     }, {
3868       key: 'enableEventListeners',
3869       value: function enableEventListeners$$1() {
3870         return enableEventListeners.call(this);
3871       }
3872     }, {
3873       key: 'disableEventListeners',
3874       value: function disableEventListeners$$1() {
3875         return disableEventListeners.call(this);
3876       }
3877
3878       /**
3879        * Schedule an update, it will run on the next UI update available
3880        * @method scheduleUpdate
3881        * @memberof Popper
3882        */
3883
3884
3885       /**
3886        * Collection of utilities useful when writing custom modifiers.
3887        * Starting from version 1.7, this method is available only if you
3888        * include `popper-utils.js` before `popper.js`.
3889        *
3890        * **DEPRECATION**: This way to access PopperUtils is deprecated
3891        * and will be removed in v2! Use the PopperUtils module directly instead.
3892        * Due to the high instability of the methods contained in Utils, we can't
3893        * guarantee them to follow semver. Use them at your own risk!
3894        * @static
3895        * @private
3896        * @type {Object}
3897        * @deprecated since version 1.8
3898        * @member Utils
3899        * @memberof Popper
3900        */
3901
3902     }]);
3903     return Popper;
3904   }();
3905
3906   /**
3907    * The `referenceObject` is an object that provides an interface compatible with Popper.js
3908    * and lets you use it as replacement of a real DOM node.<br />
3909    * You can use this method to position a popper relatively to a set of coordinates
3910    * in case you don't have a DOM node to use as reference.
3911    *
3912    * ```
3913    * new Popper(referenceObject, popperNode);
3914    * ```
3915    *
3916    * NB: This feature isn't supported in Internet Explorer 10
3917    * @name referenceObject
3918    * @property {Function} data.getBoundingClientRect
3919    * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
3920    * @property {number} data.clientWidth
3921    * An ES6 getter that will return the width of the virtual reference element.
3922    * @property {number} data.clientHeight
3923    * An ES6 getter that will return the height of the virtual reference element.
3924    */
3925
3926
3927   Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
3928   Popper.placements = placements;
3929   Popper.Defaults = Defaults;
3930
3931   /**
3932    * --------------------------------------------------------------------------
3933    * Bootstrap (v4.1.3): dropdown.js
3934    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3935    * --------------------------------------------------------------------------
3936    */
3937
3938   var Dropdown = function ($$$1) {
3939     /**
3940      * ------------------------------------------------------------------------
3941      * Constants
3942      * ------------------------------------------------------------------------
3943      */
3944     var NAME = 'dropdown';
3945     var VERSION = '4.1.3';
3946     var DATA_KEY = 'bs.dropdown';
3947     var EVENT_KEY = "." + DATA_KEY;
3948     var DATA_API_KEY = '.data-api';
3949     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
3950     var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
3951
3952     var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
3953
3954     var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
3955
3956     var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
3957
3958     var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
3959
3960     var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
3961
3962     var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
3963     var Event = {
3964       HIDE: "hide" + EVENT_KEY,
3965       HIDDEN: "hidden" + EVENT_KEY,
3966       SHOW: "show" + EVENT_KEY,
3967       SHOWN: "shown" + EVENT_KEY,
3968       CLICK: "click" + EVENT_KEY,
3969       CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
3970       KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY,
3971       KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY
3972     };
3973     var ClassName = {
3974       DISABLED: 'disabled',
3975       SHOW: 'show',
3976       DROPUP: 'dropup',
3977       DROPRIGHT: 'dropright',
3978       DROPLEFT: 'dropleft',
3979       MENURIGHT: 'dropdown-menu-right',
3980       MENULEFT: 'dropdown-menu-left',
3981       POSITION_STATIC: 'position-static'
3982     };
3983     var Selector = {
3984       DATA_TOGGLE: '[data-toggle="dropdown"]',
3985       FORM_CHILD: '.dropdown form',
3986       MENU: '.dropdown-menu',
3987       NAVBAR_NAV: '.navbar-nav',
3988       VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
3989     };
3990     var AttachmentMap = {
3991       TOP: 'top-start',
3992       TOPEND: 'top-end',
3993       BOTTOM: 'bottom-start',
3994       BOTTOMEND: 'bottom-end',
3995       RIGHT: 'right-start',
3996       RIGHTEND: 'right-end',
3997       LEFT: 'left-start',
3998       LEFTEND: 'left-end'
3999     };
4000     var Default = {
4001       offset: 0,
4002       flip: true,
4003       boundary: 'scrollParent',
4004       reference: 'toggle',
4005       display: 'dynamic'
4006     };
4007     var DefaultType = {
4008       offset: '(number|string|function)',
4009       flip: 'boolean',
4010       boundary: '(string|element)',
4011       reference: '(string|element)',
4012       display: 'string'
4013       /**
4014        * ------------------------------------------------------------------------
4015        * Class Definition
4016        * ------------------------------------------------------------------------
4017        */
4018
4019     };
4020
4021     var Dropdown =
4022     /*#__PURE__*/
4023     function () {
4024       function Dropdown(element, config) {
4025         this._element = element;
4026         this._popper = null;
4027         this._config = this._getConfig(config);
4028         this._menu = this._getMenuElement();
4029         this._inNavbar = this._detectNavbar();
4030
4031         this._addEventListeners();
4032       } // Getters
4033
4034
4035       var _proto = Dropdown.prototype;
4036
4037       // Public
4038       _proto.toggle = function toggle() {
4039         if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) {
4040           return;
4041         }
4042
4043         var parent = Dropdown._getParentFromElement(this._element);
4044
4045         var isActive = $$$1(this._menu).hasClass(ClassName.SHOW);
4046
4047         Dropdown._clearMenus();
4048
4049         if (isActive) {
4050           return;
4051         }
4052
4053         var relatedTarget = {
4054           relatedTarget: this._element
4055         };
4056         var showEvent = $$$1.Event(Event.SHOW, relatedTarget);
4057         $$$1(parent).trigger(showEvent);
4058
4059         if (showEvent.isDefaultPrevented()) {
4060           return;
4061         } // Disable totally Popper.js for Dropdown in Navbar
4062
4063
4064         if (!this._inNavbar) {
4065           /**
4066            * Check for Popper dependency
4067            * Popper - https://popper.js.org
4068            */
4069           if (typeof Popper === 'undefined') {
4070             throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)');
4071           }
4072
4073           var referenceElement = this._element;
4074
4075           if (this._config.reference === 'parent') {
4076             referenceElement = parent;
4077           } else if (Util.isElement(this._config.reference)) {
4078             referenceElement = this._config.reference; // Check if it's jQuery element
4079
4080             if (typeof this._config.reference.jquery !== 'undefined') {
4081               referenceElement = this._config.reference[0];
4082             }
4083           } // If boundary is not `scrollParent`, then set position to `static`
4084           // to allow the menu to "escape" the scroll parent's boundaries
4085           // https://github.com/twbs/bootstrap/issues/24251
4086
4087
4088           if (this._config.boundary !== 'scrollParent') {
4089             $$$1(parent).addClass(ClassName.POSITION_STATIC);
4090           }
4091
4092           this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
4093         } // If this is a touch-enabled device we add extra
4094         // empty mouseover listeners to the body's immediate children;
4095         // only needed because of broken event delegation on iOS
4096         // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
4097
4098
4099         if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) {
4100           $$$1(document.body).children().on('mouseover', null, $$$1.noop);
4101         }
4102
4103         this._element.focus();
4104
4105         this._element.setAttribute('aria-expanded', true);
4106
4107         $$$1(this._menu).toggleClass(ClassName.SHOW);
4108         $$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget));
4109       };
4110
4111       _proto.dispose = function dispose() {
4112         $$$1.removeData(this._element, DATA_KEY);
4113         $$$1(this._element).off(EVENT_KEY);
4114         this._element = null;
4115         this._menu = null;
4116
4117         if (this._popper !== null) {
4118           this._popper.destroy();
4119
4120           this._popper = null;
4121         }
4122       };
4123
4124       _proto.update = function update() {
4125         this._inNavbar = this._detectNavbar();
4126
4127         if (this._popper !== null) {
4128           this._popper.scheduleUpdate();
4129         }
4130       }; // Private
4131
4132
4133       _proto._addEventListeners = function _addEventListeners() {
4134         var _this = this;
4135
4136         $$$1(this._element).on(Event.CLICK, function (event) {
4137           event.preventDefault();
4138           event.stopPropagation();
4139
4140           _this.toggle();
4141         });
4142       };
4143
4144       _proto._getConfig = function _getConfig(config) {
4145         config = _objectSpread({}, this.constructor.Default, $$$1(this._element).data(), config);
4146         Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
4147         return config;
4148       };
4149
4150       _proto._getMenuElement = function _getMenuElement() {
4151         if (!this._menu) {
4152           var parent = Dropdown._getParentFromElement(this._element);
4153
4154           if (parent) {
4155             this._menu = parent.querySelector(Selector.MENU);
4156           }
4157         }
4158
4159         return this._menu;
4160       };
4161
4162       _proto._getPlacement = function _getPlacement() {
4163         var $parentDropdown = $$$1(this._element.parentNode);
4164         var placement = AttachmentMap.BOTTOM; // Handle dropup
4165
4166         if ($parentDropdown.hasClass(ClassName.DROPUP)) {
4167           placement = AttachmentMap.TOP;
4168
4169           if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
4170             placement = AttachmentMap.TOPEND;
4171           }
4172         } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
4173           placement = AttachmentMap.RIGHT;
4174         } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
4175           placement = AttachmentMap.LEFT;
4176         } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
4177           placement = AttachmentMap.BOTTOMEND;
4178         }
4179
4180         return placement;
4181       };
4182
4183       _proto._detectNavbar = function _detectNavbar() {
4184         return $$$1(this._element).closest('.navbar').length > 0;
4185       };
4186
4187       _proto._getPopperConfig = function _getPopperConfig() {
4188         var _this2 = this;
4189
4190         var offsetConf = {};
4191
4192         if (typeof this._config.offset === 'function') {
4193           offsetConf.fn = function (data) {
4194             data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {});
4195             return data;
4196           };
4197         } else {
4198           offsetConf.offset = this._config.offset;
4199         }
4200
4201         var popperConfig = {
4202           placement: this._getPlacement(),
4203           modifiers: {
4204             offset: offsetConf,
4205             flip: {
4206               enabled: this._config.flip
4207             },
4208             preventOverflow: {
4209               boundariesElement: this._config.boundary
4210             }
4211           } // Disable Popper.js if we have a static display
4212
4213         };
4214
4215         if (this._config.display === 'static') {
4216           popperConfig.modifiers.applyStyle = {
4217             enabled: false
4218           };
4219         }
4220
4221         return popperConfig;
4222       }; // Static
4223
4224
4225       Dropdown._jQueryInterface = function _jQueryInterface(config) {
4226         return this.each(function () {
4227           var data = $$$1(this).data(DATA_KEY);
4228
4229           var _config = typeof config === 'object' ? config : null;
4230
4231           if (!data) {
4232             data = new Dropdown(this, _config);
4233             $$$1(this).data(DATA_KEY, data);
4234           }
4235
4236           if (typeof config === 'string') {
4237             if (typeof data[config] === 'undefined') {
4238               throw new TypeError("No method named \"" + config + "\"");
4239             }
4240
4241             data[config]();
4242           }
4243         });
4244       };
4245
4246       Dropdown._clearMenus = function _clearMenus(event) {
4247         if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
4248           return;
4249         }
4250
4251         var toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
4252
4253         for (var i = 0, len = toggles.length; i < len; i++) {
4254           var parent = Dropdown._getParentFromElement(toggles[i]);
4255
4256           var context = $$$1(toggles[i]).data(DATA_KEY);
4257           var relatedTarget = {
4258             relatedTarget: toggles[i]
4259           };
4260
4261           if (event && event.type === 'click') {
4262             relatedTarget.clickEvent = event;
4263           }
4264
4265           if (!context) {
4266             continue;
4267           }
4268
4269           var dropdownMenu = context._menu;
4270
4271           if (!$$$1(parent).hasClass(ClassName.SHOW)) {
4272             continue;
4273           }
4274
4275           if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) {
4276             continue;
4277           }
4278
4279           var hideEvent = $$$1.Event(Event.HIDE, relatedTarget);
4280           $$$1(parent).trigger(hideEvent);
4281
4282           if (hideEvent.isDefaultPrevented()) {
4283             continue;
4284           } // If this is a touch-enabled device we remove the extra
4285           // empty mouseover listeners we added for iOS support
4286
4287
4288           if ('ontouchstart' in document.documentElement) {
4289             $$$1(document.body).children().off('mouseover', null, $$$1.noop);
4290           }
4291
4292           toggles[i].setAttribute('aria-expanded', 'false');
4293           $$$1(dropdownMenu).removeClass(ClassName.SHOW);
4294           $$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget));
4295         }
4296       };
4297
4298       Dropdown._getParentFromElement = function _getParentFromElement(element) {
4299         var parent;
4300         var selector = Util.getSelectorFromElement(element);
4301
4302         if (selector) {
4303           parent = document.querySelector(selector);
4304         }
4305
4306         return parent || element.parentNode;
4307       }; // eslint-disable-next-line complexity
4308
4309
4310       Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
4311         // If not input/textarea:
4312         //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
4313         // If input/textarea:
4314         //  - If space key => not a dropdown command
4315         //  - If key is other than escape
4316         //    - If key is not up or down => not a dropdown command
4317         //    - If trigger inside the menu => not a dropdown command
4318         if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
4319           return;
4320         }
4321
4322         event.preventDefault();
4323         event.stopPropagation();
4324
4325         if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) {
4326           return;
4327         }
4328
4329         var parent = Dropdown._getParentFromElement(this);
4330
4331         var isActive = $$$1(parent).hasClass(ClassName.SHOW);
4332
4333         if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
4334           if (event.which === ESCAPE_KEYCODE) {
4335             var toggle = parent.querySelector(Selector.DATA_TOGGLE);
4336             $$$1(toggle).trigger('focus');
4337           }
4338
4339           $$$1(this).trigger('click');
4340           return;
4341         }
4342
4343         var items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS));
4344
4345         if (items.length === 0) {
4346           return;
4347         }
4348
4349         var index = items.indexOf(event.target);
4350
4351         if (event.which === ARROW_UP_KEYCODE && index > 0) {
4352           // Up
4353           index--;
4354         }
4355
4356         if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
4357           // Down
4358           index++;
4359         }
4360
4361         if (index < 0) {
4362           index = 0;
4363         }
4364
4365         items[index].focus();
4366       };
4367
4368       _createClass(Dropdown, null, [{
4369         key: "VERSION",
4370         get: function get() {
4371           return VERSION;
4372         }
4373       }, {
4374         key: "Default",
4375         get: function get() {
4376           return Default;
4377         }
4378       }, {
4379         key: "DefaultType",
4380         get: function get() {
4381           return DefaultType;
4382         }
4383       }]);
4384
4385       return Dropdown;
4386     }();
4387     /**
4388      * ------------------------------------------------------------------------
4389      * Data Api implementation
4390      * ------------------------------------------------------------------------
4391      */
4392
4393
4394     $$$1(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) {
4395       event.preventDefault();
4396       event.stopPropagation();
4397
4398       Dropdown._jQueryInterface.call($$$1(this), 'toggle');
4399     }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
4400       e.stopPropagation();
4401     });
4402     /**
4403      * ------------------------------------------------------------------------
4404      * jQuery
4405      * ------------------------------------------------------------------------
4406      */
4407
4408     $$$1.fn[NAME] = Dropdown._jQueryInterface;
4409     $$$1.fn[NAME].Constructor = Dropdown;
4410
4411     $$$1.fn[NAME].noConflict = function () {
4412       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
4413       return Dropdown._jQueryInterface;
4414     };
4415
4416     return Dropdown;
4417   }($, Popper);
4418
4419   /**
4420    * --------------------------------------------------------------------------
4421    * Bootstrap (v4.1.3): modal.js
4422    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4423    * --------------------------------------------------------------------------
4424    */
4425
4426   var Modal = function ($$$1) {
4427     /**
4428      * ------------------------------------------------------------------------
4429      * Constants
4430      * ------------------------------------------------------------------------
4431      */
4432     var NAME = 'modal';
4433     var VERSION = '4.1.3';
4434     var DATA_KEY = 'bs.modal';
4435     var EVENT_KEY = "." + DATA_KEY;
4436     var DATA_API_KEY = '.data-api';
4437     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
4438     var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
4439
4440     var Default = {
4441       backdrop: true,
4442       keyboard: true,
4443       focus: true,
4444       show: true
4445     };
4446     var DefaultType = {
4447       backdrop: '(boolean|string)',
4448       keyboard: 'boolean',
4449       focus: 'boolean',
4450       show: 'boolean'
4451     };
4452     var Event = {
4453       HIDE: "hide" + EVENT_KEY,
4454       HIDDEN: "hidden" + EVENT_KEY,
4455       SHOW: "show" + EVENT_KEY,
4456       SHOWN: "shown" + EVENT_KEY,
4457       FOCUSIN: "focusin" + EVENT_KEY,
4458       RESIZE: "resize" + EVENT_KEY,
4459       CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
4460       KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY,
4461       MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY,
4462       MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY,
4463       CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
4464     };
4465     var ClassName = {
4466       SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
4467       BACKDROP: 'modal-backdrop',
4468       OPEN: 'modal-open',
4469       FADE: 'fade',
4470       SHOW: 'show'
4471     };
4472     var Selector = {
4473       DIALOG: '.modal-dialog',
4474       DATA_TOGGLE: '[data-toggle="modal"]',
4475       DATA_DISMISS: '[data-dismiss="modal"]',
4476       FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
4477       STICKY_CONTENT: '.sticky-top'
4478       /**
4479        * ------------------------------------------------------------------------
4480        * Class Definition
4481        * ------------------------------------------------------------------------
4482        */
4483
4484     };
4485
4486     var Modal =
4487     /*#__PURE__*/
4488     function () {
4489       function Modal(element, config) {
4490         this._config = this._getConfig(config);
4491         this._element = element;
4492         this._dialog = element.querySelector(Selector.DIALOG);
4493         this._backdrop = null;
4494         this._isShown = false;
4495         this._isBodyOverflowing = false;
4496         this._ignoreBackdropClick = false;
4497         this._scrollbarWidth = 0;
4498       } // Getters
4499
4500
4501       var _proto = Modal.prototype;
4502
4503       // Public
4504       _proto.toggle = function toggle(relatedTarget) {
4505         return this._isShown ? this.hide() : this.show(relatedTarget);
4506       };
4507
4508       _proto.show = function show(relatedTarget) {
4509         var _this = this;
4510
4511         if (this._isTransitioning || this._isShown) {
4512           return;
4513         }
4514
4515         if ($$$1(this._element).hasClass(ClassName.FADE)) {
4516           this._isTransitioning = true;
4517         }
4518
4519         var showEvent = $$$1.Event(Event.SHOW, {
4520           relatedTarget: relatedTarget
4521         });
4522         $$$1(this._element).trigger(showEvent);
4523
4524         if (this._isShown || showEvent.isDefaultPrevented()) {
4525           return;
4526         }
4527
4528         this._isShown = true;
4529
4530         this._checkScrollbar();
4531
4532         this._setScrollbar();
4533
4534         this._adjustDialog();
4535
4536         $$$1(document.body).addClass(ClassName.OPEN);
4537
4538         this._setEscapeEvent();
4539
4540         this._setResizeEvent();
4541
4542         $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
4543           return _this.hide(event);
4544         });
4545         $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
4546           $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
4547             if ($$$1(event.target).is(_this._element)) {
4548               _this._ignoreBackdropClick = true;
4549             }
4550           });
4551         });
4552
4553         this._showBackdrop(function () {
4554           return _this._showElement(relatedTarget);
4555         });
4556       };
4557
4558       _proto.hide = function hide(event) {
4559         var _this2 = this;
4560
4561         if (event) {
4562           event.preventDefault();
4563         }
4564
4565         if (this._isTransitioning || !this._isShown) {
4566           return;
4567         }
4568
4569         var hideEvent = $$$1.Event(Event.HIDE);
4570         $$$1(this._element).trigger(hideEvent);
4571
4572         if (!this._isShown || hideEvent.isDefaultPrevented()) {
4573           return;
4574         }
4575
4576         this._isShown = false;
4577         var transition = $$$1(this._element).hasClass(ClassName.FADE);
4578
4579         if (transition) {
4580           this._isTransitioning = true;
4581         }
4582
4583         this._setEscapeEvent();
4584
4585         this._setResizeEvent();
4586
4587         $$$1(document).off(Event.FOCUSIN);
4588         $$$1(this._element).removeClass(ClassName.SHOW);
4589         $$$1(this._element).off(Event.CLICK_DISMISS);
4590         $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS);
4591
4592         if (transition) {
4593           var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4594           $$$1(this._element).one(Util.TRANSITION_END, function (event) {
4595             return _this2._hideModal(event);
4596           }).emulateTransitionEnd(transitionDuration);
4597         } else {
4598           this._hideModal();
4599         }
4600       };
4601
4602       _proto.dispose = function dispose() {
4603         $$$1.removeData(this._element, DATA_KEY);
4604         $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY);
4605         this._config = null;
4606         this._element = null;
4607         this._dialog = null;
4608         this._backdrop = null;
4609         this._isShown = null;
4610         this._isBodyOverflowing = null;
4611         this._ignoreBackdropClick = null;
4612         this._scrollbarWidth = null;
4613       };
4614
4615       _proto.handleUpdate = function handleUpdate() {
4616         this._adjustDialog();
4617       }; // Private
4618
4619
4620       _proto._getConfig = function _getConfig(config) {
4621         config = _objectSpread({}, Default, config);
4622         Util.typeCheckConfig(NAME, config, DefaultType);
4623         return config;
4624       };
4625
4626       _proto._showElement = function _showElement(relatedTarget) {
4627         var _this3 = this;
4628
4629         var transition = $$$1(this._element).hasClass(ClassName.FADE);
4630
4631         if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
4632           // Don't move modal's DOM position
4633           document.body.appendChild(this._element);
4634         }
4635
4636         this._element.style.display = 'block';
4637
4638         this._element.removeAttribute('aria-hidden');
4639
4640         this._element.scrollTop = 0;
4641
4642         if (transition) {
4643           Util.reflow(this._element);
4644         }
4645
4646         $$$1(this._element).addClass(ClassName.SHOW);
4647
4648         if (this._config.focus) {
4649           this._enforceFocus();
4650         }
4651
4652         var shownEvent = $$$1.Event(Event.SHOWN, {
4653           relatedTarget: relatedTarget
4654         });
4655
4656         var transitionComplete = function transitionComplete() {
4657           if (_this3._config.focus) {
4658             _this3._element.focus();
4659           }
4660
4661           _this3._isTransitioning = false;
4662           $$$1(_this3._element).trigger(shownEvent);
4663         };
4664
4665         if (transition) {
4666           var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4667           $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
4668         } else {
4669           transitionComplete();
4670         }
4671       };
4672
4673       _proto._enforceFocus = function _enforceFocus() {
4674         var _this4 = this;
4675
4676         $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop
4677         .on(Event.FOCUSIN, function (event) {
4678           if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) {
4679             _this4._element.focus();
4680           }
4681         });
4682       };
4683
4684       _proto._setEscapeEvent = function _setEscapeEvent() {
4685         var _this5 = this;
4686
4687         if (this._isShown && this._config.keyboard) {
4688           $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
4689             if (event.which === ESCAPE_KEYCODE) {
4690               event.preventDefault();
4691
4692               _this5.hide();
4693             }
4694           });
4695         } else if (!this._isShown) {
4696           $$$1(this._element).off(Event.KEYDOWN_DISMISS);
4697         }
4698       };
4699
4700       _proto._setResizeEvent = function _setResizeEvent() {
4701         var _this6 = this;
4702
4703         if (this._isShown) {
4704           $$$1(window).on(Event.RESIZE, function (event) {
4705             return _this6.handleUpdate(event);
4706           });
4707         } else {
4708           $$$1(window).off(Event.RESIZE);
4709         }
4710       };
4711
4712       _proto._hideModal = function _hideModal() {
4713         var _this7 = this;
4714
4715         this._element.style.display = 'none';
4716
4717         this._element.setAttribute('aria-hidden', true);
4718
4719         this._isTransitioning = false;
4720
4721         this._showBackdrop(function () {
4722           $$$1(document.body).removeClass(ClassName.OPEN);
4723
4724           _this7._resetAdjustments();
4725
4726           _this7._resetScrollbar();
4727
4728           $$$1(_this7._element).trigger(Event.HIDDEN);
4729         });
4730       };
4731
4732       _proto._removeBackdrop = function _removeBackdrop() {
4733         if (this._backdrop) {
4734           $$$1(this._backdrop).remove();
4735           this._backdrop = null;
4736         }
4737       };
4738
4739       _proto._showBackdrop = function _showBackdrop(callback) {
4740         var _this8 = this;
4741
4742         var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
4743
4744         if (this._isShown && this._config.backdrop) {
4745           this._backdrop = document.createElement('div');
4746           this._backdrop.className = ClassName.BACKDROP;
4747
4748           if (animate) {
4749             this._backdrop.classList.add(animate);
4750           }
4751
4752           $$$1(this._backdrop).appendTo(document.body);
4753           $$$1(this._element).on(Event.CLICK_DISMISS, function (event) {
4754             if (_this8._ignoreBackdropClick) {
4755               _this8._ignoreBackdropClick = false;
4756               return;
4757             }
4758
4759             if (event.target !== event.currentTarget) {
4760               return;
4761             }
4762
4763             if (_this8._config.backdrop === 'static') {
4764               _this8._element.focus();
4765             } else {
4766               _this8.hide();
4767             }
4768           });
4769
4770           if (animate) {
4771             Util.reflow(this._backdrop);
4772           }
4773
4774           $$$1(this._backdrop).addClass(ClassName.SHOW);
4775
4776           if (!callback) {
4777             return;
4778           }
4779
4780           if (!animate) {
4781             callback();
4782             return;
4783           }
4784
4785           var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
4786           $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
4787         } else if (!this._isShown && this._backdrop) {
4788           $$$1(this._backdrop).removeClass(ClassName.SHOW);
4789
4790           var callbackRemove = function callbackRemove() {
4791             _this8._removeBackdrop();
4792
4793             if (callback) {
4794               callback();
4795             }
4796           };
4797
4798           if ($$$1(this._element).hasClass(ClassName.FADE)) {
4799             var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
4800
4801             $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
4802           } else {
4803             callbackRemove();
4804           }
4805         } else if (callback) {
4806           callback();
4807         }
4808       }; // ----------------------------------------------------------------------
4809       // the following methods are used to handle overflowing modals
4810       // todo (fat): these should probably be refactored out of modal.js
4811       // ----------------------------------------------------------------------
4812
4813
4814       _proto._adjustDialog = function _adjustDialog() {
4815         var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
4816
4817         if (!this._isBodyOverflowing && isModalOverflowing) {
4818           this._element.style.paddingLeft = this._scrollbarWidth + "px";
4819         }
4820
4821         if (this._isBodyOverflowing && !isModalOverflowing) {
4822           this._element.style.paddingRight = this._scrollbarWidth + "px";
4823         }
4824       };
4825
4826       _proto._resetAdjustments = function _resetAdjustments() {
4827         this._element.style.paddingLeft = '';
4828         this._element.style.paddingRight = '';
4829       };
4830
4831       _proto._checkScrollbar = function _checkScrollbar() {
4832         var rect = document.body.getBoundingClientRect();
4833         this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
4834         this._scrollbarWidth = this._getScrollbarWidth();
4835       };
4836
4837       _proto._setScrollbar = function _setScrollbar() {
4838         var _this9 = this;
4839
4840         if (this._isBodyOverflowing) {
4841           // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
4842           //   while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
4843           var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
4844           var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
4845
4846           $$$1(fixedContent).each(function (index, element) {
4847             var actualPadding = element.style.paddingRight;
4848             var calculatedPadding = $$$1(element).css('padding-right');
4849             $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
4850           }); // Adjust sticky content margin
4851
4852           $$$1(stickyContent).each(function (index, element) {
4853             var actualMargin = element.style.marginRight;
4854             var calculatedMargin = $$$1(element).css('margin-right');
4855             $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
4856           }); // Adjust body padding
4857
4858           var actualPadding = document.body.style.paddingRight;
4859           var calculatedPadding = $$$1(document.body).css('padding-right');
4860           $$$1(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
4861         }
4862       };
4863
4864       _proto._resetScrollbar = function _resetScrollbar() {
4865         // Restore fixed content padding
4866         var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
4867         $$$1(fixedContent).each(function (index, element) {
4868           var padding = $$$1(element).data('padding-right');
4869           $$$1(element).removeData('padding-right');
4870           element.style.paddingRight = padding ? padding : '';
4871         }); // Restore sticky content
4872
4873         var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
4874         $$$1(elements).each(function (index, element) {
4875           var margin = $$$1(element).data('margin-right');
4876
4877           if (typeof margin !== 'undefined') {
4878             $$$1(element).css('margin-right', margin).removeData('margin-right');
4879           }
4880         }); // Restore body padding
4881
4882         var padding = $$$1(document.body).data('padding-right');
4883         $$$1(document.body).removeData('padding-right');
4884         document.body.style.paddingRight = padding ? padding : '';
4885       };
4886
4887       _proto._getScrollbarWidth = function _getScrollbarWidth() {
4888         // thx d.walsh
4889         var scrollDiv = document.createElement('div');
4890         scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
4891         document.body.appendChild(scrollDiv);
4892         var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
4893         document.body.removeChild(scrollDiv);
4894         return scrollbarWidth;
4895       }; // Static
4896
4897
4898       Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
4899         return this.each(function () {
4900           var data = $$$1(this).data(DATA_KEY);
4901
4902           var _config = _objectSpread({}, Default, $$$1(this).data(), typeof config === 'object' && config ? config : {});
4903
4904           if (!data) {
4905             data = new Modal(this, _config);
4906             $$$1(this).data(DATA_KEY, data);
4907           }
4908
4909           if (typeof config === 'string') {
4910             if (typeof data[config] === 'undefined') {
4911               throw new TypeError("No method named \"" + config + "\"");
4912             }
4913
4914             data[config](relatedTarget);
4915           } else if (_config.show) {
4916             data.show(relatedTarget);
4917           }
4918         });
4919       };
4920
4921       _createClass(Modal, null, [{
4922         key: "VERSION",
4923         get: function get() {
4924           return VERSION;
4925         }
4926       }, {
4927         key: "Default",
4928         get: function get() {
4929           return Default;
4930         }
4931       }]);
4932
4933       return Modal;
4934     }();
4935     /**
4936      * ------------------------------------------------------------------------
4937      * Data Api implementation
4938      * ------------------------------------------------------------------------
4939      */
4940
4941
4942     $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
4943       var _this10 = this;
4944
4945       var target;
4946       var selector = Util.getSelectorFromElement(this);
4947
4948       if (selector) {
4949         target = document.querySelector(selector);
4950       }
4951
4952       var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $$$1(target).data(), $$$1(this).data());
4953
4954       if (this.tagName === 'A' || this.tagName === 'AREA') {
4955         event.preventDefault();
4956       }
4957
4958       var $target = $$$1(target).one(Event.SHOW, function (showEvent) {
4959         if (showEvent.isDefaultPrevented()) {
4960           // Only register focus restorer if modal will actually get shown
4961           return;
4962         }
4963
4964         $target.one(Event.HIDDEN, function () {
4965           if ($$$1(_this10).is(':visible')) {
4966             _this10.focus();
4967           }
4968         });
4969       });
4970
4971       Modal._jQueryInterface.call($$$1(target), config, this);
4972     });
4973     /**
4974      * ------------------------------------------------------------------------
4975      * jQuery
4976      * ------------------------------------------------------------------------
4977      */
4978
4979     $$$1.fn[NAME] = Modal._jQueryInterface;
4980     $$$1.fn[NAME].Constructor = Modal;
4981
4982     $$$1.fn[NAME].noConflict = function () {
4983       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
4984       return Modal._jQueryInterface;
4985     };
4986
4987     return Modal;
4988   }($);
4989
4990   /**
4991    * --------------------------------------------------------------------------
4992    * Bootstrap (v4.1.3): tooltip.js
4993    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4994    * --------------------------------------------------------------------------
4995    */
4996
4997   var Tooltip = function ($$$1) {
4998     /**
4999      * ------------------------------------------------------------------------
5000      * Constants
5001      * ------------------------------------------------------------------------
5002      */
5003     var NAME = 'tooltip';
5004     var VERSION = '4.1.3';
5005     var DATA_KEY = 'bs.tooltip';
5006     var EVENT_KEY = "." + DATA_KEY;
5007     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
5008     var CLASS_PREFIX = 'bs-tooltip';
5009     var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
5010     var DefaultType = {
5011       animation: 'boolean',
5012       template: 'string',
5013       title: '(string|element|function)',
5014       trigger: 'string',
5015       delay: '(number|object)',
5016       html: 'boolean',
5017       selector: '(string|boolean)',
5018       placement: '(string|function)',
5019       offset: '(number|string)',
5020       container: '(string|element|boolean)',
5021       fallbackPlacement: '(string|array)',
5022       boundary: '(string|element)'
5023     };
5024     var AttachmentMap = {
5025       AUTO: 'auto',
5026       TOP: 'top',
5027       RIGHT: 'right',
5028       BOTTOM: 'bottom',
5029       LEFT: 'left'
5030     };
5031     var Default = {
5032       animation: true,
5033       template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
5034       trigger: 'hover focus',
5035       title: '',
5036       delay: 0,
5037       html: false,
5038       selector: false,
5039       placement: 'top',
5040       offset: 0,
5041       container: false,
5042       fallbackPlacement: 'flip',
5043       boundary: 'scrollParent'
5044     };
5045     var HoverState = {
5046       SHOW: 'show',
5047       OUT: 'out'
5048     };
5049     var Event = {
5050       HIDE: "hide" + EVENT_KEY,
5051       HIDDEN: "hidden" + EVENT_KEY,
5052       SHOW: "show" + EVENT_KEY,
5053       SHOWN: "shown" + EVENT_KEY,
5054       INSERTED: "inserted" + EVENT_KEY,
5055       CLICK: "click" + EVENT_KEY,
5056       FOCUSIN: "focusin" + EVENT_KEY,
5057       FOCUSOUT: "focusout" + EVENT_KEY,
5058       MOUSEENTER: "mouseenter" + EVENT_KEY,
5059       MOUSELEAVE: "mouseleave" + EVENT_KEY
5060     };
5061     var ClassName = {
5062       FADE: 'fade',
5063       SHOW: 'show'
5064     };
5065     var Selector = {
5066       TOOLTIP: '.tooltip',
5067       TOOLTIP_INNER: '.tooltip-inner',
5068       ARROW: '.arrow'
5069     };
5070     var Trigger = {
5071       HOVER: 'hover',
5072       FOCUS: 'focus',
5073       CLICK: 'click',
5074       MANUAL: 'manual'
5075       /**
5076        * ------------------------------------------------------------------------
5077        * Class Definition
5078        * ------------------------------------------------------------------------
5079        */
5080
5081     };
5082
5083     var Tooltip =
5084     /*#__PURE__*/
5085     function () {
5086       function Tooltip(element, config) {
5087         /**
5088          * Check for Popper dependency
5089          * Popper - https://popper.js.org
5090          */
5091         if (typeof Popper === 'undefined') {
5092           throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)');
5093         } // private
5094
5095
5096         this._isEnabled = true;
5097         this._timeout = 0;
5098         this._hoverState = '';
5099         this._activeTrigger = {};
5100         this._popper = null; // Protected
5101
5102         this.element = element;
5103         this.config = this._getConfig(config);
5104         this.tip = null;
5105
5106         this._setListeners();
5107       } // Getters
5108
5109
5110       var _proto = Tooltip.prototype;
5111
5112       // Public
5113       _proto.enable = function enable() {
5114         this._isEnabled = true;
5115       };
5116
5117       _proto.disable = function disable() {
5118         this._isEnabled = false;
5119       };
5120
5121       _proto.toggleEnabled = function toggleEnabled() {
5122         this._isEnabled = !this._isEnabled;
5123       };
5124
5125       _proto.toggle = function toggle(event) {
5126         if (!this._isEnabled) {
5127           return;
5128         }
5129
5130         if (event) {
5131           var dataKey = this.constructor.DATA_KEY;
5132           var context = $$$1(event.currentTarget).data(dataKey);
5133
5134           if (!context) {
5135             context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5136             $$$1(event.currentTarget).data(dataKey, context);
5137           }
5138
5139           context._activeTrigger.click = !context._activeTrigger.click;
5140
5141           if (context._isWithActiveTrigger()) {
5142             context._enter(null, context);
5143           } else {
5144             context._leave(null, context);
5145           }
5146         } else {
5147           if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) {
5148             this._leave(null, this);
5149
5150             return;
5151           }
5152
5153           this._enter(null, this);
5154         }
5155       };
5156
5157       _proto.dispose = function dispose() {
5158         clearTimeout(this._timeout);
5159         $$$1.removeData(this.element, this.constructor.DATA_KEY);
5160         $$$1(this.element).off(this.constructor.EVENT_KEY);
5161         $$$1(this.element).closest('.modal').off('hide.bs.modal');
5162
5163         if (this.tip) {
5164           $$$1(this.tip).remove();
5165         }
5166
5167         this._isEnabled = null;
5168         this._timeout = null;
5169         this._hoverState = null;
5170         this._activeTrigger = null;
5171
5172         if (this._popper !== null) {
5173           this._popper.destroy();
5174         }
5175
5176         this._popper = null;
5177         this.element = null;
5178         this.config = null;
5179         this.tip = null;
5180       };
5181
5182       _proto.show = function show() {
5183         var _this = this;
5184
5185         if ($$$1(this.element).css('display') === 'none') {
5186           throw new Error('Please use show on visible elements');
5187         }
5188
5189         var showEvent = $$$1.Event(this.constructor.Event.SHOW);
5190
5191         if (this.isWithContent() && this._isEnabled) {
5192           $$$1(this.element).trigger(showEvent);
5193           var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element);
5194
5195           if (showEvent.isDefaultPrevented() || !isInTheDom) {
5196             return;
5197           }
5198
5199           var tip = this.getTipElement();
5200           var tipId = Util.getUID(this.constructor.NAME);
5201           tip.setAttribute('id', tipId);
5202           this.element.setAttribute('aria-describedby', tipId);
5203           this.setContent();
5204
5205           if (this.config.animation) {
5206             $$$1(tip).addClass(ClassName.FADE);
5207           }
5208
5209           var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
5210
5211           var attachment = this._getAttachment(placement);
5212
5213           this.addAttachmentClass(attachment);
5214           var container = this.config.container === false ? document.body : $$$1(document).find(this.config.container);
5215           $$$1(tip).data(this.constructor.DATA_KEY, this);
5216
5217           if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) {
5218             $$$1(tip).appendTo(container);
5219           }
5220
5221           $$$1(this.element).trigger(this.constructor.Event.INSERTED);
5222           this._popper = new Popper(this.element, tip, {
5223             placement: attachment,
5224             modifiers: {
5225               offset: {
5226                 offset: this.config.offset
5227               },
5228               flip: {
5229                 behavior: this.config.fallbackPlacement
5230               },
5231               arrow: {
5232                 element: Selector.ARROW
5233               },
5234               preventOverflow: {
5235                 boundariesElement: this.config.boundary
5236               }
5237             },
5238             onCreate: function onCreate(data) {
5239               if (data.originalPlacement !== data.placement) {
5240                 _this._handlePopperPlacementChange(data);
5241               }
5242             },
5243             onUpdate: function onUpdate(data) {
5244               _this._handlePopperPlacementChange(data);
5245             }
5246           });
5247           $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
5248           // empty mouseover listeners to the body's immediate children;
5249           // only needed because of broken event delegation on iOS
5250           // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
5251
5252           if ('ontouchstart' in document.documentElement) {
5253             $$$1(document.body).children().on('mouseover', null, $$$1.noop);
5254           }
5255
5256           var complete = function complete() {
5257             if (_this.config.animation) {
5258               _this._fixTransition();
5259             }
5260
5261             var prevHoverState = _this._hoverState;
5262             _this._hoverState = null;
5263             $$$1(_this.element).trigger(_this.constructor.Event.SHOWN);
5264
5265             if (prevHoverState === HoverState.OUT) {
5266               _this._leave(null, _this);
5267             }
5268           };
5269
5270           if ($$$1(this.tip).hasClass(ClassName.FADE)) {
5271             var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
5272             $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
5273           } else {
5274             complete();
5275           }
5276         }
5277       };
5278
5279       _proto.hide = function hide(callback) {
5280         var _this2 = this;
5281
5282         var tip = this.getTipElement();
5283         var hideEvent = $$$1.Event(this.constructor.Event.HIDE);
5284
5285         var complete = function complete() {
5286           if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
5287             tip.parentNode.removeChild(tip);
5288           }
5289
5290           _this2._cleanTipClass();
5291
5292           _this2.element.removeAttribute('aria-describedby');
5293
5294           $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
5295
5296           if (_this2._popper !== null) {
5297             _this2._popper.destroy();
5298           }
5299
5300           if (callback) {
5301             callback();
5302           }
5303         };
5304
5305         $$$1(this.element).trigger(hideEvent);
5306
5307         if (hideEvent.isDefaultPrevented()) {
5308           return;
5309         }
5310
5311         $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
5312         // empty mouseover listeners we added for iOS support
5313
5314         if ('ontouchstart' in document.documentElement) {
5315           $$$1(document.body).children().off('mouseover', null, $$$1.noop);
5316         }
5317
5318         this._activeTrigger[Trigger.CLICK] = false;
5319         this._activeTrigger[Trigger.FOCUS] = false;
5320         this._activeTrigger[Trigger.HOVER] = false;
5321
5322         if ($$$1(this.tip).hasClass(ClassName.FADE)) {
5323           var transitionDuration = Util.getTransitionDurationFromElement(tip);
5324           $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
5325         } else {
5326           complete();
5327         }
5328
5329         this._hoverState = '';
5330       };
5331
5332       _proto.update = function update() {
5333         if (this._popper !== null) {
5334           this._popper.scheduleUpdate();
5335         }
5336       }; // Protected
5337
5338
5339       _proto.isWithContent = function isWithContent() {
5340         return Boolean(this.getTitle());
5341       };
5342
5343       _proto.addAttachmentClass = function addAttachmentClass(attachment) {
5344         $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
5345       };
5346
5347       _proto.getTipElement = function getTipElement() {
5348         this.tip = this.tip || $$$1(this.config.template)[0];
5349         return this.tip;
5350       };
5351
5352       _proto.setContent = function setContent() {
5353         var tip = this.getTipElement();
5354         this.setElementContent($$$1(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
5355         $$$1(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
5356       };
5357
5358       _proto.setElementContent = function setElementContent($element, content) {
5359         var html = this.config.html;
5360
5361         if (typeof content === 'object' && (content.nodeType || content.jquery)) {
5362           // Content is a DOM node or a jQuery
5363           if (html) {
5364             if (!$$$1(content).parent().is($element)) {
5365               $element.empty().append(content);
5366             }
5367           } else {
5368             $element.text($$$1(content).text());
5369           }
5370         } else {
5371           $element[html ? 'html' : 'text'](content);
5372         }
5373       };
5374
5375       _proto.getTitle = function getTitle() {
5376         var title = this.element.getAttribute('data-original-title');
5377
5378         if (!title) {
5379           title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
5380         }
5381
5382         return title;
5383       }; // Private
5384
5385
5386       _proto._getAttachment = function _getAttachment(placement) {
5387         return AttachmentMap[placement.toUpperCase()];
5388       };
5389
5390       _proto._setListeners = function _setListeners() {
5391         var _this3 = this;
5392
5393         var triggers = this.config.trigger.split(' ');
5394         triggers.forEach(function (trigger) {
5395           if (trigger === 'click') {
5396             $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
5397               return _this3.toggle(event);
5398             });
5399           } else if (trigger !== Trigger.MANUAL) {
5400             var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
5401             var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
5402             $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) {
5403               return _this3._enter(event);
5404             }).on(eventOut, _this3.config.selector, function (event) {
5405               return _this3._leave(event);
5406             });
5407           }
5408
5409           $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () {
5410             return _this3.hide();
5411           });
5412         });
5413
5414         if (this.config.selector) {
5415           this.config = _objectSpread({}, this.config, {
5416             trigger: 'manual',
5417             selector: ''
5418           });
5419         } else {
5420           this._fixTitle();
5421         }
5422       };
5423
5424       _proto._fixTitle = function _fixTitle() {
5425         var titleType = typeof this.element.getAttribute('data-original-title');
5426
5427         if (this.element.getAttribute('title') || titleType !== 'string') {
5428           this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
5429           this.element.setAttribute('title', '');
5430         }
5431       };
5432
5433       _proto._enter = function _enter(event, context) {
5434         var dataKey = this.constructor.DATA_KEY;
5435         context = context || $$$1(event.currentTarget).data(dataKey);
5436
5437         if (!context) {
5438           context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5439           $$$1(event.currentTarget).data(dataKey, context);
5440         }
5441
5442         if (event) {
5443           context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
5444         }
5445
5446         if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
5447           context._hoverState = HoverState.SHOW;
5448           return;
5449         }
5450
5451         clearTimeout(context._timeout);
5452         context._hoverState = HoverState.SHOW;
5453
5454         if (!context.config.delay || !context.config.delay.show) {
5455           context.show();
5456           return;
5457         }
5458
5459         context._timeout = setTimeout(function () {
5460           if (context._hoverState === HoverState.SHOW) {
5461             context.show();
5462           }
5463         }, context.config.delay.show);
5464       };
5465
5466       _proto._leave = function _leave(event, context) {
5467         var dataKey = this.constructor.DATA_KEY;
5468         context = context || $$$1(event.currentTarget).data(dataKey);
5469
5470         if (!context) {
5471           context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5472           $$$1(event.currentTarget).data(dataKey, context);
5473         }
5474
5475         if (event) {
5476           context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
5477         }
5478
5479         if (context._isWithActiveTrigger()) {
5480           return;
5481         }
5482
5483         clearTimeout(context._timeout);
5484         context._hoverState = HoverState.OUT;
5485
5486         if (!context.config.delay || !context.config.delay.hide) {
5487           context.hide();
5488           return;
5489         }
5490
5491         context._timeout = setTimeout(function () {
5492           if (context._hoverState === HoverState.OUT) {
5493             context.hide();
5494           }
5495         }, context.config.delay.hide);
5496       };
5497
5498       _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
5499         for (var trigger in this._activeTrigger) {
5500           if (this._activeTrigger[trigger]) {
5501             return true;
5502           }
5503         }
5504
5505         return false;
5506       };
5507
5508       _proto._getConfig = function _getConfig(config) {
5509         config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), typeof config === 'object' && config ? config : {});
5510
5511         if (typeof config.delay === 'number') {
5512           config.delay = {
5513             show: config.delay,
5514             hide: config.delay
5515           };
5516         }
5517
5518         if (typeof config.title === 'number') {
5519           config.title = config.title.toString();
5520         }
5521
5522         if (typeof config.content === 'number') {
5523           config.content = config.content.toString();
5524         }
5525
5526         Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
5527         return config;
5528       };
5529
5530       _proto._getDelegateConfig = function _getDelegateConfig() {
5531         var config = {};
5532
5533         if (this.config) {
5534           for (var key in this.config) {
5535             if (this.constructor.Default[key] !== this.config[key]) {
5536               config[key] = this.config[key];
5537             }
5538           }
5539         }
5540
5541         return config;
5542       };
5543
5544       _proto._cleanTipClass = function _cleanTipClass() {
5545         var $tip = $$$1(this.getTipElement());
5546         var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
5547
5548         if (tabClass !== null && tabClass.length) {
5549           $tip.removeClass(tabClass.join(''));
5550         }
5551       };
5552
5553       _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
5554         var popperInstance = popperData.instance;
5555         this.tip = popperInstance.popper;
5556
5557         this._cleanTipClass();
5558
5559         this.addAttachmentClass(this._getAttachment(popperData.placement));
5560       };
5561
5562       _proto._fixTransition = function _fixTransition() {
5563         var tip = this.getTipElement();
5564         var initConfigAnimation = this.config.animation;
5565
5566         if (tip.getAttribute('x-placement') !== null) {
5567           return;
5568         }
5569
5570         $$$1(tip).removeClass(ClassName.FADE);
5571         this.config.animation = false;
5572         this.hide();
5573         this.show();
5574         this.config.animation = initConfigAnimation;
5575       }; // Static
5576
5577
5578       Tooltip._jQueryInterface = function _jQueryInterface(config) {
5579         return this.each(function () {
5580           var data = $$$1(this).data(DATA_KEY);
5581
5582           var _config = typeof config === 'object' && config;
5583
5584           if (!data && /dispose|hide/.test(config)) {
5585             return;
5586           }
5587
5588           if (!data) {
5589             data = new Tooltip(this, _config);
5590             $$$1(this).data(DATA_KEY, data);
5591           }
5592
5593           if (typeof config === 'string') {
5594             if (typeof data[config] === 'undefined') {
5595               throw new TypeError("No method named \"" + config + "\"");
5596             }
5597
5598             data[config]();
5599           }
5600         });
5601       };
5602
5603       _createClass(Tooltip, null, [{
5604         key: "VERSION",
5605         get: function get() {
5606           return VERSION;
5607         }
5608       }, {
5609         key: "Default",
5610         get: function get() {
5611           return Default;
5612         }
5613       }, {
5614         key: "NAME",
5615         get: function get() {
5616           return NAME;
5617         }
5618       }, {
5619         key: "DATA_KEY",
5620         get: function get() {
5621           return DATA_KEY;
5622         }
5623       }, {
5624         key: "Event",
5625         get: function get() {
5626           return Event;
5627         }
5628       }, {
5629         key: "EVENT_KEY",
5630         get: function get() {
5631           return EVENT_KEY;
5632         }
5633       }, {
5634         key: "DefaultType",
5635         get: function get() {
5636           return DefaultType;
5637         }
5638       }]);
5639
5640       return Tooltip;
5641     }();
5642     /**
5643      * ------------------------------------------------------------------------
5644      * jQuery
5645      * ------------------------------------------------------------------------
5646      */
5647
5648
5649     $$$1.fn[NAME] = Tooltip._jQueryInterface;
5650     $$$1.fn[NAME].Constructor = Tooltip;
5651
5652     $$$1.fn[NAME].noConflict = function () {
5653       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
5654       return Tooltip._jQueryInterface;
5655     };
5656
5657     return Tooltip;
5658   }($, Popper);
5659
5660   /**
5661    * --------------------------------------------------------------------------
5662    * Bootstrap (v4.1.3): popover.js
5663    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5664    * --------------------------------------------------------------------------
5665    */
5666
5667   var Popover = function ($$$1) {
5668     /**
5669      * ------------------------------------------------------------------------
5670      * Constants
5671      * ------------------------------------------------------------------------
5672      */
5673     var NAME = 'popover';
5674     var VERSION = '4.1.3';
5675     var DATA_KEY = 'bs.popover';
5676     var EVENT_KEY = "." + DATA_KEY;
5677     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
5678     var CLASS_PREFIX = 'bs-popover';
5679     var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
5680
5681     var Default = _objectSpread({}, Tooltip.Default, {
5682       placement: 'right',
5683       trigger: 'click',
5684       content: '',
5685       template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
5686     });
5687
5688     var DefaultType = _objectSpread({}, Tooltip.DefaultType, {
5689       content: '(string|element|function)'
5690     });
5691
5692     var ClassName = {
5693       FADE: 'fade',
5694       SHOW: 'show'
5695     };
5696     var Selector = {
5697       TITLE: '.popover-header',
5698       CONTENT: '.popover-body'
5699     };
5700     var Event = {
5701       HIDE: "hide" + EVENT_KEY,
5702       HIDDEN: "hidden" + EVENT_KEY,
5703       SHOW: "show" + EVENT_KEY,
5704       SHOWN: "shown" + EVENT_KEY,
5705       INSERTED: "inserted" + EVENT_KEY,
5706       CLICK: "click" + EVENT_KEY,
5707       FOCUSIN: "focusin" + EVENT_KEY,
5708       FOCUSOUT: "focusout" + EVENT_KEY,
5709       MOUSEENTER: "mouseenter" + EVENT_KEY,
5710       MOUSELEAVE: "mouseleave" + EVENT_KEY
5711       /**
5712        * ------------------------------------------------------------------------
5713        * Class Definition
5714        * ------------------------------------------------------------------------
5715        */
5716
5717     };
5718
5719     var Popover =
5720     /*#__PURE__*/
5721     function (_Tooltip) {
5722       _inheritsLoose(Popover, _Tooltip);
5723
5724       function Popover() {
5725         return _Tooltip.apply(this, arguments) || this;
5726       }
5727
5728       var _proto = Popover.prototype;
5729
5730       // Overrides
5731       _proto.isWithContent = function isWithContent() {
5732         return this.getTitle() || this._getContent();
5733       };
5734
5735       _proto.addAttachmentClass = function addAttachmentClass(attachment) {
5736         $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
5737       };
5738
5739       _proto.getTipElement = function getTipElement() {
5740         this.tip = this.tip || $$$1(this.config.template)[0];
5741         return this.tip;
5742       };
5743
5744       _proto.setContent = function setContent() {
5745         var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events
5746
5747         this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
5748
5749         var content = this._getContent();
5750
5751         if (typeof content === 'function') {
5752           content = content.call(this.element);
5753         }
5754
5755         this.setElementContent($tip.find(Selector.CONTENT), content);
5756         $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
5757       }; // Private
5758
5759
5760       _proto._getContent = function _getContent() {
5761         return this.element.getAttribute('data-content') || this.config.content;
5762       };
5763
5764       _proto._cleanTipClass = function _cleanTipClass() {
5765         var $tip = $$$1(this.getTipElement());
5766         var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
5767
5768         if (tabClass !== null && tabClass.length > 0) {
5769           $tip.removeClass(tabClass.join(''));
5770         }
5771       }; // Static
5772
5773
5774       Popover._jQueryInterface = function _jQueryInterface(config) {
5775         return this.each(function () {
5776           var data = $$$1(this).data(DATA_KEY);
5777
5778           var _config = typeof config === 'object' ? config : null;
5779
5780           if (!data && /destroy|hide/.test(config)) {
5781             return;
5782           }
5783
5784           if (!data) {
5785             data = new Popover(this, _config);
5786             $$$1(this).data(DATA_KEY, data);
5787           }
5788
5789           if (typeof config === 'string') {
5790             if (typeof data[config] === 'undefined') {
5791               throw new TypeError("No method named \"" + config + "\"");
5792             }
5793
5794             data[config]();
5795           }
5796         });
5797       };
5798
5799       _createClass(Popover, null, [{
5800         key: "VERSION",
5801         // Getters
5802         get: function get() {
5803           return VERSION;
5804         }
5805       }, {
5806         key: "Default",
5807         get: function get() {
5808           return Default;
5809         }
5810       }, {
5811         key: "NAME",
5812         get: function get() {
5813           return NAME;
5814         }
5815       }, {
5816         key: "DATA_KEY",
5817         get: function get() {
5818           return DATA_KEY;
5819         }
5820       }, {
5821         key: "Event",
5822         get: function get() {
5823           return Event;
5824         }
5825       }, {
5826         key: "EVENT_KEY",
5827         get: function get() {
5828           return EVENT_KEY;
5829         }
5830       }, {
5831         key: "DefaultType",
5832         get: function get() {
5833           return DefaultType;
5834         }
5835       }]);
5836
5837       return Popover;
5838     }(Tooltip);
5839     /**
5840      * ------------------------------------------------------------------------
5841      * jQuery
5842      * ------------------------------------------------------------------------
5843      */
5844
5845
5846     $$$1.fn[NAME] = Popover._jQueryInterface;
5847     $$$1.fn[NAME].Constructor = Popover;
5848
5849     $$$1.fn[NAME].noConflict = function () {
5850       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
5851       return Popover._jQueryInterface;
5852     };
5853
5854     return Popover;
5855   }($);
5856
5857   /**
5858    * --------------------------------------------------------------------------
5859    * Bootstrap (v4.1.3): scrollspy.js
5860    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5861    * --------------------------------------------------------------------------
5862    */
5863
5864   var ScrollSpy = function ($$$1) {
5865     /**
5866      * ------------------------------------------------------------------------
5867      * Constants
5868      * ------------------------------------------------------------------------
5869      */
5870     var NAME = 'scrollspy';
5871     var VERSION = '4.1.3';
5872     var DATA_KEY = 'bs.scrollspy';
5873     var EVENT_KEY = "." + DATA_KEY;
5874     var DATA_API_KEY = '.data-api';
5875     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
5876     var Default = {
5877       offset: 10,
5878       method: 'auto',
5879       target: ''
5880     };
5881     var DefaultType = {
5882       offset: 'number',
5883       method: 'string',
5884       target: '(string|element)'
5885     };
5886     var Event = {
5887       ACTIVATE: "activate" + EVENT_KEY,
5888       SCROLL: "scroll" + EVENT_KEY,
5889       LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY
5890     };
5891     var ClassName = {
5892       DROPDOWN_ITEM: 'dropdown-item',
5893       DROPDOWN_MENU: 'dropdown-menu',
5894       ACTIVE: 'active'
5895     };
5896     var Selector = {
5897       DATA_SPY: '[data-spy="scroll"]',
5898       ACTIVE: '.active',
5899       NAV_LIST_GROUP: '.nav, .list-group',
5900       NAV_LINKS: '.nav-link',
5901       NAV_ITEMS: '.nav-item',
5902       LIST_ITEMS: '.list-group-item',
5903       DROPDOWN: '.dropdown',
5904       DROPDOWN_ITEMS: '.dropdown-item',
5905       DROPDOWN_TOGGLE: '.dropdown-toggle'
5906     };
5907     var OffsetMethod = {
5908       OFFSET: 'offset',
5909       POSITION: 'position'
5910       /**
5911        * ------------------------------------------------------------------------
5912        * Class Definition
5913        * ------------------------------------------------------------------------
5914        */
5915
5916     };
5917
5918     var ScrollSpy =
5919     /*#__PURE__*/
5920     function () {
5921       function ScrollSpy(element, config) {
5922         var _this = this;
5923
5924         this._element = element;
5925         this._scrollElement = element.tagName === 'BODY' ? window : element;
5926         this._config = this._getConfig(config);
5927         this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS);
5928         this._offsets = [];
5929         this._targets = [];
5930         this._activeTarget = null;
5931         this._scrollHeight = 0;
5932         $$$1(this._scrollElement).on(Event.SCROLL, function (event) {
5933           return _this._process(event);
5934         });
5935         this.refresh();
5936
5937         this._process();
5938       } // Getters
5939
5940
5941       var _proto = ScrollSpy.prototype;
5942
5943       // Public
5944       _proto.refresh = function refresh() {
5945         var _this2 = this;
5946
5947         var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
5948         var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
5949         var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
5950         this._offsets = [];
5951         this._targets = [];
5952         this._scrollHeight = this._getScrollHeight();
5953         var targets = [].slice.call(document.querySelectorAll(this._selector));
5954         targets.map(function (element) {
5955           var target;
5956           var targetSelector = Util.getSelectorFromElement(element);
5957
5958           if (targetSelector) {
5959             target = document.querySelector(targetSelector);
5960           }
5961
5962           if (target) {
5963             var targetBCR = target.getBoundingClientRect();
5964
5965             if (targetBCR.width || targetBCR.height) {
5966               // TODO (fat): remove sketch reliance on jQuery position/offset
5967               return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector];
5968             }
5969           }
5970
5971           return null;
5972         }).filter(function (item) {
5973           return item;
5974         }).sort(function (a, b) {
5975           return a[0] - b[0];
5976         }).forEach(function (item) {
5977           _this2._offsets.push(item[0]);
5978
5979           _this2._targets.push(item[1]);
5980         });
5981       };
5982
5983       _proto.dispose = function dispose() {
5984         $$$1.removeData(this._element, DATA_KEY);
5985         $$$1(this._scrollElement).off(EVENT_KEY);
5986         this._element = null;
5987         this._scrollElement = null;
5988         this._config = null;
5989         this._selector = null;
5990         this._offsets = null;
5991         this._targets = null;
5992         this._activeTarget = null;
5993         this._scrollHeight = null;
5994       }; // Private
5995
5996
5997       _proto._getConfig = function _getConfig(config) {
5998         config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
5999
6000         if (typeof config.target !== 'string') {
6001           var id = $$$1(config.target).attr('id');
6002
6003           if (!id) {
6004             id = Util.getUID(NAME);
6005             $$$1(config.target).attr('id', id);
6006           }
6007
6008           config.target = "#" + id;
6009         }
6010
6011         Util.typeCheckConfig(NAME, config, DefaultType);
6012         return config;
6013       };
6014
6015       _proto._getScrollTop = function _getScrollTop() {
6016         return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
6017       };
6018
6019       _proto._getScrollHeight = function _getScrollHeight() {
6020         return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
6021       };
6022
6023       _proto._getOffsetHeight = function _getOffsetHeight() {
6024         return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
6025       };
6026
6027       _proto._process = function _process() {
6028         var scrollTop = this._getScrollTop() + this._config.offset;
6029
6030         var scrollHeight = this._getScrollHeight();
6031
6032         var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
6033
6034         if (this._scrollHeight !== scrollHeight) {
6035           this.refresh();
6036         }
6037
6038         if (scrollTop >= maxScroll) {
6039           var target = this._targets[this._targets.length - 1];
6040
6041           if (this._activeTarget !== target) {
6042             this._activate(target);
6043           }
6044
6045           return;
6046         }
6047
6048         if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
6049           this._activeTarget = null;
6050
6051           this._clear();
6052
6053           return;
6054         }
6055
6056         var offsetLength = this._offsets.length;
6057
6058         for (var i = offsetLength; i--;) {
6059           var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
6060
6061           if (isActiveTarget) {
6062             this._activate(this._targets[i]);
6063           }
6064         }
6065       };
6066
6067       _proto._activate = function _activate(target) {
6068         this._activeTarget = target;
6069
6070         this._clear();
6071
6072         var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
6073
6074
6075         queries = queries.map(function (selector) {
6076           return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]");
6077         });
6078         var $link = $$$1([].slice.call(document.querySelectorAll(queries.join(','))));
6079
6080         if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
6081           $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
6082           $link.addClass(ClassName.ACTIVE);
6083         } else {
6084           // Set triggered link as active
6085           $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
6086           // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
6087
6088           $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
6089
6090           $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
6091         }
6092
6093         $$$1(this._scrollElement).trigger(Event.ACTIVATE, {
6094           relatedTarget: target
6095         });
6096       };
6097
6098       _proto._clear = function _clear() {
6099         var nodes = [].slice.call(document.querySelectorAll(this._selector));
6100         $$$1(nodes).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
6101       }; // Static
6102
6103
6104       ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
6105         return this.each(function () {
6106           var data = $$$1(this).data(DATA_KEY);
6107
6108           var _config = typeof config === 'object' && config;
6109
6110           if (!data) {
6111             data = new ScrollSpy(this, _config);
6112             $$$1(this).data(DATA_KEY, data);
6113           }
6114
6115           if (typeof config === 'string') {
6116             if (typeof data[config] === 'undefined') {
6117               throw new TypeError("No method named \"" + config + "\"");
6118             }
6119
6120             data[config]();
6121           }
6122         });
6123       };
6124
6125       _createClass(ScrollSpy, null, [{
6126         key: "VERSION",
6127         get: function get() {
6128           return VERSION;
6129         }
6130       }, {
6131         key: "Default",
6132         get: function get() {
6133           return Default;
6134         }
6135       }]);
6136
6137       return ScrollSpy;
6138     }();
6139     /**
6140      * ------------------------------------------------------------------------
6141      * Data Api implementation
6142      * ------------------------------------------------------------------------
6143      */
6144
6145
6146     $$$1(window).on(Event.LOAD_DATA_API, function () {
6147       var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY));
6148       var scrollSpysLength = scrollSpys.length;
6149
6150       for (var i = scrollSpysLength; i--;) {
6151         var $spy = $$$1(scrollSpys[i]);
6152
6153         ScrollSpy._jQueryInterface.call($spy, $spy.data());
6154       }
6155     });
6156     /**
6157      * ------------------------------------------------------------------------
6158      * jQuery
6159      * ------------------------------------------------------------------------
6160      */
6161
6162     $$$1.fn[NAME] = ScrollSpy._jQueryInterface;
6163     $$$1.fn[NAME].Constructor = ScrollSpy;
6164
6165     $$$1.fn[NAME].noConflict = function () {
6166       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
6167       return ScrollSpy._jQueryInterface;
6168     };
6169
6170     return ScrollSpy;
6171   }($);
6172
6173   /**
6174    * --------------------------------------------------------------------------
6175    * Bootstrap (v4.1.3): tab.js
6176    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6177    * --------------------------------------------------------------------------
6178    */
6179
6180   var Tab = function ($$$1) {
6181     /**
6182      * ------------------------------------------------------------------------
6183      * Constants
6184      * ------------------------------------------------------------------------
6185      */
6186     var NAME = 'tab';
6187     var VERSION = '4.1.3';
6188     var DATA_KEY = 'bs.tab';
6189     var EVENT_KEY = "." + DATA_KEY;
6190     var DATA_API_KEY = '.data-api';
6191     var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
6192     var Event = {
6193       HIDE: "hide" + EVENT_KEY,
6194       HIDDEN: "hidden" + EVENT_KEY,
6195       SHOW: "show" + EVENT_KEY,
6196       SHOWN: "shown" + EVENT_KEY,
6197       CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
6198     };
6199     var ClassName = {
6200       DROPDOWN_MENU: 'dropdown-menu',
6201       ACTIVE: 'active',
6202       DISABLED: 'disabled',
6203       FADE: 'fade',
6204       SHOW: 'show'
6205     };
6206     var Selector = {
6207       DROPDOWN: '.dropdown',
6208       NAV_LIST_GROUP: '.nav, .list-group',
6209       ACTIVE: '.active',
6210       ACTIVE_UL: '> li > .active',
6211       DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
6212       DROPDOWN_TOGGLE: '.dropdown-toggle',
6213       DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
6214       /**
6215        * ------------------------------------------------------------------------
6216        * Class Definition
6217        * ------------------------------------------------------------------------
6218        */
6219
6220     };
6221
6222     var Tab =
6223     /*#__PURE__*/
6224     function () {
6225       function Tab(element) {
6226         this._element = element;
6227       } // Getters
6228
6229
6230       var _proto = Tab.prototype;
6231
6232       // Public
6233       _proto.show = function show() {
6234         var _this = this;
6235
6236         if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $$$1(this._element).hasClass(ClassName.ACTIVE) || $$$1(this._element).hasClass(ClassName.DISABLED)) {
6237           return;
6238         }
6239
6240         var target;
6241         var previous;
6242         var listElement = $$$1(this._element).closest(Selector.NAV_LIST_GROUP)[0];
6243         var selector = Util.getSelectorFromElement(this._element);
6244
6245         if (listElement) {
6246           var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
6247           previous = $$$1.makeArray($$$1(listElement).find(itemSelector));
6248           previous = previous[previous.length - 1];
6249         }
6250
6251         var hideEvent = $$$1.Event(Event.HIDE, {
6252           relatedTarget: this._element
6253         });
6254         var showEvent = $$$1.Event(Event.SHOW, {
6255           relatedTarget: previous
6256         });
6257
6258         if (previous) {
6259           $$$1(previous).trigger(hideEvent);
6260         }
6261
6262         $$$1(this._element).trigger(showEvent);
6263
6264         if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
6265           return;
6266         }
6267
6268         if (selector) {
6269           target = document.querySelector(selector);
6270         }
6271
6272         this._activate(this._element, listElement);
6273
6274         var complete = function complete() {
6275           var hiddenEvent = $$$1.Event(Event.HIDDEN, {
6276             relatedTarget: _this._element
6277           });
6278           var shownEvent = $$$1.Event(Event.SHOWN, {
6279             relatedTarget: previous
6280           });
6281           $$$1(previous).trigger(hiddenEvent);
6282           $$$1(_this._element).trigger(shownEvent);
6283         };
6284
6285         if (target) {
6286           this._activate(target, target.parentNode, complete);
6287         } else {
6288           complete();
6289         }
6290       };
6291
6292       _proto.dispose = function dispose() {
6293         $$$1.removeData(this._element, DATA_KEY);
6294         this._element = null;
6295       }; // Private
6296
6297
6298       _proto._activate = function _activate(element, container, callback) {
6299         var _this2 = this;
6300
6301         var activeElements;
6302
6303         if (container.nodeName === 'UL') {
6304           activeElements = $$$1(container).find(Selector.ACTIVE_UL);
6305         } else {
6306           activeElements = $$$1(container).children(Selector.ACTIVE);
6307         }
6308
6309         var active = activeElements[0];
6310         var isTransitioning = callback && active && $$$1(active).hasClass(ClassName.FADE);
6311
6312         var complete = function complete() {
6313           return _this2._transitionComplete(element, active, callback);
6314         };
6315
6316         if (active && isTransitioning) {
6317           var transitionDuration = Util.getTransitionDurationFromElement(active);
6318           $$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
6319         } else {
6320           complete();
6321         }
6322       };
6323
6324       _proto._transitionComplete = function _transitionComplete(element, active, callback) {
6325         if (active) {
6326           $$$1(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE);
6327           var dropdownChild = $$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
6328
6329           if (dropdownChild) {
6330             $$$1(dropdownChild).removeClass(ClassName.ACTIVE);
6331           }
6332
6333           if (active.getAttribute('role') === 'tab') {
6334             active.setAttribute('aria-selected', false);
6335           }
6336         }
6337
6338         $$$1(element).addClass(ClassName.ACTIVE);
6339
6340         if (element.getAttribute('role') === 'tab') {
6341           element.setAttribute('aria-selected', true);
6342         }
6343
6344         Util.reflow(element);
6345         $$$1(element).addClass(ClassName.SHOW);
6346
6347         if (element.parentNode && $$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
6348           var dropdownElement = $$$1(element).closest(Selector.DROPDOWN)[0];
6349
6350           if (dropdownElement) {
6351             var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));
6352             $$$1(dropdownToggleList).addClass(ClassName.ACTIVE);
6353           }
6354
6355           element.setAttribute('aria-expanded', true);
6356         }
6357
6358         if (callback) {
6359           callback();
6360         }
6361       }; // Static
6362
6363
6364       Tab._jQueryInterface = function _jQueryInterface(config) {
6365         return this.each(function () {
6366           var $this = $$$1(this);
6367           var data = $this.data(DATA_KEY);
6368
6369           if (!data) {
6370             data = new Tab(this);
6371             $this.data(DATA_KEY, data);
6372           }
6373
6374           if (typeof config === 'string') {
6375             if (typeof data[config] === 'undefined') {
6376               throw new TypeError("No method named \"" + config + "\"");
6377             }
6378
6379             data[config]();
6380           }
6381         });
6382       };
6383
6384       _createClass(Tab, null, [{
6385         key: "VERSION",
6386         get: function get() {
6387           return VERSION;
6388         }
6389       }]);
6390
6391       return Tab;
6392     }();
6393     /**
6394      * ------------------------------------------------------------------------
6395      * Data Api implementation
6396      * ------------------------------------------------------------------------
6397      */
6398
6399
6400     $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
6401       event.preventDefault();
6402
6403       Tab._jQueryInterface.call($$$1(this), 'show');
6404     });
6405     /**
6406      * ------------------------------------------------------------------------
6407      * jQuery
6408      * ------------------------------------------------------------------------
6409      */
6410
6411     $$$1.fn[NAME] = Tab._jQueryInterface;
6412     $$$1.fn[NAME].Constructor = Tab;
6413
6414     $$$1.fn[NAME].noConflict = function () {
6415       $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
6416       return Tab._jQueryInterface;
6417     };
6418
6419     return Tab;
6420   }($);
6421
6422   /**
6423    * --------------------------------------------------------------------------
6424    * Bootstrap (v4.1.3): index.js
6425    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6426    * --------------------------------------------------------------------------
6427    */
6428
6429   (function ($$$1) {
6430     if (typeof $$$1 === 'undefined') {
6431       throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
6432     }
6433
6434     var version = $$$1.fn.jquery.split(' ')[0].split('.');
6435     var minMajor = 1;
6436     var ltMajor = 2;
6437     var minMinor = 9;
6438     var minPatch = 1;
6439     var maxMajor = 4;
6440
6441     if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
6442       throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
6443     }
6444   })($);
6445
6446   exports.Util = Util;
6447   exports.Alert = Alert;
6448   exports.Button = Button;
6449   exports.Carousel = Carousel;
6450   exports.Collapse = Collapse;
6451   exports.Dropdown = Dropdown;
6452   exports.Modal = Modal;
6453   exports.Popover = Popover;
6454   exports.Scrollspy = ScrollSpy;
6455   exports.Tab = Tab;
6456   exports.Tooltip = Tooltip;
6457
6458   Object.defineProperty(exports, '__esModule', { value: true });
6459
6460 })));
6461 //# sourceMappingURL=bootstrap.bundle.js.map