@arcgis/core 5.2.0-next.57 → 5.2.0-next.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/arcade/featureset/sources/FeatureLayerParquet.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/479f486ec1797629ec70.js +1 -0
  4. package/assets/esri/core/workers/chunks/4f2170609742b51bd7b8.js +1 -0
  5. package/assets/esri/core/workers/chunks/6823ba1688dfedba0107.js +1 -0
  6. package/assets/esri/core/workers/chunks/7d85048c6cd6ad84faf9.js +1 -0
  7. package/assets/esri/core/workers/chunks/{61d0ada7627f21988183.js → a8ade34612e73862de6f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/f0225829f7d941914815.js +1 -0
  9. package/assets/esri/core/workers/chunks/{7f67c6e9e0a8fe918711.js → ff7a6ea26e867e021636.js} +1 -1
  10. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  11. package/chunks/bundle2.js +1 -1
  12. package/config.js +1 -1
  13. package/kernel.js +1 -1
  14. package/layers/ParquetLayer.js +1 -1
  15. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  16. package/libs/parquet/parquet.js +1 -1
  17. package/package.json +1 -1
  18. package/support/revision.js +1 -1
  19. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  20. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  21. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  22. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  23. package/assets/esri/core/workers/chunks/15aa9b85976069acf4f3.js +0 -1
  24. package/assets/esri/core/workers/chunks/26fdc8382e009672924e.js +0 -1
  25. package/assets/esri/core/workers/chunks/7b6b8d0673976c6c26de.js +0 -1
  26. package/assets/esri/core/workers/chunks/8a410edcdf74ba957159.js +0 -1
  27. package/assets/esri/core/workers/chunks/8cb2fe91d1d8f49c14f8.js +0 -1
package/chunks/bundle2.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- class e{static __wrap(t){t>>>=0;const _=Object.create(e.prototype);return _.__wbg_ptr=t,C.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,C.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_columndescriptor_free(e,0)}compressedSize(){return ke.columndescriptor_compressedSize(this.__wbg_ptr)}compression(){let e,t;try{const _=ke.columndescriptor_compression(this.__wbg_ptr);return e=_[0],t=_[1],ce(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}distinctCount(){const e=ke.columndescriptor_distinctCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}encodings(){return ke.columndescriptor_encodings(this.__wbg_ptr)}logicalType(){const e=ke.columndescriptor_logicalType(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ce(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}maxValue(){return ke.columndescriptor_maxValue(this.__wbg_ptr)}minValue(){return ke.columndescriptor_minValue(this.__wbg_ptr)}name(){let e,t;try{const _=ke.columndescriptor_name(this.__wbg_ptr);return e=_[0],t=_[1],ce(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}nullCount(){const e=ke.columndescriptor_nullCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}numValues(){return ke.columndescriptor_numValues(this.__wbg_ptr)}pageEncodings(){const e=ke.columndescriptor_pageEncodings(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ee(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],4*e[1],4)),t}physicalType(){const e=ke.columndescriptor_physicalType(this.__wbg_ptr);return k[e]}uncompressedSize(){return ke.columndescriptor_uncompressedSize(this.__wbg_ptr)}}Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);class t{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,T.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_columnid_free(e,0)}}Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);const _=Object.freeze({PBF:0,0:"PBF"});class r{static __wrap(e){e>>>=0;const t=Object.create(r.prototype);return t.__wbg_ptr=e,P.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_displayoptimizationxzbuilder_free(e,0)}addLevel(e){N(e,u);var t=e.__destroy_into_raw();ke.displayoptimizationxzbuilder_addLevel(this.__wbg_ptr,t)}static new(){const e=ke.displayoptimizationxzbuilder_new();return r.__wrap(e)}setCodeField(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe;ke.displayoptimizationxzbuilder_setCodeField(this.__wbg_ptr,t,_)}setEncoding(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe,r=ke.displayoptimizationxzbuilder_setEncoding(this.__wbg_ptr,t,_);if(r[1])throw Fe(r[0])}setFullExtent(e){ke.displayoptimizationxzbuilder_setFullExtent(this.__wbg_ptr,e)}setGeometryType(e){ke.displayoptimizationxzbuilder_setGeometryType(this.__wbg_ptr,e)}setHasM(e){ke.displayoptimizationxzbuilder_setHasM(this.__wbg_ptr,e)}setHasZ(e){ke.displayoptimizationxzbuilder_setHasZ(this.__wbg_ptr,e)}setMaxLevel(e){ke.displayoptimizationxzbuilder_setMaxLevel(this.__wbg_ptr,e)}setSpatialReference(e,t){var _=we(t)?0:ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Oe;const n=ke.displayoptimizationxzbuilder_setSpatialReference(this.__wbg_ptr,we(e)?4294967297:e>>>0,_,r);if(n[1])throw Fe(n[0])}}Symbol.dispose&&(r.prototype[Symbol.dispose]=r.prototype.free);class n{static __wrap(e){e>>>=0;const t=Object.create(n.prototype);return t.__wbg_ptr=e,I.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,I.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_displayoptimizationzbuilder_free(e,0)}static new(){const e=ke.displayoptimizationzbuilder_new();return n.__wrap(e)}setCodeField(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe;ke.displayoptimizationzbuilder_setCodeField(this.__wbg_ptr,t,_)}setCooordinatePrecision(e){ke.displayoptimizationzbuilder_setCooordinatePrecision(this.__wbg_ptr,e)}setFullExtent(e){ke.displayoptimizationzbuilder_setFullExtent(this.__wbg_ptr,e)}setHasM(e){ke.displayoptimizationzbuilder_setHasM(this.__wbg_ptr,e)}setHasZ(e){ke.displayoptimizationzbuilder_setHasZ(this.__wbg_ptr,e)}setSpatialReference(e,t){var _=we(t)?0:ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Oe;const n=ke.displayoptimizationzbuilder_setSpatialReference(this.__wbg_ptr,we(e)?4294967297:e>>>0,_,r);if(n[1])throw Fe(n[0])}setXColumn(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe;ke.displayoptimizationzbuilder_setXColumn(this.__wbg_ptr,t,_)}setYColumn(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe;ke.displayoptimizationzbuilder_setYColumn(this.__wbg_ptr,t,_)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);class i{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_extent_free(e,0)}get xmax(){return ke.__wbg_get_extent_xmax(this.__wbg_ptr)}get xmin(){return ke.__wbg_get_extent_xmin(this.__wbg_ptr)}get ymax(){return ke.__wbg_get_extent_ymax(this.__wbg_ptr)}get ymin(){return ke.__wbg_get_extent_ymin(this.__wbg_ptr)}set xmax(e){ke.__wbg_set_extent_xmax(this.__wbg_ptr,e)}set xmin(e){ke.__wbg_set_extent_xmin(this.__wbg_ptr,e)}set ymax(e){ke.__wbg_set_extent_ymax(this.__wbg_ptr,e)}set ymin(e){ke.__wbg_set_extent_ymin(this.__wbg_ptr,e)}}Symbol.dispose&&(i.prototype[Symbol.dispose]=i.prototype.free);class s{static __wrap(e){e>>>=0;const t=Object.create(s.prototype);return t.__wbg_ptr=e,j.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_fieldmetadata_free(e,0)}get type(){const e=ke.fieldmetadata_esri_type(this.__wbg_ptr);return O[e]}get logicalType(){const e=ke.fieldmetadata_logical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ce(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}get name(){let e,t;try{const _=ke.fieldmetadata_name(this.__wbg_ptr);return e=_[0],t=_[1],ce(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}get physicalType(){const e=ke.fieldmetadata_physical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ce(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}get is_nested(){return 0!==ke.__wbg_get_fieldmetadata_is_nested(this.__wbg_ptr)}set is_nested(e){ke.__wbg_set_fieldmetadata_is_nested(this.__wbg_ptr,e)}}Symbol.dispose&&(s.prototype[Symbol.dispose]=s.prototype.free);class o{static __wrap(e){e>>>=0;const t=Object.create(o.prototype);return t.__wbg_ptr=e,M.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_geometryfield_free(e,0)}static fromLocation(e,t,_,r){const n=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),i=Oe,s=ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),a=Oe,c=ke.geometryfield_fromLocation(n,i,s,a,_,r);if(c[2])throw Fe(c[1]);return o.__wrap(c[0])}static fromNative(e,t,_){const r=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),n=Oe,i=ke.geometryfield_fromNative(r,n,t,_);if(i[2])throw Fe(i[1]);return o.__wrap(i[0])}static fromWkb(e,t,_){const r=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),n=Oe,i=ke.geometryfield_fromWkb(r,n,t,_);if(i[2])throw Fe(i[1]);return o.__wrap(i[0])}}Symbol.dispose&&(o.prototype[Symbol.dispose]=o.prototype.free);class a{static __wrap(e){e>>>=0;const t=Object.create(a.prototype);return t.__wbg_ptr=e,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_geometryinfo_free(e,0)}static new(){const e=ke.geometryinfo_new();if(e[2])throw Fe(e[1]);return a.__wrap(e[0])}setGeometry(e){N(e,o);var t=e.__destroy_into_raw();ke.geometryinfo_setGeometry(this.__wbg_ptr,t)}setOptmizationXZ(e){N(e,r);var t=e.__destroy_into_raw();const _=ke.geometryinfo_setOptmizationXZ(this.__wbg_ptr,t);if(_[1])throw Fe(_[0])}setOptmizationZ(e){N(e,n);var t=e.__destroy_into_raw();const _=ke.geometryinfo_setOptmizationZ(this.__wbg_ptr,t);if(_[1])throw Fe(_[0])}}Symbol.dispose&&(a.prototype[Symbol.dispose]=a.prototype.free);const c=Object.freeze({Point:0,0:"Point",Polygon:1,1:"Polygon",Polyline:2,2:"Polyline",Multipoint:3,3:"Multipoint"});class u{static __wrap(e){e>>>=0;const t=Object.create(u.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_multiscalegeometryfield_free(e,0)}get level(){return ke.__wbg_get_multiscalegeometryfield_level(this.__wbg_ptr)}get scale(){return ke.__wbg_get_multiscalegeometryfield_scale(this.__wbg_ptr)}has_field(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe;return 0!==ke.multiscalegeometryfield_has_field(this.__wbg_ptr,t,_)}static new(e,t,_,r,n){const i=ze(_,ke.__wbindgen_malloc,ke.__wbindgen_realloc),s=Oe,o=he(r,ke.__wbindgen_malloc),a=Oe,c=he(n,ke.__wbindgen_malloc),l=Oe,g=ke.multiscalegeometryfield_new(e,t,i,s,o,a,c,l);return u.__wrap(g)}set level(e){ke.__wbg_set_multiscalegeometryfield_level(this.__wbg_ptr,e)}set scale(e){ke.__wbg_set_multiscalegeometryfield_scale(this.__wbg_ptr,e)}}Symbol.dispose&&(u.prototype[Symbol.dispose]=u.prototype.free);class l{static __wrap(e){e>>>=0;const t=Object.create(l.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_pageencodingdescriptor_free(e,0)}count(){return ke.pageencodingdescriptor_count(this.__wbg_ptr)}encoding(){let e,t;try{const _=ke.pageencodingdescriptor_encoding(this.__wbg_ptr);return e=_[0],t=_[1],ce(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}pageType(){let e,t;try{const _=ke.pageencodingdescriptor_pageType(this.__wbg_ptr);return e=_[0],t=_[1],ce(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}}Symbol.dispose&&(l.prototype[Symbol.dispose]=l.prototype.free);class g{static __wrap(e){e>>>=0;const t=Object.create(g.prototype);return t.__wbg_ptr=e,E.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,E.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_parquetchunk_free(e,0)}boundsXMax(e){const t=ke.parquetchunk_boundsXMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsXMin(e){const t=ke.parquetchunk_boundsXMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMax(e){const t=ke.parquetchunk_boundsYMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMin(e){const t=ke.parquetchunk_boundsYMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}static deserialize(e){const t=ye(e,ke.__wbindgen_malloc),_=Oe,r=ke.parquetchunk_deserialize(t,_);return g.__wrap(r)}hasColumn(e){return 0!==ke.parquetchunk_hasColumn(this.__wbg_ptr,e)}insertPatch(e){N(e,b);var t=e.__destroy_into_raw();ke.parquetchunk_insertPatch(this.__wbg_ptr,t)}insertPatchBytes(e){const t=ye(e,ke.__wbindgen_malloc),_=Oe;ke.parquetchunk_insertPatchBytes(this.__wbg_ptr,t,_)}readAttribute(e,t){return ke.parquetchunk_readAttribute(this.__wbg_ptr,e,t)}readCoordsUnsafe(e){return ke.parquetchunk_readCoordsUnsafe(this.__wbg_ptr,e)}readIdsUnsafe(){return ke.parquetchunk_readIdsUnsafe(this.__wbg_ptr)}readLengthsUnsafe(e){return ke.parquetchunk_readLengthsUnsafe(this.__wbg_ptr,e)}readPointCoordsQuantizedUnsafe(){return ke.parquetchunk_readPointCoordsQuantizedUnsafe(this.__wbg_ptr)}readPointCoordsUnsafe(){return ke.parquetchunk_readPointCoordsUnsafe(this.__wbg_ptr)}readX(e){const t=ke.parquetchunk_readX(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}readY(e){const t=ke.parquetchunk_readY(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}rowGroup(){return ke.parquetchunk_rowGroup(this.__wbg_ptr)>>>0}rowId(e){return ke.parquetchunk_rowId(this.__wbg_ptr,e)}serialize(){const e=ke.parquetchunk_serialize(this.__wbg_ptr);var t=_e(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],1*e[1],1),t}size(){return ke.parquetchunk_size(this.__wbg_ptr)>>>0}transformGeometry(e,t,_,r,n,i){N(e,w);const s=ke.parquetchunk_transformGeometry(this.__wbg_ptr,e.__wbg_ptr,t,_,r,n,i);return 16777215===s?void 0:0!==s}}Symbol.dispose&&(g.prototype[Symbol.dispose]=g.prototype.free);class p{static __wrap(e){e>>>=0;const t=Object.create(p.prototype);return t.__wbg_ptr=e,G.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_parquetfile_free(e,0)}byteLength(){return ke.parquetfile_byteLength(this.__wbg_ptr)}compressionCodecs(){const e=ke.parquetfile_compressionCodecs(this.__wbg_ptr);var t=ee(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],4*e[1],4),t}createChunkPatch(e,t,_,r){const n=fe(t,ke.__wbindgen_malloc),i=Oe,s=me(_,ke.__wbindgen_malloc),o=Oe;return ke.parquetfile_createChunkPatch(this.__wbg_ptr,e,n,i,s,o,we(r)?0:Q(r))}createdBy(){const e=ke.parquetfile_createdBy(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ce(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}executeQuery(e,t,_){N(e,d);return ke.parquetfile_executeQuery(this.__wbg_ptr,e.__wbg_ptr,t,we(_)?0:Q(_))}fields(e){const t=ke.parquetfile_fields(this.__wbg_ptr,e);var _=ee(t[0],t[1]).slice();return ke.__wbindgen_free(t[0],4*t[1],4),_}static fromBinary(e,t){const _=ye(e,ke.__wbindgen_malloc),r=Oe;let n=0;we(t)||(N(t,a),n=t.__destroy_into_raw());return ke.parquetfile_fromBinary(_,r,n)}static fromUrl(e,t,_,r){const n=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),i=Oe;let s=0;we(r)||(N(r,a),s=r.__destroy_into_raw());return ke.parquetfile_fromUrl(n,i,t,_,s)}getColumnDescriptor(t){const _=ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Oe,n=ke.parquetfile_getColumnDescriptor(this.__wbg_ptr,_,r);return e.__wrap(n)}getColumnDescriptors(){const e=ke.parquetfile_getColumnDescriptors(this.__wbg_ptr);var t=ee(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],4*e[1],4),t}getColumnId(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe,r=ke.parquetfile_getColumnId(this.__wbg_ptr,t,_);return 4294967297===r?void 0:r}keyValueMetadata(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe,r=ke.parquetfile_keyValueMetadata(this.__wbg_ptr,t,_);let n;return 0!==r[0]&&(n=ce(r[0],r[1]).slice(),ke.__wbindgen_free(r[0],1*r[1],1)),n}keys(){const e=ke.parquetfile_keys(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ee(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],4*e[1],4)),t}numColumns(){return ke.parquetfile_numColumns(this.__wbg_ptr)>>>0}numFields(){return ke.parquetfile_numFields(this.__wbg_ptr)>>>0}numRows(){return ke.parquetfile_numRows(this.__wbg_ptr)>>>0}readAttribute(e,t,_){return ke.parquetfile_readAttribute(this.__wbg_ptr,e,t,_)}rowGroups(){const e=ke.parquetfile_rowGroups(this.__wbg_ptr);var t=ee(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],4*e[1],4),t}updateChunkFields(e,t,_){N(e,g);const r=me(t,ke.__wbindgen_malloc),n=Oe;return ke.parquetfile_updateChunkFields(this.__wbg_ptr,e.__wbg_ptr,r,n,we(_)?0:Q(_))}version(){return ke.parquetfile_version(this.__wbg_ptr)}}Symbol.dispose&&(p.prototype[Symbol.dispose]=p.prototype.free);class b{static __wrap(e){e>>>=0;const t=Object.create(b.prototype);return t.__wbg_ptr=e,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_parquetpatchchunk_free(e,0)}static deserialize(e){const t=ye(e,ke.__wbindgen_malloc),_=Oe,r=ke.parquetpatchchunk_deserialize(t,_);return b.__wrap(r)}serialize(){const e=ke.parquetpatchchunk_serialize(this.__wbg_ptr);var t=_e(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],1*e[1],1),t}}Symbol.dispose&&(b.prototype[Symbol.dispose]=b.prototype.free);class w{static __wrap(e){e>>>=0;const t=Object.create(w.prototype);return t.__wbg_ptr=e,B.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_quantizedgeometrybuffer_free(e,0)}static new(){const e=ke.quantizedgeometrybuffer_new();return w.__wrap(e)}readCoordsUnsafe(){return ke.quantizedgeometrybuffer_readCoordsUnsafe(this.__wbg_ptr)}readLengthsUnsafe(){return ke.quantizedgeometrybuffer_readLengthsUnsafe(this.__wbg_ptr)}}Symbol.dispose&&(w.prototype[Symbol.dispose]=w.prototype.free);class d{static __wrap(e){e>>>=0;const t=Object.create(d.prototype);return t.__wbg_ptr=e,X.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_query_free(e,0)}static new(){const e=ke.query_new();return d.__wrap(e)}setExtent(e){ke.query_setExtent(this.__wbg_ptr,e)}setIds(e){const t=fe(e,ke.__wbindgen_malloc),_=Oe;ke.query_setIds(this.__wbg_ptr,t,_)}setOutFields(e){const t=me(e,ke.__wbindgen_malloc),_=Oe;ke.query_setOutFields(this.__wbg_ptr,t,_)}setOutSpatialReference(e){const t=ke.query_setOutSpatialReference(this.__wbg_ptr,e);if(t[1])throw Fe(t[0])}setPostFilterCount(e){ke.query_setPostFilterCount(this.__wbg_ptr,e)}setPostFilterStart(e){ke.query_setPostFilterStart(this.__wbg_ptr,e)}setPreFilterCount(e){ke.query_setPreFilterCount(this.__wbg_ptr,e)}setPreFilterStart(e){ke.query_setPreFilterStart(this.__wbg_ptr,e)}setQuantizationTransform(e){ke.query_setQuantizationTransform(this.__wbg_ptr,e)}setReturnGeometry(e){ke.query_setReturnGeometry(this.__wbg_ptr,e)}setScale(e){ke.query_setScale(this.__wbg_ptr,e)}setWhere(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Oe;ke.query_setWhere(this.__wbg_ptr,t,_)}setWhereEvaluator(e){ke.query_setWhereEvaluator(this.__wbg_ptr,e)}setWhereFields(e){const t=me(e,ke.__wbindgen_malloc),_=Oe;ke.query_setWhereFields(this.__wbg_ptr,t,_)}}Symbol.dispose&&(d.prototype[Symbol.dispose]=d.prototype.free);class f{static __wrap(e){e>>>=0;const t=Object.create(f.prototype);return t.__wbg_ptr=e,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_querystream_free(e,0)}next(e){return ke.querystream_next(this.__wbg_ptr,we(e)?0:Q(e))}}Symbol.dispose&&(f.prototype[Symbol.dispose]=f.prototype.free);class y{static __wrap(e){e>>>=0;const t=Object.create(y.prototype);return t.__wbg_ptr=e,H.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_rangeproviderjs_free(e,0)}static new(e,t){const _=ke.rangeproviderjs_new(e,t);return y.__wrap(_)}static withFetch(){const e=ke.rangeproviderjs_withFetch();return y.__wrap(e)}}Symbol.dispose&&(y.prototype[Symbol.dispose]=y.prototype.free);class h{static __wrap(e){e>>>=0;const t=Object.create(h.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_rowgroup_free(e,0)}columnDescriptorForAttribute(t){const _=ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Oe,n=ke.rowgroup_columnDescriptorForAttribute(this.__wbg_ptr,_,r);return e.__wrap(n)}}Symbol.dispose&&(h.prototype[Symbol.dispose]=h.prototype.free);class m{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_rowgroupid_free(e,0)}}function z(){ke.enableTracing()}function F(e,t,_,r,n){const i=ke.getXZCodeRanges(e,t,_,r,n);if(i[2])throw Fe(i[1]);return Fe(i[0])}function q(e,t,_,r,n,i,s){const o=ke.queryIntersectsXYStatistics(e,t,_,r,n,i,s);if(o[2])throw Fe(o[1]);return 0!==o[0]}function x(e,t,_,r,n,i,s){const o=ke.queryIntersectsXZStatistics(e,t,_,r,n,i,s);if(o[2])throw Fe(o[1]);return 0!==o[0]}function v(){const t={__proto__:null,__wbg___wbindgen_is_function_3baa9db1a987f47d:function(e){return"function"==typeof e},__wbg___wbindgen_is_undefined_29a43b4d42920abd:function(e){return void 0===e},__wbg___wbindgen_number_get_c7f42aed0525c451:function(e,t){const _="number"==typeof t?t:void 0;ne().setFloat64(e+8,we(_)?0:_,!0),ne().setInt32(e+0,!we(_),!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(e,t){const _="string"==typeof t?t:void 0;var r=we(_)?0:ze(_,ke.__wbindgen_malloc,ke.__wbindgen_realloc),n=Oe;ne().setInt32(e+4,n,!0),ne().setInt32(e+0,r,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw new Error(ce(e,t))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(e){e._wbg_cb_unref()},__wbg_aborted_072e5543dce0fc05:function(e){return e.aborted},__wbg_apply_4c35bd236dda9c14:function(){return be(function(e,t,_){return e.apply(t,_)},arguments)},__wbg_call_86e39d65afc3d9db:function(){return be(function(e,t,_,r,n){return e.call(t,_,r,n)},arguments)},__wbg_call_a24592a6f349a97e:function(){return be(function(e,t,_){return e.call(t,_)},arguments)},__wbg_columndescriptor_new:function(t){return e.__wrap(t)},__wbg_error_a6fa202b58aa1cd3:function(e,t){let _,r;try{_=e,r=t,console.error(ce(e,t))}finally{ke.__wbindgen_free(_,r,1)}},__wbg_fieldmetadata_new:function(e){return s.__wrap(e)},__wbg_get_6011fa3a58f61074:function(){return be(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_8360291721e2339f:function(e,t){return e[t>>>0]},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_0c7403db6e782f19:function(e){return new Uint8Array(e)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_5e360d2ff7b9e1c3:function(e,t){return new Error(ce(e,t))},__wbg_new_682678e2f47e32bc:function(){return new Array},__wbg_new_8bc2b540bbfdbb81:function(e){return new Uint32Array(e)},__wbg_new_from_slice_158b7b5c2056cc2c:function(e,t){return new Int16Array(K(e,t))},__wbg_new_from_slice_3115b094b1002246:function(e,t){return new Float64Array(J(e,t))},__wbg_new_no_args_a5300b4b3ea60351:function(e,t){return new Function(ce(e,t))},__wbg_new_typed_323f37fd55ab048d:function(e,t){try{var _={a:e,b:t},r=(e,t)=>{const r=_.a;_.a=0;try{return R(r,_.b,e,t)}finally{_.a=r}};return new Promise(r)}finally{_.a=0}},__wbg_new_with_length_223c4ea248649e55:function(e){return new Array(e>>>0)},__wbg_pageencodingdescriptor_new:function(e){return l.__wrap(e)},__wbg_parquetchunk_new:function(e){return g.__wrap(e)},__wbg_parquetfile_new:function(e){return p.__wrap(e)},__wbg_parquetpatchchunk_new:function(e){return b.__wrap(e)},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,_){Uint8Array.prototype.set.call(_e(e,t),_)},__wbg_push_471a5b068a5295f6:function(e,t){return e.push(t)},__wbg_querystream_new:function(e){return f.__wrap(e)},__wbg_queueMicrotask_5d15a957e6aa920e:function(e){queueMicrotask(e)},__wbg_queueMicrotask_f8819e5ffc402f36:function(e){return e.queueMicrotask},__wbg_resolve_e6c466bc1052f16c:function(e){return Promise.resolve(e)},__wbg_rowgroup_new:function(e){return h.__wrap(e)},__wbg_set_3bf1de9fab0cd644:function(e,t,_){e[t>>>0]=_},__wbg_set_name_f49c6e6bbfc8a63b:function(e,t,_){e.name=ce(t,_)},__wbg_stack_3b0d974bbf31e44f:function(e,t){const _=ze(t.stack,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Oe;ne().setInt32(e+4,r,!0),ne().setInt32(e+0,_,!0)},__wbg_static_accessor_GLOBAL_8cfadc87a297ca02:function(){const e="undefined"==typeof global?null:global;return we(e)?0:Q(e)},__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf:function(){const e="undefined"==typeof globalThis?null:globalThis;return we(e)?0:Q(e)},__wbg_static_accessor_SELF_e445c1c7484aecc3:function(){const e="undefined"==typeof self?null:self;return we(e)?0:Q(e)},__wbg_static_accessor_WINDOW_f20e8576ef1e0f17:function(){const e="undefined"==typeof window?null:window;return we(e)?0:Q(e)},__wbg_then_792e0c862b060889:function(e,t,_){return e.then(t,_)},__wbg_then_8e16ee11f05e4827:function(e,t){return e.then(t)},__wbg_valueOf_25e11684e38026ef:function(e){return e.valueOf()},__wbg_valueOf_91a54faf8ce0976a:function(e){return e.valueOf()},__wbindgen_cast_0000000000000001:function(e,t){return de(e,t,S)},__wbindgen_cast_0000000000000002:function(e){return e},__wbindgen_cast_0000000000000003:function(e){return e},__wbindgen_cast_0000000000000004:function(e,t){return J(e,t)},__wbindgen_cast_0000000000000005:function(e,t){return K(e,t)},__wbindgen_cast_0000000000000006:function(e,t){return te(e,t)},__wbindgen_cast_0000000000000007:function(e,t){return _e(e,t)},__wbindgen_cast_0000000000000008:function(e,t){return ce(e,t)},__wbindgen_cast_0000000000000009:function(e,t){var _=_e(e,t).slice();ke.__wbindgen_free(e,1*t,1);return _},__wbindgen_init_externref_table:function(){const e=ke.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}};return{__proto__:null,"./bundle_bg.js":t}}function S(e,t,_){const r=ke.wasm_bindgen__convert__closures_____invoke__h0f8118aa5481cebe(e,t,_);if(r[1])throw Fe(r[0])}function R(e,t,_,r){ke.wasm_bindgen__convert__closures_____invoke__h40273f30e88f7d49(e,t,_,r)}Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);const k=["boolean","int32","int64","int96","float","double","byte-array","fixed-byte-array"],O=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],C="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_columndescriptor_free(e>>>0,1)),T="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_columnid_free(e>>>0,1)),P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_displayoptimizationxzbuilder_free(e>>>0,1)),I="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_displayoptimizationzbuilder_free(e>>>0,1)),A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_extent_free(e>>>0,1)),j="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_fieldmetadata_free(e>>>0,1)),M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_geometryfield_free(e>>>0,1)),U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_geometryinfo_free(e>>>0,1)),L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_multiscalegeometryfield_free(e>>>0,1)),W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_pageencodingdescriptor_free(e>>>0,1)),E="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_parquetchunk_free(e>>>0,1)),G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_parquetfile_free(e>>>0,1)),D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_parquetpatchchunk_free(e>>>0,1)),B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_quantizedgeometrybuffer_free(e>>>0,1)),X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_query_free(e>>>0,1)),Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_querystream_free(e>>>0,1)),H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_rangeproviderjs_free(e>>>0,1)),V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_rowgroup_free(e>>>0,1)),Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_rowgroupid_free(e>>>0,1));function Q(e){const t=ke.__externref_table_alloc();return ke.__wbindgen_externrefs.set(t,e),t}function N(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbindgen_destroy_closure(e.a,e.b));function J(e,t){return e>>>=0,se().subarray(e/8,e/8+t)}function K(e,t){return e>>>=0,ae().subarray(e/2,e/2+t)}function ee(e,t){e>>>=0;const _=ne(),r=[];for(let n=e;n<e+4*t;n+=4)r.push(ke.__wbindgen_externrefs.get(_.getUint32(n,!0)));return ke.__externref_drop_slice(e,t),r}function te(e,t){return e>>>=0,le().subarray(e/4,e/4+t)}function _e(e,t){return e>>>=0,pe().subarray(e/1,e/1+t)}let re=null;function ne(){return(null===re||!0===re.buffer.detached||void 0===re.buffer.detached&&re.buffer!==ke.memory.buffer)&&(re=new DataView(ke.memory.buffer)),re}let ie=null;function se(){return null!==ie&&0!==ie.byteLength||(ie=new Float64Array(ke.memory.buffer)),ie}let oe=null;function ae(){return null!==oe&&0!==oe.byteLength||(oe=new Int16Array(ke.memory.buffer)),oe}function ce(e,t){return Se(e>>>=0,t)}let ue=null;function le(){return null!==ue&&0!==ue.byteLength||(ue=new Uint32Array(ke.memory.buffer)),ue}let ge=null;function pe(){return null!==ge&&0!==ge.byteLength||(ge=new Uint8Array(ke.memory.buffer)),ge}function be(e,t){try{return e.apply(this,t)}catch(_){const e=Q(_);ke.__wbindgen_exn_store(e)}}function we(e){return null==e}function de(e,t,_){const r={a:e,b:t,cnt:1},n=(...e)=>{r.cnt++;const t=r.a;r.a=0;try{return _(t,r.b,...e)}finally{r.a=t,n._wbg_cb_unref()}};return n._wbg_cb_unref=()=>{0===--r.cnt&&(ke.__wbindgen_destroy_closure(r.a,r.b),r.a=0,$.unregister(r))},$.register(n,r,r),n}function fe(e,t){const _=t(4*e.length,4)>>>0;return le().set(e,_/4),Oe=e.length,_}function ye(e,t){const _=t(1*e.length,1)>>>0;return pe().set(e,_/1),Oe=e.length,_}function he(e,t){const _=t(8*e.length,8)>>>0;return se().set(e,_/8),Oe=e.length,_}function me(e,t){const _=t(4*e.length,4)>>>0;for(let r=0;r<e.length;r++){const t=Q(e[r]);ne().setUint32(_+4*r,t,!0)}return Oe=e.length,_}function ze(e,t,_){if(void 0===_){const _=Re.encode(e),r=t(_.length,1)>>>0;return pe().subarray(r,r+_.length).set(_),Oe=_.length,r}let r=e.length,n=t(r,1)>>>0;const i=pe();let s=0;for(;s<r;s++){const t=e.charCodeAt(s);if(t>127)break;i[n+s]=t}if(s!==r){0!==s&&(e=e.slice(s)),n=_(n,r,r=s+3*e.length,1)>>>0;const t=pe().subarray(n+s,n+r);s+=Re.encodeInto(e,t).written,n=_(n,r,s,1)>>>0}return Oe=s,n}function Fe(e){const t=ke.__wbindgen_externrefs.get(e);return ke.__externref_table_dealloc(e),t}let qe=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});qe.decode();const xe=2146435072;let ve=0;function Se(e,t){return ve+=t,ve>=xe&&(qe=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),qe.decode(),ve=t),qe.decode(pe().subarray(e,e+t))}const Re=new TextEncoder;"encodeInto"in Re||(Re.encodeInto=function(e,t){const _=Re.encode(e);return t.set(_),{read:e.length,written:_.length}});let ke,Oe=0;function Ce(e,t){return ke=e.exports,re=null,ie=null,oe=null,ue=null,ge=null,ke.__wbindgen_start(),ke}async function Te(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(!(e.ok&&_(e.type))||"application/wasm"===e.headers.get("Content-Type"))throw r;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const _=await WebAssembly.instantiate(e,t);return _ instanceof WebAssembly.Instance?{instance:_,module:e}:_}function _(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}}function Pe(e){if(void 0!==ke)return ke;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=v();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return Ce(new WebAssembly.Instance(e,t))}async function Ie(e){if(void 0!==ke)return ke;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=v();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:_,module:r}=await Te(await e,t);return Ce(_)}export{e as ColumnDescriptor,t as ColumnId,_ as DisplayEncoding,r as DisplayOptimizationXZBuilder,n as DisplayOptimizationZBuilder,i as Extent,s as FieldMetadata,o as GeometryField,a as GeometryInfo,c as GeometryType,u as MultiscaleGeometryField,l as PageEncodingDescriptor,g as ParquetChunk,p as ParquetFile,b as ParquetPatchChunk,w as QuantizedGeometryBuffer,d as Query,f as QueryStream,y as RangeProviderJs,h as RowGroup,m as RowGroupId,Ie as default,z as enableTracing,F as getXZCodeRanges,Pe as initSync,q as queryIntersectsXYStatistics,x as queryIntersectsXZStatistics};
2
+ class e{static __wrap(t){t>>>=0;const _=Object.create(e.prototype);return _.__wbg_ptr=t,O.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,O.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_columndescriptor_free(e,0)}compressedSize(){return ke.columndescriptor_compressedSize(this.__wbg_ptr)}compression(){let e,t;try{const _=ke.columndescriptor_compression(this.__wbg_ptr);return e=_[0],t=_[1],ue(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}distinctCount(){const e=ke.columndescriptor_distinctCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}encodings(){return ke.columndescriptor_encodings(this.__wbg_ptr)}logicalType(){const e=ke.columndescriptor_logicalType(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ue(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}maxValue(){return ke.columndescriptor_maxValue(this.__wbg_ptr)}minValue(){return ke.columndescriptor_minValue(this.__wbg_ptr)}name(){let e,t;try{const _=ke.columndescriptor_name(this.__wbg_ptr);return e=_[0],t=_[1],ue(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}nullCount(){const e=ke.columndescriptor_nullCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}numValues(){return ke.columndescriptor_numValues(this.__wbg_ptr)}pageEncodings(){const e=ke.columndescriptor_pageEncodings(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ee(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],4*e[1],4)),t}physicalType(){const e=ke.columndescriptor_physicalType(this.__wbg_ptr);return k[e]}uncompressedSize(){return ke.columndescriptor_uncompressedSize(this.__wbg_ptr)}}Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);class t{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,T.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_columnid_free(e,0)}}Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);const _=Object.freeze({PBF:0,0:"PBF"});class r{static __wrap(e){e>>>=0;const t=Object.create(r.prototype);return t.__wbg_ptr=e,M.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_displayoptimizationxzbuilder_free(e,0)}addLevel(e){N(e,c);var t=e.__destroy_into_raw();ke.displayoptimizationxzbuilder_addLevel(this.__wbg_ptr,t)}static new(){const e=ke.displayoptimizationxzbuilder_new();return r.__wrap(e)}setCodeField(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;ke.displayoptimizationxzbuilder_setCodeField(this.__wbg_ptr,t,_)}setEncoding(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce,r=ke.displayoptimizationxzbuilder_setEncoding(this.__wbg_ptr,t,_);if(r[1])throw Fe(r[0])}setFullExtent(e){ke.displayoptimizationxzbuilder_setFullExtent(this.__wbg_ptr,e)}setGeometryType(e){ke.displayoptimizationxzbuilder_setGeometryType(this.__wbg_ptr,e)}setHasM(e){ke.displayoptimizationxzbuilder_setHasM(this.__wbg_ptr,e)}setHasZ(e){ke.displayoptimizationxzbuilder_setHasZ(this.__wbg_ptr,e)}setMaxLevel(e){ke.displayoptimizationxzbuilder_setMaxLevel(this.__wbg_ptr,e)}setSpatialReference(e,t){var _=we(t)?0:ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Ce;const n=ke.displayoptimizationxzbuilder_setSpatialReference(this.__wbg_ptr,we(e)?4294967297:e>>>0,_,r);if(n[1])throw Fe(n[0])}}Symbol.dispose&&(r.prototype[Symbol.dispose]=r.prototype.free);class n{static __wrap(e){e>>>=0;const t=Object.create(n.prototype);return t.__wbg_ptr=e,P.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_displayoptimizationzbuilder_free(e,0)}static new(){const e=ke.displayoptimizationzbuilder_new();return n.__wrap(e)}setCodeField(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;ke.displayoptimizationzbuilder_setCodeField(this.__wbg_ptr,t,_)}setCooordinatePrecision(e){ke.displayoptimizationzbuilder_setCooordinatePrecision(this.__wbg_ptr,e)}setFullExtent(e){ke.displayoptimizationzbuilder_setFullExtent(this.__wbg_ptr,e)}setHasM(e){ke.displayoptimizationzbuilder_setHasM(this.__wbg_ptr,e)}setHasZ(e){ke.displayoptimizationzbuilder_setHasZ(this.__wbg_ptr,e)}setMColumn(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;ke.displayoptimizationzbuilder_setMColumn(this.__wbg_ptr,t,_)}setSpatialReference(e,t){var _=we(t)?0:ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Ce;const n=ke.displayoptimizationzbuilder_setSpatialReference(this.__wbg_ptr,we(e)?4294967297:e>>>0,_,r);if(n[1])throw Fe(n[0])}setXColumn(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;ke.displayoptimizationzbuilder_setXColumn(this.__wbg_ptr,t,_)}setYColumn(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;ke.displayoptimizationzbuilder_setYColumn(this.__wbg_ptr,t,_)}setZColumn(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;ke.displayoptimizationzbuilder_setZColumn(this.__wbg_ptr,t,_)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);class i{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,I.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_extent_free(e,0)}get xmax(){return ke.__wbg_get_extent_xmax(this.__wbg_ptr)}get xmin(){return ke.__wbg_get_extent_xmin(this.__wbg_ptr)}get ymax(){return ke.__wbg_get_extent_ymax(this.__wbg_ptr)}get ymin(){return ke.__wbg_get_extent_ymin(this.__wbg_ptr)}set xmax(e){ke.__wbg_set_extent_xmax(this.__wbg_ptr,e)}set xmin(e){ke.__wbg_set_extent_xmin(this.__wbg_ptr,e)}set ymax(e){ke.__wbg_set_extent_ymax(this.__wbg_ptr,e)}set ymin(e){ke.__wbg_set_extent_ymin(this.__wbg_ptr,e)}}Symbol.dispose&&(i.prototype[Symbol.dispose]=i.prototype.free);class s{static __wrap(e){e>>>=0;const t=Object.create(s.prototype);return t.__wbg_ptr=e,A.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_fieldmetadata_free(e,0)}get type(){const e=ke.fieldmetadata_esri_type(this.__wbg_ptr);return C[e]}get logicalType(){const e=ke.fieldmetadata_logical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ue(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}get name(){let e,t;try{const _=ke.fieldmetadata_name(this.__wbg_ptr);return e=_[0],t=_[1],ue(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}get physicalType(){const e=ke.fieldmetadata_physical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ue(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}get is_nested(){return 0!==ke.__wbg_get_fieldmetadata_is_nested(this.__wbg_ptr)}set is_nested(e){ke.__wbg_set_fieldmetadata_is_nested(this.__wbg_ptr,e)}}Symbol.dispose&&(s.prototype[Symbol.dispose]=s.prototype.free);class o{static __wrap(e){e>>>=0;const t=Object.create(o.prototype);return t.__wbg_ptr=e,j.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_geometryfield_free(e,0)}static fromLocation(e,t,_,r){const n=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),i=Ce,s=ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),a=Ce,u=ke.geometryfield_fromLocation(n,i,s,a,_,r);if(u[2])throw Fe(u[1]);return o.__wrap(u[0])}static fromWkb(e,t,_){const r=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),n=Ce,i=ke.geometryfield_fromWkb(r,n,t,_);if(i[2])throw Fe(i[1]);return o.__wrap(i[0])}}Symbol.dispose&&(o.prototype[Symbol.dispose]=o.prototype.free);class a{static __wrap(e){e>>>=0;const t=Object.create(a.prototype);return t.__wbg_ptr=e,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_geometryinfo_free(e,0)}static new(){const e=ke.geometryinfo_new();if(e[2])throw Fe(e[1]);return a.__wrap(e[0])}setGeometry(e){N(e,o);var t=e.__destroy_into_raw();ke.geometryinfo_setGeometry(this.__wbg_ptr,t)}setOptmizationXZ(e){N(e,r);var t=e.__destroy_into_raw();const _=ke.geometryinfo_setOptmizationXZ(this.__wbg_ptr,t);if(_[1])throw Fe(_[0])}setOptmizationZ(e){N(e,n);var t=e.__destroy_into_raw();const _=ke.geometryinfo_setOptmizationZ(this.__wbg_ptr,t);if(_[1])throw Fe(_[0])}}Symbol.dispose&&(a.prototype[Symbol.dispose]=a.prototype.free);const u=Object.freeze({Point:0,0:"Point",Polygon:1,1:"Polygon",Polyline:2,2:"Polyline",Multipoint:3,3:"Multipoint"});class c{static __wrap(e){e>>>=0;const t=Object.create(c.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_multiscalegeometryfield_free(e,0)}get level(){return ke.__wbg_get_multiscalegeometryfield_level(this.__wbg_ptr)}get scale(){return ke.__wbg_get_multiscalegeometryfield_scale(this.__wbg_ptr)}has_field(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;return 0!==ke.multiscalegeometryfield_has_field(this.__wbg_ptr,t,_)}static new(e,t,_,r,n){const i=ze(_,ke.__wbindgen_malloc,ke.__wbindgen_realloc),s=Ce,o=he(r,ke.__wbindgen_malloc),a=Ce,u=he(n,ke.__wbindgen_malloc),l=Ce,g=ke.multiscalegeometryfield_new(e,t,i,s,o,a,u,l);return c.__wrap(g)}set level(e){ke.__wbg_set_multiscalegeometryfield_level(this.__wbg_ptr,e)}set scale(e){ke.__wbg_set_multiscalegeometryfield_scale(this.__wbg_ptr,e)}}Symbol.dispose&&(c.prototype[Symbol.dispose]=c.prototype.free);class l{static __wrap(e){e>>>=0;const t=Object.create(l.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_pageencodingdescriptor_free(e,0)}count(){return ke.pageencodingdescriptor_count(this.__wbg_ptr)}encoding(){let e,t;try{const _=ke.pageencodingdescriptor_encoding(this.__wbg_ptr);return e=_[0],t=_[1],ue(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}pageType(){let e,t;try{const _=ke.pageencodingdescriptor_pageType(this.__wbg_ptr);return e=_[0],t=_[1],ue(_[0],_[1])}finally{ke.__wbindgen_free(e,t,1)}}}Symbol.dispose&&(l.prototype[Symbol.dispose]=l.prototype.free);class g{static __wrap(e){e>>>=0;const t=Object.create(g.prototype);return t.__wbg_ptr=e,E.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,E.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_parquetchunk_free(e,0)}boundsXMax(e){const t=ke.parquetchunk_boundsXMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsXMin(e){const t=ke.parquetchunk_boundsXMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMax(e){const t=ke.parquetchunk_boundsYMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMin(e){const t=ke.parquetchunk_boundsYMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}coordinateStride(){return ke.parquetchunk_coordinateStride(this.__wbg_ptr)>>>0}static deserialize(e){const t=ye(e,ke.__wbindgen_malloc),_=Ce,r=ke.parquetchunk_deserialize(t,_);return g.__wrap(r)}hasColumn(e){return 0!==ke.parquetchunk_hasColumn(this.__wbg_ptr,e)}hasM(){return 0!==ke.parquetchunk_hasM(this.__wbg_ptr)}hasZ(){return 0!==ke.parquetchunk_hasZ(this.__wbg_ptr)}insertPatch(e){N(e,b);var t=e.__destroy_into_raw();ke.parquetchunk_insertPatch(this.__wbg_ptr,t)}insertPatchBytes(e){const t=ye(e,ke.__wbindgen_malloc),_=Ce;ke.parquetchunk_insertPatchBytes(this.__wbg_ptr,t,_)}readAttribute(e,t){return ke.parquetchunk_readAttribute(this.__wbg_ptr,e,t)}readCoordsUnsafe(e){return ke.parquetchunk_readCoordsUnsafe(this.__wbg_ptr,e)}readIdsUnsafe(){return ke.parquetchunk_readIdsUnsafe(this.__wbg_ptr)}readLengthsUnsafe(e){return ke.parquetchunk_readLengthsUnsafe(this.__wbg_ptr,e)}readPointCoordsQuantizedUnsafe(){return ke.parquetchunk_readPointCoordsQuantizedUnsafe(this.__wbg_ptr)}readPointCoordsUnsafe(){return ke.parquetchunk_readPointCoordsUnsafe(this.__wbg_ptr)}rowGroup(){return ke.parquetchunk_rowGroup(this.__wbg_ptr)>>>0}rowId(e){return ke.parquetchunk_rowId(this.__wbg_ptr,e)}serialize(){const e=ke.parquetchunk_serialize(this.__wbg_ptr);var t=_e(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],1*e[1],1),t}size(){return ke.parquetchunk_size(this.__wbg_ptr)>>>0}transformGeometry(e,t,_,r,n,i){N(e,w);const s=ke.parquetchunk_transformGeometry(this.__wbg_ptr,e.__wbg_ptr,t,_,r,n,i);return 16777215===s?void 0:0!==s}}Symbol.dispose&&(g.prototype[Symbol.dispose]=g.prototype.free);class p{static __wrap(e){e>>>=0;const t=Object.create(p.prototype);return t.__wbg_ptr=e,G.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_parquetfile_free(e,0)}byteLength(){return ke.parquetfile_byteLength(this.__wbg_ptr)}compressionCodecs(){const e=ke.parquetfile_compressionCodecs(this.__wbg_ptr);var t=ee(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],4*e[1],4),t}createChunkPatch(e,t,_,r){const n=fe(t,ke.__wbindgen_malloc),i=Ce,s=me(_,ke.__wbindgen_malloc),o=Ce;return ke.parquetfile_createChunkPatch(this.__wbg_ptr,e,n,i,s,o,we(r)?0:Q(r))}createdBy(){const e=ke.parquetfile_createdBy(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ue(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],1*e[1],1)),t}executeQuery(e,t,_){N(e,d);return ke.parquetfile_executeQuery(this.__wbg_ptr,e.__wbg_ptr,t,we(_)?0:Q(_))}fields(e){const t=ke.parquetfile_fields(this.__wbg_ptr,e);var _=ee(t[0],t[1]).slice();return ke.__wbindgen_free(t[0],4*t[1],4),_}static fromBinary(e,t){const _=ye(e,ke.__wbindgen_malloc),r=Ce;let n=0;we(t)||(N(t,a),n=t.__destroy_into_raw());return ke.parquetfile_fromBinary(_,r,n)}static fromUrl(e,t,_,r){const n=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),i=Ce;let s=0;we(r)||(N(r,a),s=r.__destroy_into_raw());return ke.parquetfile_fromUrl(n,i,t,_,s)}getColumnDescriptor(t){const _=ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Ce,n=ke.parquetfile_getColumnDescriptor(this.__wbg_ptr,_,r);return e.__wrap(n)}getColumnDescriptors(){const e=ke.parquetfile_getColumnDescriptors(this.__wbg_ptr);var t=ee(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],4*e[1],4),t}getColumnId(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce,r=ke.parquetfile_getColumnId(this.__wbg_ptr,t,_);return 4294967297===r?void 0:r}keyValueMetadata(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce,r=ke.parquetfile_keyValueMetadata(this.__wbg_ptr,t,_);let n;return 0!==r[0]&&(n=ue(r[0],r[1]).slice(),ke.__wbindgen_free(r[0],1*r[1],1)),n}keys(){const e=ke.parquetfile_keys(this.__wbg_ptr);let t;return 0!==e[0]&&(t=ee(e[0],e[1]).slice(),ke.__wbindgen_free(e[0],4*e[1],4)),t}numColumns(){return ke.parquetfile_numColumns(this.__wbg_ptr)>>>0}numFields(){return ke.parquetfile_numFields(this.__wbg_ptr)>>>0}numRows(){return ke.parquetfile_numRows(this.__wbg_ptr)>>>0}readAttribute(e,t,_){return ke.parquetfile_readAttribute(this.__wbg_ptr,e,t,_)}rowGroups(){const e=ke.parquetfile_rowGroups(this.__wbg_ptr);var t=ee(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],4*e[1],4),t}updateChunkFields(e,t,_){N(e,g);const r=me(t,ke.__wbindgen_malloc),n=Ce;return ke.parquetfile_updateChunkFields(this.__wbg_ptr,e.__wbg_ptr,r,n,we(_)?0:Q(_))}version(){return ke.parquetfile_version(this.__wbg_ptr)}}Symbol.dispose&&(p.prototype[Symbol.dispose]=p.prototype.free);class b{static __wrap(e){e>>>=0;const t=Object.create(b.prototype);return t.__wbg_ptr=e,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_parquetpatchchunk_free(e,0)}static deserialize(e){const t=ye(e,ke.__wbindgen_malloc),_=Ce,r=ke.parquetpatchchunk_deserialize(t,_);return b.__wrap(r)}serialize(){const e=ke.parquetpatchchunk_serialize(this.__wbg_ptr);var t=_e(e[0],e[1]).slice();return ke.__wbindgen_free(e[0],1*e[1],1),t}}Symbol.dispose&&(b.prototype[Symbol.dispose]=b.prototype.free);class w{static __wrap(e){e>>>=0;const t=Object.create(w.prototype);return t.__wbg_ptr=e,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_quantizedgeometrybuffer_free(e,0)}static new(){const e=ke.quantizedgeometrybuffer_new();return w.__wrap(e)}readCoordsUnsafe(){return ke.quantizedgeometrybuffer_readCoordsUnsafe(this.__wbg_ptr)}readLengthsUnsafe(){return ke.quantizedgeometrybuffer_readLengthsUnsafe(this.__wbg_ptr)}}Symbol.dispose&&(w.prototype[Symbol.dispose]=w.prototype.free);class d{static __wrap(e){e>>>=0;const t=Object.create(d.prototype);return t.__wbg_ptr=e,B.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_query_free(e,0)}static new(){const e=ke.query_new();return d.__wrap(e)}setExtent(e){ke.query_setExtent(this.__wbg_ptr,e)}setIds(e){const t=fe(e,ke.__wbindgen_malloc),_=Ce;ke.query_setIds(this.__wbg_ptr,t,_)}setOutFields(e){const t=me(e,ke.__wbindgen_malloc),_=Ce;ke.query_setOutFields(this.__wbg_ptr,t,_)}setOutSpatialReference(e){const t=ke.query_setOutSpatialReference(this.__wbg_ptr,e);if(t[1])throw Fe(t[0])}setPostFilterCount(e){ke.query_setPostFilterCount(this.__wbg_ptr,e)}setPostFilterStart(e){ke.query_setPostFilterStart(this.__wbg_ptr,e)}setPreFilterCount(e){ke.query_setPreFilterCount(this.__wbg_ptr,e)}setPreFilterStart(e){ke.query_setPreFilterStart(this.__wbg_ptr,e)}setQuantizationTransform(e){ke.query_setQuantizationTransform(this.__wbg_ptr,e)}setReturnGeometry(e){ke.query_setReturnGeometry(this.__wbg_ptr,e)}setReturnM(e){ke.query_setReturnM(this.__wbg_ptr,e)}setReturnZ(e){ke.query_setReturnZ(this.__wbg_ptr,e)}setScale(e){ke.query_setScale(this.__wbg_ptr,e)}setWhere(e){const t=ze(e,ke.__wbindgen_malloc,ke.__wbindgen_realloc),_=Ce;ke.query_setWhere(this.__wbg_ptr,t,_)}setWhereEvaluator(e){ke.query_setWhereEvaluator(this.__wbg_ptr,e)}setWhereFields(e){const t=me(e,ke.__wbindgen_malloc),_=Ce;ke.query_setWhereFields(this.__wbg_ptr,t,_)}}Symbol.dispose&&(d.prototype[Symbol.dispose]=d.prototype.free);class f{static __wrap(e){e>>>=0;const t=Object.create(f.prototype);return t.__wbg_ptr=e,X.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_querystream_free(e,0)}next(e){return ke.querystream_next(this.__wbg_ptr,we(e)?0:Q(e))}}Symbol.dispose&&(f.prototype[Symbol.dispose]=f.prototype.free);class y{static __wrap(e){e>>>=0;const t=Object.create(y.prototype);return t.__wbg_ptr=e,H.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_rangeproviderjs_free(e,0)}static new(e,t){const _=ke.rangeproviderjs_new(e,t);return y.__wrap(_)}static withFetch(){const e=ke.rangeproviderjs_withFetch();return y.__wrap(e)}}Symbol.dispose&&(y.prototype[Symbol.dispose]=y.prototype.free);class h{static __wrap(e){e>>>=0;const t=Object.create(h.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_rowgroup_free(e,0)}columnDescriptorForAttribute(t){const _=ze(t,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Ce,n=ke.rowgroup_columnDescriptorForAttribute(this.__wbg_ptr,_,r);return e.__wrap(n)}}Symbol.dispose&&(h.prototype[Symbol.dispose]=h.prototype.free);class m{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){const e=this.__destroy_into_raw();ke.__wbg_rowgroupid_free(e,0)}}function z(){ke.enableTracing()}function F(e,t,_,r,n){const i=ke.getXZCodeRanges(e,t,_,r,n);if(i[2])throw Fe(i[1]);return Fe(i[0])}function q(e,t,_,r,n,i,s){const o=ke.queryIntersectsXYStatistics(e,t,_,r,n,i,s);if(o[2])throw Fe(o[1]);return 0!==o[0]}function x(e,t,_,r,n,i,s){const o=ke.queryIntersectsXZStatistics(e,t,_,r,n,i,s);if(o[2])throw Fe(o[1]);return 0!==o[0]}function S(){const t={__proto__:null,__wbg___wbindgen_is_function_3baa9db1a987f47d:function(e){return"function"==typeof e},__wbg___wbindgen_is_undefined_29a43b4d42920abd:function(e){return void 0===e},__wbg___wbindgen_number_get_c7f42aed0525c451:function(e,t){const _="number"==typeof t?t:void 0;ne().setFloat64(e+8,we(_)?0:_,!0),ne().setInt32(e+0,!we(_),!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(e,t){const _="string"==typeof t?t:void 0;var r=we(_)?0:ze(_,ke.__wbindgen_malloc,ke.__wbindgen_realloc),n=Ce;ne().setInt32(e+4,n,!0),ne().setInt32(e+0,r,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw new Error(ue(e,t))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(e){e._wbg_cb_unref()},__wbg_aborted_072e5543dce0fc05:function(e){return e.aborted},__wbg_apply_4c35bd236dda9c14:function(){return be(function(e,t,_){return e.apply(t,_)},arguments)},__wbg_call_86e39d65afc3d9db:function(){return be(function(e,t,_,r,n){return e.call(t,_,r,n)},arguments)},__wbg_call_a24592a6f349a97e:function(){return be(function(e,t,_){return e.call(t,_)},arguments)},__wbg_columndescriptor_new:function(t){return e.__wrap(t)},__wbg_error_a6fa202b58aa1cd3:function(e,t){let _,r;try{_=e,r=t,console.error(ue(e,t))}finally{ke.__wbindgen_free(_,r,1)}},__wbg_fieldmetadata_new:function(e){return s.__wrap(e)},__wbg_get_6011fa3a58f61074:function(){return be(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_unchecked_17f53dad852b9588:function(e,t){return e[t>>>0]},__wbg_length_3d4ecd04bd8d22f1:function(e){return e.length},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_0c7403db6e782f19:function(e){return new Uint8Array(e)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_5e360d2ff7b9e1c3:function(e,t){return new Error(ue(e,t))},__wbg_new_682678e2f47e32bc:function(){return new Array},__wbg_new_8bc2b540bbfdbb81:function(e){return new Uint32Array(e)},__wbg_new_from_slice_158b7b5c2056cc2c:function(e,t){return new Int16Array(K(e,t))},__wbg_new_from_slice_3115b094b1002246:function(e,t){return new Float64Array(J(e,t))},__wbg_new_no_args_a5300b4b3ea60351:function(e,t){return new Function(ue(e,t))},__wbg_new_typed_323f37fd55ab048d:function(e,t){try{var _={a:e,b:t},r=(e,t)=>{const r=_.a;_.a=0;try{return R(r,_.b,e,t)}finally{_.a=r}};return new Promise(r)}finally{_.a=0}},__wbg_new_with_length_223c4ea248649e55:function(e){return new Array(e>>>0)},__wbg_pageencodingdescriptor_new:function(e){return l.__wrap(e)},__wbg_parquetchunk_new:function(e){return g.__wrap(e)},__wbg_parquetfile_new:function(e){return p.__wrap(e)},__wbg_parquetpatchchunk_new:function(e){return b.__wrap(e)},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,_){Uint8Array.prototype.set.call(_e(e,t),_)},__wbg_push_471a5b068a5295f6:function(e,t){return e.push(t)},__wbg_querystream_new:function(e){return f.__wrap(e)},__wbg_queueMicrotask_5d15a957e6aa920e:function(e){queueMicrotask(e)},__wbg_queueMicrotask_f8819e5ffc402f36:function(e){return e.queueMicrotask},__wbg_resolve_e6c466bc1052f16c:function(e){return Promise.resolve(e)},__wbg_rowgroup_new:function(e){return h.__wrap(e)},__wbg_set_3bf1de9fab0cd644:function(e,t,_){e[t>>>0]=_},__wbg_set_name_f49c6e6bbfc8a63b:function(e,t,_){e.name=ue(t,_)},__wbg_stack_3b0d974bbf31e44f:function(e,t){const _=ze(t.stack,ke.__wbindgen_malloc,ke.__wbindgen_realloc),r=Ce;ne().setInt32(e+4,r,!0),ne().setInt32(e+0,_,!0)},__wbg_static_accessor_GLOBAL_8cfadc87a297ca02:function(){const e="undefined"==typeof global?null:global;return we(e)?0:Q(e)},__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf:function(){const e="undefined"==typeof globalThis?null:globalThis;return we(e)?0:Q(e)},__wbg_static_accessor_SELF_e445c1c7484aecc3:function(){const e="undefined"==typeof self?null:self;return we(e)?0:Q(e)},__wbg_static_accessor_WINDOW_f20e8576ef1e0f17:function(){const e="undefined"==typeof window?null:window;return we(e)?0:Q(e)},__wbg_then_792e0c862b060889:function(e,t,_){return e.then(t,_)},__wbg_then_8e16ee11f05e4827:function(e,t){return e.then(t)},__wbg_valueOf_25e11684e38026ef:function(e){return e.valueOf()},__wbg_valueOf_91a54faf8ce0976a:function(e){return e.valueOf()},__wbindgen_cast_0000000000000001:function(e,t){return de(e,t,v)},__wbindgen_cast_0000000000000002:function(e){return e},__wbindgen_cast_0000000000000003:function(e){return e},__wbindgen_cast_0000000000000004:function(e,t){return J(e,t)},__wbindgen_cast_0000000000000005:function(e,t){return K(e,t)},__wbindgen_cast_0000000000000006:function(e,t){return te(e,t)},__wbindgen_cast_0000000000000007:function(e,t){return _e(e,t)},__wbindgen_cast_0000000000000008:function(e,t){return ue(e,t)},__wbindgen_cast_0000000000000009:function(e,t){var _=_e(e,t).slice();ke.__wbindgen_free(e,1*t,1);return _},__wbindgen_init_externref_table:function(){const e=ke.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}};return{__proto__:null,"./bundle_bg.js":t}}function v(e,t,_){const r=ke.wasm_bindgen__convert__closures_____invoke__h0f8118aa5481cebe(e,t,_);if(r[1])throw Fe(r[0])}function R(e,t,_,r){ke.wasm_bindgen__convert__closures_____invoke__h40273f30e88f7d49(e,t,_,r)}Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);const k=["boolean","int32","int64","int96","float","double","byte-array","fixed-byte-array"],C=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],O="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_columndescriptor_free(e>>>0,1)),T="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_columnid_free(e>>>0,1)),M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_displayoptimizationxzbuilder_free(e>>>0,1)),P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_displayoptimizationzbuilder_free(e>>>0,1)),I="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_extent_free(e>>>0,1)),A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_fieldmetadata_free(e>>>0,1)),j="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_geometryfield_free(e>>>0,1)),U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_geometryinfo_free(e>>>0,1)),L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_multiscalegeometryfield_free(e>>>0,1)),W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_pageencodingdescriptor_free(e>>>0,1)),E="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_parquetchunk_free(e>>>0,1)),G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_parquetfile_free(e>>>0,1)),D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_parquetpatchchunk_free(e>>>0,1)),Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_quantizedgeometrybuffer_free(e>>>0,1)),B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_query_free(e>>>0,1)),X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_querystream_free(e>>>0,1)),H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_rangeproviderjs_free(e>>>0,1)),V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_rowgroup_free(e>>>0,1)),Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbg_rowgroupid_free(e>>>0,1));function Q(e){const t=ke.__externref_table_alloc();return ke.__wbindgen_externrefs.set(t,e),t}function N(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>ke.__wbindgen_destroy_closure(e.a,e.b));function J(e,t){return e>>>=0,se().subarray(e/8,e/8+t)}function K(e,t){return e>>>=0,ae().subarray(e/2,e/2+t)}function ee(e,t){e>>>=0;const _=ne(),r=[];for(let n=e;n<e+4*t;n+=4)r.push(ke.__wbindgen_externrefs.get(_.getUint32(n,!0)));return ke.__externref_drop_slice(e,t),r}function te(e,t){return e>>>=0,le().subarray(e/4,e/4+t)}function _e(e,t){return e>>>=0,pe().subarray(e/1,e/1+t)}let re=null;function ne(){return(null===re||!0===re.buffer.detached||void 0===re.buffer.detached&&re.buffer!==ke.memory.buffer)&&(re=new DataView(ke.memory.buffer)),re}let ie=null;function se(){return null!==ie&&0!==ie.byteLength||(ie=new Float64Array(ke.memory.buffer)),ie}let oe=null;function ae(){return null!==oe&&0!==oe.byteLength||(oe=new Int16Array(ke.memory.buffer)),oe}function ue(e,t){return ve(e>>>=0,t)}let ce=null;function le(){return null!==ce&&0!==ce.byteLength||(ce=new Uint32Array(ke.memory.buffer)),ce}let ge=null;function pe(){return null!==ge&&0!==ge.byteLength||(ge=new Uint8Array(ke.memory.buffer)),ge}function be(e,t){try{return e.apply(this,t)}catch(_){const e=Q(_);ke.__wbindgen_exn_store(e)}}function we(e){return null==e}function de(e,t,_){const r={a:e,b:t,cnt:1},n=(...e)=>{r.cnt++;const t=r.a;r.a=0;try{return _(t,r.b,...e)}finally{r.a=t,n._wbg_cb_unref()}};return n._wbg_cb_unref=()=>{0===--r.cnt&&(ke.__wbindgen_destroy_closure(r.a,r.b),r.a=0,$.unregister(r))},$.register(n,r,r),n}function fe(e,t){const _=t(4*e.length,4)>>>0;return le().set(e,_/4),Ce=e.length,_}function ye(e,t){const _=t(1*e.length,1)>>>0;return pe().set(e,_/1),Ce=e.length,_}function he(e,t){const _=t(8*e.length,8)>>>0;return se().set(e,_/8),Ce=e.length,_}function me(e,t){const _=t(4*e.length,4)>>>0;for(let r=0;r<e.length;r++){const t=Q(e[r]);ne().setUint32(_+4*r,t,!0)}return Ce=e.length,_}function ze(e,t,_){if(void 0===_){const _=Re.encode(e),r=t(_.length,1)>>>0;return pe().subarray(r,r+_.length).set(_),Ce=_.length,r}let r=e.length,n=t(r,1)>>>0;const i=pe();let s=0;for(;s<r;s++){const t=e.charCodeAt(s);if(t>127)break;i[n+s]=t}if(s!==r){0!==s&&(e=e.slice(s)),n=_(n,r,r=s+3*e.length,1)>>>0;const t=pe().subarray(n+s,n+r);s+=Re.encodeInto(e,t).written,n=_(n,r,s,1)>>>0}return Ce=s,n}function Fe(e){const t=ke.__wbindgen_externrefs.get(e);return ke.__externref_table_dealloc(e),t}let qe=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});qe.decode();const xe=2146435072;let Se=0;function ve(e,t){return Se+=t,Se>=xe&&(qe=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),qe.decode(),Se=t),qe.decode(pe().subarray(e,e+t))}const Re=new TextEncoder;"encodeInto"in Re||(Re.encodeInto=function(e,t){const _=Re.encode(e);return t.set(_),{read:e.length,written:_.length}});let ke,Ce=0;function Oe(e,t){return ke=e.exports,re=null,ie=null,oe=null,ce=null,ge=null,ke.__wbindgen_start(),ke}async function Te(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(!(e.ok&&_(e.type))||"application/wasm"===e.headers.get("Content-Type"))throw r;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const _=await WebAssembly.instantiate(e,t);return _ instanceof WebAssembly.Instance?{instance:_,module:e}:_}function _(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}}function Me(e){if(void 0!==ke)return ke;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=S();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return Oe(new WebAssembly.Instance(e,t))}async function Pe(e){if(void 0!==ke)return ke;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=S();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:_,module:r}=await Te(await e,t);return Oe(_)}export{e as ColumnDescriptor,t as ColumnId,_ as DisplayEncoding,r as DisplayOptimizationXZBuilder,n as DisplayOptimizationZBuilder,i as Extent,s as FieldMetadata,o as GeometryField,a as GeometryInfo,u as GeometryType,c as MultiscaleGeometryField,l as PageEncodingDescriptor,g as ParquetChunk,p as ParquetFile,b as ParquetPatchChunk,w as QuantizedGeometryBuffer,d as Query,f as QueryStream,y as RangeProviderJs,h as RowGroup,m as RowGroupId,Pe as default,z as enableTracing,F as getXZCodeRanges,Me as initSync,q as queryIntersectsXYStatistics,x as queryIntersectsXZStatistics};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.57";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.58";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.57",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.58",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import{deprecatedProperty as o}from"../core/deprecate.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../core/accessorSupport/decorators/writer.js";import c from"../geometry/Extent.js";import f from"../geometry/SpatialReference.js";import h from"../graphic/ParquetGraphicOrigin.js";import g from"./Layer.js";import{ParquetSource as j}from"./graphics/sources/ParquetSource.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as v}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as O}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{OrderedLayer as q}from"./mixins/OrderedLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as E,legendEnabled as F,popupEnabled as P}from"./support/commonProperties.js";import L from"./support/FeatureTemplate.js";import T from"./support/Field.js";import{defineFieldProperties as S}from"./support/fieldProperties.js";import{fixRendererFields as _}from"./support/fieldUtils.js";import R from"./support/GeometryEncodingLocation.js";import D from"./support/GeometryEncodingWkb.js";import z from"./support/LabelClass.js";import{reader as U}from"./support/labelingInfo.js";import C from"./support/ParquetFilesData.js";import Q from"./support/ParquetPortalItemData.js";import{parquetGeometryTypeKebabDict as k}from"./support/parquetUtils.js";import{rendererTypes as G}from"../renderers/support/typeUtils.js";import J from"../rest/support/Query.js";import{createPopupTemplate as M}from"../support/popupUtils.js";const N=S(),V="__OBJECTID",A={types:{key:"type",base:null,typeMap:{wkb:D,location:R}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let B=class extends(O(v(w(q(I(x(p(b(r(g)))))))))){constructor(e){super(e),this._emptyUrls=new i,this.copyright=null,this.definitionExpression=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new h(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=V,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!has("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type="parquet",this.data=null}initialize(){this.addHandles(l(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,i){const o=e.filter(e=>!(e.name===V&&"oid"===e.type)).map(e=>e.toJSON(i));n(r,o,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){_(e,this.fieldsIndex),this._set("renderer",e)}get title(){let e=this._get("title");if(e&&"defaults"!==this.originOf("title"))return e;switch(this.data?.type){case"files":{const t=this.data.urls?.at(0);e=t?u(t,["parquet"]):null;break}case"portal-item":e=this.data.portalItem?.title}return e||"Parquet"}set title(e){this._set("title",e)}writeData(e,t,r,i){if(!e)return;if("portal-item"===e.type&&"Parquet Feature Layer"!==e.portalItem?.type)return void i.messages?.push(new s("parquet-layer:unsupported-data",`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));const o=e.write({},i);o&&(t.source=o)}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){o(a.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new C({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return M(this,e)}createQuery(){const e=new J;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const t=new j({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),i=this.graphicOrigin;if(r?.features)for(const o of r.features)o.layer=o.sourceLayer=this,o.origin=i;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return J.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new i(e):e??new i}async _load(e){"portal-item"===this.data?.type&&await this.data.portalItem.load();const t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),_(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=f.WGS84)}};e([d({readOnly:!0,json:{read:!1,write:!1}})],B.prototype,"capabilities",null),e([d({type:String})],B.prototype,"copyright",void 0),e([d({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),e([d({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],B.prototype,"definitionExpression",void 0),e([d()],B.prototype,"displayOptimization",void 0),e([d({type:[T],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],B.prototype,"fields",void 0),e([y("fields")],B.prototype,"writeFields",null),e([d(N.fieldsIndex)],B.prototype,"fieldsIndex",void 0),e([d(A)],B.prototype,"geometryEncoding",void 0),e([d({type:c,json:{name:"extent"}})],B.prototype,"fullExtent",void 0),e([d({type:k.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:k.read},write:{writer:k.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:k.read}}}}})],B.prototype,"geometryType",void 0),e([d({readOnly:!0,clonable:!1})],B.prototype,"graphicOrigin",void 0),e([d(E)],B.prototype,"labelsVisible",void 0),e([d({type:[z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U},write:!0}})],B.prototype,"labelingInfo",void 0),e([d(F)],B.prototype,"legendEnabled",void 0),e([d()],B.prototype,"file",void 0),e([d({type:String,readOnly:!0})],B.prototype,"objectIdField",void 0),e([d({type:["ParquetLayer"]})],B.prototype,"operationalLayerType",void 0),e([d(N.outFields)],B.prototype,"outFields",void 0),e([d(P)],B.prototype,"popupEnabled",void 0),e([d({type:t,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),e([d({types:G,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],B.prototype,"renderer",null),e([d({type:j,readOnly:!0,cast:null,json:{read:!1}})],B.prototype,"source",void 0),e([d({type:f,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],B.prototype,"spatialReference",void 0),e([d({type:[L]})],B.prototype,"templates",void 0),e([d()],B.prototype,"title",null),e([d({json:{read:!1},readOnly:!0})],B.prototype,"type",void 0),e([d({types:{key:"type",base:null,typeMap:{files:C,"portal-item":Q}},json:{name:"source",origins:{"web-map":{write:{target:"source",ignoreOrigin:!0}}}}})],B.prototype,"data",void 0),e([y("web-map","data")],B.prototype,"writeData",null),e([d({type:i.ofType(String),json:{read:!1,write:!1}})],B.prototype,"urls",null),B=e([m("esri.layers.ParquetLayer")],B);export{B as default};
2
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import{deprecatedProperty as o}from"../core/deprecate.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../core/accessorSupport/decorators/writer.js";import c from"../geometry/Extent.js";import f from"../geometry/SpatialReference.js";import h from"../graphic/ParquetGraphicOrigin.js";import g from"./Layer.js";import{ParquetSource as j}from"./graphics/sources/ParquetSource.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as v}from"./mixins/CustomParametersMixin.js";import{FeatureEffectLayer as b}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as O}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{OrderedLayer as q}from"./mixins/OrderedLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as E,legendEnabled as F,popupEnabled as P}from"./support/commonProperties.js";import L from"./support/FeatureTemplate.js";import T from"./support/Field.js";import{defineFieldProperties as S}from"./support/fieldProperties.js";import{fixRendererFields as _}from"./support/fieldUtils.js";import R from"./support/GeometryEncodingLocation.js";import D from"./support/GeometryEncodingWkb.js";import z from"./support/LabelClass.js";import{reader as U}from"./support/labelingInfo.js";import C from"./support/ParquetFilesData.js";import Q from"./support/ParquetPortalItemData.js";import{parquetGeometryTypeKebabDict as M}from"./support/parquetUtils.js";import{rendererTypes as k}from"../renderers/support/typeUtils.js";import G from"../rest/support/Query.js";import{createPopupTemplate as B}from"../support/popupUtils.js";const J=S(),N="__OBJECTID",V={types:{key:"type",base:null,typeMap:{wkb:D,location:R}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let A=class extends(O(b(w(q(I(x(p(v(r(g)))))))))){constructor(e){super(e),this._emptyUrls=new i,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new h(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=N,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!has("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type="parquet",this.data=null}initialize(){this.addHandles(l(()=>this.source,"source-changed",()=>{this.emit("refresh",{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,i){const o=e.filter(e=>!(e.name===N&&"oid"===e.type)).map(e=>e.toJSON(i));n(r,o,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){_(e,this.fieldsIndex),this._set("renderer",e)}get title(){let e=this._get("title");if(e&&"defaults"!==this.originOf("title"))return e;switch(this.data?.type){case"files":{const t=this.data.urls?.at(0);e=t?u(t,["parquet"]):null;break}case"portal-item":e=this.data.portalItem?.title}return e||"Parquet"}set title(e){this._set("title",e)}writeData(e,t,r,i){if(!e)return;if("portal-item"===e.type&&"Parquet Feature Layer"!==e.portalItem?.type)return void i.messages?.push(new s("parquet-layer:unsupported-data",`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));const o=e.write({},i);o&&(t.source=o)}get urls(){return"files"===this.data?.type?this.data.urls:this._emptyUrls}set urls(e){o(a.getLogger(this),"urls",{replacement:"data",version:"5.1",warnOnce:!0}),this.data=new C({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return B(this,e)}createQuery(){const e=new G;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const t=new j({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),i=this.graphicOrigin;if(r?.features)for(const o of r.features)o.layer=o.sourceLayer=this,o.origin=i;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return G.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new i(e):e??new i}async _load(e){"portal-item"===this.data?.type&&await this.data.portalItem.load();const t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),_(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=f.WGS84)}};e([d({readOnly:!0,json:{read:!1,write:!1}})],A.prototype,"capabilities",null),e([d({type:String})],A.prototype,"copyright",void 0),e([d({readOnly:!0})],A.prototype,"defaultPopupTemplate",null),e([d({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],A.prototype,"definitionExpression",void 0),e([d({type:Boolean})],A.prototype,"returnM",void 0),e([d({type:Boolean})],A.prototype,"returnZ",void 0),e([d()],A.prototype,"displayOptimization",void 0),e([d({type:[T],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],A.prototype,"fields",void 0),e([y("fields")],A.prototype,"writeFields",null),e([d(J.fieldsIndex)],A.prototype,"fieldsIndex",void 0),e([d(V)],A.prototype,"geometryEncoding",void 0),e([d({type:c,json:{name:"extent"}})],A.prototype,"fullExtent",void 0),e([d({type:M.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:M.read},write:{writer:M.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:M.read}}}}})],A.prototype,"geometryType",void 0),e([d({readOnly:!0,clonable:!1})],A.prototype,"graphicOrigin",void 0),e([d(E)],A.prototype,"labelsVisible",void 0),e([d({type:[z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U},write:!0}})],A.prototype,"labelingInfo",void 0),e([d(F)],A.prototype,"legendEnabled",void 0),e([d()],A.prototype,"file",void 0),e([d({type:String,readOnly:!0})],A.prototype,"objectIdField",void 0),e([d({type:["ParquetLayer"]})],A.prototype,"operationalLayerType",void 0),e([d(J.outFields)],A.prototype,"outFields",void 0),e([d(P)],A.prototype,"popupEnabled",void 0),e([d({type:t,json:{name:"popupInfo",write:!0}})],A.prototype,"popupTemplate",void 0),e([d({types:k,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],A.prototype,"renderer",null),e([d({type:j,readOnly:!0,cast:null,json:{read:!1}})],A.prototype,"source",void 0),e([d({type:f,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],A.prototype,"spatialReference",void 0),e([d({type:[L]})],A.prototype,"templates",void 0),e([d()],A.prototype,"title",null),e([d({json:{read:!1},readOnly:!0})],A.prototype,"type",void 0),e([d({types:{key:"type",base:null,typeMap:{files:C,"portal-item":Q}},json:{name:"source",origins:{"web-map":{write:{target:"source",ignoreOrigin:!0}}}}})],A.prototype,"data",void 0),e([y("web-map","data")],A.prototype,"writeData",null),e([d({type:i.ofType(String),json:{read:!1,write:!1}})],A.prototype,"urls",null),A=e([m("esri.layers.ParquetLayer")],A);export{A as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as r}from"../../../../core/compilerUtils.js";import s from"../../../../core/Error.js";import i from"../../../../core/Handles.js";import has from"../../../../core/has.js";import a from"../../../../core/Logger.js";import{onAbortOrThrow as n,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../core/QueueProcessor.js";import{parseWhereClause as l}from"../../../../core/sql.js";import c from"../../../../geometry/SpatialReference.js";import{set as p,create as d,expandWithAABB as f,expandWithRect as m,negativeInfinity as y}from"../../../../geometry/support/aaBoundingBox.js";import{copy as h,negativeInfinity as g,create as _,expandWithRect as w}from"../../../../geometry/support/aaBoundingRect.js";import{getScaleForResolution as x}from"../../../../geometry/support/scaleUtils.js";import{isWebMercator as F,isWGS84 as S}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertToGeometry as I}from"../../featureConversionUtils.js";import{getFieldNamesFromStatistics as v}from"../../data/attributeSupport.js";import{getQueryResultExtent as q,getQueryBoundingRects as R,QueryEngine as C}from"../../data/QueryEngine.js";import{queryCapabilities as b}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as E}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as O}from"../../data/queryUtils.js";import{createFileProvider as P}from"../parquet/createFileProvider.js";import{createDrawingInfo as T}from"./clientSideDefaults.js";import{getParquetFileId as j,getParquetRowId as Q,getParquetObjectId as M}from"./parquetIdUtils.js";import N from"../../../support/Field.js";import A from"../../../support/FieldsIndex.js";import{isNumericField as B}from"../../../support/fieldUtils.js";import{fromParquetGeometryEncodingJSON as G}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as D,fromParquetJSONGeometryType as z,toParquetJSONGeometryType as V}from"../../../support/parquetUtils.js";import{loadParquetModule as W}from"../../../../libs/parquet/loadParquetModule.js";import{FeatureStoreQueryAdapter as U}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as k}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as J}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as Z}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as L}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const H=new U,Y=4,X="__OBJECTID",$=new TextDecoder,K=8e3,ee=2e7,te=8,re=2,se=20;class ie{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){u(e),await this._fill(e);const t=await ae(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,null!=t.chunk)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<te;){const t=this._getOrCreateNextStream(e);if(null==t)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){const t=this._resolvedCount>=te?te:re;if(this._fileIndex<this._files.length&&this._streams.length<t){const t=this._files[this._fileIndex++],r=new ne(t.id,this._createFileStream(t,e));return this._streams.push(r),r}return this._getNextStream()}_getNextStream(){const e=this._streams.length;for(let t=0;t<e;t++){const r=(this._streamIndex+t)%e,s=this._streams[r];if(s.canRead)return this._streamIndex=(r+1)%e,s}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function ae(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class ne{constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(e){this._readCount++;try{const t=await this._stream,r=await t.next(e);return null==r?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:r}}finally{this._readCount--}}}class ue{constructor(){this._queue=new o({concurrency:Y,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new i}async load(e){const t=e.spatialReference?c.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=e.customParameters,this._provider=P(e.provider,null,()=>this._customParameters),this._handles.add(this._provider.events.on("sourceChanged",async()=>{await this.reload(e),await this._source.onSourceChange()}));const r=await this._provider.getMetadata(),i=await D(r,{fields:e.fields?.map(e=>N.fromJSON(e)),geometryEncoding:e.geometryEncoding?G(e.geometryEncoding):null,geometryType:e.geometryType?z(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(!i.fields)throw new s("parquet:unsupported","Fields must be defined");let n;if(i.spatialReference&&i.geometryType){if(!i.spatialReference)throw new s("parquet:unsupported","SpatialReference must be defined");if(!i.spatialReference.isGeographic&&!i.spatialReference.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");i.spatialReference.isGeographic&&!i.spatialReference.isWGS84&&(a.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:i.spatialReference}),i.spatialReference=c.WGS84),n={geometry:i.geometryEncoding?{geometryType:V(i.geometryType),spatialReference:i.spatialReference.toJSON(),encoding:i.geometryEncoding.toJSON()}:null,displayOptimization:i.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=i.displayOptimization,await this._provider.updateGeometryInfo(n),this._capabilities=Ee(await this._getFileStatistics());const u=await this._provider.getFiles();if(!u.length)return{layerDefinition:{},capabilities:Ee(null)};const o=await u[0].file;i.file=o;const{fields:l}=i;if(null==l)throw new s("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",l);l.push(new N({name:X,type:"oid",alias:X}));for(const s of l){const e=o.getColumnId(s.name);null!=e&&(this._indexMap[s.name]=e)}const p=new A(l.map(e=>e.toJSON()));this._fieldsIndex=p;const d=V(i.geometryType??"point");return this._metadata=Z.createFeature({fieldsIndex:p.toJSON(),geometryType:d,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:X},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:i.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:d,featureIdInfo:{type:"object-id",fieldName:X},hasM:!1,hasZ:!1,spatialReference:i.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(i),{capabilities:this._capabilities,layerDefinition:{fields:i.fields?.map(e=>e.toJSON()),drawingInfo:T(d),extent:this._fullExtent??void 0,geometryType:d,geometryEncoding:i.geometryEncoding?.toJSON(),displayOptimization:i.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:e}of this._streams.values())e.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(e){this.destroy(),await this.load(e)}set remoteClient(e){this._source=e.createInvokeProxy("")}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._provider=P(e,this._provider.getGeometryInfo(),()=>this._customParameters)}async queryFeatures(e,t){const r=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),Oe(r)||(r.resultRecordCount=r.resultRecordCount?Math.min(r.resultRecordCount,K):K,r.resultOffset=r.resultOffset??0),r.outStatistics)return this._queryStatistics(r,t);r.returnDistinctValues&&(r.returnGeometry=void 0);return(await this._enqueueQuery(r,t)).createQueryResponse()}async queryFeatureCount(e,t){const r=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!pe(r))return this._getFeatureCount();r.outFields=void 0,r.returnGeometry=void 0;return(await this._enqueueQuery(r,t)).createQueryResponseForCount()}async queryObjectIds(e,t){const r=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!pe(r))return Array.from({length:await this._getFeatureCount()},(e,t)=>t);r.resultRecordCount=r.resultRecordCount?Math.min(r.resultRecordCount,8e3):8e3,r.resultOffset=r.resultOffset??0,r.returnGeometry=void 0,r.outFields=void 0;return(await this._enqueueQuery(r,t)).items.map(e=>e.getObjectId())}async queryAttributeBins(e,t={}){throw new s("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(e,t){const s=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!pe(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=r(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const a=p(d(),y),n=d(),u=await this._enqueueQuery(s,t);let o=0;for(const r of u.items)r.getBounds(n)&&(f(a,n),o+=1);return{count:o,extent:q(a,i,s.outSR?r(s.outSR):i.toJSON(),i,!1)}}async queryStream(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=await this._getCandidateFiles(e),s=new ie(r,async(t,r)=>{const s=await t.file,i=await this._createParquetDisplayQuery(s,t.id,e);return s.executeQuery(i,K,r)}),i=this._streamIdCounter++,a=n(t.signal,e=>{const t=this._streams.get(i);null!=t&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:s,handle:a}),i}async getStreamNext(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=this._streams.get(e);if(!r)return{result:null};const s=await r.stream.next(t.signal);if(null==s)return r.handle.remove(),this._streams.delete(e),{result:null};const i=s.chunk.serialize().buffer,a={fileId:s.fileId,buffer:i};return i instanceof ArrayBuffer?{result:a,transferList:[i]}:{result:a}}async getStreamNextFeatures(e,t){const{result:r}=await this.getStreamNext(e,t);if(null==r)return null;const s=(await W()).ParquetChunk.deserialize(new Uint8Array(r.buffer)),i=new L(this._metadata,this._indexMap,s,r.fileId),a=[];for(;i.next();){const e=I(i.readGeometryWorldSpace(),i.geometryType,i.hasZ,i.hasM),t=i.readAttributes();a.push({attributes:t,geometry:e})}return{features:a}}async createPatch(e,t,r,s,i){if(!i.signal)throw new Error("InternalError: AbortSignal must be passed");const a=await this._getFileInfoById(e),n=await a.file;return(await n.createChunkPatch(t,r,s,i.signal)).serialize().buffer}async _getCandidateFiles(e){const t=await this._provider.getFiles(),r=await this._getSpatialFilePruning(e);if(null==r)return t;const s=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,r));return"xz"===r.type?Ie(s,r):s}async _queryStatistics(e,t){const r=await O({...e},null,this._queryEngineParams.spatialReference);if(r.returnGeometry=void 0,me(r,this._fieldsIndex)){const e=await this._getStatisticsFromFiles(r);if(e)return e}return(await this._enqueueQuery(r,t)).createQueryResponse()}async _getStatisticsFromFiles(e){const t=await this._provider.getFiles(),r={},s=[];for(const i of e.outStatistics??[]){const e=ge(i,t);if(!e.available)return null;r[i.outStatisticFieldName]=e.value,s.push(he(i,this._fieldsIndex))}return{fields:s,features:[{attributes:r}]}}async _getSpatialFilePruning(e){if("tile"!==e.type&&("arcade"!==e.type||null==e.extent))return null;const t=this._displayOptimization,r=t?.index;if(null==r)return null;const s=e.outSpatialReference.wkid;if(null==r.wkid||null==s)return null;const i=r.wkid,a=await W();switch(r.type){case"xz":return{type:"xz",fieldName:r.code,intersects:(t,n)=>a.queryIntersectsXZStatistics(r.fullExtent,e.extent,s,i,se,t,n)};case"z":return{type:"xy",xFieldName:r.xColumn,yFieldName:r.yColumn,intersects:(t,r,n,u)=>a.queryIntersectsXYStatistics(e.extent,s,i,t,r,n,u)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case"xz":{const r=Se(e,t);return null==r||Re(r,t)}case"xy":{const{xStatistics:r,yStatistics:s}=qe(e,t);return null==r||null==s||Ce(r,s,t)}}}async _tryDeriveParquetFullExtent(r){if(!r.spatialReference)return null;if(null==this._fullExtent&&"location"===r.geometryEncoding?.type){const i=await this._provider.getFiles(),{xField:a,yField:n}=r.geometryEncoding,u=p(d(),y);for(const r of i){const i=await r.file;for(const r of i.rowGroups()){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,r.columnDescriptorForAttribute(a),!1),s=e(i,r.columnDescriptorForAttribute(n),!1),o=[t.minValue(),s.minValue(),t.maxValue(),s.maxValue()];m(u,o),r.free()}catch(s){i.error=s,i.hasError=!0}finally{t(i)}}}return{xmin:u[0],ymin:u[1],xmax:u[3],ymax:u[4],spatialReference:r.spatialReference?.toJSON()}}return null}async _getFileInfoById(e){const t=await this._provider.getFiles();for(const r of t)if(r.id===e)return r;throw new Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t,r,s,i){const a=(await W()).Query.new();null!=r&&a.setPreFilterStart(r),null!=s&&a.setPreFilterCount(s),null!=i&&a.setPostFilterCount(i);const n=await this._getRequiredFields(e);a.setOutFields(n),(e.geometry||e.returnGeometry)&&a.setReturnGeometry(!0);const u=this._tryGetGeneralizedGeometryScale(e);null!=u&&a.setScale(u);const o=e.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=o.wkid;if(e.geometry&&(F(o)||S(o))){const t=h(_(),g);for(const r of R(e.geometry))w(t,r);a.setOutSpatialReference(l),a.setExtent({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]})}if(e.where){const{id:r,file:s}=t;await this._setWhereClause(a,await s,r,e.where)}return a}async _createParquetDisplayQuery(e,t,r){const s=(await W()).Query.new();return"tile"===r.type?(s.setExtent(r.extent),s.setQuantizationTransform(r.transform),s.setScale(r.scale)):"arcade"===r.type&&null!=r.extent&&s.setExtent(r.extent),s.setOutFields(r.outFields.filter(e=>null!=this._indexMap[e])),s.setOutSpatialReference(r.outSpatialReference.wkid),s.setReturnGeometry(r.returnGeometry),r.where&&await this._setWhereClause(s,e,t,r.where),s}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new s("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new s("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new s("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async _setWhereClause(e,t,r,i){const a=this._indexMap,n=this._fieldsIndex,u={getAttribute(e,s){const i=a[s];if(null==i){const t=n.get(s);if("__OBJECTID"===t?.name){const t=e.row+e.rowGroupStart;return M(r,t)}return null}const u=t.readAttribute(e.rowGroup,e.row,i);if(null==u)return null;const o=n.get(s);return"esriFieldTypeString"===o.type||"esriFieldTypeDateOnly"===o.type||"esriFieldTypeTimeOnly"===o.type||"esriFieldTypeTimestampOffset"===o.type?$.decode(u):u}},o=await l(i,this._fieldsIndex);if(!o.isStandardized)throw new s("sql-parse-error","expression is not standardized");const c=(e,t,r)=>o.testFeatureCompiled({rowGroup:e,row:t,rowGroupStart:r},u,null),p=o.fieldNames.map(e=>n.get(e)).filter(e=>e&&null!=this._indexMap[e?.name]);e.setWhere(i),e.setWhereEvaluator(c),e.setWhereFields(p.map(e=>e.name))}async*_streamFeatures(e,t,r,s,i){const a=await this._provider.getFiles();let n=0;for(const u of a){const a=n,o=n+u.statistics.rowCount;if(n+=u.statistics.rowCount,null!=t&&t>=o)continue;const l=null!=t?Math.max(t-a,0):null;let c=r;if(null!=r){const e=t??0,s=e+r,i=Math.max(e,a),n=Math.min(s,o);c=Math.max(n-i,0)}if(0===c)continue;const p=await this._createParquetQuery(e,u,l,c,s),d=await u.file,f=await d.executeQuery(p,K),m=async()=>{const e=await f.next(i);if(!e)return null;const t=new L(this._metadata,this._indexMap,e,u.id);return Fe([new k(t,null,0,!1)],this._queryEngineParams)};let y=await m();for(;null!=y;)yield y,y=await m()}}async _queryFeaturesWithQueryEnginePagination(e,t){const r=[],s=this._streamFeatures(e,null,null,null,t);let i=await s.next();for(;!i.done;){const a=await i.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(const e of a)r.push(e);i=await s.next()}return r}async _queryFeaturesWithUpfrontPagination(e,t){let r,s,i,a=e.resultOffset??0,n=e.resultRecordCount??K;de(e)?fe(e)||(i=a+n):(a&&(r=a,a=0),s=e.resultRecordCount);const u=[],o=this._streamFeatures(e,r,s,i,t);let l=await o.next();for(;!l.done&&n>0;){const r=await l.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(const e of r)if(a>0)a--;else if(u.push(e),--n<=0)return u;l=await o.next()}return u}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){if(e.objectIds?.length){const r=new Map;for(const t of e.objectIds){const e=j(t),s=Q(t);let i=r.get(e);i||(i=[],r.set(e,i)),i.push(s)}const s=[];for(const[i,a]of r.entries()){const r=await this._executeFileIdQuery(e,i,a,t);for(const e of r)s.push(e)}return new E(s,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:H,featureIdInfo:this._queryEngineParams.featureIdInfo})}if("1=1"===e.where&&(e.where=null),e.resultOffset??=0,e.resultRecordCount??=await this._getFeatureCount(),e.resultRecordCount>ee){if(!(this._displayOptimization&&e.geometry))throw new s("parquet:cannot-execute-query","Unable to execute query, dataset is too large.")}const r=!!e.orderByFields?.length||!!e.outStatistics?.length||!!e.returnDistinctValues,i=r?await this._queryFeaturesWithQueryEnginePagination(e,t):await this._queryFeaturesWithUpfrontPagination(e,t);return r||(e.resultOffset=0),new E(i,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:H,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,r,s){const i=await this._getRequiredFields(e),a=(await W()).Query.new();a.setOutFields(i),a.setReturnGeometry(!!e.returnGeometry),a.setIds(new Uint32Array(r));const n=await this._getFile(t),u=await n.executeQuery(a,K,s);let o=await u.next(s),l=0;const c=[];for(;null!=o;){const e=new L(this._metadata,this._indexMap,o,t),r=new k(e,null,l++,!1);c.push(r),o=await u.next(s)}return Fe(c,this._queryEngineParams).executeQueryForOpaqueFeatures(e,s)}async _getRequiredFields(e){const t=new Set;if(e.outStatistics)for(const r of v(this._fieldsIndex,e.outStatistics,e.groupByFieldsForStatistics))t.add(r);else if(e.outFields)for(const r of e.outFields)t.add(r);return(t.has("*")?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>null!=this._indexMap[e])}_tryGetGeneralizedGeometryScale(e){if(!this._displayOptimization)return null;const t=e.outSR??this._queryEngineParams.spatialReference;if(!F(t)&&!S(t))return null;const r=e.quantizationParameters?.tolerance??e.maxAllowableOffset;return r?x(r,t):null}}function oe(e){switch(e){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":case"resultOffset":case"resultRecordCount":return!0;default:return!1}}function le(e){switch(e){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":return!0;default:return!1}}function ce(e){switch(e){case"fullText":case"having":case"timeExtent":return!0;case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"resultOffset":case"geometry":case"resultRecordCount":return!1}return!1}function pe(e){for(const t in e){const r=t;if(oe(r)&&null!==e[r])return!0}return!1}function de(e){for(const t in e){const r=t;if(le(r)&&null!==e[r])return!0}return!1}function fe(e){for(const t in e){const r=t;if(ce(r)&&null!==e[r])return!0}return!1}function me(e,t){return!!e.outStatistics?.length&&!pe(e)&&!e.groupByFieldsForStatistics?.length&&!e.orderByFields?.length&&!e.returnDistinctValues&&!e.returnAggIds&&e.outStatistics.every(e=>ye(e,t))}function ye(e,t){switch(e.statisticType){case"count":return"1"===e.onStatisticField||null!=t.get(e.onStatisticField);case"min":case"max":{const r=t.get(e.onStatisticField);return null!=r&&B(r)}default:return!1}}function he(e,t){const r="exceedslimit"!==e.statisticType?t.get(e.onStatisticField):null,s="min"!==e.statisticType&&"max"!==e.statisticType||"esriFieldTypeDate"!==r?.type?"esriFieldTypeDouble":r.type;return{name:e.outStatisticFieldName,alias:e.outStatisticFieldName,type:s}}function ge(e,t){switch(e.statisticType){case"count":return _e(e,t);case"min":return we(e,t,Math.min);case"max":return we(e,t,Math.max);default:return{available:!1,value:null}}}function _e(e,t){if("count"!==e.statisticType)return{available:!1,value:null};if("1"===e.onStatisticField)return{available:!0,value:t.reduce((e,t)=>e+t.statistics.rowCount,0)};let r=0;for(const s of t){const t=s.statistics.statistics.get(e.onStatisticField);if(null==t||null==t.nullCount)return{available:!1,value:null};r+=s.statistics.rowCount-t.nullCount}return{available:!0,value:r}}function we(e,t,r){if("min"!==e.statisticType&&"max"!==e.statisticType)return{available:!1,value:null};let s=null;const i="min"===e.statisticType?"minValue":"maxValue";for(const a of t){const t=a.statistics.statistics.get(e.onStatisticField);if(null==t)return{available:!1,value:null};const n=xe(t[i]);null!=n&&(s=null==s?n:r(s,n))}return{available:!0,value:s}}function xe(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function Fe(e,t){const r=new J;for(const s of e)r.insert(s);return new C({...t,featureStore:r})}function Se(e,t){return e.statistics.statistics.get(t.fieldName)??null}function Ie(e,t){return e.slice().sort((e,r)=>{const s=ve(e,t),i=ve(r,t);return s===i?0:s<i?-1:1})}function ve(e,t){const r=Se(e,t);if(null==r)return Number.POSITIVE_INFINITY;const s=be(r.minValue),i=be(r.maxValue);return null==s||null==i||i<s?Number.POSITIVE_INFINITY:i-s}function qe(e,t){return{xStatistics:e.statistics.statistics.get(t.xFieldName)??null,yStatistics:e.statistics.statistics.get(t.yFieldName)??null}}function Re(e,t){const r=be(e.minValue),s=be(e.maxValue);return null==r||null==s||t.intersects(r,s)}function Ce(e,t,r){const s=be(e.minValue),i=be(e.maxValue),a=be(t.minValue),n=be(t.maxValue);return null==s||null==i||null==a||null==n||r.intersects(s,i,a,n)}function be(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function Ee(e){const t=e?.featureCount;let r=!1;return null!=t&&t<has("parquetlayer-full-query-feature-count")&&(r=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...b,maxRecordCount:K,supportsOrderBy:r,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function Oe(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}export{ue as default};
2
+ import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as s}from"../../../../core/compilerUtils.js";import r from"../../../../core/Error.js";import i from"../../../../core/Handles.js";import has from"../../../../core/has.js";import a from"../../../../core/Logger.js";import{onAbortOrThrow as n,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../core/QueueProcessor.js";import{parseWhereClause as l}from"../../../../core/sql.js";import c from"../../../../geometry/SpatialReference.js";import{set as p,create as d,expandWithAABB as f,expandWithRect as h,negativeInfinity as m}from"../../../../geometry/support/aaBoundingBox.js";import{copy as y,negativeInfinity as g,create as _,expandWithRect as w}from"../../../../geometry/support/aaBoundingRect.js";import{getScaleForResolution as x}from"../../../../geometry/support/scaleUtils.js";import{isWebMercator as F,isWGS84 as S}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertToGeometry as I}from"../../featureConversionUtils.js";import{getFieldNamesFromStatistics as v}from"../../data/attributeSupport.js";import{getQueryResultExtent as q,getQueryBoundingRects as R,QueryEngine as C}from"../../data/QueryEngine.js";import{queryCapabilities as b}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as E}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as O}from"../../data/queryUtils.js";import{createFileProvider as P}from"../parquet/createFileProvider.js";import{createDrawingInfo as M}from"./clientSideDefaults.js";import{getParquetFileId as T,getParquetRowId as j,getParquetObjectId as Q}from"./parquetIdUtils.js";import N from"../../../support/Field.js";import A from"../../../support/FieldsIndex.js";import{isNumericField as B}from"../../../support/fieldUtils.js";import{fromParquetGeometryEncodingJSON as G}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as D,fromParquetJSONGeometryType as z,toParquetJSONGeometryType as V}from"../../../support/parquetUtils.js";import{loadParquetModule as W}from"../../../../libs/parquet/loadParquetModule.js";import{FeatureStoreQueryAdapter as U}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as k}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as Z}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as J}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as L}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const H=new U,Y=4,X="__OBJECTID",$=new TextDecoder,K=8e3,ee=2e7,te=8,se=2,re=20;class ie{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){u(e),await this._fill(e);const t=await ae(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,null!=t.chunk)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<te;){const t=this._getOrCreateNextStream(e);if(null==t)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){const t=this._resolvedCount>=te?te:se;if(this._fileIndex<this._files.length&&this._streams.length<t){const t=this._files[this._fileIndex++],s=new ne(t.id,this._createFileStream(t,e));return this._streams.push(s),s}return this._getNextStream()}_getNextStream(){const e=this._streams.length;for(let t=0;t<e;t++){const s=(this._streamIndex+t)%e,r=this._streams[s];if(r.canRead)return this._streamIndex=(s+1)%e,r}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function ae(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class ne{constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(e){this._readCount++;try{const t=await this._stream,s=await t.next(e);return null==s?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:s}}finally{this._readCount--}}}class ue{constructor(){this._hasZ=!1,this._hasM=!1,this._queue=new o({concurrency:Y,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={},this._handles=new i}async load(e){const t=e.spatialReference?c.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new r("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=e.customParameters,this._provider=P(e.provider,null,()=>this._customParameters),this._handles.add(this._provider.events.on("sourceChanged",async()=>{await this.reload(e),await this._source.onSourceChange()}));const s=await this._provider.getMetadata(),i=await D(s,{fields:e.fields?.map(e=>N.fromJSON(e)),geometryEncoding:e.geometryEncoding?G(e.geometryEncoding):null,geometryType:e.geometryType?z(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(this._hasZ=!!s?.hasZ,this._hasM=!!s?.hasM,!i.fields)throw new r("parquet:unsupported","Fields must be defined");let n;if(i.spatialReference&&i.geometryType){if(!i.spatialReference)throw new r("parquet:unsupported","SpatialReference must be defined");if(!i.spatialReference.isGeographic&&!i.spatialReference.isWebMercator)throw new r("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");i.spatialReference.isGeographic&&!i.spatialReference.isWGS84&&(a.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:i.spatialReference}),i.spatialReference=c.WGS84),n={geometry:i.geometryEncoding?{geometryType:V(i.geometryType),spatialReference:i.spatialReference.toJSON(),encoding:i.geometryEncoding.toJSON()}:null,displayOptimization:i.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=i.displayOptimization,await this._provider.updateGeometryInfo(n),this._capabilities=Ee(await this._getFileStatistics(),this._hasZ,this._hasM);const u=await this._provider.getFiles();if(!u.length)return{layerDefinition:{},capabilities:Ee(null,this._hasZ,this._hasM)};const o=await u[0].file;i.file=o;const{fields:l}=i;if(null==l)throw new r("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",l);l.push(new N({name:X,type:"oid",alias:X}));for(const r of l){const e=o.getColumnId(r.name);null!=e&&(this._indexMap[r.name]=e)}const p=new A(l.map(e=>e.toJSON()));this._fieldsIndex=p;const d=V(i.geometryType??"point");return this._metadata=J.createFeature({fieldsIndex:p.toJSON(),geometryType:d,hasZ:this._hasZ,hasM:this._hasM,featureIdInfo:{type:"object-id",fieldName:X},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:i.spatialReference,outSpatialReference:null,attributeSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:d,featureIdInfo:{type:"object-id",fieldName:X},hasM:this._hasM,hasZ:this._hasZ,spatialReference:i.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=s?.extent?s.extent:await this._tryDeriveParquetFullExtent(i),{capabilities:this._capabilities,layerDefinition:{fields:i.fields?.map(e=>e.toJSON()),drawingInfo:M(d),extent:this._fullExtent??void 0,geometryType:d,geometryEncoding:i.geometryEncoding?.toJSON(),displayOptimization:i.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:e}of this._streams.values())e.remove();this._streams.clear(),this._indexMap={},this._handles.removeAll()}async reload(e){this.destroy(),await this.load(e)}set remoteClient(e){this._source=e.createInvokeProxy("")}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._provider=P(e,this._provider.getGeometryInfo(),()=>this._customParameters)}async queryFeatures(e,t){const s=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),Oe(s)||(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,K):K,s.resultOffset=s.resultOffset??0),s.outStatistics)return this._queryStatistics(s,t);s.returnDistinctValues&&(s.returnGeometry=void 0);return(await this._enqueueQuery(s,t)).createQueryResponse()}async queryFeatureCount(e,t){const s=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),!pe(s))return this._getFeatureCount();s.outFields=void 0,s.returnGeometry=void 0;return(await this._enqueueQuery(s,t)).createQueryResponseForCount()}async queryObjectIds(e,t){const s=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),!pe(s))return Array.from({length:await this._getFeatureCount()},(e,t)=>t);s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0;return(await this._enqueueQuery(s,t)).items.map(e=>e.getObjectId())}async queryAttributeBins(e,t={}){throw new r("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(e,t){const r=await O(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),this._fullExtent&&!pe(r))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=s(this._metadata.spatialReference);r.returnGeometry=!0,r.outFields=void 0;const a=p(d(),m),n=d(),u=await this._enqueueQuery(r,t);let o=0;for(const s of u.items)s.getBounds(n)&&(f(a,n),o+=1);return{count:o,extent:q(a,i,r.outSR?s(r.outSR):i.toJSON(),i,!1)}}async queryStream(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const s=await this._getCandidateFiles(e),r=new ie(s,async(t,s)=>{const r=await t.file,i=await this._createParquetDisplayQuery(r,t.id,e);return r.executeQuery(i,K,s)}),i=this._streamIdCounter++,a=n(t.signal,e=>{const t=this._streams.get(i);null!=t&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:r,handle:a}),i}async getStreamNext(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const s=this._streams.get(e);if(!s)return{result:null};const r=await s.stream.next(t.signal);if(null==r)return s.handle.remove(),this._streams.delete(e),{result:null};const i=r.chunk.serialize().buffer,a={fileId:r.fileId,buffer:i};return i instanceof ArrayBuffer?{result:a,transferList:[i]}:{result:a}}async getStreamNextFeatures(e,t){const{result:s}=await this.getStreamNext(e,t);if(null==s)return null;const r=(await W()).ParquetChunk.deserialize(new Uint8Array(s.buffer)),i=new L(this._metadata,this._indexMap,r,s.fileId),a=[];for(;i.next();){const e=I(i.readGeometryWorldSpace(),i.geometryType,i.hasZ,i.hasM),t=i.readAttributes();a.push({attributes:t,geometry:e})}return{features:a}}async createPatch(e,t,s,r,i){if(!i.signal)throw new Error("InternalError: AbortSignal must be passed");const a=await this._getFileInfoById(e),n=await a.file;return(await n.createChunkPatch(t,s,r,i.signal)).serialize().buffer}async _getCandidateFiles(e){const t=await this._provider.getFiles(),s=await this._getSpatialFilePruning(e);if(null==s)return t;const r=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,s));return"xz"===s.type?Ie(r,s):r}async _queryStatistics(e,t){const s=await O({...e},null,this._queryEngineParams.spatialReference);if(s.returnGeometry=void 0,he(s,this._fieldsIndex)){const e=await this._getStatisticsFromFiles(s);if(e)return e}return(await this._enqueueQuery(s,t)).createQueryResponse()}async _getStatisticsFromFiles(e){const t=await this._provider.getFiles(),s={},r=[];for(const i of e.outStatistics??[]){const e=ge(i,t);if(!e.available)return null;s[i.outStatisticFieldName]=e.value,r.push(ye(i,this._fieldsIndex))}return{fields:r,features:[{attributes:s}]}}async _getSpatialFilePruning(e){if("tile"!==e.type&&("arcade"!==e.type||null==e.extent))return null;const t=this._displayOptimization,s=t?.index;if(null==s)return null;const r=e.outSpatialReference.wkid;if(null==s.wkid||null==r)return null;const i=s.wkid,a=await W();switch(s.type){case"xz":return{type:"xz",fieldName:s.code,intersects:(t,n)=>a.queryIntersectsXZStatistics(s.fullExtent,e.extent,r,i,re,t,n)};case"z":return{type:"xy",xFieldName:s.xColumn,yFieldName:s.yColumn,intersects:(t,s,n,u)=>a.queryIntersectsXYStatistics(e.extent,r,i,t,s,n,u)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case"xz":{const s=Se(e,t);return null==s||Re(s,t)}case"xy":{const{xStatistics:s,yStatistics:r}=qe(e,t);return null==s||null==r||Ce(s,r,t)}}}async _tryDeriveParquetFullExtent(s){if(!s.spatialReference)return null;if(null==this._fullExtent&&"location"===s.geometryEncoding?.type){const i=await this._provider.getFiles(),{xField:a,yField:n}=s.geometryEncoding,u=p(d(),m);for(const s of i){const i=await s.file;for(const s of i.rowGroups()){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,s.columnDescriptorForAttribute(a),!1),r=e(i,s.columnDescriptorForAttribute(n),!1),o=[t.minValue(),r.minValue(),t.maxValue(),r.maxValue()];h(u,o),s.free()}catch(r){i.error=r,i.hasError=!0}finally{t(i)}}}return{xmin:u[0],ymin:u[1],xmax:u[3],ymax:u[4],spatialReference:s.spatialReference?.toJSON()}}return null}async _getFileInfoById(e){const t=await this._provider.getFiles();for(const s of t)if(s.id===e)return s;throw new Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t,s,r,i){const a=(await W()).Query.new();null!=s&&a.setPreFilterStart(s),null!=r&&a.setPreFilterCount(r),null!=i&&a.setPostFilterCount(i);const n=await this._getRequiredFields(e);a.setOutFields(n),(e.geometry||e.returnGeometry)&&a.setReturnGeometry(!0),a.setReturnZ(!!e.returnZ),a.setReturnM(!!e.returnM);const u=this._tryGetGeneralizedGeometryScale(e);null!=u&&a.setScale(u);const o=e.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=o.wkid;if(e.geometry&&(F(o)||S(o))){const t=y(_(),g);for(const s of R(e.geometry))w(t,s);a.setOutSpatialReference(l),a.setExtent({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]})}if(e.where){const{id:s,file:r}=t;await this._setWhereClause(a,await r,s,e.where)}return a}async _createParquetDisplayQuery(e,t,s){const r=(await W()).Query.new();return"tile"===s.type?(r.setExtent(s.extent),r.setQuantizationTransform(s.transform),r.setScale(s.scale)):"arcade"===s.type&&null!=s.extent&&r.setExtent(s.extent),r.setOutFields(s.outFields.filter(e=>null!=this._indexMap[e])),r.setOutSpatialReference(s.outSpatialReference.wkid),r.setReturnGeometry(s.returnGeometry),r.setReturnZ(s.returnZ),r.setReturnM(s.returnM),s.where&&await this._setWhereClause(r,e,t,s.where),r}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new r("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new r("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new r("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async _setWhereClause(e,t,s,i){const a=this._indexMap,n=this._fieldsIndex,u={getAttribute(e,r){const i=a[r];if(null==i){const t=n.get(r);if("__OBJECTID"===t?.name){const t=e.row+e.rowGroupStart;return Q(s,t)}return null}const u=t.readAttribute(e.rowGroup,e.row,i);if(null==u)return null;const o=n.get(r);return"esriFieldTypeString"===o.type||"esriFieldTypeDateOnly"===o.type||"esriFieldTypeTimeOnly"===o.type||"esriFieldTypeTimestampOffset"===o.type?$.decode(u):u}},o=await l(i,this._fieldsIndex);if(!o.isStandardized)throw new r("sql-parse-error","expression is not standardized");const c=(e,t,s)=>o.testFeatureCompiled({rowGroup:e,row:t,rowGroupStart:s},u,null),p=o.fieldNames.map(e=>n.get(e)).filter(e=>e&&null!=this._indexMap[e?.name]);e.setWhere(i),e.setWhereEvaluator(c),e.setWhereFields(p.map(e=>e.name))}async*_streamFeatures(e,t,s,r,i){const a=await this._provider.getFiles();let n=0;for(const u of a){const a=n,o=n+u.statistics.rowCount;if(n+=u.statistics.rowCount,null!=t&&t>=o)continue;const l=null!=t?Math.max(t-a,0):null;let c=s;if(null!=s){const e=t??0,r=e+s,i=Math.max(e,a),n=Math.min(r,o);c=Math.max(n-i,0)}if(0===c)continue;const p=await this._createParquetQuery(e,u,l,c,r),d=await u.file,f=await d.executeQuery(p,K),h=async()=>{const e=await f.next(i);if(!e)return null;const t=new L(this._metadata,this._indexMap,e,u.id);return Fe([new k(t,null,0,!1)],this._queryEngineParams)};let m=await h();for(;null!=m;)yield m,m=await h()}}async _queryFeaturesWithQueryEnginePagination(e,t){const s=[],r=this._streamFeatures(e,null,null,null,t);let i=await r.next();for(;!i.done;){const a=await i.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(const e of a)s.push(e);i=await r.next()}return s}async _queryFeaturesWithUpfrontPagination(e,t){let s,r,i,a=e.resultOffset??0,n=e.resultRecordCount??K;de(e)?fe(e)||(i=a+n):(a&&(s=a,a=0),r=e.resultRecordCount);const u=[],o=this._streamFeatures(e,s,r,i,t);let l=await o.next();for(;!l.done&&n>0;){const s=await l.value.executeQueryForOpaqueFeatures({...e,where:void 0},t);for(const e of s)if(a>0)a--;else if(u.push(e),--n<=0)return u;l=await o.next()}return u}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){if(e.objectIds?.length){const s=new Map;for(const t of e.objectIds){const e=T(t),r=j(t);let i=s.get(e);i||(i=[],s.set(e,i)),i.push(r)}const r=[];for(const[i,a]of s.entries()){const s=await this._executeFileIdQuery(e,i,a,t);for(const e of s)r.push(e)}return new E(r,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:H,featureIdInfo:this._queryEngineParams.featureIdInfo})}if("1=1"===e.where&&(e.where=null),e.resultOffset??=0,e.resultRecordCount??=await this._getFeatureCount(),e.resultRecordCount>ee){if(!(this._displayOptimization&&e.geometry))throw new r("parquet:cannot-execute-query","Unable to execute query, dataset is too large.")}const s=!!e.orderByFields?.length||!!e.outStatistics?.length||!!e.returnDistinctValues,i=s?await this._queryFeaturesWithQueryEnginePagination(e,t):await this._queryFeaturesWithUpfrontPagination(e,t);return s||(e.resultOffset=0),new E(i,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:this._hasM,hasZ:this._hasZ,featureAdapter:H,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,s,r){const i=await this._getRequiredFields(e),a=(await W()).Query.new();a.setOutFields(i),a.setReturnGeometry(!!e.returnGeometry),a.setReturnZ(!!e.returnZ),a.setReturnM(!!e.returnM),a.setIds(new Uint32Array(s));const n=await this._getFile(t),u=await n.executeQuery(a,K,r);let o=await u.next(r),l=0;const c=[];for(;null!=o;){const e=new L(this._metadata,this._indexMap,o,t),s=new k(e,null,l++,!1);c.push(s),o=await u.next(r)}return Fe(c,this._queryEngineParams).executeQueryForOpaqueFeatures(e,r)}async _getRequiredFields(e){const t=new Set;if(e.outStatistics)for(const s of v(this._fieldsIndex,e.outStatistics,e.groupByFieldsForStatistics))t.add(s);else if(e.outFields)for(const s of e.outFields)t.add(s);return(t.has("*")?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>null!=this._indexMap[e])}_tryGetGeneralizedGeometryScale(e){if(!this._displayOptimization)return null;const t=e.outSR??this._queryEngineParams.spatialReference;if(!F(t)&&!S(t))return null;const s=e.quantizationParameters?.tolerance??e.maxAllowableOffset;return s?x(s,t):null}}function oe(e){switch(e){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":case"resultOffset":case"resultRecordCount":return!0;default:return!1}}function le(e){switch(e){case"fullText":case"having":case"timeExtent":case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"geometry":return!0;default:return!1}}function ce(e){switch(e){case"fullText":case"having":case"timeExtent":return!0;case"historicMoment":case"aggregateIds":case"uniqueIds":case"gdbVersion":case"objectIds":case"where":case"resultOffset":case"geometry":case"resultRecordCount":return!1}return!1}function pe(e){for(const t in e){const s=t;if(oe(s)&&null!==e[s])return!0}return!1}function de(e){for(const t in e){const s=t;if(le(s)&&null!==e[s])return!0}return!1}function fe(e){for(const t in e){const s=t;if(ce(s)&&null!==e[s])return!0}return!1}function he(e,t){return!!e.outStatistics?.length&&!pe(e)&&!e.groupByFieldsForStatistics?.length&&!e.orderByFields?.length&&!e.returnDistinctValues&&!e.returnAggIds&&e.outStatistics.every(e=>me(e,t))}function me(e,t){switch(e.statisticType){case"count":return"1"===e.onStatisticField||null!=t.get(e.onStatisticField);case"min":case"max":{const s=t.get(e.onStatisticField);return null!=s&&B(s)}default:return!1}}function ye(e,t){const s="exceedslimit"!==e.statisticType?t.get(e.onStatisticField):null,r="min"!==e.statisticType&&"max"!==e.statisticType||"esriFieldTypeDate"!==s?.type?"esriFieldTypeDouble":s.type;return{name:e.outStatisticFieldName,alias:e.outStatisticFieldName,type:r}}function ge(e,t){switch(e.statisticType){case"count":return _e(e,t);case"min":return we(e,t,Math.min);case"max":return we(e,t,Math.max);default:return{available:!1,value:null}}}function _e(e,t){if("count"!==e.statisticType)return{available:!1,value:null};if("1"===e.onStatisticField)return{available:!0,value:t.reduce((e,t)=>e+t.statistics.rowCount,0)};let s=0;for(const r of t){const t=r.statistics.statistics.get(e.onStatisticField);if(null==t||null==t.nullCount)return{available:!1,value:null};s+=r.statistics.rowCount-t.nullCount}return{available:!0,value:s}}function we(e,t,s){if("min"!==e.statisticType&&"max"!==e.statisticType)return{available:!1,value:null};let r=null;const i="min"===e.statisticType?"minValue":"maxValue";for(const a of t){const t=a.statistics.statistics.get(e.onStatisticField);if(null==t)return{available:!1,value:null};const n=xe(t[i]);null!=n&&(r=null==r?n:s(r,n))}return{available:!0,value:r}}function xe(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function Fe(e,t){const s=new Z;for(const r of e)s.insert(r);return new C({...t,featureStore:s})}function Se(e,t){return e.statistics.statistics.get(t.fieldName)??null}function Ie(e,t){return e.slice().sort((e,s)=>{const r=ve(e,t),i=ve(s,t);return r===i?0:r<i?-1:1})}function ve(e,t){const s=Se(e,t);if(null==s)return Number.POSITIVE_INFINITY;const r=be(s.minValue),i=be(s.maxValue);return null==r||null==i||i<r?Number.POSITIVE_INFINITY:i-r}function qe(e,t){return{xStatistics:e.statistics.statistics.get(t.xFieldName)??null,yStatistics:e.statistics.statistics.get(t.yFieldName)??null}}function Re(e,t){const s=be(e.minValue),r=be(e.maxValue);return null==s||null==r||t.intersects(s,r)}function Ce(e,t,s){const r=be(e.minValue),i=be(e.maxValue),a=be(t.minValue),n=be(t.maxValue);return null==r||null==i||null==a||null==n||s.intersects(r,i,a,n)}function be(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function Ee(e,t,s){const r=e?.featureCount;let i=!1;return null!=r&&r<has("parquetlayer-full-query-feature-count")&&(i=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:s,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...b,maxRecordCount:K,supportsOrderBy:i,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function Oe(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}export{ue as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Error.js";import t from"../../core/Logger.js";import{latitudeFieldNames as n,longitudeFieldNames as o}from"../../layers/support/locationUtils.js";import{loadParquetModule as i}from"./loadParquetModule.js";const r=()=>t.getLogger("esri.layers.ParquetLayer"),a=new Set(["uncompressed","snappy","gzip"]),l=new Set(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]);function s(t,n){switch(n){case"esriGeometryPoint":return t.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return t.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return t.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return t.GeometryType.Multipoint;default:throw new e("parquet",`Found unexpected GeometryType: ${n}`)}}function u(e,t){const n=t.encoding,o=s(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(n.type){case"wkb":return e.GeometryField.fromWkb(n.field,i,o);case"location":{const{yField:t,xField:r}=n;return e.GeometryField.fromLocation(t,r,i,o)}}}function p(e,t){const n=e.GeometryInfo.new();t.geometry&&n.setGeometry(u(e,t.geometry));const o=t.displayOptimization;if(o){const{index:t,parentColumn:i}=o,r=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const o=e.DisplayOptimizationZBuilder.new();o.setCodeField(r(t.code)),o.setXColumn(r(t.xColumn)),o.setYColumn(r(t.yColumn)),o.setCooordinatePrecision(t.coordinatePrecision),o.setFullExtent(t.fullExtent),o.setSpatialReference(t.wkid,t.wkt),o.setHasZ(!!t.zColumn),o.setHasM(!!t.mColumn),n.setOptmizationZ(o)}if("xz"===t.type){const o=s(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(r(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(o),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const n of t.levels??[]){const[t,o]=n.transform.translate,[a,l]=n.transform.scale,s=new Float64Array([t,o]),u=new Float64Array([a,l]),p=r(n.column);i.addLevel(e.MultiscaleGeometryField.new(n.level,n.scale,p,s,u))}n.setOptmizationXZ(i)}}return n}async function c(t,n){const o=await i(),r=n.geometryInfo?p(o,n.geometryInfo):null,a=n.provider.fetchRange.bind(n.provider),l=n.provider.fetchLength.bind(n.provider);try{return await o.ParquetFile.fromUrl(t,a,l,r)}catch(s){throw new e("parquet","Failed to parse file",{error:s})}}function d(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function m(t){if(t.keyValueMetadata("esri"))throw new e("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const n=t.keyValueMetadata("geodisplay");if(null!=n)return y(JSON.parse(n));const o=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=o){const e=JSON.parse(o);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type)){return y({parentColumn:t.name,index:t.metadata})}}return null}function y(e){if("xz"===e.index.type&&(e.index.geometryType=b(e.index.geometryType),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))return r().warn("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`),null;const{xmin:t,ymin:n,xmax:o,ymax:i}=e.index.fullExtent;return Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(o)&&Number.isFinite(i)?e:(r().warn("parquet:protocol-violation","Ignoring display optimization, found bad extent",{index:e.index}),null)}function f(e){g(e);const t=w(e),n=d(e),o=m(e),i=x(n,t);let r,a;if(i)switch(i.type){case"location":a={wkid:4326},r="esriGeometryPoint";break;case"wkb":if(n){const e=n.primary_column,t=n.columns[e];r=P(t),a=k(t)}}if(o){const e=o.index;!a&&e.wkid&&(a={wkid:e.wkid}),r||(r="z"===e.type?"esriGeometryPoint":h(e.geometryType))}return{geoMetadata:n,displayOptimization:o,geometryEncoding:i,geometryInfo:a&&r?{geometry:i?{geometryType:r,spatialReference:a,encoding:i}:null,displayOptimization:o}:null,geometryType:r,spatialReference:a,extent:T(n,o,a),fields:t}}function g(t){for(const n of t.compressionCodecs())if(!a.has(n))throw new e("parquet:unsupported",`Compression codec ${n} is unsupported. Must be of type ${Array.from(a).join(",")}`)}function w(e){return e.fields(!1).map(e=>({name:e.name,alias:e.name,type:e.type}))}function x(e,t){if(null!=e){const t=e.primary_column;return{type:"wkb",field:t,orientation:"counterclockwise"===e.columns[t].orientation?"counter-clockwise":null}}const n=F(t.filter(e=>l.has(e.type)).map(e=>e.name));return n.latitudeFieldName&&n.longitudeFieldName?{type:"location",xField:n.longitudeFieldName,yField:n.latitudeFieldName}:null}function F(e){const t=e.map(e=>e.toLowerCase());return{longitudeFieldName:e[t.indexOf(o.find(e=>t.includes(e)))],latitudeFieldName:e[t.indexOf(n.find(e=>t.includes(e)))]}}function P(t){const{geometry_types:n}=t,o=new Set;for(const e of n){const t=G(e);t&&o.add(t)}if(o.size>1)throw new e("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:o});return 1===o.size?o.values().next().value:void 0}function G(e){switch(e){case"Point":return"esriGeometryPoint";case"Polygon":case"MultiPolygon":return"esriGeometryPolygon";case"LineString":return"esriGeometryPolyline";case"MultiPoint":return"esriGeometryMultipoint";default:return null}}function h(e){switch(e){case"polygon":return"esriGeometryPolygon";case"polyline":return"esriGeometryPolyline";case"multipoint":return"esriGeometryMultipoint"}}function b(t){switch(t.toLowerCase()){case"polygon":return"polygon";case"polyline":return"polyline";case"multipoint":return"multipoint";default:throw new e("parquet:unsupported",`Geometry type ${t} is unsupported`)}}function k(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?{wkid:t}:void 0}function T(e,t,n){if(!n)return null;const o=e?e.columns[e.primary_column]:null,i=o?.bbox;if(i?.every(e=>Number.isFinite(e)))switch(i.length){case 4:return{xmin:i[0],ymin:i[1],xmax:i[2],ymax:i[3],spatialReference:n};case 6:return{xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:n};default:r().warn("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{geoMetadata:e})}const a=t?.index.fullExtent;return a?{...a,spatialReference:n}:null}export{c as createParquetFile,d as readGeoMetadata,m as readGeodisplayMetadata,f as readMetadata};
2
+ import e from"../../core/Error.js";import t from"../../core/Logger.js";import{latitudeFieldNames as n,longitudeFieldNames as o}from"../../layers/support/locationUtils.js";import{loadParquetModule as i}from"./loadParquetModule.js";const r=()=>t.getLogger("esri.layers.ParquetLayer"),a=new Set(["uncompressed","snappy","gzip"]),l=new Set(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]);function s(t,n){switch(n){case"esriGeometryPoint":return t.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return t.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return t.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return t.GeometryType.Multipoint;default:throw new e("parquet",`Found unexpected GeometryType: ${n}`)}}function u(e,t){const n=t.encoding,o=s(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(n.type){case"wkb":return e.GeometryField.fromWkb(n.field,i,o);case"location":{const{yField:t,xField:r}=n;return e.GeometryField.fromLocation(t,r,i,o)}}}function m(e,t){const n=e.GeometryInfo.new();t.geometry&&n.setGeometry(u(e,t.geometry));const o=t.displayOptimization;if(o){const{index:t,parentColumn:i}=o,r=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const o=e.DisplayOptimizationZBuilder.new();o.setCodeField(r(t.code)),o.setXColumn(r(t.xColumn)),o.setYColumn(r(t.yColumn)),o.setCooordinatePrecision(t.coordinatePrecision),o.setFullExtent(t.fullExtent),o.setSpatialReference(t.wkid,null==t.wkid?t.wkt:void 0),o.setHasZ(!!t.zColumn),o.setHasM(!!t.mColumn),t.zColumn&&o.setZColumn(r(t.zColumn)),t.mColumn&&o.setMColumn(r(t.mColumn)),n.setOptmizationZ(o)}if("xz"===t.type){const o=s(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(r(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(o),i.setSpatialReference(t.wkid,null==t.wkid?t.wkt:void 0),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const n of t.levels??[]){const t=new Float64Array(n.transform.translate),o=new Float64Array(n.transform.scale),a=r(n.column);i.addLevel(e.MultiscaleGeometryField.new(n.level,n.scale,a,t,o))}n.setOptmizationXZ(i)}}return n}async function p(t,n){const o=await i(),r=n.geometryInfo?m(o,n.geometryInfo):null,a=n.provider.fetchRange.bind(n.provider),l=n.provider.fetchLength.bind(n.provider);try{return await o.ParquetFile.fromUrl(t,a,l,r)}catch(s){throw new e("parquet","Failed to parse file",{error:s})}}function c(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function d(t){if(t.keyValueMetadata("esri"))throw new e("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const n=t.keyValueMetadata("geodisplay");if(null!=n)return y(JSON.parse(n));const o=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=o){const e=JSON.parse(o);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type)){return y({parentColumn:t.name,index:t.metadata})}}return null}function y(e){if("xz"===e.index.type&&(e.index.geometryType=k(e.index.geometryType),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))return r().warn("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`),null;const{xmin:t,ymin:n,xmax:o,ymax:i}=e.index.fullExtent;return Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(o)&&Number.isFinite(i)?e:(r().warn("parquet:protocol-violation","Ignoring display optimization, found bad extent",{index:e.index}),null)}function f(e){g(e);const t=w(e),n=c(e),o=d(e),i=x(n,t),{hasZ:r,hasM:a}=P(n,o);let l,s;if(i)switch(i.type){case"location":s={wkid:4326},l="esriGeometryPoint";break;case"wkb":if(n){const e=n.primary_column,t=n.columns[e];l=F(t),s=z(t)}}if(o){const e=o.index;!s&&e.wkid&&(s={wkid:e.wkid}),l||(l="z"===e.type?"esriGeometryPoint":G(e.geometryType))}return{geoMetadata:n,displayOptimization:o,hasZ:r,hasM:a,geometryEncoding:i,geometryInfo:s&&l?{geometry:i?{geometryType:l,spatialReference:s,encoding:i}:null,displayOptimization:o}:null,geometryType:l,spatialReference:s,extent:b(n,o,s),fields:t}}function g(t){for(const n of t.compressionCodecs())if(!a.has(n))throw new e("parquet:unsupported",`Compression codec ${n} is unsupported. Must be of type ${Array.from(a).join(",")}`)}function w(e){return e.fields(!1).map(e=>({name:e.name,alias:e.name,type:e.type}))}function x(e,t){if(null!=e){const t=e.primary_column;return{type:"wkb",field:t,orientation:"counterclockwise"===e.columns[t].orientation?"counter-clockwise":null}}const n=h(t.filter(e=>l.has(e.type)).map(e=>e.name));return n.latitudeFieldName&&n.longitudeFieldName?{type:"location",xField:n.longitudeFieldName,yField:n.latitudeFieldName}:null}function h(e){const t=e.map(e=>e.toLowerCase());return{longitudeFieldName:e[t.indexOf(o.find(e=>t.includes(e)))],latitudeFieldName:e[t.indexOf(n.find(e=>t.includes(e)))]}}function F(t){const{geometry_types:n}=t,o=new Set;for(const e of n){const t=M(e);t&&o.add(t)}if(o.size>1)throw new e("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:o});return 1===o.size?o.values().next().value:void 0}function M(e){switch(e.replace(/ (?:Z|M|ZM)$/u,"")){case"Point":return"esriGeometryPoint";case"Polygon":case"MultiPolygon":return"esriGeometryPolygon";case"LineString":return"esriGeometryPolyline";case"MultiPoint":return"esriGeometryMultipoint";default:return null}}function P(e,t){const n=t?.index;if("z"===n?.type)return{hasZ:null!=n.zColumn,hasM:null!=n.mColumn};if("xz"===n?.type)return{hasZ:!0===n.hasZ,hasM:!0===n.hasM};const o=e?.columns[e.primary_column]?.geometry_types??[];return{hasZ:o.some(e=>/ (?:Z|ZM)$/u.test(e)),hasM:o.some(e=>/ (?:M|ZM)$/u.test(e))}}function G(e){switch(e){case"polygon":return"esriGeometryPolygon";case"polyline":return"esriGeometryPolyline";case"multipoint":return"esriGeometryMultipoint"}}function k(t){switch(t.toLowerCase()){case"polygon":return"polygon";case"polyline":return"polyline";case"multipoint":return"multipoint";default:throw new e("parquet:unsupported",`Geometry type ${t} is unsupported`)}}function z(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?{wkid:t}:void 0}function b(e,t,n){if(!n)return null;const o=e?e.columns[e.primary_column]:null,i=o?.bbox;if(i?.every(e=>Number.isFinite(e)))switch(i.length){case 4:return{xmin:i[0],ymin:i[1],xmax:i[2],ymax:i[3],spatialReference:n};case 6:return{xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:n};default:r().warn("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{geoMetadata:e})}const a=t?.index.fullExtent;return a?{...a,spatialReference:n}:null}export{p as createParquetFile,c as readGeoMetadata,d as readGeodisplayMetadata,f as readMetadata};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.57",
3
+ "version": "5.2.0-next.58",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const d="20260723",c="bd4030e5c14dd252d8f06fbb0e74179d7568ecc8";export{d as buildDate,c as commitHash};
2
+ const b="20260724",c="dbee1b94b1631c9e3bc7acb64431447a69d4ca5a";export{b as buildDate,c as commitHash};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as r}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as s}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e}get hasRequiredSupport(){return s(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}getUpdateHashProperties(e){return[()=>this.layer.data,()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=e.availableFields.includes("*")?this.layer.fields.map(e=>e.name):e.availableFields,a={partial:{dataSourceHash:this.layer.data?JSON.stringify(this.layer.data.toJSON()):null,availableFields:i},full:{definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:r,customParameters:this.layer.customParameters??null}};return{type:"parquet",service:t,strategy:this._createStrategy(t,a)}}_createStrategy(e,r){return e.geometryInfo.displayOptimization?{type:"xz",...r}:{type:"snapshot",...r}}createProcessorSchema(e,r,i){const a={fields:this.layer.fields.map(e=>e.toJSON()),renderer:this.layer.renderer?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return l(e,r,a,i)}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(t){const a=i(this.layer),l=t.spatialReference.toJSON(),s=this.layer.geometryEncoding;if(null==s&&null==this.layer.displayOptimization)throw new e("parquet-layer:unsupported","creating a parquet layer view requires an encoding",{layer:this.layer});return{type:"parquet",outSpatialReference:l,geometryInfo:{geometry:s?{geometryType:r(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:s.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:l,attributeSpatialReference:null,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},geometryType:a,hasZ:!1,hasM:!1,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}}}}export{n as ParquetLayerAdapter};
2
+ import e from"../../../../../core/Error.js";import{toParquetJSONGeometryType as r}from"../../../../../layers/support/parquetUtils.js";import{getEffectiveFeatureReduction as t}from"./featureReductionUtils.js";import{getServiceGeometryType as i}from"./geometryUtils.js";import{createLabelVVEvaluator as a}from"./labelingUtils.js";import{createSimpleProcessorSchema as l}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as s}from"../support/rendererUtils.js";class n{constructor(e){this.layer=e}get hasRequiredSupport(){return s(this.layer.renderer)}get timeOptions(){return null}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:a(this.layer.renderer)}}]}getUpdateHashProperties(e){return[()=>this.layer.data,()=>this.layer.outFields,()=>this.layer.definitionExpression,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>t(this.layer,e),()=>this.layer.customParameters,()=>this.layer.orderBy,()=>this.layer.returnZ,()=>this.layer.returnM,()=>this.layer.renderer,()=>this.layer.popupTemplate]}openMessagePorts(){return this.layer.source.openPorts()}async createSourceSchema(e,r){const t=this._createServiceInfo(e),i=e.availableFields.includes("*")?this.layer.fields.map(e=>e.name):e.availableFields,a={partial:{dataSourceHash:this.layer.data?JSON.stringify(this.layer.data.toJSON()):null,availableFields:i},full:{definitionExpression:this.layer.definitionExpression??null,sourceRefreshVersion:r,customParameters:this.layer.customParameters??null,returnZ:e.returnZ&&t.metadata.hasZ,returnM:e.returnM&&t.metadata.hasM}};return{type:"parquet",service:t,strategy:this._createStrategy(t,a)}}_createStrategy(e,r){return e.geometryInfo.displayOptimization?{type:"xz",...r}:{type:"snapshot",...r}}createProcessorSchema(e,r,i){const a={fields:this.layer.fields.map(e=>e.toJSON()),renderer:this.layer.renderer?.clone(),labelingInfoSource:this.layer.id,featureReduction:t(this.layer,r),geometryType:this.layer.geometryType,labelingInfo:this.layer.labelingInfo,labelsVisible:this.layer.labelsVisible,objectIdField:this.layer.objectIdField,orderBy:this.layer.orderBy};return l(e,r,a,i)}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}_createServiceInfo(t){const a=i(this.layer),l=t.spatialReference.toJSON(),s=this.layer.geometryEncoding,n=!0===this.layer.capabilities?.data?.supportsZ,o=!0===this.layer.capabilities?.data?.supportsM;if(null==s&&null==this.layer.displayOptimization)throw new e("parquet-layer:unsupported","creating a parquet layer view requires an encoding",{layer:this.layer});return{type:"parquet",outSpatialReference:l,geometryInfo:{geometry:s?{geometryType:r(this.layer.geometryType),spatialReference:this.layer.spatialReference.toJSON(),encoding:s.toJSON()}:null,displayOptimization:this.layer.displayOptimization},metadata:{spatialReference:this.layer.spatialReference.toJSON(),outSpatialReference:l,attributeSpatialReference:null,fieldsIndex:this.layer.fieldsIndex.toJSON(),featureIdInfo:{type:"object-id",fieldName:this.layer.objectIdField},geometryType:a,hasZ:n,hasM:o,types:null,subtypes:null,timeInfo:null,typeIdField:null,subtypeField:null,globalIdField:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}}}}export{n as ParquetLayerAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../../../core/has.js";import{notDeepEqual as t}from"../../../../../../core/object.js";import{throwIfAborted as e}from"../../../../../../core/promiseUtils.js";import{difference as s}from"../../../../../../core/SetUtils.js";import{openWithPorts as a}from"../../../../../../core/workers/workers.js";import{loadParquetModule as i}from"../../../../../../libs/parquet/loadParquetModule.js";import{ALoadStrategy as r}from"./ALoadStrategy.js";import{ParquetSnapshotSourceChunk as o}from"./chunks/ParquetSnapshotSourceChunk.js";import{FeatureSetReaderParquet as l}from"../../support/FeatureSetReaderParquet.js";class n extends r{constructor(t,e,s,a){super(t.metadata,e,s),this._service=t,this._loaded=this._load(a)}destroy(){super.destroy(),this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}get about(){return{willQueryAllFeatures:!0,willQueryFullResolutionGeometry:!0}}get availableFields(){return this._schema.partial.availableFields}get definitionExpression(){return this._schema.full.definitionExpression}async tryUpdate(e,s){await this._loaded;let a=!0;return t(this.availableFields,s.availableFields)&&await this._updateFields(s.availableFields),this._schema.partial.dataSourceHash!==s.dataSourceHash&&(a=!1),this._schema.partial=s,a}async load(t){return this._loaded}unload(t){}_onOverride(){}async _load(t){this._ports=await t.layerView.openMemoryPorts(),this._client=await a(this._ports,{maxNumberOfConcurrentJobs:20}),this._proxy=this._client.createInvokeProxy(),this._indexMap=await this._proxy.getIndexMap(),await this._download()}async _updateFields(t){const e=new Set(t),a=s(e,new Set(this.availableFields));if(null!=this._service.metadata.fieldsIndex&&a.size){const t=Array.from(this.store.insertedChunks()).map(t=>t.updateFields(this._proxy,Array.from(a),this._options));await Promise.all(t)}}async _downloadFiles(){const t=await i();e(this._options);const s=await this._proxy.queryStream({type:"snapshot",outFields:Array.from(this.availableFields),returnGeometry:!0,outSpatialReference:this.metadata.outSpatialReference.toJSON(),where:this.definitionExpression},this._options);let a=0;for(;;){const i=await this._proxy.getStreamNext(s,this._options);if(e(this._options),null==i)break;const{fileId:r,buffer:n}=i,d=t.ParquetChunk.deserialize(new Uint8Array(n)),h=new l(this.metadata,this._indexMap,d,r),p=new o(this.metadata,h,a++,!1,r);this.store.insert(p)}}async _download(){try{await this._downloadFiles();const t=new o(this.metadata,null,-1,!0,null);this.store.insert(t)}catch(t){throw console.error(t),t}}}export{n as ParquetSnapshotLoadStrategy};
2
+ import"../../../../../../core/has.js";import{notDeepEqual as t}from"../../../../../../core/object.js";import{throwIfAborted as e}from"../../../../../../core/promiseUtils.js";import{difference as s}from"../../../../../../core/SetUtils.js";import{openWithPorts as a}from"../../../../../../core/workers/workers.js";import{loadParquetModule as i}from"../../../../../../libs/parquet/loadParquetModule.js";import{ALoadStrategy as r}from"./ALoadStrategy.js";import{ParquetSnapshotSourceChunk as o}from"./chunks/ParquetSnapshotSourceChunk.js";import{FeatureSetReaderParquet as l}from"../../support/FeatureSetReaderParquet.js";class n extends r{constructor(t,e,s,a){super(t.metadata,e,s),this._service=t,this._loaded=this._load(a)}destroy(){super.destroy(),this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}get about(){return{willQueryAllFeatures:!0,willQueryFullResolutionGeometry:!0}}get availableFields(){return this._schema.partial.availableFields}get definitionExpression(){return this._schema.full.definitionExpression}async tryUpdate(e,s){await this._loaded;let a=!0;return t(this.availableFields,s.availableFields)&&await this._updateFields(s.availableFields),this._schema.partial.dataSourceHash!==s.dataSourceHash&&(a=!1),this._schema.partial=s,a}async load(t){return this._loaded}unload(t){}_onOverride(){}async _load(t){this._ports=await t.layerView.openMemoryPorts(),this._client=await a(this._ports,{maxNumberOfConcurrentJobs:20}),this._proxy=this._client.createInvokeProxy(),this._indexMap=await this._proxy.getIndexMap(),await this._download()}async _updateFields(t){const e=new Set(t),a=s(e,new Set(this.availableFields));if(null!=this._service.metadata.fieldsIndex&&a.size){const t=Array.from(this.store.insertedChunks()).map(t=>t.updateFields(this._proxy,Array.from(a),this._options));await Promise.all(t)}}async _downloadFiles(){const t=await i();e(this._options);const s=await this._proxy.queryStream({type:"snapshot",outFields:Array.from(this.availableFields),returnGeometry:!0,returnZ:this._schema.full.returnZ,returnM:this._schema.full.returnM,outSpatialReference:this.metadata.outSpatialReference.toJSON(),where:this.definitionExpression},this._options);let a=0;for(;;){const i=await this._proxy.getStreamNext(s,this._options);if(e(this._options),null==i)break;const{fileId:r,buffer:n}=i,h=t.ParquetChunk.deserialize(new Uint8Array(n)),d=new l(this.metadata,this._indexMap,h,r),u=new o(this.metadata,d,a++,!1,r);this.store.insert(u)}}async _download(){try{await this._downloadFiles();const t=new o(this.metadata,null,-1,!0,null);this.store.insert(t)}catch(t){throw console.error(t),t}}}export{n as ParquetSnapshotLoadStrategy};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{handlesGroup as t}from"../../../../../../core/handleUtils.js";import"../../../../../../core/has.js";import{getOrCreateMapValue as e}from"../../../../../../core/MapUtils.js";import{notDeepEqual as s}from"../../../../../../core/object.js";import{throwIfAborted as r,onAbort as a}from"../../../../../../core/promiseUtils.js";import{QueueProcessor as i}from"../../../../../../core/QueueProcessor.js";import{difference as o}from"../../../../../../core/SetUtils.js";import{openWithPorts as l}from"../../../../../../core/workers/workers.js";import{isFileProviderChangedError as n}from"../../../../../../layers/graphics/sources/parquet/fileProviderChangedError.js";import{loadParquetModule as d}from"../../../../../../libs/parquet/loadParquetModule.js";import{ALoadStrategy as h}from"./ALoadStrategy.js";import{fetchQueueConcurrency as c}from"./constants.js";import{ParquetSourceChunk as u}from"./chunks/ParquetSourceChunk.js";import{FeatureSetReaderParquet as p}from"../../support/FeatureSetReaderParquet.js";class m{constructor(e,s){this.subscription=e,this.chunks=[],this.ids=[],this._controller=new AbortController,this._handles=t([a(e.signal,()=>this._controller.abort()),a(s,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get options(){return{signal:this._controller.signal}}addBinaryData(t){this.chunks.push(t)}addSourceChunkId(t){this.ids.push(t)}}class _ extends h{constructor(t,e,s,r){if(super(t.metadata,e,s),this._service=t,this._loadStates=new Map,this._queue=new i({concurrency:c,process:t=>this._loadTile(t)}),!t.geometryInfo.displayOptimization)throw new Error("InternalError: ParquetTileLoadStrategy only supports XZ-enabled parquet files");this._loaded=this._load(r)}destroy(){super.destroy(),this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}get about(){return{willQueryAllFeatures:!0,willQueryFullResolutionGeometry:!0}}get availableFields(){return this._schema.partial.availableFields}get definitionExpression(){return this._schema.full.definitionExpression}async tryUpdate(t,e){await this._loaded;let r=!0;return s(this.availableFields,e.availableFields)&&await this._updateFields(e.availableFields),this._schema.partial.dataSourceHash!==e.dataSourceHash&&(r=!1),this._schema.partial=e,r}async load(t){try{return await this._loaded,e(this._loadStates,t.key.id,()=>new m(t,this._options)),await this._queue.push(t)}catch(s){if(!f(s))throw s}}unload(t){const e=this._loadStates.get(t.tile.id);if(null!=e){for(const t of e.ids)this.store.removeById(t);e.destroy(),this._loadStates.delete(t.tile.id)}}async _load(t){this._ports=await t.layerView.openMemoryPorts(),this._client=await l(this._ports,{maxNumberOfConcurrentJobs:20}),this._proxy=this._client.createInvokeProxy(),this._indexMap=await this._proxy.getIndexMap()}_onOverride(){}async _updateFields(t){const e=new Set(t),s=o(e,new Set(this.availableFields));if(null!=this._service.metadata.fieldsIndex&&s.size){const t=Array.from(this.store.insertedChunks()).map(t=>t.updateFields(this._proxy,Array.from(s),this._options));await Promise.all(t)}}async _loadTile(t){const e=t.tile,s=t.signal,a=this._loadStates.get(e.id);await this._downloadTileData(t),r(s);const i=new u(this.metadata,null,e,null,0,!0);a.addSourceChunkId(i.chunkId),this.store.insert(i)}async _downloadTileData(t){const e=await d(),s=t.tile,a=t.signal,i=this._loadStates.get(s.id),o=await this._proxy.queryStream({type:"tile",extent:s.extent,transform:s.normalizedTransform,outFields:Array.from(this.availableFields),returnGeometry:!0,outSpatialReference:this.metadata.outSpatialReference.toJSON(),scale:s.scale,where:this.definitionExpression},{signal:a});let l=0;for(;;){const t=await this._proxy.getStreamNext(o,{signal:a});if(r(a),null==t)break;const{fileId:n,buffer:d}=t,h=e.ParquetChunk.deserialize(new Uint8Array(d)),c=new p(this.metadata,this._indexMap,h,n,s.transform),m=new u(this.metadata,c,s,n,l++,!1);i.addBinaryData({data:h,fileId:n}),i.addSourceChunkId(m.chunkId),this.store.insert(m)}}}function f(t){return n(t)||y(t)}function y(t){return null!=t&&"object"==typeof t&&"message"in t&&"Protocol Violation: transport error"===t.message}export{_ as ParquetTileLoadStrategy};
2
+ import{handlesGroup as t}from"../../../../../../core/handleUtils.js";import"../../../../../../core/has.js";import{getOrCreateMapValue as e}from"../../../../../../core/MapUtils.js";import{notDeepEqual as r}from"../../../../../../core/object.js";import{throwIfAborted as s,onAbort as a}from"../../../../../../core/promiseUtils.js";import{QueueProcessor as i}from"../../../../../../core/QueueProcessor.js";import{difference as o}from"../../../../../../core/SetUtils.js";import{openWithPorts as l}from"../../../../../../core/workers/workers.js";import{isFileProviderChangedError as n}from"../../../../../../layers/graphics/sources/parquet/fileProviderChangedError.js";import{loadParquetModule as d}from"../../../../../../libs/parquet/loadParquetModule.js";import{ALoadStrategy as h}from"./ALoadStrategy.js";import{fetchQueueConcurrency as u}from"./constants.js";import{ParquetSourceChunk as c}from"./chunks/ParquetSourceChunk.js";import{FeatureSetReaderParquet as p}from"../../support/FeatureSetReaderParquet.js";class m{constructor(e,r){this.subscription=e,this.chunks=[],this.ids=[],this._controller=new AbortController,this._handles=t([a(e.signal,()=>this._controller.abort()),a(r,()=>this._controller.abort())])}destroy(){this._controller.abort(),this._handles.remove()}get options(){return{signal:this._controller.signal}}addBinaryData(t){this.chunks.push(t)}addSourceChunkId(t){this.ids.push(t)}}class _ extends h{constructor(t,e,r,s){if(super(t.metadata,e,r),this._service=t,this._loadStates=new Map,this._queue=new i({concurrency:u,process:t=>this._loadTile(t)}),!t.geometryInfo.displayOptimization)throw new Error("InternalError: ParquetTileLoadStrategy only supports XZ-enabled parquet files");this._loaded=this._load(s)}destroy(){super.destroy(),this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}get about(){return{willQueryAllFeatures:!0,willQueryFullResolutionGeometry:!0}}get availableFields(){return this._schema.partial.availableFields}get definitionExpression(){return this._schema.full.definitionExpression}async tryUpdate(t,e){await this._loaded;let s=!0;return r(this.availableFields,e.availableFields)&&await this._updateFields(e.availableFields),this._schema.partial.dataSourceHash!==e.dataSourceHash&&(s=!1),this._schema.partial=e,s}async load(t){try{return await this._loaded,e(this._loadStates,t.key.id,()=>new m(t,this._options)),await this._queue.push(t)}catch(r){if(!f(r))throw r}}unload(t){const e=this._loadStates.get(t.tile.id);if(null!=e){for(const t of e.ids)this.store.removeById(t);e.destroy(),this._loadStates.delete(t.tile.id)}}async _load(t){this._ports=await t.layerView.openMemoryPorts(),this._client=await l(this._ports,{maxNumberOfConcurrentJobs:20}),this._proxy=this._client.createInvokeProxy(),this._indexMap=await this._proxy.getIndexMap()}_onOverride(){}async _updateFields(t){const e=new Set(t),r=o(e,new Set(this.availableFields));if(null!=this._service.metadata.fieldsIndex&&r.size){const t=Array.from(this.store.insertedChunks()).map(t=>t.updateFields(this._proxy,Array.from(r),this._options));await Promise.all(t)}}async _loadTile(t){const e=t.tile,r=t.signal,a=this._loadStates.get(e.id);await this._downloadTileData(t),s(r);const i=new c(this.metadata,null,e,null,0,!0);a.addSourceChunkId(i.chunkId),this.store.insert(i)}async _downloadTileData(t){const e=await d(),r=t.tile,a=t.signal,i=this._loadStates.get(r.id),o=await this._proxy.queryStream({type:"tile",extent:r.extent,transform:r.normalizedTransform,outFields:Array.from(this.availableFields),returnGeometry:!0,returnZ:this._schema.full.returnZ,returnM:this._schema.full.returnM,outSpatialReference:this.metadata.outSpatialReference.toJSON(),scale:r.scale,where:this.definitionExpression},{signal:a});let l=0;for(;;){const t=await this._proxy.getStreamNext(o,{signal:a});if(s(a),null==t)break;const{fileId:n,buffer:d}=t,h=e.ParquetChunk.deserialize(new Uint8Array(d)),u=new p(this.metadata,this._indexMap,h,n,r.transform),m=new c(this.metadata,u,r,n,l++,!1);i.addBinaryData({data:h,fileId:n}),i.addSourceChunkId(m.chunkId),this.store.insert(m)}}}function f(t){return n(t)||y(t)}function y(t){return null!=t&&"object"==typeof t&&"message"in t&&"Protocol Violation: transport error"===t.message}export{_ as ParquetTileLoadStrategy};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../../core/has.js";import{baseObjectMemory as e}from"../../../../../core/memoryEstimations.js";import{minInt16 as t}from"../../../../../core/typedArrayUtil.js";import{fromRectValues as i}from"../../../../../geometry/support/aaBoundingBox.js";import s from"../../../../../layers/graphics/OptimizedGeometry.js";import{getParquetObjectId as r}from"../../../../../layers/graphics/sources/support/parquetIdUtils.js";import{FeatureSetReader as n}from"./FeatureSetReader.js";const o=new TextDecoder;class d extends n{constructor(i,s,r,n,o,d=new Uint32Array(r.size()),h,a,u){if(super(i),this._indexMap=s,this._inner=r,this._fileId=n,this._transform=o,this._displayIds=d,this._points=h,this._rowIds=a,this._emptyNumberValue=u,this._index=-1,this.usedMemory=e,this._size=this._inner.size(),this._rowIds||(this._rowIds=this._inner.readIdsUnsafe().slice()),!this._points&&"esriGeometryPoint"===this.geometryType){const e=this._inner.readPointCoordsQuantizedUnsafe()?.slice();e?(this._emptyNumberValue=t,this._points=e):(this._emptyNumberValue=NaN,this._points=this._inner.readPointCoordsUnsafe()?.slice())}i.featureIdInfo.type}destroy(){super.destroy(),this._inner.free()}get fields(){return this.metadata.fieldsIndex}get geometryType(){return this.metadata.geometryType}get hasFeatures(){return!0}get hasNext(){throw new Error("Method not implemented.")}get exceededTransferLimit(){return!1}get hasZ(){return!1}get hasM(){return!1}async updateFields(e,t,i,s){const r=this._inner.rowGroup(),n=new Uint32Array(this._inner.readIdsUnsafe()),o=await e.createPatch(t,r,n,i,s);this._inner.insertPatchBytes(new Uint8Array(o))}getInTransform(){return this._transform}getSize(){return this._size}getCursor(){return this.copy()}getAttributeHash(){let e="";for(const t of this.fields.fields)e+=this._readAttribute(t.name,!1)+".";return e}getObjectId(){const e=this._rowIds[this._index];return r(this._fileId,e)}getDisplayId(){return this._displayIds[this._index]}setDisplayId(e){this._displayIds[this._index]=e}setIndex(e){this._index=e}getBoundsXMin(){return this._inner.boundsXMin(this._index)}getBoundsYMin(){return this._inner.boundsYMin(this._index)}getBoundsXMax(){return this._inner.boundsXMax(this._index)}getBoundsYMax(){return this._inner.boundsYMax(this._index)}getBounds(e){const t=this._inner.boundsXMin(this._index);return!!Number.isFinite(t)&&(i(e,t,this._inner.boundsYMin(this._index),this._inner.boundsXMax(this._index),this._inner.boundsYMax(this._index)),!0)}setBoundsXMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsXMax(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMax(e){throw new Error("InternalError: Setting bounds is unsupported")}getIndex(){return this._index}next(){for(;++this._index<this._size&&!this._getExists(););return this._index<this._size}readGeometryArea(){return this.readGeometryForDisplay()?.area()??0}copy(){const e=new d(this.metadata,this._indexMap,this._inner,this._fileId,this._transform,this._displayIds,this._points,this._rowIds,this._emptyNumberValue);return this.copyInto(e),e}copyInto(e){super.copyInto(e),e._index=this._index}_readGeometry(e){const t=this._inner.readCoordsUnsafe(this._index),i=this._inner.readLengthsUnsafe(this._index);return t&&i?new s(i,t,this.hasZ,this.hasM):null}_readX(){if(this._points){const e=this._points[2*this._index];return e===this._emptyNumberValue?NaN:e}return this._inner.readX(this._index)}_readY(){if(this._points){const e=this._points[2*this._index+1];return e===this._emptyNumberValue?NaN:e}return this._inner.readY(this._index)}_readServerCentroid(){return null}_readAttribute(e,t){const i=this.fields.get(e);if(!i)return;const s=this._indexMap[i.name];if(null==s)return this.getObjectId();const r=this._inner.readAttribute(this._index,s);if(null==r)return r;if("esriFieldTypeString"===i.type||"esriFieldTypeDateOnly"===i.type||"esriFieldTypeTimeOnly"===i.type||"esriFieldTypeTimestampOffset"===i.type){const e=this._inner.readAttribute(this._index,s);return o.decode(e)}const n=this.fields.isDateField(i.name);return t?null==r?r:n?new Date(r):r:r}_readAttributes(){const e={};for(const t of this.metadata.fieldsIndex.fields){if(null==this._indexMap[t.name])continue;const i=this._readAttribute(t.name,!1);void 0!==i&&(e[t.name]=i)}return e.__OBJECTID=this.getObjectId(),e}}export{d as FeatureSetReaderParquet};
2
+ import"../../../../../core/has.js";import{baseObjectMemory as e}from"../../../../../core/memoryEstimations.js";import{minInt16 as t}from"../../../../../core/typedArrayUtil.js";import{fromRectValues as i}from"../../../../../geometry/support/aaBoundingBox.js";import r from"../../../../../layers/graphics/OptimizedGeometry.js";import{getParquetObjectId as s}from"../../../../../layers/graphics/sources/support/parquetIdUtils.js";import{FeatureSetReader as n}from"./FeatureSetReader.js";const o=new TextDecoder;class d extends n{constructor(i,r,s,n,o,d=new Uint32Array(s.size()),h,a,u){if(super(i),this._indexMap=r,this._inner=s,this._fileId=n,this._transform=o,this._displayIds=d,this._points=h,this._rowIds=a,this._emptyNumberValue=u,this._index=-1,this.usedMemory=e,this._size=this._inner.size(),this._coordinateStride=this._inner.coordinateStride(),this._rowIds||(this._rowIds=this._inner.readIdsUnsafe().slice()),!this._points&&"esriGeometryPoint"===this.geometryType){const e=this._inner.readPointCoordsQuantizedUnsafe()?.slice();e?(this._emptyNumberValue=t,this._points=e):(this._emptyNumberValue=NaN,this._points=this._inner.readPointCoordsUnsafe()?.slice())}i.featureIdInfo.type}destroy(){super.destroy(),this._inner.free()}get fields(){return this.metadata.fieldsIndex}get geometryType(){return this.metadata.geometryType}get hasFeatures(){return!0}get hasNext(){throw new Error("Method not implemented.")}get exceededTransferLimit(){return!1}get hasZ(){return this._inner.hasZ()}get hasM(){return this._inner.hasM()}async updateFields(e,t,i,r){const s=this._inner.rowGroup(),n=new Uint32Array(this._inner.readIdsUnsafe()),o=await e.createPatch(t,s,n,i,r);this._inner.insertPatchBytes(new Uint8Array(o))}getInTransform(){return this._transform}getSize(){return this._size}getCursor(){return this.copy()}getAttributeHash(){let e="";for(const t of this.fields.fields)e+=this._readAttribute(t.name,!1)+".";return e}getObjectId(){const e=this._rowIds[this._index];return s(this._fileId,e)}getDisplayId(){return this._displayIds[this._index]}setDisplayId(e){this._displayIds[this._index]=e}setIndex(e){this._index=e}getBoundsXMin(){return this._inner.boundsXMin(this._index)}getBoundsYMin(){return this._inner.boundsYMin(this._index)}getBoundsXMax(){return this._inner.boundsXMax(this._index)}getBoundsYMax(){return this._inner.boundsYMax(this._index)}getBounds(e){const t=this._inner.boundsXMin(this._index);return!!Number.isFinite(t)&&(i(e,t,this._inner.boundsYMin(this._index),this._inner.boundsXMax(this._index),this._inner.boundsYMax(this._index)),!0)}setBoundsXMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsXMax(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMax(e){throw new Error("InternalError: Setting bounds is unsupported")}getIndex(){return this._index}next(){for(;++this._index<this._size&&!this._getExists(););return this._index<this._size}readGeometryArea(){return this.readGeometryForDisplay()?.area()??0}copy(){const e=new d(this.metadata,this._indexMap,this._inner,this._fileId,this._transform,this._displayIds,this._points,this._rowIds,this._emptyNumberValue);return this.copyInto(e),e}copyInto(e){super.copyInto(e),e._index=this._index}_readGeometry(e){const t=this._inner.readCoordsUnsafe(this._index),i=this._inner.readLengthsUnsafe(this._index);return t&&i?new r(i,t,this.hasZ,this.hasM):null}_readX(){if(this._points){const e=this._points[this._coordinateStride*this._index];return e===this._emptyNumberValue?NaN:e}throw new Error("InternalError: readX only supported for points")}_readY(){if(this._points){const e=this._points[this._coordinateStride*this._index+1];return e===this._emptyNumberValue?NaN:e}throw new Error("InternalError: readY only supported for points")}_readServerCentroid(){return null}_readAttribute(e,t){const i=this.fields.get(e);if(!i)return;const r=this._indexMap[i.name];if(null==r)return this.getObjectId();const s=this._inner.readAttribute(this._index,r);if(null==s)return s;if("esriFieldTypeString"===i.type||"esriFieldTypeDateOnly"===i.type||"esriFieldTypeTimeOnly"===i.type||"esriFieldTypeTimestampOffset"===i.type){const e=this._inner.readAttribute(this._index,r);return o.decode(e)}const n=this.fields.isDateField(i.name);return t?null==s?s:n?new Date(s):s:s}_readAttributes(){const e={};for(const t of this.metadata.fieldsIndex.fields){if(null==this._indexMap[t.name])continue;const i=this._readAttribute(t.name,!1);void 0!==i&&(e[t.name]=i)}return e.__OBJECTID=this.getObjectId(),e}}export{d as FeatureSetReaderParquet};