bootstrap.bundle.js 218 KB
Newer Older
XhmikosR's avatar
Dist    
XhmikosR committed
5001
          var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
Mark Otto's avatar
dist  
Mark Otto committed
5002

XhmikosR's avatar
Dist    
XhmikosR committed
5003
5004
5005
5006
5007
5008
5009
          $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
        } else {
          callbackRemove();
        }
      } else if (callback) {
        callback();
      }
Mark Otto's avatar
Mark Otto committed
5010
    } // ----------------------------------------------------------------------
XhmikosR's avatar
Dist    
XhmikosR committed
5011
5012
5013
    // the following methods are used to handle overflowing modals
    // todo (fat): these should probably be refactored out of modal.js
    // ----------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
5014
    ;
Mark Otto's avatar
dist  
Mark Otto committed
5015

XhmikosR's avatar
Dist    
XhmikosR committed
5016
5017
    _proto._adjustDialog = function _adjustDialog() {
      var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
Mark Otto's avatar
dist    
Mark Otto committed
5018

XhmikosR's avatar
Dist    
XhmikosR committed
5019
5020
5021
      if (!this._isBodyOverflowing && isModalOverflowing) {
        this._element.style.paddingLeft = this._scrollbarWidth + "px";
      }
Mark Otto's avatar
dist  
Mark Otto committed
5022

XhmikosR's avatar
Dist    
XhmikosR committed
5023
5024
5025
5026
      if (this._isBodyOverflowing && !isModalOverflowing) {
        this._element.style.paddingRight = this._scrollbarWidth + "px";
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
5027

XhmikosR's avatar
Dist    
XhmikosR committed
5028
5029
5030
5031
    _proto._resetAdjustments = function _resetAdjustments() {
      this._element.style.paddingLeft = '';
      this._element.style.paddingRight = '';
    };
Mark Otto's avatar
dist    
Mark Otto committed
5032

XhmikosR's avatar
Dist    
XhmikosR committed
5033
5034
5035
5036
5037
    _proto._checkScrollbar = function _checkScrollbar() {
      var rect = document.body.getBoundingClientRect();
      this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
      this._scrollbarWidth = this._getScrollbarWidth();
    };
Mark Otto's avatar
dist  
Mark Otto committed
5038

XhmikosR's avatar
Dist    
XhmikosR committed
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
    _proto._setScrollbar = function _setScrollbar() {
      var _this9 = this;

      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
        var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
        var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding

        $(fixedContent).each(function (index, element) {
          var actualPadding = element.style.paddingRight;
          var calculatedPadding = $(element).css('padding-right');
          $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
        }); // Adjust sticky content margin

        $(stickyContent).each(function (index, element) {
          var actualMargin = element.style.marginRight;
          var calculatedMargin = $(element).css('margin-right');
          $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
        }); // Adjust body padding

        var actualPadding = document.body.style.paddingRight;
        var calculatedPadding = $(document.body).css('padding-right');
        $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
      }
XhmikosR's avatar
Dist    
XhmikosR committed
5064
5065

      $(document.body).addClass(ClassName$5.OPEN);
XhmikosR's avatar
Dist    
XhmikosR committed
5066
    };
Mark Otto's avatar
dist    
Mark Otto committed
5067

XhmikosR's avatar
Dist    
XhmikosR committed
5068
5069
5070
5071
5072
5073
5074
5075
    _proto._resetScrollbar = function _resetScrollbar() {
      // Restore fixed content padding
      var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
      $(fixedContent).each(function (index, element) {
        var padding = $(element).data('padding-right');
        $(element).removeData('padding-right');
        element.style.paddingRight = padding ? padding : '';
      }); // Restore sticky content
Mark Otto's avatar
dist  
Mark Otto committed
5076

XhmikosR's avatar
Dist    
XhmikosR committed
5077
5078
5079
      var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT));
      $(elements).each(function (index, element) {
        var margin = $(element).data('margin-right');
Mark Otto's avatar
dist  
Mark Otto committed
5080

XhmikosR's avatar
Dist    
XhmikosR committed
5081
5082
        if (typeof margin !== 'undefined') {
          $(element).css('margin-right', margin).removeData('margin-right');
Mark Otto's avatar
dist    
Mark Otto committed
5083
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5084
      }); // Restore body padding
Mark Otto's avatar
dist  
Mark Otto committed
5085

XhmikosR's avatar
Dist    
XhmikosR committed
5086
5087
5088
5089
      var padding = $(document.body).data('padding-right');
      $(document.body).removeData('padding-right');
      document.body.style.paddingRight = padding ? padding : '';
    };
Mark Otto's avatar
dist  
Mark Otto committed
5090

XhmikosR's avatar
Dist    
XhmikosR committed
5091
5092
5093
5094
5095
5096
5097
5098
    _proto._getScrollbarWidth = function _getScrollbarWidth() {
      // thx d.walsh
      var scrollDiv = document.createElement('div');
      scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER;
      document.body.appendChild(scrollDiv);
      var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
      document.body.removeChild(scrollDiv);
      return scrollbarWidth;
Mark Otto's avatar
Mark Otto committed
5099
5100
    } // Static
    ;
Mark Otto's avatar
dist  
Mark Otto committed
5101

