bootstrap.bundle.js 243 KB
Newer Older
Mark Otto's avatar
dist  
Mark Otto committed
6001

6002
6003
  /* istanbul ignore if */

XhmikosR's avatar
XhmikosR committed
6004
6005
6006
6007
  if ($$6) {
    var JQUERY_NO_CONFLICT$5 = $$6.fn[NAME$5];
    $$6.fn[NAME$5] = Modal.jQueryInterface;
    $$6.fn[NAME$5].Constructor = Modal;
Mark Otto's avatar
dist  
Mark Otto committed
6008

XhmikosR's avatar
XhmikosR committed
6009
6010
6011
    $$6.fn[NAME$5].noConflict = function () {
      $$6.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
      return Modal.jQueryInterface;
XhmikosR's avatar
XhmikosR committed
6012
6013
    };
  }
Mark Otto's avatar
dist  
Mark Otto committed
6014

XhmikosR's avatar
XhmikosR committed
6015
6016
  /**
   * --------------------------------------------------------------------------
XhmikosR's avatar
XhmikosR committed
6017
   * Bootstrap (v4.3.1): util/sanitizer.js
XhmikosR's avatar
XhmikosR committed
6018
6019
6020
6021
6022
   * 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;
XhmikosR's avatar
XhmikosR committed
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
  /**
   * 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;

  var allowedAttribute = 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;
  };

XhmikosR's avatar
XhmikosR committed
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
  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: []
  };
  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
XhmikosR's avatar
XhmikosR committed
6096
    if (!unsafeHtml.length) {
XhmikosR's avatar
XhmikosR committed
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
      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);
XhmikosR's avatar
XhmikosR committed
6107
    var elements = makeArray(createdDocument.body.querySelectorAll('*'));
XhmikosR's avatar
XhmikosR committed
6108
6109
6110
6111
6112

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

XhmikosR's avatar
XhmikosR committed
6113
      if (whitelistKeys.indexOf(elName) === -1) {
XhmikosR's avatar
XhmikosR committed
6114
6115
6116
6117
        el.parentNode.removeChild(el);
        return "continue";
      }

XhmikosR's avatar
XhmikosR committed
6118
      var attributeList = makeArray(el.attributes);
XhmikosR's avatar
XhmikosR committed
6119
6120
6121
6122
6123
6124
6125
6126
6127
      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++) {
6128
      var _ret = _loop(i);
XhmikosR's avatar
XhmikosR committed
6129
6130
6131
6132
6133
6134
6135

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

    return createdDocument.body.innerHTML;
  }

XhmikosR's avatar
Dist    
XhmikosR committed
6136
6137
6138
6139
6140
6141
6142
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  var NAME$6 = 'tooltip';
XhmikosR's avatar
XhmikosR committed
6143
  var VERSION$6 = '4.3.1';
XhmikosR's avatar
Dist    
XhmikosR committed
6144
6145
6146
6147
  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');
XhmikosR's avatar
XhmikosR committed
6148
  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
XhmikosR's avatar
Dist    
XhmikosR committed
6149
6150
6151
6152
6153
6154
6155
6156
6157
  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
6158
    offset: '(number|string|function)',
XhmikosR's avatar
Dist    
XhmikosR committed
6159
6160
    container: '(string|element|boolean)',
    fallbackPlacement: '(string|array)',
XhmikosR's avatar
XhmikosR committed
6161
6162
6163
    boundary: '(string|element)',
    sanitize: 'boolean',
    sanitizeFn: '(null|function)',
XhmikosR's avatar
XhmikosR committed
6164
6165
    whiteList: 'object',
    popperConfig: '(null|object)'
XhmikosR's avatar
Dist    
XhmikosR committed
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
  };
  var AttachmentMap$1 = {
    AUTO: 'auto',
    TOP: 'top',
    RIGHT: 'right',
    BOTTOM: 'bottom',
    LEFT: 'left'
  };
  var Default$4 = {
    animation: true,
XhmikosR's avatar
XhmikosR committed
6176
    template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
XhmikosR's avatar
Dist    
XhmikosR committed
6177
6178
6179
6180
6181
6182
6183
6184
6185
    trigger: 'hover focus',
    title: '',
    delay: 0,
    html: false,
    selector: false,
    placement: 'top',
    offset: 0,
    container: false,
    fallbackPlacement: 'flip',
XhmikosR's avatar
XhmikosR committed
6186
6187
6188
    boundary: 'scrollParent',
    sanitize: true,
    sanitizeFn: null,
XhmikosR's avatar
XhmikosR committed
6189
6190
    whiteList: DefaultWhitelist,
    popperConfig: null
XhmikosR's avatar
Dist    
XhmikosR committed
6191
6192
6193
6194
6195
  };
  var HoverState = {
    SHOW: 'show',
    OUT: 'out'
  };
XhmikosR's avatar
XhmikosR committed
6196
  var Event$7 = {
XhmikosR's avatar
Dist    
XhmikosR committed
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
    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 = {
Mark Otto's avatar
dist v5    
Mark Otto committed
6213
    TOOLTIP_INNER: '.tooltip-inner'
XhmikosR's avatar
Dist    
XhmikosR committed
6214
6215
6216
6217
6218
6219
6220
  };
  var Trigger = {
    HOVER: 'hover',
    FOCUS: 'focus',
    CLICK: 'click',
    MANUAL: 'manual'
  };
XhmikosR's avatar
XhmikosR committed
6221
6222
6223
6224
6225
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */
XhmikosR's avatar
Dist    
XhmikosR committed
6226
6227
6228
6229
6230
6231

  var Tooltip =
  /*#__PURE__*/
  function () {
    function Tooltip(element, config) {
      if (typeof Popper === 'undefined') {
XhmikosR's avatar
XhmikosR committed
6232
        throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
XhmikosR's avatar
Dist    
XhmikosR committed
6233
      } // private
Mark Otto's avatar
dist    
Mark Otto committed
6234
6235


XhmikosR's avatar
Dist    
XhmikosR committed
6236
6237
6238
6239
6240
      this._isEnabled = true;
      this._timeout = 0;
      this._hoverState = '';
      this._activeTrigger = {};
      this._popper = null; // Protected
Mark Otto's avatar
dist  
Mark Otto committed
6241

XhmikosR's avatar
Dist    
XhmikosR committed
6242
6243
6244
      this.element = element;
      this.config = this._getConfig(config);
      this.tip = null;
Mark Otto's avatar
dist  
Mark Otto committed
6245

XhmikosR's avatar
Dist    
XhmikosR committed
6246
      this._setListeners();
XhmikosR's avatar
XhmikosR committed
6247
6248

      Data.setData(element, this.constructor.DATA_KEY, this);
XhmikosR's avatar
Dist    
XhmikosR committed
6249
    } // Getters
Mark Otto's avatar
dist  
Mark Otto committed
6250
6251


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

XhmikosR's avatar
Dist    
XhmikosR committed
6254
6255
6256
6257
    // Public
    _proto.enable = function enable() {
      this._isEnabled = true;
    };
Mark Otto's avatar
dist  
Mark Otto committed
6258

XhmikosR's avatar
Dist    
XhmikosR committed
6259
6260
6261
    _proto.disable = function disable() {
      this._isEnabled = false;
    };
Mark Otto's avatar
dist  
Mark Otto committed
6262

XhmikosR's avatar
Dist    
XhmikosR committed
6263
6264
6265
    _proto.toggleEnabled = function toggleEnabled() {
      this._isEnabled = !this._isEnabled;
    };
Mark Otto's avatar
dist  
Mark Otto committed
6266

XhmikosR's avatar
Dist    
XhmikosR committed
6267
6268
6269
6270
    _proto.toggle = function toggle(event) {
      if (!this._isEnabled) {
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
6271

XhmikosR's avatar
Dist    
XhmikosR committed
6272
6273
      if (event) {
        var dataKey = this.constructor.DATA_KEY;
XhmikosR's avatar
XhmikosR committed
6274
        var context = Data.getData(event.delegateTarget, dataKey);
Mark Otto's avatar
dist  
Mark Otto committed
6275

XhmikosR's avatar
Dist    
XhmikosR committed
6276
        if (!context) {
XhmikosR's avatar
XhmikosR committed
6277
6278
          context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
          Data.setData(event.delegateTarget, dataKey, context);
Mark Otto's avatar
dist  
Mark Otto committed
6279
6280
        }

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

XhmikosR's avatar
Dist    
XhmikosR committed
6283
6284
        if (context._isWithActiveTrigger()) {
          context._enter(null, context);
Mark Otto's avatar
dist  
Mark Otto committed
6285
        } else {
XhmikosR's avatar
Dist    
XhmikosR committed
6286
6287
6288
          context._leave(null, context);
        }
      } else {
XhmikosR's avatar
XhmikosR committed
6289
        if (this.getTipElement().classList.contains(ClassName$6.SHOW)) {
XhmikosR's avatar
Dist    
XhmikosR committed
6290
          this._leave(null, this);
Mark Otto's avatar
dist  
Mark Otto committed
6291

XhmikosR's avatar
Dist    
XhmikosR committed
6292
          return;
Mark Otto's avatar
dist    
Mark Otto committed
6293
        }
Mark Otto's avatar
dist  
Mark Otto committed
6294

XhmikosR's avatar
Dist    
XhmikosR committed
6295
6296
6297
        this._enter(null, this);
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
6298

XhmikosR's avatar
Dist    
XhmikosR committed
6299
6300
    _proto.dispose = function dispose() {
      clearTimeout(this._timeout);
XhmikosR's avatar
XhmikosR committed
6301
6302
      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
6303
      EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler);
Mark Otto's avatar
dist  
Mark Otto committed
6304

XhmikosR's avatar
Dist    
XhmikosR committed
6305
      if (this.tip) {
XhmikosR's avatar
XhmikosR committed
6306
        this.tip.parentNode.removeChild(this.tip);
XhmikosR's avatar
Dist    
XhmikosR committed
6307
      }
Mark Otto's avatar
dist    
Mark Otto committed
6308

XhmikosR's avatar
Dist    
XhmikosR committed
6309
6310
6311
6312
      this._isEnabled = null;
      this._timeout = null;
      this._hoverState = null;
      this._activeTrigger = null;
Mark Otto's avatar
dist  
Mark Otto committed
6313

XhmikosR's avatar
XhmikosR committed
6314
      if (this._popper) {
XhmikosR's avatar
Dist    
XhmikosR committed
6315
6316
        this._popper.destroy();
      }
Mark Otto's avatar
dist  
Mark Otto committed
6317

XhmikosR's avatar
Dist    
XhmikosR committed
6318
6319
6320
6321
6322
      this._popper = null;
      this.element = null;
      this.config = null;
      this.tip = null;
    };
Mark Otto's avatar
dist  
Mark Otto committed
6323

XhmikosR's avatar
Dist    
XhmikosR committed
6324
6325
    _proto.show = function show() {
      var _this = this;
Mark Otto's avatar
dist  
Mark Otto committed
6326

XhmikosR's avatar
XhmikosR committed
6327
      if (this.element.style.display === 'none') {
XhmikosR's avatar
Dist    
XhmikosR committed
6328
6329
        throw new Error('Please use show on visible elements');
      }
Mark Otto's avatar
dist    
Mark Otto committed
6330

XhmikosR's avatar
Dist    
XhmikosR committed
6331
      if (this.isWithContent() && this._isEnabled) {
XhmikosR's avatar
XhmikosR committed
6332
6333
        var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
        var shadowRoot = findShadowRoot(this.element);
XhmikosR's avatar
Dist.    
XhmikosR committed
6334
        var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
Mark Otto's avatar
dist  
Mark Otto committed
6335

XhmikosR's avatar
XhmikosR committed
6336
        if (showEvent.defaultPrevented || !isInTheDom) {
XhmikosR's avatar
Dist    
XhmikosR committed
6337
6338
          return;
        }
Mark Otto's avatar
dist  
Mark Otto committed
6339

XhmikosR's avatar
Dist    
XhmikosR committed
6340
        var tip = this.getTipElement();
XhmikosR's avatar
XhmikosR committed
6341
        var tipId = getUID(this.constructor.NAME);
XhmikosR's avatar
Dist    
XhmikosR committed
6342
6343
6344
        tip.setAttribute('id', tipId);
        this.element.setAttribute('aria-describedby', tipId);
        this.setContent();
Mark Otto's avatar
dist  
Mark Otto committed
6345

XhmikosR's avatar
Dist    
XhmikosR committed
6346
        if (this.config.animation) {
XhmikosR's avatar
XhmikosR committed
6347
          tip.classList.add(ClassName$6.FADE);
XhmikosR's avatar
Dist    
XhmikosR committed
6348
        }
Mark Otto's avatar
dist  
Mark Otto committed
6349

XhmikosR's avatar
Dist    
XhmikosR committed
6350
        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
6351

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

6354
        this._addAttachmentClass(attachment);
Mark Otto's avatar
dist    
Mark Otto committed
6355
6356
6357

        var container = this._getContainer();

XhmikosR's avatar
XhmikosR committed
6358
        Data.setData(tip, this.constructor.DATA_KEY, this);
Mark Otto's avatar
dist  
Mark Otto committed
6359

XhmikosR's avatar
XhmikosR committed
6360
6361
        if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
          container.appendChild(tip);
XhmikosR's avatar
Dist    
XhmikosR committed
6362
6363
        }

XhmikosR's avatar
XhmikosR committed
6364
        EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
XhmikosR's avatar
XhmikosR committed
6365
        this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
XhmikosR's avatar
XhmikosR committed
6366
        tip.classList.add(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
XhmikosR's avatar
Dist    
XhmikosR committed
6367
6368
6369
        // 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
6370

XhmikosR's avatar
Dist    
XhmikosR committed
6371
        if ('ontouchstart' in document.documentElement) {
XhmikosR's avatar
XhmikosR committed
6372
6373
6374
          makeArray(document.body.children).forEach(function (element) {
            EventHandler.on(element, 'mouseover', noop());
          });
XhmikosR's avatar
Dist    
XhmikosR committed
6375
        }
Mark Otto's avatar
dist  
Mark Otto committed
6376

XhmikosR's avatar
Dist    
XhmikosR committed
6377
6378
6379
6380
        var complete = function complete() {
          if (_this.config.animation) {
            _this._fixTransition();
          }
Mark Otto's avatar
dist    
Mark Otto committed
6381

XhmikosR's avatar
Dist    
XhmikosR committed
6382
6383
          var prevHoverState = _this._hoverState;
          _this._hoverState = null;
XhmikosR's avatar
XhmikosR committed
6384
          EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
Mark Otto's avatar
dist  
Mark Otto committed
6385

XhmikosR's avatar
Dist    
XhmikosR committed
6386
6387
          if (prevHoverState === HoverState.OUT) {
            _this._leave(null, _this);
Mark Otto's avatar
dist  
Mark Otto committed
6388
          }
XhmikosR's avatar
Dist    
XhmikosR committed
6389
6390
        };

XhmikosR's avatar
XhmikosR committed
6391
6392
6393
6394
        if (this.tip.classList.contains(ClassName$6.FADE)) {
          var transitionDuration = getTransitionDurationFromElement(this.tip);
          EventHandler.one(this.tip, TRANSITION_END, complete);
          emulateTransitionEnd(this.tip, transitionDuration);
XhmikosR's avatar
Dist    
XhmikosR committed
6395
6396
        } else {
          complete();
Mark Otto's avatar
dist  
Mark Otto committed
6397
        }
XhmikosR's avatar
Dist    
XhmikosR committed
6398
6399
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
6400

6401
    _proto.hide = function hide() {
XhmikosR's avatar
Dist    
XhmikosR committed
6402
      var _this2 = this;
Mark Otto's avatar
dist  
Mark Otto committed
6403

XhmikosR's avatar
Dist    
XhmikosR committed
6404
      var tip = this.getTipElement();
Mark Otto's avatar
dist    
Mark Otto committed
6405

XhmikosR's avatar
Dist    
XhmikosR committed
6406
6407
6408
6409
      var complete = function complete() {
        if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
          tip.parentNode.removeChild(tip);
        }
Mark Otto's avatar
dist  
Mark Otto committed
6410

XhmikosR's avatar
Dist    
XhmikosR committed
6411
        _this2._cleanTipClass();
Mark Otto's avatar
dist    
Mark Otto committed
6412

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

XhmikosR's avatar
XhmikosR committed
6415
        EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
Mark Otto's avatar
dist    
Mark Otto committed
6416

6417
        _this2._popper.destroy();
XhmikosR's avatar
Dist    
XhmikosR committed
6418
      };
Mark Otto's avatar
dist  
Mark Otto committed
6419

XhmikosR's avatar
XhmikosR committed
6420
      var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
Mark Otto's avatar
dist  
Mark Otto committed
6421

XhmikosR's avatar
XhmikosR committed
6422
      if (hideEvent.defaultPrevented) {
XhmikosR's avatar
Dist    
XhmikosR committed
6423
6424
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
6425

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

XhmikosR's avatar
Dist    
XhmikosR committed
6429
      if ('ontouchstart' in document.documentElement) {
XhmikosR's avatar
XhmikosR committed
6430
6431
6432
        makeArray(document.body.children).forEach(function (element) {
          return EventHandler.off(element, 'mouseover', noop);
        });
XhmikosR's avatar
Dist    
XhmikosR committed
6433
      }
Mark Otto's avatar
dist  
Mark Otto committed
6434

XhmikosR's avatar
Dist    
XhmikosR committed
6435
6436
6437
      this._activeTrigger[Trigger.CLICK] = false;
      this._activeTrigger[Trigger.FOCUS] = false;
      this._activeTrigger[Trigger.HOVER] = false;
Mark Otto's avatar
dist  
Mark Otto committed
6438

XhmikosR's avatar
XhmikosR committed
6439
6440
6441
6442
      if (this.tip.classList.contains(ClassName$6.FADE)) {
        var transitionDuration = getTransitionDurationFromElement(tip);
        EventHandler.one(tip, TRANSITION_END, complete);
        emulateTransitionEnd(tip, transitionDuration);
XhmikosR's avatar
Dist    
XhmikosR committed
6443
6444
6445
      } else {
        complete();
      }
Mark Otto's avatar
dist  
Mark Otto committed
6446

XhmikosR's avatar
Dist    
XhmikosR committed
6447
6448
      this._hoverState = '';
    };
Mark Otto's avatar
dist  
Mark Otto committed
6449

XhmikosR's avatar
Dist    
XhmikosR committed
6450
6451
6452
6453
    _proto.update = function update() {
      if (this._popper !== null) {
        this._popper.scheduleUpdate();
      }
Mark Otto's avatar
Mark Otto committed
6454
6455
    } // Protected
    ;
Mark Otto's avatar
dist  
Mark Otto committed
6456

XhmikosR's avatar
Dist    
XhmikosR committed
6457
6458
6459
    _proto.isWithContent = function isWithContent() {
      return Boolean(this.getTitle());
    };
Mark Otto's avatar
dist  
Mark Otto committed
6460

XhmikosR's avatar
Dist    
XhmikosR committed
6461
    _proto.getTipElement = function getTipElement() {
XhmikosR's avatar
XhmikosR committed
6462
6463
6464
6465
6466
6467
6468
      if (this.tip) {
        return this.tip;
      }

      var element = document.createElement('div');
      element.innerHTML = this.config.template;
      this.tip = element.children[0];
XhmikosR's avatar
Dist    
XhmikosR committed
6469
6470
      return this.tip;
    };
Mark Otto's avatar
dist  
Mark Otto committed
6471

XhmikosR's avatar
Dist    
XhmikosR committed
6472
6473
    _proto.setContent = function setContent() {
      var tip = this.getTipElement();
XhmikosR's avatar
XhmikosR committed
6474
6475
6476
      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
Dist    
XhmikosR committed
6477
    };
Mark Otto's avatar
dist  
Mark Otto committed
6478

XhmikosR's avatar
XhmikosR committed
6479
6480
6481
6482
6483
    _proto.setElementContent = function setElementContent(element, content) {
      if (element === null) {
        return;
      }

6484
      if (typeof content === 'object' && isElement(content)) {
XhmikosR's avatar
XhmikosR committed
6485
6486
6487
6488
6489
        if (content.jquery) {
          content = content[0];
        } // content is a DOM node or a jQuery


XhmikosR's avatar
XhmikosR committed
6490
        if (this.config.html) {
XhmikosR's avatar
XhmikosR committed
6491
6492
6493
          if (content.parentNode !== element) {
            element.innerHTML = '';
            element.appendChild(content);
Mark Otto's avatar
dist  
Mark Otto committed
6494
6495
          }
        } else {
XhmikosR's avatar
XhmikosR committed
6496
          element.innerText = content.textContent;
Mark Otto's avatar
dist  
Mark Otto committed
6497
        }
XhmikosR's avatar
XhmikosR committed
6498
6499
6500
6501
6502
6503
6504
6505
6506

        return;
      }

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

XhmikosR's avatar
XhmikosR committed
6507
        element.innerHTML = content;
XhmikosR's avatar
Dist    
XhmikosR committed
6508
      } else {
XhmikosR's avatar
XhmikosR committed
6509
        element.innerText = content;
XhmikosR's avatar
Dist    
XhmikosR committed
6510
6511
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
6512

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

XhmikosR's avatar
Dist    
XhmikosR committed
6516
6517
6518
      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
6519

XhmikosR's avatar
Dist    
XhmikosR committed
6520
      return title;
Mark Otto's avatar
Mark Otto committed
6521
6522
    } // Private
    ;
Mark Otto's avatar
dist  
Mark Otto committed
6523

XhmikosR's avatar
XhmikosR committed
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
    _proto._getPopperConfig = function _getPopperConfig(attachment) {
      var _this3 = this;

      var defaultBsConfig = {
        placement: attachment,
        modifiers: {
          offset: this._getOffset(),
          flip: {
            behavior: this.config.fallbackPlacement
          },
          arrow: {
            element: "." + this.constructor.NAME + "-arrow"
          },
          preventOverflow: {
            boundariesElement: this.config.boundary
          }
        },
        onCreate: function onCreate(data) {
          if (data.originalPlacement !== data.placement) {
            _this3._handlePopperPlacementChange(data);
          }
        },
        onUpdate: function onUpdate(data) {
          return _this3._handlePopperPlacementChange(data);
        }
      };
      return _objectSpread2({}, defaultBsConfig, {}, this.config.popperConfig);
    };

6553
6554
6555
6556
    _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
      this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
    };

Mark Otto's avatar
Mark Otto committed
6557
    _proto._getOffset = function _getOffset() {
XhmikosR's avatar
XhmikosR committed
6558
      var _this4 = this;
Mark Otto's avatar
Mark Otto committed
6559
6560
6561
6562
6563

      var offset = {};

      if (typeof this.config.offset === 'function') {
        offset.fn = function (data) {
XhmikosR's avatar
XhmikosR committed
6564
          data.offsets = _objectSpread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {});
Mark Otto's avatar
Mark Otto committed
6565
6566
6567
6568
6569
6570
6571
6572
6573
          return data;
        };
      } else {
        offset.offset = this.config.offset;
      }

      return offset;
    };

Mark Otto's avatar
dist    
Mark Otto committed
6574
6575
6576
6577
6578
    _proto._getContainer = function _getContainer() {
      if (this.config.container === false) {
        return document.body;
      }

XhmikosR's avatar
XhmikosR committed
6579
6580
      if (isElement(this.config.container)) {
        return this.config.container;
Mark Otto's avatar
dist    
Mark Otto committed
6581
6582
      }

XhmikosR's avatar
XhmikosR committed
6583
      return SelectorEngine.findOne(this.config.container);
Mark Otto's avatar
dist    
Mark Otto committed
6584
6585
    };

XhmikosR's avatar
Dist    
XhmikosR committed
6586
6587
6588
    _proto._getAttachment = function _getAttachment(placement) {
      return AttachmentMap$1[placement.toUpperCase()];
    };
Mark Otto's avatar
dist    
Mark Otto committed
6589

XhmikosR's avatar
Dist    
XhmikosR committed
6590
    _proto._setListeners = function _setListeners() {
XhmikosR's avatar
XhmikosR committed
6591
      var _this5 = this;
Mark Otto's avatar
dist  
Mark Otto committed
6592

XhmikosR's avatar
Dist    
XhmikosR committed
6593
6594
6595
      var triggers = this.config.trigger.split(' ');
      triggers.forEach(function (trigger) {
        if (trigger === 'click') {
XhmikosR's avatar
XhmikosR committed
6596
6597
          EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
            return _this5.toggle(event);
Mark Otto's avatar
dist  
Mark Otto committed
6598
          });
XhmikosR's avatar
Dist    
XhmikosR committed
6599
        } else if (trigger !== Trigger.MANUAL) {
XhmikosR's avatar
XhmikosR committed
6600
6601
6602
6603
          var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
          var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
          EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
            return _this5._enter(event);
XhmikosR's avatar
XhmikosR committed
6604
          });
XhmikosR's avatar
XhmikosR committed
6605
6606
          EventHandler.on(_this5.element, eventOut, _this5.config.selector, function (event) {
            return _this5._leave(event);
Mark Otto's avatar
dist  
Mark Otto committed
6607
6608
          });
        }
XhmikosR's avatar
Dist    
XhmikosR committed
6609
      });
