define(["exports","../utils/logger.js","./speed-sampler.js","./loader.js","./fetch-stream-loader.js","./range-seek-handler.js","./param-seek-handler.js","../utils/exception.js"],function(_exports,_logger,_speedSampler,_loader,_fetchStreamLoader,_rangeSeekHandler,_paramSeekHandler,_exception){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var IOController=function(){function IOController(dataSource,config,extraData){babelHelpers.classCallCheck(this,IOController),this.TAG="IOController",this._config=config,this._extraData=extraData,this._stashInitialSize=393216,null!=config.stashInitialSize&&0=list[mid]&&inputthis._bufferSize&&(this._expandBuffer(this._stashUsed+chunk.byteLength),KBps=new Uint8Array(this._stashBuffer,0,this._bufferSize)),KBps.set(new Uint8Array(chunk),this._stashUsed),this._stashUsed+=chunk.byteLength):(buffer=this._dispatchChunks(chunk,byteStart))this._bufferSize&&(this._expandBuffer(_consumed2),KBps=new Uint8Array(this._stashBuffer,0,this._bufferSize)),KBps.set(new Uint8Array(chunk,buffer),0),this._stashUsed+=_consumed2,this._stashByteStart=byteStart+buffer))):0===this._stashUsed?(KBps=this._dispatchChunks(chunk,byteStart))this._bufferSize&&this._expandBuffer(_consumed2),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(chunk,KBps),0),this._stashUsed+=_consumed2,this._stashByteStart=byteStart+KBps):(this._stashUsed+chunk.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+chunk.byteLength),(buffer=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(chunk),this._stashUsed),this._stashUsed+=chunk.byteLength,(_consumed2=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))