@arcgis/core 5.0.0-next.73 → 5.0.0-next.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/WebDocument2D.d.ts +5 -30
  2. package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0b666327e8090a6e6f6a.js +1 -0
  5. package/assets/esri/core/workers/chunks/16a7edb381621085a631.js +1 -0
  6. package/assets/esri/core/workers/chunks/{e246b256347a281c13fd.js → 22288b62da20a7a78a4f.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{7e37a3005f2ad2c0a918.js → 23cf4cbc389d2b50e968.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{935a6dccb88557f98189.js → 2a2f33df530b61e3a43f.js} +7 -5
  9. package/assets/esri/core/workers/chunks/4750f55a289bc0cf3d77.js +1 -0
  10. package/assets/esri/core/workers/chunks/a5181292b309b8249bd8.js +1 -0
  11. package/assets/esri/core/workers/chunks/ae733ee050f27f7d8924.js +1 -0
  12. package/assets/esri/core/workers/chunks/{64985e9b6e2edb3ceb37.js → b498db9715a722c52995.js} +45 -58
  13. package/assets/esri/core/workers/chunks/befeca51530bba5e8073.js +1 -0
  14. package/assets/esri/core/workers/chunks/cd788ed111e1e35cf9c8.js +1 -0
  15. package/assets/esri/core/workers/chunks/f35021214e534d5e0446.js +1 -0
  16. package/assets/esri/themes/base/widgets/_FeatureTable.scss +99 -22
  17. package/assets/esri/themes/dark/main.css +1 -1
  18. package/assets/esri/themes/light/main.css +1 -1
  19. package/assets/esri/themes/light/view.css +1 -1
  20. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  21. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  22. package/chunks/ComponentShader.glsl.js +1 -1
  23. package/chunks/GlowBlur.glsl.js +2 -3
  24. package/chunks/HUDMaterial.glsl.js +43 -56
  25. package/config.d.ts +6 -8
  26. package/config.js +1 -1
  27. package/core/Collection.d.ts +27 -1
  28. package/core/types.d.ts +0 -23
  29. package/geometry/support/MeshTexture.d.ts +0 -2
  30. package/geometry/support/MeshVertexAttributes.d.ts +0 -2
  31. package/identity/IdentityManagerBase.d.ts +3 -6
  32. package/interfaces.d.ts +3 -3
  33. package/kernel.js +1 -1
  34. package/layers/BaseDynamicLayer.d.ts +1 -4
  35. package/layers/BaseElevationLayer.d.ts +3 -6
  36. package/layers/BuildingSceneLayer.d.ts +1 -4
  37. package/layers/CSVLayer.d.ts +1 -4
  38. package/layers/CatalogLayer.d.ts +1 -4
  39. package/layers/DimensionLayer.d.ts +1 -4
  40. package/layers/ElevationLayer.d.ts +3 -6
  41. package/layers/FeatureLayer.d.ts +1 -4
  42. package/layers/GaussianSplatLayer.d.ts +0 -1
  43. package/layers/GeoJSONLayer.d.ts +1 -4
  44. package/layers/GeoRSSLayer.d.ts +1 -4
  45. package/layers/GraphicsLayer.d.ts +1 -4
  46. package/layers/GroupLayer.d.ts +1 -4
  47. package/layers/ImageryLayer.d.ts +1 -4
  48. package/layers/ImageryTileLayer.d.ts +1 -4
  49. package/layers/IntegratedMesh3DTilesLayer.d.ts +1 -4
  50. package/layers/IntegratedMeshLayer.d.ts +1 -4
  51. package/layers/KMLLayer.d.ts +1 -4
  52. package/layers/Layer.d.ts +2 -6
  53. package/layers/LineOfSightLayer.d.ts +1 -4
  54. package/layers/MapImageLayer.d.ts +1 -4
  55. package/layers/MapNotesLayer.d.ts +1 -4
  56. package/layers/MediaLayer.d.ts +1 -4
  57. package/layers/OGCFeatureLayer.d.ts +1 -4
  58. package/layers/OrientedImageryLayer.d.ts +1 -4
  59. package/layers/ParquetLayer.d.ts +1 -4
  60. package/layers/PointCloudLayer.d.ts +1 -4
  61. package/layers/RouteLayer.d.ts +2 -5
  62. package/layers/SceneLayer.d.ts +1 -4
  63. package/layers/SubtypeGroupLayer.d.ts +1 -12
  64. package/layers/TileLayer.d.ts +1 -4
  65. package/layers/UnknownLayer.d.ts +1 -4
  66. package/layers/UnsupportedLayer.d.ts +1 -4
  67. package/layers/VectorTileLayer.d.ts +1 -4
  68. package/layers/VideoLayer.d.ts +1 -4
  69. package/layers/ViewshedLayer.d.ts +1 -4
  70. package/layers/VoxelLayer.d.ts +1 -4
  71. package/layers/WCSLayer.d.ts +1 -4
  72. package/layers/WFSLayer.d.ts +1 -4
  73. package/layers/WMSLayer.d.ts +1 -4
  74. package/layers/WMTSLayer.d.ts +1 -4
  75. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +1 -4
  76. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -4
  77. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -6
  78. package/layers/mixins/EditBusLayer.d.ts +0 -1
  79. package/layers/support/FeatureFilter.d.ts +0 -1
  80. package/layers/support/MosaicRule.d.ts +0 -4
  81. package/layers/support/types.d.ts +2 -2
  82. package/layers/types.d.ts +19 -6
  83. package/package.json +1 -1
  84. package/portal/PortalUser.d.ts +1 -1
  85. package/renderers/support/RendererLegendOptions.d.ts +0 -1
  86. package/request/types.d.ts +0 -1
  87. package/rest/support/NormalizationBinParametersMixin.d.ts +18 -20
  88. package/rest/support/PrintTemplate.d.ts +0 -1
  89. package/rest/support/RelationshipQuery.d.ts +1 -10
  90. package/rest/support/types.d.ts +29 -3
  91. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  92. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  93. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  94. package/smartMapping/heuristics/types.d.ts +0 -2
  95. package/smartMapping/labels/bins.d.ts +1 -1
  96. package/smartMapping/labels/clusters.d.ts +1 -1
  97. package/smartMapping/popup/clusters.d.ts +1 -1
  98. package/smartMapping/popup/templates.d.ts +1 -1
  99. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
  100. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  101. package/smartMapping/raster/renderers/flow.d.ts +0 -1
  102. package/smartMapping/raster/renderers/rgb.d.ts +1 -1
  103. package/smartMapping/raster/renderers/shadedRelief.d.ts +0 -1
  104. package/smartMapping/raster/renderers/stretch.d.ts +1 -1
  105. package/smartMapping/raster/renderers/uniqueValue.d.ts +0 -1
  106. package/smartMapping/raster/renderers/vectorField.d.ts +0 -1
  107. package/smartMapping/raster/support/utils.d.ts +0 -2
  108. package/smartMapping/renderers/color.d.ts +6 -6
  109. package/smartMapping/renderers/dotDensity.d.ts +0 -1
  110. package/smartMapping/renderers/heatmap.d.ts +1 -1
  111. package/smartMapping/renderers/location.d.ts +0 -1
  112. package/smartMapping/renderers/opacity.d.ts +1 -1
  113. package/smartMapping/renderers/pieChart.d.ts +0 -2
  114. package/smartMapping/renderers/predominance.d.ts +0 -1
  115. package/smartMapping/renderers/relationship.d.ts +0 -1
  116. package/smartMapping/renderers/size.d.ts +4 -6
  117. package/smartMapping/renderers/type.d.ts +9 -5
  118. package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
  119. package/smartMapping/statistics/classBreaks.d.ts +1 -1
  120. package/smartMapping/statistics/heatmapStatistics.d.ts +1 -1
  121. package/smartMapping/statistics/histogram.d.ts +1 -1
  122. package/smartMapping/statistics/predominantCategories.d.ts +1 -1
  123. package/smartMapping/statistics/summaryStatistics.d.ts +1 -1
  124. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  125. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  126. package/smartMapping/statistics/types.d.ts +26 -8
  127. package/smartMapping/statistics/uniqueValues.d.ts +1 -1
  128. package/smartMapping/symbology/color.d.ts +4 -4
  129. package/smartMapping/symbology/dotDensity.d.ts +3 -3
  130. package/smartMapping/symbology/flow.d.ts +3 -3
  131. package/smartMapping/symbology/heatmap.d.ts +3 -3
  132. package/smartMapping/symbology/location.d.ts +1 -1
  133. package/smartMapping/symbology/pieChart.d.ts +3 -3
  134. package/smartMapping/symbology/predominance.d.ts +3 -3
  135. package/smartMapping/symbology/relationship.d.ts +3 -3
  136. package/smartMapping/symbology/size.d.ts +1 -1
  137. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  138. package/smartMapping/symbology/type.d.ts +3 -3
  139. package/support/revision.js +1 -1
  140. package/symbols/cim/types.d.ts +0 -12
  141. package/symbols/support/symbolUtils.d.ts +1 -1
  142. package/views/2d/MapViewConstraints.d.ts +2 -10
  143. package/views/2d/engine/brushes.js +1 -1
  144. package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
  145. package/views/2d/engine/vectorTiles/MemoryBuffer.js +1 -1
  146. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  147. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  148. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  149. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  150. package/views/2d/engine/vectorTiles/VertexMemoryBuffer.js +1 -1
  151. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  152. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  153. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  154. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  155. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  156. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  157. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  158. package/views/2d/engine/webgl/Painter.js +1 -1
  159. package/views/2d/engine/webgl/RenderingDevice.js +5 -0
  160. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  161. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  162. package/views/2d/engine/webgl/number.js +1 -1
  163. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  164. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +5 -0
  165. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +5 -0
  166. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +5 -0
  167. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +5 -0
  168. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +5 -0
  169. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +5 -0
  170. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +5 -0
  171. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +5 -0
  172. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +5 -0
  173. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +5 -0
  174. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +5 -0
  175. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +5 -0
  176. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js +5 -0
  177. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  178. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  179. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  180. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  181. package/views/3d/layers/i3s/meshUtils.js +1 -1
  182. package/views/3d/state/NearFarHeuristic.js +1 -1
  183. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  184. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
  185. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  186. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  187. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -4
  188. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -14
  189. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  190. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  191. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  192. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  193. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  194. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  195. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +23 -20
  196. package/views/BreakpointsOwner.d.ts +2 -2
  197. package/views/LinkChartView.d.ts +0 -2
  198. package/views/View2D.d.ts +3 -15
  199. package/views/input/types.d.ts +2 -13
  200. package/views/layers/BuildingComponentSublayerView.d.ts +0 -1
  201. package/views/types.d.ts +2 -9
  202. package/views/webgl/VertexArrayObject.js +1 -1
  203. package/webdoc/ips/SmoothingProperties.d.ts +1 -1
  204. package/webdoc/ips/SmoothingProperties.js +1 -1
  205. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +10 -10
  206. package/widgets/BasemapLayerList/types.d.ts +6 -1
  207. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +0 -9
  208. package/widgets/Bookmarks/types.d.ts +0 -4
  209. package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +2 -2
  210. package/widgets/CatalogLayerList/types.d.ts +5 -1
  211. package/widgets/Editor/VisibleElements.d.ts +0 -11
  212. package/widgets/ElevationProfile/types.d.ts +1 -1
  213. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  214. package/widgets/FeatureTable/FieldColumn.d.ts +0 -1
  215. package/widgets/FeatureTable/VisibleElements.d.ts +2 -16
  216. package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +5 -3
  217. package/widgets/FeatureTable/support/AttachmentsViewOptions.js +1 -1
  218. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  219. package/widgets/FeatureTable.js +1 -1
  220. package/widgets/Features/FeaturesViewModel.d.ts +3 -27
  221. package/widgets/Features/FeaturesVisibleElements.d.ts +4 -4
  222. package/widgets/LayerList/LayerListViewModel.d.ts +20 -5
  223. package/widgets/LayerList/LayerListVisibleElements.d.ts +10 -12
  224. package/widgets/LayerList/ListItem.d.ts +33 -0
  225. package/widgets/LayerList/ListItemPanel.d.ts +8 -2
  226. package/widgets/LayerList/types.d.ts +58 -15
  227. package/widgets/Popup/PopupVisibleElements.d.ts +6 -6
  228. package/widgets/Popup/types.d.ts +1 -1
  229. package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +1 -1
  230. package/widgets/Sketch/CreateToolVisibilityMap.d.ts +0 -4
  231. package/widgets/Sketch/VisibleElements.d.ts +0 -2
  232. package/widgets/Sketch/types.d.ts +1 -1
  233. package/widgets/TableList/ListItemPanel.d.ts +8 -0
  234. package/widgets/TableList/TableListViewModel.d.ts +9 -14
  235. package/widgets/TableList/TableListVisibleElements.d.ts +9 -11
  236. package/widgets/TableList/types.d.ts +13 -7
  237. package/widgets/support/SnappingControls/VisibleElements.d.ts +0 -4
  238. package/widgets/types.d.ts +1 -9
  239. package/assets/esri/core/workers/chunks/1d8fc0239c907ff5d1e8.js +0 -1
  240. package/assets/esri/core/workers/chunks/562cddaf63985e53ee6e.js +0 -1
  241. package/assets/esri/core/workers/chunks/b899b4e7979c13b99526.js +0 -1
  242. package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +0 -1
  243. package/assets/esri/core/workers/chunks/df2ba5f9d57080fca183.js +0 -1
  244. package/assets/esri/core/workers/chunks/ee175fd4ec706f7878c0.js +0 -1
  245. package/assets/esri/core/workers/chunks/fc00d7278b43df813c54.js +0 -1
  246. package/layers/mixins/ScaleRange.d.ts +0 -16
  247. package/views/2d/engine/vectorTiles/shaders/Programs.js +0 -5
  248. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +0 -5
  249. package/views/2d/engine/vectorTiles/shaders/sources/resolver.js +0 -5
  250. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +0 -5
  251. package/views/2d/engine/vtlBrushes.js +0 -5
  252. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +0 -5
  253. package/views/2d/engine/webgl/brushes/WGLBrushVTLCircle.js +0 -5
  254. package/views/2d/engine/webgl/brushes/WGLBrushVTLFill.js +0 -5
  255. package/views/2d/engine/webgl/brushes/WGLBrushVTLLine.js +0 -5
  256. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +0 -5
  257. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +0 -5
  258. package/widgets/FeatureTable/support/FeatureStore.d.ts +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4680],{563:(e,t,r)=>{r.d(t,{QueueProcessor:()=>u,SharedConcurrency:()=>d});var s=r(97768),i=r(74887),n=r(9775),o=r(32587),a=r(76030),h=r(44794);class u{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,h.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??c,this._queue=new n.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,r)=>e(r))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const r=this._get(e);if(r)return r;const s=new AbortController,n=(0,i.Tw)(),o=t?(0,i.u7)(t,()=>s.abort()):null,a=(0,i.NY)(s.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),h(),n.reject((0,i.NK)())}),h=()=>{a.remove(),o?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,n),this._controllers.set(e,s),n.promise.then(h,h),this._queue.push(e),this._scheduleNext(),n.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,a._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const r=new AbortController,s=new l(e,r);this._processingItems.set(e,s),this.sharedConcurrency.current.value+=1;try{t=this.process(e,r.signal)}catch(e){this._processError(s,e)}(0,i.$X)(t)?(s.promise=t,t.then(e=>this._processResult(s,e),e=>this._processError(s,e))):this._processResult(s,t)}}class l{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class d{constructor(e){this.limit=e,this.current=(0,h.v)(0)}get full(){return this.current.value>=this.limit}}const c=new d(1/0)},2272:(e,t,r)=>{r.d(t,{Dl:()=>u,gf:()=>d,jV:()=>h,lF:()=>l});var s=r(92602),i=r(70333),n=r(4718),o=r(84952),a=r(926);function h(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function l(e,t,r){const s={};for(const i in e){if("declaredClass"===i)continue;const n=e[i];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))s[i]=n.map(e=>l(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r?.[i]);s[i]=t?e:JSON.stringify(e)}else s[i]=t?n:JSON.stringify(n);else s[i]=n}return s}async function d(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??i.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!i.id&&s.A.request.useIdentity&&await Promise.all([r.e(7330),r.e(168),r.e(148)]).then(r.bind(r,50148));const h=await i.id.getCredential(e,n);return h?.token}},5162:(e,t,r)=>{r.d(t,{HJ:()=>o,Im:()=>l,KN:()=>h});var s=r(39516),i=r(70300),n=r(8446);class o{static async create(e){const{metadata:t,definitionExpression:r}=e,i=r?await(0,s.GP)(r,t.fieldsIndex):null;return new o(t,i,r)}constructor(e,t,r){this.metadata=e,this._clause=t,this._definitionExpression=r}get hash(){return this._definitionExpression}testFeature(e){return null==this._clause||this._clause.testFeature(e)}}class a{constructor(){this.modified=new Map,this.removed=new Set}modify(e){this.modified.set(e.objectId,e),this.removed.has(e.objectId)&&this.removed.delete(e.objectId)}remove(e){this.modified.delete(e),this.removed.add(e)}get isEmpty(){return 0===this.modified.size&&0===this.removed.size}applyWhereClause(e){const t=new a;for(const[r,s]of this.modified)e.testFeature(s)?t.modified.set(r,s):t.removed.add(s.objectId);for(const e of this.removed)t.removed.add(e);return t}}class h extends i.K{constructor(e){super(),this._reader=e,this.chunkId="override",this.normalizedChunkId="override"}static fromFeatures(e,t){const r=n.K.fromOptimizedFeatures(e,t);return new h(r)}get reader(){return this._reader}get queryInfo(){return{}}get first(){return!1}get end(){return!1}get isTiled(){return!1}getTileReader(e){if(!this._reader.getSize())return null;const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}class u{constructor(e,t){this.inner=e,this.isWeak=t,this.lastWeak=null}get isStrong(){return!this.isWeak}}class l{constructor(e){this._parameters=e,this._overrides=new Map,this._update=new a,this._lastCleanup=0}update(e){this._parameters=e}hasOverride(e){return this._overrides.has(e)}onChunkInsert(e){if(this._overrides.size){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId(),r=this._overrides.get(e);if(r?.lastWeak&&(r.lastWeak=null),r?.isWeak){const e=t.readOptimizedFeatureWorldSpace(),s=r.inner?.attributes??{};e.attributes={...s,...e.attributes},r.inner=e,this._update.modify(e),this.invalidate()}}}e.registerOverrides(this)}apply(e,t){const{updateWeak:r,removeWeak:s,update:i,remove:n,release:o}=e.commands;this.invalidate();for(const e of r){const t=new u(e,!0),r=this._overrides.get(e.objectId);r?.isStrong?r.lastWeak=t:(this._overrides.set(e.objectId,t),this._update.modify(e))}for(const e of i){const t=new u(e,!1),r=this._overrides.get(e.objectId);t.lastWeak=r?.isWeak?r:r?.lastWeak??null,this._overrides.set(e.objectId,t),this._update.modify(e)}for(const e of s){const t=new u(null,!0),r=this._overrides.get(e);r?.isStrong?r.lastWeak=t:(this._overrides.set(e,t),this._update.remove(e))}for(const e of n){const t=new u(null,!1),r=this._overrides.get(e);t.lastWeak=r?.isWeak?r:r?.lastWeak??null,this._overrides.set(e,t),this._update.remove(e)}if(o.length){const e=new Set;for(const t of o){const r=this._overrides.get(t);r?.lastWeak?(this._overrides.set(t,r.lastWeak),null==r.lastWeak.inner?this._update.remove(t):this._update.modify(r.lastWeak.inner)):r&&!r.isWeak&&(this._overrides.delete(t),e.add(t))}t.forEachUnsafe(t=>{const r=t.getObjectId();e.has(r)&&(this._update.modify(t.readOptimizedFeatureWorldSpace()),e.delete(r))});for(const t of e.values())this._update.remove(t)}}clearWeakOverrides(){for(const[e,t]of this._overrides.entries())t.isWeak&&this._overrides.delete(e);this.invalidate()}cleanup(e){if(this._overrides.size<1e4)return;const t=performance.now();if(t-this._lastCleanup<1e3)return;this._lastCleanup=t;const r=this._getWeakDeletions();if(!(r.size<1e4)){for(const t of e){const e=t.reader.withoutOverrides().getCursor();for(;e.next();){const t=e.getObjectId();r.delete(t)}}for(const e of r)this._overrides.delete(e);r.size&&this.invalidate()}}takeOverrideUpdate(){const e=this._update;return e.isEmpty?null:(this._update=new a,e.applyWhereClause(this._parameters))}asChunk(){const e=this._parameters;if(this._lastOverrideParametersHash!==e.hash&&(this._lastOverrideParametersHash=e.hash,this._chunk=null),!this._chunk){const t=[];for(const r of this._overrides.values())null!=r.inner&&e.testFeature(r.inner)&&t.push(r.inner);this._chunk=h.fromFeatures(t,e.metadata)}return this._chunk}invalidate(){this._chunk=null}putWeakObjectIdsFromGlobalIds(e,t,r){for(const[s,i]of this._overrides.entries()){if(i.isWeak&&null!=i.inner){const n=i.inner.attributes[r];n&&t.has(n)&&!e.has(n)&&e.set(n,s);continue}if(null!=i.lastWeak&&null!=i.lastWeak.inner){const n=i.lastWeak.inner.attributes[r];n&&t.has(n)&&!e.has(n)&&e.set(n,s)}}}_getWeakDeletions(){const e=new Set;for(const[t,r]of this._overrides.entries())r.isWeak&&null==r.inner&&e.add(t);return e}}},8446:(e,t,r)=>{r.d(t,{K:()=>a});var s=r(90708),i=r(43334),n=r(95466),o=r(99996);class a extends o.Y{static fromFeatures(e,t){const{geometryType:r}=t,i=(0,s.Di)([],e,r,!1,!1,t.featureIdInfo);for(let t=0;t<i.length;t++)i[t].displayId=e[t].displayId;return a.fromOptimizedFeatures(i,t)}static fromFeatureSet(e,t){const r=(0,s.q3)(e,t.featureIdInfo);return a.fromOptimizedFeatureSet(r,t)}static fromOptimizedFeatureSet(e,t){const r=a.fromOptimizedFeatures(e.features,t);return r._exceededTransferLimit=e.exceededTransferLimit,r._transform=e.transform,r._fieldsIndex=new n.A(e.fields),r}static fromOptimizedFeatures(e,t,r){const s=new a(e,t);return s._fieldsIndex=t.fieldsIndex,s._transform=r,s}static empty(e){return new a([],e)}constructor(e,t){super(t),this._exceededTransferLimit=!1,this._featureIndex=-1,this._fieldsIndex=null,this._geometryType=t.geometryType,this._features=e}get fields(){return this._fieldsIndex}get geometryType(){return this._geometryType}get hasFeatures(){return!!this._features.length}get hasNext(){return this._featureIndex+1<this._features.length}get exceededTransferLimit(){return this._exceededTransferLimit}get hasZ(){return!1}get hasM(){return!1}get _current(){return this._features[this._featureIndex]}get usedMemory(){return this._current.usedMemory}getSize(){return this._features.length}getCursor(){return this.copy()}getInTransform(){return this._transform}getAttributeHash(){let e="";for(const t in this._current.attributes)e+=this._current.attributes[t];return e}getIndex(){return this._featureIndex}setIndex(e){this._featureIndex=e}getObjectId(){return this._current?.objectId}getDisplayId(){return this._current.displayId}setDisplayId(e){this._current.displayId=e}copy(){const e=new a(this._features,this.metadata);return this.copyInto(e),e}next(){for(;++this._featureIndex<this._features.length&&!this._getExists(););return this._featureIndex<this._features.length}readGeometryArea(){return(0,i.N3)(this._current)?(0,s.Rk)(this._current.geometry,2):0}_readX(){return(0,i.N3)(this._current)?this._current.geometry.coords[0]:0}_readY(){return(0,i.N3)(this._current)?this._current.geometry.coords[1]:0}_readGeometry(){return(0,i.N3)(this._current)?this._current.geometry??null:null}_readServerCentroid(){return this._current.centroid}_readAttribute(e,t){if(!this._fieldsIndex){const t=this._current.attributes[e];if(void 0!==t)return t;const r=e.toLowerCase();for(const e in this._current.attributes)if(e.toLowerCase()===r)return this._current.attributes[e];return}const r=this._fieldsIndex.get(e);if(!r)return;const s=this._current.attributes[r.name];return null==s?s:t&&this.fields.isDateField(e)?new Date(s):s}_readAttributes(){return this._current.attributes}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._transform=this._transform,e._fieldsIndex=this._fieldsIndex}}},8631:(e,t,r)=>{r.d(t,{r:()=>c,g:()=>d});var s,i=r(53177),n=r(76357),o=r(31635),a=r(91429),h=r(93223);let u=class extends n.A{static{s=this}constructor(e){super(e),this.type="inherited"}clone(){return new s}};(0,o.Cg)([(0,h.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=s=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var l=r(41628);const d={key:"type",base:n.A,typeMap:{range:l.A,"coded-value":i.A,inherited:u}};function c(e){if(!e?.type)return null;switch(e.type){case"range":return l.A.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},9012:(e,t,r)=>{function s(e,{timeZone:t,timeExtent:r}){return{$view:{scale:e,timeZone:t,timeProperties:{currentStart:r?.start,currentEnd:r?.end}}}}r.d(t,{N:()=>s})},9775:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach(t=>{e(t)||this._items.delete(t)}),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},16630:(e,t,r)=>{r.d(t,{s:()=>u}),r(44208);var s=r(69397),i=r(92722),n=r(57733),o=r(99996);let a;const h=new TextDecoder;class u extends o.Y{constructor(e,t,r,i,n=new Uint32Array(r.size())){super(e),this._fields=t,this._inner=r,this._fileIndex=i,this._displayIds=n,this._index=-1,this.usedMemory=s.qK,this._size=this._inner.size(),e.featureIdInfo.type}destroy(){super.destroy(),this._inner.free()}get fields(){return this._fields}get geometryType(){return this.metadata.geometryType}get hasFeatures(){return!0}get hasNext(){throw new Error("Method not implemented.")}get exceededTransferLimit(){return!1}get hasZ(){return!1}get hasM(){return!1}getInTransform(){return null}getSize(){return this._size}getCursor(){return this.copy()}getAttributeHash(){let e="";for(const t of this.fields.fields)e+=this._readAttribute(t.name,!1)+".";return e}getObjectId(){return this._fileIndex<<24|this._inner.rowId(this._index)}getDisplayId(){return this._displayIds[this._index]}setDisplayId(e){this._displayIds[this._index]=e}setIndex(e){this._index=e}getBoundsXMin(){return this._inner.boundsXMin(this._index)}getBoundsYMin(){return this._inner.boundsYMin(this._index)}getBoundsXMax(){return this._inner.boundsXMax(this._index)}getBoundsYMax(){return this._inner.boundsYMax(this._index)}setBoundsXMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsXMax(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMax(e){throw new Error("InternalError: Setting bounds is unsupported")}getIndex(){return this._index}next(){for(;++this._index<this._size&&!this._getExists(););return this._index<this._size}readGeometryArea(){return this.readGeometryForDisplay()?.area()??0}copy(){const e=new u(this.metadata,this._fields,this._inner,this._fileIndex,this._displayIds);return this.copyInto(e),e}copyInto(e){super.copyInto(e),e._index=this._index}readGeometryForDisplayTransformed(e){const[t,r]=e.translate,[s,o]=e.scale;return a||(a=n.QuantizedGeometryBuffer.new()),this._inner.transformGeometry(a,t,r,s,o,this._index)?new i.A(a.readLengthsUnsafe(),a.readCoordsUnsafe(),this.hasZ,this.hasM):null}_readGeometry(e){const t=this._inner.readCoordsUnsafe(this._index),r=this._inner.readLengthsUnsafe(this._index);return t&&r?new i.A(r,t,this.hasZ,this.hasM):null}_readX(){return this._inner.readX(this._index)}_readY(){return this._inner.readY(this._index)}_readServerCentroid(){return null}_readAttribute(e,t){const r=this.fields.get(e);if(!r)return;if(null==r.column)return this.getObjectId();const s=this._inner.readAttribute(this._index,r.column);if(null==s)return s;if("esriFieldTypeString"===r.type){const e=this._inner.readAttribute(this._index,r.column);return h.decode(e)}const i=this.fields.isDateField(r.name);return t?null==s?s:i?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._fields.fields)if(null!=t.column&&null!=t.column){const r=this._readAttribute(t.name,!1);void 0!==r&&(e[t.name]=r)}return e.__OBJECTID=this.getObjectId(),e}}},20437:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(31635),n=r(66552),o=r(25482),a=r(91429),h=r(56507),u=r(8631),l=r(98453),d=r(36005),c=r(93223);const p=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let _=class extends o.o{static{s=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?p.fromJSON(r.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],_.prototype,"alias",void 0),(0,i.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],_.prototype,"defaultValue",void 0),(0,i.Cg)([(0,a.MZ)()],_.prototype,"description",void 0),(0,i.Cg)([(0,d.w)("description")],_.prototype,"readDescription",null),(0,i.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],_.prototype,"domain",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"editable",void 0),(0,i.Cg)([(0,a.MZ)({type:h.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],_.prototype,"length",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"nullable",void 0),(0,i.Cg)([(0,c.e)(l.m)],_.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)()],_.prototype,"valueType",void 0),(0,i.Cg)([(0,d.w)("valueType",["description"])],_.prototype,"readValueType",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],_.prototype,"visible",void 0),_=s=(0,i.Cg)([(0,a.$K)("esri.layers.support.Field")],_)},28923:(e,t,r)=>{r.d(t,{j:()=>i});var s=r(70300);class i extends s.K{constructor(e,t,r,s,i=0){super(),this._reader=e,this._queryJSON=t,this._page=r,this._end=s,this.fileIndex=i,this.chunkId=`${this.fileIndex}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader}get first(){return 0===this._page}get end(){return this._end}get queryInfo(){return{type:"snapshot",chunkId:this.chunkId,queryJSON:this._queryJSON,page:this._page,size:this.size(),end:this.end}}get isTiled(){return!1}getTileReader(e){const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}},30661:(e,t,r)=>{r.d(t,{Z:()=>n});var s=r(43334),i=r(8446);class n{static{this.Shared=new n}getObjectId(e){return e.getObjectId()}getAttributes(e){return e.readAttributes()}getAttribute(e,t){return e.readAttribute(t)}getAttributeAsTimestamp(e,t){return e.readAttributeAsTimestamp(t)}cloneWithGeometry(e,t,r){const n=e.readAttributes(),o=new s.Om(t,n,null,e.getObjectId(),e.getDisplayId()),a=i.K.fromOptimizedFeatures([o],e.metadata);return a.setIndex(0),a}getGeometry(e){return e.readGeometryWorldSpace()}getCentroid(e,t){return e.readCentroidForDisplay()}}},32011:(e,t,r)=>{r.d(t,{d:()=>u});var s=r(19419),i=r(537),n=r(12359),o=r(95108),a=r(12176);const h=222045e-19;function u(e){if(0===e.totalSize)return null;const t=(0,i.z8)(e);if(!t)return null;const r=4*(Math.abs(t[0])+Math.abs(t[2])+Math.abs(t[1])+Math.abs(t[3])+1)*h;let o=0,a=0;e.reset();for(let t=0;e.nextPath();t++){const r=e.getCurrentRingArea();r>a&&(a=r,o=t)}if(e.seekPath(o),0===e.pathSize)return null;e.seekPathStart();const u=(0,i.B$)(e);if(Math.abs(a)<=2*r*r)return[(u[0]+u[2])/2,(u[1]+u[3])/2];e.seekPathStart();const p=(0,n.w2)(e,(0,s.vt)());if(null===p)return null;if(e.totalPoints<4)return p;const _=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],m=[NaN,NaN,NaN,NaN];let y=!1,g=d(p,e,!0);0===g.distance&&(y=!0,_[0][0]=p[0],_[0][1]=p[1],g=d(p,e,!1)),f[0]=g.distance,m[0]=0;const x=[NaN,NaN];let w=!1,T=.25,M=-1,S=NaN;do{if(S=NaN,_[1]=c(e,v(u[0],u[2],T),0,t),isNaN(_[1][0])||isNaN(_[1][1])||(g=d(_[1],e,!1),S=g.distance),!isNaN(S)&&S>r&&l(_[1],e))w=!0,f[1]=S,m[1]=b(_[1],p);else if(!isNaN(S)&&S>M&&(M=S,x[0]=_[1][0],x[1]=_[1][1]),T-=.01,T<.1){if(!(M>=0))break;w=!0,f[1]=M,_[1][0]=x[0],_[1][1]=x[1],m[1]=b(_[1],p)}}while(!w);w=!1,T=.5,M=-1;let A=.01,C=1;do{if(S=NaN,_[2]=c(e,v(u[0],u[2],T),0,t),isNaN(_[2][0])||isNaN(_[2][1])||(g=d(_[2],e,!1),S=g.distance),!isNaN(S)&&S>r&&l(_[2],e))w=!0,f[2]=S,m[2]=b(_[2],p);else if(!isNaN(S)&&S>M)M=S,x[0]=_[2][0],x[1]=_[2][1];else if(S>M&&(M=S,x[0]=_[2][0],x[1]=_[2][1]),T=.5+A*C,A+=.01,C*=-1,T<.3||T>.7){if(!(M>=0))break;w=!0,f[2]=M,_[2][0]=x[0],_[2][1]=x[1],m[2]=b(_[2],p)}}while(!w);w=!1,T=.75,M=-1;do{if(S=NaN,_[3]=c(e,v(u[0],u[2],T),0,t),isNaN(_[3][0])||isNaN(_[3][1])||(g=d(_[3],e,!1),S=g.distance),!isNaN(S)&&S>r&&l(_[3],e))w=!0,f[3]=S,m[3]=b(_[3],p);else if(S>M&&(M=S,x[0]=_[3][0],x[1]=_[3][1]),T+=.01,T>.9){if(!(M>=0))break;w=!0,f[3]=M,_[3][0]=x[0],_[3][1]=x[1],m[3]=b(_[3],p)}}while(!w);const F=[0,1,2,3],P=y?0:1;let O;for(let e=P;e<4;e++)for(let e=P;e<3;e++){const t=m[e],r=m[e+1];I(t,r)>0&&(O=F[e],F[e]=F[e+1],F[e+1]=O,m[e]=r,m[e+1]=t)}let N=P,k=0,z=0;for(let e=P;e<4;e++){switch(e){case 0:z=2*f[F[e]];break;case 1:z=1.66666666*f[F[e]];break;case 2:z=1.33333333*f[F[e]];break;case 3:z=f[F[e]]}z>k&&(k=z,N=F[e])}return _[N]}function l(e,t){let r,s,i,n,o=0;for(t.reset();t.nextPath()&&t.nextPoint();)for(r=t.x,s=t.y;t.nextPoint();r=i,s=n)i=t.x,n=t.y,s>e[1]!=n>e[1]&&((i-r)*(e[1]-s)-(n-s)*(e[0]-r)>0?o++:o--);return 0!==o}function d(e,t,r){if(r&&l(e,t))return{coord:e,distance:0};let s=1/0,i=0,n=0,a=[0,0],h=[0,0];const u=[0,0];for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(a[0]=t.x,a[1]=t.y;t.nextPoint();a=h){h=[t.x,t.y],(0,o.gR)(u,e,a,h);const r=b(e,u);r<s&&(s=r,i=u[0],n=u[1])}return{coord:[i,n],distance:Math.sqrt(s)}}function c(e,t,r,i){const n=[t,0];let o=1/0,h=1/0,u=!1,l=!1;const d=[[t,i[1]-1],[t,i[3]+1]],c=[0,0],_=[0,0],f=[0,0],m=[[0,0],[0,0]],y=(0,s.vt)();for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(m[0][0]=e.x,m[0][1]=e.y;e.nextPoint();m[0][0]=m[1][0],m[0][1]=m[1][1]){if(m[1][0]=e.x,m[1][1]=e.y,null===p(y,m))continue;if(_[0]=d[0][0],_[1]=d[0][1],f[0]=d[1][0],f[1]=d[1][1],0===g(y,_,f))continue;if(!(0,a.Ql)(d[0],d[1],m[0],m[1],c))continue;const t=c[1];o>h?t<o&&(o=t,u=!0):t<h&&(h=t,l=!0)}return u&&l?n[1]=(o+h)/2:n[0]=n[1]=NaN,n}function p(e,t){if(t.length<2)return null;e||(e=(0,s.vt)());const[r,i]=t[0],[n,o]=t[1];return e[0]=Math.min(r,n),e[1]=Math.min(i,o),e[2]=Math.max(r,n),e[3]=Math.max(i,o),e}const _=1,f=4,m=3,y=12;function g(e,t,r){let s=x(t,e),i=x(r,e);const n=e[0],o=e[1],a=e[2],h=e[3];if(s&i)return 0;if(!(s|i))return 4;const u=(s?1:0)|(i?2:0);do{const u=r[0]-t[0],l=r[1]-t[1];if(u>l)s&m?(s&_?(t[1]+=l*(n-t[0])/u,t[0]=n):(t[1]+=l*(a-t[0])/u,t[0]=a),s=x(t,e)):i&m?(i&_?(r[1]+=l*(n-r[0])/u,r[0]=n):(r[1]+=l*(a-r[0])/u,r[0]=a),i=x(r,e)):s?(s&f?(t[0]+=u*(o-t[1])/l,t[1]=o):(t[0]+=u*(h-t[1])/l,t[1]=h),s=x(t,e)):(i&f?(r[0]+=u*(o-r[1])/l,r[1]=o):(r[0]+=u*(h-r[1])/l,r[1]=h),i=x(r,e));else if(s&y?(s&f?(t[0]+=u*(o-t[1])/l,t[1]=o):(t[0]+=u*(h-t[1])/l,t[1]=h),s=x(t,e)):i&y?(i&f?(r[0]+=u*(o-r[1])/l,r[1]=o):(r[0]+=u*(h-r[1])/l,r[1]=h),i=x(r,e)):s?(s&_?(t[1]+=l*(n-t[0])/u,t[0]=n):(t[1]+=l*(a-t[0])/u,t[0]=a),s=x(t,e)):(i&_?(r[1]+=l*(n-r[0])/u,r[0]=n):(r[1]+=l*(a-r[0])/u,r[0]=a),i=x(r,e)),s&i)return 0}while(s|i);return u}function x(e,t){return(e[0]<t[0]?1:0)|(e[0]>t[2]?1:0)<<1|(e[1]<t[1]?1:0)<<2|(e[1]>t[3]?1:0)<<3}function v(e,t,r){return e+(t-e)*r}function b(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}function I(e,t){if(e<t)return-1;if(e>t)return 1;if(e===t)return 0;const r=isNaN(e),s=isNaN(t);return r<s?-1:r>s?1:0}},32587:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e){this._observable=new i.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach((r,s)=>e.call(t,r,s,this),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const r of t){if(!this._map.has(r))continue;const t=this._map.get(r),s=e(t,r);s!==t&&this.set(r,s)}})}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},35258:(e,t,r)=>{r.d(t,{i:()=>n});var s=r(16930),i=r(95466);class n{static minimal(e,t,r=[]){return new n({geometryType:e,fieldsIndex:new i.A(r).toJSON(),featureIdInfo:{type:"object-id",fieldName:t},subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null})}static createFeature(e){return new n(e)}constructor(e){let t;this._options=e,this._fieldsIndex=i.A.fromJSON(e.fieldsIndex),e.spatialReference&&(e.spatialReference instanceof s.A?this._spatialReference=e.spatialReference:this._spatialReference=s.A.fromJSON(e.spatialReference)),e.outSpatialReference&&(e.outSpatialReference instanceof s.A?this._outSpatialReference=e.outSpatialReference:this._outSpatialReference=s.A.fromJSON(e.outSpatialReference)),"object-id"===e.featureIdInfo.type&&(t=e.featureIdInfo.fieldName),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:t,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0,datesInUnknownTimezone:this._options.timeReferenceUnknownClient??void 0,dateFieldsTimeZone:this._options.dateFieldsTimeZone??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return"esriGeometryMultiPatch"===this._options.geometryType?"esriGeometryPolygon":this._options.geometryType}get serviceGeometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get featureIdInfo(){return this._options.featureIdInfo}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get outSpatialReference(){return this._outSpatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}weakCloneWithAdditionalFields(e){return new n({fieldsIndex:{fields:[...this._fieldsIndex.fields,...e],timeZoneByFieldName:null},geometryType:this.geometryType,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.spatialReference,outSpatialReference:this.outSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types})}}},36708:(e,t,r)=>{r.d(t,{C_:()=>c,OH:()=>f,Vh:()=>m,on:()=>d,pc:()=>y,wB:()=>h,z7:()=>u});var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function h(e,t,r={}){return l(e,t,r,p)}function u(e,t,r={}){return l(e,t,r,_)}function l(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function d(e,t,r,o={}){let a=null,u=null,l=null;function d(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,n.xt)(l),r(e)}const p=h(e,(e,r)=>{d(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return l=(0,i.hA)(()=>{p.remove(),d()}),l}function c(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function h(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{h(),n((0,o.NK)())}),l(e,e=>{h(),s(e)},{sync:!1,once:!0},t??p)])})}(e,_,t)}function p(e){return!0}function _(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},36745:(e,t,r)=>{r.d(t,{z:()=>a});var s=r(4718),i=r(51118),n=r(60408),o=r(92722);class a{static fromOptimized(e,t,r=1){return(new h).initialize(e,t,r)}static fromJSON(e){const[t,r]=l(e),s=(0,n.Pv)(e),i=(0,n.W0)(e);return(new d).initialize(t,r,s,i,1)}static fromOptimizedCIM(e,t,r=1){return(new c).initialize(e,t,r)}static fromJSONCIM(e,t=1){const[r,s]=l(e),i=(0,n.Pv)(e),o=(0,n.W0)(e);return(new p).initialize(r,s,i,o,t)}static fromFeatureSetReader(e){const t=e.readGeometryForDisplay(),r=e.geometryType;return t&&r?this.fromOptimized(t,r):null}static fromFeatureSetReaderCIM(e){const t=e.readGeometryForDisplay(),r=e.geometryType;return t&&r?this.fromOptimizedCIM(t,r):null}static createEmptyOptimized(e,t=!1,r=!1,s=1){return(new c).initialize(new o.A([],[],t,r),e,s)}static createEmptyJSON(e,t=!1,r=!1){return(new d).initialize([],e,t,r,1)}static createEmptyOptimizedCIM(e,t=!1,r=!1,s=1){return(new c).initialize(new o.A([],[],t,r),e,s)}static createEmptyJSONCIM(e,t=!1,r=!1,s=1){return(new p).initialize([],e,t,r,s)}asJSON(){const e=(0,i.x)(this),{hasZ:t,hasM:r}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:e[0][0][0],ymin:e[0][0][1],xmax:e[0][2][0],ymax:e[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:e.flat(),hasZ:t,hasM:r}:"esriGeometryPoint"===this.geometryType?{x:e[0][0][0],y:e[0][0][1],z:t?e[0][0][2]:void 0,m:r?e[0][0][t?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:e,hasZ:t,hasM:r}:{paths:e,hasZ:t,hasM:r}}getCurrentRingArea(){if(this.pathSize<3)return 0;let e,t,r=0;if(this.seekPathStart(),!this.nextPoint())return 0;e=this.x,t=this.y;const s=e,i=t;for(;this.nextPoint();)r+=(e-this.x)*(t+this.y),e=this.x,t=this.y;return r+=(e-s)*(t+i),-.5*r}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(e,t,r){return this.geometryType=t,this._stride=e.stride,this._geometry=e,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=r,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(e){if(e>=0&&e<this.totalSize){if(this._pathIndex<e)for(;this._pathIndex<e&&this.nextPath(););else if(this._pathIndex>e)for(;this._pathIndex>e&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(e){const t=this._pathOffset+e*this._stride;return t>=0&&t<this._end&&(this._pointOffset=t,!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 e=this._end,t=this._geometry.coords,r=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],t.slice(r,e),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const e=this._end,t=this._stride,r=this._geometry.coords;let s=0;for(let i=this._pathOffset+t;i<e;i+=t){const e=r[i-t],n=r[i-t+1],o=r[i]-e,a=r[i+1]-n;s+=Math.sqrt(o*o+a*a)}return s}startPath(){this._geometry.lengths.push(0)}pushPath(e){this.startPath(),this.pushPoints(e)}pushPoint(e){for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]++}pushXY(e,t){this._geometry.coords.push(e,t),this._geometry.lengths[this.totalSize-1]++}pushPoints(e){for(const t of e)for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]+=e.length}pushCursor(e){const t=e.asOptimized();this._geometry.coords.push(...t.coords),this._geometry.lengths.push(...t.lengths)}asOptimized(){const e=this._geometry.clone();if(1!==this.yFactor)for(let t=1;t<e.coords.length;t+=this._stride)e.coords[t]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(e.lengths.length=0),e}isClosed(){const e=this._geometry.coords,t=this._pathOffset,r=this._end-this._stride;for(let s=0;s<this._stride;s++)if(e[t+s]!==e[r+s])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((e,t)=>e+t)}get pathSize(){const{lengths:e}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>e.length-1?0:e[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(e){this._geometry.coords[this._pointOffset]=e}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(e){this._geometry.coords[this._pointOffset+1]=this.yFactor*e}get z(){return this._geometry.coords[this._pointOffset+2]}set z(e){this._geometry.coords[this._pointOffset+2]=e}get m(){const e=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+e]}set m(e){this._geometry.coords[this._pointOffset+3]=e}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function u(e){const t=[e.x,e.y];return e.z&&t.push(e.z),e.m&&t.push(e.m),t}function l(e){return(0,n.Bi)(e)?[e.rings,"esriGeometryPolygon"]:(0,n.Rg)(e)?[e.paths,"esriGeometryPolyline"]:(0,n.U9)(e)?[[e.points],"esriGeometryMultipoint"]:(0,n.ZC)(e)?[[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(e)?[[[u(e)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class d extends a{initialize(e,t,r,s,i){return this._paths=e,this.geometryType=t,this.hasZ=r,this.hasM=s,this._pathIndex=this._pointIndex=-1,this.yFactor=i,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(e){return this._pathIndex=e,this._pointIndex=-1,e>=0&&e<this.totalSize&&(this._currentPath=this._paths[e],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(e){return e>=0&&e<this._currentPath.length&&(this._pointIndex=e,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 e=this._currentPath.length,t=this._currentPath;let r=0;for(let s=1;s<e;s++){const e=t[s-1],i=t[s],n=e[0],o=e[1],a=i[0]-n,h=i[1]-o;r+=Math.sqrt(a*a+h*h)}return r}startPath(){this._paths.push([])}getCurrentPath(){return(new d).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(e){this._paths.push(e)}pushPoint(e){this._paths[this.totalSize-1].push(e)}pushXY(e,t){this._paths[this.totalSize-1].push([e,t])}pushPoints(e){this._paths[this.totalSize-1].push(...e)}pushCursor(e){const t=(0,i.x)(e);for(const e of t)this.pushPath(e)}asOptimized(){const{hasZ:e,hasM:t}=this,r=new o.A([],[],e,t),{coords:s,lengths:i}=r;if("esriGeometryPoint"===this.geometryType)s.push(...this._paths[0][0]),i.length=0;else for(const r of this._paths){for(const i of r)s.push(i[0]),s.push(i[1]*this.yFactor),e&&s.push(i[2]),t&&s.push(i[this._mIndex]);i.push(r.length)}return r}isClosed(){const e=this._currentPath[0],t=this._currentPath[this._currentPath.length-1];for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}clone(){return(new d).initialize((0,s.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(e=>e.length).reduce((e,t)=>e+t)}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(e){this._currentPoint[0]=e}get y(){return this.yFactor*this._currentPoint[1]}set y(e){this._currentPoint[1]=this.yFactor*e}get z(){return this._currentPoint[2]}set z(e){this._currentPoint[2]=e}get m(){return this._currentPoint[this._mIndex]}set m(e){this._currentPoint[this._mIndex]=e}get pathIndex(){return this._pathIndex}}class c extends h{initialize(e,t,r){return super.initialize(e,t,r),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(e=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const e=(new c).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return e._controlPoints=this._controlPoints,e}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(e){this._controlPoints[this.pathIndex].add(e)}getControlPointAt(e){return this._controlPoints[this.pathIndex].has(e)}}class p extends d{initialize(e,t,r,s,i){return super.initialize(e,t,r,s,i)}clone(){return(new p).initialize((0,s.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(e){this._paths[this.pathIndex][e][4]=1}getControlPointAt(e){return 1===this._paths[this.pathIndex][e][4]}}},38976:(e,t,r)=>{r.d(t,{n:()=>n});var s=r(76213),i=r(9012);class n{constructor(e){this._options=e}insert(e,t){const r=e.getCursor(),{arcadeContextInfo:s,scale:n}=this._options,o=(0,i.N)(n,s);for(;r.next();)this._insertFeature(r,o,this._options.sqlOptions,t)}_insertFeature(e,t,r,i){const{featureFilter:n}=this._options;if(null!==n&&!n.check(e,r))return;let o=0,a=0;if("esriGeometryPoint"===e.geometryType)o=e.readXWorldSpace(),a=e.readYWorldSpace();else{if(i){const t=e.readCentroidForDisplay();if(null==t)return;const[r,i]=t.coords;if(r<0||r>s.CQ||i<0||i>s.CQ)return}const t=e.readCentroidWorldSpace();if(null==t)return;o=t.coords[0],a=t.coords[1]}this._insert(e,o,a,t)}}},39357:(e,t,r)=>{r.d(t,{A:()=>a});var s,i=r(31635),n=r(25482),o=r(91429);let a=s=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=s=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},39412:(e,t,r)=>{r.d(t,{N:()=>n});var s=r(2741);let i=null;async function n(){return i||(i=async function(){const e=await r.e(7733).then(r.bind(r,57733));return await e.default({module_or_path:(0,s.s)("esri/libs/parquet/pkg/bundle_bg.wasm")}),e}()),i}},41628:(e,t,r)=>{r.d(t,{A:()=>h});var s,i=r(31635),n=r(91429),o=r(76357),a=r(93223);let h=class extends o.A{static{s=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new s({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],h.prototype,"maxValue",void 0),(0,i.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],h.prototype,"minValue",void 0),(0,i.Cg)([(0,a.e)({range:"range"})],h.prototype,"type",void 0),h=s=(0,i.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],h)},44320:(e,t,r)=>{r.d(t,{I:()=>h});var s=r(65529),i=r(44208),n=r(70328),o=r(30661),a=r(5162);class h{constructor(){this._chunks=new Map,this._chunksToRemove=[],this.events=new s.bk,this.featureAdapter=new o.Z}destroy(){this.clear()}clear(){for(const e of this._chunks.values())this._chunksToRemove.push(e);this._chunks.clear(),this._overrides?.clearWeakOverrides()}get usedMemory(){let e=0;for(const t of this._chunks.values())e+=t.usedMemory;return e}async update(e){if(this._overrides){const t=await a.HJ.create(e);this._overrides.update(t)}this._schema=e}*chunks(){this._overrides&&(yield this._overrides.asChunk()),yield*this._chunks.values()}insert(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.insert`),this._overrides?.onChunkInsert(e),this._chunks.set(e.chunkId,e),this.events.emit("changed")}remove(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.remove`),this._chunks.delete(e.chunkId),this._chunksToRemove.push(e)}removeById(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e}] SourceChunkStore.remove`);const t=this._chunks.get(e);this._chunks.delete(e),t&&this._chunksToRemove.push(t)}cleanup(){const e=this._chunksToRemove;return this._chunksToRemove=[],this._overrides?.cleanup(this._chunks.values()),e}async applyOverride(e){if(null==this._overrides){const e=await a.HJ.create(this._schema);this._overrides=new a.Im(e);for(const e of this._chunks.values())this._overrides.onChunkInsert(e)}this._overrides.apply(e,this),this.events.emit("changed");for(const e of this._chunks.values())e.invalidate()}takeOverrideUpdate(){return this._overrides?.takeOverrideUpdate()}refresh(){this.events.emit("refresh")}forEach(e){const t=new Set;for(const r of this.chunks()){const s=r.reader.getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s.copy()),t.add(r))}}}forEachUnsafe(e){const t=new Set;for(const r of this.chunks()){const s=r.reader.getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s),t.add(r))}}}mapObjectIdsFromGlobalIds(e,t){const r=new Map,s=new Set(e);return this._overrides?.putWeakObjectIdsFromGlobalIds(r,s,t),this._forEachUnsafeIgnoreOverrides(e=>{const i=e.readAttribute(t);if(i&&s.has(i)&&!r.has(i)){const t=e.getObjectId();r.set(i,t)}}),r}forEachInBounds(e,t){const r=new Set;for(const s of this.chunks()){const i=s.queryFeaturesInBounds(e);for(;i.next();){const e=i.getObjectId();r.has(e)||(t(i.copy()),r.add(e))}}}forEachBounds(e,t){const r=(0,n.vt)();for(const s of e)s.getBounds(r)&&t(r)}_forEachUnsafeIgnoreOverrides(e){const t=new Set;for(const r of this._chunks.values()){const s=r.reader.withoutOverrides().getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s),t.add(r))}}}}},48163:(e,t,r)=>{function s(){return[0,0]}function i(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function o(){return n(1,1)}function a(){return n(1,0)}function h(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,o8:()=>i,vt:()=>s});const u=o(),l=a(),d=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:l,UNIT_Y:d,ZEROS:[0,0],clone:i,create:s,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let s=0;s<r;++s)t[s]=e[s];return t},fromValues:n,ones:o,unitX:a,unitY:h,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48526:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(31635),n=r(4718),o=r(91429),a=r(5443),h=r(91075),u=r(86738),l=r(16930),d=r(90634),c=r(56993),p=r(43937);let _=s=class extends h.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:r,hasZ:s,spatialReference:i}=e;switch(t??=[],t?.at(0)?.length){case 4:s??=!0,r??=!0;break;case 3:s??=!0!==r,r??=!s;break;default:s??=!1,r??=!1}return i??=l.A.WGS84,{...e,hasM:r,hasZ:s,points:t,spatialReference:i}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,d.ge)(this);return e?new a.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,n.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:r,hasZ:i}=this;return new s({points:(0,n.o8)(e),spatialReference:t.clone(),hasM:r,hasZ:i})}addPoint(e){return(0,c.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],r={x:t[0],y:t[1],spatialReference:this.spatialReference};let s=2;return this.hasZ&&(r.z=t[2],s=3),this.hasM&&(r.m=t[s]),new u.A(r)}removePoint(e){if(!this._validateInputs(e))return null;const t=new u.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,c.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],_.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],_.prototype,"extent",null),(0,i.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],_.prototype,"points",void 0),(0,i.Cg)([(0,p.K)("points")],_.prototype,"writePoints",null),_=s=(0,i.Cg)([(0,o.$K)("esri.geometry.Multipoint")],_),_.prototype.toJSON.isDefaultToJSON=!0},50115:(e,t,r)=>{r.d(t,{OP:()=>o,V4:()=>i,rZ:()=>n}),r(44208);var s=r(53966);function i(e,t,r){if(null==e)return null;const i=t.readArcadeFeature();t.contextTimeZone=r.$view?.timeZone;try{return e.evaluate(i,r)}catch(e){return s.A.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",e),null}}function n(e){return null==e||e===1/0||e===-1/0||"number"==typeof e&&isNaN(e)}function o(e,t,r,s){if(null==e)return null!=s?s:null;const i=t.readArcadeFeature();t.contextTimeZone=r.$view?.timeZone;const o=e.evaluate(i,r);return n(o)?null!=s?s:null:o}},52350:(e,t,r)=>{r.d(t,{e:()=>a});var s=r(69397),i=r(62577),n=r(90708),o=r(99996);class a extends o.Y{static from(e,t){if(e instanceof this){const r=new Set(t),s=e._indices.filter(e=>r.has(e));return new a(e._reader,s)}return new a(e.copy(),t)}constructor(e,t){super(e.metadata),this._currentIndex=-1,this._displayTransform=null,this._reader=e,this._indices=t}setTransformForDisplay(e){const t=this._reader.getInTransform();if(null==t)return void(this._displayTransform=(0,i.Q1)(e));const r=(0,i.Q1)(t),s=(0,i.Q1)(e),[n,o]=r.scale,[a,h]=r.translate,[u,l]=s.scale,[d,c]=s.translate,p=n/u,_=o/l,f=(a-d)/u,m=(h-c)/l;this._displayTransform={originPosition:"lowerLeft",scale:[1/p,1/_,1,1],translate:[-f/p,-m/_,0,0]}}getInTransform(){return this._reader.getInTransform()}get fields(){return this._reader.fields}get hasNext(){return this._currentIndex+1<this._indices.length}getSize(){return this._indices.length}getCursor(){return this.copy()}copy(){const e=new a(this._reader.copy(),this._indices);return e._currentIndex=this._currentIndex,e._displayTransform=this._displayTransform,e._processorAttributes=this._processorAttributes,e}get contextTimeZone(){return this._reader.contextTimeZone}set contextTimeZone(e){this._reader.contextTimeZone=e}get usedMemory(){return s.qK+this._reader.usedMemory}setProcessorAttributes(e){this._processorAttributes=Object.assign(this._processorAttributes??{},e)}_nextIndex(){return++this._currentIndex<this._indices.length&&(this._reader.setIndex(this._indices[this._currentIndex]),!0)}next(){for(;this._nextIndex()&&!this._reader._getExists(););return this._currentIndex<this._indices.length}readXForDisplay(){return this._displayTransform?(0,i.IE)(this._displayTransform,this._reader.readXForDisplay()):this._reader.readXForDisplay()}readYForDisplay(){return this._displayTransform?(0,i.B2)(this._displayTransform,this._reader.readYForDisplay()):this._reader.readYForDisplay()}readGeometryForDisplay(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform):this._reader.readGeometryForDisplay()}readCentroidForDisplay(){const e=this._reader.readCentroidForDisplay()?.clone();if(e){const[t,r]=e.coords;this._displayTransform&&(e.coords[0]=(0,i.IE)(this._displayTransform,t),e.coords[1]=(0,i.B2)(this._displayTransform,r))}return e}get geometryType(){return this._reader.geometryType}get hasFeatures(){return this._reader.hasFeatures}get exceededTransferLimit(){return this._reader.exceededTransferLimit}get hasZ(){return this._reader.hasZ}get hasM(){return this._reader.hasM}readAttribute(e,t=!1){const r=this._reader.readAttribute(e,t);return null==r&&this._processorAttributes?this._processorAttributes[e]:r}readAttributes(){return{...this._processorAttributes,...this._reader.readAttributes()}}joinAttributes(e){return this._reader.joinAttributes(e)}getBounds(e){return this._reader.getBounds(e)}getAttributeHash(){return this._reader.getAttributeHash()}getObjectId(){return this._reader.getObjectId()}getDisplayId(){return this._reader.getDisplayId()}setDisplayId(e){return this._reader.setDisplayId(e)}setIndex(e){return this._reader.setIndex(e)}getIndex(){return this._reader.getIndex()}readXWorldSpace(){return this._reader.readXWorldSpace()}readYWorldSpace(){return this._reader.readYWorldSpace()}_readX(){return this._reader.readXForDisplay()}_readY(){return this._reader.readYForDisplay()}_readServerCentroid(){return this._reader._readServerCentroid()}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return(0,n.zv)(e,this.geometryType,!1,!1)}readGeometryArea(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform)?.area()??0:this._reader.readGeometryArea()}readGeometryWorldSpace(){return this._reader.readGeometryWorldSpace()}_readGeometry(){return this._reader._readGeometry()}_readAttribute(e,t){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}_readAttributes(){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}readArcadeFeature(){return this._reader.readArcadeFeature()}geometry(){return this._reader.geometry()}field(e){return this._reader.field(e)}hasField(e){return this._reader.hasField(e)}setField(e,t){return this._reader.setField(e,t)}keys(){return this._reader.keys()}castToText(e=!1){return this._reader.castToText(e)}}},53177:(e,t,r)=>{r.d(t,{A:()=>l});var s,i=r(31635),n=r(4718),o=r(91429),a=r(39357),h=r(76357),u=r(93223);let l=class extends h.A{static{s=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some(e=>(String(e.code)===r&&(t=e.name),!!t))}return t}clone(){return new s({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,i.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],l.prototype,"codedValues",void 0),(0,i.Cg)([(0,u.e)({codedValue:"coded-value"})],l.prototype,"type",void 0),l=s=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],l)},60408:(e,t,r)=>{function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function i(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function h(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":i(e)?"esriGeometryMultipoint":null:null}function l(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function d(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}r.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>l,Rg:()=>o,U9:()=>i,W0:()=>d,ZC:()=>s,fT:()=>n,uW:()=>h})},63664:(e,t,r)=>{r.d(t,{B:()=>s});class s{constructor(e){this._statistics=e}get statistics(){return this._statistics}}},63892:(e,t,r)=>{r.d(t,{DV:()=>p,Xj:()=>f,hD:()=>_});var s=r(11254),i=r(49186),n=(r(44208),r(563)),o=r(84952),a=r(39412);const h=new n.QueueProcessor({concurrency:8,process:async e=>{const{data:t}=await(0,s.A)(e.url,e.options);return t}}),u=e=>async function(t,r,s,i){const n=e?.(),o=n??{};return await h.push({url:t,options:{responseType:"array-buffer",query:o,headers:{range:`bytes=${r}-${s}`}}})},l=e=>async function(t){if((0,o.w8)(t)){const{data:e}=await(0,s.A)(t,{responseType:"blob"});return e.size}const{data:r}=await(0,s.A)(t,{responseType:"native",method:"head",query:e?.()}),i=r.headers.get("Content-Length");if(null==i)throw new Error("Unable to parse content length");return parseInt(i,10)};function d(e,t){switch(t){case"esriGeometryPoint":return e.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return e.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return e.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return e.GeometryType.Multipoint;default:throw new i.A("parquet",`Found unexpected GeometryType: ${t}`)}}function c(e,t){const r=e.GeometryInfo.new();t.geometry&&r.setGeometry(function(e,t){const r=t.encoding,s=d(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(r.type){case"wkb":return e.GeometryField.fromWkb(r.field,i,s);case"location":{const{yField:t,xField:n}=r;return e.GeometryField.fromLocation(t,n,i,s)}}}(e,t.geometry));const s=t.displayOptimization;if(s){const{index:t,parentColumn:i}=s,n=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const s=e.DisplayOptimizationZBuilder.new();s.setCodeField(n(t.code)),s.setXColumn(n(t.xColumn)),s.setYColumn(n(t.yColumn)),s.setCooordinatePrecision(t.coordinatePrecision),s.setFullExtent(t.fullExtent),s.setSpatialReference(t.wkid,t.wkt),s.setHasZ(!!t.zColumn),s.setHasM(!!t.mColumn),r.setOptmizationZ(s)}if("xz"===t.type){const s=d(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(n(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(s),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const r of t.levels??[]){const[t,s]=r.transform.translate,[o,a]=r.transform.scale,h=new Float64Array([t,s]),u=new Float64Array([o,a]),l=n(r.column);i.addLevel(e.MultiscaleGeometryField.new(r.level,r.scale,l,h,u))}r.setOptmizationXZ(i)}}return r}async function p(e,t={}){const r=await(0,a.N)(),s=u(t.getCustomParameters),n=l(t.getCustomParameters),o=t.geometryInfo?c(r,t.geometryInfo):null;try{return await r.ParquetFile.fromUrl(e,s,n,o)}catch(e){throw new i.A("parquet","Failed to parse file",{error:e})}}function _(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function f(e){if(e.keyValueMetadata("esri"))throw new i.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const t=e.keyValueMetadata("geodisplay");if(null!=t)return JSON.parse(t);const r=e.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=r){const e=JSON.parse(r);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type)){const e={parentColumn:t.name,index:t.metadata};if("xz"===e.index.type&&(e.index.geometryType=e.index.geometryType.toLowerCase(),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))throw new i.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`);return e}}return null}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>l,e2:()=>c,f:()=>p});var s=r(44208),i=r(4718),n=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const h=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function l(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${d(t)} = null;`;for(const t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e){return h.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},65864:(e,t,r)=>{r.d(t,{rS:()=>l,xD:()=>c});var s=r(5443),i=r(91075),n=r(48526),o=r(86738),a=r(39829),h=r(82799),u=r(60408);function l(e){return null==e?null:e instanceof i.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?h.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?s.A.fromJSON(e):null}const d={esriGeometryPoint:o.A,esriGeometryPolyline:h.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function c(e){return e&&d[e]||null}},68974:(e,t,r)=>{r.d(t,{H:()=>u,p:()=>h});var s=r(69397),i=r(86211),n=r(38976),o=r(75538);const a=96;function h(e,t){return(0,i.GA)(e)*i.dy*a/t}class u extends n.n{constructor(e){super(e),this._cells=new Map,this._pixelsPerMapUnit=h(e.spatialReference,e.scale)}get usedMemory(){const e=this._cells.values().next().value;return e?(s.RS+e.usedMemory)*this._cells.size:0}put(e){for(const t of this._cells.values()){const r=e.get(t.id);r?r.merge(t):e.set(t.id,t.clone())}}putBounded(e,t,r){const s=[t.xmin,t.ymin,t.xmax,t.ymax],[i,n,o,a]=s,h=Math.floor(i*this._pixelsPerMapUnit/this._options.cellSize),u=Math.floor(n*this._pixelsPerMapUnit/this._options.cellSize),l=Math.ceil(o*this._pixelsPerMapUnit/this._options.cellSize),d=Math.ceil(a*this._pixelsPerMapUnit/this._options.cellSize);for(let t=u;t<=d;t++)for(let r=h;r<=l;r++){const s=`${r}.${t}`,i=this._cells.get(s);if(!i)continue;const n=e.get(i.id);n?i&&!e.has(i.id)&&n.merge(i):e.set(i.id,i.clone())}}_insert(e,t,r,s){const i=t*this._pixelsPerMapUnit,n=r*this._pixelsPerMapUnit,o=Math.floor(i/this._options.cellSize),a=Math.floor(n/this._options.cellSize);this._getCellOrCreate(o,a).insert(e,s,t,r)}_getCellOrCreate(e,t){const r=o.L.createId(e,t);let s=this._cells.get(r);if(!s){const i=1*this._options.cellSize/this._pixelsPerMapUnit;s=o.L.create(e,t,this._options.fields,i),this._cells.set(r,s)}return s}}},70300:(e,t,r)=>{r.d(t,{K:()=>j});var s=r(69397),i=r(11006);function n(e,t){if(!(this instanceof n))return new n(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this.toBBox=t:this._initFormat(t)),this.clear()}function o(e,t,r){if(!r)return t.indexOf(e);for(var s=0;s<t.length;s++)if(r(e,t[s]))return s;return-1}function a(e,t){h(e,0,e.children.length,t,e)}function h(e,t,r,s,i){i||(i=g(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var n,o=t;o<r;o++)n=e.children[o],u(i,e.leaf?s(n):n);return i}function u(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){var r=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,n-s)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(e,t,r,s,n){for(var o,a=[t,r];a.length;)(r=a.pop())-(t=a.pop())<=s||(o=t+Math.ceil((r-t)/s/2)*s,(0,i.q)(e,o,t,r,n),a.push(t,o,o,r))}n.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],s=this.toBBox;if(!y(e,t))return r;for(var i,n,o,a,h=[];t;){for(i=0,n=t.children.length;i<n;i++)o=t.children[i],y(e,a=t.leaf?s(o):o)&&(t.leaf?r.push(o):m(e,a)?this._all(o,r):h.push(o));t=h.pop()}return r},collides:function(e){var t=this.data,r=this.toBBox;if(!y(e,t))return!1;for(var s,i,n,o,a=[];t;){for(s=0,i=t.children.length;s<i;s++)if(n=t.children[s],y(e,o=t.leaf?r(n):n)){if(t.leaf||m(e,o))return!0;a.push(n)}t=a.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}var s=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===s.height)this._splitRoot(this.data,s);else{if(this.data.height<s.height){var i=this.data;this.data=s,s=i}this._insert(s,this.data.height-s.height-1,!0)}else this.data=s;return this},insert:function(e){return null!=e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(e,t){if(null==e)return this;for(var r,s,i,n,a=this.data,h=this.toBBox(e),u=[],l=[];a||u.length;){if(a||(a=u.pop(),s=u[u.length-1],r=l.pop(),n=!0),a.leaf&&-1!==(i=o(e,a.children,t)))return a.children.splice(i,1),u.push(a),this._condense(u),this;n||a.leaf||!m(a,h)?s?(r++,a=s.children[r],n=!1):a=null:(u.push(a),l.push(r),r=0,s=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:d,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t},_build:function(e,t,r,s){var i,n=r-t+1,o=this._maxEntries;if(n<=o)return a(i=g(e.slice(t,r+1)),this.toBBox),i;s||(s=Math.ceil(Math.log(n)/Math.log(o)),o=Math.ceil(n/Math.pow(o,s-1))),(i=g([])).leaf=!1,i.height=s;var h,u,l,d,c=Math.ceil(n/o),p=c*Math.ceil(Math.sqrt(o));for(x(e,t,r,p,this.compareMinX),h=t;h<=r;h+=p)for(x(e,h,l=Math.min(h+p-1,r),c,this.compareMinY),u=h;u<=l;u+=c)d=Math.min(u+c-1,l),i.children.push(this._build(e,u,d,s-1));return a(i,this.toBBox),i},_chooseSubtree:function(e,t,r,s){for(var i,n,o,a,h,u,l,d;s.push(t),!t.leaf&&s.length-1!==r;){for(l=d=1/0,i=0,n=t.children.length;i<n;i++)h=c(o=t.children[i]),(u=_(e,o)-h)<d?(d=u,l=h<l?h:l,a=o):u===d&&h<l&&(l=h,a=o);t=a||t.children[0]}return t},_insert:function(e,t,r){var s=this.toBBox,i=r?e:s(e),n=[],o=this._chooseSubtree(i,this.data,t,n);for(o.children.push(e),u(o,i);t>=0&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(i,n,t)},_split:function(e,t){var r=e[t],s=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,s);var n=this._chooseSplitIndex(r,i,s),o=g(r.children.splice(n,r.children.length-n));o.height=r.height,o.leaf=r.leaf,a(r,this.toBBox),a(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(r,o)},_splitRoot:function(e,t){this.data=g([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var s,i,n,o,a,u,l,d;for(u=l=1/0,s=t;s<=r-t;s++)o=f(i=h(e,0,s,this.toBBox),n=h(e,s,r,this.toBBox)),a=c(i)+c(n),o<u?(u=o,d=s,l=a<l?a:l):o===u&&a<l&&(l=a,d=s);return d},_chooseSplitAxis:function(e,t,r){var s=e.leaf?this.compareMinX:l,i=e.leaf?this.compareMinY:d;this._allDistMargin(e,t,r,s)<this._allDistMargin(e,t,r,i)&&e.children.sort(s)},_allDistMargin:function(e,t,r,s){e.children.sort(s);var i,n,o=this.toBBox,a=h(e,0,t,o),l=h(e,r-t,r,o),d=p(a)+p(l);for(i=t;i<r-t;i++)n=e.children[i],u(a,e.leaf?o(n):n),d+=p(a);for(i=r-t-1;i>=t;i--)n=e.children[i],u(l,e.leaf?o(n):n),d+=p(l);return d},_adjustParentBBoxes:function(e,t,r){for(var s=r;s>=0;s--)u(t[s],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():a(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}};var v=r(70328);class b{static fromReader(e){const t=[],r=e.copy(),s=(0,v.vt)();for(;r.next();)r.getBounds(s)&&t.push(r.getIndex());const i=n(9,e=>(r.setIndex(e),{minX:r.getBoundsXMin(),minY:r.getBoundsYMin(),maxX:r.getBoundsXMax(),maxY:r.getBoundsYMax()}));return i.load(t),new b(i,t.length)}constructor(e,t){this._index=e,this._size=t}get usedMemory(){return this._size*s.RS}search(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this._index.search(t)}}r(44208);var I=r(34727),w=(r(37585),r(48163)),T=r(39829),M=r(16930),S=r(19419),A=r(79258),C=r(90708),F=r(31464);function P(e,t,r,s){if(s.isWebMercator){const s=(0,I.KJ)(e/A.$O.radius),i=s-360*Math.floor((s+180)/360),n=[0,0];return O(n,0,(0,I.KJ)(Math.PI/2-2*Math.atan(Math.exp(-t/A.$O.radius))),i,r),n}const i=(0,F.Cv)({x:e,y:t},s,M.A.WGS84);if(!i)return null;const n=[0,0];return O(n,0,i.y,i.x,r),n}function O(e,t,r,s,i){i%2&&(i+=1);let n=0,o=0,a=-90,h=90,u=-180,l=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const r=(u+l)/2,i=s>r?1:0;n|=i<<29-(t+5*e),u=(1-i)*u+i*r,l=(1-i)*r+i*l}for(let t=0;t<5;t++){const s=(a+h)/2,i=r>s?1:0;o|=i<<29-(t+5*e),a=(1-i)*a+i*s,h=(1-i)*s+i*h}}e[2*t]=n,e[2*t+1]=o}(0,w.vt)(),(0,w.vt)();var N=r(63664),k=r(92029);class z extends N.B{static create(e,t,r,s){const i=k.o.create(e),n=new Array(32);for(let e=0;e<n.length;e++)n[e]=null;return new z(i,t,r,s,n)}constructor(e,t,r,s,i){super(e),this.xNode=t,this.yNode=r,this.depth=s,this.children=i,this._objectIds=new Set,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._xGeohashTotal=0,this._yGeohashTotal=0,this.next=null}static get estimatedMemory(){let e=0;return e+=2*s.qK,e+=32*s.RS,e+=k.o.estimatedMemory,e}get id(){return`${this.xNode}.${this.yNode}`}get containedObjectIds(){return this._objectIds}get count(){return this._count}clone(){const e=new z(this._statistics.clone(),this.xNode,this.yNode,this.depth,this.children);return e._count=this._count,e._xWorldTotal=this._xWorldTotal,e._yWorldTotal=this._yWorldTotal,e._xGeohashTotal=this._xGeohashTotal,e._yGeohashTotal=this._yGeohashTotal,e.next=this.next,e._objectIds=new Set(this._objectIds),e}insert(e,t,r,s,i,n){this._count+=1,this._xWorldTotal+=t,this._yWorldTotal+=r,this._xGeohashTotal+=s,this._yGeohashTotal+=i,this._statistics.insert(e,n),this._objectIds.add(e.getObjectId())}merge(e){if(0!==e._count){this._count+=e._count,this._xWorldTotal+=e._xWorldTotal,this._yWorldTotal+=e._yWorldTotal,this._xGeohashTotal+=e._xWorldTotal,this._yGeohashTotal+=e._yWorldTotal,this._statistics.merge(e._statistics);for(const t of e._objectIds.values())this._objectIds.add(t)}}getCentroid(e){throw new Error("getCentroid not supported for GeohashNode")}getGeometry(e,t){const r=this._getLngLatBounds(),[s,i,n,o]=r,a=(0,F.Cv)({rings:[[[s,i],[s,o],[n,o],[n,i],[s,i]]]},M.A.WGS84,e),h=(0,C.Ye)(a);return null!=t?(0,C.Nl)(h,"esriGeometryPolygon",t,!1,!1):h}getGeometricCentroid(e,t){const r=this._getLngLatBounds(),[s,i,n,o]=r,a=(0,F.Cv)({x:(s+n)/2,y:(i+o)/2},M.A.WGS84,e),h=(0,C.qN)(a);return null!=t?(0,C.Nl)(h,"esriGeometryPoint",t,!1,!1):h}getAttributes(){const e={aggregateId:this.id};for(const t of this._statistics.values())e[t.field.name]=t.value;return e.aggregateCount=this._count,e}find(e,t,r,s,i,n){if(s>=r)return this;const o=1-s%2,a=3*o+2*(1-o),h=2*o+3*(1-o),u=30-i-a,l=30-n-h,d=((e&7*o+3*(1-o)<<u)>>u)+((t&3*o+7*(1-o)<<l)>>l)*(8*o+4*(1-o)),c=this.children[d];return null==c?null:c.find(e,t,r,s+1,i+a,n+h)}_getLngLatBounds(){const e=this.depth,t=Math.ceil(e/2),r=Math.floor(e/2),s=30-(3*t+2*r),i=30-(2*t+3*r);return function(e,t){let r=-90,s=90,i=-180,n=180;for(let o=0;o<t;o++){const t=Math.ceil((o+1)/2),a=Math.floor((o+1)/2),h=1-o%2,u=30-(3*t+2*a),l=30-(2*t+3*a),d=2*h+3*(1-h),c=(7*h+3*(1-h)<<u&e.geohashX)>>u,p=(3*h+7*(1-h)<<l&e.geohashY)>>l;for(let e=3*h+2*(1-h)-1;e>=0;e--){const t=(i+n)/2,r=c&1<<e?1:0;i=(1-r)*i+r*t,n=(1-r)*t+r*n}for(let e=d-1;e>=0;e--){const t=(r+s)/2,i=p&1<<e?1:0;r=(1-i)*r+i*t,s=(1-i)*t+i*s}}return[i,r,n,s]}({geohashX:this.xNode<<s,geohashY:this.yNode<<i},this.depth)}}class G{constructor(e){this._fields=e,this._size=0,this._depth=0,this._root=z.create(this._fields,0,0,0)}destroy(){}get size(){return this._size}get depth(){return this._depth}get usedMemory(){return this._size*z.estimatedMemory}find(e,t,r){return this._root.find(e,t,r,0,0,0)}insert(e,t,r,s,i,n,o){let a=this._root,h=0,u=0,l=0;for(;null!==a;){if(a.insert(e,t,r,s,i,o),h>=n)return;const d=Math.ceil((h+1)/2),c=Math.floor((h+1)/2),p=1-h%2,_=30-(3*d+2*c),f=30-(2*d+3*c),m=(s&7*p+3*(1-p)<<_)>>_,y=(i&3*p+7*(1-p)<<f)>>f,g=m+y*(8*p+4*(1-p));u=u<<3*p+2*(1-p)|m,l=l<<2*p+3*(1-p)|y,null==a.children[g]&&(a.children[g]=z.create(this._fields,u,l,h+1),this._depth=Math.max(this._depth,h+1),this._size+=1),h+=1,a=a.children[g]}}putBins(e,t){for(const r of this.getNodes(t)){const t=e.get(r.id);t?t.merge(r):e.set(r.id,r.clone())}}getNodes(e){const t=[],{geohashBounds:r,level:s}=e;let i=this._root;for(;null!==i;){const e=i.depth,n=i.xNode,o=i.yNode;if(e>=s){t.push(i),i=i.next;continue}const a=Math.ceil((e+1)/2),h=Math.floor((e+1)/2),u=1-e%2,l=30-(3*a+2*h),d=30-(2*a+3*h),c=~((1<<l)-1),p=~((1<<d)-1),_=(r.xLL&c)>>l,f=(r.yLL&p)>>d,m=(r.xTR&c)>>l,y=(r.yTR&p)>>d,g=n<<3*u+2*(1-u),x=o<<2*u+3*(1-u),v=g+8*u+4*(1-u),b=x+4*u+8*(1-u),I=Math.max(g,_),w=Math.max(x,f),T=Math.min(v,m),M=Math.min(b,y);let S=null,A=null;for(let e=w;e<=M;e++)for(let t=I;t<=T;t++){const r=t-g+(e-x)*(8*u+4*(1-u)),s=i.children[r];s&&(S||(S=s,S.next=i.next),A&&(A.next=s),A=s,s.next=i.next)}i=S||i.next}return t}}var B=r(38976);class D extends B.n{constructor(e){super(e),this._tree=new G(this._options.fields)}get usedMemory(){return this._tree.usedMemory}put(e){throw new Error("Geohash tree does not support put")}putBounded(e,t,r){const{geohashLevel:s,spatialReference:i}=this._options,n=function(e,t,r,s){const i=[e.xmin,e.ymin,e.xmax,e.ymax],n=T.A.fromExtent((0,S.w1)(i,s)),o=(0,F.Cv)(n,s,M.A.WGS84,{extendedParams:{densificationStep:64*t}});if(!o)return null;const a=(0,C.Ye)(o,!1,!1),h=a.coords.filter((e,t)=>!(t%2)),u=a.coords.filter((e,t)=>t%2),l=Math.min(...h),d=Math.min(...u),c=Math.max(...h),p=Math.max(...u),_=P(l,d,r,M.A.WGS84),f=P(c,p,r,M.A.WGS84);return _&&f?{bounds:i,geohashBounds:{xLL:_[0],yLL:_[1],xTR:f[0],yTR:f[1]},level:r}:null}(t,r,s,i);null!=n&&this._tree.putBins(e,n)}_insert(e,t,r,s){const{geohashLevel:i,spatialReference:n}=this._options,o=P(t,r,i,n);o&&this._tree.insert(e,t,r,o[0],o[1],i,s)}}var W=r(68974),R=r(52350);class j{size(){return this.reader.getSize()}get fields(){return this.reader.fields}invalidate(){this._aggregateIndex=null,this._aggregateIndexHash=null,this._spatialIndex=null}get usedMemory(){let e=0;return e+=this.reader.underlyingMemory,this._aggregateIndex&&(e+=this._aggregateIndex.usedMemory),this._spatialIndex&&(e+=this._spatialIndex.usedMemory),e}getObjectIds(){const e=this.reader.getCursor(),t=[];for(;e.next();)t.push(e.getObjectId());return t}registerOverrides(e){this.reader.registerOverrides(e),this.invalidate()}queryFeaturesInBounds(e){const t=this._getSpatialIndex().search(e);return R.e.from(this.reader,t)}getAggregateIndex(e){const t=JSON.stringify(e);if(t!==this._aggregateIndexHash){switch(this._aggregateIndexHash=t,e.type){case"grid":this._aggregateIndex=new W.H(e);break;case"geohash":this._aggregateIndex=new D(e)}this._aggregateIndex.insert(this.reader,this.isTiled)}return this._aggregateIndex}_getSpatialIndex(){return this._spatialIndex||(this._spatialIndex=b.fromReader(this.reader)),this._spatialIndex}}},73250:(e,t,r)=>{r.d(t,{y:()=>i});var s=r(69397);class i{static fromBuffer(e,t){return new i(e,t)}static create(e,t=4294967295){const r=new Uint32Array(Math.ceil(e/32));return new i(r,t)}constructor(e,t){this._mask=0,this._buf=e,this._mask=t}_getIndex(e){return Math.floor(e/32)}get usedMemory(){return(0,s.Qf)(this._buf)}has(e){const t=this._mask&e;return!!(this._buf[this._getIndex(t)]&1<<t%32)}hasRange(e,t){let r=e,s=t;for(;r%32&&r!==s;){if(this.has(r))return!0;r++}for(;s%32&&r!==s;){if(this.has(r))return!0;s--}if(r===s)return!1;for(let e=r/32;e!==s/32;e++)if(this._buf[e])return!0;return!1}set(e){const t=this._mask&e,r=this._getIndex(t),s=1<<t%32;this._buf[r]|=s}setRange(e,t){let r=e,s=t;for(;r%32&&r!==s;)this.set(r++);for(;s%32&&r!==s;)this.set(s--);if(r!==s)for(let e=r/32;e!==s/32;e++)this._buf[e]=4294967295}unset(e){const t=this._mask&e,r=this._getIndex(t),s=1<<t%32;this._buf[r]&=4294967295^s}resize(e){const t=this._buf,r=new Uint32Array(Math.ceil(e/32));r.set(t),this._buf=r}or(e){for(let t=0;t<this._buf.length;t++)this._buf[t]|=e._buf[t];return this}and(e){for(let t=0;t<this._buf.length;t++)this._buf[t]&=e._buf[t];return this}xor(e){for(let t=0;t<this._buf.length;t++)this._buf[t]^=e._buf[t];return this}ior(e){for(let t=0;t<this._buf.length;t++)this._buf[t]|=~e._buf[t];return this}iand(e){for(let t=0;t<this._buf.length;t++)this._buf[t]&=~e._buf[t];return this}ixor(e){for(let t=0;t<this._buf.length;t++)this._buf[t]^=~e._buf[t];return this}any(){for(let e=0;e<this._buf.length;e++)if(this._buf[e])return!0;return!1}copy(e){for(let t=0;t<this._buf.length;t++)this._buf[t]=e._buf[t];return this}clone(){return new i(this._buf.slice(),this._mask)}clear(){for(let e=0;e<this._buf.length;e++)this._buf[e]=0;return this}forEachSet(e){for(let t=0;t<this._buf.length;t++){let r=this._buf[t],s=32*t;if(r)for(;r;)1&r&&e(s),r>>>=1,s++}}countSet(){let e=0;return this.forEachSet(t=>{e++}),e}}},75538:(e,t,r)=>{r.d(t,{L:()=>a});var s=r(90708),i=r(92722),n=r(63664),o=r(92029);class a extends n.B{static createId(e,t){return`${e}.${t}`}static create(e,t,r,s){return new a(e,t,o.o.create(r),s)}constructor(e,t,r,s){super(r),this.gridX=e,this.gridY=t,this._worldUnitsPerCell=s,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._objectIds=new Set}get id(){return a.createId(this.gridX,this.gridY)}get containedObjectIds(){return this._objectIds}get count(){return this._count}get firstObjectId(){return this._objectIds.values().next().value}get centroidXWorld(){return this._xWorldTotal/this._count}get centroidYWorld(){return this._yWorldTotal/this._count}get usedMemory(){return 48}clone(){const e=new a(this.gridX,this.gridY,this._statistics.clone(),this._worldUnitsPerCell);return e._count=this._count,e._xWorldTotal=this._xWorldTotal,e._yWorldTotal=this._yWorldTotal,e._firstFeatureAttributes=this._firstFeatureAttributes,e._objectIds=new Set(this._objectIds),e}insert(e,t,r,s){0===this._count?this._firstFeatureAttributes=e.readAttributes():this._firstFeatureAttributes=null,this._count+=1,this._xWorldTotal+=r,this._yWorldTotal+=s,this._statistics.insert(e,t),this._objectIds.add(e.getObjectId())}merge(e){if(0!==e._count){this._count+=e._count,this._firstFeatureAttributes=e._firstFeatureAttributes,this._xWorldTotal+=e._xWorldTotal,this._yWorldTotal+=e._yWorldTotal,this._statistics.merge(e._statistics);for(const t of e._objectIds.values())this._objectIds.add(t)}}getCentroidX(e){return null==e?this.centroidXWorld:(0,s.IE)(e,this.centroidXWorld)}getCentroidY(e){return null==e?this.centroidYWorld:(0,s.B2)(e,this.centroidYWorld)}getGeometry(e,t){const r=this.gridX*this._worldUnitsPerCell,n=this.gridY*this._worldUnitsPerCell,o=new i.A([4],[r,n,r+this._worldUnitsPerCell,n,r+this._worldUnitsPerCell,n+this._worldUnitsPerCell,r,n+this._worldUnitsPerCell]);return null!=t?(0,s.Nl)(o,"esriGeometryPolygon",t):o}getCentroid(e){const t=new i.A([],[this.centroidXWorld,this.centroidYWorld]);return null!=e?(0,s.Nl)(t,"esriGeometryPoint",e):t}getGeometricCentroid(e,t){const r=this.gridX*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,n=this.gridY*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,o=new i.A([],[r,n]);return null!=t?(0,s.Nl)(o,"esriGeometryPoint",t):o}getAttributes(){const e={aggregateId:this.id};for(const t of this._statistics.values())e[t.field.name]=t.value;return null!=this._firstFeatureAttributes?{...e,...this._firstFeatureAttributes}:e}}},76213:(e,t,r)=>{r.d(t,{C2:()=>o,CQ:()=>s,DY:()=>i,GR:()=>f,Gh:()=>h,MZ:()=>c,TB:()=>_,U5:()=>a,_M:()=>u,cp:()=>m,eG:()=>n,fq:()=>p,hM:()=>d,ie:()=>l});const s=512,i=29,n=24,o=4,a=6,h=1.05,u=3,l=3,d=4,c=1,p=10,_=256,f=32,m=512},76357:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(31635),i=r(66552),n=r(25482),o=r(91429),a=r(93223);const h=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,s.Cg)([(0,a.e)(h),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},92029:(e,t,r)=>{r.d(t,{o:()=>o});var s=r(69397),i=r(50115);const n=Math.PI/180;class o{static create(e){return new o(e.map(e=>function(e){switch(e.statisticType){case"min":return new h(e);case"max":return new u(e);case"avg":return new d(e);case"avg_angle":return new c(e);case"sum":case"count":return new l(e);case"mode":return new p(e)}}(e)))}constructor(e){this._statistics=e}static get estimatedMemory(){return s.qK+4*s.qK}values(){return this._statistics.values()}insert(e,t){for(const r of this._statistics)r.insert(e,t)}merge(e){for(let t=0;t<this._statistics.length;t++){const r=this._statistics[t],s=e._statistics[t];if(r.field.name!==s.field.name)throw new Error("InternalError: Tried to merge incompatible statistics");r.merge(s)}}clone(){return new o(this._statistics.map(e=>e.clone()))}}class a{constructor(e){this.field=e}insert(e,t){if(!this.field.computed)return;const r=this.field.computed.read(e,t);(0,i.rZ)(r)||this._insertValue(r)}}class h extends a{constructor(){super(...arguments),this.type="min",this.value=Number.MAX_VALUE}_insertValue(e){this.value=Math.min(this.value,e)}merge(e){this.value=Math.min(this.value,e.value)}clone(){const e=new h(this.field);return e.value=this.value,e}}class u extends a{constructor(){super(...arguments),this.type="max",this.value=Number.MIN_VALUE}_insertValue(e){this.value=Math.max(this.value,e)}merge(e){this.value=Math.max(this.value,e.value)}clone(){const e=new u(this.field);return e.value=this.value,e}}class l extends a{constructor(){super(...arguments),this.type="sum",this.value=0}_insertValue(e){this.value+=e}merge(e){this.value+=e.value}clone(){const e=new l(this.field);return e.value=this.value,e}}class d extends a{constructor(){super(...arguments),this.type="avg",this._total=0,this._count=0}get value(){return this._total/this._count}_insertValue(e){this._total+=e,this._count+=1}merge(e){this._total+=e._total,this._count+=e._count}clone(){const e=new d(this.field);return e._total=this._total,e._count=this._count,e}}class c extends a{constructor(){super(...arguments),this.type="avg_angle",this._x=0,this._y=0,this._count=0}get value(){const e=this._x/this._count,t=this._y/this._count,r=180/Math.PI;return Math.atan2(t,e)*r}_insertValue(e){this._x=this._x+Math.cos(e*n),this._y=this._y+Math.sin(e*n),this._count+=1}merge(e){this._x+=e._x,this._y+=e._y,this._count+=e._count}clone(){const e=new c(this.field);return e._x=this._x,e._y=this._y,e._count=this._count,e}}class p extends a{constructor(){super(...arguments),this._frequencies=new Map}get value(){let e,t=0;for(const[r,s]of this._frequencies.entries())s>t&&(t=s,e=r);return e}_insertValue(e){const t=this._frequencies.get(e);null!=t?this._frequencies.set(e,t+1):this._frequencies.set(e,1)}merge(e){for(const[t,r]of e._frequencies.entries()){const e=this._frequencies.get(t);null!=e?this._frequencies.set(t,e+r):this._frequencies.set(t,r)}}clone(){const e=new p(this.field);return e._frequencies=new Map(this._frequencies),e}}},97633:(e,t,r)=>{r.d(t,{P:()=>n});var s=r(69397),i=r(73250);class n{constructor(e){this._valid=i.y.create(e),this._data=new Array(e)}get usedMemory(){let e=this._valid.usedMemory;if(this._data.length>0){const t="string"==typeof this._data[0]?64:s.RS;e+=this._data.length*t}return e}has(e){return this._valid.has(e)}set(e,t){this._valid.set(e),this._data[e]=t}get(e){return this._data[e]}}},98453:(e,t,r)=>{r.d(t,{m:()=>s});const s=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},99996:(e,t,r)=>{r.d(t,{Y:()=>O});var s=r(66131),i=r(44208),n=r(69397),o=r(44729),a=r(15032),h=r(36745),u=r(70328),l=r(65864),d=r(32011),c=r(62577),p=r(27647),_=r(90708),f=r(43334),m=r(92722),y=r(98623),g=r(97633);const x=(0,i.A)("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],v=x[0],b=x[1],I=x[2],w=x[3],T=(0,i.A)("featurelayer-simplify-payload-size-factors")??[1,2,4],M=T[0],S=T[1],A=T[2],C=(0,i.A)("featurelayer-simplify-mobile-factor")??2,F=(0,i.A)("esri-mobile"),P=4294967295;class O{constructor(e){this.metadata=e,this.type="FeatureSetReader",this._overrides=null,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}destroy(){}[Symbol.dispose](){this.destroy()}getAreaSimplificationThreshold(e,t){let r=1;const s=F?C:1;t>4e6?r=A*s:t>1e6?r=S*s:t>5e5?r=M*s:t>1e5&&(r=s);let i=0;return e>4e3?i=w*r:e>2e3?i=I*r:e>100?i=b:e>15&&(i=v),i}getBounds(e){!function(e,t){if(!(e.length>t))for(;e.length<=t;)e.push(0)}(this._boundsBuffer,4*this.getIndex()+4);const t=this.getBoundsXMin();if(t===P||!isFinite(t))return!1;if(0===this.getBoundsXMin()){const t=this.readGeometryWorldSpace();if(t?.isPoint&&0===t.coords[0]&&0===t.coords[1])return(0,u.BI)(e,0,0,0,0),!0;if(!t)return this.setBoundsXMin(P),!1;let r=1/0,s=1/0,i=-1/0,n=-1/0;return t.forEachVertex((e,t)=>{r=Math.min(r,e),s=Math.min(s,t),i=Math.max(i,e),n=Math.max(n,t)}),this.setBoundsXMin(r),this.setBoundsYMin(s),this.setBoundsXMax(i),this.setBoundsYMax(n),(0,u.BI)(e,r,s,i,n),!0}const r=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),n=this.getBoundsYMax();return(0,u.BI)(e,r,s,i,n),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(e){this._boundsBuffer[4*this.getIndex()]=e}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(e){this._boundsBuffer[4*this.getIndex()+1]=e}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(e){this._boundsBuffer[4*this.getIndex()+2]=e}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(e){this._boundsBuffer[4*this.getIndex()+3]=e}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"string"==typeof t?new Date(t).getTime():"number"==typeof t||null==t?t:null}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const r of this._joined){r.setIndex(this.getIndex());const s=r._readAttribute(e,t);if(void 0!==s)return s}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}registerOverrides(e){this._overrides=e}withoutOverrides(){const e=this.copy();return e._overrides=null,e}readOptimizedFeatureWorldSpace(){const e=this.readGeometryWorldSpace(),t=this.readAttributes(),r=this.readCentroidWorldSpace();return new f.Om(e,t,r,this.getObjectId(),this.getDisplayId())}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyFeatureWorldSpace(){const e=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return(0,_.zv)(e,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const e=this._readX(),t=this.getInTransform();return null==t?e:e*t.scale[0]+t.translate[0]}readYWorldSpace(){const e=this._readY(),t=this.getInTransform();return null==t?e:t.translate[1]-e*t.scale[1]}readGeometryForDisplay(){const e=this._readGeometryDeltaDecoded(!0);if(!e){const e=this._createDeltaQuantizedGeometryFromServerCentroid();return e?e.deltaDecode():null}return e}readGeometryForDisplayTransformed(e){let t=this.readGeometryForDisplay();if(t&&"esriGeometryPolyline"===this.metadata.geometryType&&(t=(0,_.kz)(t,this.metadata.geometryType,e.scale[0])),t&&(t=(0,_.hK)(t,e,this.metadata.geometryType)),!t){const t=this.readCentroidForDisplay();if(!t)return null;const r=(0,c.IE)(e,t.coords[0]),s=(0,c.B2)(e,t.coords[1]);return this._createDeltaQuantizedExtrudedGeometry(r,s).deltaDecode()}return t}readGeometryWorldSpace(){let e=this._readGeometry();if(e||(e=this._createDeltaQuantizedGeometryFromServerCentroid()),!e)return null;const t=e.clone(),r=this.getInTransform();return null!=r&&(0,_.aQ)(t,r),t}readCentroidForDisplay(){const e=this.readGeometryForDisplay();return e?this._computeDisplayCentroid(e):this._readServerCentroid()}readCentroidWorldSpace(){const e=this.readGeometryForDisplay(),t=e?this._computeDisplayCentroid(e):this._readServerCentroid();if(!t)return null;const r=t.clone(),s=this.getInTransform();return null!=s&&(0,_.aQ)(r,s),r}setCache(e){let t=this._caches.get(e);null==t&&(t=new g.P(this.getSize()),this._caches.set(e,t)),this._activeCache=t}setCachedValue(e){this._activeCache.set(this.getIndex(),e)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}get underlyingMemory(){let e=0;e+=(0,n.Qf)(this._boundsBuffer);for(const t of this._caches.values())e+=t.usedMemory;return e}_readGeometryDeltaDecoded(e){const t=this._readGeometry(e);return"esriGeometryPoint"!==this.geometryType&&t&&this.getInTransform()?t.deltaDecode():t}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)||this._joined.some(t=>t.hasField(e))}geometry(){const e=this.readGeometryWorldSpace(),t=(0,_.zv)(e,this.geometryType,this.hasZ,this.hasM),r=(0,l.rS)(t);if(r){if(!this.metadata.outSpatialReference)throw new Error("InternalError: Expected spatial reference to be defined");r.spatialReference=this.metadata.outSpatialReference}return r}autocastArcadeDate(e,t){return t&&t instanceof Date?this.isUnknownDateTimeField(e)?s.lY.unknownDateJSToArcadeDate(t):s.lY.dateJSAndZoneToArcadeDate(t,this.contextTimeZone??y.qU):t}isUnknownDateTimeField(e){return this.metadata.fieldsIndex.getTimeZone(e)===y.L5}field(e){let t=this.fields.get(e);if(t)switch(t.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(this.readAttribute(e,!1));case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(this.readAttribute(e,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(this.readAttribute(e,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(e,this.readAttribute(e,!0));default:return this.readAttribute(e,!1)}for(const r of this._joined)if(r.setIndex(this.getIndex()),t=r.fields.get(e),t)switch(t.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(r._readAttribute(e,!1));case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(r._readAttribute(e,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(r._readAttribute(e,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(e,r._readAttribute(e,!0));default:return this.readAttribute(e,!1)}throw new Error(`Field ${e} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(e=>e.name)}isEmpty(){return this.fields.fields.length<=0&&null==this.geometry()}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeatureForDisplay());const t=this.readLegacyFeatureForDisplay();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes}};for(const e in r.attributes){const t=r.attributes[e];t instanceof Date&&(r.attributes[e]=t.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}_getExists(){if(this._overrides){const e=this.getObjectId();return!this._overrides.hasOverride(e)}return!0}_computeDisplayCentroid(e){if(null==this.getInTransform())return(0,p.Q)(e);const t=h.z.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=(0,d.d)(t);return r?(r[1]*=-1,new m.A([],r)):null}copyInto(e){e._joined=this._joined,e._overrides=this._overrides,e._objectIdToIndex=this._objectIdToIndex,e._boundsBuffer=this._boundsBuffer,e._activeCache=this._activeCache,e._caches=this._caches,e._contextTimeZone=this._contextTimeZone}_readLegacyGeometryWorldSpace(){const e=this.readGeometryWorldSpace();return(0,_.zv)(e,this.geometryType,!1,!1)}_createDeltaQuantizedGeometryFromServerCentroid(){const e=this._readServerCentroid();if(!e)return null;const[t,r]=e.coords;return this._createDeltaQuantizedExtrudedGeometry(t,r)}_createDeltaQuantizedExtrudedGeometry(e,t){return"esriGeometryPolyline"===this.geometryType?this._createDeltaQuantizedExtrudedLine(e,t):this._createDeltaQuantizedExtrudedQuad(e,t)}_createDeltaQuantizedExtrudedQuad(e,t){return new m.A([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}_createDeltaQuantizedExtrudedLine(e,t){return new m.A([2],[e-1,t+1,1,-1])}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4680],{563:(e,t,r)=>{r.d(t,{QueueProcessor:()=>u,SharedConcurrency:()=>d});var s=r(97768),i=r(74887),n=r(9775),o=r(32587),a=r(76030),h=r(44794);class u{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,h.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??c,this._queue=new n.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,r)=>e(r))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const r=this._get(e);if(r)return r;const s=new AbortController,n=(0,i.Tw)(),o=t?(0,i.u7)(t,()=>s.abort()):null,a=(0,i.NY)(s.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),h(),n.reject((0,i.NK)())}),h=()=>{a.remove(),o?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,n),this._controllers.set(e,s),n.promise.then(h,h),this._queue.push(e),this._scheduleNext(),n.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,a._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const r=new AbortController,s=new l(e,r);this._processingItems.set(e,s),this.sharedConcurrency.current.value+=1;try{t=this.process(e,r.signal)}catch(e){this._processError(s,e)}(0,i.$X)(t)?(s.promise=t,t.then(e=>this._processResult(s,e),e=>this._processError(s,e))):this._processResult(s,t)}}class l{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class d{constructor(e){this.limit=e,this.current=(0,h.v)(0)}get full(){return this.current.value>=this.limit}}const c=new d(1/0)},2272:(e,t,r)=>{r.d(t,{Dl:()=>u,gf:()=>d,jV:()=>h,lF:()=>l});var s=r(92602),i=r(70333),n=r(4718),o=r(84952),a=r(926);function h(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function l(e,t,r){const s={};for(const i in e){if("declaredClass"===i)continue;const n=e[i];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))s[i]=n.map(e=>l(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r?.[i]);s[i]=t?e:JSON.stringify(e)}else s[i]=t?n:JSON.stringify(n);else s[i]=n}return s}async function d(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??i.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!i.id&&s.A.request.useIdentity&&await Promise.all([r.e(7330),r.e(168),r.e(148)]).then(r.bind(r,50148));const h=await i.id.getCredential(e,n);return h?.token}},5162:(e,t,r)=>{r.d(t,{HJ:()=>o,Im:()=>l,KN:()=>h});var s=r(39516),i=r(70300),n=r(8446);class o{static async create(e){const{metadata:t,definitionExpression:r}=e,i=r?await(0,s.GP)(r,t.fieldsIndex):null;return new o(t,i,r)}constructor(e,t,r){this.metadata=e,this._clause=t,this._definitionExpression=r}get hash(){return this._definitionExpression}testFeature(e){return null==this._clause||this._clause.testFeature(e)}}class a{constructor(){this.modified=new Map,this.removed=new Set}modify(e){this.modified.set(e.objectId,e),this.removed.has(e.objectId)&&this.removed.delete(e.objectId)}remove(e){this.modified.delete(e),this.removed.add(e)}get isEmpty(){return 0===this.modified.size&&0===this.removed.size}applyWhereClause(e){const t=new a;for(const[r,s]of this.modified)e.testFeature(s)?t.modified.set(r,s):t.removed.add(s.objectId);for(const e of this.removed)t.removed.add(e);return t}}class h extends i.K{constructor(e){super(),this._reader=e,this.chunkId="override",this.normalizedChunkId="override"}static fromFeatures(e,t){const r=n.K.fromOptimizedFeatures(e,t);return new h(r)}get reader(){return this._reader}get queryInfo(){return{}}get first(){return!1}get end(){return!1}get isTiled(){return!1}getTileReader(e){if(!this._reader.getSize())return null;const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}class u{constructor(e,t){this.inner=e,this.isWeak=t,this.lastWeak=null}get isStrong(){return!this.isWeak}}class l{constructor(e){this._parameters=e,this._overrides=new Map,this._update=new a,this._lastCleanup=0}update(e){this._parameters=e}hasOverride(e){return this._overrides.has(e)}onChunkInsert(e){if(this._overrides.size){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId(),r=this._overrides.get(e);if(r?.lastWeak&&(r.lastWeak=null),r?.isWeak){const e=t.readOptimizedFeatureWorldSpace(),s=r.inner?.attributes??{};e.attributes={...s,...e.attributes},r.inner=e,this._update.modify(e),this.invalidate()}}}e.registerOverrides(this)}apply(e,t){const{updateWeak:r,removeWeak:s,update:i,remove:n,release:o}=e.commands;this.invalidate();for(const e of r){const t=new u(e,!0),r=this._overrides.get(e.objectId);r?.isStrong?r.lastWeak=t:(this._overrides.set(e.objectId,t),this._update.modify(e))}for(const e of i){const t=new u(e,!1),r=this._overrides.get(e.objectId);t.lastWeak=r?.isWeak?r:r?.lastWeak??null,this._overrides.set(e.objectId,t),this._update.modify(e)}for(const e of s){const t=new u(null,!0),r=this._overrides.get(e);r?.isStrong?r.lastWeak=t:(this._overrides.set(e,t),this._update.remove(e))}for(const e of n){const t=new u(null,!1),r=this._overrides.get(e);t.lastWeak=r?.isWeak?r:r?.lastWeak??null,this._overrides.set(e,t),this._update.remove(e)}if(o.length){const e=new Set;for(const t of o){const r=this._overrides.get(t);r?.lastWeak?(this._overrides.set(t,r.lastWeak),null==r.lastWeak.inner?this._update.remove(t):this._update.modify(r.lastWeak.inner)):r&&!r.isWeak&&(this._overrides.delete(t),e.add(t))}t.forEachUnsafe(t=>{const r=t.getObjectId();e.has(r)&&(this._update.modify(t.readOptimizedFeatureWorldSpace()),e.delete(r))});for(const t of e.values())this._update.remove(t)}}clearWeakOverrides(){for(const[e,t]of this._overrides.entries())t.isWeak&&this._overrides.delete(e);this.invalidate()}cleanup(e){if(this._overrides.size<1e4)return;const t=performance.now();if(t-this._lastCleanup<1e3)return;this._lastCleanup=t;const r=this._getWeakDeletions();if(!(r.size<1e4)){for(const t of e){const e=t.reader.withoutOverrides().getCursor();for(;e.next();){const t=e.getObjectId();r.delete(t)}}for(const e of r)this._overrides.delete(e);r.size&&this.invalidate()}}takeOverrideUpdate(){const e=this._update;return e.isEmpty?null:(this._update=new a,e.applyWhereClause(this._parameters))}asChunk(){const e=this._parameters;if(this._lastOverrideParametersHash!==e.hash&&(this._lastOverrideParametersHash=e.hash,this._chunk=null),!this._chunk){const t=[];for(const r of this._overrides.values())null!=r.inner&&e.testFeature(r.inner)&&t.push(r.inner);this._chunk=h.fromFeatures(t,e.metadata)}return this._chunk}invalidate(){this._chunk=null}putWeakObjectIdsFromGlobalIds(e,t,r){for(const[s,i]of this._overrides.entries()){if(i.isWeak&&null!=i.inner){const n=i.inner.attributes[r];n&&t.has(n)&&!e.has(n)&&e.set(n,s);continue}if(null!=i.lastWeak&&null!=i.lastWeak.inner){const n=i.lastWeak.inner.attributes[r];n&&t.has(n)&&!e.has(n)&&e.set(n,s)}}}_getWeakDeletions(){const e=new Set;for(const[t,r]of this._overrides.entries())r.isWeak&&null==r.inner&&e.add(t);return e}}},8446:(e,t,r)=>{r.d(t,{K:()=>a});var s=r(90708),i=r(43334),n=r(95466),o=r(99996);class a extends o.Y{static fromFeatures(e,t){const{geometryType:r}=t,i=(0,s.Di)([],e,r,!1,!1,t.featureIdInfo);for(let t=0;t<i.length;t++)i[t].displayId=e[t].displayId;return a.fromOptimizedFeatures(i,t)}static fromFeatureSet(e,t){const r=(0,s.q3)(e,t.featureIdInfo);return a.fromOptimizedFeatureSet(r,t)}static fromOptimizedFeatureSet(e,t){const r=a.fromOptimizedFeatures(e.features,t);return r._exceededTransferLimit=e.exceededTransferLimit,r._transform=e.transform,r._fieldsIndex=new n.A(e.fields),r}static fromOptimizedFeatures(e,t,r){const s=new a(e,t);return s._fieldsIndex=t.fieldsIndex,s._transform=r,s}static empty(e){return new a([],e)}constructor(e,t){super(t),this._exceededTransferLimit=!1,this._featureIndex=-1,this._fieldsIndex=null,this._geometryType=t.geometryType,this._features=e}get fields(){return this._fieldsIndex}get geometryType(){return this._geometryType}get hasFeatures(){return!!this._features.length}get hasNext(){return this._featureIndex+1<this._features.length}get exceededTransferLimit(){return this._exceededTransferLimit}get hasZ(){return!1}get hasM(){return!1}get _current(){return this._features[this._featureIndex]}get usedMemory(){return this._current.usedMemory}getSize(){return this._features.length}getCursor(){return this.copy()}getInTransform(){return this._transform}getAttributeHash(){let e="";for(const t in this._current.attributes)e+=this._current.attributes[t];return e}getIndex(){return this._featureIndex}setIndex(e){this._featureIndex=e}getObjectId(){return this._current?.objectId}getDisplayId(){return this._current.displayId}setDisplayId(e){this._current.displayId=e}copy(){const e=new a(this._features,this.metadata);return this.copyInto(e),e}next(){for(;++this._featureIndex<this._features.length&&!this._getExists(););return this._featureIndex<this._features.length}readGeometryArea(){return(0,i.N3)(this._current)?(0,s.Rk)(this._current.geometry,2):0}_readX(){return(0,i.N3)(this._current)?this._current.geometry.coords[0]:0}_readY(){return(0,i.N3)(this._current)?this._current.geometry.coords[1]:0}_readGeometry(){return(0,i.N3)(this._current)?this._current.geometry??null:null}_readServerCentroid(){return this._current.centroid}_readAttribute(e,t){if(!this._fieldsIndex){const t=this._current.attributes[e];if(void 0!==t)return t;const r=e.toLowerCase();for(const e in this._current.attributes)if(e.toLowerCase()===r)return this._current.attributes[e];return}const r=this._fieldsIndex.get(e);if(!r)return;const s=this._current.attributes[r.name];return null==s?s:t&&this.fields.isDateField(e)?new Date(s):s}_readAttributes(){return this._current.attributes}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._transform=this._transform,e._fieldsIndex=this._fieldsIndex}}},8631:(e,t,r)=>{r.d(t,{r:()=>c,g:()=>d});var s,i=r(53177),n=r(76357),o=r(31635),a=r(91429),h=r(93223);let u=class extends n.A{static{s=this}constructor(e){super(e),this.type="inherited"}clone(){return new s}};(0,o.Cg)([(0,h.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=s=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var l=r(41628);const d={key:"type",base:n.A,typeMap:{range:l.A,"coded-value":i.A,inherited:u}};function c(e){if(!e?.type)return null;switch(e.type){case"range":return l.A.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},9012:(e,t,r)=>{function s(e,{timeZone:t,timeExtent:r}){return{$view:{scale:e,timeZone:t,timeProperties:{currentStart:r?.start,currentEnd:r?.end}}}}r.d(t,{N:()=>s})},9775:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach(t=>{e(t)||this._items.delete(t)}),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},16630:(e,t,r)=>{r.d(t,{s:()=>u}),r(44208);var s=r(69397),i=r(92722),n=r(57733),o=r(99996);let a;const h=new TextDecoder;class u extends o.Y{constructor(e,t,r,i,n=new Uint32Array(r.size())){super(e),this._fields=t,this._inner=r,this._fileIndex=i,this._displayIds=n,this._index=-1,this.usedMemory=s.qK,this._size=this._inner.size(),e.featureIdInfo.type}destroy(){super.destroy(),this._inner.free()}get fields(){return this._fields}get geometryType(){return this.metadata.geometryType}get hasFeatures(){return!0}get hasNext(){throw new Error("Method not implemented.")}get exceededTransferLimit(){return!1}get hasZ(){return!1}get hasM(){return!1}getInTransform(){return null}getSize(){return this._size}getCursor(){return this.copy()}getAttributeHash(){let e="";for(const t of this.fields.fields)e+=this._readAttribute(t.name,!1)+".";return e}getObjectId(){return this._fileIndex<<24|this._inner.rowId(this._index)}getDisplayId(){return this._displayIds[this._index]}setDisplayId(e){this._displayIds[this._index]=e}setIndex(e){this._index=e}getBoundsXMin(){return this._inner.boundsXMin(this._index)}getBoundsYMin(){return this._inner.boundsYMin(this._index)}getBoundsXMax(){return this._inner.boundsXMax(this._index)}getBoundsYMax(){return this._inner.boundsYMax(this._index)}setBoundsXMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsXMax(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMax(e){throw new Error("InternalError: Setting bounds is unsupported")}getIndex(){return this._index}next(){for(;++this._index<this._size&&!this._getExists(););return this._index<this._size}readGeometryArea(){return this.readGeometryForDisplay()?.area()??0}copy(){const e=new u(this.metadata,this._fields,this._inner,this._fileIndex,this._displayIds);return this.copyInto(e),e}copyInto(e){super.copyInto(e),e._index=this._index}readGeometryForDisplayTransformed(e){const[t,r]=e.translate,[s,o]=e.scale;return a||(a=n.QuantizedGeometryBuffer.new()),this._inner.transformGeometry(a,t,r,s,o,this._index)?new i.A(a.readLengthsUnsafe(),a.readCoordsUnsafe(),this.hasZ,this.hasM):null}_readGeometry(e){const t=this._inner.readCoordsUnsafe(this._index),r=this._inner.readLengthsUnsafe(this._index);return t&&r?new i.A(r,t,this.hasZ,this.hasM):null}_readX(){return this._inner.readX(this._index)}_readY(){return this._inner.readY(this._index)}_readServerCentroid(){return null}_readAttribute(e,t){const r=this.fields.get(e);if(!r)return;if(null==r.column)return this.getObjectId();const s=this._inner.readAttribute(this._index,r.column);if(null==s)return s;if("esriFieldTypeString"===r.type){const e=this._inner.readAttribute(this._index,r.column);return h.decode(e)}const i=this.fields.isDateField(r.name);return t?null==s?s:i?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._fields.fields)if(null!=t.column&&null!=t.column){const r=this._readAttribute(t.name,!1);void 0!==r&&(e[t.name]=r)}return e.__OBJECTID=this.getObjectId(),e}}},20437:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(31635),n=r(66552),o=r(25482),a=r(91429),h=r(56507),u=r(8631),l=r(98453),d=r(36005),c=r(93223);const p=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let _=class extends o.o{static{s=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?p.fromJSON(r.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],_.prototype,"alias",void 0),(0,i.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],_.prototype,"defaultValue",void 0),(0,i.Cg)([(0,a.MZ)()],_.prototype,"description",void 0),(0,i.Cg)([(0,d.w)("description")],_.prototype,"readDescription",null),(0,i.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],_.prototype,"domain",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"editable",void 0),(0,i.Cg)([(0,a.MZ)({type:h.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],_.prototype,"length",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"nullable",void 0),(0,i.Cg)([(0,c.e)(l.m)],_.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)()],_.prototype,"valueType",void 0),(0,i.Cg)([(0,d.w)("valueType",["description"])],_.prototype,"readValueType",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],_.prototype,"visible",void 0),_=s=(0,i.Cg)([(0,a.$K)("esri.layers.support.Field")],_)},28923:(e,t,r)=>{r.d(t,{j:()=>i});var s=r(70300);class i extends s.K{constructor(e,t,r,s,i=0){super(),this._reader=e,this._queryJSON=t,this._page=r,this._end=s,this.fileIndex=i,this.chunkId=`${this.fileIndex}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader}get first(){return 0===this._page}get end(){return this._end}get queryInfo(){return{type:"snapshot",chunkId:this.chunkId,queryJSON:this._queryJSON,page:this._page,size:this.size(),end:this.end}}get isTiled(){return!1}getTileReader(e){const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}},30661:(e,t,r)=>{r.d(t,{Z:()=>n});var s=r(43334),i=r(8446);class n{static{this.Shared=new n}getObjectId(e){return e.getObjectId()}getAttributes(e){return e.readAttributes()}getAttribute(e,t){return e.readAttribute(t)}getAttributeAsTimestamp(e,t){return e.readAttributeAsTimestamp(t)}cloneWithGeometry(e,t,r){const n=e.readAttributes(),o=new s.Om(t,n,null,e.getObjectId(),e.getDisplayId()),a=i.K.fromOptimizedFeatures([o],e.metadata);return a.setIndex(0),a}getGeometry(e){return e.readGeometryWorldSpace()}getCentroid(e,t){return e.readCentroidForDisplay()}}},32011:(e,t,r)=>{r.d(t,{d:()=>u});var s=r(19419),i=r(537),n=r(12359),o=r(95108),a=r(12176);const h=222045e-19;function u(e){if(0===e.totalSize)return null;const t=(0,i.z8)(e);if(!t)return null;const r=4*(Math.abs(t[0])+Math.abs(t[2])+Math.abs(t[1])+Math.abs(t[3])+1)*h;let o=0,a=0;e.reset();for(let t=0;e.nextPath();t++){const r=e.getCurrentRingArea();r>a&&(a=r,o=t)}if(e.seekPath(o),0===e.pathSize)return null;e.seekPathStart();const u=(0,i.B$)(e);if(Math.abs(a)<=2*r*r)return[(u[0]+u[2])/2,(u[1]+u[3])/2];e.seekPathStart();const p=(0,n.w2)(e,(0,s.vt)());if(null===p)return null;if(e.totalPoints<4)return p;const _=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],m=[NaN,NaN,NaN,NaN];let y=!1,g=d(p,e,!0);0===g.distance&&(y=!0,_[0][0]=p[0],_[0][1]=p[1],g=d(p,e,!1)),f[0]=g.distance,m[0]=0;const x=[NaN,NaN];let w=!1,T=.25,M=-1,S=NaN;do{if(S=NaN,_[1]=c(e,v(u[0],u[2],T),0,t),isNaN(_[1][0])||isNaN(_[1][1])||(g=d(_[1],e,!1),S=g.distance),!isNaN(S)&&S>r&&l(_[1],e))w=!0,f[1]=S,m[1]=b(_[1],p);else if(!isNaN(S)&&S>M&&(M=S,x[0]=_[1][0],x[1]=_[1][1]),T-=.01,T<.1){if(!(M>=0))break;w=!0,f[1]=M,_[1][0]=x[0],_[1][1]=x[1],m[1]=b(_[1],p)}}while(!w);w=!1,T=.5,M=-1;let A=.01,F=1;do{if(S=NaN,_[2]=c(e,v(u[0],u[2],T),0,t),isNaN(_[2][0])||isNaN(_[2][1])||(g=d(_[2],e,!1),S=g.distance),!isNaN(S)&&S>r&&l(_[2],e))w=!0,f[2]=S,m[2]=b(_[2],p);else if(!isNaN(S)&&S>M)M=S,x[0]=_[2][0],x[1]=_[2][1];else if(S>M&&(M=S,x[0]=_[2][0],x[1]=_[2][1]),T=.5+A*F,A+=.01,F*=-1,T<.3||T>.7){if(!(M>=0))break;w=!0,f[2]=M,_[2][0]=x[0],_[2][1]=x[1],m[2]=b(_[2],p)}}while(!w);w=!1,T=.75,M=-1;do{if(S=NaN,_[3]=c(e,v(u[0],u[2],T),0,t),isNaN(_[3][0])||isNaN(_[3][1])||(g=d(_[3],e,!1),S=g.distance),!isNaN(S)&&S>r&&l(_[3],e))w=!0,f[3]=S,m[3]=b(_[3],p);else if(S>M&&(M=S,x[0]=_[3][0],x[1]=_[3][1]),T+=.01,T>.9){if(!(M>=0))break;w=!0,f[3]=M,_[3][0]=x[0],_[3][1]=x[1],m[3]=b(_[3],p)}}while(!w);const C=[0,1,2,3],P=y?0:1;let O;for(let e=P;e<4;e++)for(let e=P;e<3;e++){const t=m[e],r=m[e+1];I(t,r)>0&&(O=C[e],C[e]=C[e+1],C[e+1]=O,m[e]=r,m[e+1]=t)}let N=P,k=0,z=0;for(let e=P;e<4;e++){switch(e){case 0:z=2*f[C[e]];break;case 1:z=1.66666666*f[C[e]];break;case 2:z=1.33333333*f[C[e]];break;case 3:z=f[C[e]]}z>k&&(k=z,N=C[e])}return _[N]}function l(e,t){let r,s,i,n,o=0;for(t.reset();t.nextPath()&&t.nextPoint();)for(r=t.x,s=t.y;t.nextPoint();r=i,s=n)i=t.x,n=t.y,s>e[1]!=n>e[1]&&((i-r)*(e[1]-s)-(n-s)*(e[0]-r)>0?o++:o--);return 0!==o}function d(e,t,r){if(r&&l(e,t))return{coord:e,distance:0};let s=1/0,i=0,n=0,a=[0,0],h=[0,0];const u=[0,0];for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(a[0]=t.x,a[1]=t.y;t.nextPoint();a=h){h=[t.x,t.y],(0,o.gR)(u,e,a,h);const r=b(e,u);r<s&&(s=r,i=u[0],n=u[1])}return{coord:[i,n],distance:Math.sqrt(s)}}function c(e,t,r,i){const n=[t,0];let o=1/0,h=1/0,u=!1,l=!1;const d=[[t,i[1]-1],[t,i[3]+1]],c=[0,0],_=[0,0],f=[0,0],m=[[0,0],[0,0]],y=(0,s.vt)();for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(m[0][0]=e.x,m[0][1]=e.y;e.nextPoint();m[0][0]=m[1][0],m[0][1]=m[1][1]){if(m[1][0]=e.x,m[1][1]=e.y,null===p(y,m))continue;if(_[0]=d[0][0],_[1]=d[0][1],f[0]=d[1][0],f[1]=d[1][1],0===g(y,_,f))continue;if(!(0,a.Ql)(d[0],d[1],m[0],m[1],c))continue;const t=c[1];o>h?t<o&&(o=t,u=!0):t<h&&(h=t,l=!0)}return u&&l?n[1]=(o+h)/2:n[0]=n[1]=NaN,n}function p(e,t){if(t.length<2)return null;e||(e=(0,s.vt)());const[r,i]=t[0],[n,o]=t[1];return e[0]=Math.min(r,n),e[1]=Math.min(i,o),e[2]=Math.max(r,n),e[3]=Math.max(i,o),e}const _=1,f=4,m=3,y=12;function g(e,t,r){let s=x(t,e),i=x(r,e);const n=e[0],o=e[1],a=e[2],h=e[3];if(s&i)return 0;if(!(s|i))return 4;const u=(s?1:0)|(i?2:0);do{const u=r[0]-t[0],l=r[1]-t[1];if(u>l)s&m?(s&_?(t[1]+=l*(n-t[0])/u,t[0]=n):(t[1]+=l*(a-t[0])/u,t[0]=a),s=x(t,e)):i&m?(i&_?(r[1]+=l*(n-r[0])/u,r[0]=n):(r[1]+=l*(a-r[0])/u,r[0]=a),i=x(r,e)):s?(s&f?(t[0]+=u*(o-t[1])/l,t[1]=o):(t[0]+=u*(h-t[1])/l,t[1]=h),s=x(t,e)):(i&f?(r[0]+=u*(o-r[1])/l,r[1]=o):(r[0]+=u*(h-r[1])/l,r[1]=h),i=x(r,e));else if(s&y?(s&f?(t[0]+=u*(o-t[1])/l,t[1]=o):(t[0]+=u*(h-t[1])/l,t[1]=h),s=x(t,e)):i&y?(i&f?(r[0]+=u*(o-r[1])/l,r[1]=o):(r[0]+=u*(h-r[1])/l,r[1]=h),i=x(r,e)):s?(s&_?(t[1]+=l*(n-t[0])/u,t[0]=n):(t[1]+=l*(a-t[0])/u,t[0]=a),s=x(t,e)):(i&_?(r[1]+=l*(n-r[0])/u,r[0]=n):(r[1]+=l*(a-r[0])/u,r[0]=a),i=x(r,e)),s&i)return 0}while(s|i);return u}function x(e,t){return(e[0]<t[0]?1:0)|(e[0]>t[2]?1:0)<<1|(e[1]<t[1]?1:0)<<2|(e[1]>t[3]?1:0)<<3}function v(e,t,r){return e+(t-e)*r}function b(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}function I(e,t){if(e<t)return-1;if(e>t)return 1;if(e===t)return 0;const r=isNaN(e),s=isNaN(t);return r<s?-1:r>s?1:0}},32587:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e){this._observable=new i.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach((r,s)=>e.call(t,r,s,this),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const r of t){if(!this._map.has(r))continue;const t=this._map.get(r),s=e(t,r);s!==t&&this.set(r,s)}})}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},35258:(e,t,r)=>{r.d(t,{i:()=>n});var s=r(16930),i=r(95466);class n{static minimal(e,t,r=[]){return new n({geometryType:e,fieldsIndex:new i.A(r).toJSON(),featureIdInfo:{type:"object-id",fieldName:t},subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null})}static createFeature(e){return new n(e)}constructor(e){let t;this._options=e,this._fieldsIndex=i.A.fromJSON(e.fieldsIndex),e.spatialReference&&(e.spatialReference instanceof s.A?this._spatialReference=e.spatialReference:this._spatialReference=s.A.fromJSON(e.spatialReference)),e.outSpatialReference&&(e.outSpatialReference instanceof s.A?this._outSpatialReference=e.outSpatialReference:this._outSpatialReference=s.A.fromJSON(e.outSpatialReference)),"object-id"===e.featureIdInfo.type&&(t=e.featureIdInfo.fieldName),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:t,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0,datesInUnknownTimezone:this._options.timeReferenceUnknownClient??void 0,dateFieldsTimeZone:this._options.dateFieldsTimeZone??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return"esriGeometryMultiPatch"===this._options.geometryType?"esriGeometryPolygon":this._options.geometryType}get serviceGeometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get featureIdInfo(){return this._options.featureIdInfo}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get outSpatialReference(){return this._outSpatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}weakCloneWithAdditionalFields(e){return new n({fieldsIndex:{fields:[...this._fieldsIndex.fields,...e],timeZoneByFieldName:null},geometryType:this.geometryType,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.spatialReference,outSpatialReference:this.outSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types})}}},36708:(e,t,r)=>{r.d(t,{C_:()=>c,OH:()=>f,Vh:()=>m,on:()=>d,pc:()=>y,wB:()=>h,z7:()=>u});var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function h(e,t,r={}){return l(e,t,r,p)}function u(e,t,r={}){return l(e,t,r,_)}function l(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function d(e,t,r,o={}){let a=null,u=null,l=null;function d(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,n.xt)(l),r(e)}const p=h(e,(e,r)=>{d(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return l=(0,i.hA)(()=>{p.remove(),d()}),l}function c(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function h(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{h(),n((0,o.NK)())}),l(e,e=>{h(),s(e)},{sync:!1,once:!0},t??p)])})}(e,_,t)}function p(e){return!0}function _(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},36745:(e,t,r)=>{r.d(t,{z:()=>a});var s=r(4718),i=r(51118),n=r(60408),o=r(92722);class a{static fromOptimized(e,t,r=1){return(new h).initialize(e,t,r)}static fromJSON(e){const[t,r]=l(e),s=(0,n.Pv)(e),i=(0,n.W0)(e);return(new d).initialize(t,r,s,i,1)}static fromOptimizedCIM(e,t,r=1){return(new c).initialize(e,t,r)}static fromJSONCIM(e,t=1){const[r,s]=l(e),i=(0,n.Pv)(e),o=(0,n.W0)(e);return(new p).initialize(r,s,i,o,t)}static fromFeatureSetReader(e){const t=e.readGeometryForDisplay(),r=e.geometryType;return t&&r?this.fromOptimized(t,r):null}static fromFeatureSetReaderCIM(e){const t=e.readGeometryForDisplay(),r=e.geometryType;return t&&r?this.fromOptimizedCIM(t,r):null}static createEmptyOptimized(e,t=!1,r=!1,s=1){return(new c).initialize(new o.A([],[],t,r),e,s)}static createEmptyJSON(e,t=!1,r=!1){return(new d).initialize([],e,t,r,1)}static createEmptyOptimizedCIM(e,t=!1,r=!1,s=1){return(new c).initialize(new o.A([],[],t,r),e,s)}static createEmptyJSONCIM(e,t=!1,r=!1,s=1){return(new p).initialize([],e,t,r,s)}asJSON(){const e=(0,i.x)(this),{hasZ:t,hasM:r}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:e[0][0][0],ymin:e[0][0][1],xmax:e[0][2][0],ymax:e[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:e.flat(),hasZ:t,hasM:r}:"esriGeometryPoint"===this.geometryType?{x:e[0][0][0],y:e[0][0][1],z:t?e[0][0][2]:void 0,m:r?e[0][0][t?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:e,hasZ:t,hasM:r}:{paths:e,hasZ:t,hasM:r}}getCurrentRingArea(){if(this.pathSize<3)return 0;let e,t,r=0;if(this.seekPathStart(),!this.nextPoint())return 0;e=this.x,t=this.y;const s=e,i=t;for(;this.nextPoint();)r+=(e-this.x)*(t+this.y),e=this.x,t=this.y;return r+=(e-s)*(t+i),-.5*r}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(e,t,r){return this.geometryType=t,this._stride=e.stride,this._geometry=e,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=r,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(e){if(e>=0&&e<this.totalSize){if(this._pathIndex<e)for(;this._pathIndex<e&&this.nextPath(););else if(this._pathIndex>e)for(;this._pathIndex>e&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(e){const t=this._pathOffset+e*this._stride;return t>=0&&t<this._end&&(this._pointOffset=t,!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 e=this._end,t=this._geometry.coords,r=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],t.slice(r,e),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const e=this._end,t=this._stride,r=this._geometry.coords;let s=0;for(let i=this._pathOffset+t;i<e;i+=t){const e=r[i-t],n=r[i-t+1],o=r[i]-e,a=r[i+1]-n;s+=Math.sqrt(o*o+a*a)}return s}startPath(){this._geometry.lengths.push(0)}pushPath(e){this.startPath(),this.pushPoints(e)}pushPoint(e){for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]++}pushXY(e,t){this._geometry.coords.push(e,t),this._geometry.lengths[this.totalSize-1]++}pushPoints(e){for(const t of e)for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]+=e.length}pushCursor(e){const t=e.asOptimized();this._geometry.coords.push(...t.coords),this._geometry.lengths.push(...t.lengths)}asOptimized(){const e=this._geometry.clone();if(1!==this.yFactor)for(let t=1;t<e.coords.length;t+=this._stride)e.coords[t]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(e.lengths.length=0),e}isClosed(){const e=this._geometry.coords,t=this._pathOffset,r=this._end-this._stride;for(let s=0;s<this._stride;s++)if(e[t+s]!==e[r+s])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((e,t)=>e+t)}get pathSize(){const{lengths:e}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>e.length-1?0:e[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(e){this._geometry.coords[this._pointOffset]=e}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(e){this._geometry.coords[this._pointOffset+1]=this.yFactor*e}get z(){return this._geometry.coords[this._pointOffset+2]}set z(e){this._geometry.coords[this._pointOffset+2]=e}get m(){const e=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+e]}set m(e){this._geometry.coords[this._pointOffset+3]=e}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function u(e){const t=[e.x,e.y];return e.z&&t.push(e.z),e.m&&t.push(e.m),t}function l(e){return(0,n.Bi)(e)?[e.rings,"esriGeometryPolygon"]:(0,n.Rg)(e)?[e.paths,"esriGeometryPolyline"]:(0,n.U9)(e)?[[e.points],"esriGeometryMultipoint"]:(0,n.ZC)(e)?[[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(e)?[[[u(e)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class d extends a{initialize(e,t,r,s,i){return this._paths=e,this.geometryType=t,this.hasZ=r,this.hasM=s,this._pathIndex=this._pointIndex=-1,this.yFactor=i,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(e){return this._pathIndex=e,this._pointIndex=-1,e>=0&&e<this.totalSize&&(this._currentPath=this._paths[e],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(e){return e>=0&&e<this._currentPath.length&&(this._pointIndex=e,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 e=this._currentPath.length,t=this._currentPath;let r=0;for(let s=1;s<e;s++){const e=t[s-1],i=t[s],n=e[0],o=e[1],a=i[0]-n,h=i[1]-o;r+=Math.sqrt(a*a+h*h)}return r}startPath(){this._paths.push([])}getCurrentPath(){return(new d).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(e){this._paths.push(e)}pushPoint(e){this._paths[this.totalSize-1].push(e)}pushXY(e,t){this._paths[this.totalSize-1].push([e,t])}pushPoints(e){this._paths[this.totalSize-1].push(...e)}pushCursor(e){const t=(0,i.x)(e);for(const e of t)this.pushPath(e)}asOptimized(){const{hasZ:e,hasM:t}=this,r=new o.A([],[],e,t),{coords:s,lengths:i}=r;if("esriGeometryPoint"===this.geometryType)s.push(...this._paths[0][0]),i.length=0;else for(const r of this._paths){for(const i of r)s.push(i[0]),s.push(i[1]*this.yFactor),e&&s.push(i[2]),t&&s.push(i[this._mIndex]);i.push(r.length)}return r}isClosed(){const e=this._currentPath[0],t=this._currentPath[this._currentPath.length-1];for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}clone(){return(new d).initialize((0,s.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(e=>e.length).reduce((e,t)=>e+t)}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(e){this._currentPoint[0]=e}get y(){return this.yFactor*this._currentPoint[1]}set y(e){this._currentPoint[1]=this.yFactor*e}get z(){return this._currentPoint[2]}set z(e){this._currentPoint[2]=e}get m(){return this._currentPoint[this._mIndex]}set m(e){this._currentPoint[this._mIndex]=e}get pathIndex(){return this._pathIndex}}class c extends h{initialize(e,t,r){return super.initialize(e,t,r),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(e=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const e=(new c).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return e._controlPoints=this._controlPoints,e}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(e){this._controlPoints[this.pathIndex].add(e)}getControlPointAt(e){return this._controlPoints[this.pathIndex].has(e)}}class p extends d{initialize(e,t,r,s,i){return super.initialize(e,t,r,s,i)}clone(){return(new p).initialize((0,s.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(e){this._paths[this.pathIndex][e][4]=1}getControlPointAt(e){return 1===this._paths[this.pathIndex][e][4]}}},38976:(e,t,r)=>{r.d(t,{n:()=>n});var s=r(76213),i=r(9012);class n{constructor(e){this._options=e}insert(e,t){const r=e.getCursor(),{arcadeContextInfo:s,scale:n}=this._options,o=(0,i.N)(n,s);for(;r.next();)this._insertFeature(r,o,this._options.sqlOptions,t)}_insertFeature(e,t,r,i){const{featureFilter:n}=this._options;if(null!==n&&!n.check(e,r))return;let o=0,a=0;if("esriGeometryPoint"===e.geometryType)o=e.readXWorldSpace(),a=e.readYWorldSpace();else{if(i){const t=e.readCentroidForDisplay();if(null==t)return;const[r,i]=t.coords;if(r<0||r>s.CQ||i<0||i>s.CQ)return}const t=e.readCentroidWorldSpace();if(null==t)return;o=t.coords[0],a=t.coords[1]}this._insert(e,o,a,t)}}},39357:(e,t,r)=>{r.d(t,{A:()=>a});var s,i=r(31635),n=r(25482),o=r(91429);let a=s=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=s=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},39412:(e,t,r)=>{r.d(t,{N:()=>n});var s=r(2741);let i=null;async function n(){return i||(i=async function(){const e=await r.e(7733).then(r.bind(r,57733));return await e.default({module_or_path:(0,s.s)("esri/libs/parquet/pkg/bundle_bg.wasm")}),e}()),i}},41628:(e,t,r)=>{r.d(t,{A:()=>h});var s,i=r(31635),n=r(91429),o=r(76357),a=r(93223);let h=class extends o.A{static{s=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new s({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],h.prototype,"maxValue",void 0),(0,i.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],h.prototype,"minValue",void 0),(0,i.Cg)([(0,a.e)({range:"range"})],h.prototype,"type",void 0),h=s=(0,i.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],h)},44320:(e,t,r)=>{r.d(t,{I:()=>h});var s=r(65529),i=r(44208),n=r(70328),o=r(30661),a=r(5162);class h{constructor(){this._chunks=new Map,this._chunksToRemove=[],this.events=new s.bk,this.featureAdapter=new o.Z}destroy(){this.clear()}clear(){for(const e of this._chunks.values())this._chunksToRemove.push(e);this._chunks.clear(),this._overrides?.clearWeakOverrides()}get usedMemory(){let e=0;for(const t of this._chunks.values())e+=t.usedMemory;return e}async update(e){if(this._overrides){const t=await a.HJ.create(e);this._overrides.update(t)}this._schema=e}*chunks(){this._overrides&&(yield this._overrides.asChunk()),yield*this._chunks.values()}insert(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.insert`),this._overrides?.onChunkInsert(e),this._chunks.set(e.chunkId,e),this.events.emit("changed")}remove(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.remove`),this._chunks.delete(e.chunkId),this._chunksToRemove.push(e)}removeById(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e}] SourceChunkStore.remove`);const t=this._chunks.get(e);this._chunks.delete(e),t&&this._chunksToRemove.push(t)}cleanup(){const e=this._chunksToRemove;return this._chunksToRemove=[],this._overrides?.cleanup(this._chunks.values()),e}async applyOverride(e){if(null==this._overrides){const e=await a.HJ.create(this._schema);this._overrides=new a.Im(e);for(const e of this._chunks.values())this._overrides.onChunkInsert(e)}this._overrides.apply(e,this),this.events.emit("changed");for(const e of this._chunks.values())e.invalidate()}takeOverrideUpdate(){return this._overrides?.takeOverrideUpdate()}refresh(){this.events.emit("refresh")}forEach(e){const t=new Set;for(const r of this.chunks()){const s=r.reader.getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s.copy()),t.add(r))}}}forEachUnsafe(e){const t=new Set;for(const r of this.chunks()){const s=r.reader.getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s),t.add(r))}}}mapObjectIdsFromGlobalIds(e,t){const r=new Map,s=new Set(e);return this._overrides?.putWeakObjectIdsFromGlobalIds(r,s,t),this._forEachUnsafeIgnoreOverrides(e=>{const i=e.readAttribute(t);if(i&&s.has(i)&&!r.has(i)){const t=e.getObjectId();r.set(i,t)}}),r}forEachInBounds(e,t){const r=new Set;for(const s of this.chunks()){const i=s.queryFeaturesInBounds(e);for(;i.next();){const e=i.getObjectId();r.has(e)||(t(i.copy()),r.add(e))}}}forEachBounds(e,t){const r=(0,n.vt)();for(const s of e)s.getBounds(r)&&t(r)}_forEachUnsafeIgnoreOverrides(e){const t=new Set;for(const r of this._chunks.values()){const s=r.reader.withoutOverrides().getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s),t.add(r))}}}}},48163:(e,t,r)=>{function s(){return[0,0]}function i(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function o(){return n(1,1)}function a(){return n(1,0)}function h(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,o8:()=>i,vt:()=>s});const u=o(),l=a(),d=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:l,UNIT_Y:d,ZEROS:[0,0],clone:i,create:s,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let s=0;s<r;++s)t[s]=e[s];return t},fromValues:n,ones:o,unitX:a,unitY:h,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48526:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(31635),n=r(4718),o=r(91429),a=r(5443),h=r(91075),u=r(86738),l=r(16930),d=r(90634),c=r(56993),p=r(43937);let _=s=class extends h.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:r,hasZ:s,spatialReference:i}=e;switch(t??=[],t?.at(0)?.length){case 4:s??=!0,r??=!0;break;case 3:s??=!0!==r,r??=!s;break;default:s??=!1,r??=!1}return i??=l.A.WGS84,{...e,hasM:r,hasZ:s,points:t,spatialReference:i}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,d.ge)(this);return e?new a.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,n.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:r,hasZ:i}=this;return new s({points:(0,n.o8)(e),spatialReference:t.clone(),hasM:r,hasZ:i})}addPoint(e){return(0,c.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],r={x:t[0],y:t[1],spatialReference:this.spatialReference};let s=2;return this.hasZ&&(r.z=t[2],s=3),this.hasM&&(r.m=t[s]),new u.A(r)}removePoint(e){if(!this._validateInputs(e))return null;const t=new u.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,c.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],_.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],_.prototype,"extent",null),(0,i.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],_.prototype,"points",void 0),(0,i.Cg)([(0,p.K)("points")],_.prototype,"writePoints",null),_=s=(0,i.Cg)([(0,o.$K)("esri.geometry.Multipoint")],_),_.prototype.toJSON.isDefaultToJSON=!0},50115:(e,t,r)=>{r.d(t,{OP:()=>o,V4:()=>i,rZ:()=>n}),r(44208);var s=r(53966);function i(e,t,r){if(null==e)return null;const i=t.readArcadeFeature();t.contextTimeZone=r.$view?.timeZone;try{return e.evaluate(i,r)}catch(e){return s.A.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",e),null}}function n(e){return null==e||e===1/0||e===-1/0||"number"==typeof e&&isNaN(e)}function o(e,t,r,s){if(null==e)return null!=s?s:null;const i=t.readArcadeFeature();t.contextTimeZone=r.$view?.timeZone;const o=e.evaluate(i,r);return n(o)?null!=s?s:null:o}},52350:(e,t,r)=>{r.d(t,{e:()=>a});var s=r(69397),i=r(62577),n=r(90708),o=r(99996);class a extends o.Y{static from(e,t){if(e instanceof this){const r=new Set(t),s=e._indices.filter(e=>r.has(e));return new a(e._reader,s)}return new a(e.copy(),t)}constructor(e,t){super(e.metadata),this._currentIndex=-1,this._displayTransform=null,this._reader=e,this._indices=t}setTransformForDisplay(e){const t=this._reader.getInTransform();if(null==t)return void(this._displayTransform=(0,i.Q1)(e));const r=(0,i.Q1)(t),s=(0,i.Q1)(e),[n,o]=r.scale,[a,h]=r.translate,[u,l]=s.scale,[d,c]=s.translate,p=n/u,_=o/l,f=(a-d)/u,m=(h-c)/l;this._displayTransform={originPosition:"lowerLeft",scale:[1/p,1/_,1,1],translate:[-f/p,-m/_,0,0]}}getInTransform(){return this._reader.getInTransform()}get fields(){return this._reader.fields}get hasNext(){return this._currentIndex+1<this._indices.length}getSize(){return this._indices.length}getCursor(){return this.copy()}copy(){const e=new a(this._reader.copy(),this._indices);return e._currentIndex=this._currentIndex,e._displayTransform=this._displayTransform,e._processorAttributes=this._processorAttributes,e}get contextTimeZone(){return this._reader.contextTimeZone}set contextTimeZone(e){this._reader.contextTimeZone=e}get usedMemory(){return s.qK+this._reader.usedMemory}setProcessorAttributes(e){this._processorAttributes=Object.assign(this._processorAttributes??{},e)}_nextIndex(){return++this._currentIndex<this._indices.length&&(this._reader.setIndex(this._indices[this._currentIndex]),!0)}next(){for(;this._nextIndex()&&!this._reader._getExists(););return this._currentIndex<this._indices.length}readXForDisplay(){return this._displayTransform?(0,i.IE)(this._displayTransform,this._reader.readXForDisplay()):this._reader.readXForDisplay()}readYForDisplay(){return this._displayTransform?(0,i.B2)(this._displayTransform,this._reader.readYForDisplay()):this._reader.readYForDisplay()}readGeometryForDisplay(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform):this._reader.readGeometryForDisplay()}readCentroidForDisplay(){const e=this._reader.readCentroidForDisplay()?.clone();if(e){const[t,r]=e.coords;this._displayTransform&&(e.coords[0]=(0,i.IE)(this._displayTransform,t),e.coords[1]=(0,i.B2)(this._displayTransform,r))}return e}get geometryType(){return this._reader.geometryType}get hasFeatures(){return this._reader.hasFeatures}get exceededTransferLimit(){return this._reader.exceededTransferLimit}get hasZ(){return this._reader.hasZ}get hasM(){return this._reader.hasM}readAttribute(e,t=!1){const r=this._reader.readAttribute(e,t);return null==r&&this._processorAttributes?this._processorAttributes[e]:r}readAttributes(){return{...this._processorAttributes,...this._reader.readAttributes()}}joinAttributes(e){return this._reader.joinAttributes(e)}getBounds(e){return this._reader.getBounds(e)}getAttributeHash(){return this._reader.getAttributeHash()}getObjectId(){return this._reader.getObjectId()}getDisplayId(){return this._reader.getDisplayId()}setDisplayId(e){return this._reader.setDisplayId(e)}setIndex(e){return this._reader.setIndex(e)}getIndex(){return this._reader.getIndex()}readXWorldSpace(){return this._reader.readXWorldSpace()}readYWorldSpace(){return this._reader.readYWorldSpace()}_readX(){return this._reader.readXForDisplay()}_readY(){return this._reader.readYForDisplay()}_readServerCentroid(){return this._reader._readServerCentroid()}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return(0,n.zv)(e,this.geometryType,!1,!1)}readGeometryArea(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform)?.area()??0:this._reader.readGeometryArea()}readGeometryWorldSpace(){return this._reader.readGeometryWorldSpace()}_readGeometry(){return this._reader._readGeometry()}_readAttribute(e,t){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}_readAttributes(){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}readArcadeFeature(){return this._reader.readArcadeFeature()}geometry(){return this._reader.geometry()}field(e){return this._reader.field(e)}hasField(e){return this._reader.hasField(e)}setField(e,t){return this._reader.setField(e,t)}keys(){return this._reader.keys()}castToText(e=!1){return this._reader.castToText(e)}}},53177:(e,t,r)=>{r.d(t,{A:()=>l});var s,i=r(31635),n=r(4718),o=r(91429),a=r(39357),h=r(76357),u=r(93223);let l=class extends h.A{static{s=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some(e=>(String(e.code)===r&&(t=e.name),!!t))}return t}clone(){return new s({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,i.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],l.prototype,"codedValues",void 0),(0,i.Cg)([(0,u.e)({codedValue:"coded-value"})],l.prototype,"type",void 0),l=s=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],l)},60408:(e,t,r)=>{function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function i(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function h(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":i(e)?"esriGeometryMultipoint":null:null}function l(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function d(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}r.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>l,Rg:()=>o,U9:()=>i,W0:()=>d,ZC:()=>s,fT:()=>n,uW:()=>h})},63664:(e,t,r)=>{r.d(t,{B:()=>s});class s{constructor(e){this._statistics=e}get statistics(){return this._statistics}}},63892:(e,t,r)=>{r.d(t,{DV:()=>p,Xj:()=>f,hD:()=>_});var s=r(11254),i=r(49186),n=(r(44208),r(563)),o=r(84952),a=r(39412);const h=new n.QueueProcessor({concurrency:8,process:async e=>{const{data:t}=await(0,s.A)(e.url,e.options);return t}}),u=e=>async function(t,r,s,i){const n=e?.(),o=n??{};return await h.push({url:t,options:{responseType:"array-buffer",query:o,headers:{range:`bytes=${r}-${s}`}}})},l=e=>async function(t){if((0,o.w8)(t)){const{data:e}=await(0,s.A)(t,{responseType:"blob"});return e.size}const{data:r}=await(0,s.A)(t,{responseType:"native",method:"head",query:e?.()}),i=r.headers.get("Content-Length");if(null==i)throw new Error("Unable to parse content length");return parseInt(i,10)};function d(e,t){switch(t){case"esriGeometryPoint":return e.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return e.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return e.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return e.GeometryType.Multipoint;default:throw new i.A("parquet",`Found unexpected GeometryType: ${t}`)}}function c(e,t){const r=e.GeometryInfo.new();t.geometry&&r.setGeometry(function(e,t){const r=t.encoding,s=d(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(r.type){case"wkb":return e.GeometryField.fromWkb(r.field,i,s);case"location":{const{yField:t,xField:n}=r;return e.GeometryField.fromLocation(t,n,i,s)}}}(e,t.geometry));const s=t.displayOptimization;if(s){const{index:t,parentColumn:i}=s,n=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const s=e.DisplayOptimizationZBuilder.new();s.setCodeField(n(t.code)),s.setXColumn(n(t.xColumn)),s.setYColumn(n(t.yColumn)),s.setCooordinatePrecision(t.coordinatePrecision),s.setFullExtent(t.fullExtent),s.setSpatialReference(t.wkid,t.wkt),s.setHasZ(!!t.zColumn),s.setHasM(!!t.mColumn),r.setOptmizationZ(s)}if("xz"===t.type){const s=d(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(n(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(s),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const r of t.levels??[]){const[t,s]=r.transform.translate,[o,a]=r.transform.scale,h=new Float64Array([t,s]),u=new Float64Array([o,a]),l=n(r.column);i.addLevel(e.MultiscaleGeometryField.new(r.level,r.scale,l,h,u))}r.setOptmizationXZ(i)}}return r}async function p(e,t={}){const r=await(0,a.N)(),s=u(t.getCustomParameters),n=l(t.getCustomParameters),o=t.geometryInfo?c(r,t.geometryInfo):null;try{return await r.ParquetFile.fromUrl(e,s,n,o)}catch(e){throw new i.A("parquet","Failed to parse file",{error:e})}}function _(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function f(e){if(e.keyValueMetadata("esri"))throw new i.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const t=e.keyValueMetadata("geodisplay");if(null!=t)return JSON.parse(t);const r=e.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=r){const e=JSON.parse(r);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type)){const e={parentColumn:t.name,index:t.metadata};if("xz"===e.index.type&&(e.index.geometryType=e.index.geometryType.toLowerCase(),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))throw new i.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`);return e}}return null}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>l,e2:()=>c,f:()=>p});var s=r(44208),i=r(4718),n=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const h=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function l(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${d(t)} = null;`;for(const t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e){return h.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},65864:(e,t,r)=>{r.d(t,{rS:()=>l,xD:()=>c});var s=r(5443),i=r(91075),n=r(48526),o=r(86738),a=r(39829),h=r(82799),u=r(60408);function l(e){return null==e?null:e instanceof i.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?h.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?s.A.fromJSON(e):null}const d={esriGeometryPoint:o.A,esriGeometryPolyline:h.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function c(e){return e&&d[e]||null}},68974:(e,t,r)=>{r.d(t,{H:()=>u,p:()=>h});var s=r(69397),i=r(86211),n=r(38976),o=r(75538);const a=96;function h(e,t){return(0,i.GA)(e)*i.dy*a/t}class u extends n.n{constructor(e){super(e),this._cells=new Map,this._pixelsPerMapUnit=h(e.spatialReference,e.scale)}get usedMemory(){const e=this._cells.values().next().value;return e?(s.RS+e.usedMemory)*this._cells.size:0}put(e){for(const t of this._cells.values()){const r=e.get(t.id);r?r.merge(t):e.set(t.id,t.clone())}}putBounded(e,t,r){const s=[t.xmin,t.ymin,t.xmax,t.ymax],[i,n,o,a]=s,h=Math.floor(i*this._pixelsPerMapUnit/this._options.cellSize),u=Math.floor(n*this._pixelsPerMapUnit/this._options.cellSize),l=Math.ceil(o*this._pixelsPerMapUnit/this._options.cellSize),d=Math.ceil(a*this._pixelsPerMapUnit/this._options.cellSize);for(let t=u;t<=d;t++)for(let r=h;r<=l;r++){const s=`${r}.${t}`,i=this._cells.get(s);if(!i)continue;const n=e.get(i.id);n?i&&!e.has(i.id)&&n.merge(i):e.set(i.id,i.clone())}}_insert(e,t,r,s){const i=t*this._pixelsPerMapUnit,n=r*this._pixelsPerMapUnit,o=Math.floor(i/this._options.cellSize),a=Math.floor(n/this._options.cellSize);this._getCellOrCreate(o,a).insert(e,s,t,r)}_getCellOrCreate(e,t){const r=o.L.createId(e,t);let s=this._cells.get(r);if(!s){const i=1*this._options.cellSize/this._pixelsPerMapUnit;s=o.L.create(e,t,this._options.fields,i),this._cells.set(r,s)}return s}}},70300:(e,t,r)=>{r.d(t,{K:()=>j});var s=r(69397),i=r(11006);function n(e,t){if(!(this instanceof n))return new n(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this.toBBox=t:this._initFormat(t)),this.clear()}function o(e,t,r){if(!r)return t.indexOf(e);for(var s=0;s<t.length;s++)if(r(e,t[s]))return s;return-1}function a(e,t){h(e,0,e.children.length,t,e)}function h(e,t,r,s,i){i||(i=g(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var n,o=t;o<r;o++)n=e.children[o],u(i,e.leaf?s(n):n);return i}function u(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){var r=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,n-s)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(e,t,r,s,n){for(var o,a=[t,r];a.length;)(r=a.pop())-(t=a.pop())<=s||(o=t+Math.ceil((r-t)/s/2)*s,(0,i.q)(e,o,t,r,n),a.push(t,o,o,r))}n.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],s=this.toBBox;if(!y(e,t))return r;for(var i,n,o,a,h=[];t;){for(i=0,n=t.children.length;i<n;i++)o=t.children[i],y(e,a=t.leaf?s(o):o)&&(t.leaf?r.push(o):m(e,a)?this._all(o,r):h.push(o));t=h.pop()}return r},collides:function(e){var t=this.data,r=this.toBBox;if(!y(e,t))return!1;for(var s,i,n,o,a=[];t;){for(s=0,i=t.children.length;s<i;s++)if(n=t.children[s],y(e,o=t.leaf?r(n):n)){if(t.leaf||m(e,o))return!0;a.push(n)}t=a.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}var s=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===s.height)this._splitRoot(this.data,s);else{if(this.data.height<s.height){var i=this.data;this.data=s,s=i}this._insert(s,this.data.height-s.height-1,!0)}else this.data=s;return this},insert:function(e){return null!=e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(e,t){if(null==e)return this;for(var r,s,i,n,a=this.data,h=this.toBBox(e),u=[],l=[];a||u.length;){if(a||(a=u.pop(),s=u[u.length-1],r=l.pop(),n=!0),a.leaf&&-1!==(i=o(e,a.children,t)))return a.children.splice(i,1),u.push(a),this._condense(u),this;n||a.leaf||!m(a,h)?s?(r++,a=s.children[r],n=!1):a=null:(u.push(a),l.push(r),r=0,s=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:d,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t},_build:function(e,t,r,s){var i,n=r-t+1,o=this._maxEntries;if(n<=o)return a(i=g(e.slice(t,r+1)),this.toBBox),i;s||(s=Math.ceil(Math.log(n)/Math.log(o)),o=Math.ceil(n/Math.pow(o,s-1))),(i=g([])).leaf=!1,i.height=s;var h,u,l,d,c=Math.ceil(n/o),p=c*Math.ceil(Math.sqrt(o));for(x(e,t,r,p,this.compareMinX),h=t;h<=r;h+=p)for(x(e,h,l=Math.min(h+p-1,r),c,this.compareMinY),u=h;u<=l;u+=c)d=Math.min(u+c-1,l),i.children.push(this._build(e,u,d,s-1));return a(i,this.toBBox),i},_chooseSubtree:function(e,t,r,s){for(var i,n,o,a,h,u,l,d;s.push(t),!t.leaf&&s.length-1!==r;){for(l=d=1/0,i=0,n=t.children.length;i<n;i++)h=c(o=t.children[i]),(u=_(e,o)-h)<d?(d=u,l=h<l?h:l,a=o):u===d&&h<l&&(l=h,a=o);t=a||t.children[0]}return t},_insert:function(e,t,r){var s=this.toBBox,i=r?e:s(e),n=[],o=this._chooseSubtree(i,this.data,t,n);for(o.children.push(e),u(o,i);t>=0&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(i,n,t)},_split:function(e,t){var r=e[t],s=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,s);var n=this._chooseSplitIndex(r,i,s),o=g(r.children.splice(n,r.children.length-n));o.height=r.height,o.leaf=r.leaf,a(r,this.toBBox),a(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(r,o)},_splitRoot:function(e,t){this.data=g([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var s,i,n,o,a,u,l,d;for(u=l=1/0,s=t;s<=r-t;s++)o=f(i=h(e,0,s,this.toBBox),n=h(e,s,r,this.toBBox)),a=c(i)+c(n),o<u?(u=o,d=s,l=a<l?a:l):o===u&&a<l&&(l=a,d=s);return d},_chooseSplitAxis:function(e,t,r){var s=e.leaf?this.compareMinX:l,i=e.leaf?this.compareMinY:d;this._allDistMargin(e,t,r,s)<this._allDistMargin(e,t,r,i)&&e.children.sort(s)},_allDistMargin:function(e,t,r,s){e.children.sort(s);var i,n,o=this.toBBox,a=h(e,0,t,o),l=h(e,r-t,r,o),d=p(a)+p(l);for(i=t;i<r-t;i++)n=e.children[i],u(a,e.leaf?o(n):n),d+=p(a);for(i=r-t-1;i>=t;i--)n=e.children[i],u(l,e.leaf?o(n):n),d+=p(l);return d},_adjustParentBBoxes:function(e,t,r){for(var s=r;s>=0;s--)u(t[s],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():a(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}};var v=r(70328);class b{static fromReader(e){const t=[],r=e.copy(),s=(0,v.vt)();for(;r.next();)r.getBounds(s)&&t.push(r.getIndex());const i=n(9,e=>(r.setIndex(e),{minX:r.getBoundsXMin(),minY:r.getBoundsYMin(),maxX:r.getBoundsXMax(),maxY:r.getBoundsYMax()}));return i.load(t),new b(i,t.length)}constructor(e,t){this._index=e,this._size=t}get usedMemory(){return this._size*s.RS}search(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this._index.search(t)}}r(44208);var I=r(34727),w=(r(37585),r(48163)),T=r(39829),M=r(16930),S=r(19419),A=r(79258),F=r(90708),C=r(31464);function P(e,t,r,s){if(s.isWebMercator){const s=(0,I.KJ)(e/A.$O.radius),i=s-360*Math.floor((s+180)/360),n=[0,0];return O(n,0,(0,I.KJ)(Math.PI/2-2*Math.atan(Math.exp(-t/A.$O.radius))),i,r),n}const i=(0,C.Cv)({x:e,y:t},s,M.A.WGS84);if(!i)return null;const n=[0,0];return O(n,0,i.y,i.x,r),n}function O(e,t,r,s,i){i%2&&(i+=1);let n=0,o=0,a=-90,h=90,u=-180,l=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const r=(u+l)/2,i=s>r?1:0;n|=i<<29-(t+5*e),u=(1-i)*u+i*r,l=(1-i)*r+i*l}for(let t=0;t<5;t++){const s=(a+h)/2,i=r>s?1:0;o|=i<<29-(t+5*e),a=(1-i)*a+i*s,h=(1-i)*s+i*h}}e[2*t]=n,e[2*t+1]=o}(0,w.vt)(),(0,w.vt)();var N=r(63664),k=r(92029);class z extends N.B{static create(e,t,r,s){const i=k.o.create(e),n=new Array(32);for(let e=0;e<n.length;e++)n[e]=null;return new z(i,t,r,s,n)}constructor(e,t,r,s,i){super(e),this.xNode=t,this.yNode=r,this.depth=s,this.children=i,this._objectIds=new Set,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._xGeohashTotal=0,this._yGeohashTotal=0,this.next=null}static get estimatedMemory(){let e=0;return e+=2*s.qK,e+=32*s.RS,e+=k.o.estimatedMemory,e}get id(){return`${this.xNode}.${this.yNode}`}get containedObjectIds(){return this._objectIds}get count(){return this._count}clone(){const e=new z(this._statistics.clone(),this.xNode,this.yNode,this.depth,this.children);return e._count=this._count,e._xWorldTotal=this._xWorldTotal,e._yWorldTotal=this._yWorldTotal,e._xGeohashTotal=this._xGeohashTotal,e._yGeohashTotal=this._yGeohashTotal,e.next=this.next,e._objectIds=new Set(this._objectIds),e}insert(e,t,r,s,i,n){this._count+=1,this._xWorldTotal+=t,this._yWorldTotal+=r,this._xGeohashTotal+=s,this._yGeohashTotal+=i,this._statistics.insert(e,n),this._objectIds.add(e.getObjectId())}merge(e){if(0!==e._count){this._count+=e._count,this._xWorldTotal+=e._xWorldTotal,this._yWorldTotal+=e._yWorldTotal,this._xGeohashTotal+=e._xWorldTotal,this._yGeohashTotal+=e._yWorldTotal,this._statistics.merge(e._statistics);for(const t of e._objectIds.values())this._objectIds.add(t)}}getCentroid(e){throw new Error("getCentroid not supported for GeohashNode")}getGeometry(e,t){const r=this._getLngLatBounds(),[s,i,n,o]=r,a=(0,C.Cv)({rings:[[[s,i],[s,o],[n,o],[n,i],[s,i]]]},M.A.WGS84,e),h=(0,F.Ye)(a);return null!=t?(0,F.Nl)(h,"esriGeometryPolygon",t,!1,!1):h}getGeometricCentroid(e,t){const r=this._getLngLatBounds(),[s,i,n,o]=r,a=(0,C.Cv)({x:(s+n)/2,y:(i+o)/2},M.A.WGS84,e),h=(0,F.qN)(a);return null!=t?(0,F.Nl)(h,"esriGeometryPoint",t,!1,!1):h}getAttributes(){const e={aggregateId:this.id};for(const t of this._statistics.values())e[t.field.name]=t.value;return e.aggregateCount=this._count,e}find(e,t,r,s,i,n){if(s>=r)return this;const o=1-s%2,a=3*o+2*(1-o),h=2*o+3*(1-o),u=30-i-a,l=30-n-h,d=((e&7*o+3*(1-o)<<u)>>u)+((t&3*o+7*(1-o)<<l)>>l)*(8*o+4*(1-o)),c=this.children[d];return null==c?null:c.find(e,t,r,s+1,i+a,n+h)}_getLngLatBounds(){const e=this.depth,t=Math.ceil(e/2),r=Math.floor(e/2),s=30-(3*t+2*r),i=30-(2*t+3*r);return function(e,t){let r=-90,s=90,i=-180,n=180;for(let o=0;o<t;o++){const t=Math.ceil((o+1)/2),a=Math.floor((o+1)/2),h=1-o%2,u=30-(3*t+2*a),l=30-(2*t+3*a),d=2*h+3*(1-h),c=(7*h+3*(1-h)<<u&e.geohashX)>>u,p=(3*h+7*(1-h)<<l&e.geohashY)>>l;for(let e=3*h+2*(1-h)-1;e>=0;e--){const t=(i+n)/2,r=c&1<<e?1:0;i=(1-r)*i+r*t,n=(1-r)*t+r*n}for(let e=d-1;e>=0;e--){const t=(r+s)/2,i=p&1<<e?1:0;r=(1-i)*r+i*t,s=(1-i)*t+i*s}}return[i,r,n,s]}({geohashX:this.xNode<<s,geohashY:this.yNode<<i},this.depth)}}class B{constructor(e){this._fields=e,this._size=0,this._depth=0,this._root=z.create(this._fields,0,0,0)}destroy(){}get size(){return this._size}get depth(){return this._depth}get usedMemory(){return this._size*z.estimatedMemory}find(e,t,r){return this._root.find(e,t,r,0,0,0)}insert(e,t,r,s,i,n,o){let a=this._root,h=0,u=0,l=0;for(;null!==a;){if(a.insert(e,t,r,s,i,o),h>=n)return;const d=Math.ceil((h+1)/2),c=Math.floor((h+1)/2),p=1-h%2,_=30-(3*d+2*c),f=30-(2*d+3*c),m=(s&7*p+3*(1-p)<<_)>>_,y=(i&3*p+7*(1-p)<<f)>>f,g=m+y*(8*p+4*(1-p));u=u<<3*p+2*(1-p)|m,l=l<<2*p+3*(1-p)|y,null==a.children[g]&&(a.children[g]=z.create(this._fields,u,l,h+1),this._depth=Math.max(this._depth,h+1),this._size+=1),h+=1,a=a.children[g]}}putBins(e,t){for(const r of this.getNodes(t)){const t=e.get(r.id);t?t.merge(r):e.set(r.id,r.clone())}}getNodes(e){const t=[],{geohashBounds:r,level:s}=e;let i=this._root;for(;null!==i;){const e=i.depth,n=i.xNode,o=i.yNode;if(e>=s){t.push(i),i=i.next;continue}const a=Math.ceil((e+1)/2),h=Math.floor((e+1)/2),u=1-e%2,l=30-(3*a+2*h),d=30-(2*a+3*h),c=~((1<<l)-1),p=~((1<<d)-1),_=(r.xLL&c)>>l,f=(r.yLL&p)>>d,m=(r.xTR&c)>>l,y=(r.yTR&p)>>d,g=n<<3*u+2*(1-u),x=o<<2*u+3*(1-u),v=g+8*u+4*(1-u),b=x+4*u+8*(1-u),I=Math.max(g,_),w=Math.max(x,f),T=Math.min(v,m),M=Math.min(b,y);let S=null,A=null;for(let e=w;e<=M;e++)for(let t=I;t<=T;t++){const r=t-g+(e-x)*(8*u+4*(1-u)),s=i.children[r];s&&(S||(S=s,S.next=i.next),A&&(A.next=s),A=s,s.next=i.next)}i=S||i.next}return t}}var G=r(38976);class D extends G.n{constructor(e){super(e),this._tree=new B(this._options.fields)}get usedMemory(){return this._tree.usedMemory}put(e){throw new Error("Geohash tree does not support put")}putBounded(e,t,r){const{geohashLevel:s,spatialReference:i}=this._options,n=function(e,t,r,s){const i=[e.xmin,e.ymin,e.xmax,e.ymax],n=T.A.fromExtent((0,S.w1)(i,s)),o=(0,C.Cv)(n,s,M.A.WGS84,{extendedParams:{densificationStep:64*t}});if(!o)return null;const a=(0,F.Ye)(o,!1,!1),h=a.coords.filter((e,t)=>!(t%2)),u=a.coords.filter((e,t)=>t%2),l=Math.min(...h),d=Math.min(...u),c=Math.max(...h),p=Math.max(...u),_=P(l,d,r,M.A.WGS84),f=P(c,p,r,M.A.WGS84);return _&&f?{bounds:i,geohashBounds:{xLL:_[0],yLL:_[1],xTR:f[0],yTR:f[1]},level:r}:null}(t,r,s,i);null!=n&&this._tree.putBins(e,n)}_insert(e,t,r,s){const{geohashLevel:i,spatialReference:n}=this._options,o=P(t,r,i,n);o&&this._tree.insert(e,t,r,o[0],o[1],i,s)}}var W=r(68974),R=r(52350);class j{size(){return this.reader.getSize()}get fields(){return this.reader.fields}invalidate(){this._aggregateIndex=null,this._aggregateIndexHash=null,this._spatialIndex=null}get usedMemory(){let e=0;return e+=this.reader.underlyingMemory,this._aggregateIndex&&(e+=this._aggregateIndex.usedMemory),this._spatialIndex&&(e+=this._spatialIndex.usedMemory),e}getObjectIds(){const e=this.reader.getCursor(),t=[];for(;e.next();)t.push(e.getObjectId());return t}registerOverrides(e){this.reader.registerOverrides(e),this.invalidate()}queryFeaturesInBounds(e){const t=this._getSpatialIndex().search(e);return R.e.from(this.reader,t)}getAggregateIndex(e){const t=JSON.stringify(e);if(t!==this._aggregateIndexHash){switch(this._aggregateIndexHash=t,e.type){case"grid":this._aggregateIndex=new W.H(e);break;case"geohash":this._aggregateIndex=new D(e)}this._aggregateIndex.insert(this.reader,this.isTiled)}return this._aggregateIndex}_getSpatialIndex(){return this._spatialIndex||(this._spatialIndex=b.fromReader(this.reader)),this._spatialIndex}}},73250:(e,t,r)=>{r.d(t,{y:()=>i});var s=r(69397);class i{static fromBuffer(e,t){return new i(e,t)}static create(e,t=4294967295){const r=new Uint32Array(Math.ceil(e/32));return new i(r,t)}constructor(e,t){this._mask=0,this._buf=e,this._mask=t}_getIndex(e){return Math.floor(e/32)}get usedMemory(){return(0,s.Qf)(this._buf)}has(e){const t=this._mask&e;return!!(this._buf[this._getIndex(t)]&1<<t%32)}hasRange(e,t){let r=e,s=t;for(;r%32&&r!==s;){if(this.has(r))return!0;r++}for(;s%32&&r!==s;){if(this.has(r))return!0;s--}if(r===s)return!1;for(let e=r/32;e!==s/32;e++)if(this._buf[e])return!0;return!1}set(e){const t=this._mask&e,r=this._getIndex(t),s=1<<t%32;this._buf[r]|=s}setRange(e,t){let r=e,s=t;for(;r%32&&r!==s;)this.set(r++);for(;s%32&&r!==s;)this.set(s--);if(r!==s)for(let e=r/32;e!==s/32;e++)this._buf[e]=4294967295}unset(e){const t=this._mask&e,r=this._getIndex(t),s=1<<t%32;this._buf[r]&=4294967295^s}resize(e){const t=this._buf,r=new Uint32Array(Math.ceil(e/32));r.set(t),this._buf=r}or(e){for(let t=0;t<this._buf.length;t++)this._buf[t]|=e._buf[t];return this}and(e){for(let t=0;t<this._buf.length;t++)this._buf[t]&=e._buf[t];return this}xor(e){for(let t=0;t<this._buf.length;t++)this._buf[t]^=e._buf[t];return this}ior(e){for(let t=0;t<this._buf.length;t++)this._buf[t]|=~e._buf[t];return this}iand(e){for(let t=0;t<this._buf.length;t++)this._buf[t]&=~e._buf[t];return this}ixor(e){for(let t=0;t<this._buf.length;t++)this._buf[t]^=~e._buf[t];return this}any(){for(let e=0;e<this._buf.length;e++)if(this._buf[e])return!0;return!1}copy(e){for(let t=0;t<this._buf.length;t++)this._buf[t]=e._buf[t];return this}clone(){return new i(this._buf.slice(),this._mask)}clear(){for(let e=0;e<this._buf.length;e++)this._buf[e]=0;return this}forEachSet(e){for(let t=0;t<this._buf.length;t++){let r=this._buf[t],s=32*t;if(r)for(;r;)1&r&&e(s),r>>>=1,s++}}countSet(){let e=0;return this.forEachSet(t=>{e++}),e}}},75538:(e,t,r)=>{r.d(t,{L:()=>a});var s=r(90708),i=r(92722),n=r(63664),o=r(92029);class a extends n.B{static createId(e,t){return`${e}.${t}`}static create(e,t,r,s){return new a(e,t,o.o.create(r),s)}constructor(e,t,r,s){super(r),this.gridX=e,this.gridY=t,this._worldUnitsPerCell=s,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._objectIds=new Set}get id(){return a.createId(this.gridX,this.gridY)}get containedObjectIds(){return this._objectIds}get count(){return this._count}get firstObjectId(){return this._objectIds.values().next().value}get centroidXWorld(){return this._xWorldTotal/this._count}get centroidYWorld(){return this._yWorldTotal/this._count}get usedMemory(){return 48}clone(){const e=new a(this.gridX,this.gridY,this._statistics.clone(),this._worldUnitsPerCell);return e._count=this._count,e._xWorldTotal=this._xWorldTotal,e._yWorldTotal=this._yWorldTotal,e._firstFeatureAttributes=this._firstFeatureAttributes,e._objectIds=new Set(this._objectIds),e}insert(e,t,r,s){0===this._count?this._firstFeatureAttributes=e.readAttributes():this._firstFeatureAttributes=null,this._count+=1,this._xWorldTotal+=r,this._yWorldTotal+=s,this._statistics.insert(e,t),this._objectIds.add(e.getObjectId())}merge(e){if(0!==e._count){this._count+=e._count,this._firstFeatureAttributes=e._firstFeatureAttributes,this._xWorldTotal+=e._xWorldTotal,this._yWorldTotal+=e._yWorldTotal,this._statistics.merge(e._statistics);for(const t of e._objectIds.values())this._objectIds.add(t)}}getCentroidX(e){return null==e?this.centroidXWorld:(0,s.IE)(e,this.centroidXWorld)}getCentroidY(e){return null==e?this.centroidYWorld:(0,s.B2)(e,this.centroidYWorld)}getGeometry(e,t){const r=this.gridX*this._worldUnitsPerCell,n=this.gridY*this._worldUnitsPerCell,o=new i.A([4],[r,n,r+this._worldUnitsPerCell,n,r+this._worldUnitsPerCell,n+this._worldUnitsPerCell,r,n+this._worldUnitsPerCell]);return null!=t?(0,s.Nl)(o,"esriGeometryPolygon",t):o}getCentroid(e){const t=new i.A([],[this.centroidXWorld,this.centroidYWorld]);return null!=e?(0,s.Nl)(t,"esriGeometryPoint",e):t}getGeometricCentroid(e,t){const r=this.gridX*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,n=this.gridY*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,o=new i.A([],[r,n]);return null!=t?(0,s.Nl)(o,"esriGeometryPoint",t):o}getAttributes(){const e={aggregateId:this.id};for(const t of this._statistics.values())e[t.field.name]=t.value;return null!=this._firstFeatureAttributes?{...e,...this._firstFeatureAttributes}:e}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(31635),i=r(66552),n=r(25482),o=r(91429),a=r(93223);const h=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,s.Cg)([(0,a.e)(h),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},92029:(e,t,r)=>{r.d(t,{o:()=>o});var s=r(69397),i=r(50115);const n=Math.PI/180;class o{static create(e){return new o(e.map(e=>function(e){switch(e.statisticType){case"min":return new h(e);case"max":return new u(e);case"avg":return new d(e);case"avg_angle":return new c(e);case"sum":case"count":return new l(e);case"mode":return new p(e)}}(e)))}constructor(e){this._statistics=e}static get estimatedMemory(){return s.qK+4*s.qK}values(){return this._statistics.values()}insert(e,t){for(const r of this._statistics)r.insert(e,t)}merge(e){for(let t=0;t<this._statistics.length;t++){const r=this._statistics[t],s=e._statistics[t];if(r.field.name!==s.field.name)throw new Error("InternalError: Tried to merge incompatible statistics");r.merge(s)}}clone(){return new o(this._statistics.map(e=>e.clone()))}}class a{constructor(e){this.field=e}insert(e,t){if(!this.field.computed)return;const r=this.field.computed.read(e,t);(0,i.rZ)(r)||this._insertValue(r)}}class h extends a{constructor(){super(...arguments),this.type="min",this.value=Number.MAX_VALUE}_insertValue(e){this.value=Math.min(this.value,e)}merge(e){this.value=Math.min(this.value,e.value)}clone(){const e=new h(this.field);return e.value=this.value,e}}class u extends a{constructor(){super(...arguments),this.type="max",this.value=Number.MIN_VALUE}_insertValue(e){this.value=Math.max(this.value,e)}merge(e){this.value=Math.max(this.value,e.value)}clone(){const e=new u(this.field);return e.value=this.value,e}}class l extends a{constructor(){super(...arguments),this.type="sum",this.value=0}_insertValue(e){this.value+=e}merge(e){this.value+=e.value}clone(){const e=new l(this.field);return e.value=this.value,e}}class d extends a{constructor(){super(...arguments),this.type="avg",this._total=0,this._count=0}get value(){return this._total/this._count}_insertValue(e){this._total+=e,this._count+=1}merge(e){this._total+=e._total,this._count+=e._count}clone(){const e=new d(this.field);return e._total=this._total,e._count=this._count,e}}class c extends a{constructor(){super(...arguments),this.type="avg_angle",this._x=0,this._y=0,this._count=0}get value(){const e=this._x/this._count,t=this._y/this._count,r=180/Math.PI;return Math.atan2(t,e)*r}_insertValue(e){this._x=this._x+Math.cos(e*n),this._y=this._y+Math.sin(e*n),this._count+=1}merge(e){this._x+=e._x,this._y+=e._y,this._count+=e._count}clone(){const e=new c(this.field);return e._x=this._x,e._y=this._y,e._count=this._count,e}}class p extends a{constructor(){super(...arguments),this._frequencies=new Map}get value(){let e,t=0;for(const[r,s]of this._frequencies.entries())s>t&&(t=s,e=r);return e}_insertValue(e){const t=this._frequencies.get(e);null!=t?this._frequencies.set(e,t+1):this._frequencies.set(e,1)}merge(e){for(const[t,r]of e._frequencies.entries()){const e=this._frequencies.get(t);null!=e?this._frequencies.set(t,e+r):this._frequencies.set(t,r)}}clone(){const e=new p(this.field);return e._frequencies=new Map(this._frequencies),e}}},97633:(e,t,r)=>{r.d(t,{P:()=>n});var s=r(69397),i=r(73250);class n{constructor(e){this._valid=i.y.create(e),this._data=new Array(e)}get usedMemory(){let e=this._valid.usedMemory;if(this._data.length>0){const t="string"==typeof this._data[0]?64:s.RS;e+=this._data.length*t}return e}has(e){return this._valid.has(e)}set(e,t){this._valid.set(e),this._data[e]=t}get(e){return this._data[e]}}},98453:(e,t,r)=>{r.d(t,{m:()=>s});const s=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},99996:(e,t,r)=>{r.d(t,{Y:()=>O});var s=r(66131),i=r(44208),n=r(69397),o=r(44729),a=r(15032),h=r(36745),u=r(70328),l=r(65864),d=r(32011),c=r(62577),p=r(27647),_=r(90708),f=r(43334),m=r(92722),y=r(98623),g=r(97633);const x=(0,i.A)("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],v=x[0],b=x[1],I=x[2],w=x[3],T=(0,i.A)("featurelayer-simplify-payload-size-factors")??[1,2,4],M=T[0],S=T[1],A=T[2],F=(0,i.A)("featurelayer-simplify-mobile-factor")??2,C=(0,i.A)("esri-mobile"),P=4294967295;class O{constructor(e){this.metadata=e,this.type="FeatureSetReader",this._overrides=null,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}destroy(){}[Symbol.dispose](){this.destroy()}getAreaSimplificationThreshold(e,t){let r=1;const s=C?F:1;t>4e6?r=A*s:t>1e6?r=S*s:t>5e5?r=M*s:t>1e5&&(r=s);let i=0;return e>4e3?i=w*r:e>2e3?i=I*r:e>100?i=b:e>15&&(i=v),i}getBounds(e){!function(e,t){if(!(e.length>t))for(;e.length<=t;)e.push(0)}(this._boundsBuffer,4*this.getIndex()+4);const t=this.getBoundsXMin();if(t===P||!isFinite(t))return!1;if(0===this.getBoundsXMin()){const t=this.readGeometryWorldSpace();if(t?.isPoint&&0===t.coords[0]&&0===t.coords[1])return(0,u.BI)(e,0,0,0,0),!0;if(!t)return this.setBoundsXMin(P),!1;let r=1/0,s=1/0,i=-1/0,n=-1/0;return t.forEachVertex((e,t)=>{r=Math.min(r,e),s=Math.min(s,t),i=Math.max(i,e),n=Math.max(n,t)}),this.setBoundsXMin(r),this.setBoundsYMin(s),this.setBoundsXMax(i),this.setBoundsYMax(n),(0,u.BI)(e,r,s,i,n),!0}const r=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),n=this.getBoundsYMax();return(0,u.BI)(e,r,s,i,n),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(e){this._boundsBuffer[4*this.getIndex()]=e}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(e){this._boundsBuffer[4*this.getIndex()+1]=e}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(e){this._boundsBuffer[4*this.getIndex()+2]=e}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(e){this._boundsBuffer[4*this.getIndex()+3]=e}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"string"==typeof t?new Date(t).getTime():"number"==typeof t||null==t?t:null}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const r of this._joined){r.setIndex(this.getIndex());const s=r._readAttribute(e,t);if(void 0!==s)return s}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}registerOverrides(e){this._overrides=e}withoutOverrides(){const e=this.copy();return e._overrides=null,e}readOptimizedFeatureWorldSpace(){const e=this.readGeometryWorldSpace(),t=this.readAttributes(),r=this.readCentroidWorldSpace();return new f.Om(e,t,r,this.getObjectId(),this.getDisplayId())}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyFeatureWorldSpace(){const e=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return(0,_.zv)(e,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const e=this._readX(),t=this.getInTransform();return null==t?e:e*t.scale[0]+t.translate[0]}readYWorldSpace(){const e=this._readY(),t=this.getInTransform();return null==t?e:t.translate[1]-e*t.scale[1]}readGeometryForDisplay(){const e=this._readGeometryDeltaDecoded(!0);if(!e){const e=this._createDeltaQuantizedGeometryFromServerCentroid();return e?e.deltaDecode():null}return e}readGeometryForDisplayTransformed(e){let t=this.readGeometryForDisplay();if(t&&"esriGeometryPolyline"===this.metadata.geometryType&&(t=(0,_.kz)(t,this.metadata.geometryType,e.scale[0])),t&&(t=(0,_.hK)(t,e,this.metadata.geometryType)),!t){const t=this.readCentroidForDisplay();if(!t)return null;const r=(0,c.IE)(e,t.coords[0]),s=(0,c.B2)(e,t.coords[1]);return this._createDeltaQuantizedExtrudedGeometry(r,s).deltaDecode()}return t}readGeometryWorldSpace(){let e=this._readGeometry();if(e||(e=this._createDeltaQuantizedGeometryFromServerCentroid()),!e)return null;const t=e.clone(),r=this.getInTransform();return null!=r&&(0,_.aQ)(t,r),t}readCentroidForDisplay(){const e=this.readGeometryForDisplay();return e?this._computeDisplayCentroid(e):this._readServerCentroid()}readCentroidWorldSpace(){const e=this.readGeometryForDisplay(),t=e?this._computeDisplayCentroid(e):this._readServerCentroid();if(!t)return null;const r=t.clone(),s=this.getInTransform();return null!=s&&(0,_.aQ)(r,s),r}setCache(e){let t=this._caches.get(e);null==t&&(t=new g.P(this.getSize()),this._caches.set(e,t)),this._activeCache=t}setCachedValue(e){this._activeCache.set(this.getIndex(),e)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}get underlyingMemory(){let e=0;e+=(0,n.Qf)(this._boundsBuffer);for(const t of this._caches.values())e+=t.usedMemory;return e}_readGeometryDeltaDecoded(e){const t=this._readGeometry(e);return"esriGeometryPoint"!==this.geometryType&&t&&this.getInTransform()?t.deltaDecode():t}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)||this._joined.some(t=>t.hasField(e))}geometry(){const e=this.readGeometryWorldSpace(),t=(0,_.zv)(e,this.geometryType,this.hasZ,this.hasM),r=(0,l.rS)(t);if(r){if(!this.metadata.outSpatialReference)throw new Error("InternalError: Expected spatial reference to be defined");r.spatialReference=this.metadata.outSpatialReference}return r}autocastArcadeDate(e,t){return t&&t instanceof Date?this.isUnknownDateTimeField(e)?s.lY.unknownDateJSToArcadeDate(t):s.lY.dateJSAndZoneToArcadeDate(t,this.contextTimeZone??y.qU):t}isUnknownDateTimeField(e){return this.metadata.fieldsIndex.getTimeZone(e)===y.L5}field(e){let t=this.fields.get(e);if(t)switch(t.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(this.readAttribute(e,!1));case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(this.readAttribute(e,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(this.readAttribute(e,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(e,this.readAttribute(e,!0));default:return this.readAttribute(e,!1)}for(const r of this._joined)if(r.setIndex(this.getIndex()),t=r.fields.get(e),t)switch(t.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(r._readAttribute(e,!1));case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(r._readAttribute(e,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(r._readAttribute(e,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(e,r._readAttribute(e,!0));default:return this.readAttribute(e,!1)}throw new Error(`Field ${e} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(e=>e.name)}isEmpty(){return this.fields.fields.length<=0&&null==this.geometry()}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeatureForDisplay());const t=this.readLegacyFeatureForDisplay();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes}};for(const e in r.attributes){const t=r.attributes[e];t instanceof Date&&(r.attributes[e]=t.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}_getExists(){if(this._overrides){const e=this.getObjectId();return!this._overrides.hasOverride(e)}return!0}_computeDisplayCentroid(e){if(null==this.getInTransform())return(0,p.Q)(e);const t=h.z.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=(0,d.d)(t);return r?(r[1]*=-1,new m.A([],r)):null}copyInto(e){e._joined=this._joined,e._overrides=this._overrides,e._objectIdToIndex=this._objectIdToIndex,e._boundsBuffer=this._boundsBuffer,e._activeCache=this._activeCache,e._caches=this._caches,e._contextTimeZone=this._contextTimeZone}_readLegacyGeometryWorldSpace(){const e=this.readGeometryWorldSpace();return(0,_.zv)(e,this.geometryType,!1,!1)}_createDeltaQuantizedGeometryFromServerCentroid(){const e=this._readServerCentroid();if(!e)return null;const[t,r]=e.coords;return this._createDeltaQuantizedExtrudedGeometry(t,r)}_createDeltaQuantizedExtrudedGeometry(e,t){return"esriGeometryPolyline"===this.geometryType?this._createDeltaQuantizedExtrudedLine(e,t):this._createDeltaQuantizedExtrudedQuad(e,t)}_createDeltaQuantizedExtrudedQuad(e,t){return new m.A([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}_createDeltaQuantizedExtrudedLine(e,t){return new m.A([2],[e-1,t+1,1,-1])}}}}]);