Mark Otto's avatar
dist v5    
Mark Otto committed
6610
6611

      this._hideModalHandler = function () {
XhmikosR's avatar
XhmikosR committed
6612
6613
        if (_this5.element) {
          _this5.hide();
XhmikosR's avatar
Dist    
XhmikosR committed
6614
        }
Mark Otto's avatar
dist v5    
Mark Otto committed
6615
6616
6617
      };

      EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler);
Mark Otto's avatar
dist  
Mark Otto committed
6618

XhmikosR's avatar
Dist    
XhmikosR committed
6619
      if (this.config.selector) {
6620
        this.config = _objectSpread2({}, this.config, {
XhmikosR's avatar
Dist    
XhmikosR committed
6621
6622
6623
6624
6625
6626
6627
          trigger: 'manual',
          selector: ''
        });
      } else {
        this._fixTitle();
      }
    };
Mark Otto's avatar
dist  
Mark Otto committed
6628

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

XhmikosR's avatar
Dist    
XhmikosR committed
6632
6633
6634
6635
6636
      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
6637

XhmikosR's avatar
Dist    
XhmikosR committed
6638
6639
    _proto._enter = function _enter(event, context) {
      var dataKey = this.constructor.DATA_KEY;
XhmikosR's avatar
XhmikosR committed
6640
      context = context || Data.getData(event.delegateTarget, dataKey);
Mark Otto's avatar
dist  
Mark Otto committed
6641

XhmikosR's avatar
Dist    
XhmikosR committed
6642
      if (!context) {
XhmikosR's avatar
XhmikosR committed
6643
6644
        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
        Data.setData(event.delegateTarget, dataKey, context);
XhmikosR's avatar
Dist    
XhmikosR committed
6645
      }
Mark Otto's avatar
dist  
Mark Otto committed
6646

XhmikosR's avatar
Dist    
XhmikosR committed
6647
6648
6649
      if (event) {
        context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
      }
Mark Otto's avatar
dist  
Mark Otto committed
6650

XhmikosR's avatar
XhmikosR committed
6651
      if (context.getTipElement().classList.contains(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
Mark Otto's avatar
dist  
Mark Otto committed
6652
        context._hoverState = HoverState.SHOW;
XhmikosR's avatar
Dist    
XhmikosR committed
6653
6654
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
6655

XhmikosR's avatar
Dist    
XhmikosR committed
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
      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
6666
6667
          context.show();
        }
XhmikosR's avatar
Dist    
XhmikosR committed
6668
6669
      }, context.config.delay.show);
    };
