bootstrap.js 121 KB
Newer Older
1
/*!
Mark Otto's avatar
Mark Otto committed
2
  * Bootstrap v4.1.3 (https://getbootstrap.com/)
Mark Otto's avatar
dist    
Mark Otto committed
3
  * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
Mark Otto's avatar
dist    
Mark Otto committed
4
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  */
Mark Otto's avatar
dist    
Mark Otto committed
6
(function (global, factory) {
Mark Otto's avatar
dist    
Mark Otto committed
7
8
9
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
  typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
  (factory((global.bootstrap = {}),global.jQuery,global.Popper));
Mark Otto's avatar
dist    
Mark Otto committed
10
}(this, (function (exports,$,Popper) { 'use strict';
Mark Otto's avatar
grunt    
Mark Otto committed
11

Mark Otto's avatar
dist    
Mark Otto committed
12
13
  $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
Jacob Thornton's avatar
Jacob Thornton committed
14

Mark Otto's avatar
dist    
Mark Otto committed
15
16
17
18
19
20
21
22
  function _defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
Mark Otto's avatar
Mark Otto committed
23
24
  }

Mark Otto's avatar
dist    
Mark Otto committed
25
26
27
28
29
  function _createClass(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    return Constructor;
  }
Mark Otto's avatar
dist    
Mark Otto committed
30

Mark Otto's avatar
dist    
Mark Otto committed
31
32
33
34
35
36
37
38
39
40
  function _defineProperty(obj, key, value) {
    if (key in obj) {
      Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
      });
    } else {
      obj[key] = value;
Mark Otto's avatar
dist    
Mark Otto committed
41
42
    }

Mark Otto's avatar
dist    
Mark Otto committed
43
    return obj;
Jacob Thornton's avatar
Jacob Thornton committed
44
45
  }

Mark Otto's avatar
dist    
Mark Otto committed
46
47
48
49
  function _objectSpread(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i] != null ? arguments[i] : {};
      var ownKeys = Object.keys(source);
Mark Otto's avatar
dist    
Mark Otto committed
50

Mark Otto's avatar
dist    
Mark Otto committed
51
52
53
54
      if (typeof Object.getOwnPropertySymbols === 'function') {
        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
        }));
Jacob Thornton's avatar
Jacob Thornton committed
55
56
      }

Mark Otto's avatar
dist    
Mark Otto committed
57
58
59
      ownKeys.forEach(function (key) {
        _defineProperty(target, key, source[key]);
      });
Jacob Thornton's avatar
Jacob Thornton committed
60
61
    }

Mark Otto's avatar
dist    
Mark Otto committed
62
    return target;
Jacob Thornton's avatar
Jacob Thornton committed
63
64
  }

Mark Otto's avatar
dist    
Mark Otto committed
65
66
67
68
  function _inheritsLoose(subClass, superClass) {
    subClass.prototype = Object.create(superClass.prototype);
    subClass.prototype.constructor = subClass;
    subClass.__proto__ = superClass;
Jacob Thornton's avatar
Jacob Thornton committed
69
70
71
72
  }

  /**
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
73
   * Bootstrap (v4.1.3): util.js
Mark Otto's avatar
dist    
Mark Otto committed
74
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
Jacob Thornton's avatar
Jacob Thornton committed
75
76
77
   * --------------------------------------------------------------------------
   */

Mark Otto's avatar
dist    
Mark Otto committed
78
79
80
81
82
83
84
85
86
87
88
89
90
  var Util = function ($$$1) {
    /**
     * ------------------------------------------------------------------------
     * Private TransitionEnd Helpers
     * ------------------------------------------------------------------------
     */
    var TRANSITION_END = 'transitionend';
    var MAX_UID = 1000000;
    var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)

    function toType(obj) {
      return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
    }
Jacob Thornton's avatar
Jacob Thornton committed
91

Mark Otto's avatar
dist    
Mark Otto committed
92
93
94
95
96
97
98
99
    function getSpecialTransitionEndEvent() {
      return {
        bindType: TRANSITION_END,
        delegateType: TRANSITION_END,
        handle: function handle(event) {
          if ($$$1(event.target).is(this)) {
            return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
          }
Mark Otto's avatar
dist    
Mark Otto committed
100

Mark Otto's avatar
dist    
Mark Otto committed
101
102
103
104
          return undefined; // eslint-disable-line no-undefined
        }
      };
    }
Mark Otto's avatar
dist    
Mark Otto committed
105