XhmikosR's avatar
Dist    
XhmikosR committed
5102
5103
5104
    Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
      return this.each(function () {
        var data = $(this).data(DATA_KEY$5);
Mark Otto's avatar
dist  
Mark Otto committed
5105

XhmikosR's avatar
Dist    
XhmikosR committed
5106
        var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
Mark Otto's avatar
dist  
Mark Otto committed
5107

XhmikosR's avatar
Dist    
XhmikosR committed
5108
5109
5110
5111
        if (!data) {
          data = new Modal(this, _config);
          $(this).data(DATA_KEY$5, data);
        }
Mark Otto's avatar
dist    
Mark Otto committed
5112

XhmikosR's avatar
Dist    
XhmikosR committed
5113
5114
5115
        if (typeof config === 'string') {
          if (typeof data[config] === 'undefined') {
            throw new TypeError("No method named \"" + config + "\"");
Mark Otto's avatar
dist    
Mark Otto committed
5116
          }
Mark Otto's avatar
dist  
Mark Otto committed
5117

XhmikosR's avatar
Dist    
XhmikosR committed
5118
5119
5120
5121
5122
5123
          data[config](relatedTarget);
        } else if (_config.show) {
          data.show(relatedTarget);
        }
      });
    };
Mark Otto's avatar
dist  
Mark Otto committed
5124

XhmikosR's avatar
Dist    
XhmikosR committed
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
    _createClass(Modal, null, [{
      key: "VERSION",
      get: function get() {
        return VERSION$5;
      }
    }, {
      key: "Default",
      get: function get() {
        return Default$3;
      }
    }]);
Mark Otto's avatar
dist    
Mark Otto committed
5136

XhmikosR's avatar
Dist    
XhmikosR committed
5137
5138
5139
5140
5141
5142
5143
    return Modal;
  }();
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */
Mark Otto's avatar
dist  
Mark Otto committed
5144

Mark Otto's avatar
dist    
Mark Otto committed
5145

XhmikosR's avatar
Dist    
XhmikosR committed
5146
5147
  $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
    var _this10 = this;
Mark Otto's avatar
dist  
Mark Otto committed
5148

XhmikosR's avatar
Dist    
XhmikosR committed
5149
5150
    var target;
    var selector = Util.getSelectorFromElement(this);
Mark Otto's avatar
dist  
Mark Otto committed
5151

XhmikosR's avatar
Dist    
XhmikosR committed
5152
5153
5154
    if (selector) {
      target = document.querySelector(selector);
    }
Mark Otto's avatar
dist  
Mark Otto committed
5155

XhmikosR's avatar
Dist    
XhmikosR committed
5156
    var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
Mark Otto's avatar
dist  
Mark Otto committed
5157

XhmikosR's avatar
Dist    
XhmikosR committed
5158
5159
5160
    if (this.tagName === 'A' || this.tagName === 'AREA') {
      event.preventDefault();
    }
Mark Otto's avatar
dist  
Mark Otto committed
5161

XhmikosR's avatar
Dist    
XhmikosR committed
5162
5163
5164
5165
    var $target = $(target).one(Event$5.SHOW, function (showEvent) {
      if (showEvent.isDefaultPrevented()) {
        // Only register focus restorer if modal will actually get shown
        return;
Mark Otto's avatar
dist  
Mark Otto committed
5166
5167
      }

XhmikosR's avatar
Dist    
XhmikosR committed
5168
5169
5170
      $target.one(Event$5.HIDDEN, function () {
        if ($(_this10).is(':visible')) {
          _this10.focus();
Mark Otto's avatar
dist  
Mark Otto committed
5171
        }
Mark Otto's avatar
dist    
Mark Otto committed
5172
5173
      });
    });
Mark Otto's avatar
dist    
Mark Otto committed
5174

XhmikosR's avatar
Dist    
XhmikosR committed
5175
5176
5177
5178
5179
5180
5181
    Modal._jQueryInterface.call($(target), config, this);
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   */
Mark Otto's avatar
dist  
Mark Otto committed
5182

XhmikosR's avatar
Dist    
XhmikosR committed
5183
5184
  $.fn[NAME$5] = Modal._jQueryInterface;
  $.fn[NAME$5].Constructor = Modal;
Mark Otto's avatar
dist  
Mark Otto committed
5185

XhmikosR's avatar
Dist    
XhmikosR committed
5186
5187
5188
5189
  $.fn[NAME$5].noConflict = function () {
    $.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
    return Modal._jQueryInterface;
  };
Mark Otto's avatar
dist  
Mark Otto committed
5190

XhmikosR's avatar
XhmikosR committed
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v4.3.1): tools/sanitizer.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
   */
  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
  var DefaultWhitelist = {
    // 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: []
    /**
     * 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
     */

  };
  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
  /**
   * 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
   */

  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;

  function allowedAttribute(attr, allowedAttributeList) {
    var attrName = attr.nodeName.toLowerCase();

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

    var regExp = allowedAttributeList.filter(function (attrRegex) {
      return attrRegex instanceof RegExp;
    }); // Check if a regular expression validates the attribute.

    for (var i = 0, l = regExp.length; i < l; i++) {
      if (attrName.match(regExp[i])) {
        return true;
      }
    }

    return false;
  }

  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
    if (unsafeHtml.length === 0) {
      return unsafeHtml;
    }

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

    var domParser = new window.DOMParser();
    var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
    var whitelistKeys = Object.keys(whiteList);
    var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));

    var _loop = function _loop(i, len) {
      var el = elements[i];
      var elName = el.nodeName.toLowerCase();

      if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
        el.parentNode.removeChild(el);
        return "continue";
      }

      var attributeList = [].slice.call(el.attributes);
      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
      attributeList.forEach(function (attr) {
        if (!allowedAttribute(attr, whitelistedAttributes)) {
          el.removeAttribute(attr.nodeName);
        }
      });
    };

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

      if (_ret === "continue") continue;
    }

    return createdDocument.body.innerHTML;
  }

