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;
  }

Mark Otto's avatar
dist v5    
Mark Otto committed
521
522
523
524
  var uidEventList = Object.keys(events);

  for (var i = 0, len = uidEventList.length; i < len; i++) {
    var event = events[uidEventList[i]];
XhmikosR's avatar
Dist.  
XhmikosR committed
525
526

    if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
Mark Otto's avatar
dist v5    
Mark Otto committed
527
      return event;
XhmikosR's avatar
Dist.  
XhmikosR committed
528
529
530
531
532
533
534
    }
  }

  return null;
}

function normalizeParams(originalTypeEvent, handler, delegationFn) {
XhmikosR's avatar
XhmikosR committed
535
536
  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
537

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

  if (custom) {
    typeEvent = custom;
  }

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

  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
564
565
566
567
  var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
      delegation = _normalizeParams[0],
      originalHandler = _normalizeParams[1],
      typeEvent = _normalizeParams[2];
XhmikosR's avatar
Dist.  
XhmikosR committed
568

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

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

XhmikosR's avatar
XhmikosR committed
578
579
  var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
  var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
XhmikosR's avatar
Dist.  
XhmikosR committed
580
581
582
583
584
585
586
587
588
  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
589
  var fn = findHandler(events[typeEvent], handler, delegationSelector);
XhmikosR's avatar
Dist.  
XhmikosR committed
590

Mark Otto's avatar
dist v5    
Mark Otto committed
591
  if (!fn) {
XhmikosR's avatar
Dist.  
XhmikosR committed
592
593
594
595
596
597
598
599
    return;
  }

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

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

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

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

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

    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
641
      Object.keys(events).forEach(function (elementEvent) {
XhmikosR's avatar
Dist.  
XhmikosR committed
642
643
644
645
        removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.substr(1));
      });
    }

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

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

XhmikosR's avatar
XhmikosR committed
661
662
663
664
665
666
667
668
    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
669
670
671
672
673
674
675
676
677
678
679
680
681

    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
682
683
      evt = createCustomEvent(event, {
        bubbles: bubbles,
XhmikosR's avatar
Dist.  
XhmikosR committed
684
685
686
687
688
689
        cancelable: true
      });
    } // merge custom informations in our event


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

    if (defaultPrevented) {
      evt.preventDefault();

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

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

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

    return evt;
  }
};

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

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

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

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

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

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

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

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

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

    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
792
  closest: function closest$1(element, selector) {
XhmikosR's avatar
Dist.  
XhmikosR committed
793
794
795
796
    if (typeof selector !== 'string') {
      return null;
    }

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

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

    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
825
826
827
828
829
830
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
831
832
  DISMISS: '[data-dismiss="alert"]'
};
XhmikosR's avatar
XhmikosR committed
833
834
835
836
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
837
};
XhmikosR's avatar
XhmikosR committed
838
var ClassName = {
XhmikosR's avatar
Dist.  
XhmikosR committed
839
840
841
842
843
844
845
846
847
848
849
  ALERT: 'alert',
  FADE: 'fade',
  SHOW: 'show'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

    element.classList.remove(ClassName.SHOW);

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

      return;
    }

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

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

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

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

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

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

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

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

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

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

  return Alert;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
/**
 * ------------------------------------------------------------------------
 * 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
986
  var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
XhmikosR's avatar
Dist.  
XhmikosR committed
987
988
989
  jQuery.fn[NAME] = Alert._jQueryInterface;
  jQuery.fn[NAME].Constructor = Alert;

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

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

XhmikosR's avatar
XhmikosR committed
1002
1003
1004
1005
1006
1007
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
1008
1009
1010
1011
  ACTIVE: 'active',
  BUTTON: 'btn',
  FOCUS: 'focus'
};
XhmikosR's avatar
XhmikosR committed
1012
var Selector$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1013
1014
1015
1016
1017
1018
  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
1019
1020
1021
1022
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
1023
1024
1025
1026
1027
1028
1029
1030
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

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


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

XhmikosR's avatar
XhmikosR committed
1042
1043
1044
1045
1046
  // 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
1047
1048

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

      if (input) {
        if (input.type === 'radio') {
          if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
            triggerChangeEvent = false;
          } else {
XhmikosR's avatar
XhmikosR committed
1056
            var activeElement = SelectorEngine.findOne(Selector$1.ACTIVE, rootElement);
XhmikosR's avatar
Dist.  
XhmikosR committed
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
1084

            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
1085
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1086

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

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

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

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

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

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

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


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

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

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

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

  data.toggle();
});
XhmikosR's avatar
XhmikosR committed
1144
1145
1146
1147
1148
1149
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
1150
});
XhmikosR's avatar
XhmikosR committed
1151
1152
1153
1154
1155
1156
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
1157
1158
1159
1160
1161
1162
1163
1164
1165
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .button to jQuery only if jQuery is present
 */

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

XhmikosR's avatar
XhmikosR committed
1170
1171
  jQuery.fn[NAME$1].noConflict = function () {
    jQuery.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
XhmikosR's avatar
Dist.  
XhmikosR committed
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
1202
    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
1203
1204
1205
  return key.replace(/[A-Z]/g, function (chr) {
    return chr.toLowerCase();
  });
XhmikosR's avatar
Dist.  
XhmikosR committed
1206
1207
}

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
1262
1263
1264
1265
1266
1267
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
1268

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

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

XhmikosR's avatar
XhmikosR committed
1273
1274
var SWIPE_THRESHOLD = 40;
var Default = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1275
1276
1277
1278
1279
1280
1281
  interval: 5000,
  keyboard: true,
  slide: false,
  pause: 'hover',
  wrap: true,
  touch: true
};
XhmikosR's avatar
XhmikosR committed
1282
var DefaultType = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1283
1284
1285
1286
1287
1288
1289
  interval: '(number|boolean)',
  keyboard: 'boolean',
  slide: '(boolean|string)',
  pause: '(string|boolean)',
  wrap: 'boolean',
  touch: 'boolean'
};
XhmikosR's avatar
XhmikosR committed
1290
var Direction = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1291
1292
1293
1294
1295
  NEXT: 'next',
  PREV: 'prev',
  LEFT: 'left',
  RIGHT: 'right'
};
XhmikosR's avatar
XhmikosR committed
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
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
1310
};
XhmikosR's avatar
XhmikosR committed
1311
var ClassName$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
  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