Mark Otto's avatar
dist    
Mark Otto committed
106
107
    function transitionEndEmulator(duration) {
      var _this = this;
Jacob Thornton's avatar
Jacob Thornton committed
108

Mark Otto's avatar
dist    
Mark Otto committed
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
      var called = false;
      $$$1(this).one(Util.TRANSITION_END, function () {
        called = true;
      });
      setTimeout(function () {
        if (!called) {
          Util.triggerTransitionEnd(_this);
        }
      }, duration);
      return this;
    }

    function setTransitionEndSupport() {
      $$$1.fn.emulateTransitionEnd = transitionEndEmulator;
      $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
    }
    /**
     * --------------------------------------------------------------------------
     * Public Util Api
     * --------------------------------------------------------------------------
     */


    var Util = {
      TRANSITION_END: 'bsTransitionEnd',
      getUID: function getUID(prefix) {
        do {
          // eslint-disable-next-line no-bitwise
          prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
        } while (document.getElementById(prefix));

        return prefix;
      },
      getSelectorFromElement: function getSelectorFromElement(element) {
        var selector = element.getAttribute('data-target');

        if (!selector || selector === '#') {
          selector = element.getAttribute('href') || '';
        }

        try {
Mark Otto's avatar
dist    
Mark Otto committed
150
          return document.querySelector(selector) ? selector : null;
Mark Otto's avatar
dist    
Mark Otto committed
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
        } catch (err) {
          return null;
        }
      },
      getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
        if (!element) {
          return 0;
        } // Get transition-duration of the element


        var transitionDuration = $$$1(element).css('transition-duration');
        var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found

        if (!floatTransitionDuration) {
          return 0;
        } // If multiple durations are defined, take the first


        transitionDuration = transitionDuration.split(',')[0];
        return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
      },
      reflow: function reflow(element) {
        return element.offsetHeight;
      },
      triggerTransitionEnd: function triggerTransitionEnd(element) {
        $$$1(element).trigger(TRANSITION_END);
      },
      // TODO: Remove in v5
      supportsTransitionEnd: function supportsTransitionEnd() {
        return Boolean(TRANSITION_END);
      },
      isElement: function isElement(obj) {
        return (obj[0] || obj).nodeType;
      },
      typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
        for (var property in configTypes) {
          if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
            var expectedTypes = configTypes[property];
            var value = config[property];
            var valueType = value && Util.isElement(value) ? 'element' : toType(value);

            if (!new RegExp(expectedTypes).test(valueType)) {
              throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
            }
Jacob Thornton's avatar
Jacob Thornton committed
195
          }
Jacob Thornton's avatar
Jacob Thornton committed
196
197
        }
      }
Mark Otto's avatar
dist    
Mark Otto committed
198
199
200
201
202
    };
    setTransitionEndSupport();
    return Util;
  }($);

Jacob Thornton's avatar
Jacob Thornton committed
203
  /**
Mark Otto's avatar
dist    
Mark Otto committed
204
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
205
   * Bootstrap (v4.1.3): alert.js
Mark Otto's avatar
dist    
Mark Otto committed
206
207
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
208
   */
Mark Otto's avatar
dist    
Mark Otto committed
209
210

  var Alert = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
211
212
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
213
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
214
215
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
216
    var NAME = 'alert';
Mark Otto's avatar
Mark Otto committed
217
    var VERSION = '4.1.3';
Mark Otto's avatar
dist    
Mark Otto committed
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
    var DATA_KEY = 'bs.alert';
    var EVENT_KEY = "." + DATA_KEY;
    var DATA_API_KEY = '.data-api';
    var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
    var Selector = {
      DISMISS: '[data-dismiss="alert"]'
    };
    var Event = {
      CLOSE: "close" + EVENT_KEY,
      CLOSED: "closed" + EVENT_KEY,
      CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
    };
    var ClassName = {
      ALERT: 'alert',
      FADE: 'fade',
      SHOW: 'show'
      /**
       * ------------------------------------------------------------------------
       * Class Definition
       * ------------------------------------------------------------------------
       */
Jacob Thornton's avatar
Jacob Thornton committed
239

Mark Otto's avatar
dist    
Mark Otto committed
240
    };
Jacob Thornton's avatar
Jacob Thornton committed
241

Mark Otto's avatar
dist    
Mark Otto committed
242
243
244
245
246
247
    var Alert =
    /*#__PURE__*/
    function () {
      function Alert(element) {
        this._element = element;
      } // Getters
Jacob Thornton's avatar
Jacob Thornton committed
248
249


Mark Otto's avatar
dist    
Mark Otto committed
250
      var _proto = Alert.prototype;
Jacob Thornton's avatar
Jacob Thornton committed
251

Mark Otto's avatar
dist    
Mark Otto committed
252
253
      // Public
      _proto.close = function close(element) {
Mark Otto's avatar
dist    
Mark Otto committed
254
        var rootElement = this._element;
Jacob Thornton's avatar
Jacob Thornton committed
255

Mark Otto's avatar
dist    
Mark Otto committed
256
257
258
        if (element) {
          rootElement = this._getRootElement(element);
        }
Mark Otto's avatar
dist    
Mark Otto committed
259

Mark Otto's avatar
dist    
Mark Otto committed
260
        var customEvent = this._triggerCloseEvent(rootElement);
Mark Otto's avatar
grunt    
Mark Otto committed
261

Mark Otto's avatar
dist    
Mark Otto committed
262
263
264
        if (customEvent.isDefaultPrevented()) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
265

Mark Otto's avatar
dist    
Mark Otto committed
266
267
        this._removeElement(rootElement);
      };
Jacob Thornton's avatar
Jacob Thornton committed
268

Mark Otto's avatar
dist    
Mark Otto committed
269
270
271
272
      _proto.dispose = function dispose() {
        $$$1.removeData(this._element, DATA_KEY);
        this._element = null;
      }; // Private
Mark Otto's avatar
grunt    
Mark Otto committed
273

Jacob Thornton's avatar
Jacob Thornton committed
274

Mark Otto's avatar
dist    
Mark Otto committed
275
276
277
      _proto._getRootElement = function _getRootElement(element) {
        var selector = Util.getSelectorFromElement(element);
        var parent = false;
Mark Otto's avatar
grunt    
Mark Otto committed
278

Mark Otto's avatar
dist    
Mark Otto committed
279
        if (selector) {
Mark Otto's avatar
dist    
Mark Otto committed
280
          parent = document.querySelector(selector);
Mark Otto's avatar
dist    
Mark Otto committed
281
        }
Mark Otto's avatar
grunt    
Mark Otto committed
282

Mark Otto's avatar
dist    
Mark Otto committed
283
284
285
        if (!parent) {
          parent = $$$1(element).closest("." + ClassName.ALERT)[0];
        }
Jacob Thornton's avatar
Jacob Thornton committed
286

Mark Otto's avatar
dist    
Mark Otto committed
287
288
        return parent;
      };
Jacob Thornton's avatar
Jacob Thornton committed
289

Mark Otto's avatar
dist    
Mark Otto committed
290
291
292
293
294
      _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
        var closeEvent = $$$1.Event(Event.CLOSE);
        $$$1(element).trigger(closeEvent);
        return closeEvent;
      };