Mark Otto's avatar
dist  
Mark Otto committed
6670

XhmikosR's avatar
Dist    
XhmikosR committed
6671
6672
    _proto._leave = function _leave(event, context) {
      var dataKey = this.constructor.DATA_KEY;
XhmikosR's avatar
XhmikosR committed
6673
      context = context || Data.getData(event.delegateTarget, dataKey);
Mark Otto's avatar
dist  
Mark Otto committed
6674

XhmikosR's avatar
Dist    
XhmikosR committed
6675
      if (!context) {
XhmikosR's avatar
XhmikosR committed
6676
6677
        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
        Data.setData(event.delegateTarget, dataKey, context);
XhmikosR's avatar
Dist    
XhmikosR committed
6678
      }
Mark Otto's avatar
dist  
Mark Otto committed
6679

XhmikosR's avatar
Dist    
XhmikosR committed
6680
6681
6682
      if (event) {
        context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
      }
Mark Otto's avatar
dist  
Mark Otto committed
6683

XhmikosR's avatar
Dist    
XhmikosR committed
6684
6685
6686
      if (context._isWithActiveTrigger()) {
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
6687

XhmikosR's avatar
Dist    
XhmikosR committed
6688
6689
      clearTimeout(context._timeout);
      context._hoverState = HoverState.OUT;
Mark Otto's avatar
dist  
Mark Otto committed
6690

XhmikosR's avatar
Dist    
XhmikosR committed
6691
6692
6693
6694
      if (!context.config.delay || !context.config.delay.hide) {
        context.hide();
        return;
      }
Mark Otto's avatar
dist  
Mark Otto committed
6695

XhmikosR's avatar
Dist    
XhmikosR committed
6696
6697
      context._timeout = setTimeout(function () {
        if (context._hoverState === HoverState.OUT) {
Mark Otto's avatar
dist  
Mark Otto committed
6698
6699
          context.hide();
        }
XhmikosR's avatar
Dist    
XhmikosR committed
6700
6701
      }, context.config.delay.hide);
    };
Mark Otto's avatar
dist  
Mark Otto committed
6702

XhmikosR's avatar
Dist    
XhmikosR committed
6703
6704
6705
6706
    _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
      for (var trigger in this._activeTrigger) {
        if (this._activeTrigger[trigger]) {
          return true;
Mark Otto's avatar
dist  
Mark Otto committed
6707
        }
XhmikosR's avatar
Dist    
XhmikosR committed
6708
      }
Mark Otto's avatar
dist  
Mark Otto committed
6709

XhmikosR's avatar
Dist    
XhmikosR committed
6710
6711
      return false;
    };