1322
var Selector$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1323
1324
1325
1326
1327
1328
1329
1330
1331
  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
1332
var PointerType = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
  TOUCH: 'touch',
  PEN: 'pen'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
1343
1344
1345
1346
var Carousel =
/*#__PURE__*/
function () {
  function Carousel(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
    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
1367
  var _proto = Carousel.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
1368

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

XhmikosR's avatar
XhmikosR committed
1376
  _proto.nextWhenVisible = function nextWhenVisible() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1377
1378
1379
1380
1381
    // 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
1382
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1383

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

XhmikosR's avatar
XhmikosR committed
1390
  _proto.pause = function pause(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
    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
1402
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1403

XhmikosR's avatar
XhmikosR committed
1404
  _proto.cycle = function cycle(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
    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
1417
1418
1419
1420
  };

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

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

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

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
1448
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
    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
1460
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
1461

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

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

    if (absDeltax <= SWIPE_THRESHOLD) {
      return;
    }

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

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


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

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

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

    if (this._config.pause === 'hover') {
XhmikosR's avatar
XhmikosR committed
1498
1499
1500
1501
1502
1503
      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
1504
1505
1506
1507
1508
    }

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

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

    if (!this._touchSupported) {
      return;
    }

XhmikosR's avatar
XhmikosR committed
1518
1519
1520
1521
1522
    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
1523
1524
1525
      }
    };

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

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

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

XhmikosR's avatar
XhmikosR committed
1542
      if (_this3._config.pause === 'hover') {
XhmikosR's avatar
Dist.  
XhmikosR committed
1543
1544
1545
1546
1547
1548
1549
        // 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
1550
        _this3.pause();
XhmikosR's avatar
Dist.  
XhmikosR committed
1551

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

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

XhmikosR's avatar
XhmikosR committed
1562
1563
1564
1565
    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
1566
1567
1568
    });

    if (this._pointerEvent) {
XhmikosR's avatar
XhmikosR committed
1569
1570
1571
1572
1573
1574
      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
1575
1576
1577

      this._element.classList.add(ClassName$2.POINTER_EVENT);
    } else {
XhmikosR's avatar
XhmikosR committed
1578
1579
1580
1581
1582
1583
1584
1585
1586
      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
1587
    }
XhmikosR's avatar
XhmikosR committed
1588
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1589

