bootstrap 5.0.0.beta2 → 5.0.0.beta3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +1 -0
  4. data/assets/javascripts/bootstrap.js +2051 -2009
  5. data/assets/javascripts/bootstrap.min.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +75 -118
  7. data/assets/javascripts/bootstrap/base-component.js +23 -37
  8. data/assets/javascripts/bootstrap/button.js +39 -78
  9. data/assets/javascripts/bootstrap/carousel.js +284 -364
  10. data/assets/javascripts/bootstrap/collapse.js +178 -247
  11. data/assets/javascripts/bootstrap/dom/data.js +34 -47
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +71 -77
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +23 -21
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +20 -28
  15. data/assets/javascripts/bootstrap/dropdown.js +195 -265
  16. data/assets/javascripts/bootstrap/modal.js +256 -344
  17. data/assets/javascripts/bootstrap/offcanvas.js +508 -0
  18. data/assets/javascripts/bootstrap/popover.js +88 -157
  19. data/assets/javascripts/bootstrap/scrollspy.js +134 -212
  20. data/assets/javascripts/bootstrap/tab.js +108 -142
  21. data/assets/javascripts/bootstrap/toast.js +113 -183
  22. data/assets/javascripts/bootstrap/tooltip.js +297 -392
  23. data/assets/stylesheets/_bootstrap-grid.scss +1 -1
  24. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  25. data/assets/stylesheets/_bootstrap.scss +2 -1
  26. data/assets/stylesheets/bootstrap/_accordion.scss +22 -32
  27. data/assets/stylesheets/bootstrap/_buttons.scss +2 -0
  28. data/assets/stylesheets/bootstrap/_card.scss +1 -1
  29. data/assets/stylesheets/bootstrap/_dropdown.scss +3 -6
  30. data/assets/stylesheets/bootstrap/_list-group.scss +11 -0
  31. data/assets/stylesheets/bootstrap/_modal.scss +2 -0
  32. data/assets/stylesheets/bootstrap/_nav.scss +7 -0
  33. data/assets/stylesheets/bootstrap/_navbar.scss +2 -0
  34. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  35. data/assets/stylesheets/bootstrap/_progress.scss +3 -0
  36. data/assets/stylesheets/bootstrap/_reboot.scss +7 -21
  37. data/assets/stylesheets/bootstrap/_spinners.scss +4 -0
  38. data/assets/stylesheets/bootstrap/_transitions.scss +2 -0
  39. data/assets/stylesheets/bootstrap/_utilities.scss +65 -37
  40. data/assets/stylesheets/bootstrap/_variables.scss +138 -30
  41. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  42. data/assets/stylesheets/bootstrap/forms/_form-control.scss +0 -4
  43. data/assets/stylesheets/bootstrap/mixins/_alert.scss +2 -0
  44. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +2 -0
  45. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +6 -1
  46. data/assets/stylesheets/bootstrap/mixins/_caret.scss +2 -0
  47. data/assets/stylesheets/bootstrap/mixins/_forms.scss +11 -1
  48. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  49. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -0
  50. data/bootstrap.gemspec +1 -1
  51. data/lib/bootstrap/version.rb +2 -2
  52. data/tasks/updater/js.rb +1 -1
  53. data/tasks/updater/network.rb +7 -1
  54. metadata +6 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap tooltip.js v5.0.0-beta2 (https://getbootstrap.com/)
2
+ * Bootstrap tooltip.js v5.0.0-beta3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
@@ -38,69 +38,19 @@
38
38
  var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
39
39
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
40
40
 
41
- function _defineProperties(target, props) {
42
- for (var i = 0; i < props.length; i++) {
43
- var descriptor = props[i];
44
- descriptor.enumerable = descriptor.enumerable || false;
45
- descriptor.configurable = true;
46
- if ("value" in descriptor) descriptor.writable = true;
47
- Object.defineProperty(target, descriptor.key, descriptor);
48
- }
49
- }
50
-
51
- function _createClass(Constructor, protoProps, staticProps) {
52
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
53
- if (staticProps) _defineProperties(Constructor, staticProps);
54
- return Constructor;
55
- }
56
-
57
- function _extends() {
58
- _extends = Object.assign || function (target) {
59
- for (var i = 1; i < arguments.length; i++) {
60
- var source = arguments[i];
61
-
62
- for (var key in source) {
63
- if (Object.prototype.hasOwnProperty.call(source, key)) {
64
- target[key] = source[key];
65
- }
66
- }
67
- }
68
-
69
- return target;
70
- };
71
-
72
- return _extends.apply(this, arguments);
73
- }
74
-
75
- function _inheritsLoose(subClass, superClass) {
76
- subClass.prototype = Object.create(superClass.prototype);
77
- subClass.prototype.constructor = subClass;
78
-
79
- _setPrototypeOf(subClass, superClass);
80
- }
81
-
82
- function _setPrototypeOf(o, p) {
83
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
84
- o.__proto__ = p;
85
- return o;
86
- };
87
-
88
- return _setPrototypeOf(o, p);
89
- }
90
-
91
41
  /**
92
42
  * --------------------------------------------------------------------------
93
- * Bootstrap (v5.0.0-beta2): util/index.js
43
+ * Bootstrap (v5.0.0-beta3): util/index.js
94
44
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
95
45
  * --------------------------------------------------------------------------
96
46
  */
97
- var MAX_UID = 1000000;
98
- var MILLISECONDS_MULTIPLIER = 1000;
99
- var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
47
+ const MAX_UID = 1000000;
48
+ const MILLISECONDS_MULTIPLIER = 1000;
49
+ const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
100
50
 
