@arcgis/core 5.1.0-next.85 → 5.1.0-next.86
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/assets/components/assets/icon/gpsReceiver16.json +1 -0
- package/assets/components/assets/icon/gpsReceiver24.json +1 -0
- package/assets/components/assets/icon/gpsReceiver32.json +1 -0
- package/assets/components/assets/icon/totalStation16.json +1 -0
- package/assets/components/assets/icon/totalStation24.json +1 -0
- package/assets/components/assets/icon/totalStation32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{67abbe81c16de26f61d8.js → 1bad4331a43169f3cc34.js} +1 -1
- package/assets/esri/core/workers/chunks/27f67a3828b78d4c1413.js +1 -0
- package/assets/esri/core/workers/chunks/2c916b93d8a6e6b9c0d7.js +1 -0
- package/assets/esri/core/workers/chunks/{db86a1119e4e58ecfbda.js → 2f8b173d1dac73ba0d9e.js} +1 -1
- package/assets/esri/core/workers/chunks/49e8144effc299dfcd66.js +1 -0
- package/assets/esri/core/workers/chunks/5166f204fd078dced5db.js +1 -0
- package/assets/esri/core/workers/chunks/577cbc131b21c351fae5.js +2 -0
- package/assets/esri/core/workers/chunks/{72691fe14024e35f85d0.js → 618106f5fbdf88ef2278.js} +1 -1
- package/assets/esri/core/workers/chunks/61fada8942b65fa0b5e1.js +1 -0
- package/assets/esri/core/workers/chunks/{05c5f68e117fc58ae801.js → 701b823763e941b71f4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{0219edb509e01270d42d.js → 99c6bd2125f4eb6796fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js → a844547bf33a8527ee9f.js} +2 -2
- package/assets/esri/core/workers/chunks/aa6808146c76b2d49b64.js +1 -0
- package/assets/esri/core/workers/chunks/{9cac70164d8528c283af.js → add000f51c778114c028.js} +1 -1
- package/assets/esri/core/workers/chunks/b23e677c33db6f9bac8a.js +1 -0
- package/assets/esri/core/workers/chunks/{dfe1139124fda0d6c059.js → b575292013bceef9b015.js} +1 -1
- package/assets/esri/core/workers/chunks/bae8f2a5dfe0cfbc0688.js +1 -0
- package/assets/esri/core/workers/chunks/bb5f909a2f26fc6a21b0.js +2 -0
- package/assets/esri/core/workers/chunks/{28a45bd26eb5c9b3ec7c.js → ce66c551b7083913eee5.js} +1 -1
- package/assets/esri/core/workers/chunks/{22bdea4ca52970c29504.js → d0aee7c80c5c7e23d216.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4220b6eab0865318033.js → d8de7fe49dba9ed589df.js} +1 -1
- package/assets/esri/core/workers/chunks/ded2f19a1685db2137f4.js +2 -0
- package/assets/esri/core/workers/chunks/{f77d23ee60c876b01e4b.js → e9a42f0262fc44a79d4b.js} +1 -1
- package/assets/esri/core/workers/chunks/edbdee69440dbfc05644.js +1 -0
- package/assets/esri/core/workers/chunks/ee057c85cdf6beb5b012.js +2 -0
- package/assets/esri/core/workers/chunks/ff57a071156d8a7e47be.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/interfaces.d.ts +14 -14
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/ParquetLayer.d.ts +10 -10
- package/layers/ParquetLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/graphics/sources/connections/FabricKustoConnection.js +2 -0
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
- package/layers/graphics/sources/connections/createConnection.js +1 -1
- package/layers/graphics/sources/connections/websocketUils.js +2 -0
- package/layers/support/ClientSideConnection.js +1 -1
- package/layers/support/FabricKustoSource.js +2 -0
- package/layers/support/{ParquetGeometryEncodingLocation.d.ts → GeometryEncodingLocation.d.ts} +9 -9
- package/layers/support/{ParquetGeometryEncodingLocation.js → GeometryEncodingLocation.js} +1 -1
- package/layers/support/{ParquetGeometryEncodingWkb.d.ts → GeometryEncodingWkb.d.ts} +8 -9
- package/layers/support/GeometryEncodingWkb.js +2 -0
- package/layers/support/kustoUtils.js +2 -0
- package/layers/support/parquetEncodingUtils.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/layers/support/types.d.ts +3 -3
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/views/2d/ViewState.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
- package/views/3d/layers/graphics/StreamController.js +1 -1
- package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +0 -1
- package/assets/esri/core/workers/chunks/53d13e13d8729bd4dcf2.js +0 -1
- package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +0 -1
- package/assets/esri/core/workers/chunks/5818f1f526577068d6ca.js +0 -2
- package/assets/esri/core/workers/chunks/5ec66e39e53c11e75179.js +0 -2
- package/assets/esri/core/workers/chunks/5f6fd20a7f4e80eafa25.js +0 -1
- package/assets/esri/core/workers/chunks/6d2abdb48e17b2b56599.js +0 -1
- package/assets/esri/core/workers/chunks/79eca9ccd4dc52da1d59.js +0 -1
- package/assets/esri/core/workers/chunks/7cdd0492b2191df95102.js +0 -2
- package/assets/esri/core/workers/chunks/7e530e635325dba07864.js +0 -1
- package/assets/esri/core/workers/chunks/936f2b1332ece14d7c28.js +0 -2
- package/assets/esri/core/workers/chunks/983f6c8727fd9484718e.js +0 -1
- package/assets/esri/core/workers/chunks/c7da0981822182e15f3a.js +0 -1
- package/layers/support/ParquetGeometryEncodingWkb.js +0 -2
- /package/assets/esri/core/workers/chunks/{5ec66e39e53c11e75179.js.LICENSE.txt → 577cbc131b21c351fae5.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js.LICENSE.txt → a844547bf33a8527ee9f.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{5818f1f526577068d6ca.js.LICENSE.txt → bb5f909a2f26fc6a21b0.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{7cdd0492b2191df95102.js.LICENSE.txt → ded2f19a1685db2137f4.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{936f2b1332ece14d7c28.js.LICENSE.txt → ee057c85cdf6beb5b012.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7125],{66344(t,e,s){s.d(e,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(t=10485760,e=.3){this._maxSize=t,this._maxClientSizeRatio=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(t){this._clients.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._clients.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(t,e){const s=this._db.get(t.id+e);return s?.size??0}put(t,e,s,r,o){e=t.id+e;const a=this._db.get(e);if(a&&(this._size-=a.size,t.size-=a.size,this._db.delete(e),a.entry!==s&&this._notifyRemove(e,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(e,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${e}`),void this._notifyRemove(e,s,0,0);const h=1+Math.max(o,-4)- -3;this._db.set(e,new n(s,r,h)),this._size+=r,t.size+=r,this._checkSize()}updateSize(t,e){e=t.id+e;const s=this._db.get(e);if(!s)return;this._size-=s.size,t.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const t=this._notifyRemove(e,s.entry,i,1);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}s.size=i,this._size+=i,t.size+=i,this._checkSize()}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach((t,i)=>{const r=t.lifetime;s[r]=(s[r]||0)+t.size,this._clients.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=e[n]||0;e[n]=s+t.size}})});const i={};this._clients.forEach(t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const r=e[s]||0;e[s]=r,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(e);r.sort((t,s)=>e[s]-e[t]),r.forEach(s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]);for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._clients.forEach(t=>t.resetHitRate())}clear(t){const e=t.id;this._db.forEach((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._clients.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[e,s]of this._db)e.startsWith(t.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s,i){const r=this._clients.get(t.split(o)[0])?.removeFunc,n=r?.(e,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._clients.forEach(t=>this._checkSizeLimits(this._maxClientSize,t)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const s=e??this;if(s.size<=t)return;const i=e?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=e??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*t)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=e??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*t)return}}_purgeItem(t,e,s){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const i=this._notifyRemove(t,e.entry,e.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new r(0);class n{constructor(t,e,s){this.entry=t,this.size=e,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(t,e){this.removeFunc=e,this.id="",this.name="",this.size=0,this._storage=new r(t,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},9775(t,e,s){s.d(e,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,i.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},36745(t,e,s){s.d(e,{z:()=>a});var i=s(4718),r=s(51118),n=s(60408),o=s(92722);class a{static fromOptimized(t,e,s=1){return(new h).initialize(t,e,s)}static fromJSON(t){const[e,s]=l(t),i=(0,n.Pv)(t),r=(0,n.W0)(t);return(new c).initialize(e,s,i,r,1)}static fromOptimizedCIM(t,e,s=1){return(new p).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[s,i]=l(t),r=(0,n.Pv)(t),o=(0,n.W0)(t);return(new d).initialize(s,i,r,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new p).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new c).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new p).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new d).initialize([],t,e,s,i)}asJSON(){const t=(0,r.x)(this),{hasZ:e,hasM:s}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:s}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:s?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:s}:{paths:t,hasZ:e,hasM:s}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,r=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+r),-.5*s}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let r=this._pathOffset+e;r<t;r+=e){const t=s[r-e],n=s[r-e+1],o=s[r]-t,a=s[r+1]-n;i+=Math.sqrt(o*o+a*a)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function u(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function l(t){return(0,n.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,n.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,n.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,n.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(t)?[[[u(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class c extends a{initialize(t,e,s,i,r){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=r,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],r=e[i],n=t[0],o=t[1],a=r[0]-n,h=r[1]-o;s+=Math.sqrt(a*a+h*h)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new c).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,r.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new o.A([],[],t,e),{coords:i,lengths:r}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),r.length=0;else for(const s of this._paths){for(const r of s)i.push(r[0]),i.push(r[1]*this.yFactor),t&&i.push(r[2]),e&&i.push(r[this._mIndex]);r.push(s.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new c).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class p extends h{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new p).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends c{initialize(t,e,s,i,r){return super.initialize(t,e,s,i,r)}clone(){return(new d).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32011(t,e,s){s.d(e,{d:()=>h});var i=s(19419),r=s(537),n=s(12359),o=s(95108),a=s(12176);function h(t){if(0===t.totalSize)return null;const e=(0,r.z8)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let o=0,a=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>a&&(a=s,o=e)}if(t.seekPath(o),0===t.pathSize)return null;t.seekPathStart();const h=(0,r.B$)(t);if(Math.abs(a)<=2*s*s)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const p=(0,n.w2)(t,(0,i.vt)());if(null===p)return null;if(t.totalPoints<4)return p;const d=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],g=[NaN,NaN,NaN,NaN];let w=!1,x=l(p,t,!0);0===x.distance&&(w=!0,d[0][0]=p[0],d[0][1]=p[1],x=l(p,t,!1)),f[0]=x.distance,g[0]=0;const S=[NaN,NaN];let z=!1,P=.25,I=-1,b=NaN;do{if(b=NaN,d[1]=c(t,y(h[0],h[2],P),0,e),isNaN(d[1][0])||isNaN(d[1][1])||(x=l(d[1],t,!1),b=x.distance),!isNaN(b)&&b>s&&u(d[1],t))z=!0,f[1]=b,g[1]=m(d[1],p);else if(!isNaN(b)&&b>I&&(I=b,S[0]=d[1][0],S[1]=d[1][1]),P-=.01,P<.1){if(!(I>=0))break;z=!0,f[1]=I,d[1][0]=S[0],d[1][1]=S[1],g[1]=m(d[1],p)}}while(!z);z=!1,P=.5,I=-1;let F=.01,v=1;do{if(b=NaN,d[2]=c(t,y(h[0],h[2],P),0,e),isNaN(d[2][0])||isNaN(d[2][1])||(x=l(d[2],t,!1),b=x.distance),!isNaN(b)&&b>s&&u(d[2],t))z=!0,f[2]=b,g[2]=m(d[2],p);else if(!isNaN(b)&&b>I)I=b,S[0]=d[2][0],S[1]=d[2][1];else if(b>I&&(I=b,S[0]=d[2][0],S[1]=d[2][1]),P=.5+F*v,F+=.01,v*=-1,P<.3||P>.7){if(!(I>=0))break;z=!0,f[2]=I,d[2][0]=S[0],d[2][1]=S[1],g[2]=m(d[2],p)}}while(!z);z=!1,P=.75,I=-1;do{if(b=NaN,d[3]=c(t,y(h[0],h[2],P),0,e),isNaN(d[3][0])||isNaN(d[3][1])||(x=l(d[3],t,!1),b=x.distance),!isNaN(b)&&b>s&&u(d[3],t))z=!0,f[3]=b,g[3]=m(d[3],p);else if(b>I&&(I=b,S[0]=d[3][0],S[1]=d[3][1]),P+=.01,P>.9){if(!(I>=0))break;z=!0,f[3]=I,d[3][0]=S[0],d[3][1]=S[1],g[3]=m(d[3],p)}}while(!z);const C=[0,1,2,3],R=w?0:1;let N;for(let t=R;t<4;t++)for(let t=R;t<3;t++){const e=g[t],s=g[t+1];_(e,s)>0&&(N=C[t],C[t]=C[t+1],C[t+1]=N,g[t]=s,g[t+1]=e)}let O=R,M=0,A=0;for(let t=R;t<4;t++){switch(t){case 0:A=2*f[C[t]];break;case 1:A=1.66666666*f[C[t]];break;case 2:A=1.33333333*f[C[t]];break;case 3:A=f[C[t]]}A>M&&(M=A,O=C[t])}return d[O]}function u(t,e){let s,i,r,n,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=r,i=n)r=e.x,n=e.y,i>t[1]!=n>t[1]&&((r-s)*(t[1]-i)-(n-i)*(t[0]-s)>0?o++:o--);return 0!==o}function l(t,e,s){if(s&&u(t,e))return{coord:t,distance:0};let i=1/0,r=0,n=0,a=[0,0],h=[0,0];const l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=h){h=[e.x,e.y],(0,o.gR)(l,t,a,h);const s=m(t,l);s<i&&(i=s,r=l[0],n=l[1])}return{coord:[r,n],distance:Math.sqrt(i)}}function c(t,e,s,r){const n=[e,0];let o=1/0,h=1/0,u=!1,l=!1;const c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],y=[0,0],m=[0,0],_=[[0,0],[0,0]],g=(0,i.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(_[0][0]=t.x,_[0][1]=t.y;t.nextPoint();_[0][0]=_[1][0],_[0][1]=_[1][1]){if(_[1][0]=t.x,_[1][1]=t.y,null===p(g,_))continue;if(y[0]=c[0][0],y[1]=c[0][1],m[0]=c[1][0],m[1]=c[1][1],0===d(g,y,m))continue;if(!(0,a.Ql)(c[0],c[1],_[0],_[1],f))continue;const e=f[1];o>h?e<o&&(o=e,u=!0):e<h&&(h=e,l=!0)}return u&&l?n[1]=(o+h)/2:n[0]=n[1]=NaN,n}function p(t,e){if(e.length<2)return null;t||(t=(0,i.vt)());const[s,r]=e[0],[n,o]=e[1];return t[0]=Math.min(s,n),t[1]=Math.min(r,o),t[2]=Math.max(s,n),t[3]=Math.max(r,o),t}function d(t,e,s){let i=f(e,t),r=f(s,t);const n=t[0],o=t[1],a=t[2],h=t[3];if(i&r)return 0;if(!(i|r))return 4;const u=(i?1:0)|(r?2:0);do{const u=s[0]-e[0],l=s[1]-e[1];if(u>l)3&i?(1&i?(e[1]+=l*(n-e[0])/u,e[0]=n):(e[1]+=l*(a-e[0])/u,e[0]=a),i=f(e,t)):3&r?(1&r?(s[1]+=l*(n-s[0])/u,s[0]=n):(s[1]+=l*(a-s[0])/u,s[0]=a),r=f(s,t)):i?(4&i?(e[0]+=u*(o-e[1])/l,e[1]=o):(e[0]+=u*(h-e[1])/l,e[1]=h),i=f(e,t)):(4&r?(s[0]+=u*(o-s[1])/l,s[1]=o):(s[0]+=u*(h-s[1])/l,s[1]=h),r=f(s,t));else if(12&i?(4&i?(e[0]+=u*(o-e[1])/l,e[1]=o):(e[0]+=u*(h-e[1])/l,e[1]=h),i=f(e,t)):12&r?(4&r?(s[0]+=u*(o-s[1])/l,s[1]=o):(s[0]+=u*(h-s[1])/l,s[1]=h),r=f(s,t)):i?(1&i?(e[1]+=l*(n-e[0])/u,e[0]=n):(e[1]+=l*(a-e[0])/u,e[0]=a),i=f(e,t)):(1&r?(s[1]+=l*(n-s[0])/u,s[0]=n):(s[1]+=l*(a-s[0])/u,s[0]=a),r=f(s,t)),i&r)return 0}while(i|r);return u}function f(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function y(t,e,s){return t+(e-t)*s}function m(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function _(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},48459(t,e,s){s.r(e),s.d(e,{default:()=>T});var i=s(5482),r=s(7762),n=s(21818),o=s(49186),a=s(44208),h=s(53966),u=s(17676),l=s(563),c=s(39516),p=s(16930),d=s(70328),f=s(75752),y=s(8384),m=s(58727),_=s(64714),g=s(17754),w=s(20437),x=s(95466),S=s(9075),z=s(34582);function P(t){switch(t.type){case"wkb":return z.A.fromJSON(t);case"location":return S.A.fromJSON(t)}}var I=s(42760),b=s(39412),F=s(63892),v=s(30661),C=s(28923),R=s(44320),N=s(35258),O=s(16630);const M=new v.Z,A="__OBJECTID",E=new TextDecoder;class T{constructor(){this._fileInfos=new Map,this._queue=new l.QueueProcessor({concurrency:4,process:(t,e)=>this._executeQuery(t,e)}),this._indexMap={}}async load(t){const e=t.spatialReference?p.A.fromJSON(t.spatialReference):void 0;if(e&&!e.isWGS84&&!e.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");const s=await(0,I.nc)({urls:new r.A(t.urls),fields:t.fields?.map(t=>w.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?P(t.geometryEncoding):null,geometryType:t.geometryType?(0,I.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:e},{customParameters:t.customParameters});if(!s.fields)throw new o.A("parquet:unsupported","Fields must be defined");let n;if(s.spatialReference&&s.geometryType){if(!s.spatialReference)throw new o.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(h.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=p.A.WGS84),n={geometry:s.geometryEncoding?{geometryType:(0,I.sA)(s.geometryType),spatialReference:s.spatialReference.toJSON(),encoding:s.geometryEncoding.toJSON()}:null,displayOptimization:s.displayOptimization}}this.setCustomParameters(t.customParameters),this._geometryInfo=n;const a=t.urls;for(const t of a)this._addFile(t);this._capabilities=Q(await this.getFileStatistics());const u=this._fileInfos.values().next().value;if(!u)return{layerDefinition:{},capabilities:Q(null)};const l=await u,{fields:c}=s;if(null==c)throw new o.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",c);c.push(new w.A({name:A,type:"oid",alias:A}));for(const t of c){const e=l.file.columnForFieldName(t.name);null!=e&&(this._indexMap[t.name]=e)}const f=new x.A(c.map(t=>t.toJSON()));this._fieldsIndex=f;const y=(0,I.sA)(s.geometryType??"point");if(this._metadata=N.i.createFeature({fieldsIndex:f.toJSON(),geometryType:y,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:y,featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:s.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},s.spatialReference){const t=await this.getFileInfos();this._fullExtent=function(t,e){const s=(0,d.hZ)((0,d.vt)(),d.qv);for(const e of t){const t=(0,F.hD)(e.file);if(!t)return null;const i=t.columns[t.primary_column];if(!i.bbox)return null;const r=G(i.bbox);(0,d.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:e}}(t,s.spatialReference.toJSON())}if(null==this._fullExtent&&"location"===s.geometryEncoding?.type){const{xField:t,yField:e}=s.geometryEncoding,r=(0,d.hZ)((0,d.vt)(),d.qv);for(const s of await this.getFileInfos())for(const n of s.file.rowGroups()){const s={stack:[],error:void 0,hasError:!1};try{const o=(0,i.mS)(s,n.columnDescriptorForAttribute(t),!1),a=(0,i.mS)(s,n.columnDescriptorForAttribute(e),!1),h=[o.minValue(),a.minValue(),o.maxValue(),a.maxValue()];(0,d.DC)(r,h),n.free()}catch(t){s.error=t,s.hasError=!0}finally{(0,i.hk)(s)}}this._fullExtent={xmin:r[0],ymin:r[1],xmax:r[3],ymax:r[4],spatialReference:s.spatialReference?.toJSON()}}return{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(t=>t.toJSON()),drawingInfo:(0,_.F0)(y),extent:this._fullExtent??void 0,geometryType:y,geometryEncoding:s.geometryEncoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){for(const t of this._fileInfos.values())t.then(t=>t.file.free);this._fileInfos.clear(),this._queue.destroy()}setCustomParameters(t){this._customParameters=t}getIndexMap(){return this._indexMap}async getFileId(t){const e=this._fileInfos.get(t);if(!e)throw new Error(`InternalError: File ${t} does not exist`);return(await e).id}async getFileInfo(t){const e=this._fileInfos.get(t);if(!e)throw new Error(`InternalError: File ${t} does not exist`);return e}async getFileInfos(){return Promise.all(Array.from(this._fileInfos.values()))}async getFileStatistics(){if(!this._fileInfos.size)return null;const t=(await this.getFileInfos()).reduce((t,e)=>t+e.file.byteLength(),0);return{featureCount:await this._getFeatureCount(),byteLength:t}}async updateFiles(t){const e=new Set(t);for(const[t,s]of this._fileInfos.entries())e.has(t)?e.delete(t):(s.then(t=>t.file.free()),this._fileInfos.delete(t));await Promise.all(Array.from(e.values()).map(t=>this._addFile(t)))}async queryFeatures(t,e){return this._validateQuery(t),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(t)||(t.resultRecordCount=t.resultRecordCount?Math.min(t.resultRecordCount,8e3):8e3,t.resultOffset=t.resultOffset??0),(t.outStatistics||t.returnDistinctValues)&&(t.returnGeometry=void 0),(await this._enqueueQuery(t,e)).createQueryResponse()}async queryFeatureCount(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),q(s)?(s.outFields=void 0,s.returnGeometry=void 0,(await this._enqueueQuery(s,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),q(s)?(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0,(await this._enqueueQuery(s,e)).items.map(t=>t.getObjectId())):Array.from({length:await this._getFeatureCount()},(t,e)=>e)}async queryExtent(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!q(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=(0,n.z)(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const r=(0,d.hZ)((0,d.vt)(),d.qv),o=(0,d.vt)(),a=await this._enqueueQuery(s,e);let h=0;for(const t of a.items)t.getBounds(o)&&((0,d.RF)(r,o),h+=1);return{count:h,extent:(0,f.Wc)(r,i,s.outSR?(0,n.z)(s.outSR):i,i,!1)}}async queryStream(t,e,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(t),r=(await(0,b.N)()).Query.new();"tile"===e.type&&(r.setExtent(e.extent),r.setQuantizationTransform(e.transform),r.setScale(e.scale)),r.setOutFields(e.outFields.filter(t=>null!=this._indexMap[t])),r.setOutSpatialReference(e.outSpatialReference.wkid),r.setReturnGeometry(!0),e.where&&await this._setWhereClause(r,i.file,e.where);const n=await i.file.executeQuery(r,s.signal),o=i.streamIdCounter++,a=(0,u.NY)(s.signal,t=>{const e=i.streams.get(o);null!=e&&(e.handle.remove(),i.streams.delete(o))});return i.streams.set(o,{stream:n,handle:a}),o}async getStreamNext(t,e,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(t),r=i.streams.get(e);if(!r)return null;const n=await r.stream.next(s.signal);return null==n&&(r.handle.remove(),i.streams.delete(e)),n?.serialize().buffer}async createPatch(t,e,s,i,r){if(!r.signal)throw new Error("InternalError: AbortSignal must be passed");const n=await this.getFileInfo(t);return(await n.file.createChunkPatch(e,s,i,r.signal)).serialize().buffer}async _getFile(t){for(const e of await this.getFileInfos())if(e.id===t)return e.file;throw new Error(`InternalError: File ${t} does not exist`)}_addFile(t){const e=this._fileInfos.size;this._fileInfos.set(t,this._createFileInfo(t,e))}async _createFileInfo(t,e){return{id:e,file:await(0,F.DV)(t,{geometryInfo:this._geometryInfo,getCustomParameters:()=>this._customParameters}),streamIdCounter:0,streams:new Map}}async _getFeatureCount(){return(await this.getFileInfos()).reduce((t,e)=>t+e.file.numRows(),0)}_validateQuery(t){if(!this._capabilities.query.supportsStatistics&&t.outStatistics)throw new o.A("parquet:unsupported","Statistics queries are not supported",{query:t});if(!this._capabilities.query.supportsOrderBy&&t.orderByFields?.length)throw new o.A("parquet:unsupported","Queries using orderBy are not supported",{query:t});if(!this._capabilities.query.supportsDistinct&&t.returnDistinctValues)throw new o.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:t})}async _setWhereClause(t,e,s){const i=this._indexMap,r=this._fieldsIndex,n={getAttribute(t,s){const n=e.readAttribute(t.rowGroup,t.row,i[s]);if(null==n)return null;const o=r.get(s);return"esriFieldTypeString"===o.type||"esriFieldTypeDateOnly"===o.type||"esriFieldTypeTimeOnly"===o.type||"esriFieldTypeTimestampOffset"===o.type?E.decode(n):n}},a=await(0,c.GP)(s,this._fieldsIndex);if(!a.isStandardized)throw new o.A("sql-parse-error","expression is not standardized");t.setWhere(s),t.setWhereEvaluator((t,e)=>a.testFeatureCompiled({rowGroup:t,row:e},n,null)),t.setWhereFields(a.fieldNames)}async*_fetchChunks(t,e){const s=await(0,b.N)();for(const i of await this.getFileInfos()){const r=s.Query.new();r.setOutFields(t.fields),r.setReturnGeometry(t.returnGeometry),t.where&&await this._setWhereClause(r,i.file,t.where);const n=await i.file.executeQuery(r),o=[],a=n.next(e);for(let t=0;t<4;t++)o.push(n.next(e));let h=await a;for(;null!=h;){(0,u.Te)(e);const t=new O.s(this._metadata,this._indexMap,h,i.id),s=k([new C.j(t,null,0,!1)],this._queryEngineParams),r=o.shift();o.push(n.next(e)),yield s,h=await r}}}_enqueueQuery(t,e){return this._queue.push(t,e)}async _executeQuery(t,e){const s=await this._getReadParams(t);if(t.where=void 0,t.objectIds?.length){const s=new Map;for(const e of t.objectIds){const t=(0,g.wY)(e),i=(0,g.gE)(e);let r=s.get(t);r||(r=[],s.set(t,r)),r.push(i)}const i=[];for(const[r,n]of s.entries()){const s=await this._executeFileIdQuery(t,r,n,e);for(const t of s)i.push(t)}return new y.G(i,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:M,featureIdInfo:this._queryEngineParams.featureIdInfo})}let i=t.resultRecordCount??await this._getFeatureCount(),r=t.resultOffset??0;t.resultRecordCount=void 0,t.resultOffset=void 0;const n=[];for await(const o of this._fetchChunks(s,e)){const s=await o.executeQueryForOpaqueFeatures(t,e);if(s.length>r){const e=s.slice(r,Math.min(r+i,s.length));for(const t of e)n.push(t);if(r=0,i-=e.length,0===i)return new y.G(n,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:M,featureIdInfo:this._queryEngineParams.featureIdInfo})}else r-=s.length}return new y.G(n,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:M,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(t,e,s,i){const r=await this._getReadParams(t),n=(await(0,b.N)()).Query.new();n.setOutFields(r.fields),n.setReturnGeometry(r.returnGeometry),n.setIds(new Uint32Array(s));const o=await this._getFile(e),a=await o.executeQuery(n,i);let h=await a.next(i),u=0;const l=[];for(;null!=h;){const t=new O.s(this._metadata,this._indexMap,h,e),s=new C.j(t,null,u++,!1);l.push(s),h=await a.next(i)}return k(l,this._queryEngineParams).executeQueryForOpaqueFeatures(t,i)}async _getReadParams(t){const e=new Set;if(t.outStatistics)for(const s of t.outStatistics)null!=s.onStatisticField&&e.add(s.onStatisticField);if(t.outFields)for(const s of t.outFields)e.add(s);return{fields:(e.has("*")?this._fieldsIndex.fields.map(t=>t.name):Array.from(e)).filter(t=>null!=this._indexMap[t]),returnGeometry:!!t.returnGeometry||!!t.geometry,where:t.where}}}function q(t){for(const e in t){const s=e;switch(s){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=t[s]}}return!1}function k(t,e){const s=new R.I;for(const e of t)s.insert(e);return new f.do({...e,featureStore:s})}function G(t){switch(t.length){case 4:return(0,d.Jt)((0,d.vt)(),t);case 6:return t;default:throw new o.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:t})}}function Q(t){const e=t?.featureCount;let s=!1;return null!=e&&e<(0,a.A)("parquetlayer-full-query-feature-count")&&(s=!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:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsCacheHint:!1,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:s,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:s,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:s,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},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}}}},34582(t,e,s){s.d(e,{A:()=>a});var i=s(5482),r=s(69540),n=s(25482),o=s(91429);let a=class extends((0,r.OU)(n.o)){constructor(t){super(t),this.type="wkb",this.field=null}};(0,i.Cg)([(0,o.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.GeometryEncodingWkb")],a)},42760(t,e,s){s.d(e,{hG:()=>y,nc:()=>m,sA:()=>f,ye:()=>p}),s(7762);var i=s(49186),r=s(66552),n=s(16930),o=s(20437),a=s(30524),h=s(9075),u=s(34582),l=s(54625),c=s(63892);const p=new r.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),d=new Set(["uncompressed","snappy","gzip"]);function f(t){return p.toJSON(t)}function y(t){return p.fromJSON(t)}async function m(t,e={}){if(t.urls.length<1)throw new i.A("parquet:bad-input","At least one url must be specified",t);if(t.geometryType&&t.spatialReference&&t.geometryEncoding&&t.fields)return t;const s=await(0,c.DV)(t.urls.getItemAt(0),{getCustomParameters:()=>e.customParameters});for(const t of s.compressionCodecs())if(!d.has(t))throw new i.A("parquet:unsupported",`Compression codec ${t} is unsupported. Must be of type ${Array.from(d).join(",")}`);const r=(0,c.hD)(s),p={...t,file:s};if(null==p.fields&&(p.fields=s.fields(!1).map(t=>o.A.fromJSON({name:t.name,alias:t.name,type:t.type}))),null!=p.geometryEncoding){const t=p.geometryEncoding;switch(t.type){case"wkb":{const e=p.fields.find(e=>e.name===t.field);if(!e)throw new i.A("parquet:unsupported",`Geometry encoding references field ${t.field} which does not exist`);if("blob"!==e.type)throw new i.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${e.type} but expected 'blob'`);break}case"location":for(const e of[t.xField,t.yField])if(null!=e){const t=p.fields.find(t=>t.name===e);if(!t)throw new i.A("parquet:unsupported",`Geometry encoding references field ${e} which does not exist`);if(!(0,a.WA)(t))throw new i.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${t.type} but expected a numeric`)}}}null==p.geometryEncoding&&(p.geometryEncoding=function(t,e){if(null!=t){const e=t.primary_column,s=t.columns[e];return new u.A({field:e,orientation:"counterclockwise"===s.orientation?"counter-clockwise":null})}const s=e.filter(t=>(0,a.WA)(t)).map(t=>t.name),i=(0,l.i_)(s);return i.latitudeFieldName&&i.longitudeFieldName?new h.A({xField:i.longitudeFieldName,yField:i.latitudeFieldName}):null}(r,p.fields));const f=(0,c.Xj)(s);if(f&&(p.displayOptimization=f),p.geometryEncoding)switch(p.geometryEncoding.type){case"location":null==p.spatialReference&&(p.spatialReference=n.A.WGS84),null==p.geometryType&&(p.geometryType="point");break;case"wkb":{if(!r)return p;const t=r.primary_column,e=r.columns[t];if(p.geometryType||(p.geometryType=function(t){const{geometry_types:e}=t,s=new Set;for(const t of e){const e=_(t);e&&s.add(e)}if(s.size>1)throw new i.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:s});return 1===s.size?s.values().next().value:void 0}(e)),p.spatialReference||(p.spatialReference=function(t){const e=t.crs?.id?.code;return e&&"number"==typeof e?new n.A({wkid:e}):void 0}(e)),p.fields)for(const t of Object.keys(r.columns))p.fields=p.fields.filter(e=>e.name!==t)}}if(p.displayOptimization){const t=p.displayOptimization.index;if(!p.spatialReference&&t.wkid&&(p.spatialReference=new n.A({wkid:t.wkid})),!p.geometryType)switch(t.type){case"z":p.geometryType="point";break;case"xz":p.geometryType=t.geometryType}}return p}function _(t){switch(t){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}},63892(t,e,s){s.d(e,{DV:()=>y,Xj:()=>_,hD:()=>m});var i=s(11254),r=s(49186),n=s(44208),o=s(563),a=s(84952),h=s(39412);const u="parquet.v1",l=new o.QueueProcessor({concurrency:12,process:async t=>{const{data:e}=await(0,i.A)(t.url,t.options);return e}}),c=t=>async function(e,s,i,r){const o=t?.(),a={url:e,options:{responseType:"array-buffer",query:o??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${s}-${i}`}}};if(!(0,n.A)("parquetlayer-cache-enabled"))return l.push(a);const h=new URL(e);h.searchParams.append("range",`${s}-${i}`);try{const t=await caches.open(`${u}:${e}`),s=await t.match(h);if(s)return await s.arrayBuffer();const i=await l.push(a);return await t.put(h,new Response(i,{headers:{"Content-Type":"application/octet-stream","Content-Length":i.byteLength.toString()}})),i}catch(t){return l.push(a)}},p=t=>async function(e){if((0,a.w8)(e)){const{data:t}=await(0,i.A)(e,{responseType:"blob"});return t.size}const{data:s}=await(0,i.A)(e,{responseType:"native",method:"head",query:t?.()}),r=s.headers.get("Content-Length");if(null==r)throw new Error("Unable to parse content length");const o=parseInt(r,10);if(!(0,n.A)("parquetlayer-cache-enabled"))return o;try{const t=`${u}:${e}`,i=new URL(e);i.searchParams.append("metadata","true");let r=await caches.open(t);const n=s.headers.get("etag")??s.headers.get("Last-Modified");if(null==n)return await caches.delete(t),o;const a=await r.match(i),h=await(a?.json());h?.tag!==n&&(await caches.delete(t),r=await caches.open(t));const l=JSON.stringify({tag:n});await r.put(i,new Response(l,{headers:{"Content-Type":"application/json","Content-Length":l.length.toString()}}))}catch(t){}return o};function d(t,e){switch(e){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 r.A("parquet",`Found unexpected GeometryType: ${e}`)}}function f(t,e){const s=t.GeometryInfo.new();e.geometry&&s.setGeometry(function(t,e){const s=e.encoding,i=d(t,e.geometryType),r=e.spatialReference.wkid;if(null==r)throw new Error("InternalError: Wkid must be defined.");switch(s.type){case"wkb":return t.GeometryField.fromWkb(s.field,r,i);case"location":{const{yField:e,xField:n}=s;return t.GeometryField.fromLocation(e,n,r,i)}}}(t,e.geometry));const i=e.displayOptimization;if(i){const{index:e,parentColumn:r}=i,n=t=>null!=r?[r,t].join("."):t;if("z"===e.type){const i=t.DisplayOptimizationZBuilder.new();i.setCodeField(n(e.code)),i.setXColumn(n(e.xColumn)),i.setYColumn(n(e.yColumn)),i.setCooordinatePrecision(e.coordinatePrecision),i.setFullExtent(e.fullExtent),i.setSpatialReference(e.wkid,e.wkt),i.setHasZ(!!e.zColumn),i.setHasM(!!e.mColumn),s.setOptmizationZ(i)}if("xz"===e.type){const i=d(t,e.geometryType),r=t.DisplayOptimizationXZBuilder.new();r.setCodeField(n(e.code)),r.setEncoding(e.encoding),r.setFullExtent(e.fullExtent),r.setGeometryType(i),r.setSpatialReference(e.wkid,e.wkt),r.setMaxLevel(e.maxLevel),r.setHasZ(e.hasZ??!1),r.setHasM(e.hasM??!1);for(const s of e.levels??[]){const[e,i]=s.transform.translate,[o,a]=s.transform.scale,h=new Float64Array([e,i]),u=new Float64Array([o,a]),l=n(s.column);r.addLevel(t.MultiscaleGeometryField.new(s.level,s.scale,l,h,u))}s.setOptmizationXZ(r)}}return s}async function y(t,e={}){const s=await(0,h.N)(),i=c(e.getCustomParameters),n=p(e.getCustomParameters),o=e.geometryInfo?f(s,e.geometryInfo):null;try{return await s.ParquetFile.fromUrl(t,i,n,o)}catch(t){throw new r.A("parquet","Failed to parse file",{error:t})}}function m(t){const e=t.keyValueMetadata("geo");return null!=e?JSON.parse(e):null}function _(t){if(t.keyValueMetadata("esri"))throw new r.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const e=t.keyValueMetadata("geodisplay");if(null!=e)return JSON.parse(e);const s=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=s){const t=JSON.parse(s);for(const e of t.fields)if(null!=e.metadata&&"type"in e.metadata&&("xz"===e.metadata.type||"z"===e.metadata.type)){const t={parentColumn:e.name,index:e.metadata};if("xz"===t.index.type&&(t.index.geometryType=t.index.geometryType.toLowerCase(),"esri-pbf"===t.index.encoding&&(t.index.encoding="esriPBF"),"esriPBF"!==t.index.encoding))throw new r.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${t.index.encoding}`);return t}}return null}},93470(t,e,s){s.d(e,{Cb:()=>n,HW:()=>l,JR:()=>r,JZ:()=>h,WR:()=>a,b6:()=>c,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],r=[153,153,153,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},h={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},l={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|