Mark Otto's avatar
dist  
Mark Otto committed
6712

XhmikosR's avatar
Dist    
XhmikosR committed
6713
    _proto._getConfig = function _getConfig(config) {
XhmikosR's avatar
XhmikosR committed
6714
      var dataAttributes = Manipulator.getDataAttributes(this.element);
XhmikosR's avatar
XhmikosR committed
6715
6716
6717
6718
6719
      Object.keys(dataAttributes).forEach(function (dataAttr) {
        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
          delete dataAttributes[dataAttr];
        }
      });
XhmikosR's avatar
XhmikosR committed
6720
6721
6722
6723
6724

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

6725
      config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {});
Mark Otto's avatar
dist  
Mark Otto committed
6726

XhmikosR's avatar
Dist    
XhmikosR committed
6727
6728
6729
6730
6731
6732
      if (typeof config.delay === 'number') {
        config.delay = {
          show: config.delay,
          hide: config.delay
        };
      }
Mark Otto's avatar
dist  
Mark Otto committed
6733

XhmikosR's avatar
Dist    
XhmikosR committed
6734
6735
6736
      if (typeof config.title === 'number') {
        config.title = config.title.toString();
      }
Mark Otto's avatar
dist  
Mark Otto committed
6737

XhmikosR's avatar
Dist    
XhmikosR committed
6738
6739
6740
      if (typeof config.content === 'number') {
        config.content = config.content.toString();
      }