XhmikosR's avatar
XhmikosR committed
1590
  _proto._keydown = function _keydown(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
    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
1608
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1609

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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
1717
      var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
XhmikosR's avatar
Dist.  
XhmikosR committed
1718
1719
1720
1721
1722
1723
1724
1725

      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
1726
1727
      var transitionDuration = getTransitionDurationFromElement(activeElement);
      EventHandler.one(activeElement, TRANSITION_END, function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
1728
1729
1730
1731
1732
1733
        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
1734
1735
1736
        _this4._isSliding = false;
        setTimeout(function () {
          EventHandler.trigger(_this4._element, Event$3.SLID, {
XhmikosR's avatar
Dist.  
XhmikosR committed
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
            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
1761
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
1762

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

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

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

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

    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
1782
        throw new TypeError("No method named \"" + action + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
1783
1784
1785
1786
1787
1788
1789
      }

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

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

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

    if (!selector) {
      return;
    }

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

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

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

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

    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
1826
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
1827

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

XhmikosR's avatar
XhmikosR committed
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
  _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
1846
1847
1848
1849
1850
1851
1852
1853
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


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

XhmikosR's avatar
XhmikosR committed
1857
  for (var i = 0, len = carousels.length; i < len; i++) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
    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
1869
  var JQUERY_NO_CONFLICT$2 = jQuery.fn[NAME$2];
XhmikosR's avatar
Dist.  
XhmikosR committed
1870
1871
1872
  jQuery.fn[NAME$2] = Carousel._jQueryInterface;
  jQuery.fn[NAME$2].Constructor = Carousel;

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

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

XhmikosR's avatar
XhmikosR committed
1885
1886
1887
1888
1889
1890
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
1891
1892
1893
  toggle: true,
  parent: ''
};
XhmikosR's avatar
XhmikosR committed
1894
var DefaultType$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1895
1896
1897
  toggle: 'boolean',
  parent: '(string|element)'
};
XhmikosR's avatar
XhmikosR committed
1898
1899
1900
1901
1902
1903
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
1904
};
XhmikosR's avatar
XhmikosR committed
1905
var ClassName$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1906
1907
1908
1909
1910
  SHOW: 'show',
  COLLAPSE: 'collapse',
  COLLAPSING: 'collapsing',
  COLLAPSED: 'collapsed'
};
XhmikosR's avatar
XhmikosR committed
1911
var Dimension = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1912
1913
1914
  WIDTH: 'width',
  HEIGHT: 'height'
};
XhmikosR's avatar
XhmikosR committed
1915
var Selector$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
  ACTIVES: '.show, .collapsing',
  DATA_TOGGLE: '[data-toggle="collapse"]'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
1926
1927
1928
1929
var Collapse =
/*#__PURE__*/
function () {
  function Collapse(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
1930
1931
1932
    this._isTransitioning = false;
    this._element = element;
    this._config = this._getConfig(config);
XhmikosR's avatar
XhmikosR committed
1933
1934
1935
1936
1937
1938
1939
1940
1941
    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
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963

      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
1964
  var _proto = Collapse.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
1965

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

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

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

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

    if (this._parent) {
XhmikosR's avatar
XhmikosR committed
1986
1987
1988
      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
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
        }

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

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

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

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

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

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

    if (startEvent.defaultPrevented) {
      return;
    }

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

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

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

    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
2039
      this._triggerArray.forEach(function (element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2040
2041
2042
2043
2044
2045
2046
        element.classList.remove(ClassName$3.COLLAPSED);
        element.setAttribute('aria-expanded', true);
      });
    }

    this.setTransitioning(true);

XhmikosR's avatar
XhmikosR committed
2047
2048
2049
2050
2051
2052
    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
2053

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

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

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

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

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

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

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

    if (startEvent.defaultPrevented) {
      return;
    }

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

XhmikosR's avatar
XhmikosR committed
2084
    this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
2085
2086
2087
2088
2089
2090
2091
2092
    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
2093
    var triggerArrayLength = this._triggerArray.length;
XhmikosR's avatar
Dist.  
XhmikosR committed
2094
2095

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

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

          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
2113
2114
    var complete = function complete() {
      _this2.setTransitioning(false);
XhmikosR's avatar
Dist.  
XhmikosR committed
2115

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
2133
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2134
2135
2136
2137
2138
2139
2140
    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
2141
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
2142

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

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

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

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

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

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

    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
2171
2172
2173
    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
2174
2175
    });
    return parent;
XhmikosR's avatar
XhmikosR committed
2176
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2177

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

      if (triggerArray.length) {
XhmikosR's avatar
XhmikosR committed
2183
        triggerArray.forEach(function (elem) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
          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
2195
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
2196

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

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

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

    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
2217
        throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
2218
2219
2220
2221
      }

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

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

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

XhmikosR's avatar
XhmikosR committed
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
  _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
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
/**
 * ------------------------------------------------------------------------
 * 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
2261
2262
2263
2264
2265
2266
  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
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290

    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
2291
  var JQUERY_NO_CONFLICT$3 = jQuery.fn[NAME$3];
XhmikosR's avatar
Dist.  
XhmikosR committed
2292
2293
2294
  jQuery.fn[NAME$3] = Collapse._jQueryInterface;
  jQuery.fn[NAME$3].Constructor = Collapse;

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

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

XhmikosR's avatar
XhmikosR committed
2307
2308
2309
2310
2311
2312
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
2313

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
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
2334
};
XhmikosR's avatar
XhmikosR committed
2335
var ClassName$4 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2336
2337
2338
2339
2340
2341
2342
2343
  DISABLED: 'disabled',
  SHOW: 'show',
  DROPUP: 'dropup',
  DROPRIGHT: 'dropright',
  DROPLEFT: 'dropleft',
  MENURIGHT: 'dropdown-menu-right',
  POSITION_STATIC: 'position-static'
};
XhmikosR's avatar
XhmikosR committed
2344
var Selector$4 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2345
2346
2347
2348
2349
2350
  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
2351
var AttachmentMap = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2352
2353
2354
2355
2356
2357
2358
2359
2360
  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
2361
var Default$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2362
2363
2364
2365
2366
2367
  offset: 0,
  flip: true,
  boundary: 'scrollParent',
  reference: 'toggle',
  display: 'dynamic'
};
XhmikosR's avatar
XhmikosR committed
2368
var DefaultType$2 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
  offset: '(number|string|function)',
  flip: 'boolean',
  boundary: '(string|element)',
  reference: '(string|element)',
  display: 'string'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
2382
2383
2384
2385
var Dropdown =
/*#__PURE__*/
function () {
  function Dropdown(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
    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
2398
  var _proto = Dropdown.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
2399

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

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

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

    Dropdown._clearMenus();

    if (isActive) {
      return;
    }

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

    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
2435
      var referenceElement = this._element;
XhmikosR's avatar
Dist.  
XhmikosR committed
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
2461

      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
2462
2463
2464
      makeArray(document.body.children).forEach(function (elem) {
        return EventHandler.on(elem, 'mouseover', null, noop());
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
2465
2466
2467
2468
2469
2470
2471
2472
2473
    }

    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
2474
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2475

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

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

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

    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
2495
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2496

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

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

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

    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
2516
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2517

XhmikosR's avatar
XhmikosR committed
2518
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
    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
2529
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2530

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

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

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

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

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

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

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

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

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

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

    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
2588
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2589

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
2611
2612
  _proto._getPopperConfig = function _getPopperConfig() {
    var popperConfig = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
      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
2634
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
2635

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

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

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

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

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

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

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

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

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

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

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

      if (!context) {
        continue;
      }

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

      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
2693
      var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
XhmikosR's avatar
Dist.  
XhmikosR committed
2694
2695
2696
2697
2698
2699
2700
2701

      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
2702
2703
2704
        makeArray(document.body.children).forEach(function (elem) {
          return EventHandler.off(elem, 'mouseover', null, noop());
        });
XhmikosR's avatar
Dist.  
XhmikosR committed
2705
2706
2707
2708
2709
2710
2711
      }

      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
2712
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2713

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

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

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

XhmikosR's avatar
XhmikosR committed
2725
  Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
    // 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
2744
    var parent = Dropdown._getParentFromElement(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
2745

XhmikosR's avatar
XhmikosR committed
2746
    var isActive = parent.classList.contains(ClassName$4.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
2747
2748
2749

    if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
      if (event.which === ESCAPE_KEYCODE) {
Mark Otto's avatar
dist v5    
Mark Otto committed
2750
        SelectorEngine.findOne(Selector$4.DATA_TOGGLE, parent).focus();
XhmikosR's avatar
Dist.  
XhmikosR committed
2751
2752
2753
2754
2755
2756
2757
      }

      Dropdown._clearMenus();

      return;
    }

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

    if (!items.length) {
      return;
    }

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

    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
2781
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
2782

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

XhmikosR's avatar
XhmikosR committed
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
  _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
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
/**
 * ------------------------------------------------------------------------
 * 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
2823
2824
2825
EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
  return e.stopPropagation();
});
XhmikosR's avatar
Dist.  
XhmikosR committed
2826
2827
2828
2829
2830
2831
2832
2833
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .dropdown to jQuery only if jQuery is present
 */

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

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

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

XhmikosR's avatar
XhmikosR committed
2850
2851
2852
2853
2854
2855
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
2856

XhmikosR's avatar
XhmikosR committed
2857
var Default$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2858
2859
2860
2861
2862
  backdrop: true,
  keyboard: true,
  focus: true,
  show: true
};
XhmikosR's avatar
XhmikosR committed
2863
var DefaultType$3 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2864
2865
2866
2867
2868
  backdrop: '(boolean|string)',
  keyboard: 'boolean',
  focus: 'boolean',
  show: 'boolean'
};
XhmikosR's avatar
XhmikosR committed
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
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
2881
};
XhmikosR's avatar
XhmikosR committed
2882
var ClassName$5 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2883
2884
2885
2886
2887
2888
2889
  SCROLLABLE: 'modal-dialog-scrollable',
  SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
  BACKDROP: 'modal-backdrop',
  OPEN: 'modal-open',
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
2890
var Selector$5 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
  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
2905
2906
2907
2908
var Modal =
/*#__PURE__*/
function () {
  function Modal(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
    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
2922
  var _proto = Modal.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
2923

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

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

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

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

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

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

    this._isShown = true;

    this._checkScrollbar();

    this._setScrollbar();

    this._adjustDialog();

    this._setEscapeEvent();

    this._setResizeEvent();

XhmikosR's avatar
XhmikosR committed
2960
2961
2962
2963
2964
2965
2966
    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
2967
2968
2969
2970
        }
      });
    });

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

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

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

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

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

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

    this._isShown = false;

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

    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
