import{Ec as a,Fc as p,Ic as h,Kc as c,Oi as d,Pi as f,Wa as s,Xa as l,Yh as i,_b as o,_h as m,cc as u}from"./chunk-UJH7VVYJ.js";p();f();c();l();u();m();var v="dx-trackbar",R="dx-trackbar-container",C="dx-trackbar-range",A="dx-trackbar-wrapper",_=d.inherit({_getDefaultOptions:function(){return s(this.callBase(),{min:0,max:100,value:0})},_initMarkup:function(){this.$element().addClass(v),this._renderWrapper(),this._renderContainer(),this._renderRange(),this._renderValue(),this._setRangeStyles(),this.callBase()},_render:function(){this.callBase(),this._setRangeStyles(this._rangeStylesConfig())},_renderWrapper:function(){this._$wrapper=a("<div>").addClass(A).appendTo(this.$element())},_renderContainer:function(){this._$bar=a("<div>").addClass(R).appendTo(this._$wrapper)},_renderRange:function(){this._$range=a("<div>").addClass(C).appendTo(this._$bar)},_renderValue:function(){var t=this.option("value"),e=this.option("min"),r=this.option("max");if(!(e>r)){if(t<e){this.option("value",e),this._currentRatio=0;return}if(t>r){this.option("value",r),this._currentRatio=1;return}var n=e===r?0:(t-e)/(r-e);!this._needPreventAnimation&&this._setRangeStyles({width:100*n+"%"}),this.setAria({valuemin:this.option("min"),valuemax:r,valuenow:t}),this._currentRatio=n}},_rangeStylesConfig:function(){return{width:100*this._currentRatio+"%"}},_setRangeStyles:function(t){if(i.stop(this._$range),!t){this._$range.css({width:0});return}this._needPreventAnimation||!o()||i.animate(this._$range,{type:"custom",duration:100,to:t})},_optionChanged:function(t){switch(t.name){case"value":this._renderValue(),this.callBase(t);break;case"max":case"min":this._renderValue();break;default:this.callBase(t)}},_dispose:function(){i.stop(this._$range),this.callBase()}});h("dxTrackBar",_);var k=_;export{k as a};