Jacob Thornton's avatar
Jacob Thornton committed
295

Mark Otto's avatar
dist    
Mark Otto committed
296
297
      _proto._removeElement = function _removeElement(element) {
        var _this = this;
Mark Otto's avatar
grunt    
Mark Otto committed
298

Mark Otto's avatar
dist    
Mark Otto committed
299
        $$$1(element).removeClass(ClassName.SHOW);
Jacob Thornton's avatar
Jacob Thornton committed
300

Mark Otto's avatar
dist    
Mark Otto committed
301
302
        if (!$$$1(element).hasClass(ClassName.FADE)) {
          this._destroyElement(element);
Mark Otto's avatar
dist    
Mark Otto committed
303

Mark Otto's avatar
dist    
Mark Otto committed
304
305
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
306

Mark Otto's avatar
dist    
Mark Otto committed
307
308
309
310
311
        var transitionDuration = Util.getTransitionDurationFromElement(element);
        $$$1(element).one(Util.TRANSITION_END, function (event) {
          return _this._destroyElement(element, event);
        }).emulateTransitionEnd(transitionDuration);
      };
Jacob Thornton's avatar
Jacob Thornton committed
312

Mark Otto's avatar
dist    
Mark Otto committed
313
314
315
      _proto._destroyElement = function _destroyElement(element) {
        $$$1(element).detach().trigger(Event.CLOSED).remove();
      }; // Static
Jacob Thornton's avatar
Jacob Thornton committed
316
317


Mark Otto's avatar
dist    
Mark Otto committed
318
319
320
321
      Alert._jQueryInterface = function _jQueryInterface(config) {
        return this.each(function () {
          var $element = $$$1(this);
          var data = $element.data(DATA_KEY);
Jacob Thornton's avatar
Jacob Thornton committed
322

Mark Otto's avatar
dist    
Mark Otto committed
323
324
325
326
          if (!data) {
            data = new Alert(this);
            $element.data(DATA_KEY, data);
          }
Jacob Thornton's avatar
Jacob Thornton committed
327

Mark Otto's avatar
dist    
Mark Otto committed
328
329
330
331
332
          if (config === 'close') {
            data[config](this);
          }
        });
      };
Jacob Thornton's avatar
Jacob Thornton committed
333

Mark Otto's avatar
dist    
Mark Otto committed
334
335
336
337
338
      Alert._handleDismiss = function _handleDismiss(alertInstance) {
        return function (event) {
          if (event) {
            event.preventDefault();
          }
Jacob Thornton's avatar
Jacob Thornton committed
339

Mark Otto's avatar
dist    
Mark Otto committed
340
341
          alertInstance.close(this);
        };
Mark Otto's avatar
grunt    
Mark Otto committed
342
343
      };

Mark Otto's avatar
dist    
Mark Otto committed
344
345
346
347
348
349
      _createClass(Alert, null, [{
        key: "VERSION",
        get: function get() {
          return VERSION;
        }
      }]);
Jacob Thornton's avatar
Jacob Thornton committed
350

Mark Otto's avatar
dist    
Mark Otto committed
351
352
353
354
355
356
357
      return Alert;
    }();
    /**
     * ------------------------------------------------------------------------
     * Data Api implementation
     * ------------------------------------------------------------------------
     */
Jacob Thornton's avatar
Jacob Thornton committed
358
359


Mark Otto's avatar
dist    
Mark Otto committed
360
361
362
363
364
365
    $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
    /**
     * ------------------------------------------------------------------------
     * jQuery
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
366

Mark Otto's avatar
dist    
Mark Otto committed
367
368
    $$$1.fn[NAME] = Alert._jQueryInterface;
    $$$1.fn[NAME].Constructor = Alert;
Jacob Thornton's avatar
Jacob Thornton committed
369

Mark Otto's avatar
dist    
Mark Otto committed
370
371
372
373
    $$$1.fn[NAME].noConflict = function () {
      $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
      return Alert._jQueryInterface;
    };
Jacob Thornton's avatar
Jacob Thornton committed
374

Mark Otto's avatar
dist    
Mark Otto committed
375
376
    return Alert;
  }($);
Jacob Thornton's avatar
Jacob Thornton committed
377
378

  /**
Mark Otto's avatar
dist    
Mark Otto committed
379
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
380
   * Bootstrap (v4.1.3): button.js
Mark Otto's avatar
dist    
Mark Otto committed
381
382
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
383
   */
Mark Otto's avatar
dist    
Mark Otto committed
384
385

  var Button = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
386
387
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
388
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
389
390
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
391
    var NAME = 'button';
Mark Otto's avatar
Mark Otto committed
392
    var VERSION = '4.1.3';
Mark Otto's avatar
dist    
Mark Otto committed
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
    var DATA_KEY = 'bs.button';
    var EVENT_KEY = "." + DATA_KEY;
    var DATA_API_KEY = '.data-api';
    var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
    var ClassName = {
      ACTIVE: 'active',
      BUTTON: 'btn',
      FOCUS: 'focus'
    };
    var Selector = {
      DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
      DATA_TOGGLE: '[data-toggle="buttons"]',
      INPUT: 'input',
      ACTIVE: '.active',
      BUTTON: '.btn'
    };
    var Event = {
      CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
      FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
      /**
       * ------------------------------------------------------------------------
       * Class Definition
       * ------------------------------------------------------------------------
       */
Jacob Thornton's avatar
Jacob Thornton committed
417

Mark Otto's avatar
dist    
Mark Otto committed
418
    };
