bootstrap.esm.js 145 KB
Newer Older
XhmikosR's avatar
Dist.  
XhmikosR committed
1
2
3
4
5
6
7
/*!
  * Bootstrap v4.3.1 (https://getbootstrap.com/)
  * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  */
import Popper from 'popper.js';

XhmikosR's avatar
XhmikosR committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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);
  }
}

function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}

function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}

function _objectSpread(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    var ownKeys = Object.keys(source);

    if (typeof Object.getOwnPropertySymbols === 'function') {
      ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
        return Object.getOwnPropertyDescriptor(source, sym).enumerable;
      }));
    }

    ownKeys.forEach(function (key) {
      _defineProperty(target, key, source[key]);
    });
  }

  return target;
}

function _inheritsLoose(subClass, superClass) {
  subClass.prototype = Object.create(superClass.prototype);
  subClass.prototype.constructor = subClass;
  subClass.__proto__ = superClass;
}

XhmikosR's avatar
Dist.  
XhmikosR committed
64
65
66
67
68
69
/**
 * --------------------------------------------------------------------------
 * Bootstrap (v4.3.1): util/index.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */
XhmikosR's avatar
XhmikosR committed
70
71
72
73
74
75
76
77
78
var MAX_UID = 1000000;
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var _window = window,
    jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)

var toType = function toType(obj) {
  return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
XhmikosR's avatar
Dist.  
XhmikosR committed
79
80
81
82
83
84
85
/**
 * --------------------------------------------------------------------------
 * Public Util Api
 * --------------------------------------------------------------------------
 */


XhmikosR's avatar
XhmikosR committed
86
var getUID = function getUID(prefix) {
XhmikosR's avatar
Dist.  
XhmikosR committed
87
88
89
90
91
92
93
94
  do {
    // eslint-disable-next-line no-bitwise
    prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
  } while (document.getElementById(prefix));

  return prefix;
};

XhmikosR's avatar
XhmikosR committed
95
96
var getSelectorFromElement = function getSelectorFromElement(element) {
  var selector = element.getAttribute('data-target');
XhmikosR's avatar
Dist.  
XhmikosR committed
97
98

  if (!selector || selector === '#') {
XhmikosR's avatar
XhmikosR committed
99
    var hrefAttr = element.getAttribute('href');
XhmikosR's avatar
Dist.  
XhmikosR committed
100
101
102
103
104
105
106
107
108
109
    selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
  }

  try {
    return document.querySelector(selector) ? selector : null;
  } catch (error) {
    return null;
  }
};

XhmikosR's avatar
XhmikosR committed
110
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
111
112
113
114
115
  if (!element) {
    return 0;
  } // Get transition-duration of the element


XhmikosR's avatar
XhmikosR committed
116
  var _window$getComputedSt = window.getComputedStyle(element),
XhmikosR's avatar
Dist.  
XhmikosR committed
117
118
119
      transitionDuration = _window$getComputedSt.transitionDuration,
      transitionDelay = _window$getComputedSt.transitionDelay;

XhmikosR's avatar
XhmikosR committed
120
121
  var floatTransitionDuration = parseFloat(transitionDuration);
  var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
XhmikosR's avatar
Dist.  
XhmikosR committed
122
123
124
125
126
127
128
129
130
131
132

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


  transitionDuration = transitionDuration.split(',')[0];
  transitionDelay = transitionDelay.split(',')[0];
  return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};

XhmikosR's avatar
XhmikosR committed
133
134
135
136
var triggerTransitionEnd = function triggerTransitionEnd(element) {
  var evt = document.createEvent('HTMLEvents');
  evt.initEvent(TRANSITION_END, true, true);
  element.dispatchEvent(evt);
XhmikosR's avatar
Dist.  
XhmikosR committed
137
138
};

XhmikosR's avatar
XhmikosR committed
139
140
141
var isElement = function isElement(obj) {
  return (obj[0] || obj).nodeType;
};
XhmikosR's avatar
Dist.  
XhmikosR committed
142

XhmikosR's avatar
XhmikosR committed
143
144
145
146
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
  var called = false;
  var durationPadding = 5;
  var emulatedDuration = duration + durationPadding;
XhmikosR's avatar
Dist.  
XhmikosR committed
147
148
149
150
151
152
153

  function listener() {
    called = true;
    element.removeEventListener(TRANSITION_END, listener);
  }

  element.addEventListener(TRANSITION_END, listener);
XhmikosR's avatar
XhmikosR committed
154
  setTimeout(function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
155
156
157
158
159
160
    if (!called) {
      triggerTransitionEnd(element);
    }
  }, emulatedDuration);
};

XhmikosR's avatar
XhmikosR committed
161
162
163
164
165
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
  Object.keys(configTypes).forEach(function (property) {
    var expectedTypes = configTypes[property];
    var value = config[property];
    var valueType = value && isElement(value) ? 'element' : toType(value);
XhmikosR's avatar
Dist.  
XhmikosR committed
166
167

    if (!new RegExp(expectedTypes).test(valueType)) {
XhmikosR's avatar
XhmikosR committed
168
      throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
XhmikosR's avatar
Dist.  
XhmikosR committed
169
170
171
172
    }
  });
};

XhmikosR's avatar
XhmikosR committed
173
var makeArray = function makeArray(nodeList) {
XhmikosR's avatar
Dist.  
XhmikosR committed
174
175
176
177
178
179
180
  if (!nodeList) {
    return [];
  }

  return [].slice.call(nodeList);
};

XhmikosR's avatar
XhmikosR committed
181
var isVisible = function isVisible(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
182
183
184
185
186
187
188
189
190
191
192
  if (!element) {
    return false;
  }

  if (element.style && element.parentNode && element.parentNode.style) {
    return element.style.display !== 'none' && element.parentNode.style.display !== 'none' && element.style.visibility !== 'hidden';
  }

  return false;
};

XhmikosR's avatar
XhmikosR committed
193
var findShadowRoot = function findShadowRoot(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
194
195
196
197
198
199
  if (!document.documentElement.attachShadow) {
    return null;
  } // Can find the shadow root otherwise it'll return the document


  if (typeof element.getRootNode === 'function') {
XhmikosR's avatar
XhmikosR committed
200
    var root = element.getRootNode();
XhmikosR's avatar
Dist.  
XhmikosR committed
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
    return root instanceof ShadowRoot ? root : null;
  }

  if (element instanceof ShadowRoot) {
    return element;
  } // when we don't find a shadow root


  if (!element.parentNode) {
    return null;
  }

  return findShadowRoot(element.parentNode);
}; // eslint-disable-next-line no-empty-function


XhmikosR's avatar
XhmikosR committed
217
218
219
var noop = function noop() {
  return function () {};
};
XhmikosR's avatar
Dist.  
XhmikosR committed
220

XhmikosR's avatar
XhmikosR committed
221
222
223
var reflow = function reflow(element) {
  return element.offsetHeight;
};
XhmikosR's avatar
Dist.  
XhmikosR committed
224
225
226
227
228
229
230
231
232
233
234
235
236

/**
 * --------------------------------------------------------------------------
 * Bootstrap (v4.3.1): dom/data.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */
XhmikosR's avatar
XhmikosR committed
237
238
239
var mapData = function () {
  var storeData = {};
  var id = 1;
XhmikosR's avatar
Dist.  
XhmikosR committed
240
  return {
XhmikosR's avatar
XhmikosR committed
241
    set: function set(element, key, data) {
XhmikosR's avatar
Dist.  
XhmikosR committed
242
243
      if (typeof element.key === 'undefined') {
        element.key = {
XhmikosR's avatar
XhmikosR committed
244
245
          key: key,
          id: id
XhmikosR's avatar
Dist.  
XhmikosR committed
246
247
248
249
250
251
        };
        id++;
      }

      storeData[element.key.id] = data;
    },
XhmikosR's avatar
XhmikosR committed
252
    get: function get(element, key) {
XhmikosR's avatar
Dist.  
XhmikosR committed
253
254
255
256
      if (!element || typeof element.key === 'undefined') {
        return null;
      }

XhmikosR's avatar
XhmikosR committed
257
      var keyProperties = element.key;
XhmikosR's avatar
Dist.  
XhmikosR committed
258
259
260
261
262
263
264

      if (keyProperties.key === key) {
        return storeData[keyProperties.id];
      }

      return null;
    },
XhmikosR's avatar
XhmikosR committed
265
    delete: function _delete(element, key) {
XhmikosR's avatar
Dist.  
XhmikosR committed
266
267
268
269
      if (typeof element.key === 'undefined') {
        return;
      }

XhmikosR's avatar
XhmikosR committed
270
      var keyProperties = element.key;
XhmikosR's avatar
Dist.  
XhmikosR committed
271
272
273
274
275
276
277

      if (keyProperties.key === key) {
        delete storeData[keyProperties.id];
        delete element.key;
      }
    }
  };
XhmikosR's avatar
XhmikosR committed
278
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
279

XhmikosR's avatar
XhmikosR committed
280
281
var Data = {
  setData: function setData(instance, key, data) {
XhmikosR's avatar
Dist.  
XhmikosR committed
282
283
    mapData.set(instance, key, data);
  },
XhmikosR's avatar
XhmikosR committed
284
  getData: function getData(instance, key) {
XhmikosR's avatar
Dist.  
XhmikosR committed
285
286
    return mapData.get(instance, key);
  },
XhmikosR's avatar
XhmikosR committed
287
  removeData: function removeData(instance, key) {
XhmikosR's avatar
Dist.  
XhmikosR committed
288
289
    mapData.delete(instance, key);
  }
XhmikosR's avatar
XhmikosR committed
290
};
XhmikosR's avatar
Dist.  
XhmikosR committed
291

XhmikosR's avatar
XhmikosR committed
292
293
294
295
296
297
298
299
300
301
/* istanbul ignore file */
var _Element$prototype = Element.prototype,
    matches = _Element$prototype.matches,
    closest = _Element$prototype.closest;
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;

var createCustomEvent = function createCustomEvent(eventName, params) {
  var cEvent = new CustomEvent(eventName, params);
  return cEvent;
XhmikosR's avatar
Dist.  
XhmikosR committed
302
303
};

XhmikosR's avatar
XhmikosR committed
304
305
306
307
308
309
310
311
312
313
314
315
if (typeof window.CustomEvent !== 'function') {
  createCustomEvent = function createCustomEvent(eventName, params) {
    params = params || {
      bubbles: false,
      cancelable: false,
      detail: null
    };
    var evt = document.createEvent('CustomEvent');
    evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
    return evt;
  };
}
XhmikosR's avatar
Dist.  
XhmikosR committed
316

XhmikosR's avatar
XhmikosR committed
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
var workingDefaultPrevented = function () {
  var e = document.createEvent('CustomEvent');
  e.initEvent('Bootstrap', true, true);
  e.preventDefault();
  return e.defaultPrevented;
}();

if (!workingDefaultPrevented) {
  var origPreventDefault = Event.prototype.preventDefault;

  Event.prototype.preventDefault = function () {
    if (!this.cancelable) {
      return;
    }

    origPreventDefault.call(this);
    Object.defineProperty(this, 'defaultPrevented', {
      get: function get() {
        return true;
      },
      configurable: true
XhmikosR's avatar
Dist.  
XhmikosR committed
338
    });
XhmikosR's avatar
XhmikosR committed
339
340
  };
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
XhmikosR's avatar
Dist.  
XhmikosR committed
341
342


XhmikosR's avatar
XhmikosR committed
343
344
345
346
347
348
349
350
351
352
353
354
var defaultPreventedPreservedOnDispatch = function () {
  var e = createCustomEvent('Bootstrap', {
    cancelable: true
  });
  var element = document.createElement('div');
  element.addEventListener('Bootstrap', function () {
    return null;
  });
  e.preventDefault();
  element.dispatchEvent(e);
  return e.defaultPrevented;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
355

XhmikosR's avatar
XhmikosR committed
356
357
358
if (!matches) {
  matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
XhmikosR's avatar
Dist.  
XhmikosR committed
359

XhmikosR's avatar
XhmikosR committed
360
361
362
if (!closest) {
  closest = function closest(selector) {
    var element = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
363

XhmikosR's avatar
XhmikosR committed
364
365
366
    do {
      if (matches.call(element, selector)) {
        return element;
XhmikosR's avatar
Dist.  
XhmikosR committed
367
368
      }

XhmikosR's avatar
XhmikosR committed
369
370
      element = element.parentElement || element.parentNode;
    } while (element !== null && element.nodeType === 1);
XhmikosR's avatar
Dist.  
XhmikosR committed
371

XhmikosR's avatar
XhmikosR committed
372
373
374
    return null;
  };
}
XhmikosR's avatar
Dist.  
XhmikosR committed
375

XhmikosR's avatar
XhmikosR committed
376
var scopeSelectorRegex = /:scope\b/;
XhmikosR's avatar
Dist.  
XhmikosR committed
377

XhmikosR's avatar
XhmikosR committed
378
379
var supportScopeQuery = function () {
  var element = document.createElement('div');
XhmikosR's avatar
Dist.  
XhmikosR committed
380

XhmikosR's avatar
XhmikosR committed
381
382
383
384
385
  try {
    element.querySelectorAll(':scope *');
  } catch (error) {
    return false;
  }
XhmikosR's avatar
Dist.  
XhmikosR committed
386

XhmikosR's avatar
XhmikosR committed
387
388
389
390
391
392
393
394
395
396
  return true;
}();

if (!supportScopeQuery) {
  find = function find(selector) {
    if (!scopeSelectorRegex.test(selector)) {
      return this.querySelectorAll(selector);
    }

    var hasId = Boolean(this.id);
XhmikosR's avatar
Dist.  
XhmikosR committed
397

XhmikosR's avatar
XhmikosR committed
398
399
400
401
402
    if (!hasId) {
      this.id = getUID('scope');
    }

    var nodeList = null;
XhmikosR's avatar
Dist.  
XhmikosR committed
403

XhmikosR's avatar
XhmikosR committed
404
405
406
407
408
409
    try {
      selector = selector.replace(scopeSelectorRegex, "#" + this.id);
      nodeList = this.querySelectorAll(selector);
    } finally {
      if (!hasId) {
        this.removeAttribute('id');
XhmikosR's avatar
Dist.  
XhmikosR committed
410
      }
XhmikosR's avatar
XhmikosR committed
411
    }
XhmikosR's avatar
Dist.  
XhmikosR committed
412

XhmikosR's avatar
XhmikosR committed
413
414
    return nodeList;
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
415

XhmikosR's avatar
XhmikosR committed
416
417
418
419
420
421
422
423
424
425
426
427
  findOne = function findOne(selector) {
    if (!scopeSelectorRegex.test(selector)) {
      return this.querySelector(selector);
    }

    var matches = find.call(this, selector);

    if (typeof matches[0] !== 'undefined') {
      return matches[0];
    }

    return null;
XhmikosR's avatar
Dist.  
XhmikosR committed
428
  };
XhmikosR's avatar
XhmikosR committed
429
}
XhmikosR's avatar
Dist.  
XhmikosR committed
430
431
432

/**
 * --------------------------------------------------------------------------
433
 * Bootstrap (v4.3.1): dom/event-handler.js
XhmikosR's avatar
Dist.  
XhmikosR committed
434
435
436
437
438
439
440
441
442
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */
/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
443
444
445
446
447
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
var stripNameRegex = /\..*/;
var keyEventRegex = /^key/;
var stripUidRegex = /::\d+$/;
var eventRegistry = {}; // Events storage
XhmikosR's avatar
Dist.  
XhmikosR committed
448

XhmikosR's avatar
XhmikosR committed
449
450
var uidEvent = 1;
var customEvents = {
XhmikosR's avatar
Dist.  
XhmikosR committed
451
452
453
  mouseenter: 'mouseover',
  mouseleave: 'mouseout'
};
XhmikosR's avatar
XhmikosR committed
454
var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
XhmikosR's avatar
Dist.  
XhmikosR committed
455
456
457
458
459
460
461
/**
 * ------------------------------------------------------------------------
 * Private methods
 * ------------------------------------------------------------------------
 */

function getUidEvent(element, uid) {
XhmikosR's avatar
XhmikosR committed
462
  return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
XhmikosR's avatar
Dist.  
XhmikosR committed
463
464
465
}

function getEvent(element) {
XhmikosR's avatar
XhmikosR committed
466
  var uid = getUidEvent(element);
XhmikosR's avatar
Dist.  
XhmikosR committed
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
  element.uidEvent = uid;
  eventRegistry[uid] = eventRegistry[uid] || {};
  return eventRegistry[uid];
}

function fixEvent(event, element) {
  // Add which for key events
  if (event.which === null && keyEventRegex.test(event.type)) {
    event.which = event.charCode === null ? event.keyCode : event.charCode;
  }

  event.delegateTarget = element;
}

function bootstrapHandler(element, fn) {
  return function handler(event) {
    fixEvent(event, element);

    if (handler.oneOff) {
      EventHandler.off(element, event.type, fn);
    }

    return fn.apply(element, [event]);
  };
}

function bootstrapDelegationHandler(element, selector, fn) {
  return function handler(event) {
XhmikosR's avatar
XhmikosR committed
495
    var domElements = element.querySelectorAll(selector);
XhmikosR's avatar
Dist.  
XhmikosR committed
496

XhmikosR's avatar
XhmikosR committed
497
498
    for (var target = event.target; target && target !== this; target = target.parentNode) {
      for (var i = domElements.length; i--;) {
XhmikosR's avatar
Dist.  
XhmikosR committed
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
        if (domElements[i] === target) {
          fixEvent(event, target);

          if (handler.oneOff) {
            EventHandler.off(element, event.type, fn);
          }

          return fn.apply(target, [event]);
        }
      }
    } // To please ESLint


    return null;
  };
}

function findHandler(events, handler, delegationSelector) {
  if (delegationSelector === void 0) {
    delegationSelector = null;
  }

XhmikosR's avatar
XhmikosR committed
521
522
523
  for (var _i = 0, _Object$keys = Object.keys(events); _i < _Object$keys.length; _i++) {
    var uid = _Object$keys[_i];
    var event = events[uid];
XhmikosR's avatar
Dist.  
XhmikosR committed
524
525
526
527
528
529
530
531
532
533

    if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
      return events[uid];
    }
  }

  return null;
}

function normalizeParams(originalTypeEvent, handler, delegationFn) {
XhmikosR's avatar
XhmikosR committed
534
535
  var delegation = typeof handler === 'string';
  var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
XhmikosR's avatar
Dist.  
XhmikosR committed
536

XhmikosR's avatar
XhmikosR committed
537
538
  var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
  var custom = customEvents[typeEvent];
XhmikosR's avatar
Dist.  
XhmikosR committed
539
540
541
542
543

  if (custom) {
    typeEvent = custom;
  }

XhmikosR's avatar
XhmikosR committed
544
  var isNative = nativeEvents.indexOf(typeEvent) > -1;
XhmikosR's avatar
Dist.  
XhmikosR committed
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562

  if (!isNative) {
    typeEvent = originalTypeEvent;
  }

  return [delegation, originalHandler, typeEvent];
}

function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
  if (typeof originalTypeEvent !== 'string' || !element) {
    return;
  }

  if (!handler) {
    handler = delegationFn;
    delegationFn = null;
  }

XhmikosR's avatar
XhmikosR committed
563
564
565
566
  var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
      delegation = _normalizeParams[0],
      originalHandler = _normalizeParams[1],
      typeEvent = _normalizeParams[2];
XhmikosR's avatar
Dist.  
XhmikosR committed
567

XhmikosR's avatar
XhmikosR committed
568
569
570
  var events = getEvent(element);
  var handlers = events[typeEvent] || (events[typeEvent] = {});
  var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
XhmikosR's avatar
Dist.  
XhmikosR committed
571
572
573
574
575
576

  if (previousFn) {
    previousFn.oneOff = previousFn.oneOff && oneOff;
    return;
  }

XhmikosR's avatar
XhmikosR committed
577
578
  var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
  var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
XhmikosR's avatar
Dist.  
XhmikosR committed
579
580
581
582
583
584
585
586
587
  fn.delegationSelector = delegation ? handler : null;
  fn.originalHandler = originalHandler;
  fn.oneOff = oneOff;
  fn.uidEvent = uid;
  handlers[uid] = fn;
  element.addEventListener(typeEvent, fn, delegation);
}

function removeHandler(element, events, typeEvent, handler, delegationSelector) {
XhmikosR's avatar
XhmikosR committed
588
  var fn = findHandler(events[typeEvent], handler, delegationSelector);
XhmikosR's avatar
Dist.  
XhmikosR committed
589
590
591
592
593
594
595
596
597
598

  if (fn === null) {
    return;
  }

  element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
  delete events[typeEvent][fn.uidEvent];
}

function removeNamespacedHandlers(element, events, typeEvent, namespace) {
XhmikosR's avatar
XhmikosR committed
599
600
  var storeElementEvent = events[typeEvent] || {};
  Object.keys(storeElementEvent).forEach(function (handlerKey) {
XhmikosR's avatar
Dist.  
XhmikosR committed
601
    if (handlerKey.indexOf(namespace) > -1) {
XhmikosR's avatar
XhmikosR committed
602
      var event = storeElementEvent[handlerKey];
XhmikosR's avatar
Dist.  
XhmikosR committed
603
604
605
606
607
      removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
    }
  });
}

XhmikosR's avatar
XhmikosR committed
608
609
var EventHandler = {
  on: function on(element, event, handler, delegationFn) {
XhmikosR's avatar
Dist.  
XhmikosR committed
610
611
    addHandler(element, event, handler, delegationFn, false);
  },
XhmikosR's avatar
XhmikosR committed
612
  one: function one(element, event, handler, delegationFn) {
XhmikosR's avatar
Dist.  
XhmikosR committed
613
614
    addHandler(element, event, handler, delegationFn, true);
  },
XhmikosR's avatar
XhmikosR committed
615
  off: function off(element, originalTypeEvent, handler, delegationFn) {
XhmikosR's avatar
Dist.  
XhmikosR committed
616
617
618
619
    if (typeof originalTypeEvent !== 'string' || !element) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
620
621
622
623
    var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
        delegation = _normalizeParams2[0],
        originalHandler = _normalizeParams2[1],
        typeEvent = _normalizeParams2[2];
XhmikosR's avatar
Dist.  
XhmikosR committed
624

XhmikosR's avatar
XhmikosR committed
625
626
627
    var inNamespace = typeEvent !== originalTypeEvent;
    var events = getEvent(element);
    var isNamespace = originalTypeEvent.charAt(0) === '.';
XhmikosR's avatar
Dist.  
XhmikosR committed
628
629
630
631
632
633
634
635
636
637
638
639

    if (typeof originalHandler !== 'undefined') {
      // Simplest case: handler is passed, remove that listener ONLY.
      if (!events || !events[typeEvent]) {
        return;
      }

      removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
      return;
    }

    if (isNamespace) {
XhmikosR's avatar
XhmikosR committed
640
      Object.keys(events).forEach(function (elementEvent) {
XhmikosR's avatar
Dist.  
XhmikosR committed
641
642
643
644
        removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.substr(1));
      });
    }

XhmikosR's avatar
XhmikosR committed
645
646
647
    var storeElementEvent = events[typeEvent] || {};
    Object.keys(storeElementEvent).forEach(function (keyHandlers) {
      var handlerKey = keyHandlers.replace(stripUidRegex, '');
XhmikosR's avatar
Dist.  
XhmikosR committed
648
649

      if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
XhmikosR's avatar
XhmikosR committed
650
        var event = storeElementEvent[keyHandlers];
XhmikosR's avatar
Dist.  
XhmikosR committed
651
652
653
654
        removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
      }
    });
  },
XhmikosR's avatar
XhmikosR committed
655
  trigger: function trigger(element, event, args) {
XhmikosR's avatar
Dist.  
XhmikosR committed
656
657
658
659
    if (typeof event !== 'string' || !element) {
      return null;
    }

XhmikosR's avatar
XhmikosR committed
660
661
662
663
664
665
666
667
    var typeEvent = event.replace(stripNameRegex, '');
    var inNamespace = event !== typeEvent;
    var isNative = nativeEvents.indexOf(typeEvent) > -1;
    var jQueryEvent;
    var bubbles = true;
    var nativeDispatch = true;
    var defaultPrevented = false;
    var evt = null;
XhmikosR's avatar
Dist.  
XhmikosR committed
668
669
670
671
672
673
674
675
676
677
678
679
680

    if (inNamespace && typeof jQuery !== 'undefined') {
      jQueryEvent = jQuery.Event(event, args);
      jQuery(element).trigger(jQueryEvent);
      bubbles = !jQueryEvent.isPropagationStopped();
      nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
      defaultPrevented = jQueryEvent.isDefaultPrevented();
    }

    if (isNative) {
      evt = document.createEvent('HTMLEvents');
      evt.initEvent(typeEvent, bubbles, true);
    } else {
XhmikosR's avatar
XhmikosR committed
681
682
      evt = createCustomEvent(event, {
        bubbles: bubbles,
XhmikosR's avatar
Dist.  
XhmikosR committed
683
684
685
686
687
688
        cancelable: true
      });
    } // merge custom informations in our event


    if (typeof args !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
689
      Object.keys(args).forEach(function (key) {
XhmikosR's avatar
Dist.  
XhmikosR committed
690
        Object.defineProperty(evt, key, {
XhmikosR's avatar
XhmikosR committed
691
          get: function get() {
XhmikosR's avatar
Dist.  
XhmikosR committed
692
693
694
695
696
697
698
699
700
            return args[key];
          }
        });
      });
    }

    if (defaultPrevented) {
      evt.preventDefault();

XhmikosR's avatar
XhmikosR committed
701
      if (!defaultPreventedPreservedOnDispatch) {
XhmikosR's avatar
Dist.  
XhmikosR committed
702
        Object.defineProperty(evt, 'defaultPrevented', {
XhmikosR's avatar
XhmikosR committed
703
704
705
          get: function get() {
            return true;
          }
XhmikosR's avatar
Dist.  
XhmikosR committed
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
        });
      }
    }

    if (nativeDispatch) {
      element.dispatchEvent(evt);
    }

    if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
      jQueryEvent.preventDefault();
    }

    return evt;
  }
};