3013
3014
3015
3016
      var transitionDuration = getTransitionDurationFromElement(this._element);
      EventHandler.one(this._element, TRANSITION_END, function (event) {
        return _this2._hideModal(event);
      });
XhmikosR's avatar
Dist.  
XhmikosR committed
3017
3018
3019
3020
      emulateTransitionEnd(this._element, transitionDuration);
    } else {
      this._hideModal();
    }
XhmikosR's avatar
XhmikosR committed
3021
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3022

XhmikosR's avatar
XhmikosR committed
3023
3024
3025
3026
  _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
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
    /**
     * `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
3044
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3045

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

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

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

XhmikosR's avatar
XhmikosR committed
3060
    var transition = this._element.classList.contains(ClassName$5.FADE);
XhmikosR's avatar
Dist.  
XhmikosR committed
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
3088

    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
3089
3090
3091
    var transitionComplete = function transitionComplete() {
      if (_this3._config.focus) {
        _this3._element.focus();
XhmikosR's avatar
Dist.  
XhmikosR committed
3092
3093
      }

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

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

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

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

XhmikosR's avatar
XhmikosR committed
3114
3115
3116
    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
3117
3118
      }
    });
XhmikosR's avatar
XhmikosR committed
3119
3120
3121
3122
  };

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

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

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

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

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

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

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

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

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

    this._isTransitioning = false;

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

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
3179
3180
3181
3182
  _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
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192

    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
3193
3194
3195
      EventHandler.on(this._element, Event$6.CLICK_DISMISS, function (event) {
        if (_this8._ignoreBackdropClick) {
          _this8._ignoreBackdropClick = false;
XhmikosR's avatar
Dist.  
XhmikosR committed
3196
3197
3198
3199
3200
3201
3202
          return;
        }

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

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

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

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

      if (!callback) {
        return;
      }

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

XhmikosR's avatar
XhmikosR committed
3225
      var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
XhmikosR's avatar
Dist.  
XhmikosR committed
3226
3227
3228
3229
3230
      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
3231
3232
      var callbackRemove = function callbackRemove() {
        _this8._removeBackdrop();
XhmikosR's avatar
Dist.  
XhmikosR committed
3233
3234
3235
3236
3237
3238
3239

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

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

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

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

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

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

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

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

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

    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
3285
3286
3287
      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
3288
        Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
XhmikosR's avatar
XhmikosR committed
3289
        element.style.paddingRight = parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
3290
3291
      }); // Adjust sticky content margin

XhmikosR's avatar
XhmikosR committed
3292
3293
3294
      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
3295
        Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
XhmikosR's avatar
XhmikosR committed
3296
        element.style.marginRight = parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px";
XhmikosR's avatar
Dist.  
XhmikosR committed
3297
3298
      }); // Adjust body padding

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

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

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

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

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

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

    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
3336
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
3337

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

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

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
  _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
3389
3390
3391
3392
3393
3394
3395
3396
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


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

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

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

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

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

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

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

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

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

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

XhmikosR's avatar
XhmikosR committed
3443
3444
  jQuery.fn[NAME$5].noConflict = function () {
    jQuery.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
XhmikosR's avatar
Dist.  
XhmikosR committed
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
    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
3455
3456
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
XhmikosR's avatar
Dist.  
XhmikosR committed
3457
3458
3459
3460
3461
3462
/**
 * 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
3463
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
XhmikosR's avatar
Dist.  
XhmikosR committed
3464
3465
3466
3467
3468
3469
/**
 * 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
3470
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
3471

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

  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
3483
3484
3485
  var regExp = allowedAttributeList.filter(function (attrRegex) {
    return attrRegex instanceof RegExp;
  }); // Check if a regular expression validates the attribute.
XhmikosR's avatar
Dist.  
XhmikosR committed
3486

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

  return false;
};

XhmikosR's avatar
XhmikosR committed
3496
var DefaultWhitelist = {
XhmikosR's avatar
Dist.  
XhmikosR committed
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
3537
  // 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
3538
3539
3540
3541
  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
3542

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

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

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

  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
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
  }

  return createdDocument.body.innerHTML;
}

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

XhmikosR's avatar
XhmikosR committed
3576
3577
3578
3579
3580
3581
3582
3583
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
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
  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
3600
var AttachmentMap$1 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3601
3602
3603
3604
3605
3606
  AUTO: 'auto',
  TOP: 'top',
  RIGHT: 'right',
  BOTTOM: 'bottom',
  LEFT: 'left'
};
XhmikosR's avatar
XhmikosR committed
3607
var Default$4 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
  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
3624
var HoverState = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3625
3626
3627
  SHOW: 'show',
  OUT: 'out'
};
XhmikosR's avatar
XhmikosR committed
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
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
3639
};
XhmikosR's avatar
XhmikosR committed
3640
var ClassName$6 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
3641
3642
3643
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
3644
var Selector$6 = {
Mark Otto's avatar
dist v5    
Mark Otto committed
3645
  TOOLTIP_INNER: '.tooltip-inner'
XhmikosR's avatar
Dist.  
XhmikosR committed
3646
};
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
    clearTimeout(this._timeout);
    Data.removeData(this.element, this.constructor.DATA_KEY);
    EventHandler.off(this.element, this.constructor.EVENT_KEY);
Mark Otto's avatar
dist v5    
Mark Otto committed
3740
    EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler);
XhmikosR's avatar
Dist.  
XhmikosR committed
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758

    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

      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: {
Mark Otto's avatar
dist v5    
Mark Otto committed
3810
            element: "." + this.constructor.NAME + "-arrow"
XhmikosR's avatar
Dist.  
XhmikosR committed
3811
3812
3813
3814
3815
          },
          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
      }
    });
Mark Otto's avatar
dist v5    
Mark Otto committed
4046
4047

    this._hideModalHandler = function () {
XhmikosR's avatar
XhmikosR committed
4048
4049
      if (_this4.element) {
        _this4.hide();
XhmikosR's avatar
Dist.  
XhmikosR committed
4050
      }
Mark Otto's avatar
dist v5    
Mark Otto committed
4051
4052
4053
    };

    EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler);
XhmikosR's avatar
Dist.  
XhmikosR committed
4054
4055

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

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

    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
4072
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4073

XhmikosR's avatar
XhmikosR committed
4074
4075
  _proto._enter = function _enter(event, context) {
    var dataKey = this.constructor.DATA_KEY;
XhmikosR's avatar
Dist.  
XhmikosR committed
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
    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
4100
    context._timeout = setTimeout(function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
4101
4102
4103
4104
      if (context._hoverState === HoverState.SHOW) {
        context.show();
      }
    }, context.config.delay.show);
XhmikosR's avatar
XhmikosR committed
4105
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4106

XhmikosR's avatar
XhmikosR committed
4107
4108
  _proto._leave = function _leave(event, context) {
    var dataKey = this.constructor.DATA_KEY;
XhmikosR's avatar
Dist.  
XhmikosR committed
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
    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
4132
    context._timeout = setTimeout(function () {
XhmikosR's avatar
Dist.  
XhmikosR committed
4133
4134
4135
4136
      if (context._hoverState === HoverState.OUT) {
        context.hide();
      }
    }, context.config.delay.hide);
XhmikosR's avatar
XhmikosR committed
4137
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4138

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

    return false;
XhmikosR's avatar
XhmikosR committed
4147
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4148

XhmikosR's avatar
XhmikosR committed
4149
4150
4151
  _proto._getConfig = function _getConfig(config) {
    var dataAttributes = Manipulator.getDataAttributes(this.element);
    Object.keys(dataAttributes).forEach(function (dataAttr) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4152
4153
4154
4155
4156
4157
4158
4159
4160
      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
4161
    config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184

    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
4185
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4186

XhmikosR's avatar
XhmikosR committed
4187
4188
  _proto._getDelegateConfig = function _getDelegateConfig() {
    var config = {};
XhmikosR's avatar
Dist.  
XhmikosR committed
4189
4190

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

    return config;
XhmikosR's avatar
XhmikosR committed
4199
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4200

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

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

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

    this._cleanTipClass();

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

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

    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
4237
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4238

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

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

      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
4255
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
4256
4257
4258
4259
4260
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
4261
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4262

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

XhmikosR's avatar
XhmikosR committed
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
4303
4304
4305
  _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
4306
4307
4308
4309
4310
4311
4312
4313
4314
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .tooltip to jQuery only if jQuery is present
 */


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

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

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