Mark Otto's avatar
dist  
Mark Otto committed
6741

XhmikosR's avatar
XhmikosR committed
6742
      typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
XhmikosR's avatar
XhmikosR committed
6743
6744
6745
6746
6747

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

XhmikosR's avatar
Dist    
XhmikosR committed
6748
6749
      return config;
    };
Mark Otto's avatar
dist  
Mark Otto committed
6750

XhmikosR's avatar
Dist    
XhmikosR committed
6751
6752
    _proto._getDelegateConfig = function _getDelegateConfig() {
      var config = {};
Mark Otto's avatar
dist  
Mark Otto committed
6753

XhmikosR's avatar
Dist    
XhmikosR committed
6754
6755
6756
6757
      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
6758
6759
          }
        }
XhmikosR's avatar
Dist    
XhmikosR committed
6760
      }
Mark Otto's avatar
dist  
Mark Otto committed
6761

XhmikosR's avatar
Dist    
XhmikosR committed
6762
6763
      return config;
    };
Mark Otto's avatar
dist    
Mark Otto committed
6764

XhmikosR's avatar
Dist    
XhmikosR committed
6765
    _proto._cleanTipClass = function _cleanTipClass() {
XhmikosR's avatar
XhmikosR committed
6766
6767
      var tip = this.getTipElement();
      var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
Mark Otto's avatar
dist  
Mark Otto committed
6768

XhmikosR's avatar
Dist    
XhmikosR committed
6769
      if (tabClass !== null && tabClass.length) {
XhmikosR's avatar
XhmikosR committed
6770
6771
6772
6773
6774
        tabClass.map(function (token) {
          return token.trim();
        }).forEach(function (tClass) {
          return tip.classList.remove(tClass);
        });
XhmikosR's avatar
Dist    
XhmikosR committed
6775
6776
      }
    };