/**
 * --------------------------------------------------------------------------
724
 * Bootstrap (v4.3.1): dom/selector-engine.js
XhmikosR's avatar
Dist.  
XhmikosR committed
725
726
727
728
729
730
731
732
733
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */
/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
734
735
736
737
var NODE_TEXT = 3;
var SelectorEngine = {
  matches: function matches$1(element, selector) {
    return matches.call(element, selector);
XhmikosR's avatar
Dist.  
XhmikosR committed
738
  },
XhmikosR's avatar
XhmikosR committed
739
  find: function find$1(selector, element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
740
741
742
743
744
745
746
747
    if (element === void 0) {
      element = document.documentElement;
    }

    if (typeof selector !== 'string') {
      return null;
    }

XhmikosR's avatar
XhmikosR committed
748
    return find.call(element, selector);
XhmikosR's avatar
Dist.  
XhmikosR committed
749
  },
XhmikosR's avatar
XhmikosR committed
750
  findOne: function findOne$1(selector, element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
751
752
753
754
755
756
757
758
759
760
    if (element === void 0) {
      element = document.documentElement;
    }

    if (typeof selector !== 'string') {
      return null;
    }

    return findOne.call(element, selector);
  },
XhmikosR's avatar
XhmikosR committed
761
762
  children: function children(element, selector) {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
763
764
765
766
767

    if (typeof selector !== 'string') {
      return null;
    }

XhmikosR's avatar
XhmikosR committed
768
769
770
771
    var children = makeArray(element.children);
    return children.filter(function (child) {
      return _this.matches(child, selector);
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
772
  },
XhmikosR's avatar
XhmikosR committed
773
  parents: function parents(element, selector) {
XhmikosR's avatar
Dist.  
XhmikosR committed
774
775
776
777
    if (typeof selector !== 'string') {
      return null;
    }

XhmikosR's avatar
XhmikosR committed
778
779
    var parents = [];
    var ancestor = element.parentNode;
XhmikosR's avatar
Dist.  
XhmikosR committed
780
781
782
783
784
785
786
787
788
789
790

    while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
      if (this.matches(ancestor, selector)) {
        parents.push(ancestor);
      }

      ancestor = ancestor.parentNode;
    }

    return parents;
  },
XhmikosR's avatar
XhmikosR committed
791
  closest: function closest$1(element, selector) {
XhmikosR's avatar
Dist.  
XhmikosR committed
792
793
794
795
    if (typeof selector !== 'string') {
      return null;
    }

XhmikosR's avatar
XhmikosR committed
796
    return closest.call(element, selector);
XhmikosR's avatar
Dist.  
XhmikosR committed
797
  },
XhmikosR's avatar
XhmikosR committed
798
  prev: function prev(element, selector) {
XhmikosR's avatar
Dist.  
XhmikosR committed
799
800
801
802
    if (typeof selector !== 'string') {
      return null;
    }

XhmikosR's avatar
XhmikosR committed
803
804
    var siblings = [];
    var previous = element.previousSibling;
XhmikosR's avatar
Dist.  
XhmikosR committed
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823

    while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) {
      if (this.matches(previous, selector)) {
        siblings.push(previous);
      }

      previous = previous.previousSibling;
    }

    return siblings;
  }
};

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
824
825
826
827
828
829
var NAME = 'alert';
var VERSION = '4.3.1';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var Selector = {
XhmikosR's avatar
Dist.  
XhmikosR committed
830
831
  DISMISS: '[data-dismiss="alert"]'
};
XhmikosR's avatar
XhmikosR committed
832
833
834
835
var Event$1 = {
  CLOSE: "close" + EVENT_KEY,
  CLOSED: "closed" + EVENT_KEY,
  CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
XhmikosR's avatar
Dist.  
XhmikosR committed
836
};
XhmikosR's avatar
XhmikosR committed
837
var ClassName = {
XhmikosR's avatar
Dist.  
XhmikosR committed
838
839
840
841
842
843
844
845
846
847
848
  ALERT: 'alert',
  FADE: 'fade',
  SHOW: 'show'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
849
850
851
852
var Alert =
/*#__PURE__*/
function () {
  function Alert(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
853
854
855
856
857
858
859
860
    this._element = element;

    if (this._element) {
      Data.setData(element, DATA_KEY, this);
    }
  } // Getters


XhmikosR's avatar
XhmikosR committed
861
  var _proto = Alert.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
862

XhmikosR's avatar
XhmikosR committed
863
864
865
  // Public
  _proto.close = function close(element) {
    var rootElement = this._element;
XhmikosR's avatar
Dist.  
XhmikosR committed
866
867
868
869
870

    if (element) {
      rootElement = this._getRootElement(element);
    }

XhmikosR's avatar
XhmikosR committed
871
    var customEvent = this._triggerCloseEvent(rootElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
872
873
874
875
876
877

    if (customEvent === null || customEvent.defaultPrevented) {
      return;
    }

    this._removeElement(rootElement);
XhmikosR's avatar
XhmikosR committed
878
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
879

XhmikosR's avatar
XhmikosR committed
880
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
881
882
883
    Data.removeData(this._element, DATA_KEY);
    this._element = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
884
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
885

XhmikosR's avatar
XhmikosR committed
886
887
888
  _proto._getRootElement = function _getRootElement(element) {
    var selector = getSelectorFromElement(element);
    var parent = false;
XhmikosR's avatar
Dist.  
XhmikosR committed
889
890
891
892
893
894

    if (selector) {
      parent = SelectorEngine.findOne(selector);
    }

    if (!parent) {
XhmikosR's avatar
XhmikosR committed
895
      parent = SelectorEngine.closest(element, "." + ClassName.ALERT);
XhmikosR's avatar
Dist.  
XhmikosR committed
896
897
898
    }

    return parent;
XhmikosR's avatar
XhmikosR committed
899
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
900

XhmikosR's avatar
XhmikosR committed
901
  _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
902
    return EventHandler.trigger(element, Event$1.CLOSE);
XhmikosR's avatar
XhmikosR committed
903
904
905
906
  };

  _proto._removeElement = function _removeElement(element) {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
907
908
909
910
911
912
913
914
915

    element.classList.remove(ClassName.SHOW);

    if (!element.classList.contains(ClassName.FADE)) {
      this._destroyElement(element);

      return;
    }

XhmikosR's avatar
XhmikosR committed
916
917
918
919
    var transitionDuration = getTransitionDurationFromElement(element);
    EventHandler.one(element, TRANSITION_END, function (event) {
      return _this._destroyElement(element, event);
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
920
    emulateTransitionEnd(element, transitionDuration);
XhmikosR's avatar
XhmikosR committed
921
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
922

XhmikosR's avatar
XhmikosR committed
923
  _proto._destroyElement = function _destroyElement(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
924
925
926
927
928
929
    if (element.parentNode) {
      element.parentNode.removeChild(element);
    }

    EventHandler.trigger(element, Event$1.CLOSED);
  } // Static
XhmikosR's avatar
XhmikosR committed
930
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
931

XhmikosR's avatar
XhmikosR committed
932
  Alert._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
933
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
934
      var data = Data.getData(this, DATA_KEY);
XhmikosR's avatar
Dist.  
XhmikosR committed
935
936
937
938
939
940
941
942
943

      if (!data) {
        data = new Alert(this);
      }

      if (config === 'close') {
        data[config](this);
      }
    });
XhmikosR's avatar
XhmikosR committed
944
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
945

XhmikosR's avatar
XhmikosR committed
946
  Alert._handleDismiss = function _handleDismiss(alertInstance) {
XhmikosR's avatar
Dist.  
XhmikosR committed
947
948
949
950
951
952
953
    return function (event) {
      if (event) {
        event.preventDefault();
      }

      alertInstance.close(this);
    };
XhmikosR's avatar
XhmikosR committed
954
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
955

XhmikosR's avatar
XhmikosR committed
956
  Alert._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
957
    return Data.getData(element, DATA_KEY);
XhmikosR's avatar
XhmikosR committed
958
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
959

XhmikosR's avatar
XhmikosR committed
960
961
962
963
964
965
966
967
968
  _createClass(Alert, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION;
    }
  }]);

  return Alert;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .alert to jQuery only if jQuery is present
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
985
  var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
XhmikosR's avatar
Dist.  
XhmikosR committed
986
987
988
  jQuery.fn[NAME] = Alert._jQueryInterface;
  jQuery.fn[NAME].Constructor = Alert;

XhmikosR's avatar
XhmikosR committed
989
  jQuery.fn[NAME].noConflict = function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
990
991
992
993
994
995
996
997
998
999
1000
    jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
    return Alert._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
1001
1002
1003
1004
1005
1006
var NAME$1 = 'button';
var VERSION$1 = '4.3.1';
var DATA_KEY$1 = 'bs.button';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY$1 = '.data-api';
var ClassName$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1007
1008
1009
1010
  ACTIVE: 'active',
  BUTTON: 'btn',
  FOCUS: 'focus'
};
XhmikosR's avatar
XhmikosR committed
1011
var Selector$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1012
1013
1014
1015
1016
1017
  DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
  DATA_TOGGLE: '[data-toggle="buttons"]',
  INPUT: 'input:not([type="hidden"])',
  ACTIVE: '.active',
  BUTTON: '.btn'
};
XhmikosR's avatar
XhmikosR committed
1018
1019
1020
1021
var Event$2 = {
  CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
  FOCUS_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1,
  BLUR_DATA_API: "blur" + EVENT_KEY$1 + DATA_API_KEY$1
XhmikosR's avatar
Dist.  
XhmikosR committed
1022
1023
1024
1025
1026
1027
1028
1029
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
1030
1031
1032
1033
var Button =
/*#__PURE__*/
function () {
  function Button(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1034
1035
1036
1037
1038
    this._element = element;
    Data.setData(element, DATA_KEY$1, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
1039
  var _proto = Button.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
1040

XhmikosR's avatar
XhmikosR committed
1041
1042
1043
1044
1045
  // Public
  _proto.toggle = function toggle() {
    var triggerChangeEvent = true;
    var addAriaPressed = true;
    var rootElement = SelectorEngine.closest(this._element, Selector$1.DATA_TOGGLE);
XhmikosR's avatar
Dist.  
XhmikosR committed
1046
1047

    if (rootElement) {
XhmikosR's avatar
XhmikosR committed
1048
      var input = SelectorEngine.findOne(Selector$1.INPUT, this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
1049
1050
1051
1052
1053
1054

      if (input) {
        if (input.type === 'radio') {
          if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
            triggerChangeEvent = false;
          } else {
XhmikosR's avatar
XhmikosR committed
1055
            var activeElement = SelectorEngine.findOne(Selector$1.ACTIVE, rootElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083

            if (activeElement) {
              activeElement.classList.remove(ClassName$1.ACTIVE);
            }
          }
        }

        if (triggerChangeEvent) {
          if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
            return;
          }

          input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
          EventHandler.trigger(input, 'change');
        }

        input.focus();
        addAriaPressed = false;
      }
    }

    if (addAriaPressed) {
      this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));
    }

    if (triggerChangeEvent) {
      this._element.classList.toggle(ClassName$1.ACTIVE);
    }
XhmikosR's avatar
XhmikosR committed
1084
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1085

XhmikosR's avatar
XhmikosR committed
1086
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1087
1088
1089
    Data.removeData(this._element, DATA_KEY$1);
    this._element = null;
  } // Static
XhmikosR's avatar
XhmikosR committed
1090
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
1091

XhmikosR's avatar
XhmikosR committed
1092
  Button._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1093
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
1094
      var data = Data.getData(this, DATA_KEY$1);
XhmikosR's avatar
Dist.  
XhmikosR committed
1095
1096
1097
1098
1099
1100
1101
1102
1103

      if (!data) {
        data = new Button(this);
      }

      if (config === 'toggle') {
        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
1104
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1105

XhmikosR's avatar
XhmikosR committed
1106
  Button._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1107
    return Data.getData(element, DATA_KEY$1);
XhmikosR's avatar
XhmikosR committed
1108
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1109

XhmikosR's avatar
XhmikosR committed
1110
1111
1112
1113
1114
1115
1116
1117
1118
  _createClass(Button, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$1;
    }
  }]);

  return Button;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
1119
1120
1121
1122
1123
1124
1125
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


XhmikosR's avatar
XhmikosR committed
1126
EventHandler.on(document, Event$2.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1127
  event.preventDefault();
XhmikosR's avatar
XhmikosR committed
1128
  var button = event.target;
XhmikosR's avatar
Dist.  
XhmikosR committed
1129
1130
1131
1132
1133

  if (!button.classList.contains(ClassName$1.BUTTON)) {
    button = SelectorEngine.closest(button, Selector$1.BUTTON);
  }

XhmikosR's avatar
XhmikosR committed
1134
  var data = Data.getData(button, DATA_KEY$1);
XhmikosR's avatar
Dist.  
XhmikosR committed
1135
1136
1137
1138
1139
1140
1141
1142

  if (!data) {
    data = new Button(button);
    Data.setData(button, DATA_KEY$1, data);
  }

  data.toggle();
});
XhmikosR's avatar
XhmikosR committed
1143
1144
1145
1146
1147
1148
EventHandler.on(document, Event$2.FOCUS_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
  var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);

  if (button) {
    button.classList.add(ClassName$1.FOCUS);
  }
XhmikosR's avatar
Dist.  
XhmikosR committed
1149
});
XhmikosR's avatar
XhmikosR committed
1150
1151
1152
1153
1154
1155
EventHandler.on(document, Event$2.BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
  var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);

  if (button) {
    button.classList.remove(ClassName$1.FOCUS);
  }
XhmikosR's avatar
Dist.  
XhmikosR committed
1156
1157
1158
1159
1160
1161
1162
1163
1164
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .button to jQuery only if jQuery is present
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
1165
  var JQUERY_NO_CONFLICT$1 = jQuery.fn[NAME$1];
XhmikosR's avatar
Dist.  
XhmikosR committed
1166
1167
1168
  jQuery.fn[NAME$1] = Button._jQueryInterface;
  jQuery.fn[NAME$1].Constructor = Button;

XhmikosR's avatar
XhmikosR committed
1169
1170
  jQuery.fn[NAME$1].noConflict = function () {
    jQuery.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
XhmikosR's avatar
Dist.  
XhmikosR committed
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
    return Button._jQueryInterface;
  };
}

/**
 * --------------------------------------------------------------------------
 * Bootstrap (v4.3.1): dom/manipulator.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */
function normalizeData(val) {
  if (val === 'true') {
    return true;
  }

  if (val === 'false') {
    return false;
  }

  if (val === Number(val).toString()) {
    return Number(val);
  }

  if (val === '' || val === 'null') {
    return null;
  }

  return val;
}

function normalizeDataKey(key) {
XhmikosR's avatar
XhmikosR committed
1202
1203
1204
  return key.replace(/[A-Z]/g, function (chr) {
    return chr.toLowerCase();
  });
XhmikosR's avatar
Dist.  
XhmikosR committed
1205
1206
}

XhmikosR's avatar
XhmikosR committed
1207
1208
1209
var Manipulator = {
  setDataAttribute: function setDataAttribute(element, key, value) {
    element.setAttribute("data-" + normalizeDataKey(key), value);
XhmikosR's avatar
Dist.  
XhmikosR committed
1210
  },
XhmikosR's avatar
XhmikosR committed
1211
1212
  removeDataAttribute: function removeDataAttribute(element, key) {
    element.removeAttribute("data-" + normalizeDataKey(key));
XhmikosR's avatar
Dist.  
XhmikosR committed
1213
  },
XhmikosR's avatar
XhmikosR committed
1214
  getDataAttributes: function getDataAttributes(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1215
1216
1217
1218
    if (!element) {
      return {};
    }

XhmikosR's avatar
XhmikosR committed
1219
    var attributes = _objectSpread({}, element.dataset);
XhmikosR's avatar
Dist.  
XhmikosR committed
1220

XhmikosR's avatar
XhmikosR committed
1221
    Object.keys(attributes).forEach(function (key) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1222
1223
1224
1225
      attributes[key] = normalizeData(attributes[key]);
    });
    return attributes;
  },
XhmikosR's avatar
XhmikosR committed
1226
1227
  getDataAttribute: function getDataAttribute(element, key) {
    return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
XhmikosR's avatar
Dist.  
XhmikosR committed
1228
  },
XhmikosR's avatar
XhmikosR committed
1229
1230
  offset: function offset(element) {
    var rect = element.getBoundingClientRect();
XhmikosR's avatar
Dist.  
XhmikosR committed
1231
1232
1233
1234
1235
    return {
      top: rect.top + document.body.scrollTop,
      left: rect.left + document.body.scrollLeft
    };
  },
XhmikosR's avatar
XhmikosR committed
1236
  position: function position(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1237
1238
1239
1240
1241
    return {
      top: element.offsetTop,
      left: element.offsetLeft
    };
  },
XhmikosR's avatar
XhmikosR committed
1242
  toggleClass: function toggleClass(element, className) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
    if (!element) {
      return;
    }

    if (element.classList.contains(className)) {
      element.classList.remove(className);
    } else {
      element.classList.add(className);
    }
  }
};

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
1261
1262
1263
1264
1265
1266
var NAME$2 = 'carousel';
var VERSION$2 = '4.3.1';
var DATA_KEY$2 = 'bs.carousel';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$2 = '.data-api';
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
XhmikosR's avatar
Dist.  
XhmikosR committed
1267

XhmikosR's avatar
XhmikosR committed
1268
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
XhmikosR's avatar
Dist.  
XhmikosR committed
1269

XhmikosR's avatar
XhmikosR committed
1270
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
XhmikosR's avatar
Dist.  
XhmikosR committed
1271

XhmikosR's avatar
XhmikosR committed
1272
1273
var SWIPE_THRESHOLD = 40;
var Default = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1274
1275
1276
1277
1278
1279
1280
  interval: 5000,
  keyboard: true,
  slide: false,
  pause: 'hover',
  wrap: true,
  touch: true
};
XhmikosR's avatar
XhmikosR committed
1281
var DefaultType = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1282
1283
1284
1285
1286
1287
1288
  interval: '(number|boolean)',
  keyboard: 'boolean',
  slide: '(boolean|string)',
  pause: '(string|boolean)',
  wrap: 'boolean',
  touch: 'boolean'
};
XhmikosR's avatar
XhmikosR committed
1289
var Direction = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1290
1291
1292
1293
1294
  NEXT: 'next',
  PREV: 'prev',
  LEFT: 'left',
  RIGHT: 'right'
};
XhmikosR's avatar
XhmikosR committed
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
var Event$3 = {
  SLIDE: "slide" + EVENT_KEY$2,
  SLID: "slid" + EVENT_KEY$2,
  KEYDOWN: "keydown" + EVENT_KEY$2,
  MOUSEENTER: "mouseenter" + EVENT_KEY$2,
  MOUSELEAVE: "mouseleave" + EVENT_KEY$2,
  TOUCHSTART: "touchstart" + EVENT_KEY$2,
  TOUCHMOVE: "touchmove" + EVENT_KEY$2,
  TOUCHEND: "touchend" + EVENT_KEY$2,
  POINTERDOWN: "pointerdown" + EVENT_KEY$2,
  POINTERUP: "pointerup" + EVENT_KEY$2,
  DRAG_START: "dragstart" + EVENT_KEY$2,
  LOAD_DATA_API: "load" + EVENT_KEY$2 + DATA_API_KEY$2,
  CLICK_DATA_API: "click" + EVENT_KEY$2 + DATA_API_KEY$2
XhmikosR's avatar
Dist.  
XhmikosR committed
1309
};
XhmikosR's avatar
XhmikosR committed
1310
var ClassName$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
  CAROUSEL: 'carousel',
  ACTIVE: 'active',
  SLIDE: 'slide',
  RIGHT: 'carousel-item-right',
  LEFT: 'carousel-item-left',
  NEXT: 'carousel-item-next',
  PREV: 'carousel-item-prev',
  ITEM: 'carousel-item',
  POINTER_EVENT: 'pointer-event'
};
XhmikosR's avatar
XhmikosR committed
1321
var Selector$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1322
1323
1324
1325
1326
1327
1328
1329
1330
  ACTIVE: '.active',
  ACTIVE_ITEM: '.active.carousel-item',
  ITEM: '.carousel-item',
  ITEM_IMG: '.carousel-item img',
  NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
  INDICATORS: '.carousel-indicators',
  DATA_SLIDE: '[data-slide], [data-slide-to]',
  DATA_RIDE: '[data-ride="carousel"]'
};
XhmikosR's avatar
XhmikosR committed
1331
var PointerType = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
  TOUCH: 'touch',
  PEN: 'pen'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