XhmikosR's avatar
XhmikosR committed
4331
4332
4333
4334
4335
4336
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
4337

XhmikosR's avatar
XhmikosR committed
4338
var Default$5 = _objectSpread({}, Tooltip.Default, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4339
4340
4341
4342
4343
4344
  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
4345
var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4346
4347
4348
  content: '(string|element|function)'
});

XhmikosR's avatar
XhmikosR committed
4349
var ClassName$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4350
4351
4352
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
4353
var Selector$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4354
4355
4356
  TITLE: '.popover-header',
  CONTENT: '.popover-body'
};
XhmikosR's avatar
XhmikosR committed
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
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
4368
4369
4370
4371
4372
4373
4374
4375
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

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

XhmikosR's avatar
XhmikosR committed
4381
4382
  function Popover() {
    return _Tooltip.apply(this, arguments) || this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4383
4384
  }

XhmikosR's avatar
XhmikosR committed
4385
  var _proto = Popover.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
4386

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

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

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

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

XhmikosR's avatar
XhmikosR committed
4401
    var content = this._getContent();
XhmikosR's avatar
Dist.  
XhmikosR committed
4402
4403
4404
4405
4406
4407
4408
4409
4410

    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
4411
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4412

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

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

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

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

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

      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
4448
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
4449
4450
4451
4452
4453
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
4454
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4455

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

XhmikosR's avatar
XhmikosR committed
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
4497
4498
4499
  _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
4500
4501
4502
4503
4504
4505
4506
4507
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 */


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

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

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

XhmikosR's avatar
XhmikosR committed
4524
4525
4526
4527
4528
4529
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
4530
4531
4532
4533
  offset: 10,
  method: 'auto',
  target: ''
};
XhmikosR's avatar
XhmikosR committed
4534
var DefaultType$6 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4535
4536
4537
4538
  offset: 'number',
  method: 'string',
  target: '(string|element)'
};
XhmikosR's avatar
XhmikosR committed
4539
4540
4541
4542
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
4543
};
XhmikosR's avatar
XhmikosR committed
4544
var ClassName$8 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4545
4546
4547
  DROPDOWN_ITEM: 'dropdown-item',
  ACTIVE: 'active'
};
XhmikosR's avatar
XhmikosR committed
4548
var Selector$8 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4549
4550
4551
4552
4553
4554
4555
4556
  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
4557
var OffsetMethod = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
  OFFSET: 'offset',
  POSITION: 'position'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

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

XhmikosR's avatar
Dist.  
XhmikosR committed
4574
4575
4576
    this._element = element;
    this._scrollElement = element.tagName === 'BODY' ? window : element;
    this._config = this._getConfig(config);
XhmikosR's avatar
XhmikosR committed
4577
    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
4578
4579
4580
4581
    this._offsets = [];
    this._targets = [];
    this._activeTarget = null;
    this._scrollHeight = 0;