Mark Otto's avatar
dist    
Mark Otto committed
6777

XhmikosR's avatar
Dist    
XhmikosR committed
6778
6779
6780
    _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
      var popperInstance = popperData.instance;
      this.tip = popperInstance.popper;
Mark Otto's avatar
dist    
Mark Otto committed
6781

XhmikosR's avatar
Dist    
XhmikosR committed
6782
      this._cleanTipClass();
Mark Otto's avatar
dist  
Mark Otto committed
6783

6784
      this._addAttachmentClass(this._getAttachment(popperData.placement));
XhmikosR's avatar
Dist    
XhmikosR committed
6785
    };
Mark Otto's avatar
dist    
Mark Otto committed
6786

XhmikosR's avatar
Dist    
XhmikosR committed
6787
6788
6789
    _proto._fixTransition = function _fixTransition() {
      var tip = this.getTipElement();
      var initConfigAnimation = this.config.animation;
Mark Otto's avatar
dist    
Mark Otto committed
6790

XhmikosR's avatar
Dist    
XhmikosR committed
6791
6792
6793
      if (tip.getAttribute('x-placement') !== null) {
        return;
      }
Mark Otto's avatar
dist    
Mark Otto committed
6794

XhmikosR's avatar
XhmikosR committed
6795
      tip.classList.remove(ClassName$6.FADE);
XhmikosR's avatar
Dist    
XhmikosR committed
6796
6797
6798
6799
      this.config.animation = false;
      this.hide();
      this.show();
      this.config.animation = initConfigAnimation;
Mark Otto's avatar
Mark Otto committed
6800
6801
    } // Static
    ;
