var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); ASPxClientProgressBarIDSuffix = { DivIndicator: "_DI", ValueIndicatorCell: "_VIC" }; ASPxClientProgressBarBase = _aspxCreateClass(ASPxClientControl, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.isDisplayModePosition = false; this.displayFormat = null; this.minimum = 0; this.maximum = 0; this.position = 0; this.onePercentValue = 0; this.hasOwner = true; }, InlineInitialize: function(calledByOwner) { if(calledByOwner || !this.hasOwner) { this.OnePercentValueUpdate(); if(this.IsIndicatorDivWidthCorrectionRequired()) this.SetCalculatedDivIndicatorWidth(); } }, OnePercentValueUpdate: function() { this.onePercentValue = (this.maximum - this.minimum) / 100; }, GetMainCell: function() { if(!this.mainCell) this.mainCell = _aspxGetChildByTagName(this.GetMainElement(), "TD", 0); return this.mainCell; }, GetIndicatorDiv: function() { if(!this.divIndicator) this.divIndicator = _aspxGetElementById(this.name + ASPxClientProgressBarIDSuffix.DivIndicator); return this.divIndicator; }, GetValueIndicatorTable: function() { if(!this.valueIndicatorTable) this.valueIndicatorTable = _aspxGetParentByTagName(this.GetValueIndicatorCell(), "TABLE"); return this.valueIndicatorTable; }, GetValueIndicatorCell: function() { if(!this.valueIndicatorCell) this.valueIndicatorCell = _aspxGetElementById(this.name + ASPxClientProgressBarIDSuffix.ValueIndicatorCell); return this.valueIndicatorCell; }, AdjustControlCore: function() { ASPxClientControl.prototype.AdjustControlCore.call(this); this.UpdateIndicators(); this.CorrectIndicatorHeight(); }, CorrectIndicatorHeight: function() { var mainCell = this.GetMainCell(); var valueIndicatorTable = this.GetValueIndicatorTable(); var height = _aspxGetClearClientHeight(mainCell); this.SetOffsetHeight(this.GetIndicatorDiv(), height); if(valueIndicatorTable) { this.SetOffsetHeight(valueIndicatorTable, height); valueIndicatorTable.style.marginTop = -height + "px"; } if(__aspxIE && __aspxBrowserMajorVersion == 8) { var valueIndicatorCell = this.GetValueIndicatorCell(); if(valueIndicatorCell) valueIndicatorCell.innerHTML = valueIndicatorCell.innerHTML; } }, ResetIndicatorHeight: function() { _aspxSetOffsetHeight(this.GetIndicatorDiv(), 1); var valueIndicatorTable = this.GetValueIndicatorTable(); if(valueIndicatorTable) _aspxSetOffsetHeight(valueIndicatorTable, 1); }, SetOffsetHeight: function(element, heightValue) { var currentStyle = _aspxGetCurrentStyle(element); heightValue -= _aspxPxToInt(currentStyle.paddingTop) + _aspxPxToInt(currentStyle.paddingBottom) + _aspxPxToInt(currentStyle.borderTopWidth) + _aspxPxToInt(currentStyle.borderBottomWidth); if(heightValue > -1) element.style.height = heightValue + "px"; }, GetCalculatedIndicatorDivWidth: function(percent) { var progressWidth = _aspxGetClearClientWidth(this.GetMainCell()); var indicatorDivStyle = _aspxGetCurrentStyle(this.GetIndicatorDiv()); progressWidth -= _aspxPxToInt(indicatorDivStyle.borderLeftWidth) + _aspxPxToInt(indicatorDivStyle.borderRightWidth); return progressWidth / 100 * percent; }, UpdateIndicators: function() { if(this.IsIndicatorDivWidthCorrectionRequired()) { this.SetCalculatedDivIndicatorWidth(); } else { var percent = this.GetPercent(); this.GetIndicatorDiv().style.width = percent < 0 ? 0 : percent + "%"; } var cell = this.GetValueIndicatorCell(); if(cell) { cell.innerHTML = this.GetIndicatorText(); } }, GetIndicatorText: function() { var indicatorValue = this.isDisplayModePosition ? this.position : this.GetPercent(); if(this.displayFormat != null) indicatorValue = ASPxFormatter.Format(this.displayFormat, indicatorValue); if(this.isDisplayModePosition) return indicatorValue; if(this.rtl && __aspxCultureInfo.percentPattern == 0) return indicatorValue + " %"; return indicatorValue + "%"; }, SetCalculatedDivIndicatorWidth: function() { var indicatorWidth = this.GetCalculatedIndicatorDivWidth(this.GetPercent()); if(indicatorWidth >= 0) this.GetIndicatorDiv().style.width = indicatorWidth + "px"; }, IsIndicatorDivWidthCorrectionRequired: function() { var indicatorDivStyle = _aspxGetCurrentStyle(this.GetIndicatorDiv()); return _aspxPxToInt(indicatorDivStyle.borderLeftWidth) > 0 || _aspxPxToInt(indicatorDivStyle.borderRightWidth) > 0; }, SetPosition: function(value) { this.position = Math.min(Math.max(value, this.minimum), this.maximum); this.UpdateIndicators(); }, SetMinMaxValues: function(minValue, maxValue) { var preparedMinValue = parseInt(minValue.toString(), 10); var preparedMaxValue = parseInt(maxValue.toString(), 10); if(isNaN(preparedMinValue)) preparedMinValue = this.minimum; if(isNaN(preparedMaxValue)) preparedMaxValue = this.maximum; if(preparedMaxValue > preparedMinValue) { this.maximum = preparedMaxValue; this.minimum = preparedMinValue; this.OnePercentValueUpdate(); this.SetPosition(this.position); } }, GetPosition: function() { return this.position; }, GetPercent: function () { if (this.minimum === this.maximum) return 0; return (this.position - this.minimum) / this.onePercentValue; } }); } /* playback timings (ms): RedisCDXSource: 8.898 CDXLines.iter: 21.701 (3) PetaboxLoader3.datanode: 76.992 (4) esindex: 0.015 PetaboxLoader3.resolve: 30.944 load_resource: 68.103 captures_list: 97.754 exclusion.robots.policy: 0.248 LoadShardBlock: 62.42 (3) exclusion.robots: 0.263 */