1342
1343
1344
1345
var Carousel =
/*#__PURE__*/
function () {
  function Carousel(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
    this._items = null;
    this._interval = null;
    this._activeElement = null;
    this._isPaused = false;
    this._isSliding = false;
    this.touchTimeout = null;
    this.touchStartX = 0;
    this.touchDeltaX = 0;
    this._config = this._getConfig(config);
    this._element = element;
    this._indicatorsElement = SelectorEngine.findOne(Selector$2.INDICATORS, this._element);
    this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
    this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);

    this._addEventListeners();

    Data.setData(element, DATA_KEY$2, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
1366
  var _proto = Carousel.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
1367

XhmikosR's avatar
XhmikosR committed
1368
1369
  // Public
  _proto.next = function next() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1370
1371
1372
    if (!this._isSliding) {
      this._slide(Direction.NEXT);
    }
XhmikosR's avatar
XhmikosR committed
1373
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1374

XhmikosR's avatar
XhmikosR committed
1375
  _proto.nextWhenVisible = function nextWhenVisible() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1376
1377
1378
1379
1380
    // Don't call next when the page isn't visible
    // or the carousel or its parent isn't visible
    if (!document.hidden && isVisible(this._element)) {
      this.next();
    }
XhmikosR's avatar
XhmikosR committed
1381
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1382

XhmikosR's avatar
XhmikosR committed
1383
  _proto.prev = function prev() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1384
1385
1386
    if (!this._isSliding) {
      this._slide(Direction.PREV);
    }
XhmikosR's avatar
XhmikosR committed
1387
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1388

XhmikosR's avatar
XhmikosR committed
1389
  _proto.pause = function pause(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
    if (!event) {
      this._isPaused = true;
    }

    if (SelectorEngine.findOne(Selector$2.NEXT_PREV, this._element)) {
      triggerTransitionEnd(this._element);
      this.cycle(true);
    }

    clearInterval(this._interval);
    this._interval = null;
XhmikosR's avatar
XhmikosR committed
1401
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1402

XhmikosR's avatar
XhmikosR committed
1403
  _proto.cycle = function cycle(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
    if (!event) {
      this._isPaused = false;
    }

    if (this._interval) {
      clearInterval(this._interval);
      this._interval = null;
    }

    if (this._config && this._config.interval && !this._isPaused) {
      this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
    }
XhmikosR's avatar
XhmikosR committed
1416
1417
1418
1419
  };

  _proto.to = function to(index) {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
1420
1421
1422

    this._activeElement = SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element);

XhmikosR's avatar
XhmikosR committed
1423
    var activeIndex = this._getItemIndex(this._activeElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
1424
1425
1426
1427
1428
1429

    if (index > this._items.length - 1 || index < 0) {
      return;
    }

    if (this._isSliding) {
XhmikosR's avatar
XhmikosR committed
1430
1431
1432
      EventHandler.one(this._element, Event$3.SLID, function () {
        return _this.to(index);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
1433
1434
1435
1436
1437
1438
1439
1440
1441
      return;
    }

    if (activeIndex === index) {
      this.pause();
      this.cycle();
      return;
    }

XhmikosR's avatar
XhmikosR committed
1442
    var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
XhmikosR's avatar
Dist.  
XhmikosR committed
1443
1444

    this._slide(direction, this._items[index]);
XhmikosR's avatar
XhmikosR committed
1445
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1446

XhmikosR's avatar
XhmikosR committed
1447
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
    EventHandler.off(this._element, EVENT_KEY$2);
    Data.removeData(this._element, DATA_KEY$2);
    this._items = null;
    this._config = null;
    this._element = null;
    this._interval = null;
    this._isPaused = null;
    this._isSliding = null;
    this._activeElement = null;
    this._indicatorsElement = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
1459
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
1460

XhmikosR's avatar
XhmikosR committed
1461
1462
  _proto._getConfig = function _getConfig(config) {
    config = _objectSpread({}, Default, config);
XhmikosR's avatar
Dist.  
XhmikosR committed
1463
1464
    typeCheckConfig(NAME$2, config, DefaultType);
    return config;
XhmikosR's avatar
XhmikosR committed
1465
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1466

XhmikosR's avatar
XhmikosR committed
1467
1468
  _proto._handleSwipe = function _handleSwipe() {
    var absDeltax = Math.abs(this.touchDeltaX);
XhmikosR's avatar
Dist.  
XhmikosR committed
1469
1470
1471
1472
1473

    if (absDeltax <= SWIPE_THRESHOLD) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
1474
1475
    var direction = absDeltax / this.touchDeltaX;
    this.touchDeltaX = 0; // swipe left
XhmikosR's avatar
Dist.  
XhmikosR committed
1476
1477
1478
1479
1480
1481
1482
1483
1484

    if (direction > 0) {
      this.prev();
    } // swipe right


    if (direction < 0) {
      this.next();
    }
XhmikosR's avatar
XhmikosR committed
1485
1486
1487
1488
  };

  _proto._addEventListeners = function _addEventListeners() {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
1489
1490

    if (this._config.keyboard) {
XhmikosR's avatar
XhmikosR committed
1491
1492
1493
      EventHandler.on(this._element, Event$3.KEYDOWN, function (event) {
        return _this2._keydown(event);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
1494
1495
1496
    }

    if (this._config.pause === 'hover') {
XhmikosR's avatar
XhmikosR committed
1497
1498
1499
1500
1501
1502
      EventHandler.on(this._element, Event$3.MOUSEENTER, function (event) {
        return _this2.pause(event);
      });
      EventHandler.on(this._element, Event$3.MOUSELEAVE, function (event) {
        return _this2.cycle(event);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
1503
1504
1505
1506
1507
    }

    if (this._config.touch) {
      this._addTouchEventListeners();
    }
XhmikosR's avatar
XhmikosR committed
1508
1509
1510
1511
  };

  _proto._addTouchEventListeners = function _addTouchEventListeners() {
    var _this3 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
1512
1513
1514
1515
1516

    if (!this._touchSupported) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
1517
1518
1519
1520
1521
    var start = function start(event) {
      if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
        _this3.touchStartX = event.clientX;
      } else if (!_this3._pointerEvent) {
        _this3.touchStartX = event.touches[0].clientX;
XhmikosR's avatar
Dist.  
XhmikosR committed
1522
1523
1524
      }
    };

XhmikosR's avatar
XhmikosR committed
1525
    var move = function move(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1526
1527
      // ensure swiping with one touch and not pinching
      if (event.touches && event.touches.length > 1) {
XhmikosR's avatar
XhmikosR committed
1528
        _this3.touchDeltaX = 0;
XhmikosR's avatar
Dist.  
XhmikosR committed
1529
      } else {
XhmikosR's avatar
XhmikosR committed
1530
        _this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
XhmikosR's avatar
Dist.  
XhmikosR committed
1531
1532
1533
      }
    };

XhmikosR's avatar
XhmikosR committed
1534
1535
1536
    var end = function end(event) {
      if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
        _this3.touchDeltaX = event.clientX - _this3.touchStartX;
XhmikosR's avatar
Dist.  
XhmikosR committed
1537
1538
      }

XhmikosR's avatar
XhmikosR committed
1539
      _this3._handleSwipe();
XhmikosR's avatar
Dist.  
XhmikosR committed
1540

XhmikosR's avatar
XhmikosR committed
1541
      if (_this3._config.pause === 'hover') {
XhmikosR's avatar
Dist.  
XhmikosR committed
1542
1543
1544
1545
1546
1547
1548
        // If it's a touch-enabled device, mouseenter/leave are fired as
        // part of the mouse compatibility events on first tap - the carousel
        // would stop cycling until user tapped out of it;
        // here, we listen for touchend, explicitly pause the carousel
        // (as if it's the second time we tap on it, mouseenter compat event
        // is NOT fired) and after a timeout (to allow for mouse compatibility
        // events to fire) we explicitly restart cycling
XhmikosR's avatar
XhmikosR committed
1549
        _this3.pause();
XhmikosR's avatar
Dist.  
XhmikosR committed
1550

XhmikosR's avatar
XhmikosR committed
1551
1552
        if (_this3.touchTimeout) {
          clearTimeout(_this3.touchTimeout);
XhmikosR's avatar
Dist.  
XhmikosR committed
1553
1554
        }

XhmikosR's avatar
XhmikosR committed
1555
1556
1557
        _this3.touchTimeout = setTimeout(function (event) {
          return _this3.cycle(event);
        }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
XhmikosR's avatar
Dist.  
XhmikosR committed
1558
1559
1560
      }
    };

XhmikosR's avatar
XhmikosR committed
1561
1562
1563
1564
    makeArray(SelectorEngine.find(Selector$2.ITEM_IMG, this._element)).forEach(function (itemImg) {
      EventHandler.on(itemImg, Event$3.DRAG_START, function (e) {
        return e.preventDefault();
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
1565
1566
1567
    });

    if (this._pointerEvent) {
XhmikosR's avatar
XhmikosR committed
1568
1569
1570
1571
1572
1573
      EventHandler.on(this._element, Event$3.POINTERDOWN, function (event) {
        return start(event);
      });
      EventHandler.on(this._element, Event$3.POINTERUP, function (event) {
        return end(event);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
1574
1575
1576

      this._element.classList.add(ClassName$2.POINTER_EVENT);
    } else {
XhmikosR's avatar
XhmikosR committed
1577
1578
1579
1580
1581
1582
1583
1584
1585
      EventHandler.on(this._element, Event$3.TOUCHSTART, function (event) {
        return start(event);
      });
      EventHandler.on(this._element, Event$3.TOUCHMOVE, function (event) {
        return move(event);
      });
      EventHandler.on(this._element, Event$3.TOUCHEND, function (event) {
        return end(event);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
1586
    }
XhmikosR's avatar
XhmikosR committed
1587
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1588

XhmikosR's avatar
XhmikosR committed
1589
  _proto._keydown = function _keydown(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
    if (/input|textarea/i.test(event.target.tagName)) {
      return;
    }

    switch (event.which) {
      case ARROW_LEFT_KEYCODE:
        event.preventDefault();
        this.prev();
        break;

      case ARROW_RIGHT_KEYCODE:
        event.preventDefault();
        this.next();
        break;

      default:
    }
XhmikosR's avatar
XhmikosR committed
1607
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1608

XhmikosR's avatar
XhmikosR committed
1609
  _proto._getItemIndex = function _getItemIndex(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1610
1611
    this._items = element && element.parentNode ? makeArray(SelectorEngine.find(Selector$2.ITEM, element.parentNode)) : [];
    return this._items.indexOf(element);
XhmikosR's avatar
XhmikosR committed
1612
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1613

XhmikosR's avatar
XhmikosR committed
1614
1615
1616
  _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
    var isNextDirection = direction === Direction.NEXT;
    var isPrevDirection = direction === Direction.PREV;
XhmikosR's avatar
Dist.  
XhmikosR committed
1617

XhmikosR's avatar
XhmikosR committed
1618
    var activeIndex = this._getItemIndex(activeElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
1619

XhmikosR's avatar
XhmikosR committed
1620
1621
    var lastItemIndex = this._items.length - 1;
    var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
XhmikosR's avatar
Dist.  
XhmikosR committed
1622
1623
1624
1625
1626

    if (isGoingToWrap && !this._config.wrap) {
      return activeElement;
    }

XhmikosR's avatar
XhmikosR committed
1627
1628
    var delta = direction === Direction.PREV ? -1 : 1;
    var itemIndex = (activeIndex + delta) % this._items.length;
XhmikosR's avatar
Dist.  
XhmikosR committed
1629
    return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
XhmikosR's avatar
XhmikosR committed
1630
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1631

XhmikosR's avatar
XhmikosR committed
1632
1633
  _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
    var targetIndex = this._getItemIndex(relatedTarget);
XhmikosR's avatar
Dist.  
XhmikosR committed
1634

XhmikosR's avatar
XhmikosR committed
1635
    var fromIndex = this._getItemIndex(SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element));
XhmikosR's avatar
Dist.  
XhmikosR committed
1636
1637

    return EventHandler.trigger(this._element, Event$3.SLIDE, {
XhmikosR's avatar
XhmikosR committed
1638
      relatedTarget: relatedTarget,
XhmikosR's avatar
Dist.  
XhmikosR committed
1639
1640
1641
1642
      direction: eventDirectionName,
      from: fromIndex,
      to: targetIndex
    });
XhmikosR's avatar
XhmikosR committed
1643
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1644

XhmikosR's avatar
XhmikosR committed
1645
  _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1646
    if (this._indicatorsElement) {
XhmikosR's avatar
XhmikosR committed
1647
      var indicators = SelectorEngine.find(Selector$2.ACTIVE, this._indicatorsElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
1648

XhmikosR's avatar
XhmikosR committed
1649
      for (var i = 0; i < indicators.length; i++) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1650
1651
1652
        indicators[i].classList.remove(ClassName$2.ACTIVE);
      }

XhmikosR's avatar
XhmikosR committed
1653
      var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
XhmikosR's avatar
Dist.  
XhmikosR committed
1654
1655
1656
1657
1658

      if (nextIndicator) {
        nextIndicator.classList.add(ClassName$2.ACTIVE);
      }
    }
XhmikosR's avatar
XhmikosR committed
1659
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1660

XhmikosR's avatar
XhmikosR committed
1661
1662
  _proto._slide = function _slide(direction, element) {
    var _this4 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
1663

XhmikosR's avatar
XhmikosR committed
1664
    var activeElement = SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
1665

XhmikosR's avatar
XhmikosR committed
1666
    var activeElementIndex = this._getItemIndex(activeElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
1667

XhmikosR's avatar
XhmikosR committed
1668
    var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
1669

XhmikosR's avatar
XhmikosR committed
1670
1671
1672
1673
1674
1675
    var nextElementIndex = this._getItemIndex(nextElement);

    var isCycling = Boolean(this._interval);
    var directionalClassName;
    var orderClassName;
    var eventDirectionName;
XhmikosR's avatar
Dist.  
XhmikosR committed
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691

    if (direction === Direction.NEXT) {
      directionalClassName = ClassName$2.LEFT;
      orderClassName = ClassName$2.NEXT;
      eventDirectionName = Direction.LEFT;
    } else {
      directionalClassName = ClassName$2.RIGHT;
      orderClassName = ClassName$2.PREV;
      eventDirectionName = Direction.RIGHT;
    }

    if (nextElement && nextElement.classList.contains(ClassName$2.ACTIVE)) {
      this._isSliding = false;
      return;
    }

XhmikosR's avatar
XhmikosR committed
1692
    var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
XhmikosR's avatar
Dist.  
XhmikosR committed
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715

    if (slideEvent.defaultPrevented) {
      return;
    }

    if (!activeElement || !nextElement) {
      // Some weirdness is happening, so we bail
      return;
    }

    this._isSliding = true;

    if (isCycling) {
      this.pause();
    }

    this._setActiveIndicatorElement(nextElement);

    if (this._element.classList.contains(ClassName$2.SLIDE)) {
      nextElement.classList.add(orderClassName);
      reflow(nextElement);
      activeElement.classList.add(directionalClassName);
      nextElement.classList.add(directionalClassName);
XhmikosR's avatar
XhmikosR committed
1716
      var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
XhmikosR's avatar
Dist.  
XhmikosR committed
1717
1718
1719
1720
1721
1722
1723
1724

      if (nextElementInterval) {
        this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
        this._config.interval = nextElementInterval;
      } else {
        this._config.interval = this._config.defaultInterval || this._config.interval;
      }

XhmikosR's avatar
XhmikosR committed
1725
1726
      var transitionDuration = getTransitionDurationFromElement(activeElement);
      EventHandler.one(activeElement, TRANSITION_END, function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
1727
1728
1729
1730
1731
1732
        nextElement.classList.remove(directionalClassName);
        nextElement.classList.remove(orderClassName);
        nextElement.classList.add(ClassName$2.ACTIVE);
        activeElement.classList.remove(ClassName$2.ACTIVE);
        activeElement.classList.remove(orderClassName);
        activeElement.classList.remove(directionalClassName);
XhmikosR's avatar
XhmikosR committed
1733
1734
1735
        _this4._isSliding = false;
        setTimeout(function () {
          EventHandler.trigger(_this4._element, Event$3.SLID, {
XhmikosR's avatar
Dist.  
XhmikosR committed
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
            relatedTarget: nextElement,
            direction: eventDirectionName,
            from: activeElementIndex,
            to: nextElementIndex
          });
        }, 0);
      });
      emulateTransitionEnd(activeElement, transitionDuration);
    } else {
      activeElement.classList.remove(ClassName$2.ACTIVE);
      nextElement.classList.add(ClassName$2.ACTIVE);
      this._isSliding = false;
      EventHandler.trigger(this._element, Event$3.SLID, {
        relatedTarget: nextElement,
        direction: eventDirectionName,
        from: activeElementIndex,
        to: nextElementIndex
      });
    }

    if (isCycling) {
      this.cycle();
    }
  } // Static
XhmikosR's avatar
XhmikosR committed
1760
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
1761

XhmikosR's avatar
XhmikosR committed
1762
1763
  Carousel._carouselInterface = function _carouselInterface(element, config) {
    var data = Data.getData(element, DATA_KEY$2);
XhmikosR's avatar
Dist.  
XhmikosR committed
1764

XhmikosR's avatar
XhmikosR committed
1765
    var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element));
XhmikosR's avatar
Dist.  
XhmikosR committed
1766
1767

    if (typeof config === 'object') {
XhmikosR's avatar
XhmikosR committed
1768
      _config = _objectSpread({}, _config, config);
XhmikosR's avatar
Dist.  
XhmikosR committed
1769
1770
    }

XhmikosR's avatar
XhmikosR committed
1771
    var action = typeof config === 'string' ? config : _config.slide;
XhmikosR's avatar
Dist.  
XhmikosR committed
1772
1773
1774
1775
1776
1777
1778
1779
1780

    if (!data) {
      data = new Carousel(element, _config);
    }

    if (typeof config === 'number') {
      data.to(config);
    } else if (typeof action === 'string') {
      if (typeof data[action] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
1781
        throw new TypeError("No method named \"" + action + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
1782
1783
1784
1785
1786
1787
1788
      }

      data[action]();
    } else if (_config.interval && _config.ride) {
      data.pause();
      data.cycle();
    }
XhmikosR's avatar
XhmikosR committed
1789
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1790

XhmikosR's avatar
XhmikosR committed
1791
  Carousel._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1792
1793
1794
    return this.each(function () {
      Carousel._carouselInterface(this, config);
    });
XhmikosR's avatar
XhmikosR committed
1795
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1796

XhmikosR's avatar
XhmikosR committed
1797
1798
  Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
    var selector = getSelectorFromElement(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
1799
1800
1801
1802
1803

    if (!selector) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
1804
    var target = SelectorEngine.findOne(selector);
XhmikosR's avatar
Dist.  
XhmikosR committed
1805
1806
1807
1808
1809

    if (!target || !target.classList.contains(ClassName$2.CAROUSEL)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
1810
    var config = _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
XhmikosR's avatar
Dist.  
XhmikosR committed
1811

XhmikosR's avatar
XhmikosR committed
1812
    var slideIndex = this.getAttribute('data-slide-to');
XhmikosR's avatar
Dist.  
XhmikosR committed
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824

    if (slideIndex) {
      config.interval = false;
    }

    Carousel._carouselInterface(target, config);

    if (slideIndex) {
      Data.getData(target, DATA_KEY$2).to(slideIndex);
    }

    event.preventDefault();
XhmikosR's avatar
XhmikosR committed
1825
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1826

XhmikosR's avatar
XhmikosR committed
1827
  Carousel._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1828
    return Data.getData(element, DATA_KEY$2);
XhmikosR's avatar
XhmikosR committed
1829
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1830

XhmikosR's avatar
XhmikosR committed
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
  _createClass(Carousel, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$2;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default;
    }
  }]);

  return Carousel;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
1845
1846
1847
1848
1849
1850
1851
1852
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


EventHandler.on(document, Event$3.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
XhmikosR's avatar
XhmikosR committed
1853
1854
EventHandler.on(window, Event$3.LOAD_DATA_API, function () {
  var carousels = makeArray(SelectorEngine.find(Selector$2.DATA_RIDE));
XhmikosR's avatar
Dist.  
XhmikosR committed
1855

XhmikosR's avatar
XhmikosR committed
1856
  for (var i = 0, len = carousels.length; i < len; i++) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
    Carousel._carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY$2));
  }
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .carousel to jQuery only if jQuery is present
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
1868
  var JQUERY_NO_CONFLICT$2 = jQuery.fn[NAME$2];
XhmikosR's avatar
Dist.  
XhmikosR committed
1869
1870
1871
  jQuery.fn[NAME$2] = Carousel._jQueryInterface;
  jQuery.fn[NAME$2].Constructor = Carousel;

XhmikosR's avatar
XhmikosR committed
1872
1873
  jQuery.fn[NAME$2].noConflict = function () {
    jQuery.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
XhmikosR's avatar
Dist.  
XhmikosR committed
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
    return Carousel._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
1884
1885
1886
1887
1888
1889
var NAME$3 = 'collapse';
var VERSION$3 = '4.3.1';
var DATA_KEY$3 = 'bs.collapse';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var DATA_API_KEY$3 = '.data-api';
var Default$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1890
1891
1892
  toggle: true,
  parent: ''
};
XhmikosR's avatar
XhmikosR committed
1893
var DefaultType$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1894
1895
1896
  toggle: 'boolean',
  parent: '(string|element)'
};
XhmikosR's avatar
XhmikosR committed
1897
1898
1899
1900
1901
1902
var Event$4 = {
  SHOW: "show" + EVENT_KEY$3,
  SHOWN: "shown" + EVENT_KEY$3,
  HIDE: "hide" + EVENT_KEY$3,
  HIDDEN: "hidden" + EVENT_KEY$3,
  CLICK_DATA_API: "click" + EVENT_KEY$3 + DATA_API_KEY$3
XhmikosR's avatar
Dist.  
XhmikosR committed
1903
};
XhmikosR's avatar
XhmikosR committed
1904
var ClassName$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1905
1906
1907
1908
1909
  SHOW: 'show',
  COLLAPSE: 'collapse',
  COLLAPSING: 'collapsing',
  COLLAPSED: 'collapsed'
};
XhmikosR's avatar
XhmikosR committed
1910
var Dimension = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1911
1912
1913
  WIDTH: 'width',
  HEIGHT: 'height'
};
XhmikosR's avatar
XhmikosR committed
1914
var Selector$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
  ACTIVES: '.show, .collapsing',
  DATA_TOGGLE: '[data-toggle="collapse"]'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
1925
1926
1927
1928
var Collapse =
/*#__PURE__*/
function () {
  function Collapse(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1929
1930
1931
    this._isTransitioning = false;
    this._element = element;
    this._config = this._getConfig(config);
XhmikosR's avatar
XhmikosR committed
1932
1933
1934
1935
1936
1937
1938
1939
1940
    this._triggerArray = makeArray(SelectorEngine.find("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
    var toggleList = makeArray(SelectorEngine.find(Selector$3.DATA_TOGGLE));

    for (var i = 0, len = toggleList.length; i < len; i++) {
      var elem = toggleList[i];
      var selector = getSelectorFromElement(elem);
      var filterElement = makeArray(SelectorEngine.find(selector)).filter(function (foundElem) {
        return foundElem === element;
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962

      if (selector !== null && filterElement.length) {
        this._selector = selector;

        this._triggerArray.push(elem);
      }
    }

    this._parent = this._config.parent ? this._getParent() : null;

    if (!this._config.parent) {
      this._addAriaAndCollapsedClass(this._element, this._triggerArray);
    }

    if (this._config.toggle) {
      this.toggle();
    }

    Data.setData(element, DATA_KEY$3, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
1963
  var _proto = Collapse.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
1964

XhmikosR's avatar
XhmikosR committed
1965
1966
  // Public
  _proto.toggle = function toggle() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1967
1968
1969
1970
1971
    if (this._element.classList.contains(ClassName$3.SHOW)) {
      this.hide();
    } else {
      this.show();
    }
XhmikosR's avatar
XhmikosR committed
1972
1973
1974
1975
  };

  _proto.show = function show() {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
1976
1977
1978
1979
1980

    if (this._isTransitioning || this._element.classList.contains(ClassName$3.SHOW)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
1981
1982
    var actives;
    var activesData;
XhmikosR's avatar
Dist.  
XhmikosR committed
1983
1984

    if (this._parent) {
XhmikosR's avatar
XhmikosR committed
1985
1986
1987
      actives = makeArray(SelectorEngine.find(Selector$3.ACTIVES, this._parent)).filter(function (elem) {
        if (typeof _this._config.parent === 'string') {
          return elem.getAttribute('data-parent') === _this._config.parent;
XhmikosR's avatar
Dist.  
XhmikosR committed
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
        }

        return elem.classList.contains(ClassName$3.COLLAPSE);
      });

      if (actives.length === 0) {
        actives = null;
      }
    }

XhmikosR's avatar
XhmikosR committed
1998
    var container = SelectorEngine.findOne(this._selector);
XhmikosR's avatar
Dist.  
XhmikosR committed
1999
2000

    if (actives) {
XhmikosR's avatar
XhmikosR committed
2001
2002
2003
      var tempActiveData = actives.filter(function (elem) {
        return container !== elem;
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
2004
2005
2006
2007
2008
2009
2010
      activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY$3) : null;

      if (activesData && activesData._isTransitioning) {
        return;
      }
    }

XhmikosR's avatar
XhmikosR committed
2011
    var startEvent = EventHandler.trigger(this._element, Event$4.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
2012
2013
2014
2015
2016
2017

    if (startEvent.defaultPrevented) {
      return;
    }

    if (actives) {
XhmikosR's avatar
XhmikosR committed
2018
      actives.forEach(function (elemActive) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
        if (container !== elemActive) {
          Collapse._collapseInterface(elemActive, 'hide');
        }

        if (!activesData) {
          Data.setData(elemActive, DATA_KEY$3, null);
        }
      });
    }

XhmikosR's avatar
XhmikosR committed
2029
    var dimension = this._getDimension();
XhmikosR's avatar
Dist.  
XhmikosR committed
2030
2031
2032
2033
2034
2035
2036
2037

    this._element.classList.remove(ClassName$3.COLLAPSE);

    this._element.classList.add(ClassName$3.COLLAPSING);

    this._element.style[dimension] = 0;

    if (this._triggerArray.length) {
XhmikosR's avatar
XhmikosR committed
2038
      this._triggerArray.forEach(function (element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2039
2040
2041
2042
2043
2044
2045
        element.classList.remove(ClassName$3.COLLAPSED);
        element.setAttribute('aria-expanded', true);
      });
    }

    this.setTransitioning(true);

XhmikosR's avatar
XhmikosR committed
2046
2047
2048
2049
2050
2051
    var complete = function complete() {
      _this._element.classList.remove(ClassName$3.COLLAPSING);

      _this._element.classList.add(ClassName$3.COLLAPSE);

      _this._element.classList.add(ClassName$3.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
2052

XhmikosR's avatar
XhmikosR committed
2053
      _this._element.style[dimension] = '';
XhmikosR's avatar
Dist.  
XhmikosR committed
2054

XhmikosR's avatar
XhmikosR committed
2055
      _this.setTransitioning(false);
XhmikosR's avatar
Dist.  
XhmikosR committed
2056

XhmikosR's avatar
XhmikosR committed
2057
      EventHandler.trigger(_this._element, Event$4.SHOWN);
XhmikosR's avatar
Dist.  
XhmikosR committed
2058
2059
    };

XhmikosR's avatar
XhmikosR committed
2060
2061
2062
    var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
    var scrollSize = "scroll" + capitalizedDimension;
    var transitionDuration = getTransitionDurationFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2063
2064
    EventHandler.one(this._element, TRANSITION_END, complete);
    emulateTransitionEnd(this._element, transitionDuration);
XhmikosR's avatar
XhmikosR committed
2065
2066
2067
2068
2069
    this._element.style[dimension] = this._element[scrollSize] + "px";
  };

  _proto.hide = function hide() {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
2070
2071
2072
2073
2074

    if (this._isTransitioning || !this._element.classList.contains(ClassName$3.SHOW)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2075
    var startEvent = EventHandler.trigger(this._element, Event$4.HIDE);
XhmikosR's avatar
Dist.  
XhmikosR committed
2076
2077
2078
2079
2080

    if (startEvent.defaultPrevented) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2081
    var dimension = this._getDimension();
XhmikosR's avatar
Dist.  
XhmikosR committed
2082

XhmikosR's avatar
XhmikosR committed
2083
    this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
2084
2085
2086
2087
2088
2089
2090
2091
    reflow(this._element);

    this._element.classList.add(ClassName$3.COLLAPSING);

    this._element.classList.remove(ClassName$3.COLLAPSE);

    this._element.classList.remove(ClassName$3.SHOW);

XhmikosR's avatar
XhmikosR committed
2092
    var triggerArrayLength = this._triggerArray.length;
XhmikosR's avatar
Dist.  
XhmikosR committed
2093
2094

    if (triggerArrayLength > 0) {
XhmikosR's avatar
XhmikosR committed
2095
2096
2097
      for (var i = 0; i < triggerArrayLength; i++) {
        var trigger = this._triggerArray[i];
        var selector = getSelectorFromElement(trigger);
XhmikosR's avatar
Dist.  
XhmikosR committed
2098
2099

        if (selector !== null) {
XhmikosR's avatar
XhmikosR committed
2100
          var elem = SelectorEngine.findOne(selector);
XhmikosR's avatar
Dist.  
XhmikosR committed
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111

          if (!elem.classList.contains(ClassName$3.SHOW)) {
            trigger.classList.add(ClassName$3.COLLAPSED);
            trigger.setAttribute('aria-expanded', false);
          }
        }
      }
    }

    this.setTransitioning(true);

XhmikosR's avatar
XhmikosR committed
2112
2113
    var complete = function complete() {
      _this2.setTransitioning(false);
XhmikosR's avatar
Dist.  
XhmikosR committed
2114

XhmikosR's avatar
XhmikosR committed
2115
      _this2._element.classList.remove(ClassName$3.COLLAPSING);
XhmikosR's avatar
Dist.  
XhmikosR committed
2116

XhmikosR's avatar
XhmikosR committed
2117
      _this2._element.classList.add(ClassName$3.COLLAPSE);
XhmikosR's avatar
Dist.  
XhmikosR committed
2118

XhmikosR's avatar
XhmikosR committed
2119
      EventHandler.trigger(_this2._element, Event$4.HIDDEN);
XhmikosR's avatar
Dist.  
XhmikosR committed
2120
2121
2122
    };

    this._element.style[dimension] = '';
XhmikosR's avatar
XhmikosR committed
2123
    var transitionDuration = getTransitionDurationFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2124
2125
    EventHandler.one(this._element, TRANSITION_END, complete);
    emulateTransitionEnd(this._element, transitionDuration);
XhmikosR's avatar
XhmikosR committed
2126
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2127

XhmikosR's avatar
XhmikosR committed
2128
  _proto.setTransitioning = function setTransitioning(isTransitioning) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2129
    this._isTransitioning = isTransitioning;
XhmikosR's avatar
XhmikosR committed
2130
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2131

XhmikosR's avatar
XhmikosR committed
2132
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2133
2134
2135
2136
2137
2138
2139
    Data.removeData(this._element, DATA_KEY$3);
    this._config = null;
    this._parent = null;
    this._element = null;
    this._triggerArray = null;
    this._isTransitioning = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
2140
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
2141

XhmikosR's avatar
XhmikosR committed
2142
2143
  _proto._getConfig = function _getConfig(config) {
    config = _objectSpread({}, Default$1, config);
XhmikosR's avatar
Dist.  
XhmikosR committed
2144
2145
2146
2147
    config.toggle = Boolean(config.toggle); // Coerce string values

    typeCheckConfig(NAME$3, config, DefaultType$1);
    return config;
XhmikosR's avatar
XhmikosR committed
2148
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2149

XhmikosR's avatar
XhmikosR committed
2150
2151
  _proto._getDimension = function _getDimension() {
    var hasWidth = this._element.classList.contains(Dimension.WIDTH);
XhmikosR's avatar
Dist.  
XhmikosR committed
2152
2153

    return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
XhmikosR's avatar
XhmikosR committed
2154
2155
2156
2157
  };

  _proto._getParent = function _getParent() {
    var _this3 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
2158

XhmikosR's avatar
XhmikosR committed
2159
    var parent = this._config.parent;
XhmikosR's avatar
Dist.  
XhmikosR committed
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169

    if (isElement(parent)) {
      // it's a jQuery object
      if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
        parent = parent[0];
      }
    } else {
      parent = SelectorEngine.findOne(parent);
    }

XhmikosR's avatar
XhmikosR committed
2170
2171
2172
    var selector = "[data-toggle=\"collapse\"][data-parent=\"" + parent + "\"]";
    makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) {
      _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
XhmikosR's avatar
Dist.  
XhmikosR committed
2173
2174
    });
    return parent;
XhmikosR's avatar
XhmikosR committed
2175
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2176

XhmikosR's avatar
XhmikosR committed
2177
  _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2178
    if (element) {
XhmikosR's avatar
XhmikosR committed
2179
      var isOpen = element.classList.contains(ClassName$3.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
2180
2181

      if (triggerArray.length) {
XhmikosR's avatar
XhmikosR committed
2182
        triggerArray.forEach(function (elem) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
          if (isOpen) {
            elem.classList.remove(ClassName$3.COLLAPSED);
          } else {
            elem.classList.add(ClassName$3.COLLAPSED);
          }

          elem.setAttribute('aria-expanded', isOpen);
        });
      }
    }
  } // Static
XhmikosR's avatar
XhmikosR committed
2194
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
2195

XhmikosR's avatar
XhmikosR committed
2196
2197
  Collapse._getTargetFromElement = function _getTargetFromElement(element) {
    var selector = getSelectorFromElement(element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2198
    return selector ? SelectorEngine.findOne(selector) : null;
XhmikosR's avatar
XhmikosR committed
2199
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2200

XhmikosR's avatar
XhmikosR committed
2201
2202
  Collapse._collapseInterface = function _collapseInterface(element, config) {
    var data = Data.getData(element, DATA_KEY$3);
XhmikosR's avatar
Dist.  
XhmikosR committed
2203

XhmikosR's avatar
XhmikosR committed
2204
    var _config = _objectSpread({}, Default$1, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215

    if (!data && _config.toggle && /show|hide/.test(config)) {
      _config.toggle = false;
    }

    if (!data) {
      data = new Collapse(element, _config);
    }

    if (typeof config === 'string') {
      if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
2216
        throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
2217
2218
2219
2220
      }

      data[config]();
    }
XhmikosR's avatar
XhmikosR committed
2221
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2222

XhmikosR's avatar
XhmikosR committed
2223
  Collapse._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2224
2225
2226
    return this.each(function () {
      Collapse._collapseInterface(this, config);
    });
XhmikosR's avatar
XhmikosR committed
2227
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2228

XhmikosR's avatar
XhmikosR committed
2229
  Collapse._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2230
    return Data.getData(element, DATA_KEY$3);
XhmikosR's avatar
XhmikosR committed
2231
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2232

XhmikosR's avatar
XhmikosR committed
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
  _createClass(Collapse, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$3;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$1;
    }
  }]);

  return Collapse;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


EventHandler.on(document, Event$4.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {
  // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
  if (event.target.tagName === 'A') {
    event.preventDefault();
  }

XhmikosR's avatar
XhmikosR committed
2260
2261
2262
2263
2264
2265
  var triggerData = Manipulator.getDataAttributes(this);
  var selector = getSelectorFromElement(this);
  var selectorElements = makeArray(SelectorEngine.find(selector));
  selectorElements.forEach(function (element) {
    var data = Data.getData(element, DATA_KEY$3);
    var config;
XhmikosR's avatar
Dist.  
XhmikosR committed
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289

    if (data) {
      // update parent attribute
      if (data._parent === null && typeof triggerData.parent === 'string') {
        data._config.parent = triggerData.parent;
        data._parent = data._getParent();
      }

      config = 'toggle';
    } else {
      config = triggerData;
    }

    Collapse._collapseInterface(element, config);
  });
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .collapse to jQuery only if jQuery is present
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
2290
  var JQUERY_NO_CONFLICT$3 = jQuery.fn[NAME$3];
XhmikosR's avatar
Dist.  
XhmikosR committed
2291
2292
2293
  jQuery.fn[NAME$3] = Collapse._jQueryInterface;
  jQuery.fn[NAME$3].Constructor = Collapse;

XhmikosR's avatar
XhmikosR committed
2294
2295
  jQuery.fn[NAME$3].noConflict = function () {
    jQuery.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
XhmikosR's avatar
Dist.  
XhmikosR committed
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
    return Collapse._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
2306
2307
2308
2309
2310
2311
var NAME$4 = 'dropdown';
var VERSION$4 = '4.3.1';
var DATA_KEY$4 = 'bs.dropdown';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var DATA_API_KEY$4 = '.data-api';
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
XhmikosR's avatar
Dist.  
XhmikosR committed
2312

XhmikosR's avatar
XhmikosR committed
2313
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
XhmikosR's avatar
Dist.  
XhmikosR committed
2314

XhmikosR's avatar
XhmikosR committed
2315
var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
XhmikosR's avatar
Dist.  
XhmikosR committed
2316

XhmikosR's avatar
XhmikosR committed
2317
var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
XhmikosR's avatar
Dist.  
XhmikosR committed
2318

XhmikosR's avatar
XhmikosR committed
2319
var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
XhmikosR's avatar
Dist.  
XhmikosR committed
2320

XhmikosR's avatar
XhmikosR committed
2321
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
XhmikosR's avatar
Dist.  
XhmikosR committed
2322

XhmikosR's avatar
XhmikosR committed
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
var Event$5 = {
  HIDE: "hide" + EVENT_KEY$4,
  HIDDEN: "hidden" + EVENT_KEY$4,
  SHOW: "show" + EVENT_KEY$4,
  SHOWN: "shown" + EVENT_KEY$4,
  CLICK: "click" + EVENT_KEY$4,
  CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4,
  KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4,
  KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4
XhmikosR's avatar
Dist.  
XhmikosR committed
2333
};
XhmikosR's avatar
XhmikosR committed
2334
var ClassName$4 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2335
2336
2337
2338
2339
2340
2341
2342
  DISABLED: 'disabled',
  SHOW: 'show',
  DROPUP: 'dropup',
  DROPRIGHT: 'dropright',
  DROPLEFT: 'dropleft',
  MENURIGHT: 'dropdown-menu-right',
  POSITION_STATIC: 'position-static'
};
XhmikosR's avatar
XhmikosR committed
2343
var Selector$4 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2344
2345
2346
2347
2348
2349
  DATA_TOGGLE: '[data-toggle="dropdown"]',
  FORM_CHILD: '.dropdown form',
  MENU: '.dropdown-menu',
  NAVBAR_NAV: '.navbar-nav',
  VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
};
XhmikosR's avatar
XhmikosR committed
2350
var AttachmentMap = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2351
2352
2353
2354
2355
2356
2357
2358
2359
  TOP: 'top-start',
  TOPEND: 'top-end',
  BOTTOM: 'bottom-start',
  BOTTOMEND: 'bottom-end',
  RIGHT: 'right-start',
  RIGHTEND: 'right-end',
  LEFT: 'left-start',
  LEFTEND: 'left-end'
};
XhmikosR's avatar
XhmikosR committed
2360
var Default$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2361
2362
2363
2364
2365
2366
  offset: 0,
  flip: true,
  boundary: 'scrollParent',
  reference: 'toggle',
  display: 'dynamic'
};
XhmikosR's avatar
XhmikosR committed
2367
var DefaultType$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
  offset: '(number|string|function)',
  flip: 'boolean',
  boundary: '(string|element)',
  reference: '(string|element)',
  display: 'string'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
2381
2382
2383
2384
var Dropdown =
/*#__PURE__*/
function () {
  function Dropdown(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
    this._element = element;
    this._popper = null;
    this._config = this._getConfig(config);
    this._menu = this._getMenuElement();
    this._inNavbar = this._detectNavbar();

    this._addEventListeners();

    Data.setData(element, DATA_KEY$4, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
2397
  var _proto = Dropdown.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
2398

XhmikosR's avatar
XhmikosR committed
2399
2400
  // Public
  _proto.toggle = function toggle() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2401
2402
2403
2404
    if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2405
    var parent = Dropdown._getParentFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2406

XhmikosR's avatar
XhmikosR committed
2407
    var isActive = this._menu.classList.contains(ClassName$4.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
2408
2409
2410
2411
2412
2413
2414

    Dropdown._clearMenus();

    if (isActive) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2415
    var relatedTarget = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2416
2417
      relatedTarget: this._element
    };
XhmikosR's avatar
XhmikosR committed
2418
    var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
XhmikosR's avatar
Dist.  
XhmikosR committed
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433

    if (showEvent.defaultPrevented) {
      return;
    } // Disable totally Popper.js for Dropdown in Navbar


    if (!this._inNavbar) {
      /**
       * Check for Popper dependency
       * Popper - https://popper.js.org
       */
      if (typeof Popper === 'undefined') {
        throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
      }

XhmikosR's avatar
XhmikosR committed
2434
      var referenceElement = this._element;
XhmikosR's avatar
Dist.  
XhmikosR committed
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460

      if (this._config.reference === 'parent') {
        referenceElement = parent;
      } else if (isElement(this._config.reference)) {
        referenceElement = this._config.reference; // Check if it's jQuery element

        if (typeof this._config.reference.jquery !== 'undefined') {
          referenceElement = this._config.reference[0];
        }
      } // If boundary is not `scrollParent`, then set position to `static`
      // to allow the menu to "escape" the scroll parent's boundaries
      // https://github.com/twbs/bootstrap/issues/24251


      if (this._config.boundary !== 'scrollParent') {
        parent.classList.add(ClassName$4.POSITION_STATIC);
      }

      this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
    } // If this is a touch-enabled device we add extra
    // empty mouseover listeners to the body's immediate children;
    // only needed because of broken event delegation on iOS
    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html


    if ('ontouchstart' in document.documentElement && !makeArray(SelectorEngine.closest(parent, Selector$4.NAVBAR_NAV)).length) {
XhmikosR's avatar
XhmikosR committed
2461
2462
2463
      makeArray(document.body.children).forEach(function (elem) {
        return EventHandler.on(elem, 'mouseover', null, noop());
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
2464
2465
2466
2467
2468
2469
2470
2471
2472
    }

    this._element.focus();

    this._element.setAttribute('aria-expanded', true);

    Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
    Manipulator.toggleClass(parent, ClassName$4.SHOW);
    EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
XhmikosR's avatar
XhmikosR committed
2473
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2474

XhmikosR's avatar
XhmikosR committed
2475
  _proto.show = function show() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2476
2477
2478
2479
    if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || this._menu.classList.contains(ClassName$4.SHOW)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2480
    var parent = Dropdown._getParentFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2481

XhmikosR's avatar
XhmikosR committed
2482
    var relatedTarget = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2483
2484
      relatedTarget: this._element
    };
XhmikosR's avatar
XhmikosR committed
2485
    var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
XhmikosR's avatar
Dist.  
XhmikosR committed
2486
2487
2488
2489
2490
2491
2492
2493

    if (showEvent.defaultPrevented) {
      return;
    }

    Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
    Manipulator.toggleClass(parent, ClassName$4.SHOW);
    EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
XhmikosR's avatar
XhmikosR committed
2494
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2495

XhmikosR's avatar
XhmikosR committed
2496
  _proto.hide = function hide() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2497
2498
2499
2500
    if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || !this._menu.classList.contains(ClassName$4.SHOW)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2501
    var parent = Dropdown._getParentFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2502

XhmikosR's avatar
XhmikosR committed
2503
    var relatedTarget = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2504
2505
      relatedTarget: this._element
    };
XhmikosR's avatar
XhmikosR committed
2506
    var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
XhmikosR's avatar
Dist.  
XhmikosR committed
2507
2508
2509
2510
2511
2512
2513
2514

    if (hideEvent.defaultPrevented) {
      return;
    }

    Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
    Manipulator.toggleClass(parent, ClassName$4.SHOW);
    EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
XhmikosR's avatar
XhmikosR committed
2515
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2516

XhmikosR's avatar
XhmikosR committed
2517
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
    Data.removeData(this._element, DATA_KEY$4);
    EventHandler.off(this._element, EVENT_KEY$4);
    this._element = null;
    this._menu = null;

    if (this._popper !== null) {
      this._popper.destroy();

      this._popper = null;
    }
XhmikosR's avatar
XhmikosR committed
2528
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2529

XhmikosR's avatar
XhmikosR committed
2530
  _proto.update = function update() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2531
2532
2533
2534
2535
2536
    this._inNavbar = this._detectNavbar();

    if (this._popper !== null) {
      this._popper.scheduleUpdate();
    }
  } // Private
XhmikosR's avatar
XhmikosR committed
2537
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
2538

XhmikosR's avatar
XhmikosR committed
2539
2540
  _proto._addEventListeners = function _addEventListeners() {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
2541

XhmikosR's avatar
XhmikosR committed
2542
    EventHandler.on(this._element, Event$5.CLICK, function (event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2543
2544
      event.preventDefault();
      event.stopPropagation();
XhmikosR's avatar
XhmikosR committed
2545
2546

      _this.toggle();
XhmikosR's avatar
Dist.  
XhmikosR committed
2547
    });
XhmikosR's avatar
XhmikosR committed
2548
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2549

XhmikosR's avatar
XhmikosR committed
2550
2551
  _proto._getConfig = function _getConfig(config) {
    config = _objectSpread({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
XhmikosR's avatar
Dist.  
XhmikosR committed
2552
2553
    typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
    return config;
XhmikosR's avatar
XhmikosR committed
2554
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2555

XhmikosR's avatar
XhmikosR committed
2556
  _proto._getMenuElement = function _getMenuElement() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2557
    if (!this._menu) {
XhmikosR's avatar
XhmikosR committed
2558
      var parent = Dropdown._getParentFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2559
2560
2561
2562
2563
2564
2565

      if (parent) {
        this._menu = SelectorEngine.findOne(Selector$4.MENU, parent);
      }
    }

    return this._menu;
XhmikosR's avatar
XhmikosR committed
2566
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2567

XhmikosR's avatar
XhmikosR committed
2568
2569
2570
  _proto._getPlacement = function _getPlacement() {
    var parentDropdown = this._element.parentNode;
    var placement = AttachmentMap.BOTTOM; // Handle dropup
XhmikosR's avatar
Dist.  
XhmikosR committed
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586

    if (parentDropdown.classList.contains(ClassName$4.DROPUP)) {
      placement = AttachmentMap.TOP;

      if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
        placement = AttachmentMap.TOPEND;
      }
    } else if (parentDropdown.classList.contains(ClassName$4.DROPRIGHT)) {
      placement = AttachmentMap.RIGHT;
    } else if (parentDropdown.classList.contains(ClassName$4.DROPLEFT)) {
      placement = AttachmentMap.LEFT;
    } else if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
      placement = AttachmentMap.BOTTOMEND;
    }

    return placement;
XhmikosR's avatar
XhmikosR committed
2587
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2588

XhmikosR's avatar
XhmikosR committed
2589
  _proto._detectNavbar = function _detectNavbar() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2590
    return Boolean(SelectorEngine.closest(this._element, '.navbar'));
XhmikosR's avatar
XhmikosR committed
2591
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2592

XhmikosR's avatar
XhmikosR committed
2593
2594
2595
2596
  _proto._getOffset = function _getOffset() {
    var _this2 = this;

    var offset = {};
XhmikosR's avatar
Dist.  
XhmikosR committed
2597
2598

    if (typeof this._config.offset === 'function') {
XhmikosR's avatar
XhmikosR committed
2599
2600
      offset.fn = function (data) {
        data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
XhmikosR's avatar
Dist.  
XhmikosR committed
2601
2602
2603
2604
2605
2606
2607
        return data;
      };
    } else {
      offset.offset = this._config.offset;
    }

    return offset;
XhmikosR's avatar
XhmikosR committed
2608
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2609

XhmikosR's avatar
XhmikosR committed
2610
2611
  _proto._getPopperConfig = function _getPopperConfig() {
    var popperConfig = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
      placement: this._getPlacement(),
      modifiers: {
        offset: this._getOffset(),
        flip: {
          enabled: this._config.flip
        },
        preventOverflow: {
          boundariesElement: this._config.boundary
        }
      } // Disable Popper.js if we have a static display

    };

    if (this._config.display === 'static') {
      popperConfig.modifiers.applyStyle = {
        enabled: false
      };
    }

    return popperConfig;
  } // Static
XhmikosR's avatar
XhmikosR committed
2633
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
2634

XhmikosR's avatar
XhmikosR committed
2635
2636
  Dropdown._dropdownInterface = function _dropdownInterface(element, config) {
    var data = Data.getData(element, DATA_KEY$4);
XhmikosR's avatar
Dist.  
XhmikosR committed
2637

XhmikosR's avatar
XhmikosR committed
2638
    var _config = typeof config === 'object' ? config : null;
XhmikosR's avatar
Dist.  
XhmikosR committed
2639
2640
2641
2642
2643
2644
2645

    if (!data) {
      data = new Dropdown(element, _config);
    }

    if (typeof config === 'string') {
      if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
2646
        throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
2647
2648
2649
2650
      }

      data[config]();
    }
XhmikosR's avatar
XhmikosR committed
2651
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2652

XhmikosR's avatar
XhmikosR committed
2653
  Dropdown._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2654
2655
2656
    return this.each(function () {
      Dropdown._dropdownInterface(this, config);
    });
XhmikosR's avatar
XhmikosR committed
2657
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2658

XhmikosR's avatar
XhmikosR committed
2659
  Dropdown._clearMenus = function _clearMenus(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2660
2661
2662
2663
    if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2664
    var toggles = makeArray(SelectorEngine.find(Selector$4.DATA_TOGGLE));
XhmikosR's avatar
Dist.  
XhmikosR committed
2665

XhmikosR's avatar
XhmikosR committed
2666
2667
    for (var i = 0, len = toggles.length; i < len; i++) {
      var parent = Dropdown._getParentFromElement(toggles[i]);
XhmikosR's avatar
Dist.  
XhmikosR committed
2668

XhmikosR's avatar
XhmikosR committed
2669
2670
      var context = Data.getData(toggles[i], DATA_KEY$4);
      var relatedTarget = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
        relatedTarget: toggles[i]
      };

      if (event && event.type === 'click') {
        relatedTarget.clickEvent = event;
      }

      if (!context) {
        continue;
      }

XhmikosR's avatar
XhmikosR committed
2682
      var dropdownMenu = context._menu;
XhmikosR's avatar
Dist.  
XhmikosR committed
2683
2684
2685
2686
2687
2688
2689
2690
2691

      if (!parent.classList.contains(ClassName$4.SHOW)) {
        continue;
      }

      if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && parent.contains(event.target)) {
        continue;
      }

XhmikosR's avatar
XhmikosR committed
2692
      var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
XhmikosR's avatar
Dist.  
XhmikosR committed
2693
2694
2695
2696
2697
2698
2699
2700

      if (hideEvent.defaultPrevented) {
        continue;
      } // If this is a touch-enabled device we remove the extra
      // empty mouseover listeners we added for iOS support


      if ('ontouchstart' in document.documentElement) {
XhmikosR's avatar
XhmikosR committed
2701
2702
2703
        makeArray(document.body.children).forEach(function (elem) {
          return EventHandler.off(elem, 'mouseover', null, noop());
        });
XhmikosR's avatar
Dist.  
XhmikosR committed
2704
2705
2706
2707
2708
2709
2710
      }

      toggles[i].setAttribute('aria-expanded', 'false');
      dropdownMenu.classList.remove(ClassName$4.SHOW);
      parent.classList.remove(ClassName$4.SHOW);
      EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
    }
XhmikosR's avatar
XhmikosR committed
2711
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2712

XhmikosR's avatar
XhmikosR committed
2713
2714
2715
  Dropdown._getParentFromElement = function _getParentFromElement(element) {
    var parent;
    var selector = getSelectorFromElement(element);
XhmikosR's avatar
Dist.  
XhmikosR committed
2716
2717
2718
2719
2720
2721

    if (selector) {
      parent = SelectorEngine.findOne(selector);
    }

    return parent || element.parentNode;
XhmikosR's avatar
XhmikosR committed
2722
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2723

XhmikosR's avatar
XhmikosR committed
2724
  Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
    // If not input/textarea:
    //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
    // If input/textarea:
    //  - If space key => not a dropdown command
    //  - If key is other than escape
    //    - If key is not up or down => not a dropdown command
    //    - If trigger inside the menu => not a dropdown command
    if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || SelectorEngine.closest(event.target, Selector$4.MENU)) : !REGEXP_KEYDOWN.test(event.which)) {
      return;
    }

    event.preventDefault();
    event.stopPropagation();

    if (this.disabled || this.classList.contains(ClassName$4.DISABLED)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2743
    var parent = Dropdown._getParentFromElement(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
2744

XhmikosR's avatar
XhmikosR committed
2745
    var isActive = parent.classList.contains(ClassName$4.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756

    if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
      if (event.which === ESCAPE_KEYCODE) {
        EventHandler.trigger(SelectorEngine.findOne(Selector$4.DATA_TOGGLE, parent), 'focus');
      }

      Dropdown._clearMenus();

      return;
    }

XhmikosR's avatar
XhmikosR committed
2757
    var items = makeArray(SelectorEngine.find(Selector$4.VISIBLE_ITEMS, parent));
XhmikosR's avatar
Dist.  
XhmikosR committed
2758
2759
2760
2761
2762

    if (!items.length) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2763
    var index = items.indexOf(event.target);
XhmikosR's avatar
Dist.  
XhmikosR committed
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779

    if (event.which === ARROW_UP_KEYCODE && index > 0) {
      // Up
      index--;
    }

    if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
      // Down
      index++;
    }

    if (index < 0) {
      index = 0;
    }

    items[index].focus();
XhmikosR's avatar
XhmikosR committed
2780
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2781

XhmikosR's avatar
XhmikosR committed
2782
  Dropdown._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2783
    return Data.getData(element, DATA_KEY$4);
XhmikosR's avatar
XhmikosR committed
2784
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2785

XhmikosR's avatar
XhmikosR committed
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
  _createClass(Dropdown, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$4;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$2;
    }
  }, {
    key: "DefaultType",
    get: function get() {
      return DefaultType$2;
    }
  }]);

  return Dropdown;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event$5.CLICK_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event$5.KEYUP_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
  event.preventDefault();
  event.stopPropagation();

  Dropdown._dropdownInterface(this, 'toggle');
});
XhmikosR's avatar
XhmikosR committed
2822
2823
2824
EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
  return e.stopPropagation();
});
XhmikosR's avatar
Dist.  
XhmikosR committed
2825
2826
2827
2828
2829
2830
2831
2832
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .dropdown to jQuery only if jQuery is present
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
2833
  var JQUERY_NO_CONFLICT$4 = jQuery.fn[NAME$4];
XhmikosR's avatar
Dist.  
XhmikosR committed
2834
2835
2836
  jQuery.fn[NAME$4] = Dropdown._jQueryInterface;
  jQuery.fn[NAME$4].Constructor = Dropdown;

XhmikosR's avatar
XhmikosR committed
2837
2838
  jQuery.fn[NAME$4].noConflict = function () {
    jQuery.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
XhmikosR's avatar
Dist.  
XhmikosR committed
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
    return Dropdown._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
2849
2850
2851
2852
2853
2854
var NAME$5 = 'modal';
var VERSION$5 = '4.3.1';
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$5 = '.data-api';
var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
XhmikosR's avatar
Dist.  
XhmikosR committed
2855

XhmikosR's avatar
XhmikosR committed
2856
var Default$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2857
2858
2859
2860
2861
  backdrop: true,
  keyboard: true,
  focus: true,
  show: true
};
XhmikosR's avatar
XhmikosR committed
2862
var DefaultType$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2863
2864
2865
2866
2867
  backdrop: '(boolean|string)',
  keyboard: 'boolean',
  focus: 'boolean',
  show: 'boolean'
};
XhmikosR's avatar
XhmikosR committed
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
var Event$6 = {
  HIDE: "hide" + EVENT_KEY$5,
  HIDDEN: "hidden" + EVENT_KEY$5,
  SHOW: "show" + EVENT_KEY$5,
  SHOWN: "shown" + EVENT_KEY$5,
  FOCUSIN: "focusin" + EVENT_KEY$5,
  RESIZE: "resize" + EVENT_KEY$5,
  CLICK_DISMISS: "click.dismiss" + EVENT_KEY$5,
  KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY$5,
  MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5,
  MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5,
  CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5
XhmikosR's avatar
Dist.  
XhmikosR committed
2880
};
XhmikosR's avatar
XhmikosR committed
2881
var ClassName$5 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2882
2883
2884
2885
2886
2887
2888
  SCROLLABLE: 'modal-dialog-scrollable',
  SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
  BACKDROP: 'modal-backdrop',
  OPEN: 'modal-open',
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
2889
var Selector$5 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
  DIALOG: '.modal-dialog',
  MODAL_BODY: '.modal-body',
  DATA_TOGGLE: '[data-toggle="modal"]',
  DATA_DISMISS: '[data-dismiss="modal"]',
  FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
  STICKY_CONTENT: '.sticky-top'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
2904
2905
2906
2907
var Modal =
/*#__PURE__*/
function () {
  function Modal(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
    this._config = this._getConfig(config);
    this._element = element;
    this._dialog = SelectorEngine.findOne(Selector$5.DIALOG, element);
    this._backdrop = null;
    this._isShown = false;
    this._isBodyOverflowing = false;
    this._ignoreBackdropClick = false;
    this._isTransitioning = false;
    this._scrollbarWidth = 0;
    Data.setData(element, DATA_KEY$5, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
2921
  var _proto = Modal.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
2922

XhmikosR's avatar
XhmikosR committed
2923
2924
  // Public
  _proto.toggle = function toggle(relatedTarget) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2925
    return this._isShown ? this.hide() : this.show(relatedTarget);
XhmikosR's avatar
XhmikosR committed
2926
2927
2928
2929
  };

  _proto.show = function show(relatedTarget) {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
2930
2931
2932
2933
2934
2935
2936
2937
2938

    if (this._isShown || this._isTransitioning) {
      return;
    }

    if (this._element.classList.contains(ClassName$5.FADE)) {
      this._isTransitioning = true;
    }

XhmikosR's avatar
XhmikosR committed
2939
2940
    var showEvent = EventHandler.trigger(this._element, Event$6.SHOW, {
      relatedTarget: relatedTarget
XhmikosR's avatar
Dist.  
XhmikosR committed
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
    });

    if (this._isShown || showEvent.defaultPrevented) {
      return;
    }

    this._isShown = true;

    this._checkScrollbar();

    this._setScrollbar();

    this._adjustDialog();

    this._setEscapeEvent();

    this._setResizeEvent();

XhmikosR's avatar
XhmikosR committed
2959
2960
2961
2962
2963
2964
2965
    EventHandler.on(this._element, Event$6.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {
      return _this.hide(event);
    });
    EventHandler.on(this._dialog, Event$6.MOUSEDOWN_DISMISS, function () {
      EventHandler.one(_this._element, Event$6.MOUSEUP_DISMISS, function (event) {
        if (event.target === _this._element) {
          _this._ignoreBackdropClick = true;
XhmikosR's avatar
Dist.  
XhmikosR committed
2966
2967
2968
2969
        }
      });
    });

XhmikosR's avatar
XhmikosR committed
2970
2971
2972
2973
2974
2975
2976
    this._showBackdrop(function () {
      return _this._showElement(relatedTarget);
    });
  };

  _proto.hide = function hide(event) {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
2977
2978
2979
2980
2981
2982
2983
2984
2985

    if (event) {
      event.preventDefault();
    }

    if (!this._isShown || this._isTransitioning) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
2986
    var hideEvent = EventHandler.trigger(this._element, Event$6.HIDE);
XhmikosR's avatar
Dist.  
XhmikosR committed
2987
2988
2989
2990
2991
2992
2993

    if (!this._isShown || hideEvent.defaultPrevented) {
      return;
    }

    this._isShown = false;

XhmikosR's avatar
XhmikosR committed
2994
    var transition = this._element.classList.contains(ClassName$5.FADE);
XhmikosR's avatar
Dist.  
XhmikosR committed
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011

    if (transition) {
      this._isTransitioning = true;
    }

    this._setEscapeEvent();

    this._setResizeEvent();

    EventHandler.off(document, Event$6.FOCUSIN);

    this._element.classList.remove(ClassName$5.SHOW);

    EventHandler.off(this._element, Event$6.CLICK_DISMISS);
    EventHandler.off(this._dialog, Event$6.MOUSEDOWN_DISMISS);

    if (transition) {
XhmikosR's avatar
XhmikosR committed
3012
3013
3014
3015
      var transitionDuration = getTransitionDurationFromElement(this._element);
      EventHandler.one(this._element, TRANSITION_END, function (event) {
        return _this2._hideModal(event);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
3016
3017
3018
3019
      emulateTransitionEnd(this._element, transitionDuration);
    } else {
      this._hideModal();
    }
XhmikosR's avatar
XhmikosR committed
3020
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3021

XhmikosR's avatar
XhmikosR committed
3022
3023
3024
3025
  _proto.dispose = function dispose() {
    [window, this._element, this._dialog].forEach(function (htmlElement) {
      return EventHandler.off(htmlElement, EVENT_KEY$5);
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
    /**
     * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
     * Do not move `document` in `htmlElements` array
     * It will remove `Event.CLICK_DATA_API` event that should remain
     */

    EventHandler.off(document, Event$6.FOCUSIN);
    Data.removeData(this._element, DATA_KEY$5);
    this._config = null;
    this._element = null;
    this._dialog = null;
    this._backdrop = null;
    this._isShown = null;
    this._isBodyOverflowing = null;
    this._ignoreBackdropClick = null;
    this._isTransitioning = null;
    this._scrollbarWidth = null;
XhmikosR's avatar
XhmikosR committed
3043
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3044

XhmikosR's avatar
XhmikosR committed
3045
  _proto.handleUpdate = function handleUpdate() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3046
3047
    this._adjustDialog();
  } // Private
XhmikosR's avatar
XhmikosR committed
3048
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
3049

XhmikosR's avatar
XhmikosR committed
3050
3051
  _proto._getConfig = function _getConfig(config) {
    config = _objectSpread({}, Default$3, config);
XhmikosR's avatar
Dist.  
XhmikosR committed
3052
3053
    typeCheckConfig(NAME$5, config, DefaultType$3);
    return config;
XhmikosR's avatar
XhmikosR committed
3054
3055
3056
3057
  };

  _proto._showElement = function _showElement(relatedTarget) {
    var _this3 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3058

XhmikosR's avatar
XhmikosR committed
3059
    var transition = this._element.classList.contains(ClassName$5.FADE);
XhmikosR's avatar
Dist.  
XhmikosR committed
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087

    if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
      // Don't move modal's DOM position
      document.body.appendChild(this._element);
    }

    this._element.style.display = 'block';

    this._element.removeAttribute('aria-hidden');

    this._element.setAttribute('aria-modal', true);

    if (this._dialog.classList.contains(ClassName$5.SCROLLABLE)) {
      SelectorEngine.findOne(Selector$5.MODAL_BODY, this._dialog).scrollTop = 0;
    } else {
      this._element.scrollTop = 0;
    }

    if (transition) {
      reflow(this._element);
    }

    this._element.classList.add(ClassName$5.SHOW);

    if (this._config.focus) {
      this._enforceFocus();
    }

XhmikosR's avatar
XhmikosR committed
3088
3089
3090
    var transitionComplete = function transitionComplete() {
      if (_this3._config.focus) {
        _this3._element.focus();
XhmikosR's avatar
Dist.  
XhmikosR committed
3091
3092
      }

XhmikosR's avatar
XhmikosR committed
3093
3094
3095
      _this3._isTransitioning = false;
      EventHandler.trigger(_this3._element, Event$6.SHOWN, {
        relatedTarget: relatedTarget
XhmikosR's avatar
Dist.  
XhmikosR committed
3096
3097
3098
3099
      });
    };

    if (transition) {
XhmikosR's avatar
XhmikosR committed
3100
      var transitionDuration = getTransitionDurationFromElement(this._dialog);
XhmikosR's avatar
Dist.  
XhmikosR committed
3101
3102
3103
3104
3105
      EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
      emulateTransitionEnd(this._dialog, transitionDuration);
    } else {
      transitionComplete();
    }
XhmikosR's avatar
XhmikosR committed
3106
3107
3108
3109
  };

  _proto._enforceFocus = function _enforceFocus() {
    var _this4 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3110
3111
3112

    EventHandler.off(document, Event$6.FOCUSIN); // guard against infinite focus loop

XhmikosR's avatar
XhmikosR committed
3113
3114
3115
    EventHandler.on(document, Event$6.FOCUSIN, function (event) {
      if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
        _this4._element.focus();
XhmikosR's avatar
Dist.  
XhmikosR committed
3116
3117
      }
    });
XhmikosR's avatar
XhmikosR committed
3118
3119
3120
3121
  };

  _proto._setEscapeEvent = function _setEscapeEvent() {
    var _this5 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3122
3123

    if (this._isShown && this._config.keyboard) {
XhmikosR's avatar
XhmikosR committed
3124
      EventHandler.on(this._element, Event$6.KEYDOWN_DISMISS, function (event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3125
3126
        if (event.which === ESCAPE_KEYCODE$1) {
          event.preventDefault();
XhmikosR's avatar
XhmikosR committed
3127
3128

          _this5.hide();
XhmikosR's avatar
Dist.  
XhmikosR committed
3129
3130
3131
3132
3133
        }
      });
    } else if (!this._isShown) {
      EventHandler.off(this._element, Event$6.KEYDOWN_DISMISS);
    }
XhmikosR's avatar
XhmikosR committed
3134
3135
3136
3137
  };

  _proto._setResizeEvent = function _setResizeEvent() {
    var _this6 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3138
3139

    if (this._isShown) {
XhmikosR's avatar
XhmikosR committed
3140
3141
3142
      EventHandler.on(window, Event$6.RESIZE, function (event) {
        return _this6.handleUpdate(event);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
3143
3144
3145
    } else {
      EventHandler.off(window, Event$6.RESIZE);
    }
XhmikosR's avatar
XhmikosR committed
3146
3147
3148
3149
  };

  _proto._hideModal = function _hideModal() {
    var _this7 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3150
3151
3152
3153
3154
3155
3156
3157
3158

    this._element.style.display = 'none';

    this._element.setAttribute('aria-hidden', true);

    this._element.removeAttribute('aria-modal');

    this._isTransitioning = false;

XhmikosR's avatar
XhmikosR committed
3159
    this._showBackdrop(function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
3160
3161
      document.body.classList.remove(ClassName$5.OPEN);

XhmikosR's avatar
XhmikosR committed
3162
      _this7._resetAdjustments();
XhmikosR's avatar
Dist.  
XhmikosR committed
3163

XhmikosR's avatar
XhmikosR committed
3164
      _this7._resetScrollbar();
XhmikosR's avatar
Dist.  
XhmikosR committed
3165

XhmikosR's avatar
XhmikosR committed
3166
      EventHandler.trigger(_this7._element, Event$6.HIDDEN);
XhmikosR's avatar
Dist.  
XhmikosR committed
3167
    });
XhmikosR's avatar
XhmikosR committed
3168
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3169

XhmikosR's avatar
XhmikosR committed
3170
  _proto._removeBackdrop = function _removeBackdrop() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3171
3172
3173
3174
3175
    if (this._backdrop) {
      this._backdrop.parentNode.removeChild(this._backdrop);

      this._backdrop = null;
    }
XhmikosR's avatar
XhmikosR committed
3176
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3177

XhmikosR's avatar
XhmikosR committed
3178
3179
3180
3181
  _proto._showBackdrop = function _showBackdrop(callback) {
    var _this8 = this;

    var animate = this._element.classList.contains(ClassName$5.FADE) ? ClassName$5.FADE : '';
XhmikosR's avatar
Dist.  
XhmikosR committed
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191

    if (this._isShown && this._config.backdrop) {
      this._backdrop = document.createElement('div');
      this._backdrop.className = ClassName$5.BACKDROP;

      if (animate) {
        this._backdrop.classList.add(animate);
      }

      document.body.appendChild(this._backdrop);
XhmikosR's avatar
XhmikosR committed
3192
3193
3194
      EventHandler.on(this._element, Event$6.CLICK_DISMISS, function (event) {
        if (_this8._ignoreBackdropClick) {
          _this8._ignoreBackdropClick = false;
XhmikosR's avatar
Dist.  
XhmikosR committed
3195
3196
3197
3198
3199
3200
3201
          return;
        }

        if (event.target !== event.currentTarget) {
          return;
        }

XhmikosR's avatar
XhmikosR committed
3202
3203
        if (_this8._config.backdrop === 'static') {
          _this8._element.focus();
XhmikosR's avatar
Dist.  
XhmikosR committed
3204
        } else {
XhmikosR's avatar
XhmikosR committed
3205
          _this8.hide();
XhmikosR's avatar
Dist.  
XhmikosR committed
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
        }
      });

      if (animate) {
        reflow(this._backdrop);
      }

      this._backdrop.classList.add(ClassName$5.SHOW);

      if (!callback) {
        return;
      }

      if (!animate) {
        callback();
        return;
      }

XhmikosR's avatar
XhmikosR committed
3224
      var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
XhmikosR's avatar
Dist.  
XhmikosR committed
3225
3226
3227
3228
3229
      EventHandler.one(this._backdrop, TRANSITION_END, callback);
      emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
    } else if (!this._isShown && this._backdrop) {
      this._backdrop.classList.remove(ClassName$5.SHOW);

XhmikosR's avatar
XhmikosR committed
3230
3231
      var callbackRemove = function callbackRemove() {
        _this8._removeBackdrop();
XhmikosR's avatar
Dist.  
XhmikosR committed
3232
3233
3234
3235
3236
3237
3238

        if (callback) {
          callback();
        }
      };

      if (this._element.classList.contains(ClassName$5.FADE)) {
XhmikosR's avatar
XhmikosR committed
3239
3240
        var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);

XhmikosR's avatar
Dist.  
XhmikosR committed
3241
        EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
XhmikosR's avatar
XhmikosR committed
3242
        emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
XhmikosR's avatar
Dist.  
XhmikosR committed
3243
3244
3245
3246
3247
3248
3249
3250
3251
      } else {
        callbackRemove();
      }
    } else if (callback) {
      callback();
    }
  } // ----------------------------------------------------------------------
  // the following methods are used to handle overflowing modals
  // ----------------------------------------------------------------------
XhmikosR's avatar
XhmikosR committed
3252
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
3253

XhmikosR's avatar
XhmikosR committed
3254
3255
  _proto._adjustDialog = function _adjustDialog() {
    var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
XhmikosR's avatar
Dist.  
XhmikosR committed
3256
3257

    if (!this._isBodyOverflowing && isModalOverflowing) {
XhmikosR's avatar
XhmikosR committed
3258
      this._element.style.paddingLeft = this._scrollbarWidth + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
3259
3260
3261
    }

    if (this._isBodyOverflowing && !isModalOverflowing) {
XhmikosR's avatar
XhmikosR committed
3262
      this._element.style.paddingRight = this._scrollbarWidth + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
3263
    }
XhmikosR's avatar
XhmikosR committed
3264
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3265

XhmikosR's avatar
XhmikosR committed
3266
  _proto._resetAdjustments = function _resetAdjustments() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3267
3268
    this._element.style.paddingLeft = '';
    this._element.style.paddingRight = '';
XhmikosR's avatar
XhmikosR committed
3269
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3270

XhmikosR's avatar
XhmikosR committed
3271
3272
  _proto._checkScrollbar = function _checkScrollbar() {
    var rect = document.body.getBoundingClientRect();
XhmikosR's avatar
Dist.  
XhmikosR committed
3273
3274
    this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
    this._scrollbarWidth = this._getScrollbarWidth();
XhmikosR's avatar
XhmikosR committed
3275
3276
3277
3278
  };

  _proto._setScrollbar = function _setScrollbar() {
    var _this9 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3279
3280
3281
3282
3283

    if (this._isBodyOverflowing) {
      // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
      //   while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
      // Adjust fixed content padding
XhmikosR's avatar
XhmikosR committed
3284
3285
3286
      makeArray(SelectorEngine.find(Selector$5.FIXED_CONTENT)).forEach(function (element) {
        var actualPadding = element.style.paddingRight;
        var calculatedPadding = window.getComputedStyle(element)['padding-right'];
XhmikosR's avatar
Dist.  
XhmikosR committed
3287
        Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
XhmikosR's avatar
XhmikosR committed
3288
        element.style.paddingRight = parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
3289
3290
      }); // Adjust sticky content margin

XhmikosR's avatar
XhmikosR committed
3291
3292
3293
      makeArray(SelectorEngine.find(Selector$5.STICKY_CONTENT)).forEach(function (element) {
        var actualMargin = element.style.marginRight;
        var calculatedMargin = window.getComputedStyle(element)['margin-right'];
XhmikosR's avatar
Dist.  
XhmikosR committed
3294
        Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
XhmikosR's avatar
XhmikosR committed
3295
        element.style.marginRight = parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
3296
3297
      }); // Adjust body padding

XhmikosR's avatar
XhmikosR committed
3298
3299
      var actualPadding = document.body.style.paddingRight;
      var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
XhmikosR's avatar
Dist.  
XhmikosR committed
3300
      Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
XhmikosR's avatar
XhmikosR committed
3301
      document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
3302
3303
3304
    }

    document.body.classList.add(ClassName$5.OPEN);
XhmikosR's avatar
XhmikosR committed
3305
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3306

XhmikosR's avatar
XhmikosR committed
3307
  _proto._resetScrollbar = function _resetScrollbar() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3308
    // Restore fixed content padding
XhmikosR's avatar
XhmikosR committed
3309
3310
    makeArray(SelectorEngine.find(Selector$5.FIXED_CONTENT)).forEach(function (element) {
      var padding = Manipulator.getDataAttribute(element, 'padding-right');
XhmikosR's avatar
Dist.  
XhmikosR committed
3311
3312
3313
3314
3315
3316
3317

      if (typeof padding !== 'undefined') {
        Manipulator.removeDataAttribute(element, 'padding-right');
        element.style.paddingRight = padding;
      }
    }); // Restore sticky content and navbar-toggler margin

XhmikosR's avatar
XhmikosR committed
3318
3319
    makeArray(SelectorEngine.find("" + Selector$5.STICKY_CONTENT)).forEach(function (element) {
      var margin = Manipulator.getDataAttribute(element, 'margin-right');
XhmikosR's avatar
Dist.  
XhmikosR committed
3320
3321
3322
3323
3324
3325
3326

      if (typeof margin !== 'undefined') {
        Manipulator.removeDataAttribute(element, 'margin-right');
        element.style.marginRight = margin;
      }
    }); // Restore body padding

XhmikosR's avatar
XhmikosR committed
3327
    var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
XhmikosR's avatar
Dist.  
XhmikosR committed
3328
3329
3330
3331
3332
3333
3334

    if (typeof padding === 'undefined') {
      document.body.style.paddingRight = '';
    } else {
      Manipulator.removeDataAttribute(document.body, 'padding-right');
      document.body.style.paddingRight = padding;
    }
XhmikosR's avatar
XhmikosR committed
3335
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3336

XhmikosR's avatar
XhmikosR committed
3337
  _proto._getScrollbarWidth = function _getScrollbarWidth() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3338
    // thx d.walsh
XhmikosR's avatar
XhmikosR committed
3339
    var scrollDiv = document.createElement('div');
XhmikosR's avatar
Dist.  
XhmikosR committed
3340
3341
    scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER;
    document.body.appendChild(scrollDiv);
XhmikosR's avatar
XhmikosR committed
3342
    var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
XhmikosR's avatar
Dist.  
XhmikosR committed
3343
3344
3345
    document.body.removeChild(scrollDiv);
    return scrollbarWidth;
  } // Static
XhmikosR's avatar
XhmikosR committed
3346
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
3347

XhmikosR's avatar
XhmikosR committed
3348
  Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3349
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
3350
      var data = Data.getData(this, DATA_KEY$5);
XhmikosR's avatar
Dist.  
XhmikosR committed
3351

XhmikosR's avatar
XhmikosR committed
3352
      var _config = _objectSpread({}, Default$3, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
3353
3354
3355
3356
3357
3358
3359

      if (!data) {
        data = new Modal(this, _config);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
3360
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
3361
3362
3363
3364
3365
3366
3367
        }

        data[config](relatedTarget);
      } else if (_config.show) {
        data.show(relatedTarget);
      }
    });
XhmikosR's avatar
XhmikosR committed
3368
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3369

XhmikosR's avatar
XhmikosR committed
3370
  Modal._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3371
    return Data.getData(element, DATA_KEY$5);
XhmikosR's avatar
XhmikosR committed
3372
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3373

XhmikosR's avatar
XhmikosR committed
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
  _createClass(Modal, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$5;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$3;
    }
  }]);

  return Modal;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
3388
3389
3390
3391
3392
3393
3394
3395
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


EventHandler.on(document, Event$6.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
XhmikosR's avatar
XhmikosR committed
3396
3397
3398
3399
  var _this10 = this;

  var target;
  var selector = getSelectorFromElement(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
3400
3401
3402
3403
3404

  if (selector) {
    target = SelectorEngine.findOne(selector);
  }

XhmikosR's avatar
XhmikosR committed
3405
  var config = Data.getData(target, DATA_KEY$5) ? 'toggle' : _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
XhmikosR's avatar
Dist.  
XhmikosR committed
3406
3407
3408
3409
3410

  if (this.tagName === 'A' || this.tagName === 'AREA') {
    event.preventDefault();
  }

XhmikosR's avatar
XhmikosR committed
3411
  EventHandler.one(target, Event$6.SHOW, function (showEvent) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3412
3413
3414
3415
3416
    if (showEvent.defaultPrevented) {
      // only register focus restorer if modal will actually get shown
      return;
    }

XhmikosR's avatar
XhmikosR committed
3417
3418
3419
    EventHandler.one(target, Event$6.HIDDEN, function () {
      if (isVisible(_this10)) {
        _this10.focus();
XhmikosR's avatar
Dist.  
XhmikosR committed
3420
3421
3422
      }
    });
  });
XhmikosR's avatar
XhmikosR committed
3423
  var data = Data.getData(target, DATA_KEY$5);
XhmikosR's avatar
Dist.  
XhmikosR committed
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437

  if (!data) {
    data = new Modal(target, config);
  }

  data.show(this);
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
3438
  var JQUERY_NO_CONFLICT$5 = jQuery.fn[NAME$5];
XhmikosR's avatar
Dist.  
XhmikosR committed
3439
3440
3441
  jQuery.fn[NAME$5] = Modal._jQueryInterface;
  jQuery.fn[NAME$5].Constructor = Modal;

XhmikosR's avatar
XhmikosR committed
3442
3443
  jQuery.fn[NAME$5].noConflict = function () {
    jQuery.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
XhmikosR's avatar
Dist.  
XhmikosR committed
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
    return Modal._jQueryInterface;
  };
}

/**
 * --------------------------------------------------------------------------
 * Bootstrap (v4.3.1): util/sanitizer.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */
XhmikosR's avatar
XhmikosR committed
3454
3455
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
XhmikosR's avatar
Dist.  
XhmikosR committed
3456
3457
3458
3459
3460
3461
/**
 * A pattern that recognizes a commonly useful subset of URLs that are safe.
 *
 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
 */

XhmikosR's avatar
XhmikosR committed
3462
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
XhmikosR's avatar
Dist.  
XhmikosR committed
3463
3464
3465
3466
3467
3468
/**
 * A pattern that matches safe data URLs. Only matches image, video and audio types.
 *
 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
 */

XhmikosR's avatar
XhmikosR committed
3469
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
XhmikosR's avatar
Dist.  
XhmikosR committed
3470

XhmikosR's avatar
XhmikosR committed
3471
3472
var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
  var attrName = attr.nodeName.toLowerCase();
XhmikosR's avatar
Dist.  
XhmikosR committed
3473
3474
3475
3476
3477
3478
3479
3480
3481

  if (allowedAttributeList.indexOf(attrName) !== -1) {
    if (uriAttrs.indexOf(attrName) !== -1) {
      return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
    }

    return true;
  }

XhmikosR's avatar
XhmikosR committed
3482
3483
3484
  var regExp = allowedAttributeList.filter(function (attrRegex) {
    return attrRegex instanceof RegExp;
  }); // Check if a regular expression validates the attribute.
XhmikosR's avatar
Dist.  
XhmikosR committed
3485

XhmikosR's avatar
XhmikosR committed
3486
  for (var i = 0, l = regExp.length; i < l; i++) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3487
3488
3489
3490
3491
3492
3493
3494
    if (attrName.match(regExp[i])) {
      return true;
    }
  }

  return false;
};

XhmikosR's avatar
XhmikosR committed
3495
var DefaultWhitelist = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
  // Global attributes allowed on any supplied element below.
  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
  a: ['target', 'href', 'title', 'rel'],
  area: [],
  b: [],
  br: [],
  col: [],
  code: [],
  div: [],
  em: [],
  hr: [],
  h1: [],
  h2: [],
  h3: [],
  h4: [],
  h5: [],
  h6: [],
  i: [],
  img: ['src', 'alt', 'title', 'width', 'height'],
  li: [],
  ol: [],
  p: [],
  pre: [],
  s: [],
  small: [],
  span: [],
  sub: [],
  sup: [],
  strong: [],
  u: [],
  ul: []
};
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
  if (!unsafeHtml.length) {
    return unsafeHtml;
  }

  if (sanitizeFn && typeof sanitizeFn === 'function') {
    return sanitizeFn(unsafeHtml);
  }

XhmikosR's avatar
XhmikosR committed
3537
3538
3539
3540
  var domParser = new window.DOMParser();
  var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
  var whitelistKeys = Object.keys(whiteList);
  var elements = makeArray(createdDocument.body.querySelectorAll('*'));
XhmikosR's avatar
Dist.  
XhmikosR committed
3541

XhmikosR's avatar
XhmikosR committed
3542
3543
3544
  var _loop = function _loop(i, len) {
    var el = elements[i];
    var elName = el.nodeName.toLowerCase();
XhmikosR's avatar
Dist.  
XhmikosR committed
3545
3546
3547

    if (whitelistKeys.indexOf(elName) === -1) {
      el.parentNode.removeChild(el);
XhmikosR's avatar
XhmikosR committed
3548
      return "continue";
XhmikosR's avatar
Dist.  
XhmikosR committed
3549
3550
    }

XhmikosR's avatar
XhmikosR committed
3551
3552
3553
    var attributeList = makeArray(el.attributes);
    var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
    attributeList.forEach(function (attr) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3554
3555
3556
3557
      if (!allowedAttribute(attr, whitelistedAttributes)) {
        el.removeAttribute(attr.nodeName);
      }
    });
XhmikosR's avatar
XhmikosR committed
3558
3559
3560
3561
3562
3563
  };

  for (var i = 0, len = elements.length; i < len; i++) {
    var _ret = _loop(i, len);

    if (_ret === "continue") continue;
XhmikosR's avatar
Dist.  
XhmikosR committed
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
  }

  return createdDocument.body.innerHTML;
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
3575
3576
3577
3578
3579
3580
3581
3582
var NAME$6 = 'tooltip';
var VERSION$6 = '4.3.1';
var DATA_KEY$6 = 'bs.tooltip';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
var DefaultType$4 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
  animation: 'boolean',
  template: 'string',
  title: '(string|element|function)',
  trigger: 'string',
  delay: '(number|object)',
  html: 'boolean',
  selector: '(string|boolean)',
  placement: '(string|function)',
  offset: '(number|string|function)',
  container: '(string|element|boolean)',
  fallbackPlacement: '(string|array)',
  boundary: '(string|element)',
  sanitize: 'boolean',
  sanitizeFn: '(null|function)',
  whiteList: 'object'
};
XhmikosR's avatar
XhmikosR committed
3599
var AttachmentMap$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3600
3601
3602
3603
3604
3605
  AUTO: 'auto',
  TOP: 'top',
  RIGHT: 'right',
  BOTTOM: 'bottom',
  LEFT: 'left'
};
XhmikosR's avatar
XhmikosR committed
3606
var Default$4 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
  animation: true,
  template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
  trigger: 'hover focus',
  title: '',
  delay: 0,
  html: false,
  selector: false,
  placement: 'top',
  offset: 0,
  container: false,
  fallbackPlacement: 'flip',
  boundary: 'scrollParent',
  sanitize: true,
  sanitizeFn: null,
  whiteList: DefaultWhitelist
};
XhmikosR's avatar
XhmikosR committed
3623
var HoverState = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3624
3625
3626
  SHOW: 'show',
  OUT: 'out'
};
XhmikosR's avatar
XhmikosR committed
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
var Event$7 = {
  HIDE: "hide" + EVENT_KEY$6,
  HIDDEN: "hidden" + EVENT_KEY$6,
  SHOW: "show" + EVENT_KEY$6,
  SHOWN: "shown" + EVENT_KEY$6,
  INSERTED: "inserted" + EVENT_KEY$6,
  CLICK: "click" + EVENT_KEY$6,
  FOCUSIN: "focusin" + EVENT_KEY$6,
  FOCUSOUT: "focusout" + EVENT_KEY$6,
  MOUSEENTER: "mouseenter" + EVENT_KEY$6,
  MOUSELEAVE: "mouseleave" + EVENT_KEY$6
XhmikosR's avatar
Dist.  
XhmikosR committed
3638
};
XhmikosR's avatar
XhmikosR committed
3639
var ClassName$6 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3640
3641
3642
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
3643
var Selector$6 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3644
3645
3646
  TOOLTIP_INNER: '.tooltip-inner',
  TOOLTIP_ARROW: '.tooltip-arrow'
};
XhmikosR's avatar
XhmikosR committed
3647
var Trigger = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
  HOVER: 'hover',
  FOCUS: 'focus',
  CLICK: 'click',
  MANUAL: 'manual'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
3660
3661
3662
3663
var Tooltip =
/*#__PURE__*/
function () {
  function Tooltip(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
    /**
     * Check for Popper dependency
     * Popper - https://popper.js.org
     */
    if (typeof Popper === 'undefined') {
      throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
    } // private


    this._isEnabled = true;
    this._timeout = 0;
    this._hoverState = '';
    this._activeTrigger = {};
    this._popper = null; // Protected

    this.element = element;
    this.config = this._getConfig(config);
    this.tip = null;

    this._setListeners();

    Data.setData(element, this.constructor.DATA_KEY, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
3689
  var _proto = Tooltip.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
3690

XhmikosR's avatar
XhmikosR committed
3691
3692
  // Public
  _proto.enable = function enable() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3693
    this._isEnabled = true;
XhmikosR's avatar
XhmikosR committed
3694
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3695

XhmikosR's avatar
XhmikosR committed
3696
  _proto.disable = function disable() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3697
    this._isEnabled = false;
XhmikosR's avatar
XhmikosR committed
3698
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3699

XhmikosR's avatar
XhmikosR committed
3700
  _proto.toggleEnabled = function toggleEnabled() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3701
    this._isEnabled = !this._isEnabled;
XhmikosR's avatar
XhmikosR committed
3702
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3703

XhmikosR's avatar
XhmikosR committed
3704
  _proto.toggle = function toggle(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3705
3706
3707
3708
3709
    if (!this._isEnabled) {
      return;
    }

    if (event) {
XhmikosR's avatar
XhmikosR committed
3710
3711
      var dataKey = this.constructor.DATA_KEY;
      var context = Data.getData(event.delegateTarget, dataKey);
XhmikosR's avatar
Dist.  
XhmikosR committed
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733

      if (!context) {
        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
        Data.setData(event.delegateTarget, dataKey, context);
      }

      context._activeTrigger.click = !context._activeTrigger.click;

      if (context._isWithActiveTrigger()) {
        context._enter(null, context);
      } else {
        context._leave(null, context);
      }
    } else {
      if (this.getTipElement().classList.contains(ClassName$6.SHOW)) {
        this._leave(null, this);

        return;
      }

      this._enter(null, this);
    }
XhmikosR's avatar
XhmikosR committed
3734
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3735

XhmikosR's avatar
XhmikosR committed
3736
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
    clearTimeout(this._timeout);
    Data.removeData(this.element, this.constructor.DATA_KEY);
    EventHandler.off(this.element, this.constructor.EVENT_KEY);
    EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal');

    if (this.tip) {
      this.tip.parentNode.removeChild(this.tip);
    }

    this._isEnabled = null;
    this._timeout = null;
    this._hoverState = null;
    this._activeTrigger = null;

    if (this._popper !== null) {
      this._popper.destroy();
    }

    this._popper = null;
    this.element = null;
    this.config = null;
    this.tip = null;
XhmikosR's avatar
XhmikosR committed
3759
3760
3761
3762
  };

  _proto.show = function show() {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3763
3764
3765
3766
3767
3768

    if (this.element.style.display === 'none') {
      throw new Error('Please use show on visible elements');
    }

    if (this.isWithContent() && this._isEnabled) {
XhmikosR's avatar
XhmikosR committed
3769
3770
3771
      var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
      var shadowRoot = findShadowRoot(this.element);
      var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
XhmikosR's avatar
Dist.  
XhmikosR committed
3772
3773
3774
3775
3776

      if (showEvent.defaultPrevented || !isInTheDom) {
        return;
      }

XhmikosR's avatar
XhmikosR committed
3777
3778
      var tip = this.getTipElement();
      var tipId = getUID(this.constructor.NAME);
XhmikosR's avatar
Dist.  
XhmikosR committed
3779
3780
3781
3782
3783
3784
3785
3786
      tip.setAttribute('id', tipId);
      this.element.setAttribute('aria-describedby', tipId);
      this.setContent();

      if (this.config.animation) {
        tip.classList.add(ClassName$6.FADE);
      }

XhmikosR's avatar
XhmikosR committed
3787
      var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
XhmikosR's avatar
Dist.  
XhmikosR committed
3788

XhmikosR's avatar
XhmikosR committed
3789
      var attachment = this._getAttachment(placement);
XhmikosR's avatar
Dist.  
XhmikosR committed
3790
3791
3792

      this.addAttachmentClass(attachment);

XhmikosR's avatar
XhmikosR committed
3793
      var container = this._getContainer();
XhmikosR's avatar
Dist.  
XhmikosR committed
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815

      Data.setData(tip, this.constructor.DATA_KEY, this);

      if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
        container.appendChild(tip);
      }

      EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
      this._popper = new Popper(this.element, tip, {
        placement: attachment,
        modifiers: {
          offset: this._getOffset(),
          flip: {
            behavior: this.config.fallbackPlacement
          },
          arrow: {
            element: Selector$6.TOOLTIP_ARROW
          },
          preventOverflow: {
            boundariesElement: this.config.boundary
          }
        },
XhmikosR's avatar
XhmikosR committed
3816
        onCreate: function onCreate(data) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3817
          if (data.originalPlacement !== data.placement) {
XhmikosR's avatar
XhmikosR committed
3818
            _this._handlePopperPlacementChange(data);
XhmikosR's avatar
Dist.  
XhmikosR committed
3819
3820
          }
        },
XhmikosR's avatar
XhmikosR committed
3821
3822
3823
        onUpdate: function onUpdate(data) {
          return _this._handlePopperPlacementChange(data);
        }
XhmikosR's avatar
Dist.  
XhmikosR committed
3824
3825
3826
3827
3828
3829
3830
      });
      tip.classList.add(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
      // empty mouseover listeners to the body's immediate children;
      // only needed because of broken event delegation on iOS
      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html

      if ('ontouchstart' in document.documentElement) {
XhmikosR's avatar
XhmikosR committed
3831
        makeArray(document.body.children).forEach(function (element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3832
3833
3834
3835
          EventHandler.on(element, 'mouseover', noop());
        });
      }

XhmikosR's avatar
XhmikosR committed
3836
3837
3838
      var complete = function complete() {
        if (_this.config.animation) {
          _this._fixTransition();
XhmikosR's avatar
Dist.  
XhmikosR committed
3839
3840
        }

XhmikosR's avatar
XhmikosR committed
3841
3842
3843
        var prevHoverState = _this._hoverState;
        _this._hoverState = null;
        EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
XhmikosR's avatar
Dist.  
XhmikosR committed
3844
3845

        if (prevHoverState === HoverState.OUT) {
XhmikosR's avatar
XhmikosR committed
3846
          _this._leave(null, _this);
XhmikosR's avatar
Dist.  
XhmikosR committed
3847
3848
3849
3850
        }
      };

      if (this.tip.classList.contains(ClassName$6.FADE)) {
XhmikosR's avatar
XhmikosR committed
3851
        var transitionDuration = getTransitionDurationFromElement(this.tip);
XhmikosR's avatar
Dist.  
XhmikosR committed
3852
3853
3854
3855
3856
3857
        EventHandler.one(this.tip, TRANSITION_END, complete);
        emulateTransitionEnd(this.tip, transitionDuration);
      } else {
        complete();
      }
    }
XhmikosR's avatar
XhmikosR committed
3858
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3859

XhmikosR's avatar
XhmikosR committed
3860
3861
  _proto.hide = function hide(callback) {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3862

XhmikosR's avatar
XhmikosR committed
3863
3864
3865
3866
    var tip = this.getTipElement();

    var complete = function complete() {
      if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3867
3868
3869
        tip.parentNode.removeChild(tip);
      }

XhmikosR's avatar
XhmikosR committed
3870
3871
3872
      _this2._cleanTipClass();

      _this2.element.removeAttribute('aria-describedby');
XhmikosR's avatar
Dist.  
XhmikosR committed
3873

XhmikosR's avatar
XhmikosR committed
3874
      EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
XhmikosR's avatar
Dist.  
XhmikosR committed
3875

XhmikosR's avatar
XhmikosR committed
3876
3877
      if (_this2._popper !== null) {
        _this2._popper.destroy();
XhmikosR's avatar
Dist.  
XhmikosR committed
3878
3879
3880
3881
3882
3883
3884
      }

      if (callback) {
        callback();
      }
    };

XhmikosR's avatar
XhmikosR committed
3885
    var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
XhmikosR's avatar
Dist.  
XhmikosR committed
3886
3887
3888
3889
3890
3891
3892
3893
3894

    if (hideEvent.defaultPrevented) {
      return;
    }

    tip.classList.remove(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
    // empty mouseover listeners we added for iOS support

    if ('ontouchstart' in document.documentElement) {
XhmikosR's avatar
XhmikosR committed
3895
3896
3897
      makeArray(document.body.children).forEach(function (element) {
        return EventHandler.off(element, 'mouseover', noop);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
3898
3899
3900
3901
3902
3903
3904
    }

    this._activeTrigger[Trigger.CLICK] = false;
    this._activeTrigger[Trigger.FOCUS] = false;
    this._activeTrigger[Trigger.HOVER] = false;

    if (this.tip.classList.contains(ClassName$6.FADE)) {
XhmikosR's avatar
XhmikosR committed
3905
      var transitionDuration = getTransitionDurationFromElement(tip);
XhmikosR's avatar
Dist.  
XhmikosR committed
3906
3907
3908
3909
3910
3911
3912
      EventHandler.one(tip, TRANSITION_END, complete);
      emulateTransitionEnd(tip, transitionDuration);
    } else {
      complete();
    }

    this._hoverState = '';
XhmikosR's avatar
XhmikosR committed
3913
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3914

XhmikosR's avatar
XhmikosR committed
3915
  _proto.update = function update() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3916
3917
3918
3919
    if (this._popper !== null) {
      this._popper.scheduleUpdate();
    }
  } // Protected
XhmikosR's avatar
XhmikosR committed
3920
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
3921

XhmikosR's avatar
XhmikosR committed
3922
  _proto.isWithContent = function isWithContent() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3923
    return Boolean(this.getTitle());
XhmikosR's avatar
XhmikosR committed
3924
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3925

XhmikosR's avatar
XhmikosR committed
3926
3927
3928
  _proto.addAttachmentClass = function addAttachmentClass(attachment) {
    this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3929

XhmikosR's avatar
XhmikosR committed
3930
  _proto.getTipElement = function getTipElement() {
XhmikosR's avatar
Dist.  
XhmikosR committed
3931
3932
3933
3934
    if (this.tip) {
      return this.tip;
    }

XhmikosR's avatar
XhmikosR committed
3935
    var element = document.createElement('div');
XhmikosR's avatar
Dist.  
XhmikosR committed
3936
3937
3938
    element.innerHTML = this.config.template;
    this.tip = element.children[0];
    return this.tip;
XhmikosR's avatar
XhmikosR committed
3939
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3940

XhmikosR's avatar
XhmikosR committed
3941
3942
  _proto.setContent = function setContent() {
    var tip = this.getTipElement();
XhmikosR's avatar
Dist.  
XhmikosR committed
3943
3944
3945
    this.setElementContent(SelectorEngine.findOne(Selector$6.TOOLTIP_INNER, tip), this.getTitle());
    tip.classList.remove(ClassName$6.FADE);
    tip.classList.remove(ClassName$6.SHOW);
XhmikosR's avatar
XhmikosR committed
3946
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3947

XhmikosR's avatar
XhmikosR committed
3948
  _proto.setElementContent = function setElementContent(element, content) {
XhmikosR's avatar
Dist.  
XhmikosR committed
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
    if (element === null) {
      return;
    }

    if (typeof content === 'object' && (content.nodeType || content.jquery)) {
      if (content.jquery) {
        content = content[0];
      } // content is a DOM node or a jQuery


      if (this.config.html) {
        if (content.parentNode !== element) {
          element.innerHTML = '';
          element.appendChild(content);
        }
      } else {
        element.innerText = content.textContent;
      }

      return;
    }

    if (this.config.html) {
      if (this.config.sanitize) {
        content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
      }

      element.innerHTML = content;
    } else {
      element.innerText = content;
    }
XhmikosR's avatar
XhmikosR committed
3980
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3981

XhmikosR's avatar
XhmikosR committed
3982
3983
  _proto.getTitle = function getTitle() {
    var title = this.element.getAttribute('data-original-title');
XhmikosR's avatar
Dist.  
XhmikosR committed
3984
3985
3986
3987
3988
3989
3990

    if (!title) {
      title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
    }

    return title;
  } // Private
XhmikosR's avatar
XhmikosR committed
3991
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
3992

XhmikosR's avatar
XhmikosR committed
3993
3994
  _proto._getOffset = function _getOffset() {
    var _this3 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
3995

XhmikosR's avatar
XhmikosR committed
3996
    var offset = {};
XhmikosR's avatar
Dist.  
XhmikosR committed
3997
3998

    if (typeof this.config.offset === 'function') {
XhmikosR's avatar
XhmikosR committed
3999
4000
      offset.fn = function (data) {
        data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
XhmikosR's avatar
Dist.  
XhmikosR committed
4001
4002
4003
4004
4005
4006
4007
        return data;
      };
    } else {
      offset.offset = this.config.offset;
    }

    return offset;
XhmikosR's avatar
XhmikosR committed
4008
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4009

XhmikosR's avatar
XhmikosR committed
4010
  _proto._getContainer = function _getContainer() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4011
4012
4013
4014
4015
4016
4017
4018
4019
    if (this.config.container === false) {
      return document.body;
    }

    if (isElement(this.config.container)) {
      return this.config.container;
    }

    return SelectorEngine.findOne(this.config.container);
XhmikosR's avatar
XhmikosR committed
4020
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4021

XhmikosR's avatar
XhmikosR committed
4022
  _proto._getAttachment = function _getAttachment(placement) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4023
    return AttachmentMap$1[placement.toUpperCase()];
XhmikosR's avatar
XhmikosR committed
4024
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4025

XhmikosR's avatar
XhmikosR committed
4026
4027
4028
4029
4030
  _proto._setListeners = function _setListeners() {
    var _this4 = this;

    var triggers = this.config.trigger.split(' ');
    triggers.forEach(function (trigger) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4031
      if (trigger === 'click') {
XhmikosR's avatar
XhmikosR committed
4032
4033
4034
        EventHandler.on(_this4.element, _this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
          return _this4.toggle(event);
        });
XhmikosR's avatar
Dist.  
XhmikosR committed
4035
      } else if (trigger !== Trigger.MANUAL) {
XhmikosR's avatar
XhmikosR committed
4036
4037
4038
4039
4040
4041
4042
4043
        var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
        var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
        EventHandler.on(_this4.element, eventIn, _this4.config.selector, function (event) {
          return _this4._enter(event);
        });
        EventHandler.on(_this4.element, eventOut, _this4.config.selector, function (event) {
          return _this4._leave(event);
        });
XhmikosR's avatar
Dist.  
XhmikosR committed
4044
4045
      }
    });
XhmikosR's avatar
XhmikosR committed
4046
4047
4048
    EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', function () {
      if (_this4.element) {
        _this4.hide();
XhmikosR's avatar
Dist.  
XhmikosR committed
4049
4050
4051
4052
      }
    });

    if (this.config.selector) {
XhmikosR's avatar
XhmikosR committed
4053
      this.config = _objectSpread({}, this.config, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4054
4055
4056
4057
4058
4059
        trigger: 'manual',
        selector: ''
      });
    } else {
      this._fixTitle();
    }
XhmikosR's avatar
XhmikosR committed
4060
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4061

XhmikosR's avatar
XhmikosR committed
4062
4063
  _proto._fixTitle = function _fixTitle() {
    var titleType = typeof this.element.getAttribute('data-original-title');
XhmikosR's avatar
Dist.  
XhmikosR committed
4064
4065
4066
4067
4068

    if (this.element.getAttribute('title') || titleType !== 'string') {
      this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
      this.element.setAttribute('title', '');
    }
XhmikosR's avatar
XhmikosR committed
4069
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4070

XhmikosR's avatar
XhmikosR committed
4071
4072
  _proto._enter = function _enter(event, context) {
    var dataKey = this.constructor.DATA_KEY;
XhmikosR's avatar
Dist.  
XhmikosR committed
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
    context = context || Data.getData(event.delegateTarget, dataKey);

    if (!context) {
      context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
      Data.setData(event.delegateTarget, dataKey, context);
    }

    if (event) {
      context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
    }

    if (context.getTipElement().classList.contains(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
      context._hoverState = HoverState.SHOW;
      return;
    }

    clearTimeout(context._timeout);
    context._hoverState = HoverState.SHOW;

    if (!context.config.delay || !context.config.delay.show) {
      context.show();
      return;
    }

XhmikosR's avatar
XhmikosR committed
4097
    context._timeout = setTimeout(function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
4098
4099
4100
4101
      if (context._hoverState === HoverState.SHOW) {
        context.show();
      }
    }, context.config.delay.show);
XhmikosR's avatar
XhmikosR committed
4102
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4103

XhmikosR's avatar
XhmikosR committed
4104
4105
  _proto._leave = function _leave(event, context) {
    var dataKey = this.constructor.DATA_KEY;
XhmikosR's avatar
Dist.  
XhmikosR committed
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
    context = context || Data.getData(event.delegateTarget, dataKey);

    if (!context) {
      context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
      Data.setData(event.delegateTarget, dataKey, context);
    }

    if (event) {
      context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
    }

    if (context._isWithActiveTrigger()) {
      return;
    }

    clearTimeout(context._timeout);
    context._hoverState = HoverState.OUT;

    if (!context.config.delay || !context.config.delay.hide) {
      context.hide();
      return;
    }

XhmikosR's avatar
XhmikosR committed
4129
    context._timeout = setTimeout(function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
4130
4131
4132
4133
      if (context._hoverState === HoverState.OUT) {
        context.hide();
      }
    }, context.config.delay.hide);
XhmikosR's avatar
XhmikosR committed
4134
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4135

XhmikosR's avatar
XhmikosR committed
4136
4137
  _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
    for (var trigger in this._activeTrigger) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4138
4139
4140
4141
4142
4143
      if (this._activeTrigger[trigger]) {
        return true;
      }
    }

    return false;
XhmikosR's avatar
XhmikosR committed
4144
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4145

XhmikosR's avatar
XhmikosR committed
4146
4147
4148
  _proto._getConfig = function _getConfig(config) {
    var dataAttributes = Manipulator.getDataAttributes(this.element);
    Object.keys(dataAttributes).forEach(function (dataAttr) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4149
4150
4151
4152
4153
4154
4155
4156
4157
      if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
        delete dataAttributes[dataAttr];
      }
    });

    if (config && typeof config.container === 'object' && config.container.jquery) {
      config.container = config.container[0];
    }

XhmikosR's avatar
XhmikosR committed
4158
    config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181

    if (typeof config.delay === 'number') {
      config.delay = {
        show: config.delay,
        hide: config.delay
      };
    }

    if (typeof config.title === 'number') {
      config.title = config.title.toString();
    }

    if (typeof config.content === 'number') {
      config.content = config.content.toString();
    }

    typeCheckConfig(NAME$6, config, this.constructor.DefaultType);

    if (config.sanitize) {
      config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
    }

    return config;
XhmikosR's avatar
XhmikosR committed
4182
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4183

XhmikosR's avatar
XhmikosR committed
4184
4185
  _proto._getDelegateConfig = function _getDelegateConfig() {
    var config = {};
XhmikosR's avatar
Dist.  
XhmikosR committed
4186
4187

    if (this.config) {
XhmikosR's avatar
XhmikosR committed
4188
      for (var key in this.config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4189
4190
4191
4192
4193
4194
4195
        if (this.constructor.Default[key] !== this.config[key]) {
          config[key] = this.config[key];
        }
      }
    }

    return config;
XhmikosR's avatar
XhmikosR committed
4196
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4197

XhmikosR's avatar
XhmikosR committed
4198
4199
4200
  _proto._cleanTipClass = function _cleanTipClass() {
    var tip = this.getTipElement();
    var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
XhmikosR's avatar
Dist.  
XhmikosR committed
4201
4202

    if (tabClass !== null && tabClass.length) {
XhmikosR's avatar
XhmikosR committed
4203
4204
4205
4206
4207
      tabClass.map(function (token) {
        return token.trim();
      }).forEach(function (tClass) {
        return tip.classList.remove(tClass);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
4208
    }
XhmikosR's avatar
XhmikosR committed
4209
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4210

XhmikosR's avatar
XhmikosR committed
4211
4212
  _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
    var popperInstance = popperData.instance;
XhmikosR's avatar
Dist.  
XhmikosR committed
4213
4214
4215
4216
4217
    this.tip = popperInstance.popper;

    this._cleanTipClass();

    this.addAttachmentClass(this._getAttachment(popperData.placement));
XhmikosR's avatar
XhmikosR committed
4218
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4219

XhmikosR's avatar
XhmikosR committed
4220
4221
4222
  _proto._fixTransition = function _fixTransition() {
    var tip = this.getTipElement();
    var initConfigAnimation = this.config.animation;
XhmikosR's avatar
Dist.  
XhmikosR committed
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233

    if (tip.getAttribute('x-placement') !== null) {
      return;
    }

    tip.classList.remove(ClassName$6.FADE);
    this.config.animation = false;
    this.hide();
    this.show();
    this.config.animation = initConfigAnimation;
  } // Static
XhmikosR's avatar
XhmikosR committed
4234
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4235

XhmikosR's avatar
XhmikosR committed
4236
  Tooltip._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4237
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
4238
      var data = Data.getData(this, DATA_KEY$6);
XhmikosR's avatar
Dist.  
XhmikosR committed
4239

XhmikosR's avatar
XhmikosR committed
4240
      var _config = typeof config === 'object' && config;
XhmikosR's avatar
Dist.  
XhmikosR committed
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251

      if (!data && /dispose|hide/.test(config)) {
        return;
      }

      if (!data) {
        data = new Tooltip(this, _config);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
4252
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
4253
4254
4255
4256
4257
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
4258
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4259

XhmikosR's avatar
XhmikosR committed
4260
  Tooltip._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4261
    return Data.getData(element, DATA_KEY$6);
XhmikosR's avatar
XhmikosR committed
4262
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4263

XhmikosR's avatar
XhmikosR committed
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
  _createClass(Tooltip, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$6;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$4;
    }
  }, {
    key: "NAME",
    get: function get() {
      return NAME$6;
    }
  }, {
    key: "DATA_KEY",
    get: function get() {
      return DATA_KEY$6;
    }
  }, {
    key: "Event",
    get: function get() {
      return Event$7;
    }
  }, {
    key: "EVENT_KEY",
    get: function get() {
      return EVENT_KEY$6;
    }
  }, {
    key: "DefaultType",
    get: function get() {
      return DefaultType$4;
    }
  }]);

  return Tooltip;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
4303
4304
4305
4306
4307
4308
4309
4310
4311
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .tooltip to jQuery only if jQuery is present
 */


if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
4312
  var JQUERY_NO_CONFLICT$6 = jQuery.fn[NAME$6];
XhmikosR's avatar
Dist.  
XhmikosR committed
4313
4314
4315
  jQuery.fn[NAME$6] = Tooltip._jQueryInterface;
  jQuery.fn[NAME$6].Constructor = Tooltip;

XhmikosR's avatar
XhmikosR committed
4316
4317
  jQuery.fn[NAME$6].noConflict = function () {
    jQuery.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
XhmikosR's avatar
Dist.  
XhmikosR committed
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
    return Tooltip._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
4328
4329
4330
4331
4332
4333
var NAME$7 = 'popover';
var VERSION$7 = '4.3.1';
var DATA_KEY$7 = 'bs.popover';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var CLASS_PREFIX$1 = 'bs-popover';
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
XhmikosR's avatar
Dist.  
XhmikosR committed
4334

XhmikosR's avatar
XhmikosR committed
4335
var Default$5 = _objectSpread({}, Tooltip.Default, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4336
4337
4338
4339
4340
4341
  placement: 'right',
  trigger: 'click',
  content: '',
  template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});

XhmikosR's avatar
XhmikosR committed
4342
var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4343
4344
4345
  content: '(string|element|function)'
});

XhmikosR's avatar
XhmikosR committed
4346
var ClassName$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4347
4348
4349
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
4350
var Selector$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4351
4352
4353
  TITLE: '.popover-header',
  CONTENT: '.popover-body'
};
XhmikosR's avatar
XhmikosR committed
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
var Event$8 = {
  HIDE: "hide" + EVENT_KEY$7,
  HIDDEN: "hidden" + EVENT_KEY$7,
  SHOW: "show" + EVENT_KEY$7,
  SHOWN: "shown" + EVENT_KEY$7,
  INSERTED: "inserted" + EVENT_KEY$7,
  CLICK: "click" + EVENT_KEY$7,
  FOCUSIN: "focusin" + EVENT_KEY$7,
  FOCUSOUT: "focusout" + EVENT_KEY$7,
  MOUSEENTER: "mouseenter" + EVENT_KEY$7,
  MOUSELEAVE: "mouseleave" + EVENT_KEY$7
XhmikosR's avatar
Dist.  
XhmikosR committed
4365
4366
4367
4368
4369
4370
4371
4372
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
4373
4374
4375
4376
var Popover =
/*#__PURE__*/
function (_Tooltip) {
  _inheritsLoose(Popover, _Tooltip);
XhmikosR's avatar
Dist.  
XhmikosR committed
4377

XhmikosR's avatar
XhmikosR committed
4378
4379
  function Popover() {
    return _Tooltip.apply(this, arguments) || this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4380
4381
  }

XhmikosR's avatar
XhmikosR committed
4382
  var _proto = Popover.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
4383

XhmikosR's avatar
XhmikosR committed
4384
4385
  // Overrides
  _proto.isWithContent = function isWithContent() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4386
    return this.getTitle() || this._getContent();
XhmikosR's avatar
XhmikosR committed
4387
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4388

XhmikosR's avatar
XhmikosR committed
4389
4390
4391
  _proto.addAttachmentClass = function addAttachmentClass(attachment) {
    this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + attachment);
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4392

XhmikosR's avatar
XhmikosR committed
4393
4394
  _proto.setContent = function setContent() {
    var tip = this.getTipElement(); // we use append for html objects to maintain js events
XhmikosR's avatar
Dist.  
XhmikosR committed
4395
4396
4397

    this.setElementContent(SelectorEngine.findOne(Selector$7.TITLE, tip), this.getTitle());

XhmikosR's avatar
XhmikosR committed
4398
    var content = this._getContent();
XhmikosR's avatar
Dist.  
XhmikosR committed
4399
4400
4401
4402
4403
4404
4405
4406
4407

    if (typeof content === 'function') {
      content = content.call(this.element);
    }

    this.setElementContent(SelectorEngine.findOne(Selector$7.CONTENT, tip), content);
    tip.classList.remove(ClassName$7.FADE);
    tip.classList.remove(ClassName$7.SHOW);
  } // Private
XhmikosR's avatar
XhmikosR committed
4408
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4409

XhmikosR's avatar
XhmikosR committed
4410
  _proto._getContent = function _getContent() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4411
    return this.element.getAttribute('data-content') || this.config.content;
XhmikosR's avatar
XhmikosR committed
4412
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4413

XhmikosR's avatar
XhmikosR committed
4414
4415
4416
  _proto._cleanTipClass = function _cleanTipClass() {
    var tip = this.getTipElement();
    var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
XhmikosR's avatar
Dist.  
XhmikosR committed
4417
4418

    if (tabClass !== null && tabClass.length > 0) {
XhmikosR's avatar
XhmikosR committed
4419
4420
4421
4422
4423
      tabClass.map(function (token) {
        return token.trim();
      }).forEach(function (tClass) {
        return tip.classList.remove(tClass);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
4424
4425
    }
  } // Static
XhmikosR's avatar
XhmikosR committed
4426
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4427

XhmikosR's avatar
XhmikosR committed
4428
  Popover._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4429
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
4430
      var data = Data.getData(this, DATA_KEY$7);
XhmikosR's avatar
Dist.  
XhmikosR committed
4431

XhmikosR's avatar
XhmikosR committed
4432
      var _config = typeof config === 'object' ? config : null;
XhmikosR's avatar
Dist.  
XhmikosR committed
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444

      if (!data && /dispose|hide/.test(config)) {
        return;
      }

      if (!data) {
        data = new Popover(this, _config);
        Data.setData(this, DATA_KEY$7, data);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
4445
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
4446
4447
4448
4449
4450
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
4451
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4452

XhmikosR's avatar
XhmikosR committed
4453
  Popover._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4454
    return Data.getData(element, DATA_KEY$7);
XhmikosR's avatar
XhmikosR committed
4455
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4456

XhmikosR's avatar
XhmikosR committed
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
  _createClass(Popover, null, [{
    key: "VERSION",
    // Getters
    get: function get() {
      return VERSION$7;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$5;
    }
  }, {
    key: "NAME",
    get: function get() {
      return NAME$7;
    }
  }, {
    key: "DATA_KEY",
    get: function get() {
      return DATA_KEY$7;
    }
  }, {
    key: "Event",
    get: function get() {
      return Event$8;
    }
  }, {
    key: "EVENT_KEY",
    get: function get() {
      return EVENT_KEY$7;
    }
  }, {
    key: "DefaultType",
    get: function get() {
      return DefaultType$5;
    }
  }]);

  return Popover;
}(Tooltip);
XhmikosR's avatar
Dist.  
XhmikosR committed
4497
4498
4499
4500
4501
4502
4503
4504
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 */


if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
4505
  var JQUERY_NO_CONFLICT$7 = jQuery.fn[NAME$7];
XhmikosR's avatar
Dist.  
XhmikosR committed
4506
4507
4508
  jQuery.fn[NAME$7] = Popover._jQueryInterface;
  jQuery.fn[NAME$7].Constructor = Popover;

XhmikosR's avatar
XhmikosR committed
4509
4510
  jQuery.fn[NAME$7].noConflict = function () {
    jQuery.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
XhmikosR's avatar
Dist.  
XhmikosR committed
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
    return Popover._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
4521
4522
4523
4524
4525
4526
var NAME$8 = 'scrollspy';
var VERSION$8 = '4.3.1';
var DATA_KEY$8 = 'bs.scrollspy';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$6 = '.data-api';
var Default$6 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4527
4528
4529
4530
  offset: 10,
  method: 'auto',
  target: ''
};
XhmikosR's avatar
XhmikosR committed
4531
var DefaultType$6 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4532
4533
4534
4535
  offset: 'number',
  method: 'string',
  target: '(string|element)'
};
XhmikosR's avatar
XhmikosR committed
4536
4537
4538
4539
var Event$9 = {
  ACTIVATE: "activate" + EVENT_KEY$8,
  SCROLL: "scroll" + EVENT_KEY$8,
  LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6
XhmikosR's avatar
Dist.  
XhmikosR committed
4540
};
XhmikosR's avatar
XhmikosR committed
4541
var ClassName$8 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4542
4543
4544
  DROPDOWN_ITEM: 'dropdown-item',
  ACTIVE: 'active'
};
XhmikosR's avatar
XhmikosR committed
4545
var Selector$8 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4546
4547
4548
4549
4550
4551
4552
4553
  DATA_SPY: '[data-spy="scroll"]',
  NAV_LIST_GROUP: '.nav, .list-group',
  NAV_LINKS: '.nav-link',
  NAV_ITEMS: '.nav-item',
  LIST_ITEMS: '.list-group-item',
  DROPDOWN: '.dropdown',
  DROPDOWN_TOGGLE: '.dropdown-toggle'
};
XhmikosR's avatar
XhmikosR committed
4554
var OffsetMethod = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
  OFFSET: 'offset',
  POSITION: 'position'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
4565
4566
4567
4568
4569
4570
var ScrollSpy =
/*#__PURE__*/
function () {
  function ScrollSpy(element, config) {
    var _this = this;

XhmikosR's avatar
Dist.  
XhmikosR committed
4571
4572
4573
    this._element = element;
    this._scrollElement = element.tagName === 'BODY' ? window : element;
    this._config = this._getConfig(config);
XhmikosR's avatar
XhmikosR committed
4574
    this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " ." + ClassName$8.DROPDOWN_ITEM);
XhmikosR's avatar
Dist.  
XhmikosR committed
4575
4576
4577
4578
    this._offsets = [];
    this._targets = [];
    this._activeTarget = null;
    this._scrollHeight = 0;
XhmikosR's avatar
XhmikosR committed
4579
4580
4581
    EventHandler.on(this._scrollElement, Event$9.SCROLL, function (event) {
      return _this._process(event);
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
4582
4583
4584
4585
4586
4587
4588
4589
    this.refresh();

    this._process();

    Data.setData(element, DATA_KEY$8, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
4590
  var _proto = ScrollSpy.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
4591

XhmikosR's avatar
XhmikosR committed
4592
4593
4594
  // Public
  _proto.refresh = function refresh() {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4595

XhmikosR's avatar
XhmikosR committed
4596
4597
4598
    var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
    var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
    var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
XhmikosR's avatar
Dist.  
XhmikosR committed
4599
4600
4601
    this._offsets = [];
    this._targets = [];
    this._scrollHeight = this._getScrollHeight();
XhmikosR's avatar
XhmikosR committed
4602
4603
4604
4605
    var targets = makeArray(SelectorEngine.find(this._selector));
    targets.map(function (element) {
      var target;
      var targetSelector = getSelectorFromElement(element);
XhmikosR's avatar
Dist.  
XhmikosR committed
4606
4607
4608
4609
4610
4611

      if (targetSelector) {
        target = SelectorEngine.findOne(targetSelector);
      }

      if (target) {
XhmikosR's avatar
XhmikosR committed
4612
        var targetBCR = target.getBoundingClientRect();
XhmikosR's avatar
Dist.  
XhmikosR committed
4613
4614
4615
4616
4617
4618
4619

        if (targetBCR.width || targetBCR.height) {
          return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
        }
      }

      return null;
XhmikosR's avatar
XhmikosR committed
4620
4621
4622
4623
4624
4625
4626
4627
    }).filter(function (item) {
      return item;
    }).sort(function (a, b) {
      return a[0] - b[0];
    }).forEach(function (item) {
      _this2._offsets.push(item[0]);

      _this2._targets.push(item[1]);
XhmikosR's avatar
Dist.  
XhmikosR committed
4628
    });
XhmikosR's avatar
XhmikosR committed
4629
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4630

XhmikosR's avatar
XhmikosR committed
4631
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
    Data.removeData(this._element, DATA_KEY$8);
    EventHandler.off(this._scrollElement, EVENT_KEY$8);
    this._element = null;
    this._scrollElement = null;
    this._config = null;
    this._selector = null;
    this._offsets = null;
    this._targets = null;
    this._activeTarget = null;
    this._scrollHeight = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
4643
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4644

XhmikosR's avatar
XhmikosR committed
4645
4646
  _proto._getConfig = function _getConfig(config) {
    config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
4647
4648

    if (typeof config.target !== 'string') {
XhmikosR's avatar
XhmikosR committed
4649
      var id = config.target.id;
XhmikosR's avatar
Dist.  
XhmikosR committed
4650
4651
4652
4653
4654
4655

      if (!id) {
        id = getUID(NAME$8);
        config.target.id = id;
      }

XhmikosR's avatar
XhmikosR committed
4656
      config.target = "#" + id;
XhmikosR's avatar
Dist.  
XhmikosR committed
4657
4658
4659
4660
    }

    typeCheckConfig(NAME$8, config, DefaultType$6);
    return config;
XhmikosR's avatar
XhmikosR committed
4661
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4662

XhmikosR's avatar
XhmikosR committed
4663
  _proto._getScrollTop = function _getScrollTop() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4664
    return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
XhmikosR's avatar
XhmikosR committed
4665
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4666

XhmikosR's avatar
XhmikosR committed
4667
  _proto._getScrollHeight = function _getScrollHeight() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4668
    return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
XhmikosR's avatar
XhmikosR committed
4669
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4670

XhmikosR's avatar
XhmikosR committed
4671
  _proto._getOffsetHeight = function _getOffsetHeight() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4672
    return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
XhmikosR's avatar
XhmikosR committed
4673
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4674

XhmikosR's avatar
XhmikosR committed
4675
4676
  _proto._process = function _process() {
    var scrollTop = this._getScrollTop() + this._config.offset;
XhmikosR's avatar
Dist.  
XhmikosR committed
4677

XhmikosR's avatar
XhmikosR committed
4678
    var scrollHeight = this._getScrollHeight();
XhmikosR's avatar
Dist.  
XhmikosR committed
4679

XhmikosR's avatar
XhmikosR committed
4680
    var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
XhmikosR's avatar
Dist.  
XhmikosR committed
4681
4682
4683
4684
4685
4686

    if (this._scrollHeight !== scrollHeight) {
      this.refresh();
    }

    if (scrollTop >= maxScroll) {
XhmikosR's avatar
XhmikosR committed
4687
      var target = this._targets[this._targets.length - 1];
XhmikosR's avatar
Dist.  
XhmikosR committed
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703

      if (this._activeTarget !== target) {
        this._activate(target);
      }

      return;
    }

    if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
      this._activeTarget = null;

      this._clear();

      return;
    }

XhmikosR's avatar
XhmikosR committed
4704
    var offsetLength = this._offsets.length;
XhmikosR's avatar
Dist.  
XhmikosR committed
4705

XhmikosR's avatar
XhmikosR committed
4706
4707
    for (var i = offsetLength; i--;) {
      var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
XhmikosR's avatar
Dist.  
XhmikosR committed
4708
4709
4710
4711
4712

      if (isActiveTarget) {
        this._activate(this._targets[i]);
      }
    }
XhmikosR's avatar
XhmikosR committed
4713
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4714

XhmikosR's avatar
XhmikosR committed
4715
  _proto._activate = function _activate(target) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4716
4717
4718
4719
    this._activeTarget = target;

    this._clear();

XhmikosR's avatar
XhmikosR committed
4720
4721
4722
    var queries = this._selector.split(',').map(function (selector) {
      return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
4723

XhmikosR's avatar
XhmikosR committed
4724
    var link = SelectorEngine.findOne(queries.join(','));
XhmikosR's avatar
Dist.  
XhmikosR committed
4725
4726
4727
4728
4729
4730
4731

    if (link.classList.contains(ClassName$8.DROPDOWN_ITEM)) {
      SelectorEngine.findOne(Selector$8.DROPDOWN_TOGGLE, SelectorEngine.closest(link, Selector$8.DROPDOWN)).classList.add(ClassName$8.ACTIVE);
      link.classList.add(ClassName$8.ACTIVE);
    } else {
      // Set triggered link as active
      link.classList.add(ClassName$8.ACTIVE);
XhmikosR's avatar
XhmikosR committed
4732
      SelectorEngine.parents(link, Selector$8.NAV_LIST_GROUP).forEach(function (listGroup) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4733
4734
        // Set triggered links parents as active
        // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
XhmikosR's avatar
XhmikosR committed
4735
4736
4737
        SelectorEngine.prev(listGroup, Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).forEach(function (item) {
          return item.classList.add(ClassName$8.ACTIVE);
        }); // Handle special case when .nav-link is inside .nav-item
XhmikosR's avatar
Dist.  
XhmikosR committed
4738

XhmikosR's avatar
XhmikosR committed
4739
4740
4741
4742
        SelectorEngine.prev(listGroup, Selector$8.NAV_ITEMS).forEach(function (navItem) {
          SelectorEngine.children(navItem, Selector$8.NAV_LINKS).forEach(function (item) {
            return item.classList.add(ClassName$8.ACTIVE);
          });
XhmikosR's avatar
Dist.  
XhmikosR committed
4743
4744
4745
4746
4747
4748
4749
        });
      });
    }

    EventHandler.trigger(this._scrollElement, Event$9.ACTIVATE, {
      relatedTarget: target
    });
XhmikosR's avatar
XhmikosR committed
4750
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4751

XhmikosR's avatar
XhmikosR committed
4752
4753
4754
4755
4756
4757
  _proto._clear = function _clear() {
    makeArray(SelectorEngine.find(this._selector)).filter(function (node) {
      return node.classList.contains(ClassName$8.ACTIVE);
    }).forEach(function (node) {
      return node.classList.remove(ClassName$8.ACTIVE);
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
4758
  } // Static
XhmikosR's avatar
XhmikosR committed
4759
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4760

XhmikosR's avatar
XhmikosR committed
4761
  ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4762
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
4763
      var data = Data.getData(this, DATA_KEY$8);
XhmikosR's avatar
Dist.  
XhmikosR committed
4764

XhmikosR's avatar
XhmikosR committed
4765
      var _config = typeof config === 'object' && config;
XhmikosR's avatar
Dist.  
XhmikosR committed
4766
4767
4768
4769
4770
4771
4772

      if (!data) {
        data = new ScrollSpy(this, _config);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
4773
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
4774
4775
4776
4777
4778
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
4779
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4780

XhmikosR's avatar
XhmikosR committed
4781
  ScrollSpy._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4782
    return Data.getData(element, DATA_KEY$8);
XhmikosR's avatar
XhmikosR committed
4783
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4784

XhmikosR's avatar
XhmikosR committed
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
  _createClass(ScrollSpy, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$8;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$6;
    }
  }]);

  return ScrollSpy;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
4799
4800
4801
4802
4803
4804
4805
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


XhmikosR's avatar
XhmikosR committed
4806
4807
4808
4809
EventHandler.on(window, Event$9.LOAD_DATA_API, function () {
  makeArray(SelectorEngine.find(Selector$8.DATA_SPY)).forEach(function (spy) {
    return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
  });
XhmikosR's avatar
Dist.  
XhmikosR committed
4810
4811
4812
4813
4814
4815
4816
4817
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
4818
  var JQUERY_NO_CONFLICT$8 = jQuery.fn[NAME$8];
XhmikosR's avatar
Dist.  
XhmikosR committed
4819
4820
4821
  jQuery.fn[NAME$8] = ScrollSpy._jQueryInterface;
  jQuery.fn[NAME$8].Constructor = ScrollSpy;

XhmikosR's avatar
XhmikosR committed
4822
4823
  jQuery.fn[NAME$8].noConflict = function () {
    jQuery.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
XhmikosR's avatar
Dist.  
XhmikosR committed
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
    return ScrollSpy._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
var NAME$9 = 'tab';
var VERSION$9 = '4.3.1';
var DATA_KEY$9 = 'bs.tab';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$7 = '.data-api';
var Event$a = {
  HIDE: "hide" + EVENT_KEY$9,
  HIDDEN: "hidden" + EVENT_KEY$9,
  SHOW: "show" + EVENT_KEY$9,
  SHOWN: "shown" + EVENT_KEY$9,
  CLICK_DATA_API: "click" + EVENT_KEY$9 + DATA_API_KEY$7
XhmikosR's avatar
Dist.  
XhmikosR committed
4845
};
XhmikosR's avatar
XhmikosR committed
4846
var ClassName$9 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4847
4848
4849
4850
4851
4852
  DROPDOWN_MENU: 'dropdown-menu',
  ACTIVE: 'active',
  DISABLED: 'disabled',
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
4853
var Selector$9 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
  DROPDOWN: '.dropdown',
  NAV_LIST_GROUP: '.nav, .list-group',
  ACTIVE: '.active',
  ACTIVE_UL: ':scope > li > .active',
  DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
  DROPDOWN_TOGGLE: '.dropdown-toggle',
  DROPDOWN_ACTIVE_CHILD: ':scope > .dropdown-menu .active'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
4869
4870
4871
4872
var Tab =
/*#__PURE__*/
function () {
  function Tab(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4873
4874
4875
4876
4877
    this._element = element;
    Data.setData(this._element, DATA_KEY$9, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
4878
  var _proto = Tab.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
4879

XhmikosR's avatar
XhmikosR committed
4880
4881
4882
  // Public
  _proto.show = function show() {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4883
4884
4885
4886
4887

    if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(ClassName$9.ACTIVE) || this._element.classList.contains(ClassName$9.DISABLED)) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
4888
4889
4890
4891
    var target;
    var previous;
    var listElement = SelectorEngine.closest(this._element, Selector$9.NAV_LIST_GROUP);
    var selector = getSelectorFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
4892
4893

    if (listElement) {
XhmikosR's avatar
XhmikosR committed
4894
      var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
XhmikosR's avatar
Dist.  
XhmikosR committed
4895
4896
4897
4898
      previous = makeArray(SelectorEngine.find(itemSelector, listElement));
      previous = previous[previous.length - 1];
    }

XhmikosR's avatar
XhmikosR committed
4899
    var hideEvent = null;
XhmikosR's avatar
Dist.  
XhmikosR committed
4900
4901
4902
4903
4904
4905
4906

    if (previous) {
      hideEvent = EventHandler.trigger(previous, Event$a.HIDE, {
        relatedTarget: this._element
      });
    }

XhmikosR's avatar
XhmikosR committed
4907
    var showEvent = EventHandler.trigger(this._element, Event$a.SHOW, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
      relatedTarget: previous
    });

    if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
      return;
    }

    if (selector) {
      target = SelectorEngine.findOne(selector);
    }

    this._activate(this._element, listElement);

XhmikosR's avatar
XhmikosR committed
4921
    var complete = function complete() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4922
      EventHandler.trigger(previous, Event$a.HIDDEN, {
XhmikosR's avatar
XhmikosR committed
4923
        relatedTarget: _this._element
XhmikosR's avatar
Dist.  
XhmikosR committed
4924
      });
XhmikosR's avatar
XhmikosR committed
4925
      EventHandler.trigger(_this._element, Event$a.SHOWN, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4926
4927
4928
4929
4930
4931
4932
4933
4934
        relatedTarget: previous
      });
    };

    if (target) {
      this._activate(target, target.parentNode, complete);
    } else {
      complete();
    }
XhmikosR's avatar
XhmikosR committed
4935
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4936

XhmikosR's avatar
XhmikosR committed
4937
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4938
4939
4940
    Data.removeData(this._element, DATA_KEY$9);
    this._element = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
4941
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4942

XhmikosR's avatar
XhmikosR committed
4943
4944
  _proto._activate = function _activate(element, container, callback) {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4945

XhmikosR's avatar
XhmikosR committed
4946
4947
4948
    var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(Selector$9.ACTIVE_UL, container) : SelectorEngine.children(container, Selector$9.ACTIVE);
    var active = activeElements[0];
    var isTransitioning = callback && active && active.classList.contains(ClassName$9.FADE);
XhmikosR's avatar
Dist.  
XhmikosR committed
4949

XhmikosR's avatar
XhmikosR committed
4950
4951
4952
    var complete = function complete() {
      return _this2._transitionComplete(element, active, callback);
    };
XhmikosR's avatar
Dist.  
XhmikosR committed
4953
4954

    if (active && isTransitioning) {
XhmikosR's avatar
XhmikosR committed
4955
      var transitionDuration = getTransitionDurationFromElement(active);
XhmikosR's avatar
Dist.  
XhmikosR committed
4956
4957
4958
4959
4960
4961
      active.classList.remove(ClassName$9.SHOW);
      EventHandler.one(active, TRANSITION_END, complete);
      emulateTransitionEnd(active, transitionDuration);
    } else {
      complete();
    }
XhmikosR's avatar
XhmikosR committed
4962
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4963

XhmikosR's avatar
XhmikosR committed
4964
  _proto._transitionComplete = function _transitionComplete(element, active, callback) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4965
4966
    if (active) {
      active.classList.remove(ClassName$9.ACTIVE);
XhmikosR's avatar
XhmikosR committed
4967
      var dropdownChild = SelectorEngine.findOne(Selector$9.DROPDOWN_ACTIVE_CHILD, active.parentNode);
XhmikosR's avatar
Dist.  
XhmikosR committed
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990

      if (dropdownChild) {
        dropdownChild.classList.remove(ClassName$9.ACTIVE);
      }

      if (active.getAttribute('role') === 'tab') {
        active.setAttribute('aria-selected', false);
      }
    }

    element.classList.add(ClassName$9.ACTIVE);

    if (element.getAttribute('role') === 'tab') {
      element.setAttribute('aria-selected', true);
    }

    reflow(element);

    if (element.classList.contains(ClassName$9.FADE)) {
      element.classList.add(ClassName$9.SHOW);
    }

    if (element.parentNode && element.parentNode.classList.contains(ClassName$9.DROPDOWN_MENU)) {
XhmikosR's avatar
XhmikosR committed
4991
      var dropdownElement = SelectorEngine.closest(element, Selector$9.DROPDOWN);
XhmikosR's avatar
Dist.  
XhmikosR committed
4992
4993

      if (dropdownElement) {
XhmikosR's avatar
XhmikosR committed
4994
4995
4996
        makeArray(SelectorEngine.find(Selector$9.DROPDOWN_TOGGLE)).forEach(function (dropdown) {
          return dropdown.classList.add(ClassName$9.ACTIVE);
        });
XhmikosR's avatar
Dist.  
XhmikosR committed
4997
4998
4999
5000
5001
5002
5003
5004
5005
      }

      element.setAttribute('aria-expanded', true);
    }

    if (callback) {
      callback();
    }
  } // Static
XhmikosR's avatar
XhmikosR committed
5006
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5007

XhmikosR's avatar
XhmikosR committed
5008
  Tab._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5009
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
5010
      var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
5011
5012
5013

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
5014
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
5015
5016
5017
5018
5019
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
5020
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5021

XhmikosR's avatar
XhmikosR committed
5022
  Tab._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5023
    return Data.getData(element, DATA_KEY$9);
XhmikosR's avatar
XhmikosR committed
5024
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5025

XhmikosR's avatar
XhmikosR committed
5026
5027
5028
5029
5030
5031
5032
5033
5034
  _createClass(Tab, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$9;
    }
  }]);

  return Tab;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
5035
5036
5037
5038
5039
5040
5041
5042
5043
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


EventHandler.on(document, Event$a.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
  event.preventDefault();
XhmikosR's avatar
XhmikosR committed
5044
  var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
  data.show();
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .tab to jQuery only if jQuery is present
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
5055
  var JQUERY_NO_CONFLICT$9 = jQuery.fn[NAME$9];
XhmikosR's avatar
Dist.  
XhmikosR committed
5056
5057
5058
  jQuery.fn[NAME$9] = Tab._jQueryInterface;
  jQuery.fn[NAME$9].Constructor = Tab;

XhmikosR's avatar
XhmikosR committed
5059
5060
  jQuery.fn[NAME$9].noConflict = function () {
    jQuery.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
XhmikosR's avatar
Dist.  
XhmikosR committed
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
    return Tab._jQueryInterface;
  };
}

/**
 * ------------------------------------------------------------------------
 * Constants
 * ------------------------------------------------------------------------
 */

XhmikosR's avatar
XhmikosR committed
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
var NAME$a = 'toast';
var VERSION$a = '4.3.1';
var DATA_KEY$a = 'bs.toast';
var EVENT_KEY$a = "." + DATA_KEY$a;
var Event$b = {
  CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a,
  HIDE: "hide" + EVENT_KEY$a,
  HIDDEN: "hidden" + EVENT_KEY$a,
  SHOW: "show" + EVENT_KEY$a,
  SHOWN: "shown" + EVENT_KEY$a
XhmikosR's avatar
Dist.  
XhmikosR committed
5081
};
XhmikosR's avatar
XhmikosR committed
5082
var ClassName$a = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5083
5084
5085
5086
5087
  FADE: 'fade',
  HIDE: 'hide',
  SHOW: 'show',
  SHOWING: 'showing'
};
XhmikosR's avatar
XhmikosR committed
5088
var DefaultType$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5089
5090
5091
5092
  animation: 'boolean',
  autohide: 'boolean',
  delay: 'number'
};
XhmikosR's avatar
XhmikosR committed
5093
var Default$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5094
5095
5096
5097
  animation: true,
  autohide: true,
  delay: 500
};
XhmikosR's avatar
XhmikosR committed
5098
var Selector$a = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5099
5100
5101
5102
5103
5104
5105
5106
5107
  DATA_DISMISS: '[data-dismiss="toast"]'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
5108
5109
5110
5111
var Toast =
/*#__PURE__*/
function () {
  function Toast(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
    this._element = element;
    this._config = this._getConfig(config);
    this._timeout = null;

    this._setListeners();

    Data.setData(element, DATA_KEY$a, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
5122
  var _proto = Toast.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
5123

XhmikosR's avatar
XhmikosR committed
5124
5125
5126
  // Public
  _proto.show = function show() {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
5127
5128
5129
5130
5131
5132
5133

    EventHandler.trigger(this._element, Event$b.SHOW);

    if (this._config.animation) {
      this._element.classList.add(ClassName$a.FADE);
    }

XhmikosR's avatar
XhmikosR committed
5134
5135
    var complete = function complete() {
      _this._element.classList.remove(ClassName$a.SHOWING);
XhmikosR's avatar
Dist.  
XhmikosR committed
5136

XhmikosR's avatar
XhmikosR committed
5137
      _this._element.classList.add(ClassName$a.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
5138

XhmikosR's avatar
XhmikosR committed
5139
      EventHandler.trigger(_this._element, Event$b.SHOWN);
XhmikosR's avatar
Dist.  
XhmikosR committed
5140

XhmikosR's avatar
XhmikosR committed
5141
5142
5143
5144
      if (_this._config.autohide) {
        _this._timeout = setTimeout(function () {
          _this.hide();
        }, _this._config.delay);
XhmikosR's avatar
Dist.  
XhmikosR committed
5145
5146
5147
5148
5149
5150
5151
5152
      }
    };

    this._element.classList.remove(ClassName$a.HIDE);

    this._element.classList.add(ClassName$a.SHOWING);

    if (this._config.animation) {
XhmikosR's avatar
XhmikosR committed
5153
      var transitionDuration = getTransitionDurationFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
5154
5155
5156
5157
5158
      EventHandler.one(this._element, TRANSITION_END, complete);
      emulateTransitionEnd(this._element, transitionDuration);
    } else {
      complete();
    }
XhmikosR's avatar
XhmikosR committed
5159
5160
5161
5162
  };

  _proto.hide = function hide() {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
5163
5164
5165
5166
5167
5168
5169

    if (!this._element.classList.contains(ClassName$a.SHOW)) {
      return;
    }

    EventHandler.trigger(this._element, Event$b.HIDE);

XhmikosR's avatar
XhmikosR committed
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
    var complete = function complete() {
      _this2._element.classList.add(ClassName$a.HIDE);

      EventHandler.trigger(_this2._element, Event$b.HIDDEN);
    };

    this._element.classList.remove(ClassName$a.SHOW);

    if (this._config.animation) {
      var transitionDuration = getTransitionDurationFromElement(this._element);
      EventHandler.one(this._element, TRANSITION_END, complete);
      emulateTransitionEnd(this._element, transitionDuration);
XhmikosR's avatar
Dist.  
XhmikosR committed
5182
    } else {
XhmikosR's avatar
XhmikosR committed
5183
      complete();
XhmikosR's avatar
Dist.  
XhmikosR committed
5184
    }
XhmikosR's avatar
XhmikosR committed
5185
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5186

XhmikosR's avatar
XhmikosR committed
5187
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
    clearTimeout(this._timeout);
    this._timeout = null;

    if (this._element.classList.contains(ClassName$a.SHOW)) {
      this._element.classList.remove(ClassName$a.SHOW);
    }

    EventHandler.off(this._element, Event$b.CLICK_DISMISS);
    Data.removeData(this._element, DATA_KEY$a);
    this._element = null;
    this._config = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
5200
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5201

XhmikosR's avatar
XhmikosR committed
5202
5203
  _proto._getConfig = function _getConfig(config) {
    config = _objectSpread({}, Default$7, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
5204
5205
    typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
    return config;
XhmikosR's avatar
XhmikosR committed
5206
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5207

XhmikosR's avatar
XhmikosR committed
5208
5209
  _proto._setListeners = function _setListeners() {
    var _this3 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
5210

XhmikosR's avatar
XhmikosR committed
5211
5212
5213
    EventHandler.on(this._element, Event$b.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
      return _this3.hide();
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
5214
  } // Static
XhmikosR's avatar
XhmikosR committed
5215
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5216

XhmikosR's avatar
XhmikosR committed
5217
  Toast._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5218
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
5219
      var data = Data.getData(this, DATA_KEY$a);
XhmikosR's avatar
Dist.  
XhmikosR committed
5220

XhmikosR's avatar
XhmikosR committed
5221
      var _config = typeof config === 'object' && config;
XhmikosR's avatar
Dist.  
XhmikosR committed
5222
5223
5224
5225
5226
5227
5228

      if (!data) {
        data = new Toast(this, _config);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
5229
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
5230
5231
5232
5233
5234
        }

        data[config](this);
      }
    });
XhmikosR's avatar
XhmikosR committed
5235
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5236

XhmikosR's avatar
XhmikosR committed
5237
  Toast._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5238
    return Data.getData(element, DATA_KEY$a);
XhmikosR's avatar
XhmikosR committed
5239
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5240

XhmikosR's avatar
XhmikosR committed
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
  _createClass(Toast, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$a;
    }
  }, {
    key: "DefaultType",
    get: function get() {
      return DefaultType$7;
    }
  }, {
    key: "Default",
    get: function get() {
      return Default$7;
    }
  }]);

  return Toast;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
5260
5261
5262
5263
5264
5265
5266
5267
5268
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 *  add .toast to jQuery only if jQuery is present
 */


if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
5269
  var JQUERY_NO_CONFLICT$a = jQuery.fn[NAME$a];
XhmikosR's avatar
Dist.  
XhmikosR committed
5270
5271
5272
  jQuery.fn[NAME$a] = Toast._jQueryInterface;
  jQuery.fn[NAME$a].Constructor = Toast;

XhmikosR's avatar
XhmikosR committed
5273
5274
  jQuery.fn[NAME$a].noConflict = function () {
    jQuery.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
XhmikosR's avatar
Dist.  
XhmikosR committed
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
    return Toast._jQueryInterface;
  };
}

/**
 * --------------------------------------------------------------------------
 * Bootstrap (v4.3.1): index.esm.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */

export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Popover, ScrollSpy, Tab, Toast, Tooltip };
//# sourceMappingURL=bootstrap.esm.js.map