XhmikosR's avatar
XhmikosR committed
4582
4583
4584
    EventHandler.on(this._scrollElement, Event$9.SCROLL, function (event) {
      return _this._process(event);
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
4585
4586
4587
4588
4589
4590
4591
4592
    this.refresh();

    this._process();

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


XhmikosR's avatar
XhmikosR committed
4593
  var _proto = ScrollSpy.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
4594

XhmikosR's avatar
XhmikosR committed
4595
4596
4597
  // Public
  _proto.refresh = function refresh() {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4598

XhmikosR's avatar
XhmikosR committed
4599
4600
4601
    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
4602
4603
4604
    this._offsets = [];
    this._targets = [];
    this._scrollHeight = this._getScrollHeight();
XhmikosR's avatar
XhmikosR committed
4605
4606
4607
4608
    var targets = makeArray(SelectorEngine.find(this._selector));
    targets.map(function (element) {
      var target;
      var targetSelector = getSelectorFromElement(element);
XhmikosR's avatar
Dist.  
XhmikosR committed
4609
4610
4611
4612
4613
4614

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

      if (target) {
XhmikosR's avatar
XhmikosR committed
4615
        var targetBCR = target.getBoundingClientRect();
XhmikosR's avatar
Dist.  
XhmikosR committed
4616
4617
4618
4619
4620
4621
4622

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

      return null;
XhmikosR's avatar
XhmikosR committed
4623
4624
4625
4626
4627
4628
4629
4630
    }).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
4631
    });
XhmikosR's avatar
XhmikosR committed
4632
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4633

XhmikosR's avatar
XhmikosR committed
4634
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
    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
4646
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4647

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

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

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

XhmikosR's avatar
XhmikosR committed
4659
      config.target = "#" + id;
XhmikosR's avatar
Dist.  
XhmikosR committed
4660
4661
4662
4663
    }

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

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

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

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

XhmikosR's avatar
XhmikosR committed
4678
4679
  _proto._process = function _process() {
    var scrollTop = this._getScrollTop() + this._config.offset;
XhmikosR's avatar
Dist.  
XhmikosR committed
4680

XhmikosR's avatar
XhmikosR committed
4681
    var scrollHeight = this._getScrollHeight();
XhmikosR's avatar
Dist.  
XhmikosR committed
4682

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

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

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

      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
4707
    var offsetLength = this._offsets.length;
XhmikosR's avatar
Dist.  
XhmikosR committed
4708

XhmikosR's avatar
XhmikosR committed
4709
4710
    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
4711
4712
4713
4714
4715

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

XhmikosR's avatar
XhmikosR committed
4718
  _proto._activate = function _activate(target) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4719
4720
4721
4722
    this._activeTarget = target;

    this._clear();

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

XhmikosR's avatar
XhmikosR committed
4727
    var link = SelectorEngine.findOne(queries.join(','));
XhmikosR's avatar
Dist.  
XhmikosR committed
4728
4729
4730
4731
4732
4733
4734

    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
4735
      SelectorEngine.parents(link, Selector$8.NAV_LIST_GROUP).forEach(function (listGroup) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4736
4737
        // 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
4738
4739
4740
        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
4741

XhmikosR's avatar
XhmikosR committed
4742
4743
4744
4745
        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
4746
4747
4748
4749
4750
4751
4752
        });
      });
    }

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

XhmikosR's avatar
XhmikosR committed
4755
4756
4757
4758
4759
4760
  _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
4761
  } // Static
XhmikosR's avatar
XhmikosR committed
4762
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4763

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

XhmikosR's avatar
XhmikosR committed
4768
      var _config = typeof config === 'object' && config;
XhmikosR's avatar
Dist.  
XhmikosR committed
4769
4770
4771
4772
4773
4774
4775

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

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
4776
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
4777
4778
4779
4780
4781
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
4782
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4783

XhmikosR's avatar
XhmikosR committed
4784
  ScrollSpy._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4785
    return Data.getData(element, DATA_KEY$8);
XhmikosR's avatar
XhmikosR committed
4786
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4787

XhmikosR's avatar
XhmikosR committed
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
  _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
4802
4803
4804
4805
4806
4807
4808
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


XhmikosR's avatar
XhmikosR committed
4809
4810
4811
4812
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
4813
4814
4815
4816
4817
4818
4819
4820
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
4821
  var JQUERY_NO_CONFLICT$8 = jQuery.fn[NAME$8];
XhmikosR's avatar
Dist.  
XhmikosR committed
4822
4823
4824
  jQuery.fn[NAME$8] = ScrollSpy._jQueryInterface;
  jQuery.fn[NAME$8].Constructor = ScrollSpy;

XhmikosR's avatar
XhmikosR committed
4825
4826
  jQuery.fn[NAME$8].noConflict = function () {
    jQuery.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
XhmikosR's avatar
Dist.  
XhmikosR committed
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
    return ScrollSpy._jQueryInterface;
  };
}

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

XhmikosR's avatar
XhmikosR committed
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
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
4848
};
XhmikosR's avatar
XhmikosR committed
4849
var ClassName$9 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4850
4851
4852
4853
4854
4855
  DROPDOWN_MENU: 'dropdown-menu',
  ACTIVE: 'active',
  DISABLED: 'disabled',
  FADE: 'fade',
  SHOW: 'show'
};
XhmikosR's avatar
XhmikosR committed
4856
var Selector$9 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
  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
