@arcgis/core 5.2.0-next.57 → 5.2.0-next.59
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.
- package/arcade/featureset/sources/FeatureLayerParquet.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{2cfd2b433deecec413d3.js → 14c066c31fe37b7f6e63.js} +1 -1
- package/assets/esri/core/workers/chunks/20b9bc8d5cbe9a18a644.js +1 -0
- package/assets/esri/core/workers/chunks/{4a7d48b5c75cb710689a.js → 3abc12d2407e4214963d.js} +1 -1
- package/assets/esri/core/workers/chunks/{2aeb8a4a426ec56f6133.js → 42692a4ce3fb364e321e.js} +1 -1
- package/assets/esri/core/workers/chunks/479f486ec1797629ec70.js +1 -0
- package/assets/esri/core/workers/chunks/{c39b6707d8284d57ff26.js → 498d29e8c8be4a12ba12.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9e299ac2d1c9ef78326.js → 4e2f3dd158a5228c87ba.js} +1 -1
- package/assets/esri/core/workers/chunks/4f2170609742b51bd7b8.js +1 -0
- package/assets/esri/core/workers/chunks/{ba65c976eaa458d82ab9.js → 4fb549f11e176fc2f24a.js} +1 -1
- package/assets/esri/core/workers/chunks/{290fbc6d32c799841ccc.js → 507b7f4c276b60ffe9d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f67c6e9e0a8fe918711.js → 5527b2da4abe0faa98bb.js} +1 -1
- package/assets/esri/core/workers/chunks/6823ba1688dfedba0107.js +1 -0
- package/assets/esri/core/workers/chunks/7d85048c6cd6ad84faf9.js +1 -0
- package/assets/esri/core/workers/chunks/{358b22e4940ae9329ffa.js → 81659d121ed732bda907.js} +2 -2
- package/assets/esri/core/workers/chunks/{cef7f4237539574f0730.js → 8210fc9e072209e26fa9.js} +1 -1
- package/assets/esri/core/workers/chunks/{61d0ada7627f21988183.js → a8ade34612e73862de6f.js} +1 -1
- package/assets/esri/core/workers/chunks/{9de1125b708c4a591edf.js → d205edd949f3e6e24eb9.js} +1 -1
- package/assets/esri/core/workers/chunks/{912e9743d006ccc723bf.js → d6aad815fc0ee8e24bb5.js} +1 -1
- package/assets/esri/core/workers/chunks/f0225829f7d941914815.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/bundle2.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/package.json +4 -4
- package/support/revision.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/assets/esri/core/workers/chunks/15aa9b85976069acf4f3.js +0 -1
- package/assets/esri/core/workers/chunks/26fdc8382e009672924e.js +0 -1
- package/assets/esri/core/workers/chunks/7b6b8d0673976c6c26de.js +0 -1
- package/assets/esri/core/workers/chunks/8a410edcdf74ba957159.js +0 -1
- package/assets/esri/core/workers/chunks/8cb2fe91d1d8f49c14f8.js +0 -1
- package/assets/esri/core/workers/chunks/a1fcef22b6151a7f7917.js +0 -1
- /package/assets/esri/core/workers/chunks/{358b22e4940ae9329ffa.js.LICENSE.txt → 81659d121ed732bda907.js.LICENSE.txt} +0 -0
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/chunks/languageUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ArcadeDate as e,createDateTimeZone as t}from"../arcade/ArcadeDate.js";import{ArcadeModule as r}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as n}from"../arcade/executionError.js";import{ArcadeFunction as i}from"../arcade/FunctionWrapper.js";import a from"../arcade/ImmutableArray.js";import o from"../arcade/ImmutablePathArray.js";import s from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as u,layerGeometryEsriRestConstants as l}from"../arcade/featureset/support/shared.js";import{format as f,parse as c}from"../core/number.js";import{DateOnly as m}from"../core/sql/DateOnly.js";import{TimeOnly as d}from"../core/sql/TimeOnly.js";import y from"../geometry/Extent.js";import p from"../geometry/Geometry.js";import g from"../geometry/Multipoint.js";import h from"../geometry/Point.js";import b from"../geometry/Polygon.js";import N from"../geometry/Polyline.js";import{isClockwise as S}from"../geometry/support/coordsUtils.js";import{fromJSON as Z}from"../geometry/support/jsonUtils.js";import{getLocale as T}from"../intl/locale.js";import{isBoolean as A,isNumber as D,isString as k,isDate as C,isArray as O,isInteger as x}from"../support/guards.js";import{DateTime as j}from"luxon";import{isGraphic as F}from"../support/graphicInstanceUtils.js";class w{constructor(e){this.value=e}}class J{constructor(e){this.value=e}}const M={type:"VOID"},R=Symbol("BREAK"),P=Symbol("CONTINUE");function I(e,t,r){return""===t||null==t||t===r||t===r?e:e=e.split(t).join(r)}function _(e){return e instanceof i}function v(e){return e instanceof r}function Y(e){return!!k(e)||(!!D(e)||(!!te(e)||(!!re(e)||(!!ne(e)||(!!A(e)||(null===e||e===M))))))}function L(e,t){return void 0===e?t:e}function G(e){return null==e?"":O(e)||ee(e)?"Array":te(e)?"Date":ne(e)?"Time":re(e)?"DateOnly":k(e)?"String":A(e)?"Boolean":D(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":X(e)?"KnowledgeGraph":e instanceof r?"Module":q(e)?"Feature":e instanceof h?"Point":e instanceof b?"Polygon":e instanceof N?"Polyline":e instanceof g?"Multipoint":e instanceof y?"Extent":_(e)?"Function":H(e)?"FeatureSet":Q(e)?"FeatureSetCollection":E(e)?"Voxel":U(e)?"Pixel":e===M?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function V(e){return e===M}function z(e){return e instanceof p}function q(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function E(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function U(e){return"esri.arcade.Pixel"===e?.arcadeDeclaredClass}function H(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function W(e){return"esri.arcade.Dictionary"===e?.declaredClass}function $(e){return"esri.arcade.Portal"===e?.declaredClass}function B(e){return"esri.arcade.Attachment"===e?.declaredClass}function K(e){return W(e)||q(e)||E(e)||U(e)}function Q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function X(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function ee(e){return e instanceof a}function te(t){return t instanceof e}function re(e){return e instanceof m}function ne(e){return e instanceof d}function ie(e){return null!=e&&"object"==typeof e}function ae(e,t,r,i){if(e.length<t||e.length>r)throw new n("WrongNumberOfParameters",i)}function oe(e){return null==e||V(e)||""===e}function se(e){return e<0?-Math.round(-e):Math.round(e)}function ue(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=I(t,"‰",""),t=I(t,"¤",""),f(e,{pattern:t}))}function le(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(fe(t),{locale:T(),numberingSystem:"latn"})}function fe(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let r="";const n=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(n)||[])switch(i){case"D":r+="d";break;case"DD":r+="dd";break;case"DDD":r+="o";break;case"d":r+="c";break;case"ddd":r+="ccc";break;case"dddd":r+="cccc";break;case"M":r+="L";break;case"MM":r+="LL";break;case"MMM":r+="LLL";break;case"MMMM":r+="LLLL";break;case"YY":r+="yy";break;case"Y":case"YYYY":r+="yyyy";break;case"Q":r+="q";break;case"Z":r+="Z";break;case"ZZ":r+="ZZ";break;case"ZZZ":r+="ZZZ";break;case"ZZZZ":r+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":r+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":r+="'S'";break;case"SS":r+="'SS'";break;case"SSS":r+="u";break;case"A":case"a":r+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":r+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?r+=`'${i.slice(1,-1)}'`:r+=`'${i}'`}return r}function ce(e,t,r){switch(r){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function me(t,r,i){if(null===t){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}if(t===M){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(D(t)){if(D(r))return ce(t,r,i);if(A(r))return ce(t,Ne(r),i);if(null===r||r===M)return ce(t,0,i);if(k(r))return ce(t,Ne(r),i);if(te(r))return ce(t,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(k(t)){if(k(r))return ce(pe(t),pe(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(D(r))return ce(Ne(t),r,i);if(null===r||r===M)return ce(Ne(t),0,i);if(A(r))return ce(Ne(t),Ne(r),i)}else if(te(t)){if(te(r))return t.timeZone!==r.timeZone&&(t.isUnknownTimeZone?t=e.arcadeDateAndZoneToArcadeDate(t,r.timeZone):r.isUnknownTimeZone&&(r=e.arcadeDateAndZoneToArcadeDate(r,t.timeZone))),ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(A(t)){if(A(r))return ce(t,r,i);if(D(r))return ce(Ne(t),Ne(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(null===r||r===M)return ce(Ne(t),0,i);if(k(r))return ce(Ne(t),Ne(r),i)}else if(re(t)){if(te(r))return ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(ne(t)){if(te(r))throw new n("CannotCompareDateAndTime",null);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))return ce(t.toNumber(),r.toNumber(),i);if(re(r))throw new n("CannotCompareDateAndTime",null)}return!!de(t,r)&&("<="===i||">="===i)}function de(e,t){if(e===t)return!0;if(null===e&&t===M||null===t&&e===M)return!0;if(te(e)&&te(t))return e.equals(t);if(ne(e)&&ne(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(e instanceof o)return e.equalityTest(t);if(e instanceof s)return e.equalityTest(t);if(e instanceof h&&t instanceof h){const r=e.cache._arcadeCacheId,n=t.cache._arcadeCacheId;if(null!=r)return r===n}if(ie(e)&&ie(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ye(e,{useNumbersForDates:t}){let r="";for(const n in e){""!==r&&(r+=",");const i=e[n];null==i?r+=JSON.stringify(n)+":null":A(i)||D(i)||k(i)?r+=JSON.stringify(n)+":"+JSON.stringify(i):z(i)?r+=JSON.stringify(n)+":"+he(i):ne(i)||re(i)?r+=`${JSON.stringify(n)}:${JSON.stringify(i.toString())}`:ee(i)||Array.isArray(i)?r+=JSON.stringify(n)+":"+he(i,null,t):te(i)?r+=t?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(r+=JSON.stringify(n)+":"+i.castToText(t))}return"{"+r+"}"}function pe(e,t){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return JSON.stringify(e.toJSON());if(O(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=be(e[r]);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let r=0;r<e.length();r++)t[r]=be(e.get(r));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function ge(e){const t=[];if(e instanceof a){for(let r=0;r<e.length();r++)t[r]=Ne(e.get(r));return t}if(!O(e))return null;for(let r=0;r<e.length;r++)t[r]=Ne(e[r]);return t}function he(e,t,r=!1){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return e instanceof y?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+Fe(e.spatialReference)+"}":Fe(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if(O(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=be(e[n],r);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let n=0;n<e.length();n++)t[n]=be(e.get(n),r);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(r):_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function be(e,t=!1){if(null===e)return"null";if(A(e)||k(e))return JSON.stringify(e);if(D(e))return e.toString();if(e instanceof p)return he(e,null,t);if(e instanceof a)return he(e,null,t);if(Array.isArray(e))return he(e,null,t);if(te(e))return t?JSON.stringify(e.getTime()):JSON.stringify(le(e,""));if(ne(e))return JSON.stringify(e.toString());if(re(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===M)return"null";return"null"}function Ne(e,t){return D(e)?e:null===e||""===e?0:te(e)||re(e)||ne(e)?NaN:A(e)?e?1:0:O(e)||""===e||void 0===e?NaN:void 0!==t&&k(e)?(t=I(t,"‰",""),t=I(t,"¤",""),c(e,{pattern:t})):e===M?0:Number(e)}function Se(t,r){if(te(t))return t;if(k(t)){const n=Ze(t,r);if(n)return e.dateTimeToArcadeDate(n)}return null}function Ze(e,r){const n=/ (\d\d)/,i=t(r);let a=j.fromISO(e,{zone:i});return a.isValid||n.test(e)&&(e=e.replace(n,"T$1"),a=j.fromISO(e,{zone:r}),a.isValid)?a:null}function Te(e){return A(e)?e:k(e)?"true"===(e=e.toLowerCase()):!!D(e)&&(0!==e&&!isNaN(e))}function Ae(e,t){const r=JSON.parse(e);return r&&!r.spatialReference&&(r.spatialReference=t),Z(r)}function De(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ke(e){if(null===e)return null;if(e instanceof h)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof b){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof N){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof g?0===e.points.length?null:e:e instanceof y?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function Ce(e,t){if(!e)return t;if(!e.domain)return t;let r=null,n=null;if(te(t))r=t.toNumber();else if(re(t))r=t.toString();else if(ne(t))r=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)r=pe(t);else{if(null==t)return null;if(""===t)return t;r=Ne(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===r&&(n=t)}return null===n?pe(t):n.name}function Oe(e,t){if(!e)return t;if(!e.domain)return t;let r=null;const n=pe(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===n&&(r=t)}return null===r?t:r.code}function xe(e,t,r=null,i=null){if(!t)return null;if(!t.fields)return null;let a,o,s=null;for(let n=0;n<t.fields.length;n++){const r=t.fields[n];r.name.toLowerCase()===e.toString().toLowerCase()&&(s=r)}if(null===s)throw new n("FieldNotFound",null,{key:e});let u=t.typeIdField,l="id",f=t.types;if(t.subtypeField&&(u=t.subtypeField,l="code",f=t.subtypes??[]),null===i&&r&&u)i=r.hasField(u)?r.field(u):null;else if(u&&null!==i){let e=!1;for(const t of f||[])if(i===t[l]){e=!0;break}if(!e)for(const t of f||[])if(i===t.name){i=t[l],e=!0;break}e||(i=null,r&&u&&(i=r.hasField(u)?r.field(u):null))}return null!=i&&f.some(e=>e[l]===i&&(a=e.domains?.[s.name],a&&"inherited"===a.type&&(a=je(s.name,t),o=!0),!0)),o||a||(a=je(e,t)),{field:s,domain:a}}function je(e,t){let r;return t.fields.some(t=>(t.name.toLowerCase()===e.toLowerCase()&&(r=t.domain),!!r)),r}function Fe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&(i=t.cmp,function(e){return function(t,r){const n={key:t,value:e[t]},a={key:r,value:e[r]};return i(n,a)}});var i;const a=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(a.includes(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=a.push(t)-1,u=Object.keys(t).sort(n?.(t));for(o="",i=0;i<u.length;i++){const r=u[i],n=e(t[r]);n&&(o&&(o+=","),o+=JSON.stringify(r)+":"+n)}return a.splice(s,1),"{"+o+"}"}(e)}function we(e){if(null===e)return null;const t=[];for(const r of e)q(r)?t.push(r.geometry()):t.push(r);return t}function Je(e,t){if(!(t instanceof h))throw new n("InvalidParameter",null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Me(e,t){if(O(e)||ee(e)){let r=!1,i=!1,a=[],o=t;if(O(e)){for(const t of e)Je(a,t);a.length>0&&(o=e[0].spatialReference,r=e[0].hasZ,i=e[0].hasM)}else if(e instanceof s)a=e._elements,a.length>0&&(r=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else{if(!ee(e))throw new n("InvalidParameter",null);for(const t of e.toArray())Je(a,t);a.length>0&&(o=e.get(0).spatialReference,r=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}if(0===a.length)return null;return S(a)||(a=a.slice().reverse()),new b({rings:[a],spatialReference:o,hasZ:r,hasM:i})}return e}function Re(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new N({paths:[i],spatialReference:a,hasZ:r,hasM:n})}return e}function Pe(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new g({points:i,spatialReference:a,hasZ:r,hasM:n})}return e}function Ie(e,t=!0){if(null==e)return[];if(O(e)){const r=[];for(const n of e){const e=pe(n);(t||""!==e)&&r.push(e)}return r}if(ee(e)){const r=[];for(let n=0;n<e.length();n++){const i=pe(e.get(n));(t||""!==i)&&r.push(i)}return r}if(Y(e)){const r=pe(e);if(t||""!==r)return[r]}return[]}let _e=0;function ve(){return _e++,_e%100==0?(_e=0,new Promise(e=>{setTimeout(()=>{e()},0)})):Promise.resolve()}function Ye(e,t,r){switch(r){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Le(e){return null==e?null:A(e)||D(e)||k(e)?e:e instanceof p?e.toJSON():e instanceof a?e.toArray().map(e=>Le(e)):Array.isArray(e)?e.map(e=>Le(e)):C(e)?e:te(e)?e.toJSDate():ne(e)?e.toString():re(e)?e.toJSDate():"castAsJson"in e?e.castAsJson():null}async function Ge(e,t=null){if(e instanceof a&&(e=e.toArray()),null==e)return null;if(Y(e)||e instanceof p||C(e)||te(e))return Le(e);if(Array.isArray(e)){const r=[],n=[];for(const i of e)if(null===i||Y(i)||i instanceof p||C(i)||te(i))n.push(Le(i));else{const i=n.push(null)-1;r.push(Ge(e,t).then(e=>{n[i]=e}))}return r.length>0&&await Promise.all(r),n}return"castAsJsonAsync"in e?e.castAsJsonAsync(t):null}function Ve(e){return ze(e)?e.parent:e}function ze(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function qe(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ee(e,t,r){const n=Ve(e.fullSchema());if(null===n)return null;if(!n.fields)return null;return xe(t,n,e,r)}function Ue(e){const t=Ve(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map(e=>({name:e.name,code:e.code})):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function He(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const a=xe(t,i,e,n);if(void 0===r)try{r=e.field(t)}catch(o){return null}return Ce(a,r)}function We(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===r){try{r=e.field(t)}catch(a){return null}return r}return Oe(xe(t,i,e,n),r)}function $e(e){return e?.timeZone??"system"}function Be(e){const t=Ve(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const r=[];for(const n of t.fields)r.push(u(n));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===l[t.geometryType]?"":l[t.geometryType],fields:r}}const Ke="1.36",Qe=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:J,ReturnResult:w,absRound:se,arcadeVersion:Ke,autoCastArrayOfPointsToMultiPoint:Pe,autoCastArrayOfPointsToPolygon:Me,autoCastArrayOfPointsToPolyline:Re,autoCastFeatureToGeometry:we,binaryOperator:Ye,breakResult:R,castAsJson:Le,castAsJsonAsync:Ge,castRecordToText:ye,continueResult:P,defaultTimeZone:$e,defaultUndefined:L,equalityTest:de,featureDomainCodeLookup:We,featureDomainValueLookup:He,featureFullDomain:Ee,featureSchema:Be,featureSubtypes:Ue,fixNullGeometry:ke,fixSpatialReference:De,formatDate:le,formatNumber:ue,getDomain:xe,getDomainCode:Oe,getDomainValue:Ce,getType:G,greaterThanLessThan:me,isArray:O,isAttachment:B,isBoolean:A,isDate:te,isDateOnly:re,isDictionary:W,isDictionaryLike:K,isEmpty:oe,isFeature:q,isFeatureSet:H,isFeatureSetCollection:Q,isFunctionParameter:_,isGeometry:z,isGraphic:F,isImmutableArray:ee,isInteger:x,isJsDate:C,isKnowledgeGraph:X,isModule:v,isNumber:D,isObject:ie,isPixel:U,isPortal:$,isSimpleType:Y,isString:k,isSubtypeGrouplayer:qe,isSubtypeSublayer:ze,isTime:ne,isVoid:V,isVoxel:E,multiReplace:I,parseGeometryFromJson:Ae,pcCheck:ae,stableStringify:Fe,standardiseDateFormat:fe,tick:ve,toBoolean:Te,toDate:Se,toNumber:Ne,toNumberArray:ge,toString:pe,toStringArray:Ie,toStringExplicit:he,voidOperation:M},Symbol.toStringTag,{value:"Module"}));export{Ue as $,P as A,ae as B,$ as C,B as D,U as E,E as F,v as G,we as H,J as I,De as J,Me as K,Re as L,Pe as M,Te as N,L as O,oe as P,Ie as Q,w as R,G as S,$e as T,Se as U,fe as V,se as W,Ee as X,We as Y,He as Z,Be as _,Le as a,ke as a0,I as a1,Ke as a2,ge as a3,ze as a4,ve as a5,xe as a6,Ce as a7,Oe as a8,le as a9,ue as aa,ie as ab,qe as ac,Ae as ad,Fe as ae,Y as b,ye as c,Ge as d,te as e,z as f,ee as g,q as h,_ as i,Q as j,H as k,W as l,X as m,ne as n,re as o,Qe as p,V as q,Ne as r,pe as s,he as t,me as u,M as v,de as w,Ye as x,K as y,R as z};
|
|
2
|
+
import{ArcadeDate as e,createDateTimeZone as t}from"../arcade/ArcadeDate.js";import{ArcadeModule as r}from"../arcade/ArcadeModule.js";import{ArcadeExecutionError as n}from"../arcade/executionError.js";import{ArcadeFunction as i}from"../arcade/FunctionWrapper.js";import a from"../arcade/ImmutableArray.js";import o from"../arcade/ImmutablePathArray.js";import s from"../arcade/ImmutablePointArray.js";import{esriFieldToJson as u,layerGeometryEsriRestConstants as l}from"../arcade/featureset/support/shared.js";import{format as f,parse as c}from"../core/number.js";import{DateOnly as m}from"../core/sql/DateOnly.js";import{TimeOnly as d}from"../core/sql/TimeOnly.js";import y from"../geometry/Extent.js";import p from"../geometry/Geometry.js";import g from"../geometry/Multipoint.js";import h from"../geometry/Point.js";import b from"../geometry/Polygon.js";import N from"../geometry/Polyline.js";import{isClockwise as S}from"../geometry/support/coordsUtils.js";import{fromJSON as Z}from"../geometry/support/jsonUtils.js";import{getLocale as T}from"../intl/locale.js";import{isBoolean as A,isNumber as D,isString as k,isDate as C,isArray as O,isInteger as x}from"../support/guards.js";import{DateTime as j}from"luxon";import{isGraphic as F}from"../support/graphicInstanceUtils.js";class w{constructor(e){this.value=e}}class J{constructor(e){this.value=e}}const M={type:"VOID"},R=Symbol("BREAK"),P=Symbol("CONTINUE");function I(e,t,r){return""===t||null==t||t===r||t===r?e:e=e.split(t).join(r)}function _(e){return e instanceof i}function v(e){return e instanceof r}function Y(e){return!!k(e)||(!!D(e)||(!!te(e)||(!!re(e)||(!!ne(e)||(!!A(e)||(null===e||e===M))))))}function L(e,t){return void 0===e?t:e}function G(e){return null==e?"":O(e)||ee(e)?"Array":te(e)?"Date":ne(e)?"Time":re(e)?"DateOnly":k(e)?"String":A(e)?"Boolean":D(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":X(e)?"KnowledgeGraph":e instanceof r?"Module":q(e)?"Feature":e instanceof h?"Point":e instanceof b?"Polygon":e instanceof N?"Polyline":e instanceof g?"Multipoint":e instanceof y?"Extent":_(e)?"Function":H(e)?"FeatureSet":Q(e)?"FeatureSetCollection":E(e)?"Voxel":U(e)?"Pixel":e===M?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function V(e){return e===M}function z(e){return e instanceof p}function q(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function E(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function U(e){return"esri.arcade.Pixel"===e?.arcadeDeclaredClass}function H(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function W(e){return"esri.arcade.Dictionary"===e?.declaredClass}function $(e){return"esri.arcade.Portal"===e?.declaredClass}function B(e){return"esri.arcade.Attachment"===e?.declaredClass}function K(e){return W(e)||q(e)||E(e)||U(e)}function Q(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function X(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function ee(e){return e instanceof a}function te(t){return t instanceof e}function re(e){return e instanceof m}function ne(e){return e instanceof d}function ie(e){return null!=e&&"object"==typeof e}function ae(e,t,r,i){if(e.length<t||e.length>r)throw new n("WrongNumberOfParameters",i)}function oe(e){return null==e||V(e)||""===e}function se(e){return e<0?-Math.round(-e):Math.round(e)}function ue(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=I(t,"‰",""),t=I(t,"¤",""),f(e,{pattern:t}))}function le(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(fe(t),{locale:T(),numberingSystem:"latn"})}function fe(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let r="";const n=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(n)||[])switch(i){case"D":r+="d";break;case"DD":r+="dd";break;case"DDD":r+="o";break;case"d":r+="c";break;case"ddd":r+="ccc";break;case"dddd":r+="cccc";break;case"M":r+="L";break;case"MM":r+="LL";break;case"MMM":r+="LLL";break;case"MMMM":r+="LLLL";break;case"YY":r+="yy";break;case"Y":case"YYYY":r+="yyyy";break;case"Q":r+="q";break;case"Z":r+="Z";break;case"ZZ":r+="ZZ";break;case"ZZZ":r+="ZZZ";break;case"ZZZZ":r+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":r+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":r+="'S'";break;case"SS":r+="'SS'";break;case"SSS":r+="u";break;case"A":case"a":r+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":r+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?r+=`'${i.slice(1,-1)}'`:r+=`'${i}'`}return r}function ce(e,t,r){switch(r){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function me(t,r,i){if(null===t){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}if(t===M){if(null===r||r===M)return ce(null,null,i);if(D(r))return ce(0,r,i);if(k(r))return ce(0,Ne(r),i);if(A(r))return ce(0,Ne(r),i);if(te(r))return ce(0,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(D(t)){if(D(r))return ce(t,r,i);if(A(r))return ce(t,Ne(r),i);if(null===r||r===M)return ce(t,0,i);if(k(r))return ce(t,Ne(r),i);if(te(r))return ce(t,r.toNumber(),i);if(ne(r))return ce(t,r.toNumber(),i);if(re(r))return ce(t,r.toNumber(),i)}else if(k(t)){if(k(r))return ce(pe(t),pe(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(D(r))return ce(Ne(t),r,i);if(null===r||r===M)return ce(Ne(t),0,i);if(A(r))return ce(Ne(t),Ne(r),i)}else if(te(t)){if(te(r))return t.timeZone!==r.timeZone&&(t.isUnknownTimeZone?t=e.arcadeDateAndZoneToArcadeDate(t,r.timeZone):r.isUnknownTimeZone&&(r=e.arcadeDateAndZoneToArcadeDate(r,t.timeZone))),ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(A(t)){if(A(r))return ce(t,r,i);if(D(r))return ce(Ne(t),Ne(r),i);if(te(r))return ce(Ne(t),r.toNumber(),i);if(ne(r))return ce(Ne(t),r.toNumber(),i);if(re(r))return ce(Ne(t),r.toNumber(),i);if(null===r||r===M)return ce(Ne(t),0,i);if(k(r))return ce(Ne(t),Ne(r),i)}else if(re(t)){if(te(r))return ce(t.toNumber(),r.toNumber(),i);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))throw new n("CannotCompareDateAndTime",null);if(re(r))return ce(t.toNumber(),r.toNumber(),i)}else if(ne(t)){if(te(r))throw new n("CannotCompareDateAndTime",null);if(null===r||r===M)return ce(t.toNumber(),0,i);if(D(r))return ce(t.toNumber(),r,i);if(A(r))return ce(t.toNumber(),Ne(r),i);if(k(r))return ce(t.toNumber(),Ne(r),i);if(ne(r))return ce(t.toNumber(),r.toNumber(),i);if(re(r))throw new n("CannotCompareDateAndTime",null)}return!!de(t,r)&&("<="===i||">="===i)}function de(e,t){if(e===t)return!0;if(null===e&&t===M||null===t&&e===M)return!0;if(te(e)&&te(t))return e.equals(t);if(ne(e)&&ne(t))return e.equals(t);if(re(e)&&re(t))return e.equals(t);if(e instanceof o)return e.equalityTest(t);if(e instanceof s)return e.equalityTest(t);if(e instanceof h&&t instanceof h){const r=e.cache._arcadeCacheId,n=t.cache._arcadeCacheId;if(null!=r)return r===n}if(ie(e)&&ie(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ye(e,{useNumbersForDates:t}){let r="";for(const n in e){""!==r&&(r+=",");const i=e[n];null==i?r+=JSON.stringify(n)+":null":A(i)||D(i)||k(i)?r+=JSON.stringify(n)+":"+JSON.stringify(i):z(i)?r+=JSON.stringify(n)+":"+he(i):ne(i)||re(i)?r+=`${JSON.stringify(n)}:${JSON.stringify(i.toString())}`:ee(i)||Array.isArray(i)?r+=JSON.stringify(n)+":"+he(i,null,t):te(i)?r+=t?JSON.stringify(n)+":"+JSON.stringify(i.getTime()):JSON.stringify(n)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(r+=JSON.stringify(n)+":"+i.castToText(t))}return"{"+r+"}"}function pe(e,t){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return JSON.stringify(e.toJSON());if(O(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=be(e[r]);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let r=0;r<e.length();r++)t[r]=be(e.get(r));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function ge(e){const t=[];if(e instanceof a){for(let r=0;r<e.length();r++)t[r]=Ne(e.get(r));return t}if(!O(e))return null;for(let r=0;r<e.length;r++)t[r]=Ne(e[r]);return t}function he(e,t,r=!1){if(k(e))return e;if(null===e)return"";if(D(e))return ue(e,t);if(A(e))return e.toString();if(te(e))return le(e,t);if(ne(e))return e.toFormat(t);if(re(e))return e.toFormat(t);if(e instanceof p)return e instanceof y?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+Fe(e.spatialReference)+"}":Fe(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if(O(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=be(e[n],r);return"["+t.join(",")+"]"}if(e instanceof a){const t=[];for(let n=0;n<e.length();n++)t[n]=be(e.get(n),r);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(r):_(e)?"object, Function":e===M?"":v(e)?"object, Module":""}function be(e,t=!1){if(null===e)return"null";if(A(e)||k(e))return JSON.stringify(e);if(D(e))return e.toString();if(e instanceof p)return he(e,null,t);if(e instanceof a)return he(e,null,t);if(Array.isArray(e))return he(e,null,t);if(te(e))return t?JSON.stringify(e.getTime()):JSON.stringify(le(e,""));if(ne(e))return JSON.stringify(e.toString());if(re(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===M)return"null";return"null"}function Ne(e,t){return D(e)?e:null===e||""===e?0:te(e)||re(e)||ne(e)?NaN:A(e)?e?1:0:O(e)||""===e||void 0===e?NaN:void 0!==t&&k(e)?(t=I(t,"‰",""),t=I(t,"¤",""),c(e,{pattern:t})):e===M?0:Number(e)}function Se(t,r){if(te(t))return t;if(k(t)){const n=Ze(t,r);if(n)return e.dateTimeToArcadeDate(n)}return null}function Ze(e,r){const n=/ (\d\d)/,i=t(r);let a=j.fromISO(e,{zone:i});return a.isValid||n.test(e)&&(e=e.replace(n,"T$1"),a=j.fromISO(e,{zone:r}),a.isValid)?a:null}function Te(e){return A(e)?e:k(e)?"true"===(e=e.toLowerCase()):!!D(e)&&(0!==e&&!isNaN(e))}function Ae(e,t){const r=JSON.parse(e);return r&&!r.spatialReference&&(r.spatialReference=t),Z(r)}function De(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ke(e){if(null===e)return null;if(e instanceof h)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof b){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof N){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof g?0===e.points.length?null:e:e instanceof y?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function Ce(e,t){if(!e)return t;if(!e.domain)return t;let r=null,n=null;if(te(t))r=t.toNumber();else if(re(t))r=t.toString();else if(ne(t))r=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)r=pe(t);else{if(null==t)return null;if(""===t)return t;r=Ne(t)}for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.code===r&&(n=t)}return null===n?pe(t):n.name}function Oe(e,t){if(!e)return t;if(!e.domain)return t;let r=null;const n=pe(t);for(let i=0;i<e.domain.codedValues.length;i++){const t=e.domain.codedValues[i];t.name===n&&(r=t)}return null===r?t:r.code}function xe(e,t,r=null,i=null){if(!t)return null;if(!t.fields)return null;let a,o,s=null;for(let n=0;n<t.fields.length;n++){const r=t.fields[n];r.name.toLowerCase()===e.toString().toLowerCase()&&(s=r)}if(null===s)throw new n("FieldNotFound",null,{key:e});let u=t.typeIdField,l="id",f=t.types;if(t.subtypeField&&(u=t.subtypeField,l="code",f=t.subtypes??[]),null===i&&r&&u)i=r.hasField(u)?r.field(u):null;else if(u&&null!==i){let e=!1;for(const t of f||[])if(i===t[l]){e=!0;break}if(!e)for(const t of f||[])if(i===t.name){i=t[l],e=!0;break}e||(i=null,r&&u&&(i=r.hasField(u)?r.field(u):null))}return null!=i&&f.some(e=>e[l]===i&&(a=e.domains?.[s.name],a&&"inherited"===a.type&&(a=je(s.name,t),o=!0),!0)),o||a||(a=je(e,t)),{field:s,domain:a}}function je(e,t){let r;return t.fields.some(t=>(t.name.toLowerCase()===e.toLowerCase()&&(r=t.domain),!!r)),r}function Fe(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&(i=t.cmp,function(e){return function(t,r){const n={key:t,value:e[t]},a={key:r,value:e[r]};return i(n,a)}});var i;const a=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(a.includes(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=a.push(t)-1,u=Object.keys(t).sort(n?.(t));for(o="",i=0;i<u.length;i++){const r=u[i],n=e(t[r]);n&&(o&&(o+=","),o+=JSON.stringify(r)+":"+n)}return a.splice(s,1),"{"+o+"}"}(e)}function we(e){if(null===e)return null;const t=[];for(const r of e)q(r)?t.push(r.geometry()):t.push(r);return t}function Je(e,t){if(!(t instanceof h))throw new n("InvalidParameter",null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Me(e,t){if(O(e)||ee(e)){let r=!1,i=!1,a=[],o=t;if(O(e)){for(const t of e)Je(a,t);a.length>0&&(o=e[0].spatialReference,r=e[0].hasZ,i=e[0].hasM)}else if(e instanceof s)a=e._elements,a.length>0&&(r=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else{if(!ee(e))throw new n("InvalidParameter",null);for(const t of e.toArray())Je(a,t);a.length>0&&(o=e.get(0).spatialReference,r=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}if(0===a.length)return null;return S(a)||(a=a.slice().reverse()),new b({rings:[a],spatialReference:o,hasZ:r,hasM:i})}return e}function Re(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new N({paths:[i],spatialReference:a,hasZ:r,hasM:n})}return e}function Pe(e,t){if(O(e)||ee(e)){let r=!1,n=!1,i=[],a=t;if(O(e)){for(const t of e)Je(i,t);i.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,n=!0===e[0].hasM)}else if(e instanceof s)i=e._elements,i.length>0&&(r=e._hasZ,n=e._hasM,a=e.get(0).spatialReference);else if(ee(e)){for(const t of e.toArray())Je(i,t);i.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,n=!0===e.get(0).hasM)}return 0===i.length?null:new g({points:i,spatialReference:a,hasZ:r,hasM:n})}return e}function Ie(e,t=!0){if(null==e)return[];if(O(e)){const r=[];for(const n of e){const e=pe(n);(t||""!==e)&&r.push(e)}return r}if(ee(e)){const r=[];for(let n=0;n<e.length();n++){const i=pe(e.get(n));(t||""!==i)&&r.push(i)}return r}if(Y(e)){const r=pe(e);if(t||""!==r)return[r]}return[]}let _e=0;function ve(){return _e++,_e%100==0?(_e=0,new Promise(e=>{setTimeout(()=>{e()},0)})):Promise.resolve()}function Ye(e,t,r){switch(r){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Le(e){return null==e?null:A(e)||D(e)||k(e)?e:e instanceof p?e.toJSON():e instanceof a?e.toArray().map(e=>Le(e)):Array.isArray(e)?e.map(e=>Le(e)):C(e)?e:te(e)?e.toJSDate():ne(e)?e.toString():re(e)?e.toJSDate():"castAsJson"in e?e.castAsJson():null}async function Ge(e,t=null){if(e instanceof a&&(e=e.toArray()),null==e)return null;if(Y(e)||e instanceof p||C(e)||te(e))return Le(e);if(Array.isArray(e)){const r=[],n=[];for(const i of e)if(null===i||Y(i)||i instanceof p||C(i)||te(i))n.push(Le(i));else{const e=n.push(null)-1;r.push(Ge(i,t).then(t=>{n[e]=t}))}return r.length>0&&await Promise.all(r),n}return"castAsJsonAsync"in e?e.castAsJsonAsync(t):null}function Ve(e){return ze(e)?e.parent:e}function ze(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function qe(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass}function Ee(e,t,r){const n=Ve(e.fullSchema());if(null===n)return null;if(!n.fields)return null;return xe(t,n,e,r)}function Ue(e){const t=Ve(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map(e=>({name:e.name,code:e.code})):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function He(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const a=xe(t,i,e,n);if(void 0===r)try{r=e.field(t)}catch(o){return null}return Ce(a,r)}function We(e,t,r,n){const i=Ve(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===r){try{r=e.field(t)}catch(a){return null}return r}return Oe(xe(t,i,e,n),r)}function $e(e){return e?.timeZone??"system"}function Be(e){const t=Ve(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const r=[];for(const n of t.fields)r.push(u(n));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===l[t.geometryType]?"":l[t.geometryType],fields:r}}const Ke="1.36",Qe=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:J,ReturnResult:w,absRound:se,arcadeVersion:Ke,autoCastArrayOfPointsToMultiPoint:Pe,autoCastArrayOfPointsToPolygon:Me,autoCastArrayOfPointsToPolyline:Re,autoCastFeatureToGeometry:we,binaryOperator:Ye,breakResult:R,castAsJson:Le,castAsJsonAsync:Ge,castRecordToText:ye,continueResult:P,defaultTimeZone:$e,defaultUndefined:L,equalityTest:de,featureDomainCodeLookup:We,featureDomainValueLookup:He,featureFullDomain:Ee,featureSchema:Be,featureSubtypes:Ue,fixNullGeometry:ke,fixSpatialReference:De,formatDate:le,formatNumber:ue,getDomain:xe,getDomainCode:Oe,getDomainValue:Ce,getType:G,greaterThanLessThan:me,isArray:O,isAttachment:B,isBoolean:A,isDate:te,isDateOnly:re,isDictionary:W,isDictionaryLike:K,isEmpty:oe,isFeature:q,isFeatureSet:H,isFeatureSetCollection:Q,isFunctionParameter:_,isGeometry:z,isGraphic:F,isImmutableArray:ee,isInteger:x,isJsDate:C,isKnowledgeGraph:X,isModule:v,isNumber:D,isObject:ie,isPixel:U,isPortal:$,isSimpleType:Y,isString:k,isSubtypeGrouplayer:qe,isSubtypeSublayer:ze,isTime:ne,isVoid:V,isVoxel:E,multiReplace:I,parseGeometryFromJson:Ae,pcCheck:ae,stableStringify:Fe,standardiseDateFormat:fe,tick:ve,toBoolean:Te,toDate:Se,toNumber:Ne,toNumberArray:ge,toString:pe,toStringArray:Ie,toStringExplicit:he,voidOperation:M},Symbol.toStringTag,{value:"Module"}));export{Ue as $,P as A,ae as B,$ as C,B as D,U as E,E as F,v as G,we as H,J as I,De as J,Me as K,Re as L,Pe as M,Te as N,L as O,oe as P,Ie as Q,w as R,G as S,$e as T,Se as U,fe as V,se as W,Ee as X,We as Y,He as Z,Be as _,Le as a,ke as a0,I as a1,Ke as a2,ge as a3,ze as a4,ve as a5,xe as a6,Ce as a7,Oe as a8,le as a9,ue as aa,ie as ab,qe as ac,Ae as ad,Fe as ae,Y as b,ye as c,Ge as d,te as e,z as f,ee as g,q as h,_ as i,Q as j,H as k,W as l,X as m,ne as n,re as o,Qe as p,V as q,Ne as r,pe as s,he as t,me as u,M as v,de as w,Ye as x,K as y,R as z};
|
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.
|
|
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.59";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.
|
|
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.59",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};
|
package/layers/ParquetLayer.js
CHANGED
|
@@ -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
|
|
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};
|
package/libs/parquet/parquet.js
CHANGED
|
@@ -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
|
|
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.
|
|
3
|
+
"version": "5.2.0-next.59",
|
|
4
4
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@amcharts/amcharts5": "~5.
|
|
23
|
-
"@arcgis/toolkit": "^5.2.0-next.
|
|
22
|
+
"@amcharts/amcharts5": "~5.20.0",
|
|
23
|
+
"@arcgis/toolkit": "^5.2.0-next.55",
|
|
24
24
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
25
25
|
"@esri/calcite-components": "^5.1.1",
|
|
26
26
|
"@vaadin/grid": "~25.2.5",
|
|
27
|
-
"@zip.js/zip.js": "~2.8.
|
|
27
|
+
"@zip.js/zip.js": "~2.8.34",
|
|
28
28
|
"luxon": "~3.7.2",
|
|
29
29
|
"marked": "~18.0.7",
|
|
30
30
|
"tslib": "^2.8.1"
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const d="
|
|
2
|
+
const d="20260725",b="5deb18772f406a468966b11da7bfdf4bcd32d115";export{d as buildDate,b 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
|
|
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};
|