Jacob Thornton's avatar
Jacob Thornton committed
419

Mark Otto's avatar
dist    
Mark Otto committed
420
421
422
423
424
425
    var Button =
    /*#__PURE__*/
    function () {
      function Button(element) {
        this._element = element;
      } // Getters
Jacob Thornton's avatar
Jacob Thornton committed
426
427


Mark Otto's avatar
dist    
Mark Otto committed
428
      var _proto = Button.prototype;
Jacob Thornton's avatar
Jacob Thornton committed
429

Mark Otto's avatar
dist    
Mark Otto committed
430
431
432
433
434
      // Public
      _proto.toggle = function toggle() {
        var triggerChangeEvent = true;
        var addAriaPressed = true;
        var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
Jacob Thornton's avatar
Jacob Thornton committed
435

Mark Otto's avatar
dist    
Mark Otto committed
436
        if (rootElement) {
Mark Otto's avatar
dist    
Mark Otto committed
437
          var input = this._element.querySelector(Selector.INPUT);
Jacob Thornton's avatar
Jacob Thornton committed
438

Mark Otto's avatar
dist    
Mark Otto committed
439
440
          if (input) {
            if (input.type === 'radio') {
Mark Otto's avatar
dist    
Mark Otto committed
441
              if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
Mark Otto's avatar
dist    
Mark Otto committed
442
443
                triggerChangeEvent = false;
              } else {
Mark Otto's avatar
dist    
Mark Otto committed
444
                var activeElement = rootElement.querySelector(Selector.ACTIVE);
Jacob Thornton's avatar
Jacob Thornton committed
445

Mark Otto's avatar
dist    
Mark Otto committed
446
447
448
                if (activeElement) {
                  $$$1(activeElement).removeClass(ClassName.ACTIVE);
                }
Jacob Thornton's avatar
Jacob Thornton committed
449
450
451
              }
            }

Mark Otto's avatar
dist    
Mark Otto committed
452
453
454
455
456
            if (triggerChangeEvent) {
              if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
                return;
              }

Mark Otto's avatar
dist    
Mark Otto committed
457
              input.checked = !this._element.classList.contains(ClassName.ACTIVE);
Mark Otto's avatar
dist    
Mark Otto committed
458
              $$$1(input).trigger('change');
Johann-S's avatar
build    
Johann-S committed
459
            }
Mark Otto's avatar
dist    
Mark Otto committed
460

Mark Otto's avatar
dist    
Mark Otto committed
461
462
            input.focus();
            addAriaPressed = false;
Jacob Thornton's avatar
Jacob Thornton committed
463
          }
Mark Otto's avatar
dist    
Mark Otto committed
464
        }
Jacob Thornton's avatar
Jacob Thornton committed
465

Mark Otto's avatar
dist    
Mark Otto committed
466
        if (addAriaPressed) {
Mark Otto's avatar
dist    
Mark Otto committed
467
          this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
Jacob Thornton's avatar
Jacob Thornton committed
468
        }
Mark Otto's avatar
grunt    
Mark Otto committed
469

Mark Otto's avatar
dist    
Mark Otto committed
470
471
472
473
        if (triggerChangeEvent) {
          $$$1(this._element).toggleClass(ClassName.ACTIVE);
        }
      };
Mark Otto's avatar
grunt    
Mark Otto committed
474

Mark Otto's avatar
dist    
Mark Otto committed
475
476
477
478
      _proto.dispose = function dispose() {
        $$$1.removeData(this._element, DATA_KEY);
        this._element = null;
      }; // Static
Jacob Thornton's avatar
Jacob Thornton committed
479
480


Mark Otto's avatar
dist    
Mark Otto committed
481
482
483
      Button._jQueryInterface = function _jQueryInterface(config) {
        return this.each(function () {
          var data = $$$1(this).data(DATA_KEY);
Jacob Thornton's avatar
Jacob Thornton committed
484

Mark Otto's avatar
dist    
Mark Otto committed
485
486
487
488
          if (!data) {
            data = new Button(this);
            $$$1(this).data(DATA_KEY, data);
          }
Jacob Thornton's avatar
Jacob Thornton committed
489

Mark Otto's avatar
dist    
Mark Otto committed
490
491
492
493
494
          if (config === 'toggle') {
            data[config]();
          }
        });
      };
Mark Otto's avatar
grunt    
Mark Otto committed
495

Mark Otto's avatar
dist    
Mark Otto committed
496
497
498
499
      _createClass(Button, null, [{
        key: "VERSION",
        get: function get() {
          return VERSION;
Mark Otto's avatar
grunt    
Mark Otto committed
500
        }
Mark Otto's avatar
dist    
Mark Otto committed
501
      }]);
Jacob Thornton's avatar
Jacob Thornton committed
502

