/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{ASourceChunk as e}from"./ASourceChunk.js";import{FeatureSetReaderJSON as t}from"../../../support/FeatureSetReaderJSON.js";class i extends e{constructor(e,t,i,s,r,d){super(),this._metadata=e,this._reader=t,this._tile=i,this._fileId=s,this._page=r,this._end=d,this.chunkId=`${this._tile.key.id}.${this._fileId}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=`${this._tile.key.normalizedId}.${this._fileId}.${this._page}${this.end?"e":""}`}get reader(){return this._reader??t.empty(this._metadata)}get first(){return 0===this._page}get end(){return this._end}get tile(){return this._tile}get queryInfo(){return{type:"parquet",chunkId:this.chunkId,queryJSON:null,page:this._page,size:this.size(),tileId:this._tile.id,end:this.end}}get lodInfo(){return{level:this._tile.level}}async updateFields(e,t,i){if(null!=this._fileId)return this._reader?.updateFields(e,this._fileId,t,i)}getTileReader(e){return this._tile.key.id===e.key.id?this.reader:null}}export{i as ParquetSourceChunk};
