bootstrap 4.0.0.alpha4 → 4.0.0.alpha5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/assets/javascripts/bootstrap.js +1625 -1768
  4. data/assets/javascripts/bootstrap.min.js +3 -3
  5. data/assets/javascripts/bootstrap/alert.js +83 -96
  6. data/assets/javascripts/bootstrap/button.js +61 -68
  7. data/assets/javascripts/bootstrap/carousel.js +250 -270
  8. data/assets/javascripts/bootstrap/collapse.js +176 -190
  9. data/assets/javascripts/bootstrap/dropdown.js +143 -155
  10. data/assets/javascripts/bootstrap/modal.js +286 -310
  11. data/assets/javascripts/bootstrap/popover.js +61 -69
  12. data/assets/javascripts/bootstrap/scrollspy.js +145 -157
  13. data/assets/javascripts/bootstrap/tab.js +122 -132
  14. data/assets/javascripts/bootstrap/tooltip.js +313 -341
  15. data/assets/javascripts/bootstrap/util.js +9 -16
  16. data/assets/stylesheets/_bootstrap.scss +1 -1
  17. data/assets/stylesheets/bootstrap/_alert.scss +3 -3
  18. data/assets/stylesheets/bootstrap/_animation.scss +12 -3
  19. data/assets/stylesheets/bootstrap/_button-group.scss +1 -0
  20. data/assets/stylesheets/bootstrap/_card.scss +3 -1
  21. data/assets/stylesheets/bootstrap/_custom-forms.scss +7 -10
  22. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  23. data/assets/stylesheets/bootstrap/_forms.scss +16 -6
  24. data/assets/stylesheets/bootstrap/_images.scss +2 -11
  25. data/assets/stylesheets/bootstrap/_list-group.scss +2 -0
  26. data/assets/stylesheets/bootstrap/_mixins.scss +1 -1
  27. data/assets/stylesheets/bootstrap/_modal.scss +4 -2
  28. data/assets/stylesheets/bootstrap/_navbar.scss +72 -13
  29. data/assets/stylesheets/bootstrap/_normalize.scss +51 -53
  30. data/assets/stylesheets/bootstrap/_popover.scss +74 -50
  31. data/assets/stylesheets/bootstrap/_print.scss +8 -2
  32. data/assets/stylesheets/bootstrap/_reboot.scss +7 -12
  33. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  34. data/assets/stylesheets/bootstrap/_tooltip.scss +15 -12
  35. data/assets/stylesheets/bootstrap/_utilities.scss +3 -1
  36. data/assets/stylesheets/bootstrap/_variables.scss +56 -28
  37. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -1
  38. data/assets/stylesheets/bootstrap/mixins/{_pulls.scss → _float.scss} +2 -2
  39. data/assets/stylesheets/bootstrap/mixins/_forms.scss +6 -11
  40. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +8 -9
  41. data/assets/stylesheets/bootstrap/mixins/_grid.scss +31 -8
  42. data/assets/stylesheets/bootstrap/mixins/_hover.scss +1 -1
  43. data/assets/stylesheets/bootstrap/mixins/_image.scss +6 -4
  44. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -1
  45. data/assets/stylesheets/bootstrap/utilities/_align.scss +6 -0
  46. data/assets/stylesheets/bootstrap/utilities/_borders.scss +30 -0
  47. data/assets/stylesheets/bootstrap/utilities/_float.scss +13 -0
  48. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +10 -9
  49. data/assets/stylesheets/bootstrap/utilities/_text.scss +8 -0
  50. data/lib/bootstrap/version.rb +2 -2
  51. data/templates/project/_bootstrap-variables.scss +55 -27
  52. metadata +6 -4
  53. data/assets/stylesheets/bootstrap/utilities/_pulls.scss +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ebc7c020c24c4194d057285c43e23b17b1dabfcc
4
- data.tar.gz: b1bf608de3fd2898bdffc30d06a800a8bf0d63a2
3
+ metadata.gz: 76a5c21070ce1f021c48f79bb00615ef40c529d4
4
+ data.tar.gz: 9089af86caface1b5d49b36450a2c3f036f9e0f2
5
5
  SHA512:
6
- metadata.gz: 9a8f4881bc4f8738da50b1906f6dd52d35bbf1143469240b7b3ec551db9185c186353a599eb68d99ef9da56a13324fa1fbee1cb0139ce3618ff0009950ea983f
7
- data.tar.gz: 18025b6ccafd3757ad96c12aab689387fc31970dffeb19c40e7dae94458c622175e9125b4f91dff3646145730bd1644d11f14fd4741885094bb6e0defe119feb
6
+ metadata.gz: bb521a0b80641656aaf57005970087173826fb48a25065cce26456487354a46b40d4403e2ceec21f9b1f94f3899b707d5a4bf5f2a390ee658a837495c36fcda2
7
+ data.tar.gz: 040e314028beedb18531318b64cdebab07c21176a997fe43eafcdc6a3f1a7af25c6dba4758009a617e4b2d32a946ec95f1cf378072b814559fdcbefa56164636
data/README.md CHANGED
@@ -17,7 +17,7 @@ Please see the appropriate guide for your environment of choice:
17
17
  Add `bootstrap` to your Gemfile:
18
18
 
19
19
  ```ruby
20
- gem 'bootstrap', '~> 4.0.0.alpha4'
20
+ gem 'bootstrap', '~> 4.0.0.alpha5'
21
21
  ```
22
22
 
23
23
  Ensure that `sprockets-rails` is at least v2.3.2.
@@ -78,7 +78,7 @@ Then, run `bundle`, restart the server, and require tether before bootstrap but
78
78
  Install the gem:
79
79
 
80
80
  ```console
81
- $ gem install bootstrap -v 4.0.0.alpha4
81
+ $ gem install bootstrap -v 4.0.0.alpha5
82
82
  ```
83
83
 
84
84
  **If you have an existing Compass project:**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com)