Mark Otto's avatar
dist  
Mark Otto committed
6802

XhmikosR's avatar
XhmikosR committed
6803
    Tooltip.jQueryInterface = function jQueryInterface(config) {
XhmikosR's avatar
Dist    
XhmikosR committed
6804
      return this.each(function () {
XhmikosR's avatar
XhmikosR committed
6805
        var data = Data.getData(this, DATA_KEY$6);
Mark Otto's avatar
dist    
Mark Otto committed
6806

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

XhmikosR's avatar
Dist    
XhmikosR committed
6809
6810
6811
        if (!data && /dispose|hide/.test(config)) {
          return;
        }
Mark Otto's avatar
dist  
Mark Otto committed
6812

XhmikosR's avatar
Dist    
XhmikosR committed
6813
6814
6815
        if (!data) {
          data = new Tooltip(this, _config);
        }
Mark Otto's avatar
dist  
Mark Otto committed
6816

XhmikosR's avatar
Dist    
XhmikosR committed
6817
6818
6819
        if (typeof config === 'string') {
          if (typeof data[config] === 'undefined') {
            throw new TypeError("No method named \"" + config + "\"");
Mark Otto's avatar
dist  
Mark Otto committed
6820
          }
Mark Otto's avatar
dist    
Mark Otto committed
6821

XhmikosR's avatar
Dist    
XhmikosR committed
6822
          data[config]();
Mark Otto's avatar
dist    
Mark Otto committed
6823
        }
XhmikosR's avatar
Dist    
XhmikosR committed
6824
6825
      });
    };
Mark Otto's avatar
dist  
Mark Otto committed
6826

XhmikosR's avatar
XhmikosR committed
6827
    Tooltip.getInstance = function getInstance(element) {
XhmikosR's avatar
XhmikosR committed
6828
6829
6830
      return Data.getData(element, DATA_KEY$6);
    };

XhmikosR's avatar
Dist    
XhmikosR committed
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
    _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() {
XhmikosR's avatar
XhmikosR committed
6854
        return Event$7;
XhmikosR's avatar
Dist    
XhmikosR committed
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
      }
    }, {
      key: "EVENT_KEY",
      get: function get() {
        return EVENT_KEY$6;
      }
    }, {
      key: "DefaultType",
      get: function get() {
        return DefaultType$4;
      }
    }]);
Mark Otto's avatar
dist    
Mark Otto committed
6867

XhmikosR's avatar
Dist    
XhmikosR committed
6868
6869
    return Tooltip;
  }();
XhmikosR's avatar
XhmikosR committed
6870
6871

  var $$7 = getjQuery();
XhmikosR's avatar
Dist    
XhmikosR committed
6872
6873
6874
6875
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
XhmikosR's avatar
XhmikosR committed
6876
   * add .tooltip to jQuery only if jQuery is present
XhmikosR's avatar
Dist    
XhmikosR committed
6877
   */
Mark Otto's avatar
dist    
Mark Otto committed
6878

6879
6880
  /* istanbul ignore if */

XhmikosR's avatar
XhmikosR committed
6881
6882
6883
6884
  if ($$7) {
    var JQUERY_NO_CONFLICT$6 = $$7.fn[NAME$6];
    $$7.fn[NAME$6] = Tooltip.jQueryInterface;
    $$7.fn[NAME$6].Constructor = Tooltip;
Mark Otto's avatar
dist  
Mark Otto committed
6885

XhmikosR's avatar
XhmikosR committed
6886
6887
6888
    $$7.fn[NAME$6].noConflict = function () {
      $$7.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
      return Tooltip.jQueryInterface;
XhmikosR's avatar
XhmikosR committed
6889
6890
    };
  }
