bootstrap.js 120 KB
Newer Older
1
/*!
Mark Otto's avatar
Mark Otto committed
2
  * Bootstrap v4.0.0 (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
dist    
Mark Otto committed
73
74
   * Bootstrap (v4.0.0): util.js
   * 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
150
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
195
      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 {
          var $selector = $$$1(document).find(selector);
          return $selector.length > 0 ? selector : null;
        } 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
196
          }
Jacob Thornton's avatar
Jacob Thornton committed
197
198
        }
      }
Mark Otto's avatar
dist    
Mark Otto committed
199
200
201
202
203
    };
    setTransitionEndSupport();
    return Util;
  }($);

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

  var Alert = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
212
213
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
214
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
215
216
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    var NAME = 'alert';
    var VERSION = '4.0.0';
    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
240

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

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


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

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

Mark Otto's avatar
dist    
Mark Otto committed
257
        var rootElement = this._getRootElement(element);
Mark Otto's avatar
dist    
Mark Otto committed
258

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

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

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

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

Jacob Thornton's avatar
Jacob Thornton committed
273

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

Mark Otto's avatar
dist    
Mark Otto committed
278
279
280
        if (selector) {
          parent = $$$1(selector)[0];
        }
Mark Otto's avatar
grunt    
Mark Otto committed
281

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

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

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

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

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
306
307
308
309
310
        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
311

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


Mark Otto's avatar
dist    
Mark Otto committed
317
318
319
320
      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
321

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

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

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

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

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

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


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

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

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

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

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

  var Button = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
385
386
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
387
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
388
389
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
    var NAME = 'button';
    var VERSION = '4.0.0';
    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
416

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

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


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

Mark Otto's avatar
dist    
Mark Otto committed
429
430
431
432
433
      // 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
434

Mark Otto's avatar
dist    
Mark Otto committed
435
436
        if (rootElement) {
          var input = $$$1(this._element).find(Selector.INPUT)[0];
Jacob Thornton's avatar
Jacob Thornton committed
437

Mark Otto's avatar
dist    
Mark Otto committed
438
439
440
441
442
443
          if (input) {
            if (input.type === 'radio') {
              if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) {
                triggerChangeEvent = false;
              } else {
                var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0];
Jacob Thornton's avatar
Jacob Thornton committed
444

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

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

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

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

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

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

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


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

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

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

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

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

Jacob Thornton's avatar
Jacob Thornton committed
510

Mark Otto's avatar
dist    
Mark Otto committed
511
512
513
    $$$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
514

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

Mark Otto's avatar
dist    
Mark Otto committed
519
520
521
522
523
524
525
526
527
528
      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
529

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

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

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

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

  var Carousel = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
549
550
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
551
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
552
553
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
554
555
556
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
    var NAME = 'carousel';
    var VERSION = '4.0.0';
    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
619

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

Mark Otto's avatar
dist    
Mark Otto committed
622
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];
        this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0];
Mark Otto's avatar
grunt    
Mark Otto committed
635

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

Mark Otto's avatar
grunt    
Mark Otto committed
639

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

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

Mark Otto's avatar
dist    
Mark Otto committed
649
650
651
652
653
654
655
      _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
656

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

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

Mark Otto's avatar
dist    
Mark Otto committed
668
669
670
671
        if ($$$1(this._element).find(Selector.NEXT_PREV)[0]) {
          Util.triggerTransitionEnd(this._element);
          this.cycle(true);
        }
Mark Otto's avatar
grunt    
Mark Otto committed
672

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
687
688
689
690
        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
691

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

Mark Otto's avatar
dist    
Mark Otto committed
695
        this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
Jacob Thornton's avatar
Jacob Thornton committed
696

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

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

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

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
721
722
723
724
725
726
727
728
729
730
731
732
      _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
733

Jacob Thornton's avatar
Jacob Thornton committed
734

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
750
751
752
753
754
755
        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
756

Mark Otto's avatar
dist    
Mark Otto committed
757
758
759
760
761
762
763
764
765
766
767
768
769
770
          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
771

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

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

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
800
801
802
803
      _proto._getItemIndex = function _getItemIndex(element) {
        this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM));
        return this._items.indexOf(element);
      };
Jacob Thornton's avatar
Jacob Thornton committed
804

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

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
818
819
820
821
        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
822

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

Mark Otto's avatar
dist    
Mark Otto committed
826
        var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]);
Jacob Thornton's avatar
Jacob Thornton committed
827

Mark Otto's avatar
dist    
Mark Otto committed
828
829
830
831
832
833
834
835
836
        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
837

Mark Otto's avatar
dist    
Mark Otto committed
838
839
840
      _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
        if (this._indicatorsElement) {
          $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
Mark Otto's avatar
dist    
Mark Otto committed
841

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
853
        var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
Mark Otto's avatar
grunt    
Mark Otto committed
854

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

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
866
867
868
869
870
871
872
873
874
        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
875

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

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
892
        this._isSliding = true;
Jacob Thornton's avatar
Jacob Thornton committed
893

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

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

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

Mark Otto's avatar
dist    
Mark Otto committed
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
        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
927

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


Mark Otto's avatar
dist    
Mark Otto committed
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
      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
950

Mark Otto's avatar
dist    
Mark Otto committed
951
952
953
954
955
956
957
958
959
960
961
          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
962
          }
Mark Otto's avatar
dist    
Mark Otto committed
963
964
        });
      };
Mark Otto's avatar
dist    
Mark Otto committed
965

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

        if (!selector) {
          return;
Jacob Thornton's avatar
Jacob Thornton committed
971
972
        }

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

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

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

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

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

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

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

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

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