2
+ * Bootstrap v4.0.0-alpha.5 (https://getbootstrap.com)
3
3
  * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
5
  */
@@ -16,26 +16,26 @@ if (typeof jQuery === 'undefined') {
16
16
  }(jQuery);
17
17
 
18
18
 
19
- +function ($) {
19
+ +function () {
20
20
 
21
- /**
22
- * --------------------------------------------------------------------------
23
- * Bootstrap (v4.0.0-alpha.4): util.js
24
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25
- * --------------------------------------------------------------------------
26
- */
21
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
27
22
 
28
- 'use strict';
23
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
29
24
 
30
- var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
25
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
31
26
 
32
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
27
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
33
28
 
34
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
29
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
30
 
36
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
31
+ /**
32
+ * --------------------------------------------------------------------------
33
+ * Bootstrap (v4.0.0-alpha.5): util.js
34
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
35
+ * --------------------------------------------------------------------------
36
+ */
37
37
 
38
- var Util = (function ($) {
38
+ var Util = function ($) {
39
39
 
40
40
  /**
41
41
  * ------------------------------------------------------------------------
@@ -56,7 +56,7 @@ var Util = (function ($) {
56
56
 
57
57
  // shoutout AngusCroll (https://goo.gl/pxwQGp)
58
58
  function toType(obj) {
59
- return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
59
+ return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
60
60
  }
61
61
 
62
62
  function isElement(obj) {
@@ -83,9 +83,9 @@ var Util = (function ($) {
83
83
 
84
84
  var el = document.createElement('bootstrap');
85
85
 
86
- for (var _name in TransitionEndEvent) {
87
- if (el.style[_name] !== undefined) {
88
- return { end: TransitionEndEvent[_name] };
86
+ for (var name in TransitionEndEvent) {
87
+ if (el.style[name] !== undefined) {
88
+ return { end: TransitionEndEvent[name] };
89
89
  }
90
90
  }
91
91
 
@@ -133,12 +133,11 @@ var Util = (function ($) {
133
133
  getUID: function getUID(prefix) {
134
134
  do {
135
135
  /* eslint-disable no-bitwise */
136
- prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
136
+ prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
137
137
  /* eslint-enable no-bitwise */
138
138
  } while (document.getElementById(prefix));
139
139
  return prefix;
140
140
  },
141
-
142
141
  getSelectorFromElement: function getSelectorFromElement(element) {
143
142
  var selector = element.getAttribute('data-target');
144
143
 
@@ -149,25 +148,21 @@ var Util = (function ($) {
149
148
 
150
149
  return selector;
151
150
  },
152
-
153
151
  reflow: function reflow(element) {
154
152
  new Function('bs', 'return bs')(element.offsetHeight);
155
153
  },
156
-
157
154
  triggerTransitionEnd: function triggerTransitionEnd(element) {
158
155
  $(element).trigger(transition.end);
159
156
  },
160
-
161
157
  supportsTransitionEnd: function supportsTransitionEnd() {
162
158
  return Boolean(transition);
163
159
  },
164
-
165
160
  typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
166
161
  for (var property in configTypes) {
167
162
  if (configTypes.hasOwnProperty(property)) {
168
163
  var expectedTypes = configTypes[property];
169
164
  var value = config[property];
170
- var valueType = undefined;
165
+ var valueType = void 0;
171
166
 
172
167
  if (value && isElement(value)) {
173
168
  valueType = 'element';
@@ -186,16 +181,16 @@ var Util = (function ($) {
186
181
  setTransitionEndSupport();
187
182
 
188
183
  return Util;
189
- })(jQuery);
184
+ }(jQuery);
190
185
 
191
186
  /**
192
187
  * --------------------------------------------------------------------------
193
- * Bootstrap (v4.0.0-alpha.4): alert.js
188
+ * Bootstrap (v4.0.0-alpha.5): alert.js
194
189
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
195
190
  * --------------------------------------------------------------------------
196
191
  */
197
192
 
198
- var Alert = (function ($) {
193
+ var Alert = function ($) {
199
194
 
200
195
  /**
201
196
  * ------------------------------------------------------------------------
@@ -204,7 +199,7 @@ var Alert = (function ($) {
204
199
  */
205
200
 
206
201
  var NAME = 'alert';
207
- var VERSION = '4.0.0-alpha.4';
202
+ var VERSION = '4.0.0-alpha.5';
208
203
  var DATA_KEY = 'bs.alert';
209
204
  var EVENT_KEY = '.' + DATA_KEY;
210
205
  var DATA_API_KEY = '.data-api';
@@ -233,120 +228,103 @@ var Alert = (function ($) {
233
228
  * ------------------------------------------------------------------------
234
229
  */
235
230
 
236
- var Alert = (function () {
231
+ var Alert = function () {
237
232
  function Alert(element) {
238
233
  _classCallCheck(this, Alert);
239
234
 
240
235
  this._element = element;
241
236
  }
242
237
 
243
- /**
244
- * ------------------------------------------------------------------------
245
- * Data Api implementation
246
- * ------------------------------------------------------------------------
247
- */
248
-
249
238
  // getters
250
239
 
251
- _createClass(Alert, [{
252
- key: 'close',
240
+ // public
253
241
 
254
- // public
242
+ Alert.prototype.close = function close(element) {
243
+ element = element || this._element;
255
244
 
256
- value: function close(element) {
257
- element = element || this._element;
245
+ var rootElement = this._getRootElement(element);
246
+ var customEvent = this._triggerCloseEvent(rootElement);
247
+
248
+ if (customEvent.isDefaultPrevented()) {
249
+ return;
250
+ }
258
251
 
259
- var rootElement = this._getRootElement(element);
260
- var customEvent = this._triggerCloseEvent(rootElement);
252
+ this._removeElement(rootElement);
253
+ };
261
254
 
262
- if (customEvent.isDefaultPrevented()) {
263
- return;
264
- }
255
+ Alert.prototype.dispose = function dispose() {
256
+ $.removeData(this._element, DATA_KEY);
257
+ this._element = null;
258
+ };
259
+
260
+ // private
265
261
 
266
- this._removeElement(rootElement);
262
+ Alert.prototype._getRootElement = function _getRootElement(element) {
263
+ var selector = Util.getSelectorFromElement(element);
264
+ var parent = false;
265
+
266
+ if (selector) {
267
+ parent = $(selector)[0];
267
268
  }
268
- }, {
269
- key: 'dispose',
270
- value: function dispose() {
271
- $.removeData(this._element, DATA_KEY);
272
- this._element = null;
269
+
270
+ if (!parent) {
271
+ parent = $(element).closest('.' + ClassName.ALERT)[0];
273
272
  }
274
273
 
275
- // private
274
+ return parent;
275
+ };
276
276
 
277
- }, {
278
- key: '_getRootElement',
279
- value: function _getRootElement(element) {
280
- var selector = Util.getSelectorFromElement(element);
281
- var parent = false;
277
+ Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {
278
+ var closeEvent = $.Event(Event.CLOSE);
282
279
 
283
- if (selector) {
284
- parent = $(selector)[0];
285
- }
280
+ $(element).trigger(closeEvent);
281
+ return closeEvent;
282
+ };
286
283
 
287
- if (!parent) {
288
- parent = $(element).closest('.' + ClassName.ALERT)[0];
289
- }
284
+ Alert.prototype._removeElement = function _removeElement(element) {
285
+ $(element).removeClass(ClassName.IN);
290
286
 
291
- return parent;
287
+ if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
288
+ this._destroyElement(element);
289
+ return;
292
290
  }
293
- }, {
294
- key: '_triggerCloseEvent',
295
- value: function _triggerCloseEvent(element) {
296
- var closeEvent = $.Event(Event.CLOSE);
297
291
 
298
- $(element).trigger(closeEvent);
299
- return closeEvent;
300
- }
301
- }, {
302
- key: '_removeElement',
303
- value: function _removeElement(element) {
304
- $(element).removeClass(ClassName.IN);
292
+ $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
293
+ };
305
294
 
306
- if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
307
- this._destroyElement(element);
308
- return;
309
- }
295
+ Alert.prototype._destroyElement = function _destroyElement(element) {
296
+ $(element).detach().trigger(Event.CLOSED).remove();
297
+ };
310
298
 
311
- $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
312
- }
313
- }, {
314
- key: '_destroyElement',
315
- value: function _destroyElement(element) {
316
- $(element).detach().trigger(Event.CLOSED).remove();
317
- }
299
+ // static
318
300
 
319
- // static
301
+ Alert._jQueryInterface = function _jQueryInterface(config) {
302
+ return this.each(function () {
303
+ var $element = $(this);
304
+ var data = $element.data(DATA_KEY);
320
305
 
321
- }], [{
322
- key: '_jQueryInterface',
323
- value: function _jQueryInterface(config) {
324
- return this.each(function () {
325
- var $element = $(this);
326
- var data = $element.data(DATA_KEY);
306
+ if (!data) {
307
+ data = new Alert(this);
308
+ $element.data(DATA_KEY, data);
309
+ }
327
310
 
328
- if (!data) {
329
- data = new Alert(this);
330
- $element.data(DATA_KEY, data);
331
- }
311
+ if (config === 'close') {
312
+ data[config](this);
313
+ }
314
+ });
315
+ };
332
316
 
333
- if (config === 'close') {
334
- data[config](this);
335
- }
336
- });
337
- }
338
- }, {
339
- key: '_handleDismiss',
340
- value: function _handleDismiss(alertInstance) {
341
- return function (event) {
342
- if (event) {
343
- event.preventDefault();
344
- }
317
+ Alert._handleDismiss = function _handleDismiss(alertInstance) {
318
+ return function (event) {
319
+ if (event) {
320
+ event.preventDefault();
321
+ }
345
322
 
346
- alertInstance.close(this);
347
- };
348
- }
349
- }, {
323
+ alertInstance.close(this);
324
+ };
325
+ };
326
+
327
+ _createClass(Alert, null, [{
350
328
  key: 'VERSION',
351
329
  get: function get() {
352
330
  return VERSION;
@@ -354,7 +332,13 @@ var Alert = (function ($) {
354
332
  }]);
355
333
 
356
334
  return Alert;
357
- })();
335
+ }();
336
+
337
+ /**
338
+ * ------------------------------------------------------------------------
339
+ * Data Api implementation
340
+ * ------------------------------------------------------------------------
341
+ */
358
342
 
359
343
  $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
360
344
 
@@ -372,16 +356,16 @@ var Alert = (function ($) {
372
356
  };
373
357
 
374
358
  return Alert;
375
- })(jQuery);
359
+ }(jQuery);
376
360
 
377
361
  /**
378
362
  * --------------------------------------------------------------------------
379
- * Bootstrap (v4.0.0-alpha.4): button.js
363
+ * Bootstrap (v4.0.0-alpha.5): button.js
380
364
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
381
365
  * --------------------------------------------------------------------------
382
366
  */
383
367
 
384
- var Button = (function ($) {
368
+ var Button = function ($) {
385
369
 
386
370
  /**
387
371
  * ------------------------------------------------------------------------
@@ -390,7 +374,7 @@ var Button = (function ($) {
390
374
  */
391
375
 
392
376
  var NAME = 'button';
393
- var VERSION = '4.0.0-alpha.4';
377
+ var VERSION = '4.0.0-alpha.5';
394
378
  var DATA_KEY = 'bs.button';
395
379
  var EVENT_KEY = '.' + DATA_KEY;
396
380
  var DATA_API_KEY = '.data-api';
@@ -421,87 +405,76 @@ var Button = (function ($) {
421
405
  * ------------------------------------------------------------------------
422
406
  */
423
407
 
424
- var Button = (function () {
408
+ var Button = function () {
425
409
  function Button(element) {
426
410
  _classCallCheck(this, Button);
427
411
 
428
412
  this._element = element;
429
413
  }
430
414
 
431
- /**
432
- * ------------------------------------------------------------------------
433
- * Data Api implementation
434
- * ------------------------------------------------------------------------
435
- */
436
-
437
415
  // getters
438
416
 
439
- _createClass(Button, [{
440
- key: 'toggle',
441
-
442
- // public
417
+ // public
443
418
 
444
- value: function toggle() {
445
- var triggerChangeEvent = true;
446
- var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
419
+ Button.prototype.toggle = function toggle() {
420
+ var triggerChangeEvent = true;
421
+ var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
447
422
 
448
- if (rootElement) {
449
- var input = $(this._element).find(Selector.INPUT)[0];
423
+ if (rootElement) {
424
+ var input = $(this._element).find(Selector.INPUT)[0];
450
425
 
451
- if (input) {
452
- if (input.type === 'radio') {
453
- if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
454
- triggerChangeEvent = false;
455
- } else {
456
- var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
426
+ if (input) {
427
+ if (input.type === 'radio') {
428
+ if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
429
+ triggerChangeEvent = false;
430
+ } else {
431
+ var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
457
432
 
458
- if (activeElement) {
459
- $(activeElement).removeClass(ClassName.ACTIVE);
460
- }
433
+ if (activeElement) {
434
+ $(activeElement).removeClass(ClassName.ACTIVE);
461
435
  }
462
436
  }
437
+ }
463
438
 
464
- if (triggerChangeEvent) {
465
- input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
466
- $(this._element).trigger('change');
467
- }
468
-
469
- input.focus();
439
+ if (triggerChangeEvent) {
440
+ input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
441
+ $(this._element).trigger('change');
470
442
  }
471
- } else {
472
- this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
473
- }
474
443
 
475
- if (triggerChangeEvent) {
476
- $(this._element).toggleClass(ClassName.ACTIVE);
444
+ input.focus();
477
445
  }
446
+ } else {
447
+ this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
478
448
  }
479
- }, {
480
- key: 'dispose',
481
- value: function dispose() {
482
- $.removeData(this._element, DATA_KEY);
483
- this._element = null;
449
+
450
+ if (triggerChangeEvent) {
451
+ $(this._element).toggleClass(ClassName.ACTIVE);
484
452
  }
453
+ };
485
454
 
486
- // static
455
+ Button.prototype.dispose = function dispose() {
456
+ $.removeData(this._element, DATA_KEY);
457
+ this._element = null;
458
+ };
487
459
 
488
- }], [{
489
- key: '_jQueryInterface',
490
- value: function _jQueryInterface(config) {
491
- return this.each(function () {
492
- var data = $(this).data(DATA_KEY);
460
+ // static
493
461
 
494
- if (!data) {
495
- data = new Button(this);
496
- $(this).data(DATA_KEY, data);
497
- }
462
+ Button._jQueryInterface = function _jQueryInterface(config) {
463
+ return this.each(function () {
464
+ var data = $(this).data(DATA_KEY);
498
465
 
499
- if (config === 'toggle') {
500
- data[config]();
501
- }
502
- });
503
- }
504
- }, {
466
+ if (!data) {
467
+ data = new Button(this);
468
+ $(this).data(DATA_KEY, data);
469
+ }
470
+
471
+ if (config === 'toggle') {
472
+ data[config]();
473
+ }
474
+ });
475
+ };
476
+
477
+ _createClass(Button, null, [{
505
478
  key: 'VERSION',
506
479
  get: function get() {
507
480
  return VERSION;
@@ -509,7 +482,13 @@ var Button = (function ($) {
509
482
  }]);
510
483
 
511
484
  return Button;
512
- })();
485
+ }();
486
+
487
+ /**
488
+ * ------------------------------------------------------------------------
489
+ * Data Api implementation
490
+ * ------------------------------------------------------------------------
491
+ */
513
492
 
514
493
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
515
494
  event.preventDefault();
@@ -540,16 +519,16 @@ var Button = (function ($) {
540
519
  };
541
520
 
542
521
  return Button;
543
- })(jQuery);
522
+ }(jQuery);
544
523
 
545
524
  /**
546
525
  * --------------------------------------------------------------------------
547
- * Bootstrap (v4.0.0-alpha.4): carousel.js
526
+ * Bootstrap (v4.0.0-alpha.5): carousel.js
548
527
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
549
528
  * --------------------------------------------------------------------------
550
529
  */
551
530
 
552
- var Carousel = (function ($) {
531
+ var Carousel = function ($) {
553
532
 
554
533
  /**
555
534
  * ------------------------------------------------------------------------
@@ -558,7 +537,7 @@ var Carousel = (function ($) {
558
537
  */
559
538
 
560
539
  var NAME = 'carousel';
561
- var VERSION = '4.0.0-alpha.4';
540
+ var VERSION = '4.0.0-alpha.5';
562
541
  var DATA_KEY = 'bs.carousel';
563
542
  var EVENT_KEY = '.' + DATA_KEY;
564
543
  var DATA_API_KEY = '.data-api';
@@ -623,7 +602,7 @@ var Carousel = (function ($) {
623
602
  * ------------------------------------------------------------------------
624
603
  */
625
604
 
626
- var Carousel = (function () {
605
+ var Carousel = function () {
627
606
  function Carousel(element, config) {
628
607
  _classCallCheck(this, Carousel);
629
608
 
@@ -641,344 +620,318 @@ var Carousel = (function ($) {
641
620
  this._addEventListeners();
642
621
  }
643
622
 
644
- /**
645
- * ------------------------------------------------------------------------
646
- * Data Api implementation
647
- * ------------------------------------------------------------------------
648
- */
649
-
650
623
  // getters
651
624
 
652
- _createClass(Carousel, [{
653
- key: 'next',
625
+ // public
654
626
 
655
- // public
627
+ Carousel.prototype.next = function next() {
628
+ if (!this._isSliding) {
629
+ this._slide(Direction.NEXT);
630
+ }
631
+ };
656
632
 
657
- value: function next() {
658
- if (!this._isSliding) {
659
- this._slide(Direction.NEXT);
660
- }
633
+ Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
634
+ // Don't call next when the page isn't visible
635
+ if (!document.hidden) {
636
+ this.next();
661
637
  }
662
- }, {
663
- key: 'nextWhenVisible',
664
- value: function nextWhenVisible() {
665
- // Don't call next when the page isn't visible
666
- if (!document.hidden) {
667
- this.next();
668
- }
638
+ };
639
+
640
+ Carousel.prototype.prev = function prev() {
641
+ if (!this._isSliding) {
642
+ this._slide(Direction.PREVIOUS);
669
643
  }
670
- }, {
671
- key: 'prev',
672
- value: function prev() {
673
- if (!this._isSliding) {
674
- this._slide(Direction.PREVIOUS);
675
- }
644
+ };
645
+
646
+ Carousel.prototype.pause = function pause(event) {
647
+ if (!event) {
648
+ this._isPaused = true;
676
649
  }
677
- }, {
678
- key: 'pause',
679
- value: function pause(event) {
680
- if (!event) {
681
- this._isPaused = true;
682
- }
683
650
 
684
- if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
685
- Util.triggerTransitionEnd(this._element);
686
- this.cycle(true);
687
- }
651
+ if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
652
+ Util.triggerTransitionEnd(this._element);
653
+ this.cycle(true);
654
+ }
655
+
656
+ clearInterval(this._interval);
657
+ this._interval = null;
658
+ };
659
+
660
+ Carousel.prototype.cycle = function cycle(event) {
661
+ if (!event) {
662
+ this._isPaused = false;
663
+ }
688
664
 
665
+ if (this._interval) {
689
666
  clearInterval(this._interval);
690
667
  this._interval = null;
691
668
  }
692
- }, {
693
- key: 'cycle',
694
- value: function cycle(event) {
695
- if (!event) {
696
- this._isPaused = false;
697
- }
698
669
 
699
- if (this._interval) {
700
- clearInterval(this._interval);
701
- this._interval = null;
702
- }
670
+ if (this._config.interval && !this._isPaused) {
671
+ this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
672
+ }
673
+ };
703
674
 
704
- if (this._config.interval && !this._isPaused) {
705
- this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
706
- }
675
+ Carousel.prototype.to = function to(index) {
676
+ var _this2 = this;
677
+
678
+ this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
679
+
680
+ var activeIndex = this._getItemIndex(this._activeElement);
681
+
682
+ if (index > this._items.length - 1 || index < 0) {
683
+ return;
707
684
  }
708
- }, {
709
- key: 'to',
710
- value: function to(index) {
711
- var _this2 = this;
712
685
 
713
- this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
686
+ if (this._isSliding) {
687
+ $(this._element).one(Event.SLID, function () {
688
+ return _this2.to(index);
689
+ });
690
+ return;
691
+ }
714
692
 
715
- var activeIndex = this._getItemIndex(this._activeElement);
693
+ if (activeIndex === index) {
694
+ this.pause();
695
+ this.cycle();
696
+ return;
697
+ }
716
698
 
717
- if (index > this._items.length - 1 || index < 0) {
718
- return;
719
- }
699
+ var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
720
700
 
721
- if (this._isSliding) {
722
- $(this._element).one(Event.SLID, function () {
723
- return _this2.to(index);
724
- });
725
- return;
726
- }
701
+ this._slide(direction, this._items[index]);
702
+ };
727
703
 
728
- if (activeIndex === index) {
729
- this.pause();
730
- this.cycle();
731
- return;
732
- }
704
+ Carousel.prototype.dispose = function dispose() {
705
+ $(this._element).off(EVENT_KEY);
706
+ $.removeData(this._element, DATA_KEY);
733
707
 
734
- var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
708
+ this._items = null;
709
+ this._config = null;
710
+ this._element = null;
711
+ this._interval = null;
712
+ this._isPaused = null;
713
+ this._isSliding = null;
714
+ this._activeElement = null;
715
+ this._indicatorsElement = null;
716
+ };
735
717
 
736
- this._slide(direction, this._items[index]);
737
- }
738
- }, {
739
- key: 'dispose',
740
- value: function dispose() {
741
- $(this._element).off(EVENT_KEY);
742
- $.removeData(this._element, DATA_KEY);
743
-
744
- this._items = null;
745
- this._config = null;
746
- this._element = null;
747
- this._interval = null;
748
- this._isPaused = null;
749
- this._isSliding = null;
750
- this._activeElement = null;
751
- this._indicatorsElement = null;
752
- }
718
+ // private
753
719
 
754
- // private
720
+ Carousel.prototype._getConfig = function _getConfig(config) {
721
+ config = $.extend({}, Default, config);
722
+ Util.typeCheckConfig(NAME, config, DefaultType);
723
+ return config;
724
+ };
755
725
 
756
- }, {
757
- key: '_getConfig',
758
- value: function _getConfig(config) {
759
- config = $.extend({}, Default, config);
760
- Util.typeCheckConfig(NAME, config, DefaultType);
761
- return config;
726
+ Carousel.prototype._addEventListeners = function _addEventListeners() {
727
+ if (this._config.keyboard) {
728
+ $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
762
729
  }
763
- }, {
764
- key: '_addEventListeners',
765
- value: function _addEventListeners() {
766
- if (this._config.keyboard) {
767
- $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
768
- }
769
730
 
770
- if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
771
- $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
772
- }
731
+ if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
732
+ $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
773
733
  }
774
- }, {
775
- key: '_keydown',
776
- value: function _keydown(event) {
777
- event.preventDefault();
734
+ };
778
735
 
779
- if (/input|textarea/i.test(event.target.tagName)) {
780
- return;
781
- }
736
+ Carousel.prototype._keydown = function _keydown(event) {
737
+ event.preventDefault();
782
738
 
783
- switch (event.which) {
784
- case ARROW_LEFT_KEYCODE:
785
- this.prev();
786
- break;
787
- case ARROW_RIGHT_KEYCODE:
788
- this.next();
789
- break;
790
- default:
791
- return;
792
- }
739
+ if (/input|textarea/i.test(event.target.tagName)) {
740
+ return;
793
741
  }
794
- }, {
795
- key: '_getItemIndex',
796
- value: function _getItemIndex(element) {
797
- this._items = $.makeArray($(element).parent().find(Selector.ITEM));
798
- return this._items.indexOf(element);
742
+
743
+ switch (event.which) {
744
+ case ARROW_LEFT_KEYCODE:
745
+ this.prev();
746
+ break;
747
+ case ARROW_RIGHT_KEYCODE:
748
+ this.next();
749
+ break;
750
+ default:
751
+ return;
799
752
  }
800
- }, {
801
- key: '_getItemByDirection',
802
- value: function _getItemByDirection(direction, activeElement) {
803
- var isNextDirection = direction === Direction.NEXT;
804
- var isPrevDirection = direction === Direction.PREVIOUS;
805
- var activeIndex = this._getItemIndex(activeElement);
806
- var lastItemIndex = this._items.length - 1;
807
- var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
753
+ };
808
754
 
809
- if (isGoingToWrap && !this._config.wrap) {
810
- return activeElement;
811
- }
755
+ Carousel.prototype._getItemIndex = function _getItemIndex(element) {
756
+ this._items = $.makeArray($(element).parent().find(Selector.ITEM));
757
+ return this._items.indexOf(element);
758
+ };
812
759
 
813
- var delta = direction === Direction.PREVIOUS ? -1 : 1;
814
- var itemIndex = (activeIndex + delta) % this._items.length;
760
+ Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) {
761
+ var isNextDirection = direction === Direction.NEXT;
762
+ var isPrevDirection = direction === Direction.PREVIOUS;
763
+ var activeIndex = this._getItemIndex(activeElement);
764
+ var lastItemIndex = this._items.length - 1;
765
+ var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
815
766
 
816
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
767
+ if (isGoingToWrap && !this._config.wrap) {
768
+ return activeElement;
817
769
  }
818
- }, {
819
- key: '_triggerSlideEvent',
820
- value: function _triggerSlideEvent(relatedTarget, directionalClassname) {
821
- var slideEvent = $.Event(Event.SLIDE, {
822
- relatedTarget: relatedTarget,
823
- direction: directionalClassname
824
- });
825
770
 
826
- $(this._element).trigger(slideEvent);
771
+ var delta = direction === Direction.PREVIOUS ? -1 : 1;
772
+ var itemIndex = (activeIndex + delta) % this._items.length;
827
773
 
828
- return slideEvent;
829
- }
830
- }, {
831
- key: '_setActiveIndicatorElement',
832
- value: function _setActiveIndicatorElement(element) {
833
- if (this._indicatorsElement) {
834
- $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
774
+ return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
775
+ };
835
776
 
836
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
777
+ Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, directionalClassname) {
778
+ var slideEvent = $.Event(Event.SLIDE, {
779
+ relatedTarget: relatedTarget,
780
+ direction: directionalClassname
781
+ });
837
782
 
838
- if (nextIndicator) {
839
- $(nextIndicator).addClass(ClassName.ACTIVE);
840
- }
841
- }
842
- }
843
- }, {
844
- key: '_slide',
845
- value: function _slide(direction, element) {
846
- var _this3 = this;
783
+ $(this._element).trigger(slideEvent);
847
784
 
848
- var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
849
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
785
+ return slideEvent;
786
+ };
850
787
 
851
- var isCycling = Boolean(this._interval);
788
+ Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
789
+ if (this._indicatorsElement) {
790
+ $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
852
791
 
853
- var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;
792
+ var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
854
793
 
855
- if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
856
- this._isSliding = false;
857
- return;
794
+ if (nextIndicator) {
795
+ $(nextIndicator).addClass(ClassName.ACTIVE);
858
796
  }
797
+ }
798
+ };
859
799
 
860
- var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
861
- if (slideEvent.isDefaultPrevented()) {
862
- return;
863
- }
800
+ Carousel.prototype._slide = function _slide(direction, element) {
801
+ var _this3 = this;
864
802
 
865
- if (!activeElement || !nextElement) {
866
- // some weirdness is happening, so we bail
867
- return;
868
- }
803
+ var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
804
+ var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
869
805
 
870
- this._isSliding = true;
806
+ var isCycling = Boolean(this._interval);
871
807
 
872
- if (isCycling) {
873
- this.pause();
874
- }
808
+ var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;
809
+
810
+ if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
811
+ this._isSliding = false;
812
+ return;
813
+ }
875
814
 
876
- this._setActiveIndicatorElement(nextElement);
815
+ var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
816
+ if (slideEvent.isDefaultPrevented()) {
817
+ return;
818
+ }
877
819
 
878
- var slidEvent = $.Event(Event.SLID, {
879
- relatedTarget: nextElement,
880
- direction: directionalClassName
881
- });
820
+ if (!activeElement || !nextElement) {
821
+ // some weirdness is happening, so we bail
822
+ return;
823
+ }
882
824
 
883
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
825
+ this._isSliding = true;
826
+
827
+ if (isCycling) {
828
+ this.pause();
829
+ }
884
830
 
885
- $(nextElement).addClass(direction);
831
+ this._setActiveIndicatorElement(nextElement);
886
832
 
887
- Util.reflow(nextElement);
833
+ var slidEvent = $.Event(Event.SLID, {
834
+ relatedTarget: nextElement,
835
+ direction: directionalClassName
836
+ });
888
837
 
889
- $(activeElement).addClass(directionalClassName);
890
- $(nextElement).addClass(directionalClassName);
838
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
891
839
 
892
- $(activeElement).one(Util.TRANSITION_END, function () {
893
- $(nextElement).removeClass(directionalClassName).removeClass(direction);
840
+ $(nextElement).addClass(direction);
894
841
 
895
- $(nextElement).addClass(ClassName.ACTIVE);
842
+ Util.reflow(nextElement);
896
843
 
897
- $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
844
+ $(activeElement).addClass(directionalClassName);
845
+ $(nextElement).addClass(directionalClassName);
898
846
 
899
- _this3._isSliding = false;
847
+ $(activeElement).one(Util.TRANSITION_END, function () {
848
+ $(nextElement).removeClass(directionalClassName).removeClass(direction);
900
849
 
901
- setTimeout(function () {
902
- return $(_this3._element).trigger(slidEvent);
903
- }, 0);
904
- }).emulateTransitionEnd(TRANSITION_DURATION);
905
- } else {
906
- $(activeElement).removeClass(ClassName.ACTIVE);
907
850
  $(nextElement).addClass(ClassName.ACTIVE);
908
851
 
909
- this._isSliding = false;
910
- $(this._element).trigger(slidEvent);
911
- }
852
+ $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
912
853
 
913
- if (isCycling) {
914
- this.cycle();
915
- }
854
+ _this3._isSliding = false;
855
+
856
+ setTimeout(function () {
857
+ return $(_this3._element).trigger(slidEvent);
858
+ }, 0);
859
+ }).emulateTransitionEnd(TRANSITION_DURATION);
860
+ } else {
861
+ $(activeElement).removeClass(ClassName.ACTIVE);
862
+ $(nextElement).addClass(ClassName.ACTIVE);
863
+
864
+ this._isSliding = false;
865
+ $(this._element).trigger(slidEvent);
916
866
  }
917
867
 
918
- // static
868
+ if (isCycling) {
869
+ this.cycle();
870
+ }
871
+ };
919
872
 
920
- }], [{
921
- key: '_jQueryInterface',
922
- value: function _jQueryInterface(config) {
923
- return this.each(function () {
924
- var data = $(this).data(DATA_KEY);
925
- var _config = $.extend({}, Default, $(this).data());
873
+ // static
926
874
 
927
- if (typeof config === 'object') {
928
- $.extend(_config, config);
929
- }
875
+ Carousel._jQueryInterface = function _jQueryInterface(config) {
876
+ return this.each(function () {
877
+ var data = $(this).data(DATA_KEY);
878
+ var _config = $.extend({}, Default, $(this).data());
930
879
 
931
- var action = typeof config === 'string' ? config : _config.slide;
880
+ if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {
881
+ $.extend(_config, config);
882
+ }
932
883
 
933
- if (!data) {
934
- data = new Carousel(this, _config);
935
- $(this).data(DATA_KEY, data);
936
- }
884
+ var action = typeof config === 'string' ? config : _config.slide;
937
885
 
938
- if (typeof config === 'number') {
939
- data.to(config);
940
- } else if (typeof action === 'string') {
941
- if (data[action] === undefined) {
942
- throw new Error('No method named "' + action + '"');
943
- }
944
- data[action]();
945
- } else if (_config.interval) {
946
- data.pause();
947
- data.cycle();
948
- }
949
- });
950
- }
951
- }, {
952
- key: '_dataApiClickHandler',
953
- value: function _dataApiClickHandler(event) {
954
- var selector = Util.getSelectorFromElement(this);
886
+ if (!data) {
887
+ data = new Carousel(this, _config);
888
+ $(this).data(DATA_KEY, data);
889
+ }
955
890
 
956
- if (!selector) {
957
- return;
891
+ if (typeof config === 'number') {
892
+ data.to(config);
893
+ } else if (typeof action === 'string') {
894
+ if (data[action] === undefined) {
895
+ throw new Error('No method named "' + action + '"');
896
+ }
897
+ data[action]();
898
+ } else if (_config.interval) {
899
+ data.pause();
900
+ data.cycle();
958
901
  }
902
+ });
903
+ };
959
904
 
960
- var target = $(selector)[0];
905
+ Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
906
+ var selector = Util.getSelectorFromElement(this);
961
907
 
962
- if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
963
- return;
964
- }
908
+ if (!selector) {
909
+ return;
910
+ }
965
911
 
966
- var config = $.extend({}, $(target).data(), $(this).data());
967
- var slideIndex = this.getAttribute('data-slide-to');
912
+ var target = $(selector)[0];
968
913
 
969
- if (slideIndex) {
970
- config.interval = false;
971
- }
914
+ if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
915
+ return;
916
+ }
972
917
 
973
- Carousel._jQueryInterface.call($(target), config);
918
+ var config = $.extend({}, $(target).data(), $(this).data());
919
+ var slideIndex = this.getAttribute('data-slide-to');
974
920
 
975
- if (slideIndex) {
976
- $(target).data(DATA_KEY).to(slideIndex);
977
- }
921
+ if (slideIndex) {
922
+ config.interval = false;
923
+ }
978
924
 
979
- event.preventDefault();
925
+ Carousel._jQueryInterface.call($(target), config);
926
+
927
+ if (slideIndex) {
928
+ $(target).data(DATA_KEY).to(slideIndex);
980
929
  }
981
- }, {
930
+
931
+ event.preventDefault();
932
+ };
933
+
934
+ _createClass(Carousel, null, [{
982
935
  key: 'VERSION',
983
936
  get: function get() {
984
937
  return VERSION;
@@ -991,7 +944,13 @@ var Carousel = (function ($) {
991
944
  }]);
992
945
 
993
946
  return Carousel;
994
- })();
947
+ }();
948
+
949
+ /**
950
+ * ------------------------------------------------------------------------
951
+ * Data Api implementation
952
+ * ------------------------------------------------------------------------
953
+ */
995
954
 
996
955
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
997
956
 
@@ -1016,16 +975,16 @@ var Carousel = (function ($) {
1016
975
  };
1017
976
 
1018
977
  return Carousel;
1019
- })(jQuery);
978
+ }(jQuery);
1020
979
 
1021
980
  /**
1022
981
  * --------------------------------------------------------------------------
1023
- * Bootstrap (v4.0.0-alpha.4): collapse.js
982
+ * Bootstrap (v4.0.0-alpha.5): collapse.js
1024
983
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1025
984
  * --------------------------------------------------------------------------
1026
985
  */
1027
986
 
1028
- var Collapse = (function ($) {
987
+ var Collapse = function ($) {
1029
988
 
1030
989
  /**
1031
990
  * ------------------------------------------------------------------------
@@ -1034,7 +993,7 @@ var Collapse = (function ($) {
1034
993
  */
1035
994
 
1036
995
  var NAME = 'collapse';
1037
- var VERSION = '4.0.0-alpha.4';
996
+ var VERSION = '4.0.0-alpha.5';
1038
997
  var DATA_KEY = 'bs.collapse';
1039
998
  var EVENT_KEY = '.' + DATA_KEY;
1040
999
  var DATA_API_KEY = '.data-api';
@@ -1072,7 +1031,7 @@ var Collapse = (function ($) {
1072
1031
  };
1073
1032
 
1074
1033
  var Selector = {
1075
- ACTIVES: '.panel > .in, .panel > .collapsing',
1034
+ ACTIVES: '.card > .in, .card > .collapsing',
1076
1035
  DATA_TOGGLE: '[data-toggle="collapse"]'
1077
1036
  };
1078
1037
 
@@ -1082,7 +1041,7 @@ var Collapse = (function ($) {
1082
1041
  * ------------------------------------------------------------------------
1083
1042
  */
1084
1043
 
1085
- var Collapse = (function () {
1044
+ var Collapse = function () {
1086
1045
  function Collapse(element, config) {
1087
1046
  _classCallCheck(this, Collapse);
1088
1047
 
@@ -1102,240 +1061,220 @@ var Collapse = (function ($) {
1102
1061
  }
1103
1062
  }
1104
1063
 
1105
- /**
1106
- * ------------------------------------------------------------------------
1107
- * Data Api implementation
1108
- * ------------------------------------------------------------------------
1109
- */
1110
-
1111
1064
  // getters
1112
1065
 
1113
- _createClass(Collapse, [{
1114
- key: 'toggle',
1115
-
1116
- // public
1066
+ // public
1117
1067
 
1118
- value: function toggle() {
1119
- if ($(this._element).hasClass(ClassName.IN)) {
1120
- this.hide();
1121
- } else {
1122
- this.show();
1123
- }
1068
+ Collapse.prototype.toggle = function toggle() {
1069
+ if ($(this._element).hasClass(ClassName.IN)) {
1070
+ this.hide();
1071
+ } else {
1072
+ this.show();
1124
1073
  }
1125
- }, {
1126
- key: 'show',
1127
- value: function show() {
1128
- var _this4 = this;
1074
+ };
1129
1075
 
1130
- if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {
1131
- return;
1132
- }
1076
+ Collapse.prototype.show = function show() {
1077
+ var _this4 = this;
1133
1078
 
1134
- var actives = undefined;
1135
- var activesData = undefined;
1079
+ if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {
1080
+ return;
1081
+ }
1136
1082
 
1137
- if (this._parent) {
1138
- actives = $.makeArray($(Selector.ACTIVES));
1139
- if (!actives.length) {
1140
- actives = null;
1141
- }
1142
- }
1083
+ var actives = void 0;
1084
+ var activesData = void 0;
1143
1085
 
1144
- if (actives) {
1145
- activesData = $(actives).data(DATA_KEY);
1146
- if (activesData && activesData._isTransitioning) {
1147
- return;
1148
- }
1086
+ if (this._parent) {
1087
+ actives = $.makeArray($(Selector.ACTIVES));
1088
+ if (!actives.length) {
1089
+ actives = null;
1149
1090
  }
1091
+ }
1150
1092
 
1151
- var startEvent = $.Event(Event.SHOW);
1152
- $(this._element).trigger(startEvent);
1153
- if (startEvent.isDefaultPrevented()) {
1093
+ if (actives) {
1094
+ activesData = $(actives).data(DATA_KEY);
1095
+ if (activesData && activesData._isTransitioning) {
1154
1096
  return;
1155
1097
  }
1098
+ }
1156
1099
 
1157
- if (actives) {
1158
- Collapse._jQueryInterface.call($(actives), 'hide');
1159
- if (!activesData) {
1160
- $(actives).data(DATA_KEY, null);
1161
- }
1100
+ var startEvent = $.Event(Event.SHOW);
1101
+ $(this._element).trigger(startEvent);
1102
+ if (startEvent.isDefaultPrevented()) {
1103
+ return;
1104
+ }
1105
+
1106
+ if (actives) {
1107
+ Collapse._jQueryInterface.call($(actives), 'hide');
1108
+ if (!activesData) {
1109
+ $(actives).data(DATA_KEY, null);
1162
1110
  }
1111
+ }
1163
1112
 
1164
- var dimension = this._getDimension();
1113
+ var dimension = this._getDimension();
1165
1114
 
1166
- $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
1115
+ $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
1167
1116
 
1168
- this._element.style[dimension] = 0;
1169
- this._element.setAttribute('aria-expanded', true);
1117
+ this._element.style[dimension] = 0;
1118
+ this._element.setAttribute('aria-expanded', true);
1170
1119
 
1171
- if (this._triggerArray.length) {
1172
- $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
1173
- }
1120
+ if (this._triggerArray.length) {
1121
+ $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
1122
+ }
1174
1123
 
1175
- this.setTransitioning(true);
1124
+ this.setTransitioning(true);
1176
1125
 
1177
- var complete = function complete() {
1178
- $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);
1126
+ var complete = function complete() {
1127
+ $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);
1179
1128
 
1180
- _this4._element.style[dimension] = '';
1129
+ _this4._element.style[dimension] = '';
1181
1130
 
1182
- _this4.setTransitioning(false);
1131
+ _this4.setTransitioning(false);
1183
1132
 
1184
- $(_this4._element).trigger(Event.SHOWN);
1185
- };
1133
+ $(_this4._element).trigger(Event.SHOWN);
1134
+ };
1186
1135
 
1187
- if (!Util.supportsTransitionEnd()) {
1188
- complete();
1189
- return;
1190
- }
1136
+ if (!Util.supportsTransitionEnd()) {
1137
+ complete();
1138
+ return;
1139
+ }
1191
1140
 
1192
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1193
- var scrollSize = 'scroll' + capitalizedDimension;
1141
+ var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1142
+ var scrollSize = 'scroll' + capitalizedDimension;
1194
1143
 
1195
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1144
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1196
1145
 
1197
- this._element.style[dimension] = this._element[scrollSize] + 'px';
1198
- }
1199
- }, {
1200
- key: 'hide',
1201
- value: function hide() {
1202
- var _this5 = this;
1146
+ this._element.style[dimension] = this._element[scrollSize] + 'px';
1147
+ };
1203
1148
 
1204
- if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {
1205
- return;
1206
- }
1149
+ Collapse.prototype.hide = function hide() {
1150
+ var _this5 = this;
1207
1151
 
1208
- var startEvent = $.Event(Event.HIDE);
1209
- $(this._element).trigger(startEvent);
1210
- if (startEvent.isDefaultPrevented()) {
1211
- return;
1212
- }
1152
+ if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {
1153
+ return;
1154
+ }
1213
1155
 
1214
- var dimension = this._getDimension();
1215
- var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
1156
+ var startEvent = $.Event(Event.HIDE);
1157
+ $(this._element).trigger(startEvent);
1158
+ if (startEvent.isDefaultPrevented()) {
1159
+ return;
1160
+ }
1216
1161
 
1217
- this._element.style[dimension] = this._element[offsetDimension] + 'px';
1162
+ var dimension = this._getDimension();
1163
+ var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
1218
1164
 
1219
- Util.reflow(this._element);
1165
+ this._element.style[dimension] = this._element[offsetDimension] + 'px';
1220
1166
 
1221
- $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);
1167
+ Util.reflow(this._element);
1222
1168
 
1223
- this._element.setAttribute('aria-expanded', false);
1169
+ $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);
1224
1170
 
1225
- if (this._triggerArray.length) {
1226
- $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
1227
- }
1171
+ this._element.setAttribute('aria-expanded', false);
1228
1172
 
1229
- this.setTransitioning(true);
1173
+ if (this._triggerArray.length) {
1174
+ $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
1175
+ }
1230
1176
 
1231
- var complete = function complete() {
1232
- _this5.setTransitioning(false);
1233
- $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
1234
- };
1177
+ this.setTransitioning(true);
1235
1178
 
1236
- this._element.style[dimension] = 0;
1179
+ var complete = function complete() {
1180
+ _this5.setTransitioning(false);
1181
+ $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
1182
+ };
1237
1183
 
1238
- if (!Util.supportsTransitionEnd()) {
1239
- complete();
1240
- return;
1241
- }
1184
+ this._element.style[dimension] = '';
1242
1185
 
1243
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1244
- }
1245
- }, {
1246
- key: 'setTransitioning',
1247
- value: function setTransitioning(isTransitioning) {
1248
- this._isTransitioning = isTransitioning;
1186
+ if (!Util.supportsTransitionEnd()) {
1187
+ complete();
1188
+ return;
1249
1189
  }
1250
- }, {
1251
- key: 'dispose',
1252
- value: function dispose() {
1253
- $.removeData(this._element, DATA_KEY);
1254
1190
 
1255
- this._config = null;
1256
- this._parent = null;
1257
- this._element = null;
1258
- this._triggerArray = null;
1259
- this._isTransitioning = null;
1260
- }
1191
+ $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1192
+ };
1261
1193
 
1262
- // private
1194
+ Collapse.prototype.setTransitioning = function setTransitioning(isTransitioning) {
1195
+ this._isTransitioning = isTransitioning;
1196
+ };
1263
1197
 
1264
- }, {
1265
- key: '_getConfig',
1266
- value: function _getConfig(config) {
1267
- config = $.extend({}, Default, config);
1268
- config.toggle = Boolean(config.toggle); // coerce string values
1269
- Util.typeCheckConfig(NAME, config, DefaultType);
1270
- return config;
1271
- }
1272
- }, {
1273
- key: '_getDimension',
1274
- value: function _getDimension() {
1275
- var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
1276
- return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1277
- }
1278
- }, {
1279
- key: '_getParent',
1280
- value: function _getParent() {
1281
- var _this6 = this;
1198
+ Collapse.prototype.dispose = function dispose() {
1199
+ $.removeData(this._element, DATA_KEY);
1282
1200
 
1283
- var parent = $(this._config.parent)[0];
1284
- var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
1201
+ this._config = null;
1202
+ this._parent = null;
1203
+ this._element = null;
1204
+ this._triggerArray = null;
1205
+ this._isTransitioning = null;
1206
+ };
1285
1207
 
1286
- $(parent).find(selector).each(function (i, element) {
1287
- _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1288
- });
1208
+ // private
1289
1209
 
1290
- return parent;
1291
- }
1292
- }, {
1293
- key: '_addAriaAndCollapsedClass',
1294
- value: function _addAriaAndCollapsedClass(element, triggerArray) {
1295
- if (element) {
1296
- var isOpen = $(element).hasClass(ClassName.IN);
1297
- element.setAttribute('aria-expanded', isOpen);
1298
-
1299
- if (triggerArray.length) {
1300
- $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1301
- }
1210
+ Collapse.prototype._getConfig = function _getConfig(config) {
1211
+ config = $.extend({}, Default, config);
1212
+ config.toggle = Boolean(config.toggle); // coerce string values
1213
+ Util.typeCheckConfig(NAME, config, DefaultType);
1214
+ return config;
1215
+ };
1216
+
1217
+ Collapse.prototype._getDimension = function _getDimension() {
1218
+ var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
1219
+ return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1220
+ };
1221
+
1222
+ Collapse.prototype._getParent = function _getParent() {
1223
+ var _this6 = this;
1224
+
1225
+ var parent = $(this._config.parent)[0];
1226
+ var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
1227
+
1228
+ $(parent).find(selector).each(function (i, element) {
1229
+ _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1230
+ });
1231
+
1232
+ return parent;
1233
+ };
1234
+
1235
+ Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1236
+ if (element) {
1237
+ var isOpen = $(element).hasClass(ClassName.IN);
1238
+ element.setAttribute('aria-expanded', isOpen);
1239
+
1240
+ if (triggerArray.length) {
1241
+ $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1302
1242
  }
1303
1243
  }
1244
+ };
1304
1245
 
1305
- // static
1246
+ // static
1306
1247
 
1307
- }], [{
1308
- key: '_getTargetFromElement',
1309
- value: function _getTargetFromElement(element) {
1310
- var selector = Util.getSelectorFromElement(element);
1311
- return selector ? $(selector)[0] : null;
1312
- }
1313
- }, {
1314
- key: '_jQueryInterface',
1315
- value: function _jQueryInterface(config) {
1316
- return this.each(function () {
1317
- var $this = $(this);
1318
- var data = $this.data(DATA_KEY);
1319
- var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
1320
-
1321
- if (!data && _config.toggle && /show|hide/.test(config)) {
1322
- _config.toggle = false;
1323
- }
1248
+ Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1249
+ var selector = Util.getSelectorFromElement(element);
1250
+ return selector ? $(selector)[0] : null;
1251
+ };
1324
1252
 
1325
- if (!data) {
1326
- data = new Collapse(this, _config);
1327
- $this.data(DATA_KEY, data);
1328
- }
1253
+ Collapse._jQueryInterface = function _jQueryInterface(config) {
1254
+ return this.each(function () {
1255
+ var $this = $(this);
1256
+ var data = $this.data(DATA_KEY);
1257
+ var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
1329
1258
 
1330
- if (typeof config === 'string') {
1331
- if (data[config] === undefined) {
1332
- throw new Error('No method named "' + config + '"');
1333
- }
1334
- data[config]();
1259
+ if (!data && _config.toggle && /show|hide/.test(config)) {
1260
+ _config.toggle = false;
1261
+ }
1262
+
1263
+ if (!data) {
1264
+ data = new Collapse(this, _config);
1265
+ $this.data(DATA_KEY, data);
1266
+ }
1267
+
1268
+ if (typeof config === 'string') {
1269
+ if (data[config] === undefined) {
1270
+ throw new Error('No method named "' + config + '"');
1335
1271
  }
1336
- });
1337
- }
1338
- }, {
1272
+ data[config]();
1273
+ }
1274
+ });
1275
+ };
1276
+
1277
+ _createClass(Collapse, null, [{
1339
1278
  key: 'VERSION',
1340
1279
  get: function get() {
1341
1280
  return VERSION;
@@ -1348,7 +1287,13 @@ var Collapse = (function ($) {
1348
1287
  }]);
1349
1288
 
1350
1289
  return Collapse;
1351
- })();
1290
+ }();
1291
+
1292
+ /**
1293
+ * ------------------------------------------------------------------------
1294
+ * Data Api implementation
1295
+ * ------------------------------------------------------------------------
1296
+ */
1352
1297
 
1353
1298
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
1354
1299
  event.preventDefault();
@@ -1374,16 +1319,16 @@ var Collapse = (function ($) {
1374
1319
  };
1375
1320
 
1376
1321
  return Collapse;
1377
- })(jQuery);
1322
+ }(jQuery);
1378
1323
 
1379
1324
  /**
1380
1325
  * --------------------------------------------------------------------------
1381
- * Bootstrap (v4.0.0-alpha.4): dropdown.js
1326
+ * Bootstrap (v4.0.0-alpha.5): dropdown.js
1382
1327
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1383
1328
  * --------------------------------------------------------------------------
1384
1329
  */
1385
1330
 
1386
- var Dropdown = (function ($) {
1331
+ var Dropdown = function ($) {
1387
1332
 
1388
1333
  /**
1389
1334
  * ------------------------------------------------------------------------
@@ -1392,7 +1337,7 @@ var Dropdown = (function ($) {
1392
1337
  */
1393
1338
 
1394
1339
  var NAME = 'dropdown';
1395
- var VERSION = '4.0.0-alpha.4';
1340
+ var VERSION = '4.0.0-alpha.5';
1396
1341
  var DATA_KEY = 'bs.dropdown';
1397
1342
  var EVENT_KEY = '.' + DATA_KEY;
1398
1343
  var DATA_API_KEY = '.data-api';
@@ -1434,7 +1379,7 @@ var Dropdown = (function ($) {
1434
1379
  * ------------------------------------------------------------------------
1435
1380
  */
1436
1381
 
1437
- var Dropdown = (function () {
1382
+ var Dropdown = function () {
1438
1383
  function Dropdown(element) {
1439
1384
  _classCallCheck(this, Dropdown);
1440
1385
 
@@ -1443,201 +1388,185 @@ var Dropdown = (function ($) {
1443
1388
  this._addEventListeners();
1444
1389
  }
1445
1390
 
1446
- /**
1447
- * ------------------------------------------------------------------------
1448
- * Data Api implementation
1449
- * ------------------------------------------------------------------------
1450
- */
1451
-
1452
1391
  // getters
1453
1392
 
1454
- _createClass(Dropdown, [{
1455
- key: 'toggle',
1393
+ // public
1456
1394
 
1457
- // public
1458
-
1459
- value: function toggle() {
1460
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1461
- return false;
1462
- }
1395
+ Dropdown.prototype.toggle = function toggle() {
1396
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1397
+ return false;
1398
+ }
1463
1399
 
1464
- var parent = Dropdown._getParentFromElement(this);
1465
- var isActive = $(parent).hasClass(ClassName.OPEN);
1400
+ var parent = Dropdown._getParentFromElement(this);
1401
+ var isActive = $(parent).hasClass(ClassName.OPEN);
1466
1402
 
1467
- Dropdown._clearMenus();
1403
+ Dropdown._clearMenus();
1468
1404
 
1469
- if (isActive) {
1470
- return false;
1471
- }
1405
+ if (isActive) {
1406
+ return false;
1407
+ }
1472
1408
 
1473
- if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
1409
+ if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
1474
1410
 
1475
- // if mobile we use a backdrop because click events don't delegate
1476
- var dropdown = document.createElement('div');
1477
- dropdown.className = ClassName.BACKDROP;
1478
- $(dropdown).insertBefore(this);
1479
- $(dropdown).on('click', Dropdown._clearMenus);
1480
- }
1411
+ // if mobile we use a backdrop because click events don't delegate
1412
+ var dropdown = document.createElement('div');
1413
+ dropdown.className = ClassName.BACKDROP;
1414
+ $(dropdown).insertBefore(this);
1415
+ $(dropdown).on('click', Dropdown._clearMenus);
1416
+ }
1481
1417
 
1482
- var relatedTarget = { relatedTarget: this };
1483
- var showEvent = $.Event(Event.SHOW, relatedTarget);
1418
+ var relatedTarget = { relatedTarget: this };
1419
+ var showEvent = $.Event(Event.SHOW, relatedTarget);
1484
1420
 
1485
- $(parent).trigger(showEvent);
1421
+ $(parent).trigger(showEvent);
1486
1422
 
1487
- if (showEvent.isDefaultPrevented()) {
1488
- return false;
1489
- }
1423
+ if (showEvent.isDefaultPrevented()) {
1424
+ return false;
1425
+ }
1490
1426
 
1491
- this.focus();
1492
- this.setAttribute('aria-expanded', 'true');
1427
+ this.focus();
1428
+ this.setAttribute('aria-expanded', 'true');
1493
1429
 
1494
- $(parent).toggleClass(ClassName.OPEN);
1495
- $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
1430
+ $(parent).toggleClass(ClassName.OPEN);
1431
+ $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
1496
1432
 
1497
- return false;
1498
- }
1499
- }, {
1500
- key: 'dispose',
1501
- value: function dispose() {
1502
- $.removeData(this._element, DATA_KEY);
1503
- $(this._element).off(EVENT_KEY);
1504
- this._element = null;
1505
- }
1433
+ return false;
1434
+ };
1506
1435
 
1507
- // private
1436
+ Dropdown.prototype.dispose = function dispose() {
1437
+ $.removeData(this._element, DATA_KEY);
1438
+ $(this._element).off(EVENT_KEY);
1439
+ this._element = null;
1440
+ };
1508
1441
 
1509
- }, {
1510
- key: '_addEventListeners',
1511
- value: function _addEventListeners() {
1512
- $(this._element).on(Event.CLICK, this.toggle);
1513
- }
1442
+ // private
1514
1443
 
1515
- // static
1444
+ Dropdown.prototype._addEventListeners = function _addEventListeners() {
1445
+ $(this._element).on(Event.CLICK, this.toggle);
1446
+ };
1516
1447
 
1517
- }], [{
1518
- key: '_jQueryInterface',
1519
- value: function _jQueryInterface(config) {
1520
- return this.each(function () {
1521
- var data = $(this).data(DATA_KEY);
1448
+ // static
1522
1449
 
1523
- if (!data) {
1524
- $(this).data(DATA_KEY, data = new Dropdown(this));
1525
- }
1450
+ Dropdown._jQueryInterface = function _jQueryInterface(config) {
1451
+ return this.each(function () {
1452
+ var data = $(this).data(DATA_KEY);
1526
1453
 
1527
- if (typeof config === 'string') {
1528
- if (data[config] === undefined) {
1529
- throw new Error('No method named "' + config + '"');
1530
- }
1531
- data[config].call(this);
1532
- }
1533
- });
1534
- }
1535
- }, {
1536
- key: '_clearMenus',
1537
- value: function _clearMenus(event) {
1538
- if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
1539
- return;
1454
+ if (!data) {
1455
+ $(this).data(DATA_KEY, data = new Dropdown(this));
1540
1456
  }
1541
1457
 
1542
- var backdrop = $(Selector.BACKDROP)[0];
1543
- if (backdrop) {
1544
- backdrop.parentNode.removeChild(backdrop);
1458
+ if (typeof config === 'string') {
1459
+ if (data[config] === undefined) {
1460
+ throw new Error('No method named "' + config + '"');
1461
+ }
1462
+ data[config].call(this);
1545
1463
  }
1464
+ });
1465
+ };
1546
1466
 
1547
- var toggles = $.makeArray($(Selector.DATA_TOGGLE));
1467
+ Dropdown._clearMenus = function _clearMenus(event) {
1468
+ if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
1469
+ return;
1470
+ }
1548
1471
 
1549
- for (var i = 0; i < toggles.length; i++) {
1550
- var _parent = Dropdown._getParentFromElement(toggles[i]);
1551
- var relatedTarget = { relatedTarget: toggles[i] };
1472
+ var backdrop = $(Selector.BACKDROP)[0];
1473
+ if (backdrop) {
1474
+ backdrop.parentNode.removeChild(backdrop);
1475
+ }
1552
1476
 
1553
- if (!$(_parent).hasClass(ClassName.OPEN)) {
1554
- continue;
1555
- }
1477
+ var toggles = $.makeArray($(Selector.DATA_TOGGLE));
1556
1478
 
1557
- if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) {
1558
- continue;
1559
- }
1479
+ for (var i = 0; i < toggles.length; i++) {
1480
+ var parent = Dropdown._getParentFromElement(toggles[i]);
1481
+ var relatedTarget = { relatedTarget: toggles[i] };
1560
1482
 
1561
- var hideEvent = $.Event(Event.HIDE, relatedTarget);
1562
- $(_parent).trigger(hideEvent);
1563
- if (hideEvent.isDefaultPrevented()) {
1564
- continue;
1565
- }
1483
+ if (!$(parent).hasClass(ClassName.OPEN)) {
1484
+ continue;
1485
+ }
1566
1486
 
1567
- toggles[i].setAttribute('aria-expanded', 'false');
1487
+ if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(parent, event.target)) {
1488
+ continue;
1489
+ }
1568
1490
 
1569
- $(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));
1491
+ var hideEvent = $.Event(Event.HIDE, relatedTarget);
1492
+ $(parent).trigger(hideEvent);
1493
+ if (hideEvent.isDefaultPrevented()) {
1494
+ continue;
1570
1495
  }
1496
+
1497
+ toggles[i].setAttribute('aria-expanded', 'false');
1498
+
1499
+ $(parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));
1571
1500
  }
1572
- }, {
1573
- key: '_getParentFromElement',
1574
- value: function _getParentFromElement(element) {
1575
- var parent = undefined;
1576
- var selector = Util.getSelectorFromElement(element);
1501
+ };
1577
1502
 
1578
- if (selector) {
1579
- parent = $(selector)[0];
1580
- }
1503
+ Dropdown._getParentFromElement = function _getParentFromElement(element) {
1504
+ var parent = void 0;
1505
+ var selector = Util.getSelectorFromElement(element);
1581
1506
 
1582
- return parent || element.parentNode;
1507
+ if (selector) {
1508
+ parent = $(selector)[0];
1583
1509
  }
1584
- }, {
1585
- key: '_dataApiKeydownHandler',
1586
- value: function _dataApiKeydownHandler(event) {
1587
- if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
1588
- return;
1589
- }
1590
1510
 
1591
- event.preventDefault();
1592
- event.stopPropagation();
1511
+ return parent || element.parentNode;
1512
+ };
1593
1513
 
1594
- if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1595
- return;
1596
- }
1514
+ Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
1515
+ if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
1516
+ return;
1517
+ }
1597
1518
 
1598
- var parent = Dropdown._getParentFromElement(this);
1599
- var isActive = $(parent).hasClass(ClassName.OPEN);
1519
+ event.preventDefault();
1520
+ event.stopPropagation();
1600
1521
 
1601
- if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
1522
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1523
+ return;
1524
+ }
1602
1525
 
1603
- if (event.which === ESCAPE_KEYCODE) {
1604
- var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
1605
- $(toggle).trigger('focus');
1606
- }
1526
+ var parent = Dropdown._getParentFromElement(this);
1527
+ var isActive = $(parent).hasClass(ClassName.OPEN);
1607
1528
 
1608
- $(this).trigger('click');
1609
- return;
1529
+ if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
1530
+
1531
+ if (event.which === ESCAPE_KEYCODE) {
1532
+ var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
1533
+ $(toggle).trigger('focus');
1610
1534
  }
1611
1535
 
1612
- var items = $.makeArray($(Selector.VISIBLE_ITEMS));
1536
+ $(this).trigger('click');
1537
+ return;
1538
+ }
1613
1539
 
1614
- items = items.filter(function (item) {
1615
- return item.offsetWidth || item.offsetHeight;
1616
- });
1540
+ var items = $.makeArray($(Selector.VISIBLE_ITEMS));
1617
1541
 
1618
- if (!items.length) {
1619
- return;
1620
- }
1542
+ items = items.filter(function (item) {
1543
+ return item.offsetWidth || item.offsetHeight;
1544
+ });
1621
1545
 
1622
- var index = items.indexOf(event.target);
1546
+ if (!items.length) {
1547
+ return;
1548
+ }
1623
1549
 
1624
- if (event.which === ARROW_UP_KEYCODE && index > 0) {
1625
- // up
1626
- index--;
1627
- }
1550
+ var index = items.indexOf(event.target);
1628
1551
 
1629
- if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
1630
- // down
1631
- index++;
1632
- }
1552
+ if (event.which === ARROW_UP_KEYCODE && index > 0) {
1553
+ // up
1554
+ index--;
1555
+ }
1633
1556
 
1634
- if (index < 0) {
1635
- index = 0;
1636
- }
1557
+ if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
1558
+ // down
1559
+ index++;
1560
+ }
1637
1561
 
1638
- items[index].focus();
1562
+ if (index < 0) {
1563
+ index = 0;
1639
1564
  }
1640
- }, {
1565
+
1566
+ items[index].focus();
1567
+ };
1568
+
1569
+ _createClass(Dropdown, null, [{
1641
1570
  key: 'VERSION',
1642
1571
  get: function get() {
1643
1572
  return VERSION;
@@ -1645,7 +1574,13 @@ var Dropdown = (function ($) {
1645
1574
  }]);
1646
1575
 
1647
1576
  return Dropdown;
1648
- })();
1577
+ }();
1578
+
1579
+ /**
1580
+ * ------------------------------------------------------------------------
1581
+ * Data Api implementation
1582
+ * ------------------------------------------------------------------------
1583
+ */
1649
1584
 
1650
1585
  $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
1651
1586
  e.stopPropagation();
@@ -1665,16 +1600,16 @@ var Dropdown = (function ($) {
1665
1600
  };
1666
1601
 
1667
1602
  return Dropdown;
1668
- })(jQuery);
1603
+ }(jQuery);
1669
1604
 
1670
1605
  /**
1671
1606
  * --------------------------------------------------------------------------
1672
- * Bootstrap (v4.0.0-alpha.4): modal.js
1607
+ * Bootstrap (v4.0.0-alpha.5): modal.js
1673
1608
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1674
1609
  * --------------------------------------------------------------------------
1675
1610
  */
1676
1611
 
1677
- var Modal = (function ($) {
1612
+ var Modal = function ($) {
1678
1613
 
1679
1614
  /**
1680
1615
  * ------------------------------------------------------------------------
@@ -1683,7 +1618,7 @@ var Modal = (function ($) {
1683
1618
  */
1684
1619
 
1685
1620
  var NAME = 'modal';
1686
- var VERSION = '4.0.0-alpha.4';
1621
+ var VERSION = '4.0.0-alpha.5';
1687
1622
  var DATA_KEY = 'bs.modal';
1688
1623
  var EVENT_KEY = '.' + DATA_KEY;
1689
1624
  var DATA_API_KEY = '.data-api';
@@ -1741,7 +1676,7 @@ var Modal = (function ($) {
1741
1676
  * ------------------------------------------------------------------------
1742
1677
  */
1743
1678
 
1744
- var Modal = (function () {
1679
+ var Modal = function () {
1745
1680
  function Modal(element, config) {
1746
1681
  _classCallCheck(this, Modal);
1747
1682
 
@@ -1756,382 +1691,352 @@ var Modal = (function ($) {
1756
1691
  this._scrollbarWidth = 0;
1757
1692
  }
1758
1693
 
1759
- /**
1760
- * ------------------------------------------------------------------------
1761
- * Data Api implementation
1762
- * ------------------------------------------------------------------------
1763
- */
1764
-
1765
1694
  // getters
1766
1695
 
1767
- _createClass(Modal, [{
1768
- key: 'toggle',
1696
+ // public
1769
1697
 
1770
- // public
1698
+ Modal.prototype.toggle = function toggle(relatedTarget) {
1699
+ return this._isShown ? this.hide() : this.show(relatedTarget);
1700
+ };
1771
1701
 
1772
- value: function toggle(relatedTarget) {
1773
- return this._isShown ? this.hide() : this.show(relatedTarget);
1774
- }
1775
- }, {
1776
- key: 'show',
1777
- value: function show(relatedTarget) {
1778
- var _this7 = this;
1702
+ Modal.prototype.show = function show(relatedTarget) {
1703
+ var _this7 = this;
1779
1704
 
1780
- var showEvent = $.Event(Event.SHOW, {
1781
- relatedTarget: relatedTarget
1782
- });
1705
+ var showEvent = $.Event(Event.SHOW, {
1706
+ relatedTarget: relatedTarget
1707
+ });
1783
1708
 
1784
- $(this._element).trigger(showEvent);
1709
+ $(this._element).trigger(showEvent);
1785
1710
 
1786
- if (this._isShown || showEvent.isDefaultPrevented()) {
1787
- return;
1788
- }
1711
+ if (this._isShown || showEvent.isDefaultPrevented()) {
1712
+ return;
1713
+ }
1789
1714
 
1790
- this._isShown = true;
1715
+ this._isShown = true;
1791
1716
 
1792
- this._checkScrollbar();
1793
- this._setScrollbar();
1717
+ this._checkScrollbar();
1718
+ this._setScrollbar();
1794
1719
 
1795
- $(document.body).addClass(ClassName.OPEN);
1720
+ $(document.body).addClass(ClassName.OPEN);
1796
1721
 
1797
- this._setEscapeEvent();
1798
- this._setResizeEvent();
1722
+ this._setEscapeEvent();
1723
+ this._setResizeEvent();
1799
1724
 
1800
- $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
1725
+ $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
1801
1726
 
1802
- $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
1803
- $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) {
1804
- if ($(event.target).is(_this7._element)) {
1805
- _this7._ignoreBackdropClick = true;
1806
- }
1807
- });
1727
+ $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
1728
+ $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) {
1729
+ if ($(event.target).is(_this7._element)) {
1730
+ _this7._ignoreBackdropClick = true;
1731
+ }
1808
1732
  });
1733
+ });
1734
+
1735
+ this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
1736
+ };
1809
1737
 
1810
- this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
1738
+ Modal.prototype.hide = function hide(event) {
1739
+ if (event) {
1740
+ event.preventDefault();
1811
1741
  }
1812
- }, {
1813
- key: 'hide',
1814
- value: function hide(event) {
1815
- if (event) {
1816
- event.preventDefault();
1817
- }
1818
1742
 
1819
- var hideEvent = $.Event(Event.HIDE);
1743
+ var hideEvent = $.Event(Event.HIDE);
1820
1744
 
1821
- $(this._element).trigger(hideEvent);
1745
+ $(this._element).trigger(hideEvent);
1822
1746
 
1823
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
1824
- return;
1825
- }
1747
+ if (!this._isShown || hideEvent.isDefaultPrevented()) {
1748
+ return;
1749
+ }
1826
1750
 
1827
- this._isShown = false;
1751
+ this._isShown = false;
1828
1752
 
1829
- this._setEscapeEvent();
1830
- this._setResizeEvent();
1753
+ this._setEscapeEvent();
1754
+ this._setResizeEvent();
1831
1755
 
1832
- $(document).off(Event.FOCUSIN);
1756
+ $(document).off(Event.FOCUSIN);
1833
1757
 
1834
- $(this._element).removeClass(ClassName.IN);
1758
+ $(this._element).removeClass(ClassName.IN);
1835
1759
 
1836
- $(this._element).off(Event.CLICK_DISMISS);
1837
- $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
1760
+ $(this._element).off(Event.CLICK_DISMISS);
1761
+ $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
1838
1762
 
1839
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
1763
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
1840
1764
 
1841
- $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
1842
- } else {
1843
- this._hideModal();
1844
- }
1845
- }
1846
- }, {
1847
- key: 'dispose',
1848
- value: function dispose() {
1849
- $.removeData(this._element, DATA_KEY);
1850
-
1851
- $(window).off(EVENT_KEY);
1852
- $(document).off(EVENT_KEY);
1853
- $(this._element).off(EVENT_KEY);
1854
- $(this._backdrop).off(EVENT_KEY);
1855
-
1856
- this._config = null;
1857
- this._element = null;
1858
- this._dialog = null;
1859
- this._backdrop = null;
1860
- this._isShown = null;
1861
- this._isBodyOverflowing = null;
1862
- this._ignoreBackdropClick = null;
1863
- this._originalBodyPadding = null;
1864
- this._scrollbarWidth = null;
1765
+ $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
1766
+ } else {
1767
+ this._hideModal();
1865
1768
  }
1769
+ };
1866
1770
 
1867
- // private
1771
+ Modal.prototype.dispose = function dispose() {
1772
+ $.removeData(this._element, DATA_KEY);
1868
1773
 
1869
- }, {
1870
- key: '_getConfig',
1871
- value: function _getConfig(config) {
1872
- config = $.extend({}, Default, config);
1873
- Util.typeCheckConfig(NAME, config, DefaultType);
1874
- return config;
1875
- }
1876
- }, {
1877
- key: '_showElement',
1878
- value: function _showElement(relatedTarget) {
1879
- var _this8 = this;
1774
+ $(window).off(EVENT_KEY);
1775
+ $(document).off(EVENT_KEY);
1776
+ $(this._element).off(EVENT_KEY);
1777
+ $(this._backdrop).off(EVENT_KEY);
1880
1778
 
1881
- var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
1779
+ this._config = null;
1780
+ this._element = null;
1781
+ this._dialog = null;
1782
+ this._backdrop = null;
1783
+ this._isShown = null;
1784
+ this._isBodyOverflowing = null;
1785
+ this._ignoreBackdropClick = null;
1786
+ this._originalBodyPadding = null;
1787
+ this._scrollbarWidth = null;
1788
+ };
1882
1789
 
1883
- if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
1884
- // don't move modals dom position
1885
- document.body.appendChild(this._element);
1886
- }
1790
+ // private
1887
1791
 
1888
- this._element.style.display = 'block';
1889
- this._element.removeAttribute('aria-hidden');
1890
- this._element.scrollTop = 0;
1792
+ Modal.prototype._getConfig = function _getConfig(config) {
1793
+ config = $.extend({}, Default, config);
1794
+ Util.typeCheckConfig(NAME, config, DefaultType);
1795
+ return config;
1796
+ };
1891
1797
 
1892
- if (transition) {
1893
- Util.reflow(this._element);
1894
- }
1798
+ Modal.prototype._showElement = function _showElement(relatedTarget) {
1799
+ var _this8 = this;
1895
1800
 
1896
- $(this._element).addClass(ClassName.IN);
1801
+ var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
1897
1802
 
1898
- if (this._config.focus) {
1899
- this._enforceFocus();
1900
- }
1803
+ if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
1804
+ // don't move modals dom position
1805
+ document.body.appendChild(this._element);
1806
+ }
1901
1807
 
1902
- var shownEvent = $.Event(Event.SHOWN, {
1903
- relatedTarget: relatedTarget
1904
- });
1808
+ this._element.style.display = 'block';
1809
+ this._element.removeAttribute('aria-hidden');
1810
+ this._element.scrollTop = 0;
1905
1811
 
1906
- var transitionComplete = function transitionComplete() {
1907
- if (_this8._config.focus) {
1908
- _this8._element.focus();
1909
- }
1910
- $(_this8._element).trigger(shownEvent);
1911
- };
1912
-
1913
- if (transition) {
1914
- $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
1915
- } else {
1916
- transitionComplete();
1917
- }
1812
+ if (transition) {
1813
+ Util.reflow(this._element);
1918
1814
  }
1919
- }, {
1920
- key: '_enforceFocus',
1921
- value: function _enforceFocus() {
1922
- var _this9 = this;
1923
-
1924
- $(document).off(Event.FOCUSIN) // guard against infinite focus loop
1925
- .on(Event.FOCUSIN, function (event) {
1926
- if (document !== event.target && _this9._element !== event.target && !$(_this9._element).has(event.target).length) {
1927
- _this9._element.focus();
1928
- }
1929
- });
1815
+
1816
+ $(this._element).addClass(ClassName.IN);
1817
+
1818
+ if (this._config.focus) {
1819
+ this._enforceFocus();
1930
1820
  }
1931
- }, {
1932
- key: '_setEscapeEvent',
1933
- value: function _setEscapeEvent() {
1934
- var _this10 = this;
1935
-
1936
- if (this._isShown && this._config.keyboard) {
1937
- $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
1938
- if (event.which === ESCAPE_KEYCODE) {
1939
- _this10.hide();
1940
- }
1941
- });
1942
- } else if (!this._isShown) {
1943
- $(this._element).off(Event.KEYDOWN_DISMISS);
1821
+
1822
+ var shownEvent = $.Event(Event.SHOWN, {
1823
+ relatedTarget: relatedTarget
1824
+ });
1825
+
1826
+ var transitionComplete = function transitionComplete() {
1827
+ if (_this8._config.focus) {
1828
+ _this8._element.focus();
1944
1829
  }
1830
+ $(_this8._element).trigger(shownEvent);
1831
+ };
1832
+
1833
+ if (transition) {
1834
+ $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
1835
+ } else {
1836
+ transitionComplete();
1945
1837
  }
1946
- }, {
1947
- key: '_setResizeEvent',
1948
- value: function _setResizeEvent() {
1949
- if (this._isShown) {
1950
- $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));
1951
- } else {
1952
- $(window).off(Event.RESIZE);
1838
+ };
1839
+
1840
+ Modal.prototype._enforceFocus = function _enforceFocus() {
1841
+ var _this9 = this;
1842
+
1843
+ $(document).off(Event.FOCUSIN) // guard against infinite focus loop
1844
+ .on(Event.FOCUSIN, function (event) {
1845
+ if (document !== event.target && _this9._element !== event.target && !$(_this9._element).has(event.target).length) {
1846
+ _this9._element.focus();
1953
1847
  }
1954
- }
1955
- }, {
1956
- key: '_hideModal',
1957
- value: function _hideModal() {
1958
- var _this11 = this;
1959
-
1960
- this._element.style.display = 'none';
1961
- this._element.setAttribute('aria-hidden', 'true');
1962
- this._showBackdrop(function () {
1963
- $(document.body).removeClass(ClassName.OPEN);
1964
- _this11._resetAdjustments();
1965
- _this11._resetScrollbar();
1966
- $(_this11._element).trigger(Event.HIDDEN);
1848
+ });
1849
+ };
1850
+
1851
+ Modal.prototype._setEscapeEvent = function _setEscapeEvent() {
1852
+ var _this10 = this;
1853
+
1854
+ if (this._isShown && this._config.keyboard) {
1855
+ $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
1856
+ if (event.which === ESCAPE_KEYCODE) {
1857
+ _this10.hide();
1858
+ }
1967
1859
  });
1860
+ } else if (!this._isShown) {
1861
+ $(this._element).off(Event.KEYDOWN_DISMISS);
1968
1862
  }
1969
- }, {
1970
- key: '_removeBackdrop',
1971
- value: function _removeBackdrop() {
1972
- if (this._backdrop) {
1973
- $(this._backdrop).remove();
1974
- this._backdrop = null;
1975
- }
1863
+ };
1864
+
1865
+ Modal.prototype._setResizeEvent = function _setResizeEvent() {
1866
+ if (this._isShown) {
1867
+ $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));
1868
+ } else {
1869
+ $(window).off(Event.RESIZE);
1976
1870
  }
1977
- }, {
1978
- key: '_showBackdrop',
1979
- value: function _showBackdrop(callback) {
1980
- var _this12 = this;
1871
+ };
1981
1872
 
1982
- var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
1873
+ Modal.prototype._hideModal = function _hideModal() {
1874
+ var _this11 = this;
1983
1875
 
1984
- if (this._isShown && this._config.backdrop) {
1985
- var doAnimate = Util.supportsTransitionEnd() && animate;
1876
+ this._element.style.display = 'none';
1877
+ this._element.setAttribute('aria-hidden', 'true');
1878
+ this._showBackdrop(function () {
1879
+ $(document.body).removeClass(ClassName.OPEN);
1880
+ _this11._resetAdjustments();
1881
+ _this11._resetScrollbar();
1882
+ $(_this11._element).trigger(Event.HIDDEN);
1883
+ });
1884
+ };
1986
1885
 
1987
- this._backdrop = document.createElement('div');
1988
- this._backdrop.className = ClassName.BACKDROP;
1886
+ Modal.prototype._removeBackdrop = function _removeBackdrop() {
1887
+ if (this._backdrop) {
1888
+ $(this._backdrop).remove();
1889
+ this._backdrop = null;
1890
+ }
1891
+ };
1989
1892
 
1990
- if (animate) {
1991
- $(this._backdrop).addClass(animate);
1992
- }
1893
+ Modal.prototype._showBackdrop = function _showBackdrop(callback) {
1894
+ var _this12 = this;
1993
1895
 
1994
- $(this._backdrop).appendTo(document.body);
1896
+ var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
1995
1897
 
1996
- $(this._element).on(Event.CLICK_DISMISS, function (event) {
1997
- if (_this12._ignoreBackdropClick) {
1998
- _this12._ignoreBackdropClick = false;
1999
- return;
2000
- }
2001
- if (event.target !== event.currentTarget) {
2002
- return;
2003
- }
2004
- if (_this12._config.backdrop === 'static') {
2005
- _this12._element.focus();
2006
- } else {
2007
- _this12.hide();
2008
- }
2009
- });
1898
+ if (this._isShown && this._config.backdrop) {
1899
+ var doAnimate = Util.supportsTransitionEnd() && animate;
2010
1900
 
2011
- if (doAnimate) {
2012
- Util.reflow(this._backdrop);
2013
- }
1901
+ this._backdrop = document.createElement('div');
1902
+ this._backdrop.className = ClassName.BACKDROP;
1903
+
1904
+ if (animate) {
1905
+ $(this._backdrop).addClass(animate);
1906
+ }
2014
1907
 
2015
- $(this._backdrop).addClass(ClassName.IN);
1908
+ $(this._backdrop).appendTo(document.body);
2016
1909
 
2017
- if (!callback) {
1910
+ $(this._element).on(Event.CLICK_DISMISS, function (event) {
1911
+ if (_this12._ignoreBackdropClick) {
1912
+ _this12._ignoreBackdropClick = false;
2018
1913
  return;
2019
1914
  }
2020
-
2021
- if (!doAnimate) {
2022
- callback();
1915
+ if (event.target !== event.currentTarget) {
2023
1916
  return;
2024
1917
  }
1918
+ if (_this12._config.backdrop === 'static') {
1919
+ _this12._element.focus();
1920
+ } else {
1921
+ _this12.hide();
1922
+ }
1923
+ });
2025
1924
 
2026
- $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2027
- } else if (!this._isShown && this._backdrop) {
2028
- $(this._backdrop).removeClass(ClassName.IN);
1925
+ if (doAnimate) {
1926
+ Util.reflow(this._backdrop);
1927
+ }
2029
1928
 
2030
- var callbackRemove = function callbackRemove() {
2031
- _this12._removeBackdrop();
2032
- if (callback) {
2033
- callback();
2034
- }
2035
- };
1929
+ $(this._backdrop).addClass(ClassName.IN);
2036
1930
 
2037
- if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
2038
- $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2039
- } else {
2040
- callbackRemove();
2041
- }
2042
- } else if (callback) {
1931
+ if (!callback) {
1932
+ return;
1933
+ }
1934
+
1935
+ if (!doAnimate) {
2043
1936
  callback();
1937
+ return;
2044
1938
  }
2045
- }
2046
1939
 
2047
- // ----------------------------------------------------------------------
2048
- // the following methods are used to handle overflowing modals
2049
- // todo (fat): these should probably be refactored out of modal.js
2050
- // ----------------------------------------------------------------------
1940
+ $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
1941
+ } else if (!this._isShown && this._backdrop) {
1942
+ $(this._backdrop).removeClass(ClassName.IN);
2051
1943
 
2052
- }, {
2053
- key: '_handleUpdate',
2054
- value: function _handleUpdate() {
2055
- this._adjustDialog();
2056
- }
2057
- }, {
2058
- key: '_adjustDialog',
2059
- value: function _adjustDialog() {
2060
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
1944
+ var callbackRemove = function callbackRemove() {
1945
+ _this12._removeBackdrop();
1946
+ if (callback) {
1947
+ callback();
1948
+ }
1949
+ };
2061
1950
 
2062
- if (!this._isBodyOverflowing && isModalOverflowing) {
2063
- this._element.style.paddingLeft = this._scrollbarWidth + 'px';
1951
+ if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
1952
+ $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
1953
+ } else {
1954
+ callbackRemove();
2064
1955
  }
1956
+ } else if (callback) {
1957
+ callback();
1958
+ }
1959
+ };
2065
1960
 
2066
- if (this._isBodyOverflowing && !isModalOverflowing) {
2067
- this._element.style.paddingRight = this._scrollbarWidth + 'px';
2068
- }
1961
+ // ----------------------------------------------------------------------
1962
+ // the following methods are used to handle overflowing modals
1963
+ // todo (fat): these should probably be refactored out of modal.js
1964
+ // ----------------------------------------------------------------------
1965
+
1966
+ Modal.prototype._handleUpdate = function _handleUpdate() {
1967
+ this._adjustDialog();
1968
+ };
1969
+
1970
+ Modal.prototype._adjustDialog = function _adjustDialog() {
1971
+ var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
1972
+
1973
+ if (!this._isBodyOverflowing && isModalOverflowing) {
1974
+ this._element.style.paddingLeft = this._scrollbarWidth + 'px';
2069
1975
  }
2070
- }, {
2071
- key: '_resetAdjustments',
2072
- value: function _resetAdjustments() {
2073
- this._element.style.paddingLeft = '';
2074
- this._element.style.paddingRight = '';
1976
+
1977
+ if (this._isBodyOverflowing && !isModalOverflowing) {
1978
+ this._element.style.paddingRight = this._scrollbarWidth + 'px';
2075
1979
  }
2076
- }, {
2077
- key: '_checkScrollbar',
2078
- value: function _checkScrollbar() {
2079
- this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
2080
- this._scrollbarWidth = this._getScrollbarWidth();
1980
+ };
1981
+
1982
+ Modal.prototype._resetAdjustments = function _resetAdjustments() {
1983
+ this._element.style.paddingLeft = '';
1984
+ this._element.style.paddingRight = '';
1985
+ };
1986
+
1987
+ Modal.prototype._checkScrollbar = function _checkScrollbar() {
1988
+ this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
1989
+ this._scrollbarWidth = this._getScrollbarWidth();
1990
+ };
1991
+
1992
+ Modal.prototype._setScrollbar = function _setScrollbar() {
1993
+ var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
1994
+
1995
+ this._originalBodyPadding = document.body.style.paddingRight || '';
1996
+
1997
+ if (this._isBodyOverflowing) {
1998
+ document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
2081
1999
  }
2082
- }, {
2083
- key: '_setScrollbar',
2084
- value: function _setScrollbar() {
2085
- var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
2000
+ };
2086
2001
 
2087
- this._originalBodyPadding = document.body.style.paddingRight || '';
2002
+ Modal.prototype._resetScrollbar = function _resetScrollbar() {
2003
+ document.body.style.paddingRight = this._originalBodyPadding;
2004
+ };
2088
2005
 
2089
- if (this._isBodyOverflowing) {
2090
- document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
2006
+ Modal.prototype._getScrollbarWidth = function _getScrollbarWidth() {
2007
+ // thx d.walsh
2008
+ var scrollDiv = document.createElement('div');
2009
+ scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
2010
+ document.body.appendChild(scrollDiv);
2011
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
2012
+ document.body.removeChild(scrollDiv);
2013
+ return scrollbarWidth;
2014
+ };
2015
+
2016
+ // static
2017
+
2018
+ Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
2019
+ return this.each(function () {
2020
+ var data = $(this).data(DATA_KEY);
2021
+ var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config);
2022
+
2023
+ if (!data) {
2024
+ data = new Modal(this, _config);
2025
+ $(this).data(DATA_KEY, data);
2091
2026
  }
2092
- }
2093
- }, {
2094
- key: '_resetScrollbar',
2095
- value: function _resetScrollbar() {
2096
- document.body.style.paddingRight = this._originalBodyPadding;
2097
- }
2098
- }, {
2099
- key: '_getScrollbarWidth',
2100
- value: function _getScrollbarWidth() {
2101
- // thx d.walsh
2102
- var scrollDiv = document.createElement('div');
2103
- scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
2104
- document.body.appendChild(scrollDiv);
2105
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
2106
- document.body.removeChild(scrollDiv);
2107
- return scrollbarWidth;
2108
- }
2109
-
2110
- // static
2111
-
2112
- }], [{
2113
- key: '_jQueryInterface',
2114
- value: function _jQueryInterface(config, relatedTarget) {
2115
- return this.each(function () {
2116
- var data = $(this).data(DATA_KEY);
2117
- var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
2118
-
2119
- if (!data) {
2120
- data = new Modal(this, _config);
2121
- $(this).data(DATA_KEY, data);
2122
- }
2123
2027
 
2124
- if (typeof config === 'string') {
2125
- if (data[config] === undefined) {
2126
- throw new Error('No method named "' + config + '"');
2127
- }
2128
- data[config](relatedTarget);
2129
- } else if (_config.show) {
2130
- data.show(relatedTarget);
2028
+ if (typeof config === 'string') {
2029
+ if (data[config] === undefined) {
2030
+ throw new Error('No method named "' + config + '"');
2131
2031
  }
2132
- });
2133
- }
2134
- }, {
2032
+ data[config](relatedTarget);
2033
+ } else if (_config.show) {
2034
+ data.show(relatedTarget);
2035
+ }
2036
+ });
2037
+ };
2038
+
2039
+ _createClass(Modal, null, [{
2135
2040
  key: 'VERSION',
2136
2041
  get: function get() {
2137
2042
  return VERSION;
@@ -2144,12 +2049,18 @@ var Modal = (function ($) {
2144
2049
  }]);
2145
2050
 
2146
2051
  return Modal;
2147
- })();
2052
+ }();
2053
+
2054
+ /**
2055
+ * ------------------------------------------------------------------------
2056
+ * Data Api implementation
2057
+ * ------------------------------------------------------------------------
2058
+ */
2148
2059
 
2149
2060
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
2150
2061
  var _this13 = this;
2151
2062
 
2152
- var target = undefined;
2063
+ var target = void 0;
2153
2064
  var selector = Util.getSelectorFromElement(this);
2154
2065
 
2155
2066
  if (selector) {
@@ -2192,16 +2103,16 @@ var Modal = (function ($) {
2192
2103
  };
2193
2104
 
2194
2105
  return Modal;
2195
- })(jQuery);
2106
+ }(jQuery);
2196
2107
 
2197
2108
  /**
2198
2109
  * --------------------------------------------------------------------------
2199
- * Bootstrap (v4.0.0-alpha.4): scrollspy.js
2110
+ * Bootstrap (v4.0.0-alpha.5): scrollspy.js
2200
2111
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2201
2112
  * --------------------------------------------------------------------------
2202
2113
  */
2203
2114
 
2204
- var ScrollSpy = (function ($) {
2115
+ var ScrollSpy = function ($) {
2205
2116
 
2206
2117
  /**
2207
2118
  * ------------------------------------------------------------------------
@@ -2210,7 +2121,7 @@ var ScrollSpy = (function ($) {
2210
2121
  */
2211
2122
 
2212
2123
  var NAME = 'scrollspy';
2213
- var VERSION = '4.0.0-alpha.4';
2124
+ var VERSION = '4.0.0-alpha.5';
2214
2125
  var DATA_KEY = 'bs.scrollspy';
2215
2126
  var EVENT_KEY = '.' + DATA_KEY;
2216
2127
  var DATA_API_KEY = '.data-api';
@@ -2265,7 +2176,7 @@ var ScrollSpy = (function ($) {
2265
2176
  * ------------------------------------------------------------------------
2266
2177
  */
2267
2178
 
2268
- var ScrollSpy = (function () {
2179
+ var ScrollSpy = function () {
2269
2180
  function ScrollSpy(element, config) {
2270
2181
  _classCallCheck(this, ScrollSpy);
2271
2182
 
@@ -2284,192 +2195,174 @@ var ScrollSpy = (function ($) {
2284
2195
  this._process();
2285
2196
  }
2286
2197
 
2287
- /**
2288
- * ------------------------------------------------------------------------
2289
- * Data Api implementation
2290
- * ------------------------------------------------------------------------
2291
- */
2292
-
2293
2198
  // getters
2294
2199
 
2295
- _createClass(ScrollSpy, [{
2296
- key: 'refresh',
2200
+ // public
2297
2201
 
2298
- // public
2202
+ ScrollSpy.prototype.refresh = function refresh() {
2203
+ var _this14 = this;
2299
2204
 
2300
- value: function refresh() {
2301
- var _this14 = this;
2205
+ var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
2302
2206
 
2303
- var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
2207
+ var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
2304
2208
 
2305
- var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
2209
+ var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
2306
2210
 
2307
- var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
2211
+ this._offsets = [];
2212
+ this._targets = [];
2308
2213
 
2309
- this._offsets = [];
2310
- this._targets = [];
2214
+ this._scrollHeight = this._getScrollHeight();
2311
2215
 
2312
- this._scrollHeight = this._getScrollHeight();
2216
+ var targets = $.makeArray($(this._selector));
2313
2217
 
2314
- var targets = $.makeArray($(this._selector));
2218
+ targets.map(function (element) {
2219
+ var target = void 0;
2220
+ var targetSelector = Util.getSelectorFromElement(element);
2315
2221
 
2316
- targets.map(function (element) {
2317
- var target = undefined;
2318
- var targetSelector = Util.getSelectorFromElement(element);
2222
+ if (targetSelector) {
2223
+ target = $(targetSelector)[0];
2224
+ }
2319
2225
 
2320
- if (targetSelector) {
2321
- target = $(targetSelector)[0];
2322
- }
2226
+ if (target && (target.offsetWidth || target.offsetHeight)) {
2227
+ // todo (fat): remove sketch reliance on jQuery position/offset
2228
+ return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
2229
+ }
2230
+ return null;
2231
+ }).filter(function (item) {
2232
+ return item;
2233
+ }).sort(function (a, b) {
2234
+ return a[0] - b[0];
2235
+ }).forEach(function (item) {
2236
+ _this14._offsets.push(item[0]);
2237
+ _this14._targets.push(item[1]);
2238
+ });
2239
+ };
2323
2240
 
2324
- if (target && (target.offsetWidth || target.offsetHeight)) {
2325
- // todo (fat): remove sketch reliance on jQuery position/offset
2326
- return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
2327
- }
2328
- return null;
2329
- }).filter(function (item) {
2330
- return item;
2331
- }).sort(function (a, b) {
2332
- return a[0] - b[0];
2333
- }).forEach(function (item) {
2334
- _this14._offsets.push(item[0]);
2335
- _this14._targets.push(item[1]);
2336
- });
2337
- }
2338
- }, {
2339
- key: 'dispose',
2340
- value: function dispose() {
2341
- $.removeData(this._element, DATA_KEY);
2342
- $(this._scrollElement).off(EVENT_KEY);
2343
-
2344
- this._element = null;
2345
- this._scrollElement = null;
2346
- this._config = null;
2347
- this._selector = null;
2348
- this._offsets = null;
2349
- this._targets = null;
2350
- this._activeTarget = null;
2351
- this._scrollHeight = null;
2352
- }
2241
+ ScrollSpy.prototype.dispose = function dispose() {
2242
+ $.removeData(this._element, DATA_KEY);
2243
+ $(this._scrollElement).off(EVENT_KEY);
2353
2244
 
2354
- // private
2245
+ this._element = null;
2246
+ this._scrollElement = null;
2247
+ this._config = null;
2248
+ this._selector = null;
2249
+ this._offsets = null;
2250
+ this._targets = null;
2251
+ this._activeTarget = null;
2252
+ this._scrollHeight = null;
2253
+ };
2355
2254
 
2356
- }, {
2357
- key: '_getConfig',
2358
- value: function _getConfig(config) {
2359
- config = $.extend({}, Default, config);
2360
-
2361
- if (typeof config.target !== 'string') {
2362
- var id = $(config.target).attr('id');
2363
- if (!id) {
2364
- id = Util.getUID(NAME);
2365
- $(config.target).attr('id', id);
2366
- }
2367
- config.target = '#' + id;
2368
- }
2255
+ // private
2369
2256
 
2370
- Util.typeCheckConfig(NAME, config, DefaultType);
2257
+ ScrollSpy.prototype._getConfig = function _getConfig(config) {
2258
+ config = $.extend({}, Default, config);
2371
2259
 
2372
- return config;
2373
- }
2374
- }, {
2375
- key: '_getScrollTop',
2376
- value: function _getScrollTop() {
2377
- return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
2378
- }
2379
- }, {
2380
- key: '_getScrollHeight',
2381
- value: function _getScrollHeight() {
2382
- return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
2260
+ if (typeof config.target !== 'string') {
2261
+ var id = $(config.target).attr('id');
2262
+ if (!id) {
2263
+ id = Util.getUID(NAME);
2264
+ $(config.target).attr('id', id);
2265
+ }
2266
+ config.target = '#' + id;
2383
2267
  }
2384
- }, {
2385
- key: '_process',
2386
- value: function _process() {
2387
- var scrollTop = this._getScrollTop() + this._config.offset;
2388
- var scrollHeight = this._getScrollHeight();
2389
- var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
2390
2268
 
2391
- if (this._scrollHeight !== scrollHeight) {
2392
- this.refresh();
2393
- }
2269
+ Util.typeCheckConfig(NAME, config, DefaultType);
2270
+
2271
+ return config;
2272
+ };
2394
2273
 
2395
- if (scrollTop >= maxScroll) {
2396
- var target = this._targets[this._targets.length - 1];
2274
+ ScrollSpy.prototype._getScrollTop = function _getScrollTop() {
2275
+ return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
2276
+ };
2397
2277
 
2398
- if (this._activeTarget !== target) {
2399
- this._activate(target);
2400
- }
2401
- }
2278
+ ScrollSpy.prototype._getScrollHeight = function _getScrollHeight() {
2279
+ return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
2280
+ };
2402
2281
 
2403
- if (this._activeTarget && scrollTop < this._offsets[0]) {
2404
- this._activeTarget = null;
2405
- this._clear();
2406
- return;
2407
- }
2282
+ ScrollSpy.prototype._process = function _process() {
2283
+ var scrollTop = this._getScrollTop() + this._config.offset;
2284
+ var scrollHeight = this._getScrollHeight();
2285
+ var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
2408
2286
 
2409
- for (var i = this._offsets.length; i--;) {
2410
- var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
2287
+ if (this._scrollHeight !== scrollHeight) {
2288
+ this.refresh();
2289
+ }
2411
2290
 
2412
- if (isActiveTarget) {
2413
- this._activate(this._targets[i]);
2414
- }
2291
+ if (scrollTop >= maxScroll) {
2292
+ var target = this._targets[this._targets.length - 1];
2293
+
2294
+ if (this._activeTarget !== target) {
2295
+ this._activate(target);
2415
2296
  }
2416
2297
  }
2417
- }, {
2418
- key: '_activate',
2419
- value: function _activate(target) {
2420
- this._activeTarget = target;
2421
2298
 
2299
+ if (this._activeTarget && scrollTop < this._offsets[0]) {
2300
+ this._activeTarget = null;
2422
2301
  this._clear();
2302
+ return;
2303
+ }
2423
2304
 
2424
- var queries = this._selector.split(',');
2425
- queries = queries.map(function (selector) {
2426
- return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
2427
- });
2428
-
2429
- var $link = $(queries.join(','));
2305
+ for (var i = this._offsets.length; i--;) {
2306
+ var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
2430
2307
 
2431
- if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
2432
- $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2433
- $link.addClass(ClassName.ACTIVE);
2434
- } else {
2435
- // todo (fat) this is kinda sus...
2436
- // recursively add actives to tested nav-links
2437
- $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
2308
+ if (isActiveTarget) {
2309
+ this._activate(this._targets[i]);
2438
2310
  }
2439
-
2440
- $(this._scrollElement).trigger(Event.ACTIVATE, {
2441
- relatedTarget: target
2442
- });
2443
2311
  }
2444
- }, {
2445
- key: '_clear',
2446
- value: function _clear() {
2447
- $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
2312
+ };
2313
+
2314
+ ScrollSpy.prototype._activate = function _activate(target) {
2315
+ this._activeTarget = target;
2316
+
2317
+ this._clear();
2318
+
2319
+ var queries = this._selector.split(',');
2320
+ queries = queries.map(function (selector) {
2321
+ return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
2322
+ });
2323
+
2324
+ var $link = $(queries.join(','));
2325
+
2326
+ if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
2327
+ $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2328
+ $link.addClass(ClassName.ACTIVE);
2329
+ } else {
2330
+ // todo (fat) this is kinda sus...
2331
+ // recursively add actives to tested nav-links
2332
+ $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
2448
2333
  }
2449
2334
 
2450
- // static
2335
+ $(this._scrollElement).trigger(Event.ACTIVATE, {
2336
+ relatedTarget: target
2337
+ });
2338
+ };
2451
2339
 
2452
- }], [{
2453
- key: '_jQueryInterface',
2454
- value: function _jQueryInterface(config) {
2455
- return this.each(function () {
2456
- var data = $(this).data(DATA_KEY);
2457
- var _config = typeof config === 'object' && config || null;
2340
+ ScrollSpy.prototype._clear = function _clear() {
2341
+ $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
2342
+ };
2458
2343
 
2459
- if (!data) {
2460
- data = new ScrollSpy(this, _config);
2461
- $(this).data(DATA_KEY, data);
2462
- }
2344
+ // static
2463
2345
 
2464
- if (typeof config === 'string') {
2465
- if (data[config] === undefined) {
2466
- throw new Error('No method named "' + config + '"');
2467
- }
2468
- data[config]();
2346
+ ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
2347
+ return this.each(function () {
2348
+ var data = $(this).data(DATA_KEY);
2349
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config || null;
2350
+
2351
+ if (!data) {
2352
+ data = new ScrollSpy(this, _config);
2353
+ $(this).data(DATA_KEY, data);
2354
+ }
2355
+
2356
+ if (typeof config === 'string') {
2357
+ if (data[config] === undefined) {
2358
+ throw new Error('No method named "' + config + '"');
2469
2359
  }
2470
- });
2471
- }
2472
- }, {
2360
+ data[config]();
2361
+ }
2362
+ });
2363
+ };
2364
+
2365
+ _createClass(ScrollSpy, null, [{
2473
2366
  key: 'VERSION',
2474
2367
  get: function get() {
2475
2368
  return VERSION;
@@ -2482,7 +2375,13 @@ var ScrollSpy = (function ($) {
2482
2375
  }]);
2483
2376
 
2484
2377
  return ScrollSpy;
2485
- })();
2378
+ }();
2379
+
2380
+ /**
2381
+ * ------------------------------------------------------------------------
2382
+ * Data Api implementation
2383
+ * ------------------------------------------------------------------------
2384
+ */
2486
2385
 
2487
2386
  $(window).on(Event.LOAD_DATA_API, function () {
2488
2387
  var scrollSpys = $.makeArray($(Selector.DATA_SPY));
@@ -2507,16 +2406,16 @@ var ScrollSpy = (function ($) {
2507
2406
  };
2508
2407
 
2509
2408
  return ScrollSpy;
2510
- })(jQuery);
2409
+ }(jQuery);
2511
2410
 
2512
2411
  /**
2513
2412
  * --------------------------------------------------------------------------
2514
- * Bootstrap (v4.0.0-alpha.4): tab.js
2413
+ * Bootstrap (v4.0.0-alpha.5): tab.js
2515
2414
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2516
2415
  * --------------------------------------------------------------------------
2517
2416
  */
2518
2417
 
2519
- var Tab = (function ($) {
2418
+ var Tab = function ($) {
2520
2419
 
2521
2420
  /**
2522
2421
  * ------------------------------------------------------------------------
@@ -2525,7 +2424,7 @@ var Tab = (function ($) {
2525
2424
  */
2526
2425
 
2527
2426
  var NAME = 'tab';
2528
- var VERSION = '4.0.0-alpha.4';
2427
+ var VERSION = '4.0.0-alpha.5';
2529
2428
  var DATA_KEY = 'bs.tab';
2530
2429
  var EVENT_KEY = '.' + DATA_KEY;
2531
2430
  var DATA_API_KEY = '.data-api';
@@ -2566,176 +2465,162 @@ var Tab = (function ($) {
2566
2465
  * ------------------------------------------------------------------------
2567
2466
  */
2568
2467
 
2569
- var Tab = (function () {
2468
+ var Tab = function () {
2570
2469
  function Tab(element) {
2571
2470
  _classCallCheck(this, Tab);
2572
2471
 
2573
2472
  this._element = element;
2574
2473
  }
2575
2474
 
2576
- /**
2577
- * ------------------------------------------------------------------------
2578
- * Data Api implementation
2579
- * ------------------------------------------------------------------------
2580
- */
2581
-
2582
2475
  // getters
2583
2476
 
2584
- _createClass(Tab, [{
2585
- key: 'show',
2586
-
2587
- // public
2477
+ // public
2588
2478
 
2589
- value: function show() {
2590
- var _this15 = this;
2479
+ Tab.prototype.show = function show() {
2480
+ var _this15 = this;
2591
2481
 
2592
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {
2593
- return;
2594
- }
2482
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {
2483
+ return;
2484
+ }
2595
2485
 
2596
- var target = undefined;
2597
- var previous = undefined;
2598
- var ulElement = $(this._element).closest(Selector.UL)[0];
2599
- var selector = Util.getSelectorFromElement(this._element);
2486
+ var target = void 0;
2487
+ var previous = void 0;
2488
+ var ulElement = $(this._element).closest(Selector.UL)[0];
2489
+ var selector = Util.getSelectorFromElement(this._element);
2600
2490
 
2601
- if (ulElement) {
2602
- previous = $.makeArray($(ulElement).find(Selector.ACTIVE));
2603
- previous = previous[previous.length - 1];
2604
- }
2491
+ if (ulElement) {
2492
+ previous = $.makeArray($(ulElement).find(Selector.ACTIVE));
2493
+ previous = previous[previous.length - 1];
2494
+ }
2605
2495
 
2606
- var hideEvent = $.Event(Event.HIDE, {
2607
- relatedTarget: this._element
2608
- });
2496
+ var hideEvent = $.Event(Event.HIDE, {
2497
+ relatedTarget: this._element
2498
+ });
2609
2499
 
2610
- var showEvent = $.Event(Event.SHOW, {
2611
- relatedTarget: previous
2612
- });
2500
+ var showEvent = $.Event(Event.SHOW, {
2501
+ relatedTarget: previous
2502
+ });
2613
2503
 
2614
- if (previous) {
2615
- $(previous).trigger(hideEvent);
2616
- }
2504
+ if (previous) {
2505
+ $(previous).trigger(hideEvent);
2506
+ }
2617
2507
 
2618
- $(this._element).trigger(showEvent);
2508
+ $(this._element).trigger(showEvent);
2619
2509
 
2620
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
2621
- return;
2622
- }
2510
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
2511
+ return;
2512
+ }
2623
2513
 
2624
- if (selector) {
2625
- target = $(selector)[0];
2626
- }
2514
+ if (selector) {
2515
+ target = $(selector)[0];
2516
+ }
2627
2517
 
2628
- this._activate(this._element, ulElement);
2518
+ this._activate(this._element, ulElement);
2629
2519
 
2630
- var complete = function complete() {
2631
- var hiddenEvent = $.Event(Event.HIDDEN, {
2632
- relatedTarget: _this15._element
2633
- });
2520
+ var complete = function complete() {
2521
+ var hiddenEvent = $.Event(Event.HIDDEN, {
2522
+ relatedTarget: _this15._element
2523
+ });
2634
2524
 
2635
- var shownEvent = $.Event(Event.SHOWN, {
2636
- relatedTarget: previous
2637
- });
2525
+ var shownEvent = $.Event(Event.SHOWN, {
2526
+ relatedTarget: previous
2527
+ });
2638
2528
 
2639
- $(previous).trigger(hiddenEvent);
2640
- $(_this15._element).trigger(shownEvent);
2641
- };
2529
+ $(previous).trigger(hiddenEvent);
2530
+ $(_this15._element).trigger(shownEvent);
2531
+ };
2642
2532
 
2643
- if (target) {
2644
- this._activate(target, target.parentNode, complete);
2645
- } else {
2646
- complete();
2647
- }
2648
- }
2649
- }, {
2650
- key: 'dispose',
2651
- value: function dispose() {
2652
- $.removeClass(this._element, DATA_KEY);
2653
- this._element = null;
2533
+ if (target) {
2534
+ this._activate(target, target.parentNode, complete);
2535
+ } else {
2536
+ complete();
2654
2537
  }
2538
+ };
2655
2539
 
2656
- // private
2540
+ Tab.prototype.dispose = function dispose() {
2541
+ $.removeClass(this._element, DATA_KEY);
2542
+ this._element = null;
2543
+ };
2657
2544
 
2658
- }, {
2659
- key: '_activate',
2660
- value: function _activate(element, container, callback) {
2661
- var active = $(container).find(Selector.ACTIVE_CHILD)[0];
2662
- var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
2545
+ // private
2663
2546
 
2664
- var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
2547
+ Tab.prototype._activate = function _activate(element, container, callback) {
2548
+ var active = $(container).find(Selector.ACTIVE_CHILD)[0];
2549
+ var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
2665
2550
 
2666
- if (active && isTransitioning) {
2667
- $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
2668
- } else {
2669
- complete();
2670
- }
2551
+ var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
2671
2552
 
2672
- if (active) {
2673
- $(active).removeClass(ClassName.IN);
2674
- }
2553
+ if (active && isTransitioning) {
2554
+ $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
2555
+ } else {
2556
+ complete();
2675
2557
  }
2676
- }, {
2677
- key: '_transitionComplete',
2678
- value: function _transitionComplete(element, active, isTransitioning, callback) {
2679
- if (active) {
2680
- $(active).removeClass(ClassName.ACTIVE);
2681
2558
 
2682
- var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
2559
+ if (active) {
2560
+ $(active).removeClass(ClassName.IN);
2561
+ }
2562
+ };
2683
2563
 
2684
- if (dropdownChild) {
2685
- $(dropdownChild).removeClass(ClassName.ACTIVE);
2686
- }
2564
+ Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
2565
+ if (active) {
2566
+ $(active).removeClass(ClassName.ACTIVE);
2687
2567
 
2688
- active.setAttribute('aria-expanded', false);
2568
+ var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
2569
+
2570
+ if (dropdownChild) {
2571
+ $(dropdownChild).removeClass(ClassName.ACTIVE);
2689
2572
  }
2690
2573
 
2691
- $(element).addClass(ClassName.ACTIVE);
2692
- element.setAttribute('aria-expanded', true);
2574
+ active.setAttribute('aria-expanded', false);
2575
+ }
2693
2576
 
2694
- if (isTransitioning) {
2695
- Util.reflow(element);
2696
- $(element).addClass(ClassName.IN);
2697
- } else {
2698
- $(element).removeClass(ClassName.FADE);
2699
- }
2577
+ $(element).addClass(ClassName.ACTIVE);
2578
+ element.setAttribute('aria-expanded', true);
2700
2579
 
2701
- if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
2580
+ if (isTransitioning) {
2581
+ Util.reflow(element);
2582
+ $(element).addClass(ClassName.IN);
2583
+ } else {
2584
+ $(element).removeClass(ClassName.FADE);
2585
+ }
2702
2586
 
2703
- var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
2704
- if (dropdownElement) {
2705
- $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2706
- }
2587
+ if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
2707
2588
 
2708
- element.setAttribute('aria-expanded', true);
2589
+ var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
2590
+ if (dropdownElement) {
2591
+ $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2709
2592
  }
2710
2593
 
2711
- if (callback) {
2712
- callback();
2713
- }
2594
+ element.setAttribute('aria-expanded', true);
2595
+ }
2596
+
2597
+ if (callback) {
2598
+ callback();
2714
2599
  }
2600
+ };
2715
2601
 
2716
- // static
2602
+ // static
2717
2603
 
2718
- }], [{
2719
- key: '_jQueryInterface',
2720
- value: function _jQueryInterface(config) {
2721
- return this.each(function () {
2722
- var $this = $(this);
2723
- var data = $this.data(DATA_KEY);
2604
+ Tab._jQueryInterface = function _jQueryInterface(config) {
2605
+ return this.each(function () {
2606
+ var $this = $(this);
2607
+ var data = $this.data(DATA_KEY);
2724
2608
 
2725
- if (!data) {
2726
- data = data = new Tab(this);
2727
- $this.data(DATA_KEY, data);
2728
- }
2609
+ if (!data) {
2610
+ data = data = new Tab(this);
2611
+ $this.data(DATA_KEY, data);
2612
+ }
2729
2613
 
2730
- if (typeof config === 'string') {
2731
- if (data[config] === undefined) {
2732
- throw new Error('No method named "' + config + '"');
2733
- }
2734
- data[config]();
2614
+ if (typeof config === 'string') {
2615
+ if (data[config] === undefined) {
2616
+ throw new Error('No method named "' + config + '"');
2735
2617
  }
2736
- });
2737
- }
2738
- }, {
2618
+ data[config]();
2619
+ }
2620
+ });
2621
+ };
2622
+
2623
+ _createClass(Tab, null, [{
2739
2624
  key: 'VERSION',
2740
2625
  get: function get() {
2741
2626
  return VERSION;
@@ -2743,7 +2628,13 @@ var Tab = (function ($) {
2743
2628
  }]);
2744
2629
 
2745
2630
  return Tab;
2746
- })();
2631
+ }();
2632
+
2633
+ /**
2634
+ * ------------------------------------------------------------------------
2635
+ * Data Api implementation
2636
+ * ------------------------------------------------------------------------
2637
+ */
2747
2638
 
2748
2639
  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
2749
2640
  event.preventDefault();
@@ -2764,25 +2655,25 @@ var Tab = (function ($) {
2764
2655
  };
2765
2656
 
2766
2657
  return Tab;
2767
- })(jQuery);
2658
+ }(jQuery);
2768
2659
 
2769
2660
  /* global Tether */
2770
2661
 
2771
2662
  /**
2772
2663
  * --------------------------------------------------------------------------
2773
- * Bootstrap (v4.0.0-alpha.4): tooltip.js
2664
+ * Bootstrap (v4.0.0-alpha.5): tooltip.js
2774
2665
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2775
2666
  * --------------------------------------------------------------------------
2776
2667
  */
2777
2668
 
2778
- var Tooltip = (function ($) {
2669
+ var Tooltip = function ($) {
2779
2670
 
2780
2671
  /**
2781
2672
  * Check for Tether dependency
2782
- * Tether - http://github.hubspot.com/tether/
2673
+ * Tether - http://tether.io/
2783
2674
  */
2784
2675
  if (window.Tether === undefined) {
2785
- throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
2676
+ throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
2786
2677
  }
2787
2678
 
2788
2679
  /**
@@ -2792,7 +2683,7 @@ var Tooltip = (function ($) {
2792
2683
  */
2793
2684
 
2794
2685
  var NAME = 'tooltip';
2795
- var VERSION = '4.0.0-alpha.4';
2686
+ var VERSION = '4.0.0-alpha.5';
2796
2687
  var DATA_KEY = 'bs.tooltip';
2797
2688
  var EVENT_KEY = '.' + DATA_KEY;
2798
2689
  var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -2801,7 +2692,7 @@ var Tooltip = (function ($) {
2801
2692
 
2802
2693
  var Default = {
2803
2694
  animation: true,
2804
- template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
2695
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>',
2805
2696
  trigger: 'hover focus',
2806
2697
  title: '',
2807
2698
  delay: 0,
@@ -2878,7 +2769,7 @@ var Tooltip = (function ($) {
2878
2769
  * ------------------------------------------------------------------------
2879
2770
  */
2880
2771
 
2881
- var Tooltip = (function () {
2772
+ var Tooltip = function () {
2882
2773
  function Tooltip(element, config) {
2883
2774
  _classCallCheck(this, Tooltip);
2884
2775
 
@@ -2897,439 +2788,407 @@ var Tooltip = (function ($) {
2897
2788
  this._setListeners();
2898
2789
  }
2899
2790
 
2900
- /**
2901
- * ------------------------------------------------------------------------
2902
- * jQuery
2903
- * ------------------------------------------------------------------------
2904
- */
2905
-
2906
2791
  // getters
2907
2792
 
2908
- _createClass(Tooltip, [{
2909
- key: 'enable',
2793
+ // public
2910
2794
 
2911
- // public
2795
+ Tooltip.prototype.enable = function enable() {
2796
+ this._isEnabled = true;
2797
+ };
2912
2798
 
2913
- value: function enable() {
2914
- this._isEnabled = true;
2915
- }
2916
- }, {
2917
- key: 'disable',
2918
- value: function disable() {
2919
- this._isEnabled = false;
2920
- }
2921
- }, {
2922
- key: 'toggleEnabled',
2923
- value: function toggleEnabled() {
2924
- this._isEnabled = !this._isEnabled;
2925
- }
2926
- }, {
2927
- key: 'toggle',
2928
- value: function toggle(event) {
2929
- if (event) {
2930
- var dataKey = this.constructor.DATA_KEY;
2931
- var context = $(event.currentTarget).data(dataKey);
2799
+ Tooltip.prototype.disable = function disable() {
2800
+ this._isEnabled = false;
2801
+ };
2932
2802
 
2933
- if (!context) {
2934
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
2935
- $(event.currentTarget).data(dataKey, context);
2936
- }
2803
+ Tooltip.prototype.toggleEnabled = function toggleEnabled() {
2804
+ this._isEnabled = !this._isEnabled;
2805
+ };
2806
+
2807
+ Tooltip.prototype.toggle = function toggle(event) {
2808
+ if (event) {
2809
+ var dataKey = this.constructor.DATA_KEY;
2810
+ var context = $(event.currentTarget).data(dataKey);
2937
2811
 
2938
- context._activeTrigger.click = !context._activeTrigger.click;
2812
+ if (!context) {
2813
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
2814
+ $(event.currentTarget).data(dataKey, context);
2815
+ }
2939
2816
 
2940
- if (context._isWithActiveTrigger()) {
2941
- context._enter(null, context);
2942
- } else {
2943
- context._leave(null, context);
2944
- }
2945
- } else {
2817
+ context._activeTrigger.click = !context._activeTrigger.click;
2946
2818
 
2947
- if ($(this.getTipElement()).hasClass(ClassName.IN)) {
2948
- this._leave(null, this);
2949
- return;
2950
- }
2819
+ if (context._isWithActiveTrigger()) {
2820
+ context._enter(null, context);
2821
+ } else {
2822
+ context._leave(null, context);
2823
+ }
2824
+ } else {
2951
2825
 
2952
- this._enter(null, this);
2826
+ if ($(this.getTipElement()).hasClass(ClassName.IN)) {
2827
+ this._leave(null, this);
2828
+ return;
2953
2829
  }
2954
- }
2955
- }, {
2956
- key: 'dispose',
2957
- value: function dispose() {
2958
- clearTimeout(this._timeout);
2959
2830
 
2960
- this.cleanupTether();
2831
+ this._enter(null, this);
2832
+ }
2833
+ };
2961
2834
 
2962
- $.removeData(this.element, this.constructor.DATA_KEY);
2835
+ Tooltip.prototype.dispose = function dispose() {
2836
+ clearTimeout(this._timeout);
2963
2837
 
2964
- $(this.element).off(this.constructor.EVENT_KEY);
2838
+ this.cleanupTether();
2965
2839
 
2966
- if (this.tip) {
2967
- $(this.tip).remove();
2968
- }
2840
+ $.removeData(this.element, this.constructor.DATA_KEY);
2969
2841
 
2970
- this._isEnabled = null;
2971
- this._timeout = null;
2972
- this._hoverState = null;
2973
- this._activeTrigger = null;
2974
- this._tether = null;
2842
+ $(this.element).off(this.constructor.EVENT_KEY);
2975
2843
 
2976
- this.element = null;
2977
- this.config = null;
2978
- this.tip = null;
2844
+ if (this.tip) {
2845
+ $(this.tip).remove();
2979
2846
  }
2980
- }, {
2981
- key: 'show',
2982
- value: function show() {
2983
- var _this16 = this;
2984
2847
 
2985
- var showEvent = $.Event(this.constructor.Event.SHOW);
2986
-
2987
- if (this.isWithContent() && this._isEnabled) {
2988
- $(this.element).trigger(showEvent);
2989
-
2990
- var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
2848
+ this._isEnabled = null;
2849
+ this._timeout = null;
2850
+ this._hoverState = null;
2851
+ this._activeTrigger = null;
2852
+ this._tether = null;
2991
2853
 
2992
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
2993
- return;
2994
- }
2854
+ this.element = null;
2855
+ this.config = null;
2856
+ this.tip = null;
2857
+ };
2995
2858
 
2996
- var tip = this.getTipElement();
2997
- var tipId = Util.getUID(this.constructor.NAME);
2859
+ Tooltip.prototype.show = function show() {
2860
+ var _this16 = this;
2998
2861
 
2999
- tip.setAttribute('id', tipId);
3000
- this.element.setAttribute('aria-describedby', tipId);
2862
+ var showEvent = $.Event(this.constructor.Event.SHOW);
3001
2863
 
3002
- this.setContent();
2864
+ if (this.isWithContent() && this._isEnabled) {
2865
+ $(this.element).trigger(showEvent);
3003
2866
 
3004
- if (this.config.animation) {
3005
- $(tip).addClass(ClassName.FADE);
3006
- }
2867
+ var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
3007
2868
 
3008
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
2869
+ if (showEvent.isDefaultPrevented() || !isInTheDom) {
2870
+ return;
2871
+ }
3009
2872
 
3010
- var attachment = this._getAttachment(placement);
2873
+ var tip = this.getTipElement();
2874
+ var tipId = Util.getUID(this.constructor.NAME);
3011
2875
 
3012
- $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
2876
+ tip.setAttribute('id', tipId);
2877
+ this.element.setAttribute('aria-describedby', tipId);
3013
2878
 
3014
- $(this.element).trigger(this.constructor.Event.INSERTED);
2879
+ this.setContent();
3015
2880
 
3016
- this._tether = new Tether({
3017
- attachment: attachment,
3018
- element: tip,
3019
- target: this.element,
3020
- classes: TetherClass,
3021
- classPrefix: CLASS_PREFIX,
3022
- offset: this.config.offset,
3023
- constraints: this.config.constraints,
3024
- addTargetClasses: false
3025
- });
2881
+ if (this.config.animation) {
2882
+ $(tip).addClass(ClassName.FADE);
2883
+ }
3026
2884
 
3027
- Util.reflow(tip);
3028
- this._tether.position();
2885
+ var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
3029
2886
 
3030
- $(tip).addClass(ClassName.IN);
2887
+ var attachment = this._getAttachment(placement);
3031
2888
 
3032
- var complete = function complete() {
3033
- var prevHoverState = _this16._hoverState;
3034
- _this16._hoverState = null;
2889
+ $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
3035
2890
 
3036
- $(_this16.element).trigger(_this16.constructor.Event.SHOWN);
2891
+ $(this.element).trigger(this.constructor.Event.INSERTED);
3037
2892
 
3038
- if (prevHoverState === HoverState.OUT) {
3039
- _this16._leave(null, _this16);
3040
- }
3041
- };
2893
+ this._tether = new Tether({
2894
+ attachment: attachment,
2895
+ element: tip,
2896
+ target: this.element,
2897
+ classes: TetherClass,
2898
+ classPrefix: CLASS_PREFIX,
2899
+ offset: this.config.offset,
2900
+ constraints: this.config.constraints,
2901
+ addTargetClasses: false
2902
+ });
3042
2903
 
3043
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3044
- $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
3045
- return;
3046
- }
2904
+ Util.reflow(tip);
2905
+ this._tether.position();
3047
2906
 
3048
- complete();
3049
- }
3050
- }
3051
- }, {
3052
- key: 'hide',
3053
- value: function hide(callback) {
3054
- var _this17 = this;
2907
+ $(tip).addClass(ClassName.IN);
3055
2908
 
3056
- var tip = this.getTipElement();
3057
- var hideEvent = $.Event(this.constructor.Event.HIDE);
3058
2909
  var complete = function complete() {
3059
- if (_this17._hoverState !== HoverState.IN && tip.parentNode) {
3060
- tip.parentNode.removeChild(tip);
3061
- }
2910
+ var prevHoverState = _this16._hoverState;
2911
+ _this16._hoverState = null;
3062
2912
 
3063
- _this17.element.removeAttribute('aria-describedby');
3064
- $(_this17.element).trigger(_this17.constructor.Event.HIDDEN);
3065
- _this17.cleanupTether();
2913
+ $(_this16.element).trigger(_this16.constructor.Event.SHOWN);
3066
2914
 
3067
- if (callback) {
3068
- callback();
2915
+ if (prevHoverState === HoverState.OUT) {
2916
+ _this16._leave(null, _this16);
3069
2917
  }
3070
2918
  };
3071
2919
 
3072
- $(this.element).trigger(hideEvent);
3073
-
3074
- if (hideEvent.isDefaultPrevented()) {
2920
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
2921
+ $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
3075
2922
  return;
3076
2923
  }
3077
2924
 
3078
- $(tip).removeClass(ClassName.IN);
2925
+ complete();
2926
+ }
2927
+ };
3079
2928
 
3080
- if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
2929
+ Tooltip.prototype.hide = function hide(callback) {
2930
+ var _this17 = this;
3081
2931
 
3082
- $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
3083
- } else {
3084
- complete();
2932
+ var tip = this.getTipElement();
2933
+ var hideEvent = $.Event(this.constructor.Event.HIDE);
2934
+ var complete = function complete() {
2935
+ if (_this17._hoverState !== HoverState.IN && tip.parentNode) {
2936
+ tip.parentNode.removeChild(tip);
3085
2937
  }
3086
2938
 
3087
- this._hoverState = '';
3088
- }
2939
+ _this17.element.removeAttribute('aria-describedby');
2940
+ $(_this17.element).trigger(_this17.constructor.Event.HIDDEN);
2941
+ _this17.cleanupTether();
3089
2942
 
3090
- // protected
2943
+ if (callback) {
2944
+ callback();
2945
+ }
2946
+ };
3091
2947
 
3092
- }, {
3093
- key: 'isWithContent',
3094
- value: function isWithContent() {
3095
- return Boolean(this.getTitle());
3096
- }
3097
- }, {
3098
- key: 'getTipElement',
3099
- value: function getTipElement() {
3100
- return this.tip = this.tip || $(this.config.template)[0];
2948
+ $(this.element).trigger(hideEvent);
2949
+
2950
+ if (hideEvent.isDefaultPrevented()) {
2951
+ return;
3101
2952
  }
3102
- }, {
3103
- key: 'setContent',
3104
- value: function setContent() {
3105
- var $tip = $(this.getTipElement());
3106
2953
 
3107
- this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
2954
+ $(tip).removeClass(ClassName.IN);
3108
2955
 
3109
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
2956
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3110
2957
 
3111
- this.cleanupTether();
2958
+ $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
2959
+ } else {
2960
+ complete();
3112
2961
  }
3113
- }, {
3114
- key: 'setElementContent',
3115
- value: function setElementContent($element, content) {
3116
- var html = this.config.html;
3117
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
3118
- // content is a DOM node or a jQuery
3119
- if (html) {
3120
- if (!$(content).parent().is($element)) {
3121
- $element.empty().append(content);
3122
- }
3123
- } else {
3124
- $element.text($(content).text());
2962
+
2963
+ this._hoverState = '';
2964
+ };
2965
+
2966
+ // protected
2967
+
2968
+ Tooltip.prototype.isWithContent = function isWithContent() {
2969
+ return Boolean(this.getTitle());
2970
+ };
2971
+
2972
+ Tooltip.prototype.getTipElement = function getTipElement() {
2973
+ return this.tip = this.tip || $(this.config.template)[0];
2974
+ };
2975
+
2976
+ Tooltip.prototype.setContent = function setContent() {
2977
+ var $tip = $(this.getTipElement());
2978
+
2979
+ this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
2980
+
2981
+ $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
2982
+
2983
+ this.cleanupTether();
2984
+ };
2985
+
2986
+ Tooltip.prototype.setElementContent = function setElementContent($element, content) {
2987
+ var html = this.config.html;
2988
+ if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) {
2989
+ // content is a DOM node or a jQuery
2990
+ if (html) {
2991
+ if (!$(content).parent().is($element)) {
2992
+ $element.empty().append(content);
3125
2993
  }
3126
2994
  } else {
3127
- $element[html ? 'html' : 'text'](content);
2995
+ $element.text($(content).text());
3128
2996
  }
2997
+ } else {
2998
+ $element[html ? 'html' : 'text'](content);
3129
2999
  }
3130
- }, {
3131
- key: 'getTitle',
3132
- value: function getTitle() {
3133
- var title = this.element.getAttribute('data-original-title');
3000
+ };
3134
3001
 
3135
- if (!title) {
3136
- title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
3137
- }
3002
+ Tooltip.prototype.getTitle = function getTitle() {
3003
+ var title = this.element.getAttribute('data-original-title');
3138
3004
 
3139
- return title;
3140
- }
3141
- }, {
3142
- key: 'cleanupTether',
3143
- value: function cleanupTether() {
3144
- if (this._tether) {
3145
- this._tether.destroy();
3146
- }
3005
+ if (!title) {
3006
+ title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
3147
3007
  }
3148
3008
 
3149
- // private
3009
+ return title;
3010
+ };
3150
3011
 
3151
- }, {
3152
- key: '_getAttachment',
3153
- value: function _getAttachment(placement) {
3154
- return AttachmentMap[placement.toUpperCase()];
3012
+ Tooltip.prototype.cleanupTether = function cleanupTether() {
3013
+ if (this._tether) {
3014
+ this._tether.destroy();
3155
3015
  }
3156
- }, {
3157
- key: '_setListeners',
3158
- value: function _setListeners() {
3159
- var _this18 = this;
3016
+ };
3160
3017
 
3161
- var triggers = this.config.trigger.split(' ');
3018
+ // private
3162
3019
 
3163
- triggers.forEach(function (trigger) {
3164
- if (trigger === 'click') {
3165
- $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18));
3166
- } else if (trigger !== Trigger.MANUAL) {
3167
- var eventIn = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN;
3168
- var eventOut = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT;
3020
+ Tooltip.prototype._getAttachment = function _getAttachment(placement) {
3021
+ return AttachmentMap[placement.toUpperCase()];
3022
+ };
3169
3023
 
3170
- $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18));
3171
- }
3172
- });
3024
+ Tooltip.prototype._setListeners = function _setListeners() {
3025
+ var _this18 = this;
3173
3026
 
3174
- if (this.config.selector) {
3175
- this.config = $.extend({}, this.config, {
3176
- trigger: 'manual',
3177
- selector: ''
3178
- });
3179
- } else {
3180
- this._fixTitle();
3181
- }
3182
- }
3183
- }, {
3184
- key: '_fixTitle',
3185
- value: function _fixTitle() {
3186
- var titleType = typeof this.element.getAttribute('data-original-title');
3187
- if (this.element.getAttribute('title') || titleType !== 'string') {
3188
- this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3189
- this.element.setAttribute('title', '');
3027
+ var triggers = this.config.trigger.split(' ');
3028
+
3029
+ triggers.forEach(function (trigger) {
3030
+ if (trigger === 'click') {
3031
+ $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18));
3032
+ } else if (trigger !== Trigger.MANUAL) {
3033
+ var eventIn = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN;
3034
+ var eventOut = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT;
3035
+
3036
+ $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18));
3190
3037
  }
3038
+ });
3039
+
3040
+ if (this.config.selector) {
3041
+ this.config = $.extend({}, this.config, {
3042
+ trigger: 'manual',
3043
+ selector: ''
3044
+ });
3045
+ } else {
3046
+ this._fixTitle();
3191
3047
  }
3192
- }, {
3193
- key: '_enter',
3194
- value: function _enter(event, context) {
3195
- var dataKey = this.constructor.DATA_KEY;
3048
+ };
3196
3049
 
3197
- context = context || $(event.currentTarget).data(dataKey);
3050
+ Tooltip.prototype._fixTitle = function _fixTitle() {
3051
+ var titleType = _typeof(this.element.getAttribute('data-original-title'));
3052
+ if (this.element.getAttribute('title') || titleType !== 'string') {
3053
+ this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3054
+ this.element.setAttribute('title', '');
3055
+ }
3056
+ };
3198
3057
 
3199
- if (!context) {
3200
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3201
- $(event.currentTarget).data(dataKey, context);
3202
- }
3058
+ Tooltip.prototype._enter = function _enter(event, context) {
3059
+ var dataKey = this.constructor.DATA_KEY;
3203
3060
 
3204
- if (event) {
3205
- context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
3206
- }
3061
+ context = context || $(event.currentTarget).data(dataKey);
3207
3062
 
3208
- if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {
3209
- context._hoverState = HoverState.IN;
3210
- return;
3211
- }
3063
+ if (!context) {
3064
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3065
+ $(event.currentTarget).data(dataKey, context);
3066
+ }
3212
3067
 
3213
- clearTimeout(context._timeout);
3068
+ if (event) {
3069
+ context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
3070
+ }
3214
3071
 
3072
+ if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {
3215
3073
  context._hoverState = HoverState.IN;
3074
+ return;
3075
+ }
3076
+
3077
+ clearTimeout(context._timeout);
3078
+
3079
+ context._hoverState = HoverState.IN;
3216
3080
 
3217
- if (!context.config.delay || !context.config.delay.show) {
3081
+ if (!context.config.delay || !context.config.delay.show) {
3082
+ context.show();
3083
+ return;
3084
+ }
3085
+
3086
+ context._timeout = setTimeout(function () {
3087
+ if (context._hoverState === HoverState.IN) {
3218
3088
  context.show();
3219
- return;
3220
3089
  }
3090
+ }, context.config.delay.show);
3091
+ };
3221
3092
 
3222
- context._timeout = setTimeout(function () {
3223
- if (context._hoverState === HoverState.IN) {
3224
- context.show();
3225
- }
3226
- }, context.config.delay.show);
3227
- }
3228
- }, {
3229
- key: '_leave',
3230
- value: function _leave(event, context) {
3231
- var dataKey = this.constructor.DATA_KEY;
3093
+ Tooltip.prototype._leave = function _leave(event, context) {
3094
+ var dataKey = this.constructor.DATA_KEY;
3232
3095
 
3233
- context = context || $(event.currentTarget).data(dataKey);
3096
+ context = context || $(event.currentTarget).data(dataKey);
3234
3097
 
3235
- if (!context) {
3236
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3237
- $(event.currentTarget).data(dataKey, context);
3238
- }
3098
+ if (!context) {
3099
+ context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3100
+ $(event.currentTarget).data(dataKey, context);
3101
+ }
3239
3102
 
3240
- if (event) {
3241
- context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
3242
- }
3103
+ if (event) {
3104
+ context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
3105
+ }
3243
3106
 
3244
- if (context._isWithActiveTrigger()) {
3245
- return;
3246
- }
3107
+ if (context._isWithActiveTrigger()) {
3108
+ return;
3109
+ }
3247
3110
 
3248
- clearTimeout(context._timeout);
3111
+ clearTimeout(context._timeout);
3249
3112
 
3250
- context._hoverState = HoverState.OUT;
3113
+ context._hoverState = HoverState.OUT;
3114
+
3115
+ if (!context.config.delay || !context.config.delay.hide) {
3116
+ context.hide();
3117
+ return;
3118
+ }
3251
3119
 
3252
- if (!context.config.delay || !context.config.delay.hide) {
3120
+ context._timeout = setTimeout(function () {
3121
+ if (context._hoverState === HoverState.OUT) {
3253
3122
  context.hide();
3254
- return;
3255
3123
  }
3124
+ }, context.config.delay.hide);
3125
+ };
3256
3126
 
3257
- context._timeout = setTimeout(function () {
3258
- if (context._hoverState === HoverState.OUT) {
3259
- context.hide();
3260
- }
3261
- }, context.config.delay.hide);
3262
- }
3263
- }, {
3264
- key: '_isWithActiveTrigger',
3265
- value: function _isWithActiveTrigger() {
3266
- for (var trigger in this._activeTrigger) {
3267
- if (this._activeTrigger[trigger]) {
3268
- return true;
3269
- }
3127
+ Tooltip.prototype._isWithActiveTrigger = function _isWithActiveTrigger() {
3128
+ for (var trigger in this._activeTrigger) {
3129
+ if (this._activeTrigger[trigger]) {
3130
+ return true;
3270
3131
  }
3271
-
3272
- return false;
3273
3132
  }
3274
- }, {
3275
- key: '_getConfig',
3276
- value: function _getConfig(config) {
3277
- config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
3278
3133
 
3279
- if (config.delay && typeof config.delay === 'number') {
3280
- config.delay = {
3281
- show: config.delay,
3282
- hide: config.delay
3283
- };
3284
- }
3134
+ return false;
3135
+ };
3285
3136
 
3286
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
3137
+ Tooltip.prototype._getConfig = function _getConfig(config) {
3138
+ config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
3287
3139
 
3288
- return config;
3140
+ if (config.delay && typeof config.delay === 'number') {
3141
+ config.delay = {
3142
+ show: config.delay,
3143
+ hide: config.delay
3144
+ };
3289
3145
  }
3290
- }, {
3291
- key: '_getDelegateConfig',
3292
- value: function _getDelegateConfig() {
3293
- var config = {};
3294
-
3295
- if (this.config) {
3296
- for (var key in this.config) {
3297
- if (this.constructor.Default[key] !== this.config[key]) {
3298
- config[key] = this.config[key];
3299
- }
3146
+
3147
+ Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
3148
+
3149
+ return config;
3150
+ };
3151
+
3152
+ Tooltip.prototype._getDelegateConfig = function _getDelegateConfig() {
3153
+ var config = {};
3154
+
3155
+ if (this.config) {
3156
+ for (var key in this.config) {
3157
+ if (this.constructor.Default[key] !== this.config[key]) {
3158
+ config[key] = this.config[key];
3300
3159
  }
3301
3160
  }
3302
-
3303
- return config;
3304
3161
  }
3305
3162
 
3306
- // static
3163
+ return config;
3164
+ };
3307
3165
 
3308
- }], [{
3309
- key: '_jQueryInterface',
3310
- value: function _jQueryInterface(config) {
3311
- return this.each(function () {
3312
- var data = $(this).data(DATA_KEY);
3313
- var _config = typeof config === 'object' ? config : null;
3166
+ // static
3314
3167
 
3315
- if (!data && /destroy|hide/.test(config)) {
3316
- return;
3317
- }
3168
+ Tooltip._jQueryInterface = function _jQueryInterface(config) {
3169
+ return this.each(function () {
3170
+ var data = $(this).data(DATA_KEY);
3171
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
3318
3172
 
3319
- if (!data) {
3320
- data = new Tooltip(this, _config);
3321
- $(this).data(DATA_KEY, data);
3322
- }
3173
+ if (!data && /dispose|hide/.test(config)) {
3174
+ return;
3175
+ }
3323
3176
 
3324
- if (typeof config === 'string') {
3325
- if (data[config] === undefined) {
3326
- throw new Error('No method named "' + config + '"');
3327
- }
3328
- data[config]();
3177
+ if (!data) {
3178
+ data = new Tooltip(this, _config);
3179
+ $(this).data(DATA_KEY, data);
3180
+ }
3181
+
3182
+ if (typeof config === 'string') {
3183
+ if (data[config] === undefined) {
3184
+ throw new Error('No method named "' + config + '"');
3329
3185
  }
3330
- });
3331
- }
3332
- }, {
3186
+ data[config]();
3187
+ }
3188
+ });
3189
+ };
3190
+
3191
+ _createClass(Tooltip, null, [{
3333
3192
  key: 'VERSION',
3334
3193
  get: function get() {
3335
3194
  return VERSION;
@@ -3367,7 +3226,13 @@ var Tooltip = (function ($) {
3367
3226
  }]);
3368
3227
 
3369
3228
  return Tooltip;
3370
- })();
3229
+ }();
3230
+
3231
+ /**
3232
+ * ------------------------------------------------------------------------
3233
+ * jQuery
3234
+ * ------------------------------------------------------------------------
3235
+ */
3371
3236
 
3372
3237
  $.fn[NAME] = Tooltip._jQueryInterface;
3373
3238
  $.fn[NAME].Constructor = Tooltip;
@@ -3377,16 +3242,16 @@ var Tooltip = (function ($) {
3377
3242
  };
3378
3243
 
3379
3244
  return Tooltip;
3380
- })(jQuery);
3245
+ }(jQuery);
3381
3246
 
3382
3247
  /**
3383
3248
  * --------------------------------------------------------------------------
3384
- * Bootstrap (v4.0.0-alpha.4): popover.js
3249
+ * Bootstrap (v4.0.0-alpha.5): popover.js
3385
3250
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3386
3251
  * --------------------------------------------------------------------------
3387
3252
  */
3388
3253
 
3389
- var Popover = (function ($) {
3254
+ var Popover = function ($) {
3390
3255
 
3391
3256
  /**
3392
3257
  * ------------------------------------------------------------------------
@@ -3395,7 +3260,7 @@ var Popover = (function ($) {
3395
3260
  */
3396
3261
 
3397
3262
  var NAME = 'popover';
3398
- var VERSION = '4.0.0-alpha.4';
3263
+ var VERSION = '4.0.0-alpha.5';
3399
3264
  var DATA_KEY = 'bs.popover';
3400
3265
  var EVENT_KEY = '.' + DATA_KEY;
3401
3266
  var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -3404,7 +3269,7 @@ var Popover = (function ($) {
3404
3269
  placement: 'right',
3405
3270
  trigger: 'click',
3406
3271
  content: '',
3407
- template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
3272
+ template: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
3408
3273
  });
3409
3274
 
3410
3275
  var DefaultType = $.extend({}, Tooltip.DefaultType, {
@@ -3418,8 +3283,7 @@ var Popover = (function ($) {
3418
3283
 
3419
3284
  var Selector = {
3420
3285
  TITLE: '.popover-title',
3421
- CONTENT: '.popover-content',
3422
- ARROW: '.popover-arrow'
3286
+ CONTENT: '.popover-content'
3423
3287
  };
3424
3288
 
3425
3289
  var Event = {
@@ -3441,85 +3305,72 @@ var Popover = (function ($) {
3441
3305
  * ------------------------------------------------------------------------
3442
3306
  */
3443
3307
 
3444
- var Popover = (function (_Tooltip) {
3308
+ var Popover = function (_Tooltip) {
3445
3309
  _inherits(Popover, _Tooltip);
3446
3310
 
3447
3311
  function Popover() {
3448
3312
  _classCallCheck(this, Popover);
3449
3313
 
3450
- _get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments);
3314
+ return _possibleConstructorReturn(this, _Tooltip.apply(this, arguments));
3451
3315
  }
3452
3316
 
3453
- /**
3454
- * ------------------------------------------------------------------------
3455
- * jQuery
3456
- * ------------------------------------------------------------------------
3457
- */
3317
+ // overrides
3458
3318
 
3459
- _createClass(Popover, [{
3460
- key: 'isWithContent',
3319
+ Popover.prototype.isWithContent = function isWithContent() {
3320
+ return this.getTitle() || this._getContent();
3321
+ };
3461
3322
 
3462
- // overrides
3323
+ Popover.prototype.getTipElement = function getTipElement() {
3324
+ return this.tip = this.tip || $(this.config.template)[0];
3325
+ };
3463
3326
 
3464
- value: function isWithContent() {
3465
- return this.getTitle() || this._getContent();
3466
- }
3467
- }, {
3468
- key: 'getTipElement',
3469
- value: function getTipElement() {
3470
- return this.tip = this.tip || $(this.config.template)[0];
3471
- }
3472
- }, {
3473
- key: 'setContent',
3474
- value: function setContent() {
3475
- var $tip = $(this.getTipElement());
3327
+ Popover.prototype.setContent = function setContent() {
3328
+ var $tip = $(this.getTipElement());
3476
3329
 
3477
- // we use append for html objects to maintain js events
3478
- this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
3479
- this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
3330
+ // we use append for html objects to maintain js events
3331
+ this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
3332
+ this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
3480
3333
 
3481
- $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
3334
+ $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
3482
3335
 
3483
- this.cleanupTether();
3484
- }
3336
+ this.cleanupTether();
3337
+ };
3485
3338
 
3486
- // private
3339
+ // private
3487
3340
 
3488
- }, {
3489
- key: '_getContent',
3490
- value: function _getContent() {
3491
- return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
3492
- }
3341
+ Popover.prototype._getContent = function _getContent() {
3342
+ return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
3343
+ };
3493
3344
 
3494
- // static
3345
+ // static
3495
3346
 
3496
- }], [{
3497
- key: '_jQueryInterface',
3498
- value: function _jQueryInterface(config) {
3499
- return this.each(function () {
3500
- var data = $(this).data(DATA_KEY);
3501
- var _config = typeof config === 'object' ? config : null;
3347
+ Popover._jQueryInterface = function _jQueryInterface(config) {
3348
+ return this.each(function () {
3349
+ var data = $(this).data(DATA_KEY);
3350
+ var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
3502
3351
 
3503
- if (!data && /destroy|hide/.test(config)) {
3504
- return;
3505
- }
3352
+ if (!data && /destroy|hide/.test(config)) {
3353
+ return;
3354
+ }
3506
3355
 
3507
- if (!data) {
3508
- data = new Popover(this, _config);
3509
- $(this).data(DATA_KEY, data);
3510
- }
3356
+ if (!data) {
3357
+ data = new Popover(this, _config);
3358
+ $(this).data(DATA_KEY, data);
3359
+ }
3511
3360
 
3512
- if (typeof config === 'string') {
3513
- if (data[config] === undefined) {
3514
- throw new Error('No method named "' + config + '"');
3515
- }
3516
- data[config]();
3361
+ if (typeof config === 'string') {
3362
+ if (data[config] === undefined) {
3363
+ throw new Error('No method named "' + config + '"');
3517
3364
  }
3518
- });
3519
- }
3520
- }, {
3365
+ data[config]();
3366
+ }
3367
+ });
3368
+ };
3369
+
3370
+ _createClass(Popover, null, [{
3521
3371
  key: 'VERSION',
3522
3372
 
3373
+
3523
3374
  // getters
3524
3375
 
3525
3376
  get: function get() {
@@ -3558,7 +3409,13 @@ var Popover = (function ($) {
3558
3409
  }]);
3559
3410
 
3560
3411
  return Popover;
3561
- })(Tooltip);
3412
+ }(Tooltip);
3413
+
3414
+ /**
3415
+ * ------------------------------------------------------------------------
3416
+ * jQuery
3417
+ * ------------------------------------------------------------------------
3418
+ */
3562
3419
 
3563
3420
  $.fn[NAME] = Popover._jQueryInterface;
3564
3421
  $.fn[NAME].Constructor = Popover;
@@ -3568,6 +3425,6 @@ var Popover = (function ($) {
3568
3425
  };
3569
3426
 
3570
3427
  return Popover;
3571
- })(jQuery);
3572
-
3573
3428
  }(jQuery);
3429
+
3430
+ }();