Mark Otto's avatar
dist  
Mark Otto committed
6891

XhmikosR's avatar
Dist    
XhmikosR committed
6892
6893
6894
6895
6896
6897
6898
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  var NAME$7 = 'popover';
XhmikosR's avatar
XhmikosR committed
6899
  var VERSION$7 = '4.3.1';
XhmikosR's avatar
Dist    
XhmikosR committed
6900
6901
6902
6903
6904
  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');

6905
  var Default$5 = _objectSpread2({}, Tooltip.Default, {
XhmikosR's avatar
Dist    
XhmikosR committed
6906
6907
6908
    placement: 'right',
    trigger: 'click',
    content: '',
XhmikosR's avatar
XhmikosR committed
6909
    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
Dist    
XhmikosR committed
6910
6911
  });

6912
  var DefaultType$5 = _objectSpread2({}, Tooltip.DefaultType, {
XhmikosR's avatar
Dist    
XhmikosR committed
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
    content: '(string|element|function)'
  });

  var ClassName$7 = {
    FADE: 'fade',
    SHOW: 'show'
  };
  var Selector$7 = {
    TITLE: '.popover-header',
    CONTENT: '.popover-body'
  };
XhmikosR's avatar
XhmikosR committed
6924
  var Event$8 = {
XhmikosR's avatar
Dist    
XhmikosR committed
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
    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
XhmikosR committed
6936
6937
6938
6939
6940
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */
Mark Otto's avatar
dist  
Mark Otto committed
6941

XhmikosR's avatar
Dist    
XhmikosR committed
6942
6943
6944
6945
  var Popover =
  /*#__PURE__*/
  function (_Tooltip) {
    _inheritsLoose(Popover, _Tooltip);
Mark Otto's avatar
dist  
Mark Otto committed
6946

XhmikosR's avatar
Dist    
XhmikosR committed
6947
6948
6949
    function Popover() {
      return _Tooltip.apply(this, arguments) || this;
    }
Mark Otto's avatar
Mark Otto committed
6950

XhmikosR's avatar
Dist    
XhmikosR committed
6951
    var _proto = Popover.prototype;
Mark Otto's avatar
Mark Otto committed
6952

XhmikosR's avatar
Dist    
XhmikosR committed
6953
6954
6955
6956
    // Overrides
    _proto.isWithContent = function isWithContent() {
      return this.getTitle() || this._getContent();
    };
Mark Otto's avatar
dist    
Mark Otto committed
6957

XhmikosR's avatar
Dist    
XhmikosR committed
6958
    _proto.setContent = function setContent() {
XhmikosR's avatar
XhmikosR committed
6959
      var tip = this.getTipElement(); // we use append for html objects to maintain js events
Mark Otto's avatar
dist  
Mark Otto committed
6960

XhmikosR's avatar
XhmikosR committed
6961
      this.setElementContent(SelectorEngine.findOne(Selector$7.TITLE, tip), this.getTitle());
Mark Otto's avatar
dist  
Mark Otto committed
6962

XhmikosR's avatar
Dist    
XhmikosR committed
6963
      var content = this._getContent();
Mark Otto's avatar
dist    
Mark Otto committed
6964

XhmikosR's avatar
Dist    
XhmikosR committed
6965
6966
6967
      if (typeof content === 'function') {
        content = content.call(this.element);
      }
Mark Otto's avatar
dist    
Mark Otto committed
6968

XhmikosR's avatar
XhmikosR committed
6969
6970
6971
      this.setElementContent(SelectorEngine.findOne(Selector$7.CONTENT, tip), content);
      tip.classList.remove(ClassName$7.FADE);
      tip.classList.remove(ClassName$7.SHOW);
XhmikosR's avatar
XhmikosR committed
6972
6973
6974
6975
    };

    _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
      this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + attachment);
Mark Otto's avatar
Mark Otto committed
6976
6977
    } // Private
    ;
Mark Otto's avatar
dist  
Mark Otto committed
6978

XhmikosR's avatar
Dist    
XhmikosR committed
6979
6980
6981
    _proto._getContent = function _getContent() {
      return this.element.getAttribute('data-content') || this.config.content;
    };
Mark Otto's avatar
dist    
Mark Otto committed
6982

XhmikosR's avatar
Dist    
XhmikosR committed
6983
    _proto._cleanTipClass = function _cleanTipClass() {
XhmikosR's avatar
XhmikosR committed
6984
6985
      var tip = this.getTipElement();
      var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
Mark Otto's avatar
dist  
Mark Otto committed
6986

XhmikosR's avatar
Dist    
XhmikosR committed
6987
      if (tabClass !== null && tabClass.length > 0) {
XhmikosR's avatar
XhmikosR committed
6988
6989
6990
6991
6992
        tabClass.map(function (token) {
          return token.trim();
        }).forEach(function (tClass) {
          return tip.classList.remove(tClass);
        });
XhmikosR's avatar
Dist    
XhmikosR committed
6993
      }
Mark Otto's avatar
Mark Otto committed
6994
6995
    } // Static
    ;
Mark Otto's avatar
dist    
Mark Otto committed
6996

XhmikosR's avatar
XhmikosR committed
6997
    Popover.jQueryInterface = function jQueryInterface(config) {
XhmikosR's avatar
Dist    
XhmikosR committed
6998
      return this.each(function () {
XhmikosR's avatar
XhmikosR committed
6999
        var data = Data.getData(this, DATA_KEY$7);
Mark Otto's avatar
dist    
Mark Otto committed
7000

For faster browsing, not all history is shown. View entire blame