XhmikosR's avatar
Dist    
XhmikosR committed
5312
5313
5314
5315
5316
5317
5318
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  var NAME$6 = 'tooltip';
XhmikosR's avatar
XhmikosR committed
5319
  var VERSION$6 = '4.3.1';
XhmikosR's avatar
Dist    
XhmikosR committed
5320
5321
5322
5323
5324
  var DATA_KEY$6 = 'bs.tooltip';
  var EVENT_KEY$6 = "." + DATA_KEY$6;
  var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
  var CLASS_PREFIX = 'bs-tooltip';
  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
XhmikosR's avatar
XhmikosR committed
5325
  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
XhmikosR's avatar
Dist    
XhmikosR committed
5326
5327
5328
5329
5330
5331
5332
5333
5334
  var DefaultType$4 = {
    animation: 'boolean',
    template: 'string',
    title: '(string|element|function)',
    trigger: 'string',
    delay: '(number|object)',
    html: 'boolean',
    selector: '(string|boolean)',
    placement: '(string|function)',
Mark Otto's avatar
Mark Otto committed
5335
    offset: '(number|string|function)',
XhmikosR's avatar
Dist    
XhmikosR committed
5336
5337
    container: '(string|element|boolean)',
    fallbackPlacement: '(string|array)',
XhmikosR's avatar
XhmikosR committed
5338
5339
5340
5341
    boundary: '(string|element)',
    sanitize: 'boolean',
    sanitizeFn: '(null|function)',
    whiteList: 'object'
XhmikosR's avatar
Dist    
XhmikosR committed
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
  };
  var AttachmentMap$1 = {
    AUTO: 'auto',
    TOP: 'top',
    RIGHT: 'right',
    BOTTOM: 'bottom',
    LEFT: 'left'
  };
  var Default$4 = {
    animation: true,
    template: '<div class="tooltip" role="tooltip">' + '<div class="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',
XhmikosR's avatar
XhmikosR committed
5362
5363
5364
5365
    boundary: 'scrollParent',
    sanitize: true,
    sanitizeFn: null,
    whiteList: DefaultWhitelist
XhmikosR's avatar
Dist    
XhmikosR committed
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
  };
  var HoverState = {
    SHOW: 'show',
    OUT: 'out'
  };
  var Event$6 = {
    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
  };
  var ClassName$6 = {
    FADE: 'fade',
    SHOW: 'show'
  };
  var Selector$6 = {
    TOOLTIP: '.tooltip',
    TOOLTIP_INNER: '.tooltip-inner',
    ARROW: '.arrow'
  };
  var Trigger = {
    HOVER: 'hover',
    FOCUS: 'focus',
    CLICK: 'click',
    MANUAL: 'manual'
Mark Otto's avatar
dist    
Mark Otto committed
5397
5398
    /**
     * ------------------------------------------------------------------------
XhmikosR's avatar
Dist    
XhmikosR committed
5399
     * Class Definition
Mark Otto's avatar
dist    
Mark Otto committed
5400
5401
     * ------------------------------------------------------------------------
     */
XhmikosR's avatar
Dist    
XhmikosR committed
5402
5403
5404
5405
5406
5407
5408

  };

  var Tooltip =
  /*#__PURE__*/
  function () {
    function Tooltip(element, config) {
Mark Otto's avatar
dist    
Mark Otto committed
5409
      /**
XhmikosR's avatar
Dist    
XhmikosR committed
5410
5411
       * Check for Popper dependency
       * Popper - https://popper.js.org
Mark Otto's avatar
dist    
Mark Otto committed
5412
       */
XhmikosR's avatar
Dist    
XhmikosR committed
5413
5414
5415
      if (typeof Popper === 'undefined') {
        throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
      } // private
Mark Otto's avatar
dist    
Mark Otto committed
5416
5417


XhmikosR's avatar
Dist    
XhmikosR committed
5418
5419
5420
5421
5422
      this._isEnabled = true;
      this._timeout = 0;
      this._hoverState = '';
      this._activeTrigger = {};
      this._popper = null; // Protected
Mark Otto's avatar
dist  
Mark Otto committed
5423

XhmikosR's avatar
Dist    
XhmikosR committed
5424
5425
5426
      this.element = element;
      this.config = this._getConfig(config);
      this.tip = null;
Mark Otto's avatar
dist  
Mark Otto committed
5427

XhmikosR's avatar
Dist    
XhmikosR committed
5428
5429
      this._setListeners();
    } // Getters
Mark Otto's avatar
dist  
Mark Otto committed
5430
5431


XhmikosR's avatar
Dist    
XhmikosR committed
5432
    var _proto = Tooltip.prototype;
Mark Otto's avatar
dist  
Mark Otto committed
5433

XhmikosR's avatar
Dist    
XhmikosR committed
5434
5435
5436
5437
    // Public
    _proto.enable = function enable() {
      this._isEnabled = true;
    };
Mark Otto's avatar
dist  
Mark Otto committed
5438

XhmikosR's avatar
Dist    
XhmikosR committed
5439
5440
5441
    _proto.disable = function disable() {
      this._isEnabled = false;
    };
Mark Otto's avatar
dist  
Mark Otto committed
5442

XhmikosR's avatar
Dist    
XhmikosR committed
5443
5444
5445
    _proto.toggleEnabled = function toggleEnabled() {
      this._isEnabled = !this._isEnabled;
    };
Mark Otto's avatar
dist  
Mark Otto committed
5446

XhmikosR's avatar
Dist    
XhmikosR committed
5447
5448
5449
5450
    _proto.toggle = function toggle(event) {
      if (!this._isEnabled) {
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5451

XhmikosR's avatar
Dist    
XhmikosR committed
5452
5453
5454
      if (event) {
        var dataKey = this.constructor.DATA_KEY;
        var context = $(event.currentTarget).data(dataKey);
Mark Otto's avatar
dist  
Mark Otto committed
5455

XhmikosR's avatar
Dist    
XhmikosR committed
5456
5457
5458
        if (!context) {
          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
          $(event.currentTarget).data(dataKey, context);
Mark Otto's avatar
dist  
Mark Otto committed
5459
5460
        }

XhmikosR's avatar
Dist    
XhmikosR committed
5461
        context._activeTrigger.click = !context._activeTrigger.click;
Mark Otto's avatar
dist    
Mark Otto committed
5462

XhmikosR's avatar
Dist    
XhmikosR committed
5463
5464
        if (context._isWithActiveTrigger()) {
          context._enter(null, context);
Mark Otto's avatar
dist  
Mark Otto committed
5465
        } else {
XhmikosR's avatar
Dist    
XhmikosR committed
5466
5467
5468
5469
5470
          context._leave(null, context);
        }
      } else {
        if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) {
          this._leave(null, this);
Mark Otto's avatar
dist  
Mark Otto committed
5471

XhmikosR's avatar
Dist    
XhmikosR committed
5472
          return;
Mark Otto's avatar
dist    
Mark Otto committed
5473
        }
Mark Otto's avatar
dist  
Mark Otto committed
5474

XhmikosR's avatar
Dist    
XhmikosR committed
5475
5476
5477
        this._enter(null, this);
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
5478

XhmikosR's avatar
Dist    
XhmikosR committed
5479
5480
5481
5482
5483
    _proto.dispose = function dispose() {
      clearTimeout(this._timeout);
      $.removeData(this.element, this.constructor.DATA_KEY);
      $(this.element).off(this.constructor.EVENT_KEY);
      $(this.element).closest('.modal').off('hide.bs.modal');
Mark Otto's avatar
dist  
Mark Otto committed
5484

XhmikosR's avatar
Dist    
XhmikosR committed
5485
5486
5487
      if (this.tip) {
        $(this.tip).remove();
      }
Mark Otto's avatar
dist    
Mark Otto committed
5488

XhmikosR's avatar
Dist    
XhmikosR committed
5489
5490
5491
5492
      this._isEnabled = null;
      this._timeout = null;
      this._hoverState = null;
      this._activeTrigger = null;
Mark Otto's avatar
dist  
Mark Otto committed
5493

XhmikosR's avatar
Dist    
XhmikosR committed
5494
5495
5496
      if (this._popper !== null) {
        this._popper.destroy();
      }
Mark Otto's avatar
dist  
Mark Otto committed
5497

XhmikosR's avatar
Dist    
XhmikosR committed
5498
5499
5500
5501
5502
      this._popper = null;
      this.element = null;
      this.config = null;
      this.tip = null;
    };
Mark Otto's avatar
dist  
Mark Otto committed
5503

XhmikosR's avatar
Dist    
XhmikosR committed
5504
5505
    _proto.show = function show() {
      var _this = this;
Mark Otto's avatar
dist  
Mark Otto committed
5506

XhmikosR's avatar
Dist    
XhmikosR committed
5507
5508
5509
      if ($(this.element).css('display') === 'none') {
        throw new Error('Please use show on visible elements');
      }
Mark Otto's avatar
dist    
Mark Otto committed
5510

XhmikosR's avatar
Dist    
XhmikosR committed
5511
      var showEvent = $.Event(this.constructor.Event.SHOW);
Mark Otto's avatar
dist  
Mark Otto committed
5512

XhmikosR's avatar
Dist    
XhmikosR committed
5513
5514
      if (this.isWithContent() && this._isEnabled) {
        $(this.element).trigger(showEvent);
Mark Otto's avatar
dist    
Mark Otto committed
5515
5516
        var shadowRoot = Util.findShadowRoot(this.element);
        var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
Mark Otto's avatar
dist  
Mark Otto committed
5517

XhmikosR's avatar
Dist    
XhmikosR committed
5518
5519
5520
        if (showEvent.isDefaultPrevented() || !isInTheDom) {
          return;
        }
Mark Otto's avatar
dist  
Mark Otto committed
5521

XhmikosR's avatar
Dist    
XhmikosR committed
5522
5523
5524
5525
5526
        var tip = this.getTipElement();
        var tipId = Util.getUID(this.constructor.NAME);
        tip.setAttribute('id', tipId);
        this.element.setAttribute('aria-describedby', tipId);
        this.setContent();
Mark Otto's avatar
dist  
Mark Otto committed
5527

XhmikosR's avatar
Dist    
XhmikosR committed
5528
5529
5530
        if (this.config.animation) {
          $(tip).addClass(ClassName$6.FADE);
        }
Mark Otto's avatar
dist  
Mark Otto committed
5531

XhmikosR's avatar
Dist    
XhmikosR committed
5532
        var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
Mark Otto's avatar
dist  
Mark Otto committed
5533

XhmikosR's avatar
Dist    
XhmikosR committed
5534
        var attachment = this._getAttachment(placement);
Mark Otto's avatar
dist  
Mark Otto committed
5535

XhmikosR's avatar
Dist    
XhmikosR committed
5536
        this.addAttachmentClass(attachment);
Mark Otto's avatar
dist    
Mark Otto committed
5537
5538
5539

        var container = this._getContainer();

XhmikosR's avatar
Dist    
XhmikosR committed
5540
        $(tip).data(this.constructor.DATA_KEY, this);
Mark Otto's avatar
dist  
Mark Otto committed
5541

XhmikosR's avatar
Dist    
XhmikosR committed
5542
5543
5544
5545
5546
5547
5548
5549
        if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
          $(tip).appendTo(container);
        }

        $(this.element).trigger(this.constructor.Event.INSERTED);
        this._popper = new Popper(this.element, tip, {
          placement: attachment,
          modifiers: {
Mark Otto's avatar
Mark Otto committed
5550
            offset: this._getOffset(),
XhmikosR's avatar
Dist    
XhmikosR committed
5551
5552
5553
5554
5555
            flip: {
              behavior: this.config.fallbackPlacement
            },
            arrow: {
              element: Selector$6.ARROW
Mark Otto's avatar
dist    
Mark Otto committed
5556
            },
XhmikosR's avatar
Dist    
XhmikosR committed
5557
5558
5559
5560
5561
5562
            preventOverflow: {
              boundariesElement: this.config.boundary
            }
          },
          onCreate: function onCreate(data) {
            if (data.originalPlacement !== data.placement) {
Mark Otto's avatar
dist  
Mark Otto committed
5563
5564
              _this._handlePopperPlacementChange(data);
            }
XhmikosR's avatar
Dist    
XhmikosR committed
5565
5566
          },
          onUpdate: function onUpdate(data) {
XhmikosR's avatar
Dist    
XhmikosR committed
5567
            return _this._handlePopperPlacementChange(data);
Mark Otto's avatar
dist  
Mark Otto committed
5568
          }
XhmikosR's avatar
Dist    
XhmikosR committed
5569
5570
5571
5572
5573
        });
        $(tip).addClass(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
Mark Otto's avatar
dist    
Mark Otto committed
5574

XhmikosR's avatar
Dist    
XhmikosR committed
5575
5576
5577
        if ('ontouchstart' in document.documentElement) {
          $(document.body).children().on('mouseover', null, $.noop);
        }
Mark Otto's avatar
dist  
Mark Otto committed
5578

XhmikosR's avatar
Dist    
XhmikosR committed
5579
5580
5581
5582
        var complete = function complete() {
          if (_this.config.animation) {
            _this._fixTransition();
          }
Mark Otto's avatar
dist    
Mark Otto committed
5583

XhmikosR's avatar
Dist    
XhmikosR committed
5584
5585
5586
          var prevHoverState = _this._hoverState;
          _this._hoverState = null;
          $(_this.element).trigger(_this.constructor.Event.SHOWN);
Mark Otto's avatar
dist  
Mark Otto committed
5587

XhmikosR's avatar
Dist    
XhmikosR committed
5588
5589
          if (prevHoverState === HoverState.OUT) {
            _this._leave(null, _this);
Mark Otto's avatar
dist  
Mark Otto committed
5590
          }
XhmikosR's avatar
Dist    
XhmikosR committed
5591
5592
5593
5594
5595
5596
5597
        };

        if ($(this.tip).hasClass(ClassName$6.FADE)) {
          var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
          $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
        } else {
          complete();
Mark Otto's avatar
dist  
Mark Otto committed
5598
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5599
5600
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
5601

XhmikosR's avatar
Dist    
XhmikosR committed
5602
5603
    _proto.hide = function hide(callback) {
      var _this2 = this;
Mark Otto's avatar
dist  
Mark Otto committed
5604

XhmikosR's avatar
Dist    
XhmikosR committed
5605
5606
      var tip = this.getTipElement();
      var hideEvent = $.Event(this.constructor.Event.HIDE);
Mark Otto's avatar
dist    
Mark Otto committed
5607

XhmikosR's avatar
Dist    
XhmikosR committed
5608
5609
5610
5611
      var complete = function complete() {
        if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
          tip.parentNode.removeChild(tip);
        }
Mark Otto's avatar
dist  
Mark Otto committed
5612

XhmikosR's avatar
Dist    
XhmikosR committed
5613
        _this2._cleanTipClass();
Mark Otto's avatar
dist    
Mark Otto committed
5614

XhmikosR's avatar
Dist    
XhmikosR committed
5615
        _this2.element.removeAttribute('aria-describedby');
Mark Otto's avatar
dist    
Mark Otto committed
5616

XhmikosR's avatar
Dist    
XhmikosR committed
5617
        $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
Mark Otto's avatar
dist    
Mark Otto committed
5618

XhmikosR's avatar
Dist    
XhmikosR committed
5619
5620
5621
        if (_this2._popper !== null) {
          _this2._popper.destroy();
        }
Mark Otto's avatar
dist  
Mark Otto committed
5622

XhmikosR's avatar
Dist    
XhmikosR committed
5623
5624
5625
5626
        if (callback) {
          callback();
        }
      };
Mark Otto's avatar
dist  
Mark Otto committed
5627

XhmikosR's avatar
Dist    
XhmikosR committed
5628
      $(this.element).trigger(hideEvent);
Mark Otto's avatar
dist  
Mark Otto committed
5629

XhmikosR's avatar
Dist    
XhmikosR committed
5630
5631
5632
      if (hideEvent.isDefaultPrevented()) {
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5633

XhmikosR's avatar
Dist    
XhmikosR committed
5634
5635
      $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
      // empty mouseover listeners we added for iOS support
Mark Otto's avatar
dist    
Mark Otto committed
5636

XhmikosR's avatar
Dist    
XhmikosR committed
5637
5638
5639
      if ('ontouchstart' in document.documentElement) {
        $(document.body).children().off('mouseover', null, $.noop);
      }
Mark Otto's avatar
dist  
Mark Otto committed
5640

XhmikosR's avatar
Dist    
XhmikosR committed
5641
5642
5643
      this._activeTrigger[Trigger.CLICK] = false;
      this._activeTrigger[Trigger.FOCUS] = false;
      this._activeTrigger[Trigger.HOVER] = false;
Mark Otto's avatar
dist  
Mark Otto committed
5644

XhmikosR's avatar
Dist    
XhmikosR committed
5645
5646
5647
5648
5649
5650
      if ($(this.tip).hasClass(ClassName$6.FADE)) {
        var transitionDuration = Util.getTransitionDurationFromElement(tip);
        $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
      } else {
        complete();
      }
Mark Otto's avatar
dist  
Mark Otto committed
5651

XhmikosR's avatar
Dist    
XhmikosR committed
5652
5653
      this._hoverState = '';
    };
Mark Otto's avatar
dist  
Mark Otto committed
5654

XhmikosR's avatar
Dist    
XhmikosR committed
5655
5656
5657
5658
    _proto.update = function update() {
      if (this._popper !== null) {
        this._popper.scheduleUpdate();
      }
Mark Otto's avatar
Mark Otto committed
5659
5660
    } // Protected
    ;
Mark Otto's avatar
dist  
Mark Otto committed
5661

XhmikosR's avatar
Dist    
XhmikosR committed
5662
5663
5664
    _proto.isWithContent = function isWithContent() {
      return Boolean(this.getTitle());
    };
Mark Otto's avatar
dist  
Mark Otto committed
5665

XhmikosR's avatar
Dist    
XhmikosR committed
5666
5667
5668
    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
      $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
    };
Mark Otto's avatar
dist  
Mark Otto committed
5669

XhmikosR's avatar
Dist    
XhmikosR committed
5670
5671
5672
5673
    _proto.getTipElement = function getTipElement() {
      this.tip = this.tip || $(this.config.template)[0];
      return this.tip;
    };
Mark Otto's avatar
dist  
Mark Otto committed
5674

XhmikosR's avatar
Dist    
XhmikosR committed
5675
5676
5677
5678
5679
    _proto.setContent = function setContent() {
      var tip = this.getTipElement();
      this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle());
      $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW);
    };
Mark Otto's avatar
dist  
Mark Otto committed
5680

XhmikosR's avatar
Dist    
XhmikosR committed
5681
5682
5683
    _proto.setElementContent = function setElementContent($element, content) {
      if (typeof content === 'object' && (content.nodeType || content.jquery)) {
        // Content is a DOM node or a jQuery
XhmikosR's avatar
XhmikosR committed
5684
        if (this.config.html) {
XhmikosR's avatar
Dist    
XhmikosR committed
5685
5686
          if (!$(content).parent().is($element)) {
            $element.empty().append(content);
Mark Otto's avatar
dist  
Mark Otto committed
5687
5688
          }
        } else {
XhmikosR's avatar
Dist    
XhmikosR committed
5689
          $element.text($(content).text());
Mark Otto's avatar
dist  
Mark Otto committed
5690
        }
XhmikosR's avatar
XhmikosR committed
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700

        return;
      }

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

        $element.html(content);
XhmikosR's avatar
Dist    
XhmikosR committed
5701
      } else {
XhmikosR's avatar
XhmikosR committed
5702
        $element.text(content);
XhmikosR's avatar
Dist    
XhmikosR committed
5703
5704
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
5705

XhmikosR's avatar
Dist    
XhmikosR committed
5706
5707
    _proto.getTitle = function getTitle() {
      var title = this.element.getAttribute('data-original-title');
Mark Otto's avatar
dist  
Mark Otto committed
5708

XhmikosR's avatar
Dist    
XhmikosR committed
5709
5710
5711
      if (!title) {
        title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5712

XhmikosR's avatar
Dist    
XhmikosR committed
5713
      return title;
Mark Otto's avatar
Mark Otto committed
5714
5715
    } // Private
    ;
Mark Otto's avatar
dist  
Mark Otto committed
5716

Mark Otto's avatar
Mark Otto committed
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
    _proto._getOffset = function _getOffset() {
      var _this3 = this;

      var offset = {};

      if (typeof this.config.offset === 'function') {
        offset.fn = function (data) {
          data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
          return data;
        };
      } else {
        offset.offset = this.config.offset;
      }

      return offset;
    };

Mark Otto's avatar
dist    
Mark Otto committed
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
    _proto._getContainer = function _getContainer() {
      if (this.config.container === false) {
        return document.body;
      }

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

      return $(document).find(this.config.container);
    };

XhmikosR's avatar
Dist    
XhmikosR committed
5746
5747
5748
    _proto._getAttachment = function _getAttachment(placement) {
      return AttachmentMap$1[placement.toUpperCase()];
    };
Mark Otto's avatar
dist    
Mark Otto committed
5749

XhmikosR's avatar
Dist    
XhmikosR committed
5750
    _proto._setListeners = function _setListeners() {
Mark Otto's avatar
Mark Otto committed
5751
      var _this4 = this;
Mark Otto's avatar
dist  
Mark Otto committed
5752

XhmikosR's avatar
Dist    
XhmikosR committed
5753
5754
5755
      var triggers = this.config.trigger.split(' ');
      triggers.forEach(function (trigger) {
        if (trigger === 'click') {
Mark Otto's avatar
Mark Otto committed
5756
5757
          $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
            return _this4.toggle(event);
Mark Otto's avatar
dist  
Mark Otto committed
5758
          });
XhmikosR's avatar
Dist    
XhmikosR committed
5759
        } else if (trigger !== Trigger.MANUAL) {
Mark Otto's avatar
Mark Otto committed
5760
5761
5762
5763
5764
5765
          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;
          $(_this4.element).on(eventIn, _this4.config.selector, function (event) {
            return _this4._enter(event);
          }).on(eventOut, _this4.config.selector, function (event) {
            return _this4._leave(event);
Mark Otto's avatar
dist  
Mark Otto committed
5766
5767
          });
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5768
5769
      });
      $(this.element).closest('.modal').on('hide.bs.modal', function () {
Mark Otto's avatar
Mark Otto committed
5770
5771
        if (_this4.element) {
          _this4.hide();
XhmikosR's avatar
Dist    
XhmikosR committed
5772
5773
        }
      });
Mark Otto's avatar
dist  
Mark Otto committed
5774

XhmikosR's avatar
Dist    
XhmikosR committed
5775
5776
5777
5778
5779
5780
5781
5782
5783
      if (this.config.selector) {
        this.config = _objectSpread({}, this.config, {
          trigger: 'manual',
          selector: ''
        });
      } else {
        this._fixTitle();
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
5784

XhmikosR's avatar
Dist    
XhmikosR committed
5785
5786
    _proto._fixTitle = function _fixTitle() {
      var titleType = typeof this.element.getAttribute('data-original-title');
Mark Otto's avatar
dist    
Mark Otto committed
5787

XhmikosR's avatar
Dist    
XhmikosR committed
5788
5789
5790
5791
5792
      if (this.element.getAttribute('title') || titleType !== 'string') {
        this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
        this.element.setAttribute('title', '');
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
5793

XhmikosR's avatar
Dist    
XhmikosR committed
5794
5795
5796
    _proto._enter = function _enter(event, context) {
      var dataKey = this.constructor.DATA_KEY;
      context = context || $(event.currentTarget).data(dataKey);
Mark Otto's avatar
dist  
Mark Otto committed
5797

XhmikosR's avatar
Dist    
XhmikosR committed
5798
5799
5800
5801
      if (!context) {
        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
        $(event.currentTarget).data(dataKey, context);
      }
Mark Otto's avatar
dist  
Mark Otto committed
5802

XhmikosR's avatar
Dist    
XhmikosR committed
5803
5804
5805
      if (event) {
        context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5806

XhmikosR's avatar
Dist    
XhmikosR committed
5807
      if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
Mark Otto's avatar
dist  
Mark Otto committed
5808
        context._hoverState = HoverState.SHOW;
XhmikosR's avatar
Dist    
XhmikosR committed
5809
5810
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5811

XhmikosR's avatar
Dist    
XhmikosR committed
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
      clearTimeout(context._timeout);
      context._hoverState = HoverState.SHOW;

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

      context._timeout = setTimeout(function () {
        if (context._hoverState === HoverState.SHOW) {
Mark Otto's avatar
dist  
Mark Otto committed
5822
5823
          context.show();
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5824
5825
      }, context.config.delay.show);
    };
Mark Otto's avatar
dist  
Mark Otto committed
5826

XhmikosR's avatar
Dist    
XhmikosR committed
5827
5828
5829
    _proto._leave = function _leave(event, context) {
      var dataKey = this.constructor.DATA_KEY;
      context = context || $(event.currentTarget).data(dataKey);
Mark Otto's avatar
dist  
Mark Otto committed
5830

XhmikosR's avatar
Dist    
XhmikosR committed
5831
5832
5833
5834
      if (!context) {
        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
        $(event.currentTarget).data(dataKey, context);
      }
Mark Otto's avatar
dist  
Mark Otto committed
5835

XhmikosR's avatar
Dist    
XhmikosR committed
5836
5837
5838
      if (event) {
        context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5839

XhmikosR's avatar
Dist    
XhmikosR committed
5840
5841
5842
      if (context._isWithActiveTrigger()) {
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5843

XhmikosR's avatar
Dist    
XhmikosR committed
5844
5845
      clearTimeout(context._timeout);
      context._hoverState = HoverState.OUT;
Mark Otto's avatar
dist  
Mark Otto committed
5846

XhmikosR's avatar
Dist    
XhmikosR committed
5847
5848
5849
5850
      if (!context.config.delay || !context.config.delay.hide) {
        context.hide();
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
5851

XhmikosR's avatar
Dist    
XhmikosR committed
5852
5853
      context._timeout = setTimeout(function () {
        if (context._hoverState === HoverState.OUT) {
Mark Otto's avatar
dist  
Mark Otto committed
5854
5855
          context.hide();
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5856
5857
      }, context.config.delay.hide);
    };
Mark Otto's avatar
dist  
Mark Otto committed
5858

XhmikosR's avatar
Dist    
XhmikosR committed
5859
5860
5861
5862
    _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
      for (var trigger in this._activeTrigger) {
        if (this._activeTrigger[trigger]) {
          return true;
Mark Otto's avatar
dist  
Mark Otto committed
5863
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5864
      }
Mark Otto's avatar
dist  
Mark Otto committed
5865

XhmikosR's avatar
Dist    
XhmikosR committed
5866
5867
      return false;
    };
Mark Otto's avatar
dist  
Mark Otto committed
5868

XhmikosR's avatar
Dist    
XhmikosR committed
5869
    _proto._getConfig = function _getConfig(config) {
XhmikosR's avatar
XhmikosR committed
5870
5871
5872
5873
5874
5875
5876
      var dataAttributes = $(this.element).data();
      Object.keys(dataAttributes).forEach(function (dataAttr) {
        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
          delete dataAttributes[dataAttr];
        }
      });
      config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
Mark Otto's avatar
dist  
Mark Otto committed
5877

XhmikosR's avatar
Dist    
XhmikosR committed
5878
5879
5880
5881
5882
5883
      if (typeof config.delay === 'number') {
        config.delay = {
          show: config.delay,
          hide: config.delay
        };
      }
Mark Otto's avatar
dist  
Mark Otto committed
5884

XhmikosR's avatar
Dist    
XhmikosR committed
5885
5886
5887
      if (typeof config.title === 'number') {
        config.title = config.title.toString();
      }
Mark Otto's avatar
dist  
Mark Otto committed
5888

XhmikosR's avatar
Dist    
XhmikosR committed
5889
5890
5891
      if (typeof config.content === 'number') {
        config.content = config.content.toString();
      }
Mark Otto's avatar
dist  
Mark Otto committed
5892

XhmikosR's avatar
Dist    
XhmikosR committed
5893
      Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
XhmikosR's avatar
XhmikosR committed
5894
5895
5896
5897
5898

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

XhmikosR's avatar
Dist    
XhmikosR committed
5899
5900
      return config;
    };
Mark Otto's avatar
dist  
Mark Otto committed
5901

XhmikosR's avatar
Dist    
XhmikosR committed
5902
5903
    _proto._getDelegateConfig = function _getDelegateConfig() {
      var config = {};
Mark Otto's avatar
dist  
Mark Otto committed
5904

XhmikosR's avatar
Dist    
XhmikosR committed
5905
5906
5907
5908
      if (this.config) {
        for (var key in this.config) {
          if (this.constructor.Default[key] !== this.config[key]) {
            config[key] = this.config[key];
Mark Otto's avatar
dist  
Mark Otto committed
5909
5910
          }
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5911
      }
Mark Otto's avatar
dist  
Mark Otto committed
5912

XhmikosR's avatar
Dist    
XhmikosR committed
5913
5914
      return config;
    };
Mark Otto's avatar
dist    
Mark Otto committed
5915

XhmikosR's avatar
Dist    
XhmikosR committed
5916
5917
5918
    _proto._cleanTipClass = function _cleanTipClass() {
      var $tip = $(this.getTipElement());
      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
Mark Otto's avatar
dist  
Mark Otto committed
5919

XhmikosR's avatar
Dist    
XhmikosR committed
5920
5921
5922
5923
      if (tabClass !== null && tabClass.length) {
        $tip.removeClass(tabClass.join(''));
      }
    };
Mark Otto's avatar
dist    
Mark Otto committed
5924

XhmikosR's avatar
Dist    
XhmikosR committed
5925
5926
5927
    _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
      var popperInstance = popperData.instance;
      this.tip = popperInstance.popper;
Mark Otto's avatar
dist    
Mark Otto committed
5928

XhmikosR's avatar
Dist    
XhmikosR committed
5929
      this._cleanTipClass();
Mark Otto's avatar
dist  
Mark Otto committed
5930

XhmikosR's avatar
Dist    
XhmikosR committed
5931
5932
      this.addAttachmentClass(this._getAttachment(popperData.placement));
    };
Mark Otto's avatar
dist    
Mark Otto committed
5933

XhmikosR's avatar
Dist    
XhmikosR committed
5934
5935
5936
    _proto._fixTransition = function _fixTransition() {
      var tip = this.getTipElement();
      var initConfigAnimation = this.config.animation;
Mark Otto's avatar
dist    
Mark Otto committed
5937

XhmikosR's avatar
Dist    
XhmikosR committed
5938
5939
5940
      if (tip.getAttribute('x-placement') !== null) {
        return;
      }
Mark Otto's avatar
dist    
Mark Otto committed
5941

XhmikosR's avatar
Dist    
XhmikosR committed
5942
5943
5944
5945
5946
      $(tip).removeClass(ClassName$6.FADE);
      this.config.animation = false;
      this.hide();
      this.show();
      this.config.animation = initConfigAnimation;
Mark Otto's avatar
Mark Otto committed
5947
5948
    } // Static
    ;
Mark Otto's avatar
dist  
Mark Otto committed
5949

XhmikosR's avatar
Dist    
XhmikosR committed
5950
5951
5952
    Tooltip._jQueryInterface = function _jQueryInterface(config) {
      return this.each(function () {
        var data = $(this).data(DATA_KEY$6);
Mark Otto's avatar
dist    
Mark Otto committed
5953

XhmikosR's avatar
Dist    
XhmikosR committed
5954
        var _config = typeof config === 'object' && config;
Mark Otto's avatar
dist  
Mark Otto committed
5955

XhmikosR's avatar
Dist    
XhmikosR committed
5956
5957
5958
        if (!data && /dispose|hide/.test(config)) {
          return;
        }
Mark Otto's avatar
dist  
Mark Otto committed
5959

XhmikosR's avatar
Dist    
XhmikosR committed
5960
5961
5962
5963
        if (!data) {
          data = new Tooltip(this, _config);
          $(this).data(DATA_KEY$6, data);
        }
Mark Otto's avatar
dist  
Mark Otto committed
5964

XhmikosR's avatar
Dist    
XhmikosR committed
5965
5966
5967
        if (typeof config === 'string') {
          if (typeof data[config] === 'undefined') {
            throw new TypeError("No method named \"" + config + "\"");
Mark Otto's avatar
dist  
Mark Otto committed
5968
          }
Mark Otto's avatar
dist    
Mark Otto committed
5969

XhmikosR's avatar
Dist    
XhmikosR committed
5970
          data[config]();
Mark Otto's avatar
dist    
Mark Otto committed
5971
        }
XhmikosR's avatar
Dist    
XhmikosR committed
5972
5973
      });
    };
Mark Otto's avatar
dist  
Mark Otto committed
5974

XhmikosR's avatar
Dist    
XhmikosR committed
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
    _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$6;
      }
    }, {
For faster browsing, not all history is shown. View entire blame