"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./constants.js");exports.calculatePercentForValue=function(t,o,e){return 100*(t-o)/(e-o)},exports.calculateValueFromPercent=function(t,o,e){return o+t*(e-o)/100},exports.getToolipBoundingClientRect=function(o){var e=o.isHorizontalOrientation,r=o.railPosition,n=o.tooltipPosition;return{top:e?r.y-t.TOOLTIP_MARGIN:n.y,left:e?n.x:r.x-t.TOOLTIP_MARGIN,right:e?n.x:r.x+t.TOOLTIP_MARGIN,bottom:e?r.y:n.y,width:0,height:0}},exports.updateFromValue=function(t,o,e,r,n){return t<r?{from:r,to:e}:t>e-n?{from:e-n,to:e}:{from:t,to:e}},exports.updateToValue=function(t,o,e,r,n){return t>r?{from:o,to:r}:t<o+n?{from:o,to:o+n}:{from:o,to:t}};