4872
4873
4874
4875
var Tab =
/*#__PURE__*/
function () {
  function Tab(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4876
4877
4878
4879
4880
    this._element = element;
    Data.setData(this._element, DATA_KEY$9, this);
  } // Getters


XhmikosR's avatar
XhmikosR committed
4881
  var _proto = Tab.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
4882

XhmikosR's avatar
XhmikosR committed
4883
4884
4885
  // Public
  _proto.show = function show() {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4886
4887
4888
4889
4890

    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
4891
4892
4893
4894
    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
4895
4896

    if (listElement) {
XhmikosR's avatar
XhmikosR committed
4897
      var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
XhmikosR's avatar
Dist.  
XhmikosR committed
4898
4899
4900
4901
      previous = makeArray(SelectorEngine.find(itemSelector, listElement));
      previous = previous[previous.length - 1];
    }

XhmikosR's avatar
XhmikosR committed
4902
    var hideEvent = null;
XhmikosR's avatar
Dist.  
XhmikosR committed
4903
4904
4905
4906
4907
4908
4909

    if (previous) {
      hideEvent = EventHandler.trigger(previous, Event$a.HIDE, {
        relatedTarget: this._element
      });
    }

XhmikosR's avatar
XhmikosR committed
4910
    var showEvent = EventHandler.trigger(this._element, Event$a.SHOW, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
      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
4924
    var complete = function complete() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4925
      EventHandler.trigger(previous, Event$a.HIDDEN, {
XhmikosR's avatar
XhmikosR committed
4926
        relatedTarget: _this._element
XhmikosR's avatar
Dist.  
XhmikosR committed
4927
      });
XhmikosR's avatar
XhmikosR committed
4928
      EventHandler.trigger(_this._element, Event$a.SHOWN, {
XhmikosR's avatar
Dist.  
XhmikosR committed
4929
4930
4931
4932
4933
4934
4935
4936
4937
        relatedTarget: previous
      });
    };

    if (target) {
      this._activate(target, target.parentNode, complete);
    } else {
      complete();
    }
XhmikosR's avatar
XhmikosR committed
4938
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4939

XhmikosR's avatar
XhmikosR committed
4940
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
4941
4942
4943
    Data.removeData(this._element, DATA_KEY$9);
    this._element = null;
  } // Private
XhmikosR's avatar
XhmikosR committed
4944
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
4945

XhmikosR's avatar
XhmikosR committed
4946
4947
  _proto._activate = function _activate(element, container, callback) {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
4948

XhmikosR's avatar
XhmikosR committed
4949
4950
4951
    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
4952

XhmikosR's avatar
XhmikosR committed
4953
4954
4955
    var complete = function complete() {
      return _this2._transitionComplete(element, active, callback);
    };
XhmikosR's avatar
Dist.  
XhmikosR committed
4956
4957

    if (active && isTransitioning) {
XhmikosR's avatar
XhmikosR committed
4958
      var transitionDuration = getTransitionDurationFromElement(active);
XhmikosR's avatar
Dist.  
XhmikosR committed
4959
4960
4961
4962
4963
4964
      active.classList.remove(ClassName$9.SHOW);
      EventHandler.one(active, TRANSITION_END, complete);
      emulateTransitionEnd(active, transitionDuration);
    } else {
      complete();
    }
XhmikosR's avatar
XhmikosR committed
4965
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
4966

XhmikosR's avatar
XhmikosR committed
4967
  _proto._transitionComplete = function _transitionComplete(element, active, callback) {
XhmikosR's avatar
Dist.  
XhmikosR committed
4968
4969
    if (active) {
      active.classList.remove(ClassName$9.ACTIVE);
XhmikosR's avatar
XhmikosR committed
4970
      var dropdownChild = SelectorEngine.findOne(Selector$9.DROPDOWN_ACTIVE_CHILD, active.parentNode);
XhmikosR's avatar
Dist.  
XhmikosR committed
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993

      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
4994
      var dropdownElement = SelectorEngine.closest(element, Selector$9.DROPDOWN);
XhmikosR's avatar
Dist.  
XhmikosR committed
4995
4996

      if (dropdownElement) {
XhmikosR's avatar
XhmikosR committed
4997
4998
4999
        makeArray(SelectorEngine.find(Selector$9.DROPDOWN_TOGGLE)).forEach(function (dropdown) {
          return dropdown.classList.add(ClassName$9.ACTIVE);
        });
XhmikosR's avatar
Dist.  
XhmikosR committed
5000
5001
5002
5003
5004
5005
5006
5007
5008
      }

      element.setAttribute('aria-expanded', true);
    }

    if (callback) {
      callback();
    }
  } // Static
XhmikosR's avatar
XhmikosR committed
5009
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5010

XhmikosR's avatar
XhmikosR committed
5011
  Tab._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5012
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
5013
      var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
5014
5015
5016

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
5017
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
5018
5019
5020
5021
5022
        }

        data[config]();
      }
    });
XhmikosR's avatar
XhmikosR committed
5023
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5024

XhmikosR's avatar
XhmikosR committed
5025
  Tab._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5026
    return Data.getData(element, DATA_KEY$9);
XhmikosR's avatar
XhmikosR committed
5027
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5028

XhmikosR's avatar
XhmikosR committed
5029
5030
5031
5032
5033
5034
5035
5036
5037
  _createClass(Tab, null, [{
    key: "VERSION",
    get: function get() {
      return VERSION$9;
    }
  }]);

  return Tab;
}();
XhmikosR's avatar
Dist.  
XhmikosR committed
5038
5039
5040
5041
5042
5043
5044
5045
5046
/**
 * ------------------------------------------------------------------------
 * Data Api implementation
 * ------------------------------------------------------------------------
 */


EventHandler.on(document, Event$a.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
  event.preventDefault();
XhmikosR's avatar
XhmikosR committed
5047
  var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
XhmikosR's avatar
Dist.  
XhmikosR committed
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
  data.show();
});
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 * add .tab to jQuery only if jQuery is present
 */

if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
5058
  var JQUERY_NO_CONFLICT$9 = jQuery.fn[NAME$9];
XhmikosR's avatar
Dist.  
XhmikosR committed
5059
5060
5061
  jQuery.fn[NAME$9] = Tab._jQueryInterface;
  jQuery.fn[NAME$9].Constructor = Tab;

XhmikosR's avatar
XhmikosR committed
5062
5063
  jQuery.fn[NAME$9].noConflict = function () {
    jQuery.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
XhmikosR's avatar
Dist.  
XhmikosR committed
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
    return Tab._jQueryInterface;
  };
}

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

XhmikosR's avatar
XhmikosR committed
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
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
5084
};
XhmikosR's avatar
XhmikosR committed
5085
var ClassName$a = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5086
5087
5088
5089
5090
  FADE: 'fade',
  HIDE: 'hide',
  SHOW: 'show',
  SHOWING: 'showing'
};
XhmikosR's avatar
XhmikosR committed
5091
var DefaultType$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5092
5093
5094
5095
  animation: 'boolean',
  autohide: 'boolean',
  delay: 'number'
};
XhmikosR's avatar
XhmikosR committed
5096
var Default$7 = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5097
5098
5099
5100
  animation: true,
  autohide: true,
  delay: 500
};
XhmikosR's avatar
XhmikosR committed
5101
var Selector$a = {
XhmikosR's avatar
Dist.  
XhmikosR committed
5102
5103
5104
5105
5106
5107
5108
5109
5110
  DATA_DISMISS: '[data-dismiss="toast"]'
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

};

