/*!
  * Bootstrap Range Tips v0.0.1 (https://iqbalfn.github.io/bootstrap-range-tips/)
  * Copyright 2019 Iqbal Fauzi
  * Licensed under MIT (https://github.com/iqbalfn/bootstrap-range-tips/blob/master/LICENSE)
  */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t=t||self)["bootstrap-range-tips"]={},t.jQuery)}(this,function(t,r){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(i){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,o;e=i,o=r[n=t],n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o})}return i}r=r&&r.hasOwnProperty("default")?r.default:r;var e="transitionend";function n(t){var e=this,n=!1;return r(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(e)},t),this}var l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=r(t).css("transition-duration"),n=r(t).css("transition-delay"),o=parseFloat(e),i=parseFloat(n);return o||i?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){r(t).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var i=n[o],r=e[o],s=r&&l.isElement(r)?"element":(a=r,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(i).test(s))throw new Error(t.toUpperCase()+': Option "'+o+'" provided type "'+s+'" but expected type "'+i+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?l.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null}};r.fn.emulateTransitionEnd=n,r.event.special[l.TRANSITION_END]={bindType:e,delegateType:e,handle:function(t){if(r(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var a="rangetips",u="bs.rangetips",o="."+u,f=r.fn[a],c={template:"string"},p={template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'},h="show",d={FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,INPUT:"input"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},_=function(){function o(t,e){this._config=this._getConfig(e),this._element=t,this._parent=t.parentNode,this._tooltips=this._makeTooltips(),this._tooltipsInner=this._tooltips.querySelector(".tooltip-inner"),this._tooltipsArrow=this._tooltips.querySelector(".arrow"),this._isShown=!1,this._handleParent(),this._addElementListener()}var t=o.prototype;return t._addElementListener=function(){var e=this;r(this._element).on(d.MOUSEENTER+" "+d.FOCUSIN,function(t){e._show()}).on(d.MOUSELEAVE,function(t){document.activeElement!==e._element&&e._hide()}).on(d.FOCUSOUT,function(t){r(e._element).is(":hover")||e._hide()}),r(this._element).on(d.INPUT,function(t){e._updateLabel(),e._updatePosition()})},t._getConfig=function(t){return t=s({},p,t),l.typeCheckConfig(a,t,c),t},t._handleParent=function(){this._parent.style.position="relative"},t._hide=function(){this._isShown&&(this._isShown=!1,this._tooltips.classList.remove(h))},t._makeTooltips=function(){var t=r(this._config.template).get(0);return t.classList.add("bs-tooltip-top"),this._parent.appendChild(t),t},t._show=function(){if(!this._isShown){this._isShown=!0,this._updateLabel(),this._tooltipsInner.innerText=this._element.value;var t=this._element.offsetTop-this._tooltips.offsetHeight;this._tooltips.style.top=t+"px",this._tooltips.classList.add(h),this._updatePosition()}},t._updatePosition=function(){var t=this._element.value,e=this._element.max||100,n=this._element.min||0,o=this._element.offsetWidth-16,i=this._tooltips.offsetWidth,r=t/(e-n)*o-i/2+8;n&&(r-=n/(e-n)*o),this._tooltips.style.left=r+"px";var s=i/2-6.4;this._tooltipsArrow.style.left=s+"px"},t._updateLabel=function(){this._tooltipsInner.innerText=this._element.value},o._jQueryInterface=function(n,t){return this.each(function(){var t=r(this).data(u),e=s({},p,r(this).data(),"object"==typeof n&&n?n:{});t||(t=new o(this,e),r(this).data(u,t))})},function(t,e,n){e&&i(t.prototype,e),n&&i(t,n)}(o,null,[{key:"VERSION",get:function(){return"0.0.1"}},{key:"Default",get:function(){return p}}]),o}();r.fn[a]=_._jQueryInterface,r.fn[a].Constructor=_,r.fn[a].noConflict=function(){return r.fn[a]=f,_._jQueryInterface},t.RangeTips=_,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=bootstrap-range-tips.min.js.map