<\/div>' + '
<\/div><\/div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: 0,\n container: false,\n fallbackPlacement: 'flip',\n boundary: 'scrollParent'\n };\n var HoverState = {\n SHOW: 'show',\n OUT: 'out'\n };\n var Event = {\n HIDE: \"hide\".concat(EVENT_KEY),\n HIDDEN: \"hidden\".concat(EVENT_KEY),\n SHOW: \"show\".concat(EVENT_KEY),\n SHOWN: \"shown\".concat(EVENT_KEY),\n INSERTED: \"inserted\".concat(EVENT_KEY),\n CLICK: \"click\".concat(EVENT_KEY),\n FOCUSIN: \"focusin\".concat(EVENT_KEY),\n FOCUSOUT: \"focusout\".concat(EVENT_KEY),\n MOUSEENTER: \"mouseenter\".concat(EVENT_KEY),\n MOUSELEAVE: \"mouseleave\".concat(EVENT_KEY)\n };\n var ClassName = {\n FADE: 'fade',\n SHOW: 'show'\n };\n var Selector = {\n TOOLTIP: '.tooltip',\n TOOLTIP_INNER: '.tooltip-inner',\n ARROW: '.arrow'\n };\n var Trigger = {\n HOVER: 'hover',\n FOCUS: 'focus',\n CLICK: 'click',\n MANUAL: 'manual'\n \/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n *\/\n\n };\n\n var Tooltip = function() {\n function Tooltip(element, config) {\n _classCallCheck(this, Tooltip);\n\n \/**\n * Check for Popper dependency\n * Popper - https:\/\/popper.js.org\n *\/\n if (typeof _popper2.default === 'undefined') {\n throw new TypeError('Bootstrap tooltips require Popper.js (https:\/\/popper.js.org)');\n } \/\/ private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._hoverState = '';\n this._activeTrigger = {};\n this._popper = null; \/\/ Protected\n\n this.element = element;\n this.config = this._getConfig(config);\n this.tip = null;\n\n this._setListeners();\n } \/\/ Getters\n\n _createClass(Tooltip, [{\n key: \"enable\",\n value: function enable() {\n this._isEnabled = true;\n }\n }, {\n key: \"disable\",\n value: function disable() {\n this._isEnabled = false;\n }\n }, {\n key: \"toggleEnabled\",\n value: function toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n }, {\n key: \"toggle\",\n value: function toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n\n if (event) {\n var dataKey = this.constructor.DATA_KEY;\n var context = $(event.currentTarget).data(dataKey);\n\n if (!context) {\n context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n $(event.currentTarget).data(dataKey, context);\n }\n\n context._activeTrigger.click = !context._activeTrigger.click;\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context);\n } else {\n context._leave(null, context);\n }\n } else {\n if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {\n this._leave(null, this);\n\n return;\n }\n\n this._enter(null, this);\n }\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n clearTimeout(this._timeout);\n $.removeData(this.element, this.constructor.DATA_KEY);\n $(this.element).off(this.constructor.EVENT_KEY);\n $(this.element).closest('.modal').off('hide.bs.modal');\n\n if (this.tip) {\n $(this.tip).remove();\n }\n\n this._isEnabled = null;\n this._timeout = null;\n this._hoverState = null;\n this._activeTrigger = null;\n\n if (this._popper !== null) {\n this._popper.destroy();\n }\n\n this._popper = null;\n this.element = null;\n this.config = null;\n this.tip = null;\n }\n }, {\n key: \"show\",\n value: function show() {\n var _this = this;\n\n if ($(this.element).css('display') === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n var showEvent = $.Event(this.constructor.Event.SHOW);\n\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent);\n var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return;\n }\n\n var tip = this.getTipElement();\n\n var tipId = _util2.default.getUID(this.constructor.NAME);\n\n tip.setAttribute('id', tipId);\n this.element.setAttribute('aria-describedby', tipId);\n this.setContent();\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE);\n }\n\n var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;\n\n var attachment = this._getAttachment(placement);\n\n this.addAttachmentClass(attachment);\n var container = this.config.container === false ? document.body : $(this.config.container);\n $(tip).data(this.constructor.DATA_KEY, this);\n\n if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {\n $(tip).appendTo(container);\n }\n\n $(this.element).trigger(this.constructor.Event.INSERTED);\n this._popper = new _popper2.default(this.element, tip, {\n placement: attachment,\n modifiers: {\n offset: {\n offset: this.config.offset\n },\n flip: {\n behavior: this.config.fallbackPlacement\n },\n arrow: {\n element: Selector.ARROW\n },\n preventOverflow: {\n boundariesElement: this.config.boundary\n }\n },\n onCreate: function onCreate(data) {\n if (data.originalPlacement !== data.placement) {\n _this._handlePopperPlacementChange(data);\n }\n },\n onUpdate: function onUpdate(data) {\n _this._handlePopperPlacementChange(data);\n }\n });\n $(tip).addClass(ClassName.SHOW); \/\/ If this is a touch-enabled device we add extra\n \/\/ empty mouseover listeners to the body's immediate children;\n \/\/ only needed because of broken event delegation on iOS\n \/\/ https:\/\/www.quirksmode.org\/blog\/archives\/2014\/02\/mouse_event_bub.html\n\n if ('ontouchstart' in document.documentElement) {\n $('body').children().on('mouseover', null, $.noop);\n }\n\n var complete = function complete() {\n if (_this.config.animation) {\n _this._fixTransition();\n }\n\n var prevHoverState = _this._hoverState;\n _this._hoverState = null;\n $(_this.element).trigger(_this.constructor.Event.SHOWN);\n\n if (prevHoverState === HoverState.OUT) {\n _this._leave(null, _this);\n }\n };\n\n if (_util2.default.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n $(this.tip).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);\n } else {\n complete();\n }\n }\n }\n }, {\n key: \"hide\",\n value: function hide(callback) {\n var _this2 = this;\n\n var tip = this.getTipElement();\n var hideEvent = $.Event(this.constructor.Event.HIDE);\n\n var complete = function complete() {\n if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip);\n }\n\n _this2._cleanTipClass();\n\n _this2.element.removeAttribute('aria-describedby');\n\n $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);\n\n if (_this2._popper !== null) {\n _this2._popper.destroy();\n }\n\n if (callback) {\n callback();\n }\n };\n\n $(this.element).trigger(hideEvent);\n\n if (hideEvent.isDefaultPrevented()) {\n return;\n }\n\n $(tip).removeClass(ClassName.SHOW); \/\/ If this is a touch-enabled device we remove the extra\n \/\/ empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n $('body').children().off('mouseover', null, $.noop);\n }\n\n this._activeTrigger[Trigger.CLICK] = false;\n this._activeTrigger[Trigger.FOCUS] = false;\n this._activeTrigger[Trigger.HOVER] = false;\n\n if (_util2.default.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n $(tip).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);\n } else {\n complete();\n }\n\n this._hoverState = '';\n }\n }, {\n key: \"update\",\n value: function update() {\n if (this._popper !== null) {\n this._popper.scheduleUpdate();\n }\n }\n }, {\n key: \"isWithContent\",\n value: function isWithContent() {\n return Boolean(this.getTitle());\n }\n }, {\n key: \"addAttachmentClass\",\n value: function addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(\"\".concat(CLASS_PREFIX, \"-\").concat(attachment));\n }\n }, {\n key: \"getTipElement\",\n value: function getTipElement() {\n this.tip = this.tip || $(this.config.template)[0];\n return this.tip;\n }\n }, {\n key: \"setContent\",\n value: function setContent() {\n var $tip = $(this.getTipElement());\n this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());\n $tip.removeClass(\"\".concat(ClassName.FADE, \" \").concat(ClassName.SHOW));\n }\n }, {\n key: \"setElementContent\",\n value: function setElementContent($element, content) {\n var html = this.config.html;\n\n if (_typeof(content) === 'object' && (content.nodeType || content.jquery)) {\n \/\/ Content is a DOM node or a jQuery\n if (html) {\n if (!$(content).parent().is($element)) {\n $element.empty().append(content);\n }\n } else {\n $element.text($(content).text());\n }\n } else {\n $element[html ? 'html' : 'text'](content);\n }\n }\n }, {\n key: \"getTitle\",\n value: function getTitle() {\n var title = this.element.getAttribute('data-original-title');\n\n if (!title) {\n title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;\n }\n\n return title;\n }\n }, {\n key: \"_getAttachment\",\n value: function _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()];\n }\n }, {\n key: \"_setListeners\",\n value: function _setListeners() {\n var _this3 = this;\n\n var triggers = this.config.trigger.split(' ');\n triggers.forEach(function(trigger) {\n if (trigger === 'click') {\n $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function(event) {\n return _this3.toggle(event);\n });\n } else if (trigger !== Trigger.MANUAL) {\n var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;\n var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;\n $(_this3.element).on(eventIn, _this3.config.selector, function(event) {\n return _this3._enter(event);\n }).on(eventOut, _this3.config.selector, function(event) {\n return _this3._leave(event);\n });\n }\n\n $(_this3.element).closest('.modal').on('hide.bs.modal', function() {\n return _this3.hide();\n });\n });\n\n if (this.config.selector) {\n this.config = _extends({}, this.config, {\n trigger: 'manual',\n selector: ''\n });\n } else {\n this._fixTitle();\n }\n }\n }, {\n key: \"_fixTitle\",\n value: function _fixTitle() {\n var titleType = _typeof(this.element.getAttribute('data-original-title'));\n\n if (this.element.getAttribute('title') || titleType !== 'string') {\n this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');\n this.element.setAttribute('title', '');\n }\n }\n }, {\n key: \"_enter\",\n value: function _enter(event, context) {\n var dataKey = this.constructor.DATA_KEY;\n context = context || $(event.currentTarget).data(dataKey);\n\n if (!context) {\n context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n $(event.currentTarget).data(dataKey, context);\n }\n\n if (event) {\n context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {\n context._hoverState = HoverState.SHOW;\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HoverState.SHOW;\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show();\n return;\n }\n\n context._timeout = setTimeout(function() {\n if (context._hoverState === HoverState.SHOW) {\n context.show();\n }\n }, context.config.delay.show);\n }\n }, {\n key: \"_leave\",\n value: function _leave(event, context) {\n var dataKey = this.constructor.DATA_KEY;\n context = context || $(event.currentTarget).data(dataKey);\n\n if (!context) {\n context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n $(event.currentTarget).data(dataKey, context);\n }\n\n if (event) {\n context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;\n }\n\n if (context._isWithActiveTrigger()) {\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HoverState.OUT;\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide();\n return;\n }\n\n context._timeout = setTimeout(function() {\n if (context._hoverState === HoverState.OUT) {\n context.hide();\n }\n }, context.config.delay.hide);\n }\n }, {\n key: \"_isWithActiveTrigger\",\n value: function _isWithActiveTrigger() {\n for (var trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"_getConfig\",\n value: function _getConfig(config) {\n config = _extends({}, this.constructor.Default, $(this.element).data(), config);\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n _util2.default.typeCheckConfig(NAME, config, this.constructor.DefaultType);\n\n return config;\n }\n }, {\n key: \"_getDelegateConfig\",\n value: function _getDelegateConfig() {\n var config = {};\n\n if (this.config) {\n for (var key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key];\n }\n }\n }\n\n return config;\n }\n }, {\n key: \"_cleanTipClass\",\n value: function _cleanTipClass() {\n var $tip = $(this.getTipElement());\n var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);\n\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''));\n }\n }\n }, {\n key: \"_handlePopperPlacementChange\",\n value: function _handlePopperPlacementChange(data) {\n this._cleanTipClass();\n\n this.addAttachmentClass(this._getAttachment(data.placement));\n }\n }, {\n key: \"_fixTransition\",\n value: function _fixTransition() {\n var tip = this.getTipElement();\n var initConfigAnimation = this.config.animation;\n\n if (tip.getAttribute('x-placement') !== null) {\n return;\n }\n\n $(tip).removeClass(ClassName.FADE);\n this.config.animation = false;\n this.hide();\n this.show();\n this.config.animation = initConfigAnimation;\n }\n }], [{\n key: \"_jQueryInterface\",\n value: function _jQueryInterface(config) {\n return this.each(function() {\n var data = $(this).data(DATA_KEY);\n\n var _config = _typeof(config) === 'object' && config;\n\n if (!data && \/dispose|hide\/.test(config)) {\n return;\n }\n\n if (!data) {\n data = new Tooltip(this, _config);\n $(this).data(DATA_KEY, data);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(\"No method named \\\"\".concat(config, \"\\\"\"));\n }\n\n data[config]();\n }\n });\n }\n }, {\n key: \"VERSION\",\n get: function get() {\n return VERSION;\n }\n }, {\n key: \"Default\",\n get: function get() {\n return Default;\n }\n }, {\n key: \"NAME\",\n get: function get() {\n return NAME;\n }\n }, {\n key: \"DATA_KEY\",\n get: function get() {\n return DATA_KEY;\n }\n }, {\n key: \"Event\",\n get: function get() {\n return Event;\n }\n }, {\n key: \"EVENT_KEY\",\n get: function get() {\n return EVENT_KEY;\n }\n }, {\n key: \"DefaultType\",\n get: function get() {\n return DefaultType;\n }\n }]);\n\n return Tooltip;\n }();\n\n \/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n *\/\n $.fn[NAME] = Tooltip._jQueryInterface;\n $.fn[NAME].Constructor = Tooltip;\n\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return Tooltip._jQueryInterface;\n };\n\n return Tooltip;\n }(_jquery2.default, _popper2.default);\n\n exports.default = Tooltip;\n});"],"file":"tooltip.min.js"}