define(["exports"],function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!modules/emby-elements/emby-progressbar/emby-progressbar.css"]);var EmbyProgressBar=function(_HTMLDivElement){babelHelpers.inherits(EmbyProgressBar,_HTMLDivElement);var _super=_createSuper(EmbyProgressBar);function EmbyProgressBar(){var _this;babelHelpers.classCallCheck(this,EmbyProgressBar),_this=_super.call(this);return babelHelpers.possibleConstructorReturn(_this,_this)}return babelHelpers.createClass(EmbyProgressBar,[{key:"connectedCallback",value:function(){this.timeInterval&&clearInterval(this.timeInterval),"time"===this.getAttribute("data-automode")&&(this.timeInterval=setInterval(function(){var start=parseInt(this.getAttribute("data-starttime")),end=parseInt(this.getAttribute("data-endtime")),end=(Date.now()-start)/(end-start)*100,end=Math.min(100,end);end=Math.max(0,end),this.querySelector(".itemProgressBarForeground").style.width=end+"%"}.bind(this),6e4))}},{key:"disconnectedCallback",value:function(){this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=null)}}]),EmbyProgressBar}(babelHelpers.wrapNativeSuper(HTMLDivElement));customElements.define("emby-progressbar",EmbyProgressBar,{extends:"div"}),_exports.default=EmbyProgressBar});