Mark Otto's avatar
dist    
Mark Otto committed
503
504
505
506
507
508
509
      return Button;
    }();
    /**
     * ------------------------------------------------------------------------
     * Data Api implementation
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
510

Jacob Thornton's avatar
Jacob Thornton committed
511

Mark Otto's avatar
dist    
Mark Otto committed
512
513
514
    $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
      event.preventDefault();
      var button = event.target;
Jacob Thornton's avatar
Jacob Thornton committed
515

Mark Otto's avatar
dist    
Mark Otto committed
516
517
518
      if (!$$$1(button).hasClass(ClassName.BUTTON)) {
        button = $$$1(button).closest(Selector.BUTTON);
      }
Jacob Thornton's avatar
Jacob Thornton committed
519

Mark Otto's avatar
dist    
Mark Otto committed
520
521
522
523
524
525
526
527
528
529
      Button._jQueryInterface.call($$$1(button), 'toggle');
    }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
      var button = $$$1(event.target).closest(Selector.BUTTON)[0];
      $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
    });
    /**
     * ------------------------------------------------------------------------
     * jQuery
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
530

Mark Otto's avatar
dist    
Mark Otto committed
531
532
    $$$1.fn[NAME] = Button._jQueryInterface;
    $$$1.fn[NAME].Constructor = Button;
Jacob Thornton's avatar
Jacob Thornton committed
533

Mark Otto's avatar
dist    
Mark Otto committed
534
535
536
537
    $$$1.fn[NAME].noConflict = function () {
      $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
      return Button._jQueryInterface;
    };
Jacob Thornton's avatar
Jacob Thornton committed
538

Mark Otto's avatar
dist    
Mark Otto committed
539
540
    return Button;
  }($);
Jacob Thornton's avatar
Jacob Thornton committed
541
542

  /**
Mark Otto's avatar
dist    
Mark Otto committed
543
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
544
   * Bootstrap (v4.1.3): carousel.js
Mark Otto's avatar
dist    
Mark Otto committed
545
546
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
547
   */
Mark Otto's avatar
dist    
Mark Otto committed
548
549

  var Carousel = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
550
551
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
552
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
553
554
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
555
    var NAME = 'carousel';
Mark Otto's avatar
Mark Otto committed
556
    var VERSION = '4.1.3';
Mark Otto's avatar
dist    
Mark Otto committed
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
    var DATA_KEY = 'bs.carousel';
    var EVENT_KEY = "." + DATA_KEY;
    var DATA_API_KEY = '.data-api';
    var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
    var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key

    var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key

    var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch

    var Default = {
      interval: 5000,
      keyboard: true,
      slide: false,
      pause: 'hover',
      wrap: true
    };
    var DefaultType = {
      interval: '(number|boolean)',
      keyboard: 'boolean',
      slide: '(boolean|string)',
      pause: '(string|boolean)',
      wrap: 'boolean'
    };
    var Direction = {
      NEXT: 'next',
      PREV: 'prev',
      LEFT: 'left',
      RIGHT: 'right'
    };
    var Event = {
      SLIDE: "slide" + EVENT_KEY,
      SLID: "slid" + EVENT_KEY,
      KEYDOWN: "keydown" + EVENT_KEY,
      MOUSEENTER: "mouseenter" + EVENT_KEY,
      MOUSELEAVE: "mouseleave" + EVENT_KEY,
      TOUCHEND: "touchend" + EVENT_KEY,
      LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
      CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
    };
    var ClassName = {
      CAROUSEL: 'carousel',
      ACTIVE: 'active',
      SLIDE: 'slide',
      RIGHT: 'carousel-item-right',
      LEFT: 'carousel-item-left',
      NEXT: 'carousel-item-next',
      PREV: 'carousel-item-prev',
      ITEM: 'carousel-item'
    };
    var Selector = {
      ACTIVE: '.active',
      ACTIVE_ITEM: '.active.carousel-item',
      ITEM: '.carousel-item',
      NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
      INDICATORS: '.carousel-indicators',
      DATA_SLIDE: '[data-slide], [data-slide-to]',
      DATA_RIDE: '[data-ride="carousel"]'
      /**
       * ------------------------------------------------------------------------
       * Class Definition
       * ------------------------------------------------------------------------
       */
Jacob Thornton's avatar
Jacob Thornton committed
620

Mark Otto's avatar
grunt    
Mark Otto committed
621
622
    };

