/home/arranoyd/telegastro/wp-content/plugins/Ultimate_VC_Addons/assets/min-js/tooltip.min.js
!function(m){"use strict";var s=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("bsf_tooltip",t,e)};s.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="bsf_tooltip"><div class="bsf_tooltip-arrow"></div><div class="bsf_tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},s.prototype.init=function(t,e,i){this.enabled=!0,this.type=t,this.$element=m(e),this.options=this.getOptions(i);for(var o=this.options.trigger.split(" "),s=o.length;s--;){var n=o[s];if("click"==n)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=n){var r="hover"==n?"mouseenter":"focusin",a="hover"==n?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.getOptions=function(t){return(t=m.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},s.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&m.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},s.prototype.enter=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)},s.prototype.leave=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)},s.prototype.show=function(){var t=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var e=this,i=this.tip();this.setContent(),this.options.animation&&i.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,n=s.test(o);n&&(o=o.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(o),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),a=i[0].offsetWidth,p=i[0].offsetHeight;if(n){var h=this.$element.parent(),l=o,f=document.documentElement.scrollTop||document.body.scrollTop,u="body"==this.options.container?window.innerWidth:h.outerWidth(),c="body"==this.options.container?window.innerHeight:h.outerHeight(),d="body"==this.options.container?0:h.offset().left;o="bottom"==o&&r.top+r.height+p-f>c?"top":"top"==o&&r.top-f-p<0?"bottom":"right"==o&&r.right+a>u?"left":"left"==o&&r.left-a<d?"right":o,i.removeClass(l).addClass(o)}var y=this.getCalculatedOffset(o,r,a,p);this.applyPlacement(y,o),this.hoverState=null;var g=function(){e.$element.trigger("shown.bs."+e.type)};m.support.transition&&this.$tip.hasClass("fade")?i.one(m.support.transition.end,g).emulateTransitionEnd(150):g()}},s.prototype.applyPlacement=function(t,e){var i,o=this.tip(),s=o[0].offsetWidth,n=o[0].offsetHeight,r=parseInt(o.css("margin-top"),10),a=parseInt(o.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(a)&&(a=0),t.top=t.top+r,t.left=t.left+a,m.offset.setOffset(o[0],m.extend({using:function(t){o.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),o.addClass("in");var p=o[0].offsetWidth,h=o[0].offsetHeight;if("top"==e&&h!=n&&(i=!0,t.top=t.top+n-h),/bottom|top/.test(e)){var l=0;t.left<0&&(l=-2*t.left,t.left=0,o.offset(t),p=o[0].offsetWidth,h=o[0].offsetHeight),this.replaceArrow(l-s+p,p,"left")}else this.replaceArrow(h-n,h,"top");i&&o.offset(t)},s.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".bsf_tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},s.prototype.hide=function(){var t=this,e=this.tip(),i=m.Event("hide.bs."+this.type);function o(){"in"!=t.hoverState&&e.detach(),t.$element.trigger("hidden.bs."+t.type)}if(this.$element.trigger(i),!i.isDefaultPrevented())return e.removeClass("in"),m.support.transition&&this.$tip.hasClass("fade")?e.one(m.support.transition.end,o).emulateTransitionEnd(150):o(),this.hoverState=null,this},s.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},s.prototype.hasContent=function(){return this.getTitle()},s.prototype.getPosition=function(){var t=this.$element[0];return m.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},s.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},s.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},s.prototype.tip=function(){return this.$tip=this.$tip||m(this.options.template)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".bsf_tooltip-arrow")},s.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},s.prototype.enable=function(){this.enabled=!0},s.prototype.disable=function(){this.enabled=!1},s.prototype.toggleEnabled=function(){this.enabled=!this.enabled},s.prototype.toggle=function(t){var e=t?m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;e.tip().hasClass("in")?e.leave(e):e.enter(e)},s.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var t=m.fn.bsf_tooltip;m.fn.bsf_tooltip=function(o){return this.each(function(){var t=m(this),e=t.data("bs.bsf_tooltip"),i="object"==typeof o&&o;(e||"destroy"!=o)&&(e||t.data("bs.bsf_tooltip",e=new s(this,i)),"string"==typeof o&&e[o]())})},m.fn.bsf_tooltip.Constructor=s,m.fn.bsf_tooltip.noConflict=function(){return m.fn.bsf_tooltip=t,this}}(jQuery);