101
- var toType = function toType(obj) {
51
+ const toType = obj => {
102
52
  if (obj === null || obj === undefined) {
103
- return "" + obj;
53
+ return `${obj}`;
104
54
  }
105
55
 
106
56
  return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
@@ -112,7 +62,7 @@
112
62
  */
113
63
 
114
64
 
115
- var getUID = function getUID(prefix) {
65
+ const getUID = prefix => {
116
66
  do {
117
67
  prefix += Math.floor(Math.random() * MAX_UID);
118
68
  } while (document.getElementById(prefix));
@@ -120,18 +70,18 @@
120
70
  return prefix;
121
71
  };
122
72
 
123
- var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
73
+ const getTransitionDurationFromElement = element => {
124
74
  if (!element) {
125
75
  return 0;
126
76
  } // Get transition-duration of the element
127
77
 
128
78
 
129
- var _window$getComputedSt = window.getComputedStyle(element),
130
- transitionDuration = _window$getComputedSt.transitionDuration,
131
- transitionDelay = _window$getComputedSt.transitionDelay;
132
-
133
- var floatTransitionDuration = Number.parseFloat(transitionDuration);
134
- var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
79
+ let {
80
+ transitionDuration,
81
+ transitionDelay
82
+ } = window.getComputedStyle(element);
83
+ const floatTransitionDuration = Number.parseFloat(transitionDuration);
84
+ const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
135
85
 
136
86
  if (!floatTransitionDuration && !floatTransitionDelay) {
137
87
  return 0;
@@ -143,18 +93,16 @@
143
93
  return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
144
94
  };
145
95
 
146
- var triggerTransitionEnd = function triggerTransitionEnd(element) {
96
+ const triggerTransitionEnd = element => {
147
97
  element.dispatchEvent(new Event(TRANSITION_END));
148
98
  };
149
99
 
150
- var isElement = function isElement(obj) {
151
- return (obj[0] || obj).nodeType;
152
- };
100
+ const isElement = obj => (obj[0] || obj).nodeType;
153
101
 
154
- var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
155
- var called = false;
156
- var durationPadding = 5;
157
- var emulatedDuration = duration + durationPadding;
102
+ const emulateTransitionEnd = (element, duration) => {
103
+ let called = false;
104
+ const durationPadding = 5;
105
+ const emulatedDuration = duration + durationPadding;
158
106
 
159
107
  function listener() {
160
108
  called = true;
@@ -162,33 +110,33 @@
162
110
  }
163
111
 
164
112
  element.addEventListener(TRANSITION_END, listener);
165
- setTimeout(function () {
113
+ setTimeout(() => {
166
114
  if (!called) {
167
115
  triggerTransitionEnd(element);
168
116
  }
169
117
  }, emulatedDuration);
170
118
  };
171
119
 
172
- var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
173
- Object.keys(configTypes).forEach(function (property) {
174
- var expectedTypes = configTypes[property];
175
- var value = config[property];
176
- var valueType = value && isElement(value) ? 'element' : toType(value);
120
+ const typeCheckConfig = (componentName, config, configTypes) => {
121
+ Object.keys(configTypes).forEach(property => {
122
+ const expectedTypes = configTypes[property];
123
+ const value = config[property];
124
+ const valueType = value && isElement(value) ? 'element' : toType(value);
177
125
 
178
126
  if (!new RegExp(expectedTypes).test(valueType)) {
179
- throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
127
+ throw new TypeError(`${componentName.toUpperCase()}: ` + `Option "${property}" provided type "${valueType}" ` + `but expected type "${expectedTypes}".`);
180
128
  }
181
129
  });
182
130
  };
183
131
 
184
- var findShadowRoot = function findShadowRoot(element) {
132
+ const findShadowRoot = element => {
185
133
  if (!document.documentElement.attachShadow) {
186
134
  return null;
187
135
  } // Can find the shadow root otherwise it'll return the document
188
136
 
189
137
 
190
138
  if (typeof element.getRootNode === 'function') {
191
- var root = element.getRootNode();
139
+ const root = element.getRootNode();
192
140
  return root instanceof ShadowRoot ? root : null;
193
141
  }
194
142
 
@@ -204,13 +152,12 @@
204
152
  return findShadowRoot(element.parentNode);
205
153
  };
206
154
 
207
- var noop = function noop() {
208
- return function () {};
209
- };
155
+ const noop = () => function () {};
210
156
 
211
- var getjQuery = function getjQuery() {
212
- var _window = window,
213
- jQuery = _window.jQuery;
157
+ const getjQuery = () => {
158
+ const {
159
+ jQuery
160
+ } = window;
214
161
 
215
162
  if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
216
163
  return jQuery;
@@ -219,7 +166,7 @@
219
166
  return null;
220
167
  };
221
168
 
222
- var onDOMContentLoaded = function onDOMContentLoaded(callback) {
169
+ const onDOMContentLoaded = callback => {
223
170
  if (document.readyState === 'loading') {
224
171
  document.addEventListener('DOMContentLoaded', callback);
225
172
  } else {
@@ -227,19 +174,19 @@
227
174
  }
228
175
  };
229
176
 
230
- var isRTL = document.documentElement.dir === 'rtl';
177
+ const isRTL = () => document.documentElement.dir === 'rtl';
231
178
 
232
- var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) {
233
- onDOMContentLoaded(function () {
234
- var $ = getjQuery();
179
+ const defineJQueryPlugin = (name, plugin) => {
180
+ onDOMContentLoaded(() => {
181
+ const $ = getjQuery();
235
182
  /* istanbul ignore if */
236
183
 
237
184
  if ($) {
238
- var JQUERY_NO_CONFLICT = $.fn[name];
185
+ const JQUERY_NO_CONFLICT = $.fn[name];
239
186
  $.fn[name] = plugin.jQueryInterface;
240
187
  $.fn[name].Constructor = plugin;
241
188
 
242
- $.fn[name].noConflict = function () {
189
+ $.fn[name].noConflict = () => {
243
190
  $.fn[name] = JQUERY_NO_CONFLICT;
244
191
  return plugin.jQueryInterface;
245
192
  };
@@ -249,29 +196,29 @@
249
196
 
250
197
  /**
251
198
  * --------------------------------------------------------------------------
252
- * Bootstrap (v5.0.0-beta2): util/sanitizer.js
199
+ * Bootstrap (v5.0.0-beta3): util/sanitizer.js
253
200
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
254
201
  * --------------------------------------------------------------------------
255
202
  */
256
- var uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
257
- var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
203
+ const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
204
+ const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
258
205
  /**
259
206
  * A pattern that recognizes a commonly useful subset of URLs that are safe.
260
207
  *
261
208
  * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
262
209
  */
263
210
 
264
- var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
211
+ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
265
212
  /**
266
213
  * A pattern that matches safe data URLs. Only matches image, video and audio types.
267
214
  *
268
215
  * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
269
216
  */
270
217
 
271
- var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
218
+ const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
272
219
 
273
- var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
274
- var attrName = attr.nodeName.toLowerCase();
220
+ const allowedAttribute = (attr, allowedAttributeList) => {
221
+ const attrName = attr.nodeName.toLowerCase();
275
222
 
276
223
  if (allowedAttributeList.includes(attrName)) {
277
224
  if (uriAttrs.has(attrName)) {
@@ -281,11 +228,9 @@
281
228
  return true;
282
229
  }
283
230
 
284
- var regExp = allowedAttributeList.filter(function (attrRegex) {
285
- return attrRegex instanceof RegExp;
286
- }); // Check if a regular expression validates the attribute.
231
+ const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
287
232
 
288
- for (var i = 0, len = regExp.length; i < len; i++) {
233
+ for (let i = 0, len = regExp.length; i < len; i++) {
289
234
  if (regExp[i].test(attrName)) {
290
235
  return true;
291
236
  }
@@ -294,7 +239,7 @@
294
239
  return false;
295
240
  };
296
241
 
297
- var DefaultAllowlist = {
242
+ const DefaultAllowlist = {
298
243
  // Global attributes allowed on any supplied element below.
299
244
  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
300
245
  a: ['target', 'href', 'title', 'rel'],
@@ -328,8 +273,6 @@
328
273
  ul: []
329
274
  };
330
275
  function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
331
- var _ref;
332
-
333
276
  if (!unsafeHtml.length) {
334
277
  return unsafeHtml;
335
278
  }
@@ -338,55 +281,51 @@
338
281
  return sanitizeFn(unsafeHtml);
339
282
  }
340
283
 
341
- var domParser = new window.DOMParser();
342
- var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
343
- var allowlistKeys = Object.keys(allowList);
284
+ const domParser = new window.DOMParser();
285
+ const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
286
+ const allowlistKeys = Object.keys(allowList);
287
+ const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
344
288
 
345
- var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
346
-
347
- var _loop = function _loop(i, len) {
348
- var _ref2;
349
-
350
- var el = elements[i];
351
- var elName = el.nodeName.toLowerCase();
289
+ for (let i = 0, len = elements.length; i < len; i++) {
290
+ const el = elements[i];
291
+ const elName = el.nodeName.toLowerCase();
352
292
 
353
293
  if (!allowlistKeys.includes(elName)) {
354
294
  el.parentNode.removeChild(el);
355
- return "continue";
295
+ continue;
356
296
  }
357
297
 
358
- var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
359
-
360
- var allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
361
- attributeList.forEach(function (attr) {
298
+ const attributeList = [].concat(...el.attributes);
299
+ const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
300
+ attributeList.forEach(attr => {
362
301
  if (!allowedAttribute(attr, allowedAttributes)) {
363
302
  el.removeAttribute(attr.nodeName);
364
303
  }
365
304
  });
366
- };
367
-
368
- for (var i = 0, len = elements.length; i < len; i++) {
369
- var _ret = _loop(i);
370
-
371
- if (_ret === "continue") continue;
372
305
  }
373
306
 
374
307
  return createdDocument.body.innerHTML;
375
308
  }
376
309
 
310
+ /**
311
+ * --------------------------------------------------------------------------
312
+ * Bootstrap (v5.0.0-beta3): tooltip.js
313
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
314
+ * --------------------------------------------------------------------------
315
+ */
377
316
  /**
378
317
  * ------------------------------------------------------------------------
379
318
  * Constants
380
319
  * ------------------------------------------------------------------------
381
320
  */
382
321
 
383
- var NAME = 'tooltip';
384
- var DATA_KEY = 'bs.tooltip';
385
- var EVENT_KEY = "." + DATA_KEY;
386
- var CLASS_PREFIX = 'bs-tooltip';
387
- var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
388
- var DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
389
- var DefaultType = {
322
+ const NAME = 'tooltip';
323
+ const DATA_KEY = 'bs.tooltip';
324
+ const EVENT_KEY = `.${DATA_KEY}`;
325
+ const CLASS_PREFIX = 'bs-tooltip';
326
+ const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
327
+ const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
328
+ const DefaultType = {
390
329
  animation: 'boolean',
391
330
  template: 'string',
392
331
  title: '(string|element|function)',
@@ -405,14 +344,14 @@
405
344
  allowList: 'object',
406
345
  popperConfig: '(null|object|function)'
407
346
  };
408
- var AttachmentMap = {
347
+ const AttachmentMap = {
409
348
  AUTO: 'auto',
410
349
  TOP: 'top',
411
- RIGHT: isRTL ? 'left' : 'right',
350
+ RIGHT: isRTL() ? 'left' : 'right',
412
351
  BOTTOM: 'bottom',
413
- LEFT: isRTL ? 'right' : 'left'
352
+ LEFT: isRTL() ? 'right' : 'left'
414
353
  };
415
- var Default = {
354
+ const Default = {
416
355
  animation: true,
417
356
  template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
418
357
  trigger: 'hover focus',
@@ -431,83 +370,99 @@
431
370
  allowList: DefaultAllowlist,
432
371
  popperConfig: null
433
372
  };
434
- var Event$1 = {
435
- HIDE: "hide" + EVENT_KEY,
436
- HIDDEN: "hidden" + EVENT_KEY,
437
- SHOW: "show" + EVENT_KEY,
438
- SHOWN: "shown" + EVENT_KEY,
439
- INSERTED: "inserted" + EVENT_KEY,
440
- CLICK: "click" + EVENT_KEY,
441
- FOCUSIN: "focusin" + EVENT_KEY,
442
- FOCUSOUT: "focusout" + EVENT_KEY,
443
- MOUSEENTER: "mouseenter" + EVENT_KEY,
444
- MOUSELEAVE: "mouseleave" + EVENT_KEY
373
+ const Event$1 = {
374
+ HIDE: `hide${EVENT_KEY}`,
375
+ HIDDEN: `hidden${EVENT_KEY}`,
376
+ SHOW: `show${EVENT_KEY}`,
377
+ SHOWN: `shown${EVENT_KEY}`,
378
+ INSERTED: `inserted${EVENT_KEY}`,
379
+ CLICK: `click${EVENT_KEY}`,
380
+ FOCUSIN: `focusin${EVENT_KEY}`,
381
+ FOCUSOUT: `focusout${EVENT_KEY}`,
382
+ MOUSEENTER: `mouseenter${EVENT_KEY}`,
383
+ MOUSELEAVE: `mouseleave${EVENT_KEY}`
445
384
  };
446
- var CLASS_NAME_FADE = 'fade';
447
- var CLASS_NAME_MODAL = 'modal';
448
- var CLASS_NAME_SHOW = 'show';
449
- var HOVER_STATE_SHOW = 'show';
450
- var HOVER_STATE_OUT = 'out';
451
- var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
452
- var TRIGGER_HOVER = 'hover';
453
- var TRIGGER_FOCUS = 'focus';
454
- var TRIGGER_CLICK = 'click';
455
- var TRIGGER_MANUAL = 'manual';
385
+ const CLASS_NAME_FADE = 'fade';
386
+ const CLASS_NAME_MODAL = 'modal';
387
+ const CLASS_NAME_SHOW = 'show';
388
+ const HOVER_STATE_SHOW = 'show';
389
+ const HOVER_STATE_OUT = 'out';
390
+ const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
391
+ const TRIGGER_HOVER = 'hover';
392
+ const TRIGGER_FOCUS = 'focus';
393
+ const TRIGGER_CLICK = 'click';
394
+ const TRIGGER_MANUAL = 'manual';
456
395
  /**
457
396
  * ------------------------------------------------------------------------
458
397
  * Class Definition
459
398
  * ------------------------------------------------------------------------
460
399
  */
461
400
 
462
- var Tooltip = /*#__PURE__*/function (_BaseComponent) {
463
- _inheritsLoose(Tooltip, _BaseComponent);
464
-
465
- function Tooltip(element, config) {
466
- var _this;
467
-
401
+ class Tooltip extends BaseComponent__default['default'] {
402
+ constructor(element, config) {
468
403
  if (typeof Popper__namespace === 'undefined') {
469
404
  throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
470
405
  }
471
406
 
472
- _this = _BaseComponent.call(this, element) || this; // private
473
-
474
- _this._isEnabled = true;
475
- _this._timeout = 0;
476
- _this._hoverState = '';
477
- _this._activeTrigger = {};
478
- _this._popper = null; // Protected
407
+ super(element); // private
479
408
 
480
- _this.config = _this._getConfig(config);
481
- _this.tip = null;
409
+ this._isEnabled = true;
410
+ this._timeout = 0;
411
+ this._hoverState = '';
412
+ this._activeTrigger = {};
413
+ this._popper = null; // Protected
482
414
 
483
- _this._setListeners();
415
+ this.config = this._getConfig(config);
416
+ this.tip = null;
484
417
 
485
- return _this;
418
+ this._setListeners();
486
419
  } // Getters
487
420
 
488
421
 
489
- var _proto = Tooltip.prototype;
422
+ static get Default() {
423
+ return Default;
424
+ }
425
+
426
+ static get NAME() {
427
+ return NAME;
428
+ }
490
429
 
491
- // Public
492
- _proto.enable = function enable() {
430
+ static get DATA_KEY() {
431
+ return DATA_KEY;
432
+ }
433
+
434
+ static get Event() {
435
+ return Event$1;
436
+ }
437
+
438
+ static get EVENT_KEY() {
439
+ return EVENT_KEY;
440
+ }
441
+
442
+ static get DefaultType() {
443
+ return DefaultType;
444
+ } // Public
445
+
446
+
447
+ enable() {
493
448
  this._isEnabled = true;
494
- };
449
+ }
495
450
 
496
- _proto.disable = function disable() {
451
+ disable() {
497
452
  this._isEnabled = false;
498
- };
453
+ }
499
454
 
500
- _proto.toggleEnabled = function toggleEnabled() {
455
+ toggleEnabled() {
501
456
  this._isEnabled = !this._isEnabled;
502
- };
457
+ }
503
458
 
504
- _proto.toggle = function toggle(event) {
459
+ toggle(event) {
505
460
  if (!this._isEnabled) {
506
461
  return;
507
462
  }
508
463
 
509
464
  if (event) {
510
- var context = this._initializeOnDelegatedTarget(event);
465
+ const context = this._initializeOnDelegatedTarget(event);
511
466
 
512
467
  context._activeTrigger.click = !context._activeTrigger.click;
513
468
 
@@ -525,12 +480,12 @@
525
480
 
526
481
  this._enter(null, this);
527
482
  }
528
- };
483
+ }
529
484
 
530
- _proto.dispose = function dispose() {
485
+ dispose() {
531
486
  clearTimeout(this._timeout);
532
487
  EventHandler__default['default'].off(this._element, this.constructor.EVENT_KEY);
533
- EventHandler__default['default'].off(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
488
+ EventHandler__default['default'].off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
534
489
 
535
490
  if (this.tip && this.tip.parentNode) {
536
491
  this.tip.parentNode.removeChild(this.tip);
@@ -548,13 +503,10 @@
548
503
  this._popper = null;
549
504
  this.config = null;
550
505
  this.tip = null;
506
+ super.dispose();
507
+ }
551
508
 
552
- _BaseComponent.prototype.dispose.call(this);
553
- };
554
-
555
- _proto.show = function show() {
556
- var _this2 = this;
557
-
509
+ show() {
558
510
  if (this._element.style.display === 'none') {
559
511
  throw new Error('Please use show on visible elements');
560
512
  }
@@ -563,16 +515,16 @@
563
515
  return;
564
516
  }
565
517
 
566
- var showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW);
567
- var shadowRoot = findShadowRoot(this._element);
568
- var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
518
+ const showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW);
519
+ const shadowRoot = findShadowRoot(this._element);
520
+ const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
569
521
 
570
522
  if (showEvent.defaultPrevented || !isInTheDom) {
571
523
  return;
572
524
  }
573
525
 
574
- var tip = this.getTipElement();
575
- var tipId = getUID(this.constructor.NAME);
526
+ const tip = this.getTipElement();
527
+ const tipId = getUID(this.constructor.NAME);
576
528
  tip.setAttribute('id', tipId);
577
529
 
578
530
  this._element.setAttribute('aria-describedby', tipId);
@@ -583,29 +535,32 @@
583
535
  tip.classList.add(CLASS_NAME_FADE);
584
536
  }
585
537
 
586
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;
538
+ const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;
587
539
 
588
- var attachment = this._getAttachment(placement);
540
+ const attachment = this._getAttachment(placement);
589
541
 
590
542
  this._addAttachmentClass(attachment);
591
543
 
592
- var container = this._getContainer();
544
+ const container = this._getContainer();
593
545
 
594
- Data__default['default'].setData(tip, this.constructor.DATA_KEY, this);
546
+ Data__default['default'].set(tip, this.constructor.DATA_KEY, this);
595
547
 
596
548
  if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
597
549
  container.appendChild(tip);
550
+ EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED);
551
+ }
552
+
553
+ if (this._popper) {
554
+ this._popper.update();
555
+ } else {
556
+ this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
598
557
  }
599
558
 
600
- EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED);
601
- this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
602
559
  tip.classList.add(CLASS_NAME_SHOW);
603
- var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
560
+ const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
604
561
 
605
562
  if (customClass) {
606
- var _tip$classList;
607
-
608
- (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' '));
563
+ tip.classList.add(...customClass.split(' '));
609
564
  } // If this is a touch-enabled device we add extra
610
565
  // empty mouseover listeners to the body's immediate children;
611
566
  // only needed because of broken event delegation on iOS
@@ -613,60 +568,60 @@
613
568
 
614
569
 
615
570
  if ('ontouchstart' in document.documentElement) {
616
- var _ref;
617
-
618
- (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
571
+ [].concat(...document.body.children).forEach(element => {
619
572
  EventHandler__default['default'].on(element, 'mouseover', noop());
620
573
  });
621
574
  }
622
575
 
623
- var complete = function complete() {
624
- var prevHoverState = _this2._hoverState;
625
- _this2._hoverState = null;
626
- EventHandler__default['default'].trigger(_this2._element, _this2.constructor.Event.SHOWN);
576
+ const complete = () => {
577
+ const prevHoverState = this._hoverState;
578
+ this._hoverState = null;
579
+ EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOWN);
627
580
 
628
581
  if (prevHoverState === HOVER_STATE_OUT) {
629
- _this2._leave(null, _this2);
582
+ this._leave(null, this);
630
583
  }
631
584
  };
632
585
 
633
586
  if (this.tip.classList.contains(CLASS_NAME_FADE)) {
634
- var transitionDuration = getTransitionDurationFromElement(this.tip);
587
+ const transitionDuration = getTransitionDurationFromElement(this.tip);
635
588
  EventHandler__default['default'].one(this.tip, 'transitionend', complete);
636
589
  emulateTransitionEnd(this.tip, transitionDuration);
637
590
  } else {
638
591
  complete();
639
592
  }
640
- };
641
-
642
- _proto.hide = function hide() {
643
- var _this3 = this;
593
+ }
644
594
 
595
+ hide() {
645
596
  if (!this._popper) {
646
597
  return;
647
598
  }
648
599
 
649
- var tip = this.getTipElement();
600
+ const tip = this.getTipElement();
650
601
 
651
- var complete = function complete() {
652
- if (_this3._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
602
+ const complete = () => {
603
+ if (this._isWithActiveTrigger()) {
604
+ return;
605
+ }
606
+
607
+ if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
653
608
  tip.parentNode.removeChild(tip);
654
609
  }
655
610
 
656
- _this3._cleanTipClass();
611
+ this._cleanTipClass();
657
612
 
658
- _this3._element.removeAttribute('aria-describedby');
613
+ this._element.removeAttribute('aria-describedby');
659
614
 
660
- EventHandler__default['default'].trigger(_this3._element, _this3.constructor.Event.HIDDEN);
615
+ EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDDEN);
661
616
 
662
- if (_this3._popper) {
663
- _this3._popper.destroy();
617
+ if (this._popper) {
618
+ this._popper.destroy();
664
619
 
665
- _this3._popper = null;
620
+ this._popper = null;
666
621
  }
667
622
  };
668
623
 
669
- var hideEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDE);
624
+ const hideEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDE);
670
625
 
671
626
  if (hideEvent.defaultPrevented) {
672
627
  return;
@@ -676,11 +631,7 @@
676
631
  // empty mouseover listeners we added for iOS support
677
632
 
678
633
  if ('ontouchstart' in document.documentElement) {
679
- var _ref2;
680
-
681
- (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
682
- return EventHandler__default['default'].off(element, 'mouseover', noop);
683
- });
634
+ [].concat(...document.body.children).forEach(element => EventHandler__default['default'].off(element, 'mouseover', noop));
684
635
  }
685
636
 
686
637
  this._activeTrigger[TRIGGER_CLICK] = false;
@@ -688,7 +639,7 @@
688
639
  this._activeTrigger[TRIGGER_HOVER] = false;
689
640
 
690
641
  if (this.tip.classList.contains(CLASS_NAME_FADE)) {
691
- var transitionDuration = getTransitionDurationFromElement(tip);
642
+ const transitionDuration = getTransitionDurationFromElement(tip);
692
643
  EventHandler__default['default'].one(tip, 'transitionend', complete);
693
644
  emulateTransitionEnd(tip, transitionDuration);
694
645
  } else {
@@ -696,37 +647,37 @@
696
647
  }
697
648
 
698
649
  this._hoverState = '';
699
- };
650
+ }
700
651
 
701
- _proto.update = function update() {
652
+ update() {
702
653
  if (this._popper !== null) {
703
654
  this._popper.update();
704
655
  }
705
656
  } // Protected
706
- ;
707
657
 
708
- _proto.isWithContent = function isWithContent() {
658
+
659
+ isWithContent() {
709
660
  return Boolean(this.getTitle());
710
- };
661
+ }
711
662
 
712
- _proto.getTipElement = function getTipElement() {
663
+ getTipElement() {
713
664
  if (this.tip) {
714
665
  return this.tip;
715
666
  }
716
667
 
717
- var element = document.createElement('div');
668
+ const element = document.createElement('div');
718
669
  element.innerHTML = this.config.template;
719
670
  this.tip = element.children[0];
720
671
  return this.tip;
721
- };
672
+ }
722
673
 
723
- _proto.setContent = function setContent() {
724
- var tip = this.getTipElement();
674
+ setContent() {
675
+ const tip = this.getTipElement();
725
676
  this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
726
677
  tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
727
- };
678
+ }
728
679
 
729
- _proto.setElementContent = function setElementContent(element, content) {
680
+ setElementContent(element, content) {
730
681
  if (element === null) {
731
682
  return;
732
683
  }
@@ -758,19 +709,19 @@
758
709
  } else {
759
710
  element.textContent = content;
760
711
  }
761
- };
712
+ }
762
713
 
763
- _proto.getTitle = function getTitle() {
764
- var title = this._element.getAttribute('data-bs-original-title');
714
+ getTitle() {
715
+ let title = this._element.getAttribute('data-bs-original-title');
765
716
 
766
717
  if (!title) {
767
718
  title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title;
768
719
  }
769
720
 
770
721
  return title;
771
- };
722
+ }
772
723
 
773
- _proto.updateAttachment = function updateAttachment(attachment) {
724
+ updateAttachment(attachment) {
774
725
  if (attachment === 'right') {
775
726
  return 'end';
776
727
  }
@@ -781,44 +732,38 @@
781
732
 
782
733
  return attachment;
783
734
  } // Private
784
- ;
785
735
 
786
- _proto._initializeOnDelegatedTarget = function _initializeOnDelegatedTarget(event, context) {
787
- var dataKey = this.constructor.DATA_KEY;
788
- context = context || Data__default['default'].getData(event.delegateTarget, dataKey);
736
+
737
+ _initializeOnDelegatedTarget(event, context) {
738
+ const dataKey = this.constructor.DATA_KEY;
739
+ context = context || Data__default['default'].get(event.delegateTarget, dataKey);
789
740
 
790
741
  if (!context) {
791
742
  context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
792
- Data__default['default'].setData(event.delegateTarget, dataKey, context);
743
+ Data__default['default'].set(event.delegateTarget, dataKey, context);
793
744
  }
794
745
 
795
746
  return context;
796
- };
797
-
798
- _proto._getOffset = function _getOffset() {
799
- var _this4 = this;
747
+ }
800
748
 
801
- var offset = this.config.offset;
749
+ _getOffset() {
750
+ const {
751
+ offset
752
+ } = this.config;
802
753
 
803
754
  if (typeof offset === 'string') {
804
- return offset.split(',').map(function (val) {
805
- return Number.parseInt(val, 10);
806
- });
755
+ return offset.split(',').map(val => Number.parseInt(val, 10));
807
756
  }
808
757
 
809
758
  if (typeof offset === 'function') {
810
- return function (popperData) {
811
- return offset(popperData, _this4._element);
812
- };
759
+ return popperData => offset(popperData, this._element);
813
760
  }
814
761
 
815
762
  return offset;
816
- };
817
-
818
- _proto._getPopperConfig = function _getPopperConfig(attachment) {
819
- var _this5 = this;
763
+ }
820
764
 
821
- var defaultBsPopperConfig = {
765
+ _getPopperConfig(attachment) {
766
+ const defaultBsPopperConfig = {
822
767
  placement: attachment,
823
768
  modifiers: [{
824
769
  name: 'flip',
@@ -839,30 +784,30 @@
839
784
  }, {
840
785
  name: 'arrow',
841
786
  options: {
842
- element: "." + this.constructor.NAME + "-arrow"
787
+ element: `.${this.constructor.NAME}-arrow`
843
788
  }
844
789
  }, {
845
790
  name: 'onChange',
846
791
  enabled: true,
847
792
  phase: 'afterWrite',
848
- fn: function fn(data) {
849
- return _this5._handlePopperPlacementChange(data);
850
- }
793
+ fn: data => this._handlePopperPlacementChange(data)
851
794
  }],
852
- onFirstUpdate: function onFirstUpdate(data) {
795
+ onFirstUpdate: data => {
853
796
  if (data.options.placement !== data.placement) {
854
- _this5._handlePopperPlacementChange(data);
797
+ this._handlePopperPlacementChange(data);
855
798
  }
856
799
  }
857
800
  };
858
- return _extends({}, defaultBsPopperConfig, typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig);
859
- };
801
+ return { ...defaultBsPopperConfig,
802
+ ...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig)
803
+ };
804
+ }
860
805
 
861
- _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
862
- this.getTipElement().classList.add(CLASS_PREFIX + "-" + this.updateAttachment(attachment));
863
- };
806
+ _addAttachmentClass(attachment) {
807
+ this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
808
+ }
864
809
 
865
- _proto._getContainer = function _getContainer() {
810
+ _getContainer() {
866
811
  if (this.config.container === false) {
867
812
  return document.body;
868
813
  }
@@ -872,55 +817,47 @@
872
817
  }
873
818
 
874
819
  return SelectorEngine__default['default'].findOne(this.config.container);
875
- };
820
+ }
876
821
 
877
- _proto._getAttachment = function _getAttachment(placement) {
822
+ _getAttachment(placement) {
878
823
  return AttachmentMap[placement.toUpperCase()];
879
- };
880
-
881
- _proto._setListeners = function _setListeners() {
882
- var _this6 = this;
824
+ }
883
825
 
884
- var triggers = this.config.trigger.split(' ');
885
- triggers.forEach(function (trigger) {
826
+ _setListeners() {
827
+ const triggers = this.config.trigger.split(' ');
828
+ triggers.forEach(trigger => {
886
829
  if (trigger === 'click') {
887
- EventHandler__default['default'].on(_this6._element, _this6.constructor.Event.CLICK, _this6.config.selector, function (event) {
888
- return _this6.toggle(event);
889
- });
830
+ EventHandler__default['default'].on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event));
890
831
  } else if (trigger !== TRIGGER_MANUAL) {
891
- var eventIn = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSEENTER : _this6.constructor.Event.FOCUSIN;
892
- var eventOut = trigger === TRIGGER_HOVER ? _this6.constructor.Event.MOUSELEAVE : _this6.constructor.Event.FOCUSOUT;
893
- EventHandler__default['default'].on(_this6._element, eventIn, _this6.config.selector, function (event) {
894
- return _this6._enter(event);
895
- });
896
- EventHandler__default['default'].on(_this6._element, eventOut, _this6.config.selector, function (event) {
897
- return _this6._leave(event);
898
- });
832
+ const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
833
+ const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
834
+ EventHandler__default['default'].on(this._element, eventIn, this.config.selector, event => this._enter(event));
835
+ EventHandler__default['default'].on(this._element, eventOut, this.config.selector, event => this._leave(event));
899
836
  }
900
837
  });
901
838
 
902
- this._hideModalHandler = function () {
903
- if (_this6._element) {
904
- _this6.hide();
839
+ this._hideModalHandler = () => {
840
+ if (this._element) {
841
+ this.hide();
905
842
  }
906
843
  };
907
844
 
908
- EventHandler__default['default'].on(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
845
+ EventHandler__default['default'].on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
909
846
 
910
847
  if (this.config.selector) {
911
- this.config = _extends({}, this.config, {
848
+ this.config = { ...this.config,
912
849
  trigger: 'manual',
913
850
  selector: ''
914
- });
851
+ };
915
852
  } else {
916
853
  this._fixTitle();
917
854
  }
918
- };
855
+ }
919
856
 
920
- _proto._fixTitle = function _fixTitle() {
921
- var title = this._element.getAttribute('title');
857
+ _fixTitle() {
858
+ const title = this._element.getAttribute('title');
922
859
 
923
- var originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
860
+ const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
924
861
 
925
862
  if (title || originalTitleType !== 'string') {
926
863
  this._element.setAttribute('data-bs-original-title', title || '');
@@ -931,9 +868,9 @@
931
868
 
932
869
  this._element.setAttribute('title', '');
933
870
  }
934
- };
871
+ }
935
872
 
936
- _proto._enter = function _enter(event, context) {
873
+ _enter(event, context) {
937
874
  context = this._initializeOnDelegatedTarget(event, context);
938
875
 
939
876
  if (event) {
@@ -953,18 +890,18 @@
953
890
  return;
954
891
  }
955
892
 
956
- context._timeout = setTimeout(function () {
893
+ context._timeout = setTimeout(() => {
957
894
  if (context._hoverState === HOVER_STATE_SHOW) {
958
895
  context.show();
959
896
  }
960
897
  }, context.config.delay.show);
961
- };
898
+ }
962
899
 
963
- _proto._leave = function _leave(event, context) {
900
+ _leave(event, context) {
964
901
  context = this._initializeOnDelegatedTarget(event, context);
965
902
 
966
903
  if (event) {
967
- context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
904
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
968
905
  }
969
906
 
970
907
  if (context._isWithActiveTrigger()) {
@@ -979,26 +916,26 @@
979
916
  return;
980
917
  }
981
918
 
982
- context._timeout = setTimeout(function () {
919
+ context._timeout = setTimeout(() => {
983
920
  if (context._hoverState === HOVER_STATE_OUT) {
984
921
  context.hide();
985
922
  }
986
923
  }, context.config.delay.hide);
987
- };
924
+ }
988
925
 
989
- _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
990
- for (var trigger in this._activeTrigger) {
926
+ _isWithActiveTrigger() {
927
+ for (const trigger in this._activeTrigger) {
991
928
  if (this._activeTrigger[trigger]) {
992
929
  return true;
993
930
  }
994
931
  }
995
932
 
996
933
  return false;
997
- };
934
+ }
998
935
 
999
- _proto._getConfig = function _getConfig(config) {
1000
- var dataAttributes = Manipulator__default['default'].getDataAttributes(this._element);
1001
- Object.keys(dataAttributes).forEach(function (dataAttr) {
936
+ _getConfig(config) {
937
+ const dataAttributes = Manipulator__default['default'].getDataAttributes(this._element);
938
+ Object.keys(dataAttributes).forEach(dataAttr => {
1002
939
  if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
1003
940
  delete dataAttributes[dataAttr];
1004
941
  }
@@ -1008,7 +945,10 @@
1008
945
  config.container = config.container[0];
1009
946
  }
1010
947
 
1011
- config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
948
+ config = { ...this.constructor.Default,
949
+ ...dataAttributes,
950
+ ...(typeof config === 'object' && config ? config : {})
951
+ };
1012
952
 
1013
953
  if (typeof config.delay === 'number') {
1014
954
  config.delay = {
@@ -1032,13 +972,13 @@
1032
972
  }
1033
973
 
1034
974
  return config;
1035
- };
975
+ }
1036
976
 
1037
- _proto._getDelegateConfig = function _getDelegateConfig() {
1038
- var config = {};
977
+ _getDelegateConfig() {
978
+ const config = {};
1039
979
 
1040
980
  if (this.config) {
1041
- for (var key in this.config) {
981
+ for (const key in this.config) {
1042
982
  if (this.constructor.Default[key] !== this.config[key]) {
1043
983
  config[key] = this.config[key];
1044
984
  }
@@ -1046,23 +986,21 @@
1046
986
  }
1047
987
 
1048
988
  return config;
1049
- };
989
+ }
1050
990
 
1051
- _proto._cleanTipClass = function _cleanTipClass() {
1052
- var tip = this.getTipElement();
1053
- var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
991
+ _cleanTipClass() {
992
+ const tip = this.getTipElement();
993
+ const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
1054
994
 
1055
995
  if (tabClass !== null && tabClass.length > 0) {
1056
- tabClass.map(function (token) {
1057
- return token.trim();
1058
- }).forEach(function (tClass) {
1059
- return tip.classList.remove(tClass);
1060
- });
996
+ tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
1061
997
  }
1062
- };
998
+ }
1063
999
 
1064
- _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
1065
- var state = popperData.state;
1000
+ _handlePopperPlacementChange(popperData) {
1001
+ const {
1002
+ state
1003
+ } = popperData;
1066
1004
 
1067
1005
  if (!state) {
1068
1006
  return;
@@ -1074,13 +1012,13 @@
1074
1012
 
1075
1013
  this._addAttachmentClass(this._getAttachment(state.placement));
1076
1014
  } // Static
1077
- ;
1078
1015
 
1079
- Tooltip.jQueryInterface = function jQueryInterface(config) {
1016
+
1017
+ static jQueryInterface(config) {
1080
1018
  return this.each(function () {
1081
- var data = Data__default['default'].getData(this, DATA_KEY);
1019
+ let data = Data__default['default'].get(this, DATA_KEY);
1082
1020
 
1083
- var _config = typeof config === 'object' && config;
1021
+ const _config = typeof config === 'object' && config;
1084
1022
 
1085
1023
  if (!data && /dispose|hide/.test(config)) {
1086
1024
  return;
@@ -1092,48 +1030,15 @@
1092
1030
 
1093
1031
  if (typeof config === 'string') {
1094
1032
  if (typeof data[config] === 'undefined') {
1095
- throw new TypeError("No method named \"" + config + "\"");
1033
+ throw new TypeError(`No method named "${config}"`);
1096
1034
  }
1097
1035
 
1098
1036
  data[config]();
1099
1037
  }
1100
1038
  });
1101
- };
1102
-
1103
- _createClass(Tooltip, null, [{
1104
- key: "Default",
1105
- get: function get() {
1106
- return Default;
1107
- }
1108
- }, {
1109
- key: "NAME",
1110
- get: function get() {
1111
- return NAME;
1112
- }
1113
- }, {
1114
- key: "DATA_KEY",
1115
- get: function get() {
1116
- return DATA_KEY;
1117
- }
1118
- }, {
1119
- key: "Event",
1120
- get: function get() {
1121
- return Event$1;
1122
- }
1123
- }, {
1124
- key: "EVENT_KEY",
1125
- get: function get() {
1126
- return EVENT_KEY;
1127
- }
1128
- }, {
1129
- key: "DefaultType",
1130
- get: function get() {
1131
- return DefaultType;
1132
- }
1133
- }]);
1039
+ }
1134
1040
 
1135
- return Tooltip;
1136
- }(BaseComponent__default['default']);
1041
+ }
1137
1042
  /**
1138
1043
  * ------------------------------------------------------------------------
1139
1044
  * jQuery