// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define(["exports","../core/handleUtils","../core/has","../core/MapUtils","../core/time"],function(d,m,h,n,e){function k(a=c=>{},b=p){const c=performance.now();a(0);const f=setInterval(()=>{const g=performance.now()-c;a(1-Math.exp(-g/b))},q);return m.makeHandle(()=>{clearInterval(f);a(1)})}class l{constructor(a,b=f=>{},c){this.onProgress=b;this.taskName=c;this._progressMap=new Map;this._startTime=void 0;this._timingsMap=new Map;if("number"===typeof a)for(this._weights={},b=0;b({start:c,end:0}));1===b&&(a.end=c)}this.emitProgress()}simulate(a,b){return k(c=>this.setProgress(a,c),b)}makeOnProgress(a){return b=>this.setProgress(a,b)}}const q=e.Milliseconds(50),p=e.Milliseconds(1E3);d.ProgressManager=l;d.estimatedConversionTime=function(a,b=10){return e.millisecondsFromSeconds(e.Seconds(8E-6* a/b))};d.estimatedTransferTime=function(a,b=10){return e.millisecondsFromSeconds(e.Seconds(8E-6*a/b))};d.makeProgressManager=function(a,b=f=>{},c){return new l(a,b,c)};d.simulateProgress=k;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});