XhmikosR's avatar
XhmikosR committed
5111
5112
5113
5114
var Toast =
/*#__PURE__*/
function () {
  function Toast(element, config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
    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
5125
  var _proto = Toast.prototype;
XhmikosR's avatar
Dist.  
XhmikosR committed
5126

XhmikosR's avatar
XhmikosR committed
5127
5128
5129
  // Public
  _proto.show = function show() {
    var _this = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
5130

Mark Otto's avatar
dist v5    
Mark Otto committed
5131
5132
5133
5134
5135
    var showEvent = EventHandler.trigger(this._element, Event$b.SHOW);

    if (showEvent.defaultPrevented) {
      return;
    }
XhmikosR's avatar
Dist.  
XhmikosR committed
5136
5137
5138
5139
5140

    if (this._config.animation) {
      this._element.classList.add(ClassName$a.FADE);
    }

XhmikosR's avatar
XhmikosR committed
5141
5142
    var complete = function complete() {
      _this._element.classList.remove(ClassName$a.SHOWING);
XhmikosR's avatar
Dist.  
XhmikosR committed
5143

XhmikosR's avatar
XhmikosR committed
5144
      _this._element.classList.add(ClassName$a.SHOW);
XhmikosR's avatar
Dist.  
XhmikosR committed
5145

XhmikosR's avatar
XhmikosR committed
5146
      EventHandler.trigger(_this._element, Event$b.SHOWN);
XhmikosR's avatar
Dist.  
XhmikosR committed
5147

XhmikosR's avatar
XhmikosR committed
5148
5149
5150
5151
      if (_this._config.autohide) {
        _this._timeout = setTimeout(function () {
          _this.hide();
        }, _this._config.delay);
XhmikosR's avatar
Dist.  
XhmikosR committed
5152
5153
5154
5155
5156
5157
5158
5159
      }
    };

    this._element.classList.remove(ClassName$a.HIDE);

    this._element.classList.add(ClassName$a.SHOWING);

    if (this._config.animation) {
XhmikosR's avatar
XhmikosR committed
5160
      var transitionDuration = getTransitionDurationFromElement(this._element);
XhmikosR's avatar
Dist.  
XhmikosR committed
5161
5162
5163
5164
5165
      EventHandler.one(this._element, TRANSITION_END, complete);
      emulateTransitionEnd(this._element, transitionDuration);
    } else {
      complete();
    }
XhmikosR's avatar
XhmikosR committed
5166
5167
5168
5169
  };

  _proto.hide = function hide() {
    var _this2 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
5170
5171
5172
5173
5174

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

Mark Otto's avatar
dist v5    
Mark Otto committed
5175
5176
5177
5178
5179
    var hideEvent = EventHandler.trigger(this._element, Event$b.HIDE);

    if (hideEvent.defaultPrevented) {
      return;
    }
XhmikosR's avatar
Dist.  
XhmikosR committed
5180

XhmikosR's avatar
XhmikosR committed
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
    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
5193
    } else {
XhmikosR's avatar
XhmikosR committed
5194
      complete();
XhmikosR's avatar
Dist.  
XhmikosR committed
5195
    }
XhmikosR's avatar
XhmikosR committed
5196
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5197

XhmikosR's avatar
XhmikosR committed
5198
  _proto.dispose = function dispose() {
XhmikosR's avatar
Dist.  
XhmikosR committed
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
    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
5211
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5212

XhmikosR's avatar
XhmikosR committed
5213
5214
  _proto._getConfig = function _getConfig(config) {
    config = _objectSpread({}, Default$7, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
XhmikosR's avatar
Dist.  
XhmikosR committed
5215
5216
    typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
    return config;
XhmikosR's avatar
XhmikosR committed
5217
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5218

XhmikosR's avatar
XhmikosR committed
5219
5220
  _proto._setListeners = function _setListeners() {
    var _this3 = this;
XhmikosR's avatar
Dist.  
XhmikosR committed
5221

XhmikosR's avatar
XhmikosR committed
5222
5223
5224
    EventHandler.on(this._element, Event$b.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
      return _this3.hide();
    });
XhmikosR's avatar
Dist.  
XhmikosR committed
5225
  } // Static
XhmikosR's avatar
XhmikosR committed
5226
  ;
XhmikosR's avatar
Dist.  
XhmikosR committed
5227

XhmikosR's avatar
XhmikosR committed
5228
  Toast._jQueryInterface = function _jQueryInterface(config) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5229
    return this.each(function () {
XhmikosR's avatar
XhmikosR committed
5230
      var data = Data.getData(this, DATA_KEY$a);
XhmikosR's avatar
Dist.  
XhmikosR committed
5231

XhmikosR's avatar
XhmikosR committed
5232
      var _config = typeof config === 'object' && config;
XhmikosR's avatar
Dist.  
XhmikosR committed
5233
5234
5235
5236
5237
5238
5239

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

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
XhmikosR's avatar
XhmikosR committed
5240
          throw new TypeError("No method named \"" + config + "\"");
XhmikosR's avatar
Dist.  
XhmikosR committed
5241
5242
5243
5244
5245
        }

        data[config](this);
      }
    });
XhmikosR's avatar
XhmikosR committed
5246
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5247

XhmikosR's avatar
XhmikosR committed
5248
  Toast._getInstance = function _getInstance(element) {
XhmikosR's avatar
Dist.  
XhmikosR committed
5249
    return Data.getData(element, DATA_KEY$a);
XhmikosR's avatar
XhmikosR committed
5250
  };
XhmikosR's avatar
Dist.  
XhmikosR committed
5251

XhmikosR's avatar
XhmikosR committed
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
  _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
5271
5272
5273
5274
5275
5276
5277
5278
5279
/**
 * ------------------------------------------------------------------------
 * jQuery
 * ------------------------------------------------------------------------
 *  add .toast to jQuery only if jQuery is present
 */


if (typeof jQuery !== 'undefined') {
XhmikosR's avatar
XhmikosR committed
5280
  var JQUERY_NO_CONFLICT$a = jQuery.fn[NAME$a];
XhmikosR's avatar
Dist.  
XhmikosR committed
5281
5282
5283
  jQuery.fn[NAME$a] = Toast._jQueryInterface;
  jQuery.fn[NAME$a].Constructor = Toast;

XhmikosR's avatar
XhmikosR committed
5284
5285
  jQuery.fn[NAME$a].noConflict = function () {
    jQuery.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
XhmikosR's avatar
Dist.  
XhmikosR committed
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
    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