Ubuntu
/*!
* WPBakery Page Builder v6.0.0 (https://wpbakery.com)
* Copyright 2011-2021 Michael M, WPBakery
* License: Commercial. More details: http://go.wpbakery.com/licensing
*/
// jscs:disable
// jshint ignore: start
!function($){"use strict";function Tooltip(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",element,options)}Tooltip.VERSION="3.1.1",Tooltip.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},Tooltip.prototype.init=function(type,element,options){this.enabled=!0,this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport);for(var triggers=this.options.trigger.split(" "),i=triggers.length;i--;){var eventIn,eventOut=triggers[i];"click"==eventOut?this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this)):"manual"!=eventOut&&(eventIn="hover"==eventOut?"mouseenter":"focusin",eventOut="hover"==eventOut?"mouseleave":"focusout",this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this)))}this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS},Tooltip.prototype.getOptions=function(options){return(options=$.extend({},this.getDefaults(),this.$element.data(),options)).delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},Tooltip.prototype.getDelegateOptions=function(){var options={},defaults=this.getDefaults();return this._options&&$.each(this._options,function(key,value){defaults[key]!=value&&(options[key]=value)}),options},Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);if(self||(self=new this.constructor(obj.currentTarget,this.getDelegateOptions()),$(obj.currentTarget).data("bs."+this.type,self)),clearTimeout(self.timeout),self.hoverState="in",!self.options.delay||!self.options.delay.show)return self.show();self.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show)},Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);if(self||(self=new this.constructor(obj.currentTarget,this.getDelegateOptions()),$(obj.currentTarget).data("bs."+this.type,self)),clearTimeout(self.timeout),self.hoverState="out",!self.options.delay||!self.options.delay.hide)return self.hide();self.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide)},Tooltip.prototype.show=function(){var that,$tip,pos,actualWidth,orgPlacement,parentDim,complete,calculatedOffset=$.Event("show.bs."+this.type);this.hasContent()&&this.enabled&&(this.$element.trigger(calculatedOffset),calculatedOffset.isDefaultPrevented()||($tip=(that=this).tip(),this.setContent(),this.options.animation&&$tip.addClass("fade"),complete="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,(parentDim=(orgPlacement=/\s?auto?\s?/i).test(complete))&&(complete=complete.replace(orgPlacement,"")||"top"),$tip.detach().css({top:0,left:0,display:"block"}).addClass(complete),this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element),pos=this.getPosition(),actualWidth=$tip[0].offsetWidth,calculatedOffset=$tip[0].offsetHeight,parentDim&&(orgPlacement=complete,parentDim=this.$element.parent(),parentDim=this.getPosition(parentDim),complete="bottom"==complete&&pos.top+pos.height+calculatedOffset-parentDim.scroll>parentDim.height?"top":"top"==complete&&pos.top-parentDim.scroll-calculatedOffset<0?"bottom":"right"==complete&&pos.right+actualWidth>parentDim.width?"left":"left"==complete&&pos.left-actualWidthviewportDimensions.top+viewportDimensions.height&&(delta.top=viewportDimensions.top+viewportDimensions.height-leftEdgeOffset)):(leftEdgeOffset=pos.left-viewportPadding,rightEdgeOffset=pos.left+viewportPadding+rightEdgeOffset,leftEdgeOffsetviewportDimensions.width&&(delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset)),delta},Tooltip.prototype.getTitle=function(){var $e=this.$element,o=this.options;return $e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},Tooltip.prototype.tip=function(){return this.$tip=this.$tip||$(this.options.template)},Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},Tooltip.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},Tooltip.prototype.enable=function(){this.enabled=!0},Tooltip.prototype.disable=function(){this.enabled=!1},Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled},Tooltip.prototype.toggle=function(e){var self=this;e&&((self=$(e.currentTarget).data("bs."+this.type))||(self=new this.constructor(e.currentTarget,this.getDelegateOptions()),$(e.currentTarget).data("bs."+this.type,self))),self.tip().hasClass("in")?self.leave(self):self.enter(self)},Tooltip.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var old=$.fn.tooltip;$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("bs.tooltip"),options="object"==typeof option&&option;!data&&"destroy"==option||(data||$this.data("bs.tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]())})},$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(jQuery);