Mark Otto's avatar
dist    
Mark Otto committed
623
624
625
626
627
628
629
630
631
632
633
634
    var Carousel =
    /*#__PURE__*/
    function () {
      function Carousel(element, config) {
        this._items = null;
        this._interval = null;
        this._activeElement = null;
        this._isPaused = false;
        this._isSliding = false;
        this.touchTimeout = null;
        this._config = this._getConfig(config);
        this._element = $$$1(element)[0];
Mark Otto's avatar
dist    
Mark Otto committed
635
        this._indicatorsElement = this._element.querySelector(Selector.INDICATORS);
Mark Otto's avatar
grunt    
Mark Otto committed
636

Mark Otto's avatar
dist    
Mark Otto committed
637
638
        this._addEventListeners();
      } // Getters
Jacob Thornton's avatar
Jacob Thornton committed
639

Mark Otto's avatar
grunt    
Mark Otto committed
640

Mark Otto's avatar
dist    
Mark Otto committed
641
      var _proto = Carousel.prototype;
Mark Otto's avatar
grunt    
Mark Otto committed
642

Mark Otto's avatar
dist    
Mark Otto committed
643
644
645
646
647
648
      // Public
      _proto.next = function next() {
        if (!this._isSliding) {
          this._slide(Direction.NEXT);
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
649

Mark Otto's avatar
dist    
Mark Otto committed
650
651
652
653
654
655
656
      _proto.nextWhenVisible = function nextWhenVisible() {
        // Don't call next when the page isn't visible
        // or the carousel or its parent isn't visible
        if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
          this.next();
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
657

Mark Otto's avatar
dist    
Mark Otto committed
658
659
660
661
662
      _proto.prev = function prev() {
        if (!this._isSliding) {
          this._slide(Direction.PREV);
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
663

Mark Otto's avatar
dist    
Mark Otto committed
664
665
666
667
      _proto.pause = function pause(event) {
        if (!event) {
          this._isPaused = true;
        }
Mark Otto's avatar
grunt    
Mark Otto committed
668

Mark Otto's avatar
dist    
Mark Otto committed
669
        if (this._element.querySelector(Selector.NEXT_PREV)) {
Mark Otto's avatar
dist    
Mark Otto committed
670
671
672
          Util.triggerTransitionEnd(this._element);
          this.cycle(true);
        }
Mark Otto's avatar
grunt    
Mark Otto committed
673

Mark Otto's avatar
dist    
Mark Otto committed
674
675
676
        clearInterval(this._interval);
        this._interval = null;
      };
Mark Otto's avatar
grunt    
Mark Otto committed
677

Mark Otto's avatar
dist    
Mark Otto committed
678
679
680
681
      _proto.cycle = function cycle(event) {
        if (!event) {
          this._isPaused = false;
        }
Jacob Thornton's avatar
Jacob Thornton committed
682

Mark Otto's avatar
dist    
Mark Otto committed
683
684
685
686
        if (this._interval) {
          clearInterval(this._interval);
          this._interval = null;
        }
Jacob Thornton's avatar
Jacob Thornton committed
687

Mark Otto's avatar
dist    
Mark Otto committed
688
689
690
691
        if (this._config.interval && !this._isPaused) {
          this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
692

Mark Otto's avatar
dist    
Mark Otto committed
693
694
      _proto.to = function to(index) {
        var _this = this;
Jacob Thornton's avatar
Jacob Thornton committed
695

Mark Otto's avatar
dist    
Mark Otto committed
696
        this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
Jacob Thornton's avatar
Jacob Thornton committed
697

Mark Otto's avatar
dist    
Mark Otto committed
698
        var activeIndex = this._getItemIndex(this._activeElement);
Jacob Thornton's avatar
Jacob Thornton committed
699

Mark Otto's avatar
dist    
Mark Otto committed
700
701
702
        if (index > this._items.length - 1 || index < 0) {
          return;
        }
Mark Otto's avatar
dist    
Mark Otto committed
703

Mark Otto's avatar
dist    
Mark Otto committed
704
705
706
707
708
709
        if (this._isSliding) {
          $$$1(this._element).one(Event.SLID, function () {
            return _this.to(index);
          });
          return;
        }
Mark Otto's avatar
dist    
Mark Otto committed
710

Mark Otto's avatar
dist    
Mark Otto committed
711
712
713
714
715
        if (activeIndex === index) {
          this.pause();
          this.cycle();
          return;
        }
Mark Otto's avatar
dist    
Mark Otto committed
716

Mark Otto's avatar
dist    
Mark Otto committed
717
        var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
Mark Otto's avatar
dist    
Mark Otto committed
718

Mark Otto's avatar
dist    
Mark Otto committed
719
720
        this._slide(direction, this._items[index]);
      };
Mark Otto's avatar
dist    
Mark Otto committed
721

Mark Otto's avatar
dist    
Mark Otto committed
722
723
724
725
726
727
728
729
730
731
732
733
      _proto.dispose = function dispose() {
        $$$1(this._element).off(EVENT_KEY);
        $$$1.removeData(this._element, DATA_KEY);
        this._items = null;
        this._config = null;
        this._element = null;
        this._interval = null;
        this._isPaused = null;
        this._isSliding = null;
        this._activeElement = null;
        this._indicatorsElement = null;
      }; // Private
Mark Otto's avatar
grunt    
Mark Otto committed
734

Jacob Thornton's avatar
Jacob Thornton committed
735

Mark Otto's avatar
dist    
Mark Otto committed
736
737
738
739
740
      _proto._getConfig = function _getConfig(config) {
        config = _objectSpread({}, Default, config);
        Util.typeCheckConfig(NAME, config, DefaultType);
        return config;
      };
Mark Otto's avatar
dist    
Mark Otto committed
741

Mark Otto's avatar
dist    
Mark Otto committed
742
743
      _proto._addEventListeners = function _addEventListeners() {
        var _this2 = this;
Mark Otto's avatar
dist    
Mark Otto committed
744

Mark Otto's avatar
dist    
Mark Otto committed
745
746
747
        if (this._config.keyboard) {
          $$$1(this._element).on(Event.KEYDOWN, function (event) {
            return _this2._keydown(event);
Mark Otto's avatar
build    
Mark Otto committed
748
749
          });
        }
Mark Otto's avatar
grunt    
Mark Otto committed
750

Mark Otto's avatar
dist    
Mark Otto committed
751
752
753
754
755
756
        if (this._config.pause === 'hover') {
          $$$1(this._element).on(Event.MOUSEENTER, function (event) {
            return _this2.pause(event);
          }).on(Event.MOUSELEAVE, function (event) {
            return _this2.cycle(event);
          });
Mark Otto's avatar
dist    
Mark Otto committed
757

Mark Otto's avatar
dist    
Mark Otto committed
758
759
760
761
762
763
764
765
766
767
768
769
770
771
          if ('ontouchstart' in document.documentElement) {
            // If it's a touch-enabled device, mouseenter/leave are fired as
            // part of the mouse compatibility events on first tap - the carousel
            // would stop cycling until user tapped out of it;
            // here, we listen for touchend, explicitly pause the carousel
            // (as if it's the second time we tap on it, mouseenter compat event
            // is NOT fired) and after a timeout (to allow for mouse compatibility
            // events to fire) we explicitly restart cycling
            $$$1(this._element).on(Event.TOUCHEND, function () {
              _this2.pause();

              if (_this2.touchTimeout) {
                clearTimeout(_this2.touchTimeout);
              }
Mark Otto's avatar
dist    
Mark Otto committed
772

Mark Otto's avatar
dist    
Mark Otto committed
773
774
775
776
777
778
779
              _this2.touchTimeout = setTimeout(function (event) {
                return _this2.cycle(event);
              }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
            });
          }
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
780

Mark Otto's avatar
dist    
Mark Otto committed
781
782
783
784
      _proto._keydown = function _keydown(event) {
        if (/input|textarea/i.test(event.target.tagName)) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
785

Mark Otto's avatar
dist    
Mark Otto committed
786
787
788
789
790
        switch (event.which) {
          case ARROW_LEFT_KEYCODE:
            event.preventDefault();
            this.prev();
            break;
Mark Otto's avatar
dist    
Mark Otto committed
791

Mark Otto's avatar
dist    
Mark Otto committed
792
793
794
795
          case ARROW_RIGHT_KEYCODE:
            event.preventDefault();
            this.next();
            break;
Mark Otto's avatar
dist    
Mark Otto committed
796

Mark Otto's avatar
dist    
Mark Otto committed
797
798
799
          default:
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
800

Mark Otto's avatar
dist    
Mark Otto committed
801
      _proto._getItemIndex = function _getItemIndex(element) {
Mark Otto's avatar
dist    
Mark Otto committed
802
        this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : [];
Mark Otto's avatar
dist    
Mark Otto committed
803
804
        return this._items.indexOf(element);
      };
Jacob Thornton's avatar
Jacob Thornton committed
805

Mark Otto's avatar
dist    
Mark Otto committed
806
807
808
      _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
        var isNextDirection = direction === Direction.NEXT;
        var isPrevDirection = direction === Direction.PREV;
Jacob Thornton's avatar
Jacob Thornton committed
809

Mark Otto's avatar
dist    
Mark Otto committed
810
        var activeIndex = this._getItemIndex(activeElement);
Mark Otto's avatar
dist    
Mark Otto committed
811

Mark Otto's avatar
dist    
Mark Otto committed
812
813
        var lastItemIndex = this._items.length - 1;
        var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
Mark Otto's avatar
dist    
Mark Otto committed
814

Mark Otto's avatar
dist    
Mark Otto committed
815
816
817
        if (isGoingToWrap && !this._config.wrap) {
          return activeElement;
        }
Jacob Thornton's avatar
Jacob Thornton committed
818

Mark Otto's avatar
dist    
Mark Otto committed
819
820
821
822
        var delta = direction === Direction.PREV ? -1 : 1;
        var itemIndex = (activeIndex + delta) % this._items.length;
        return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
      };
Jacob Thornton's avatar
Jacob Thornton committed
823

Mark Otto's avatar
dist    
Mark Otto committed
824
825
      _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
        var targetIndex = this._getItemIndex(relatedTarget);
Jacob Thornton's avatar
Jacob Thornton committed
826

Mark Otto's avatar
dist    
Mark Otto committed
827
        var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
Jacob Thornton's avatar
Jacob Thornton committed
828

Mark Otto's avatar
dist    
Mark Otto committed
829
830
831
832
833
834
835
836
837
        var slideEvent = $$$1.Event(Event.SLIDE, {
          relatedTarget: relatedTarget,
          direction: eventDirectionName,
          from: fromIndex,
          to: targetIndex
        });
        $$$1(this._element).trigger(slideEvent);
        return slideEvent;
      };
Jacob Thornton's avatar
Jacob Thornton committed
838

Mark Otto's avatar
dist    
Mark Otto committed
839
840
      _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
        if (this._indicatorsElement) {
Mark Otto's avatar
dist    
Mark Otto committed
841
842
          var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
          $$$1(indicators).removeClass(ClassName.ACTIVE);
Mark Otto's avatar
dist    
Mark Otto committed
843

Mark Otto's avatar
dist    
Mark Otto committed
844
          var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
Mark Otto's avatar
dist    
Mark Otto committed
845

Mark Otto's avatar
dist    
Mark Otto committed
846
847
848
849
850
          if (nextIndicator) {
            $$$1(nextIndicator).addClass(ClassName.ACTIVE);
          }
        }
      };
Mark Otto's avatar
dist    
Mark Otto committed
851

Mark Otto's avatar
dist    
Mark Otto committed
852
853
      _proto._slide = function _slide(direction, element) {
        var _this3 = this;
Jacob Thornton's avatar
Jacob Thornton committed
854

Mark Otto's avatar
dist    
Mark Otto committed
855
        var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
Mark Otto's avatar
grunt    
Mark Otto committed
856

Mark Otto's avatar
dist    
Mark Otto committed
857
        var activeElementIndex = this._getItemIndex(activeElement);
Mark Otto's avatar
grunt    
Mark Otto committed
858

Mark Otto's avatar
dist    
Mark Otto committed
859
        var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
Jacob Thornton's avatar
Jacob Thornton committed
860

Mark Otto's avatar
dist    
Mark Otto committed
861
        var nextElementIndex = this._getItemIndex(nextElement);
Mark Otto's avatar
dist    
Mark Otto committed
862

Mark Otto's avatar
dist    
Mark Otto committed
863
864
865
866
        var isCycling = Boolean(this._interval);
        var directionalClassName;
        var orderClassName;
        var eventDirectionName;
Jacob Thornton's avatar
Jacob Thornton committed
867

Mark Otto's avatar
dist    
Mark Otto committed
868
869
870
871
872
873
874
875
876
        if (direction === Direction.NEXT) {
          directionalClassName = ClassName.LEFT;
          orderClassName = ClassName.NEXT;
          eventDirectionName = Direction.LEFT;
        } else {
          directionalClassName = ClassName.RIGHT;
          orderClassName = ClassName.PREV;
          eventDirectionName = Direction.RIGHT;
        }
Jacob Thornton's avatar
Jacob Thornton committed
877

Mark Otto's avatar
dist    
Mark Otto committed
878
879
880
881
        if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
          this._isSliding = false;
          return;
        }
Mark Otto's avatar
grunt    
Mark Otto committed
882

Mark Otto's avatar
dist    
Mark Otto committed
883
        var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
Jacob Thornton's avatar
Jacob Thornton committed
884

Mark Otto's avatar
dist    
Mark Otto committed
885
886
887
        if (slideEvent.isDefaultPrevented()) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
888

Mark Otto's avatar
dist    
Mark Otto committed
889
890
891
892
        if (!activeElement || !nextElement) {
          // Some weirdness is happening, so we bail
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
893

Mark Otto's avatar
dist    
Mark Otto committed
894
        this._isSliding = true;
Jacob Thornton's avatar
Jacob Thornton committed
895

Mark Otto's avatar
dist    
Mark Otto committed
896
897
898
        if (isCycling) {
          this.pause();
        }
Jacob Thornton's avatar
Jacob Thornton committed
899

Mark Otto's avatar
dist    
Mark Otto committed
900
        this._setActiveIndicatorElement(nextElement);
Jacob Thornton's avatar
Jacob Thornton committed
901

Mark Otto's avatar
dist    
Mark Otto committed
902
903
904
905
906
907
        var slidEvent = $$$1.Event(Event.SLID, {
          relatedTarget: nextElement,
          direction: eventDirectionName,
          from: activeElementIndex,
          to: nextElementIndex
        });
Mark Otto's avatar
dist    
Mark Otto committed
908

Mark Otto's avatar
dist    
Mark Otto committed
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
        if ($$$1(this._element).hasClass(ClassName.SLIDE)) {
          $$$1(nextElement).addClass(orderClassName);
          Util.reflow(nextElement);
          $$$1(activeElement).addClass(directionalClassName);
          $$$1(nextElement).addClass(directionalClassName);
          var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
          $$$1(activeElement).one(Util.TRANSITION_END, function () {
            $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
            $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
            _this3._isSliding = false;
            setTimeout(function () {
              return $$$1(_this3._element).trigger(slidEvent);
            }, 0);
          }).emulateTransitionEnd(transitionDuration);
        } else {
          $$$1(activeElement).removeClass(ClassName.ACTIVE);
          $$$1(nextElement).addClass(ClassName.ACTIVE);
          this._isSliding = false;
          $$$1(this._element).trigger(slidEvent);
        }
Jacob Thornton's avatar
Jacob Thornton committed
929

Mark Otto's avatar
dist    
Mark Otto committed
930
931
        if (isCycling) {
          this.cycle();
Mark Otto's avatar
grunt    
Mark Otto committed
932
        }
Mark Otto's avatar
dist    
Mark Otto committed
933
      }; // Static
Jacob Thornton's avatar
Jacob Thornton committed
934
935


Mark Otto's avatar
dist    
Mark Otto committed
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
      Carousel._jQueryInterface = function _jQueryInterface(config) {
        return this.each(function () {
          var data = $$$1(this).data(DATA_KEY);

          var _config = _objectSpread({}, Default, $$$1(this).data());

          if (typeof config === 'object') {
            _config = _objectSpread({}, _config, config);
          }

          var action = typeof config === 'string' ? config : _config.slide;

          if (!data) {
            data = new Carousel(this, _config);
            $$$1(this).data(DATA_KEY, data);
          }
Jacob Thornton's avatar
Jacob Thornton committed
952

Mark Otto's avatar
dist    
Mark Otto committed
953
954
955
956
957
958
959
960
961
962
963
          if (typeof config === 'number') {
            data.to(config);
          } else if (typeof action === 'string') {
            if (typeof data[action] === 'undefined') {
              throw new TypeError("No method named \"" + action + "\"");
            }

            data[action]();
          } else if (_config.interval) {
            data.pause();
            data.cycle();
Mark Otto's avatar
grunt    
Mark Otto committed
964
          }
Mark Otto's avatar
dist    
Mark Otto committed
965
966
        });
      };
Mark Otto's avatar
dist    
Mark Otto committed
967

Mark Otto's avatar
dist    
Mark Otto committed
968
969
970
971
972
      Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
        var selector = Util.getSelectorFromElement(this);

        if (!selector) {
          return;
Jacob Thornton's avatar
Jacob Thornton committed
973
974
        }

Mark Otto's avatar
dist    
Mark Otto committed
975
        var target = $$$1(selector)[0];
Jacob Thornton's avatar
Jacob Thornton committed
976

Mark Otto's avatar
dist    
Mark Otto committed
977
978
979
        if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
980

Mark Otto's avatar
dist    
Mark Otto committed
981
        var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data());
Jacob Thornton's avatar
Jacob Thornton committed
982

Mark Otto's avatar
dist    
Mark Otto committed
983
        var slideIndex = this.getAttribute('data-slide-to');
Jacob Thornton's avatar
Jacob Thornton committed
984

Mark Otto's avatar
dist    
Mark Otto committed
985
986
987
        if (slideIndex) {
          config.interval = false;
        }
Jacob Thornton's avatar
Jacob Thornton committed
988

Mark Otto's avatar
dist    
Mark Otto committed
989
        Carousel._jQueryInterface.call($$$1(target), config);
Jacob Thornton's avatar
Jacob Thornton committed
990

Mark Otto's avatar
dist    
Mark Otto committed
991
992
993
        if (slideIndex) {
          $$$1(target).data(DATA_KEY).to(slideIndex);
        }
Mark Otto's avatar
grunt    
Mark Otto committed
994

Mark Otto's avatar
dist    
Mark Otto committed
995
996
        event.preventDefault();
      };
Mark Otto's avatar
grunt    
Mark Otto committed
997

Mark Otto's avatar
dist    
Mark Otto committed
998
999
1000
      _createClass(Carousel, null, [{
        key: "VERSION",
        get: function get() {
For faster browsing, not all history is shown. View entire blame