@arcgis/core 4.34.0-next.61 → 4.34.0-next.64

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 (263) hide show
  1. package/AggregateGraphic.js +1 -1
  2. package/Graphic.js +1 -1
  3. package/TrackGraphic.js +1 -1
  4. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.js +1 -1
  5. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  6. package/applications/Components/actionUtils.d.ts +3 -0
  7. package/applications/Components/actionUtils.js +5 -0
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/{5de7c2a80bd9c81cefe2.js → 070b29cba896f46537f9.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{8c0e11f781607239749d.js → 0a36df6fdab95785d1ce.js} +1 -1
  11. package/assets/esri/core/workers/chunks/0b01c87db77246632ad9.js +1 -0
  12. package/assets/esri/core/workers/chunks/0b24a6c06d1becbb6815.js +1 -0
  13. package/assets/esri/core/workers/chunks/0cdf6b51f2a63f348530.js +1 -0
  14. package/assets/esri/core/workers/chunks/10ec10ca361842efce92.js +1 -0
  15. package/assets/esri/core/workers/chunks/{bdc18ef9cdc8242f014e.js → 1143313f2f6f34deaad7.js} +1 -1
  16. package/assets/esri/core/workers/chunks/226833d408eb1225e168.js +1 -0
  17. package/assets/esri/core/workers/chunks/2394ac65d64e50399d76.js +1 -0
  18. package/assets/esri/core/workers/chunks/33718ea851645d9078d1.js +1 -0
  19. package/assets/esri/core/workers/chunks/{69fbe363bb130fdd8146.js → 3d6f07e04f77cc0a7506.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{db7678104b18534482e3.js → 426232091caf8608e5f1.js} +1 -1
  21. package/assets/esri/core/workers/chunks/47febd4de836a33b51b1.js +1 -0
  22. package/assets/esri/core/workers/chunks/487afbf352d12c745430.js +1 -0
  23. package/assets/esri/core/workers/chunks/{3fd09a7c05583a57a317.js → 5d12862042b6bf9f9d54.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5d65987f2c1b5c56a799.js +1 -0
  25. package/assets/esri/core/workers/chunks/5de07f7a09eb9f3ab666.js +1 -0
  26. package/assets/esri/core/workers/chunks/{ba0c7339fa19cc7cbde7.js → 5e1d6704ee0aa41b1d06.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{4ac127cefa3aa5e93e78.js → 657b01a6df8dc46c5209.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{71b222089f5e9dcee474.js → 6a1b652ccbf58ac44658.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{4050ddb580d364d9e205.js → 6ab435423acb0ed0b1c7.js} +1 -1
  30. package/assets/esri/core/workers/chunks/7b7f5028a488bb9c10f4.js +1 -0
  31. package/assets/esri/core/workers/chunks/{d83bdc13c3cad3eee7be.js → 7c3a1958990de095d3a1.js} +1 -1
  32. package/assets/esri/core/workers/chunks/808cfed7022e3846d5b2.js +1 -0
  33. package/assets/esri/core/workers/chunks/{b68b54be3d67595a9446.js → 861a6d6fe7958df36aa1.js} +35 -34
  34. package/assets/esri/core/workers/chunks/8bd5a0ff7dcf1067bf53.js +1 -0
  35. package/assets/esri/core/workers/chunks/{f462a138912e5379b6a7.js → 904c116c6b093e0e970c.js} +1 -1
  36. package/assets/esri/core/workers/chunks/99b20eef2893047fac10.js +1 -0
  37. package/assets/esri/core/workers/chunks/a16b471c3706ee37f9b6.js +1 -0
  38. package/assets/esri/core/workers/chunks/{bb2ab663e3e5597f2104.js → a1bd4eecca1e3272bffb.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{8005ae652361f506bc5f.js → a29fb90226bd08157bd1.js} +1 -1
  40. package/assets/esri/core/workers/chunks/a596d6ccb6103e594031.js +1 -0
  41. package/assets/esri/core/workers/chunks/a5e6359fadbd699b1c8e.js +1 -0
  42. package/assets/esri/core/workers/chunks/a7f3cdd9a249ef4572ce.js +1 -0
  43. package/assets/esri/core/workers/chunks/{d2bdd52d2291306a4e47.js → a80d769b0ed025f0df64.js} +1 -1
  44. package/assets/esri/core/workers/chunks/a987731d1b5449d8fb0c.js +1 -0
  45. package/assets/esri/core/workers/chunks/af83dddddbfe25194527.js +1 -0
  46. package/assets/esri/core/workers/chunks/{4d8d942fbd6750bb7567.js → b057e6d593c1607cae61.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{d707538b150d79050336.js → b1f1a26e7a2ef5b783ee.js} +1 -1
  48. package/assets/esri/core/workers/chunks/c337c1a2dbc452780dd7.js +1 -0
  49. package/assets/esri/core/workers/chunks/{a35a439f053d1fe0541b.js → c601bbdafdee5074b04f.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{d7ce68667bb355ef8e5d.js → c7a386ac90e58eb71935.js} +1 -1
  51. package/assets/esri/core/workers/chunks/c8694a27e2cf28b010e8.js +1 -0
  52. package/assets/esri/core/workers/chunks/cf69f6afeaf1229e032c.js +1 -0
  53. package/assets/esri/core/workers/chunks/d1e8220dcae1d01d3c35.js +1 -0
  54. package/assets/esri/core/workers/chunks/e12e8d69c05c182b6a69.js +1 -0
  55. package/assets/esri/core/workers/chunks/{220c8d6338f236298720.js → e6457ac25c0829ee039c.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{c77a97c723b8c17df186.js → e72aee3f857aa473822c.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{8374d87176486c1fc90e.js → eadac757f74470b89a36.js} +1 -1
  58. package/assets/esri/core/workers/chunks/f542bdc994a5ea3aa9d1.js +1 -0
  59. package/assets/esri/core/workers/chunks/{7c23be93d394f1bee941.js → f6107f844f4feed42828.js} +1 -1
  60. package/assets/esri/core/workers/chunks/f76774781865cb1411b0.js +1 -0
  61. package/assets/esri/core/workers/chunks/fd04df45cdcc6ff52554.js +1 -0
  62. package/assets/esri/layers/support/rasterFormats/qb3-wasm.wasm +0 -0
  63. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  64. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  65. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  66. package/chunks/BloomComposition.glsl.js +6 -5
  67. package/chunks/Fog.glsl.js +20 -13
  68. package/chunks/GaussianSplat.glsl.js +7 -0
  69. package/chunks/GaussianSplatComposition.glsl.js +7 -0
  70. package/chunks/GaussianSplatDepthComposition.glsl.js +11 -0
  71. package/chunks/RealisticTree.glsl.js +29 -28
  72. package/chunks/lyr3DMain.js +1 -1
  73. package/chunks/lyr3DWorker.js +1 -1
  74. package/chunks/qb3-wasm.js +5 -0
  75. package/chunks/vxlLayer.js +1 -1
  76. package/config.js +1 -1
  77. package/core/Collection.js +1 -1
  78. package/core/has.js +1 -1
  79. package/geometry/ellipsoidUtils.js +1 -1
  80. package/geometry/operators/geodeticUtilsOperator.d.ts +6 -0
  81. package/geometry/support/heightModelInfoUtils.js +1 -1
  82. package/graphic/AggregateGraphicOrigin.js +5 -0
  83. package/graphic/CSVGraphicOrigin.js +1 -1
  84. package/graphic/CatalogGraphicOrigin.js +1 -1
  85. package/graphic/FeatureGraphicOrigin.js +1 -1
  86. package/graphic/GeoJSONGraphicOrigin.js +1 -1
  87. package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
  88. package/graphic/OGCFeatureGraphicOrigin.js +1 -1
  89. package/graphic/OrientedImageryGraphicOrigin.js +1 -1
  90. package/graphic/ParquetGraphicOrigin.js +1 -1
  91. package/graphic/StreamGraphicOrigin.js +1 -1
  92. package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
  93. package/graphic/TrackGraphicOrigin.js +5 -0
  94. package/graphic/WFSGraphicOrigin.js +1 -1
  95. package/graphic/getPopupProvider.js +5 -0
  96. package/interfaces.d.ts +869 -38
  97. package/kernel.js +1 -1
  98. package/layers/GaussianSplatLayer.js +1 -1
  99. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  100. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  101. package/layers/VoxelWasmPerSceneView.js +1 -1
  102. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  103. package/layers/mixins/FeatureReductionLayer.js +1 -1
  104. package/layers/mixins/TrackableLayer.js +1 -1
  105. package/layers/support/GaussianSplatAtlasPageAllocator.js +5 -0
  106. package/layers/support/gaussianSplatUtils.js +5 -0
  107. package/layers/support/rasterDatasets/MRFRaster.js +1 -1
  108. package/layers/support/rasterFormats/Qb3.js +5 -0
  109. package/layers/support/rasterFormats/RasterCodec.js +1 -1
  110. package/layers/support/tiles3DUtils.js +5 -0
  111. package/layers/video/VideoController.js +1 -1
  112. package/package.json +2 -2
  113. package/rest/knowledgeGraph/GraphApplyEditsResult.js +1 -1
  114. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  115. package/rest/knowledgeGraphService.js +1 -1
  116. package/rest/lastMileDelivery/enums.js +5 -0
  117. package/rest/lastMileDelivery.d.ts +10 -0
  118. package/rest/lastMileDelivery.js +5 -0
  119. package/rest/route/utils.js +1 -1
  120. package/rest/support/JobInfo.js +1 -1
  121. package/rest/support/LastMileDeliveryParameters.d.ts +4 -0
  122. package/rest/support/LastMileDeliveryParameters.js +5 -0
  123. package/support/revision.js +1 -1
  124. package/symbols/IconSymbol3DLayer.js +1 -1
  125. package/symbols/TextSymbol3DLayer.js +1 -1
  126. package/symbols/patterns/StylePattern3D.js +1 -1
  127. package/symbols/patterns/styles.js +1 -1
  128. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  129. package/symbols/support/OccludedVisibility.js +5 -0
  130. package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
  131. package/symbols/support/Symbol3DIconOutline.js +1 -1
  132. package/unionTypes.d.ts +3 -0
  133. package/views/2d/analysis/AnalysisView2D.js +5 -0
  134. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +4 -0
  135. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +5 -0
  136. package/views/2d/analysis/analysisViewModuleImportUtils.js +5 -0
  137. package/views/2d/engine/webgl/Painter.js +1 -1
  138. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  139. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +5 -0
  140. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +5 -0
  141. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +5 -0
  142. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +5 -0
  143. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +5 -0
  144. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  146. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  147. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  148. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  149. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  150. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  151. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  152. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  153. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  154. package/views/3d/analysis/AnalysisView3D.js +1 -1
  155. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  156. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  157. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  158. package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
  159. package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization.js +1 -1
  160. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization.js +5 -0
  161. package/views/3d/analysis/ElevationProfile/ElevationProfileSceneLineComputation.js +1 -1
  162. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization.js +1 -1
  163. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  164. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  165. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  166. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  167. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  168. package/views/3d/analysis/analysisViewModuleImportUtils.js +5 -0
  169. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  170. package/views/3d/environment/Fog.glsl.js +1 -1
  171. package/views/3d/environment/Fog.js +1 -1
  172. package/views/3d/environment/FogTechniqueConfiguration.js +5 -0
  173. package/views/3d/environment/Precipitation.js +1 -1
  174. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  175. package/views/3d/layers/GraphicsView3D.js +1 -1
  176. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  177. package/views/3d/layers/{IntegratedMesh3DTilesViewPerformanceInfo.js → Lyr3DViewPerformanceInfo.js} +1 -1
  178. package/views/3d/layers/Lyr3DWasm.js +1 -1
  179. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  180. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  181. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  182. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  184. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  185. package/views/3d/layers/graphics/Labeler.js +1 -1
  186. package/views/3d/layers/support/LayerViewAnalysisViewManager.js +1 -1
  187. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  188. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  189. package/views/3d/support/QualitySettings.js +1 -1
  190. package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
  191. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  192. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  193. package/views/3d/webgl-engine/core/shaderLibrary/util/ComputeCovariance.glsl.js +40 -0
  194. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +59 -0
  195. package/views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js +23 -0
  196. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  197. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  198. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +1 -1
  199. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  200. package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +4 -4
  201. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  202. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +5 -0
  203. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  204. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  205. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  206. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  207. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +5 -0
  208. package/views/3d/webgl-engine/shaders/GaussianSplatComposition.glsl.js +5 -0
  209. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +5 -0
  210. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +5 -0
  211. package/views/3d/webgl-engine/shaders/GaussianSplatDepthComposition.glsl.js +5 -0
  212. package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +5 -0
  213. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +5 -0
  214. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +5 -0
  215. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +5 -0
  216. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  217. package/views/SceneView.js +1 -1
  218. package/views/VideoView.js +1 -1
  219. package/views/View2D.js +1 -1
  220. package/views/analysis/AnalysisView.js +5 -0
  221. package/views/analysis/ElevationProfile/ElevationProfileInputLineComputation.js +1 -1
  222. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  223. package/views/analysis/ElevationProfile/ElevationProfileTool.js +5 -0
  224. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  225. package/views/layers/FeatureLayerView.js +1 -1
  226. package/views/support/AnalysisViewManager.js +1 -1
  227. package/views/webgl/FramebufferObject.js +1 -1
  228. package/widgets/CoordinateConversion/support/Format.js +1 -1
  229. package/widgets/Locate/LocateViewModel.js +1 -1
  230. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  231. package/widgets/Popup/actionUtils.js +1 -1
  232. package/assets/esri/core/workers/chunks/08d420cd7cfa19a10fa4.js +0 -1
  233. package/assets/esri/core/workers/chunks/17abab49db1813d3e192.js +0 -1
  234. package/assets/esri/core/workers/chunks/182383fd00008606bfaa.js +0 -1
  235. package/assets/esri/core/workers/chunks/188feb2bcbf8e48e3163.js +0 -1
  236. package/assets/esri/core/workers/chunks/232c76f122b1f519e099.js +0 -1
  237. package/assets/esri/core/workers/chunks/3124a8516e815efec973.js +0 -1
  238. package/assets/esri/core/workers/chunks/3461701a15be46603c56.js +0 -1
  239. package/assets/esri/core/workers/chunks/36acf191a2d48560c796.js +0 -1
  240. package/assets/esri/core/workers/chunks/40e1fbfbf3f3979b3713.js +0 -1
  241. package/assets/esri/core/workers/chunks/4b1daffa97fd90a554a0.js +0 -1
  242. package/assets/esri/core/workers/chunks/4b68783e8d1415d0a171.js +0 -1
  243. package/assets/esri/core/workers/chunks/5915f5ba9064097aee79.js +0 -1
  244. package/assets/esri/core/workers/chunks/5e1afea05b624b315d9f.js +0 -1
  245. package/assets/esri/core/workers/chunks/5ed7e139c72cd2b3ddba.js +0 -1
  246. package/assets/esri/core/workers/chunks/63f3e46bfa820436161c.js +0 -1
  247. package/assets/esri/core/workers/chunks/702d2c668dedf83421ca.js +0 -1
  248. package/assets/esri/core/workers/chunks/7b2ec80dca0fdb0442cf.js +0 -1
  249. package/assets/esri/core/workers/chunks/7b9178c3826f9ef52a00.js +0 -1
  250. package/assets/esri/core/workers/chunks/9a20390602126995f831.js +0 -1
  251. package/assets/esri/core/workers/chunks/a2150baf0661e2f28011.js +0 -1
  252. package/assets/esri/core/workers/chunks/a532614aa65fb52dee7b.js +0 -1
  253. package/assets/esri/core/workers/chunks/abededd48e0ea6cfec01.js +0 -1
  254. package/assets/esri/core/workers/chunks/ae1cb4c65d72217ae4d4.js +0 -1
  255. package/assets/esri/core/workers/chunks/c1c6202f7bef24b5db26.js +0 -1
  256. package/assets/esri/core/workers/chunks/c75b0243e5bb84738419.js +0 -1
  257. package/assets/esri/core/workers/chunks/d47c3431c501d77b1779.js +0 -1
  258. package/assets/esri/core/workers/chunks/f6d91256c4e5f8a0d5c0.js +0 -1
  259. package/assets/esri/core/workers/chunks/f711aeba1a2c184ddb43.js +0 -1
  260. package/graphic/isPopupProviderGraphicOrigin.js +0 -5
  261. package/views/2d/analysisViewModuleImportUtils.js +0 -5
  262. package/views/3d/analysis/ElevationProfile/ElevationProfileLinesVisualization.js +0 -5
  263. package/views/3d/analysisViewModuleImportUtils.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1863],{162:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var i=r(31635),s=r(7762),n=r(38961),o=r(92071),l=r(74887),a=r(36708),u=r(84952),c=r(10107),h=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),d=r(43937),y=r(5443),f=r(16930),m=r(4146),g=r(63074),b=r(16131),v=r(8303),_=r(54310),w=r(25036),F=r(10873),M=r(65529),S=r(25482),T=r(92474),x=r(799),C=r(56507),I=r(99959);const A=Symbol("isKMLGraphicOrigin");var P;class Z extends I.A{static{P=A}constructor(e,t){super(),this[P]=!0,this.type="kml",this.layer=e,this.sublayer=t}}var O=r(92602),R=r(70333),E=(r(13874),r(78888)),N=r(4718),L=r(70328),G=r(16079);r(65494),r(22671);const j={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function k(e){const t=e.folders||[],r=t.slice(),i=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach(e=>{const t=(0,N.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;i.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?$(s,l,e.featureSet.features):"esriGeometryPolyline"===r?$(n,l,e.featureSet.features):"esriGeometryPolygon"===r&&$(o,l,e.featureSet.features)}),e.groundOverlays&&e.groundOverlays.forEach(e=>{l.set(e.id,e)}),t.forEach(t=>{t.networkLinkIds.forEach(i=>{const s=function(e,t,r){const i=function(e,t){let r;return t.some(t=>t.id===e&&(r=t,!0)),r}(e,r);return i&&(i.parentFolderId=t,i.networkLink=i),i}(i,t.id,e.networkLinks);s&&r.push(s)})}),r.forEach(e=>{if(e.featureInfos){e.points=(0,N.o8)(i.get("esriGeometryPoint")),e.polylines=(0,N.o8)(i.get("esriGeometryPolyline")),e.polygons=(0,N.o8)(i.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[j[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=J([e])}});const u=J(r);return{folders:t,sublayers:r,extent:u}}function D(e,t,r,i){const s=R.id?.findCredential(e);e=(0,u.a6)(e,{token:s?.token});const n=O.A.kmlServiceUrl;return(0,E.A)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:i})}function q(e,t,r=null,i=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map(e=>e.id));return o.forEach(t=>{const o=new e;if(r?o.read(t,r):o.read(t),i.length&&l.has(o.id)&&(o.visible=i.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)}),s}function $(e,t,r){r.forEach(r=>{e.set(r.attributes[t],r)})}function J(e){const t=(0,L.vt)(L.qv),r=(0,L.vt)(L.qv);for(const i of e){if(i.polygons?.featureSet?.features)for(const e of i.polygons.featureSet.features)(0,G.LJ)(t,e.geometry),(0,L.RF)(r,t);if(i.polylines?.featureSet?.features)for(const e of i.polylines.featureSet.features)(0,G.LJ)(t,e.geometry),(0,L.RF)(r,t);if(i.points?.featureSet?.features)for(const e of i.points.featureSet.features)(0,G.LJ)(t,e.geometry),(0,L.RF)(r,t);if(i.mapImages)for(const e of i.mapImages)(0,G.LJ)(t,e.extent),(0,L.RF)(r,t)}return(0,L.aI)(r,L.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.A.WGS84}}var z;let U=z=class extends((0,M.Zt)((0,S.T)(T.x_))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)(()=>this.sublayers,"after-add",({item:e})=>{e.parent=this,e.layer=this.layer},a.OH),(0,a.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=e.parent=null},a.OH),(0,a.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer},a.OH),(0,a.wB)(()=>this.layer,e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e},a.OH)])}initialize(){(0,a.C_)(()=>this.networkLink).then(()=>(0,a.C_)(()=>!0===this.visible)).then(()=>this.load())}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then(e=>{const t=J(e.sublayers);this.fullExtent=y.A.fromJSON(t),this.sourceJSON=e;const r=(0,C.dp)(s.A.ofType(z),q(z,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")});return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}get origin(){return this.layer?new Z(this.layer,this):null}_fetchService(e,t){return D(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then(e=>k(e.data))}};(0,i.Cg)([(0,c.MZ)()],U.prototype,"description",void 0),(0,i.Cg)([(0,c.MZ)({type:y.A})],U.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)()],U.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,value:null})],U.prototype,"networkLink",void 0),(0,i.Cg)([(0,c.MZ)({json:{write:{allowNull:!0}}})],U.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(U),json:{write:{allowNull:!0}}})],U.prototype,"sublayers",void 0),(0,i.Cg)([(0,c.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,x._e)(e)}}})],U.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({value:!0})],U.prototype,"visible",null),(0,i.Cg)([(0,h.w)("visible",["visibility"])],U.prototype,"readVisible",null),(0,i.Cg)([(0,c.MZ)()],U.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,c.MZ)()],U.prototype,"layer",void 0),(0,i.Cg)([(0,c.MZ)()],U.prototype,"origin",null),U=z=(0,i.Cg)([(0,p.$)("esri.layers.support.KMLSublayer")],U);const V=["kml","xml"];let H=class extends((0,g.dM)((0,_.J)((0,w.j)((0,b.q)((0,v.A)((0,o.P)(m.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)(()=>this.sublayers,(e,t)=>{t&&t.forEach(e=>{e.parent=null,e.layer=null}),e&&e.forEach(e=>{e.parent=this,e.layer=this})},a.OH),this.on("sublayer-update",()=>this.notifyChange("fullExtent"))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get sublayerById(){const e=new Map;for(const t of this.allSublayers)e.set(t.id,t);return e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return q(U,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],i=e.toArray();for(;i.length;){const e=i[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&i.push(...e.sublayers.toArray())),i.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,V)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e?.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=k((await Promise.resolve().then(()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:D(this.url??"",this.outSpatialReference,this.refreshInterval,e))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const i of r.sublayers.items)t(i),i.visible&&i.fullExtent&&(null!=e?e.union(i.fullExtent):e=i.fullExtent.clone())};return t(this),e}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"allSublayers",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"sublayerById",null),(0,i.Cg)([(0,c.MZ)({type:f.A})],H.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],H.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],H.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],H.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:["KML"]})],H.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({})],H.prototype,"resourceInfo",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(U),json:{write:{ignoreOrigin:!0}}})],H.prototype,"sublayers",void 0),(0,i.Cg)([(0,h.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],H.prototype,"readSublayersFromItemOrWebMap",null),(0,i.Cg)([(0,h.w)("service","sublayers",["sublayers"])],H.prototype,"readSublayers",null),(0,i.Cg)([(0,d.K)("sublayers")],H.prototype,"writeSublayers",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],H.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],H.prototype,"title",null),(0,i.Cg)([(0,c.MZ)(F.OZ)],H.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"visibleSublayers",null),(0,i.Cg)([(0,c.MZ)({type:y.A})],H.prototype,"extent",void 0),(0,i.Cg)([(0,c.MZ)()],H.prototype,"fullExtent",null),H=(0,i.Cg)([(0,p.$)("esri.layers.KMLLayer")],H);const B=H},4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>n,l5:()=>l,xm:()=>o});var i=r(34275),s=r(9093);function n(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,s.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},6797:(e,t,r)=>{r.d(t,{Mj:()=>p,Ui:()=>y,w2:()=>d});var i=r(65008),s=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter(e=>!i.includes(e)),p=i.filter(e=>!s.includes(e)),d=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(n,p).sort(),y=c(e);if(y&&o.has(y)&&d.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of d){const s=u(e,i),n=u(t,i);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=f?f.diff[i]=o:f={type:"partial",diff:{[i]:o}})}}return f}function p(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function d(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>F});var i=r(31635),s=r(92602),n=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),c=r(97768),h=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),b=r(20655),v=r(80812),_=r(41318),w=r(10407);const F=e=>{const t=e;let F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(s)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!o||!(0,p.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?_.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.A.getDefault());return r&&i&&!(0,p.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,d.MZ)({type:v.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,d.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],F),F},M={credential:null,user:null}},9093:(e,t,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>s,vt:()=>i,zK:()=>n});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:i,fromValues:function(e,t,r,i,s,n,o,l,a,u,c,h,p,d,y,f){return[e,t,r,i,s,n,o,l,a,u,c,h,p,d,y,f]}},Symbol.toStringTag,{value:"Module"}))},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,s=r(31635),n=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),h=r(40608),p=r(43937),d=r(16930),y=r(65864),f=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((s-e)/r));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*n+i,e=>s-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=d.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),l=n.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=i);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(o)}return s}_quantizePoints(e,t,r){let i,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===s||(n.push([e-i,o-s]),i=e,s=o)}else i=t(l[0]),s=r(l[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],o=this._quantizePoints(n,t,r);o&&s.push(o)}return s.length>0?((0,y.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,u.MZ)({type:[n.A],json:{write:!0}})],b.prototype,"features",void 0),(0,s.Cg)([(0,c.w)("features")],b.prototype,"readFeatures",null),(0,s.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,s.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,s.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,c.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,u.MZ)({type:d.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,s.Cg)([(0,h.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(7762),n=r(36708),o=r(10107),l=r(40608),a=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)(()=>this._refresh(),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,l.$)("esri.core.CollectionFlattener")],u)},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,n]=t.split("."),o=/^\s*\d+\s*$/;if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),a=parseInt(n,10);return new e(l,a,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>h,gy:()=>c,yR:()=>p});var i=r(66552),s=r(5443),n=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(31635),n=r(13874),o=r(69540),l=r(51447),a=r(25482),u=r(53966),c=r(36708),h=r(24326),p=r(10107),d=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(54339),b=r(33910);function v(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let _=class extends((0,o.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r&&"object"==typeof r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:v(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=i),"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s.Cg)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],_.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,p.MZ)({value:null})],_.prototype,"attributes",null),(0,s.Cg)([(0,p.MZ)({value:null,types:m.yR,json:{read:f.rS}})],_.prototype,"geometry",null),(0,s.Cg)([(0,p.MZ)({type:Boolean})],_.prototype,"isAggregate",void 0),(0,s.Cg)([(0,p.MZ)({clonable:!1})],_.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],_.prototype,"origin",void 0),(0,s.Cg)([(0,p.MZ)({type:n.A,value:null})],_.prototype,"popupTemplate",null),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],_.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,p.MZ)({value:null,types:b.Es})],_.prototype,"symbol",null),(0,s.Cg)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],_.prototype,"_version",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,value:!0})],_.prototype,"visible",null),_=i=(0,s.Cg)([(0,d.$)("esri.Graphic")],_)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>s})},55674:(e,t,r)=>{r.d(t,{Ad:()=>d,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>y});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),c=r(98623);const h=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of h)t.hasArcadeDependency(r)&&e.add(r);return e}function d(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=n.scriptUsesGeometryEngine(l);a&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,a);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},h=n.compileScript(l,c);let p=null;null!=r&&(p=new o(r),p.immutable=!0);const d=new o;return d.immutable=!1,d.setField("scale",0),new f(e,n,l,h,t,d,p,o)}constructor(e,t,r,i,s,n,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},65494:(e,t,r)=>{r.d(t,{L:()=>a,r:()=>o});var i=r(67076),s=r(90360),n=r(41214);function o(e,t){return a(e,null,t)}const l=(0,s.C)({types:n.Hg});function a(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):l(e,t,r):null}},70328:(e,t,r)=>{r.d(t,{BI:()=>v,DC:()=>h,Ej:()=>d,Ie:()=>g,Jt:()=>b,Ne:()=>y,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>a,hZ:()=>m,iT:()=>p,is:()=>_,qv:()=>F,vI:()=>f,vY:()=>l,v_:()=>M,vt:()=>n,w1:()=>u});var i=r(5443),s=(r(19419),r(4197));function n(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=s,l[5]=o,l}function l(e,t=n()){return function(e,t,r,i=n()){return m(i,F),function(e,t,r=0,i=t.length/3){let s=e[0],n=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)s=Math.min(s,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=n,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function a(e,t=(0,s.jh)(24)){const[r,i,n,o,l,a]=e;return t[0]=r,t[1]=i,t[2]=n,t[3]=r,t[4]=i,t[5]=a,t[6]=r,t[7]=l,t[8]=n,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=n,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=n,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,F):n(F)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];n()},73681:(e,t,r)=>{r.d(t,{n:()=>a});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),h={};if(t)for(const e in t)h[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)h.hasOwnProperty(t.name)||(h[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const d=await(0,l.xR)(e.expression,null,h);if(!d)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!o||!o.greaterEqual(4,0);y&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,y);return new a(y,c,d,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),s=r(53966),n=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),c=r(56400),h=r(96285);const p=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],g(e))}static fromLayerJSON(e){return new d(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=f(t);if(t&&i){const s=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?h.mQ.utcInstance:(0,n.tE)(p,t,()=>h.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??l:s.dateFieldsTimeReference?(0,c.ZS)(s.dateFieldsTimeReference):l??u.n$:null,h=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,c.ZS)(i.timeReference):l:null,p=new Map([[y(s?.creationDateField??""),a],[y(s?.editDateField??""),a],[y(n),h],[y(o),h]]);for(const{name:i,type:s}of e.fields)if(m.has(s))t.set(i,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=p.get(y(i??""))??l;t.set(i,e)}return t}},96576:(e,t,r)=>{r.d(t,{A:()=>p});var i,s=r(31635),n=r(4718),o=r(10107),l=(r(44208),r(53966),r(93223)),a=r(40608),u=r(92438),c=r(63988),h=r(49849);let p=i=class extends((0,c.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,n.o8)(this.symbol),visualVariables:(0,n.o8)(this.visualVariables),authoringInfo:(0,n.o8)(this.authoringInfo)})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)(h.Wp)],p.prototype,"symbol",void 0),(0,s.Cg)([(0,l.e)({simple:"simple"})],p.prototype,"type",void 0),p=i=(0,s.Cg)([(0,a.$)("esri.renderers.SimpleRenderer")],p)},99959:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(31635),s=(r(53966),r(44208),r(87811),r(49186),r(40608));let n=class{};n=(0,i.Cg)([(0,s.$)("esri.graphic.GraphicOrigin")],n)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1863],{162:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var i=r(31635),s=r(7762),n=r(38961),o=r(92071),l=r(74887),a=r(36708),u=r(84952),c=r(10107),p=(r(44208),r(53966),r(87811),r(36005)),h=r(40608),d=r(43937),y=r(5443),f=r(16930),m=r(4146),g=r(63074),b=r(16131),v=r(8303),_=r(54310),w=r(25036),F=r(10873),M=r(65529),S=r(25482),T=r(92474),x=r(799),C=r(56507),I=r(99959);const A=Symbol("isKMLGraphicOrigin");var P;class Z extends I.A{static{P=A}constructor(e,t){super(),this[P]=!0,this.type="kml",this.layer=e,this.sublayer=t}}var O=r(92602),R=r(70333),E=(r(13874),r(78888)),N=r(4718),L=r(70328),G=r(16079);r(65494),r(22671);const j={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function k(e){const t=e.folders||[],r=t.slice(),i=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach(e=>{const t=(0,N.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;i.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?$(s,l,e.featureSet.features):"esriGeometryPolyline"===r?$(n,l,e.featureSet.features):"esriGeometryPolygon"===r&&$(o,l,e.featureSet.features)}),e.groundOverlays&&e.groundOverlays.forEach(e=>{l.set(e.id,e)}),t.forEach(t=>{t.networkLinkIds.forEach(i=>{const s=function(e,t,r){const i=function(e,t){let r;return t.some(t=>t.id===e&&(r=t,!0)),r}(e,r);return i&&(i.parentFolderId=t,i.networkLink=i),i}(i,t.id,e.networkLinks);s&&r.push(s)})}),r.forEach(e=>{if(e.featureInfos){e.points=(0,N.o8)(i.get("esriGeometryPoint")),e.polylines=(0,N.o8)(i.get("esriGeometryPolyline")),e.polygons=(0,N.o8)(i.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[j[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=J([e])}});const u=J(r);return{folders:t,sublayers:r,extent:u}}function D(e,t,r,i){const s=R.id?.findCredential(e);e=(0,u.a6)(e,{token:s?.token});const n=O.A.kmlServiceUrl;return(0,E.A)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:i})}function q(e,t,r=null,i=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map(e=>e.id));return o.forEach(t=>{const o=new e;if(r?o.read(t,r):o.read(t),i.length&&l.has(o.id)&&(o.visible=i.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)}),s}function $(e,t,r){r.forEach(r=>{e.set(r.attributes[t],r)})}function J(e){const t=(0,L.vt)(L.qv),r=(0,L.vt)(L.qv);for(const i of e){if(i.polygons?.featureSet?.features)for(const e of i.polygons.featureSet.features)(0,G.LJ)(t,e.geometry),(0,L.RF)(r,t);if(i.polylines?.featureSet?.features)for(const e of i.polylines.featureSet.features)(0,G.LJ)(t,e.geometry),(0,L.RF)(r,t);if(i.points?.featureSet?.features)for(const e of i.points.featureSet.features)(0,G.LJ)(t,e.geometry),(0,L.RF)(r,t);if(i.mapImages)for(const e of i.mapImages)(0,G.LJ)(t,e.extent),(0,L.RF)(r,t)}return(0,L.aI)(r,L.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.A.WGS84}}var z;let U=z=class extends((0,M.Zt)((0,S.T)(T.x_))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)(()=>this.sublayers,"after-add",({item:e})=>{e.parent=this,e.layer=this.layer},a.OH),(0,a.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=e.parent=null},a.OH),(0,a.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer},a.OH),(0,a.wB)(()=>this.layer,e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e},a.OH)])}initialize(){(0,a.C_)(()=>this.networkLink).then(()=>(0,a.C_)(()=>!0===this.visible)).then(()=>this.load())}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then(e=>{const t=J(e.sublayers);this.fullExtent=y.A.fromJSON(t),this.sourceJSON=e;const r=(0,C.dp)(s.A.ofType(z),q(z,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")});return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}get origin(){return this.layer?new Z(this.layer,this):null}_fetchService(e,t){return D(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then(e=>k(e.data))}};(0,i.Cg)([(0,c.MZ)()],U.prototype,"description",void 0),(0,i.Cg)([(0,c.MZ)({type:y.A})],U.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)()],U.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,value:null})],U.prototype,"networkLink",void 0),(0,i.Cg)([(0,c.MZ)({json:{write:{allowNull:!0}}})],U.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(U),json:{write:{allowNull:!0}}})],U.prototype,"sublayers",void 0),(0,i.Cg)([(0,c.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,x._e)(e)}}})],U.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({value:!0})],U.prototype,"visible",null),(0,i.Cg)([(0,p.w)("visible",["visibility"])],U.prototype,"readVisible",null),(0,i.Cg)([(0,c.MZ)()],U.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,c.MZ)()],U.prototype,"layer",void 0),(0,i.Cg)([(0,c.MZ)()],U.prototype,"origin",null),U=z=(0,i.Cg)([(0,h.$)("esri.layers.support.KMLSublayer")],U);const V=["kml","xml"];let H=class extends((0,g.dM)((0,_.J)((0,w.j)((0,b.q)((0,v.A)((0,o.P)(m.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)(()=>this.sublayers,(e,t)=>{t&&t.forEach(e=>{e.parent=null,e.layer=null}),e&&e.forEach(e=>{e.parent=this,e.layer=this})},a.OH),this.on("sublayer-update",()=>this.notifyChange("fullExtent"))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get sublayerById(){const e=new Map;for(const t of this.allSublayers)e.set(t.id,t);return e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return q(U,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],i=e.toArray();for(;i.length;){const e=i[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&i.push(...e.sublayers.toArray())),i.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,V)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e?.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=k((await Promise.resolve().then(()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:D(this.url??"",this.outSpatialReference,this.refreshInterval,e))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const i of r.sublayers.items)t(i),i.visible&&i.fullExtent&&(null!=e?e.union(i.fullExtent):e=i.fullExtent.clone())};return t(this),e}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"allSublayers",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"sublayerById",null),(0,i.Cg)([(0,c.MZ)({type:f.A})],H.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],H.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],H.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],H.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:["KML"]})],H.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({})],H.prototype,"resourceInfo",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(U),json:{write:{ignoreOrigin:!0}}})],H.prototype,"sublayers",void 0),(0,i.Cg)([(0,p.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],H.prototype,"readSublayersFromItemOrWebMap",null),(0,i.Cg)([(0,p.w)("service","sublayers",["sublayers"])],H.prototype,"readSublayers",null),(0,i.Cg)([(0,d.K)("sublayers")],H.prototype,"writeSublayers",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],H.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],H.prototype,"title",null),(0,i.Cg)([(0,c.MZ)(F.OZ)],H.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"visibleSublayers",null),(0,i.Cg)([(0,c.MZ)({type:y.A})],H.prototype,"extent",void 0),(0,i.Cg)([(0,c.MZ)()],H.prototype,"fullExtent",null),H=(0,i.Cg)([(0,h.$)("esri.layers.KMLLayer")],H);const B=H},4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>n,l5:()=>l,xm:()=>o});var i=r(34275),s=r(9093);function n(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,s.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},6797:(e,t,r)=>{r.d(t,{Mj:()=>h,Ui:()=>y,w2:()=>d});var i=r(65008),s=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter(e=>!i.includes(e)),h=i.filter(e=>!s.includes(e)),d=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(n,h).sort(),y=c(e);if(y&&o.has(y)&&d.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of d){const s=u(e,i),n=u(t,i);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?p(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=f?f.diff[i]=o:f={type:"partial",diff:{[i]:o}})}}return f}function h(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function d(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>F});var i=r(31635),s=r(92602),n=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),c=r(97768),p=r(74887),h=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),b=r(20655),v=r(80812),_=r(41318),w=r(10407);const F=e=>{const t=e;let F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(s)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,h.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.A.getDefault();if(s&&s.loaded&&(0,h.S8)(s.restUrl)===(0,h.S8)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?_.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.A.getDefault());return r&&i&&!(0,h.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,d.MZ)({type:v.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,d.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],F),F},M={credential:null,user:null}},9093:(e,t,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>s,vt:()=>i,zK:()=>n});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:i,fromValues:function(e,t,r,i,s,n,o,l,a,u,c,p,h,d,y,f){return[e,t,r,i,s,n,o,l,a,u,c,p,h,d,y,f]}},Symbol.toStringTag,{value:"Module"}))},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,s=r(31635),n=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),p=r(40608),h=r(43937),d=r(16930),y=r(65864),f=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((s-e)/r));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*n+i,e=>s-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=d.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),l=n.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=i);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(o)}return s}_quantizePoints(e,t,r){let i,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===s||(n.push([e-i,o-s]),i=e,s=o)}else i=t(l[0]),s=r(l[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],o=this._quantizePoints(n,t,r);o&&s.push(o)}return s.length>0?((0,y.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,u.MZ)({type:[n.A],json:{write:!0}})],b.prototype,"features",void 0),(0,s.Cg)([(0,c.w)("features")],b.prototype,"readFeatures",null),(0,s.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,s.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,s.Cg)([(0,h.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,s.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,c.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,u.MZ)({type:d.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,s.Cg)([(0,h.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,s.Cg)([(0,p.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(7762),n=r(36708),o=r(10107),l=r(40608),a=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)(()=>this._refresh(),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,l.$)("esri.core.CollectionFlattener")],u)},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,n]=t.split("."),o=/^\s*\d+\s*$/;if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),a=parseInt(n,10);return new e(l,a,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>p,gy:()=>c,yR:()=>h});var i=r(66552),s=r(5443),n=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),h={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>w});var i,s=r(31635),n=r(13874),o=r(69540),l=r(51447),a=r(25482),u=r(53966),c=r(36708),p=r(24326),h=r(10107),d=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(60950),b=r(54339),v=r(33910);function _(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let w=class extends((0,o.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,g.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,b.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:_(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=i),"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s.Cg)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],w.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,h.MZ)({value:null})],w.prototype,"attributes",null),(0,s.Cg)([(0,h.MZ)({value:null,types:m.yR,json:{read:f.rS}})],w.prototype,"geometry",null),(0,s.Cg)([(0,h.MZ)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,s.Cg)([(0,h.MZ)({clonable:!1})],w.prototype,"layer",void 0),(0,s.Cg)([(0,h.MZ)({clonable:"reference"})],w.prototype,"origin",void 0),(0,s.Cg)([(0,h.MZ)({type:n.A,value:null})],w.prototype,"popupTemplate",null),(0,s.Cg)([(0,h.MZ)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,h.MZ)({value:null,types:v.Es})],w.prototype,"symbol",null),(0,s.Cg)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],w.prototype,"_version",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,value:!0})],w.prototype,"visible",null),w=i=(0,s.Cg)([(0,d.$)("esri.Graphic")],w)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>s})},55674:(e,t,r)=>{r.d(t,{Ad:()=>d,Gj:()=>m,QY:()=>h,lL:()=>g,xR:()=>y});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function d(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=n.scriptUsesGeometryEngine(l);a&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,a);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},p=n.compileScript(l,c);let h=null;null!=r&&(h=new o(r),h.immutable=!0);const d=new o;return d.immutable=!1,d.setField("scale",0),new f(e,n,l,p,t,d,h,o)}constructor(e,t,r,i,s,n,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},60950:(e,t,r)=>{r.d(t,{E_:()=>s,ym:()=>i});const i=Symbol("popupProvider");function s(e){return function(e){return!!e&&i in e}(e)?e[i]:null}},65494:(e,t,r)=>{r.d(t,{L:()=>a,r:()=>o});var i=r(67076),s=r(90360),n=r(41214);function o(e,t){return a(e,null,t)}const l=(0,s.C)({types:n.Hg});function a(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):l(e,t,r):null}},70328:(e,t,r)=>{r.d(t,{BI:()=>v,DC:()=>p,Ej:()=>d,Ie:()=>g,Jt:()=>b,Ne:()=>y,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>a,hZ:()=>m,iT:()=>h,is:()=>_,qv:()=>F,vI:()=>f,vY:()=>l,v_:()=>M,vt:()=>n,w1:()=>u});var i=r(5443),s=(r(19419),r(4197));function n(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=s,l[5]=o,l}function l(e,t=n()){return function(e,t,r,i=n()){return m(i,F),function(e,t,r=0,i=t.length/3){let s=e[0],n=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)s=Math.min(s,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=n,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function a(e,t=(0,s.jh)(24)){const[r,i,n,o,l,a]=e;return t[0]=r,t[1]=i,t[2]=n,t[3]=r,t[4]=i,t[5]=a,t[6]=r,t[7]=l,t[8]=n,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=n,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=n,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,F):n(F)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];n()},73681:(e,t,r)=>{r.d(t,{n:()=>a});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const d=await(0,l.xR)(e.expression,null,p);if(!d)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!o||!o.greaterEqual(4,0);y&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,y);return new a(y,c,d,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),s=r(53966),n=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),c=r(56400),p=r(96285);const h=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],g(e))}static fromLayerJSON(e){return new d(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=f(t);if(t&&i){const s=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?p.mQ.utcInstance:(0,n.tE)(h,t,()=>p.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??l:s.dateFieldsTimeReference?(0,c.ZS)(s.dateFieldsTimeReference):l??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,c.ZS)(i.timeReference):l:null,h=new Map([[y(s?.creationDateField??""),a],[y(s?.editDateField??""),a],[y(n),p],[y(o),p]]);for(const{name:i,type:s}of e.fields)if(m.has(s))t.set(i,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=h.get(y(i??""))??l;t.set(i,e)}return t}},96576:(e,t,r)=>{r.d(t,{A:()=>h});var i,s=r(31635),n=r(4718),o=r(10107),l=(r(44208),r(53966),r(93223)),a=r(40608),u=r(92438),c=r(63988),p=r(49849);let h=i=class extends((0,c.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,n.o8)(this.symbol),visualVariables:(0,n.o8)(this.visualVariables),authoringInfo:(0,n.o8)(this.authoringInfo)})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)(p.Wp)],h.prototype,"symbol",void 0),(0,s.Cg)([(0,l.e)({simple:"simple"})],h.prototype,"type",void 0),h=i=(0,s.Cg)([(0,a.$)("esri.renderers.SimpleRenderer")],h)},99959:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(31635),s=(r(53966),r(44208),r(87811),r(49186),r(40608));let n=class{};n=(0,i.Cg)([(0,s.$)("esri.graphic.GraphicOrigin")],n)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4342,9062,9279],{22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(31635),s=r(52106),o=r(66552),a=r(25482),l=r(4718),d=r(10107),p=(r(44208),r(53966),r(36005)),u=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),g=r(20437);const m=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const d=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*o,a,l);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),a=s.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=i);const l=s.aggregateGeometries,d=o.aggregateGeometries;if(l&&null!=d)for(const e in d){const t=d[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,h.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,d.MZ)({type:[s.A],json:{write:!0}})],w.prototype,"features",void 0),(0,n.Cg)([(0,p.w)("features")],w.prototype,"readFeatures",null),(0,n.Cg)([(0,d.MZ)({type:[g.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,n.Cg)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],w.prototype,"geometryType",void 0),(0,n.Cg)([(0,c.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,n.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n.Cg)([(0,d.MZ)({types:f.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,p.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,d.MZ)({type:y.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n.Cg)([(0,c.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,d.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n.Cg)([(0,u.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},32587:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(62788),n=r(95488);class s{constructor(e){this._observable=new n.I,this._map=new Map(e)}get size(){return(0,i.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,i.gc)(this._observable),this._map.entries()}forEach(e,t){(0,i.gc)(this._observable),this._map.forEach((r,i)=>e.call(t,r,i,this),t)}get(e){return(0,i.gc)(this._observable),this._map.get(e)}has(e){return(0,i.gc)(this._observable),this._map.has(e)}keys(){return(0,i.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,i.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,i.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>d});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const d={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(d)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),d=r(43937),p=r(80451),u=r(29005);let c=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,d.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[u.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureType")],c)},44794:(e,t,r)=>{r.d(t,{v:()=>a});var i=r(4718),n=r(62788),s=r(95488);class o{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=i.gh){return new o(e,t)}},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(s,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>g,QY:()=>c,lL:()=>m,xR:()=>h});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),d=r(43668),p=r(98623);const u=["geometry","scale","timeProperties"];function c(e,t){if(null!=t)for(const r of u)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,d.l)();let a;try{a=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},u=s.compileScript(a,p);let c=null;null!=r&&(c=new o(r),c.immutable=!0);const y=new o;return y.immutable=!1,y.setField("scale",0),new f(e,s,a,u,t,y,c,o)}constructor(e,t,r,i,n,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new g,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class g{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(m(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function m(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),u={};if(t)for(const e in t)u[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)u.hasOwnProperty(t.name)||(u[t.name]=t.value);const c=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))c.delete(e);c.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});const y=await(0,a.xR)(e.expression,null,u);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new d(r,h);return new l(h,p,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class d extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},83508:(e,t,r)=>{r.r(t),r.d(t,{default:()=>he});var i=r(31635),n=r(78888),s=r(7762),o=r(49186),a=r(91869),l=r(92071),d=r(74887),p=r(84952),u=r(10107),c=(r(44208),r(53966),r(87811),r(40608)),y=r(4146),h=r(36563),f=r(66344),g=r(32587),m=r(36708),w=r(44794),v=r(56507),b=r(63074),_=r(25036),C=r(10873),M=r(91880),Z=r(1873);let F=class extends((0,_.j)((0,b.dM)((0,l.P)(y.A)))){constructor(e){super(e),this._layerCache=new f.q(20,e=>e.destroy()),this._oidToReference=new g.A,this._layerToReference=new Map,this.legendEnabled=!0,this.layers=new s.A,this.maximumVisibleSublayers=10,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.title="Layers in view",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles([this.layers.on("after-add",({item:e})=>{e.parent=this}),this.layers.on("after-remove",({item:e})=>{e.parent=null}),(0,m.wB)(()=>this._orderBy,()=>{this._updateLayerSortValues(),this._sortAllLayers()})])}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._layerCache.destroy(),this._oidToReference.clear(),this._layerToReference.clear()}get _orderBy(){return this.parent?this.parent.orderBy?.find(e=>!e.valueExpression&&e.field)??new M.A({field:this.parent.objectIdField}):null}get _referenceComparator(){const e=this._orderBy;if(!this.parent||!e)return()=>0;const t=this.parent.fieldsIndex.get(e.field),r=(0,Z.FM)(t?.toJSON().type,"descending"===e.order),i=(0,Z.FM)("esriFieldTypeOID","descending"===e.order);return(e,t)=>r(t.sortValue,e.sortValue)||i(t.objectId,e.objectId)}get fullExtent(){return this.parent?.fullExtent??null}get updating(){return(0,a.Bs)(this._oidToReference,({pending:e})=>null!=e)}acquireLayer(e){if(this.destroyed)return(0,h.hA)();const t=this._getLayerReference(e);return t.count++,(0,h.hA)(()=>{t.count--,t.count||this._destroyLayerReference(t)})}_getLayerReference(e){const t=e.getObjectId();return(0,a.tE)(this._oidToReference,t,()=>{const t=e.getObjectId(),r=`${t}`,i=e.getAttribute(this.parent.itemSourceField),n=new x(e,t,i),s=this._layerCache.pop(r);return s?(this._addLayer(n,s),n):(n.pending=this.parent.createLayerFromFootprint(e).then(e=>{n.count?this._addLayer(n,e):(this.destroyed||this._layerCache.get(r)||this._layerCache.put(r,e),n.layer=null)}).catch(()=>{}).finally(()=>{n.pending=null}),n)})}_destroyLayerReference(e){e.layer&&(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this.destroyed?e.layer.destroy():this._layerCache.put(`${e.objectId}`,e.layer),e.layer=null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,t.persistenceEnabled=!1,this._layerToReference.set(t,e),this._updateLayerSortValue(e),this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(const e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){this._orderBy&&(e.sortValue=e.footprint.getAttribute(this._orderBy.field))}_sortAllLayers(){this.layers.sort((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t)))}};(0,i.Cg)([(0,u.MZ)()],F.prototype,"_orderBy",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],F.prototype,"_referenceComparator",null),(0,i.Cg)([(0,u.MZ)(C.fV)],F.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide","hide-children"],json:{write:!0}})],F.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],F.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],F.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],F.prototype,"layers",void 0),(0,i.Cg)([(0,u.MZ)({type:v.jz,range:{min:0,max:50},json:{write:!0,default:10}})],F.prototype,"maximumVisibleSublayers",void 0),(0,i.Cg)([(0,u.MZ)(C.ke)],F.prototype,"opacity",void 0),(0,i.Cg)([(0,u.MZ)({clonable:!1})],F.prototype,"parent",void 0),(0,i.Cg)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],F.prototype,"title",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],F.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],F.prototype,"updating",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],F.prototype,"visible",void 0),F=(0,i.Cg)([(0,c.$)("esri.layers.catalog.CatalogDynamicGroupLayer")],F);class x{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0,this._pending=(0,w.v)(null)}get pending(){return this._pending.value}set pending(e){this._pending.value=e}}var S=r(13874),T=r(4718),I=r(38141),O=r(60950),j=r(99959);const E=Symbol("isCatalogGraphicOrigin");var R;class A extends j.A{constructor(e){super(),this[R]=!0,this.type="catalog",this.layer=e}get[(R=E,O.ym)](){return this.layer}}var L=r(87718),q=r(30524),P=r(46499),D=r(39383),N=r(96576),V=r(41214),G=r(30291),$=r(94985);let B=class extends((0,_.j)((0,L.F)((0,b.dM)((0,l.P)(y.A))))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.graphicOrigin=new A(this),this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,q.yp)(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",e=>this.emit("apply-edits",e)),this.parent.on("edits",e=>this.emit("edits",e)),this.parent.on("refresh",e=>this.emit("refresh",e))])}get apiKey(){return this.parent?.apiKey}get capabilities(){return this.parent?.capabilities}get customParameters(){return this.parent?.customParameters}get dateFieldsTimeZone(){return this.parent?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this.parent?.datesInUnknownTimezone??!1}get definitionExpression(){return this.parent?.definitionExpression}get editingInfo(){return this.parent?.editingInfo}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get createQueryVersion(){return this.parent?.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){return this.parent?.displayField}get displayFilterEnabled(){return this.parent?.displayFilterEnabled??!0}get displayFilterInfo(){return this.parent?.displayFilterInfo??null}get effectiveEditingEnabled(){return!1}get fields(){return this.parent?.fields}get fieldsIndex(){return this.parent?.fieldsIndex}get fullExtent(){return this.parent?.fullExtent}get geometryFieldsInfo(){return this.parent?.geometryFieldsInfo}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?.globalIdField}get hasM(){return this.parent?.hasM??!1}get hasZ(){return this.parent?.hasZ??!1}get objectIdField(){return this.parent?.objectIdField}get orderBy(){return this.parent?.orderBy??null}get outFields(){return this.parent?.outFields}get parsedUrl(){return this.parent?.parsedUrl??null}get preferredTimeZone(){return this.parent?.preferredTimeZone??null}set renderer(e){(0,q.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){const e=new $.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new N.A({symbol:e})}()}get returnM(){return this.parent?.returnM}get returnZ(){return this.parent?.returnZ}get source(){return this.parent?.source}get timeExtent(){return this.parent?.timeExtent}get timeInfo(){return this.parent?.timeInfo}get timeOffset(){return this.parent?.timeOffset}get typeIdField(){return this.parent?.typeIdField}get types(){return this.parent?.types}get useViewTime(){return this.parent?.useViewTime??!0}get version(){return this.parent?.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createPopupTemplate(e){const t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return(0,G.tn)(t,e)}createQuery(){return this.parent?.createQuery()}getField(e){return this.parent?.getField(e)}getFieldDomain(e,t){return this.parent?.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}async queryAttributeBins(e,t){return await this.load(),this.parent.queryAttributeBins(e,t)}};(0,i.Cg)([(0,u.MZ)(C.zQ)],B.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"apiKey",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"capabilities",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"customParameters",null),(0,i.Cg)([(0,u.MZ)()],B.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"definitionExpression",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"editingInfo",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],B.prototype,"charts",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"createQueryVersion",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"displayField",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],B.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,u.MZ)((()=>{const e=(0,T.o8)(C.Yj);return e.json.origins["web-map"]={read:!1,write:!1},e})())],B.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"fields",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"fieldsIndex",null),(0,i.Cg)([(0,u.MZ)({type:I.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],B.prototype,"formTemplate",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"geometryFieldsInfo",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"geometryType",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"globalIdField",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0,clonable:!1})],B.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"hasM",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"hasZ",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],B.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({type:[P.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:D.w,write:!0}})],B.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,u.MZ)(C.kF)],B.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,u.MZ)(C.fV)],B.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide"],json:{write:!0}})],B.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)((()=>{const e=(0,T.o8)(C.hG);return e.json.origins.service.read=!1,e})())],B.prototype,"maxScale",void 0),(0,i.Cg)([(0,u.MZ)((()=>{const e=(0,T.o8)(C.hn);return e.json.origins.service.read=!1,e})())],B.prototype,"minScale",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"objectIdField",null),(0,i.Cg)([(0,u.MZ)(C.ke)],B.prototype,"opacity",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"orderBy",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"outFields",null),(0,i.Cg)([(0,u.MZ)({clonable:!1})],B.prototype,"parent",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"parsedUrl",null),(0,i.Cg)([(0,u.MZ)(C.M6)],B.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:S.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"preferredTimeZone",null),(0,i.Cg)([(0,u.MZ)({types:V.Hg,json:{origins:{"web-scene":{types:V.XJ}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t)<3}}}}})],B.prototype,"renderer",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"returnM",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"returnZ",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"source",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"timeExtent",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"timeInfo",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"timeOffset",null),(0,i.Cg)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],B.prototype,"title",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],B.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"typeIdField",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"types",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],B.prototype,"useViewTime",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],B.prototype,"visible",void 0),B=(0,i.Cg)([(0,c.$)("esri.layers.catalog.CatalogFootprintLayer")],B);var k=r(72593),J=r(52136),z=r(18768),U=r(69208),Q=r(6455),Y=r(47685),K=r(87796),H=r(16131),W=r(32756),X=r(8303),ee=r(54310),te=r(82935),re=r(15426),ie=r(33143),ne=r(17036),se=r(91908),oe=r(20655),ae=r(80812),le=r(39131),de=r(61956);const pe=(0,ne.p)();function ue(e,t,r,i){const n=e.write({},i);(function(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let ce=class extends((0,Q.FJ)((0,K.j)((0,Y.w6)((0,b.dM)((0,W.fY)((0,te.e)((0,_.j)((0,ee.J)((0,z.b)((0,H.q)((0,X.A)((0,l.P)((0,U.d)((0,J.p)(y.A))))))))))))))){constructor(e){super(e),this.legendEnabled=!0,this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new F({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new B({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new s.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new k.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d.QP).then(async()=>{const{url:e,source:r,portalItem:i}=this;if(!e)throw new o.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new o.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:n}=r;n&&(this.sourceJSON=n,this.read(n,{origin:"service",portalItem:i,portal:i?.portal,url:this.parsedUrl}))}).then(()=>{const e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new o.A("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}).then(()=>(0,re.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}async applyEdits(e,t){return(0,re.ct)(this,e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new de.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return(0,re.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return(0,re.jp)(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(de.A.from(e)??r.createQuery(),t),n=r.footprintLayer.graphicOrigin;if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r.footprintLayer,e.origin=n;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(de.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(de.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(de.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,se.D)(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async queryAttributeBins(e,t){const{source:i,capabilities:n}=await this.load();(0,re.ZJ)(e,n,"CatalogLayer");const s=await r.e(4575).then(r.bind(r,14575)),o=await i.queryAttributeBins(s.default.from(e),t);if(o.features)for(const e of o.features)e.layer=e.sourceLayer=this.footprintLayer;return o}async _fetchFirstValidLayerId(e){const{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(this.applyPreferredHost(t),Array.isArray(t?.layers))return t.layers.find(({type:e})=>this.supportedSourceTypes.has(e))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new o.A("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const i=JSON.parse(t);if(function(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}(i)){const{itemId:e,portalUrl:t}=i,r=(0,le.qG)(t),n=this.portalItem?.portal,s=oe.A.getDefault();let o,l=!0;n&&(0,p.ut)(t,n.url)?o=n:(0,p.ut)(t,s.url)?o=s:(o=(0,a.tE)(this._portals,r,()=>new oe.A({url:r})),l=!1);const d=await y.A.fromPortalItem(new ae.default({id:e,portal:o}));return l||await ye(d),d}if(function(e){return"object"==typeof e&&null!=e&&"url"in e}(i))return y.A.fromArcGISServerUrl({url:i.url});const{default:n}=await r.e(7546).then(r.bind(r,45165));return new n}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};async function ye(e){if("portalItem"in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,"group"===e.type&&await Promise.allSettled([...e.layers.map(e=>ye(e)),...e.tables.map(e=>ye(e))])}}(0,i.Cg)([(0,u.MZ)(C.fV)],ce.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"createQueryVersion",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"drawOrderField",void 0),(0,i.Cg)([(0,u.MZ)({type:F,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ue}}})],ce.prototype,"dynamicGroupLayer",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"editingEnabled",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],ce.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,u.MZ)({...pe.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ce.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)(pe.fieldsIndex)],ce.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],ce.prototype,"floorInfo",void 0),(0,i.Cg)([(0,u.MZ)({type:B,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ue}}})],ce.prototype,"footprintLayer",void 0),(0,i.Cg)([(0,u.MZ)(C.id)],ce.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"itemNameField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"itemSourceField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"itemTypeField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"layers",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide","hide-children"]})],ce.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"maxScaleField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"minScaleField",void 0),(0,i.Cg)([(0,u.MZ)({value:"CatalogLayer",type:["CatalogLayer"]})],ce.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],ce.prototype,"orderBy",void 0),(0,i.Cg)([(0,u.MZ)(pe.outFields)],ce.prototype,"outFields",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ce.prototype,"source",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],ce.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({type:String})],ce.prototype,"typeIdField",void 0),(0,i.Cg)([(0,u.MZ)({type:[ie.A]})],ce.prototype,"types",void 0),ce=(0,i.Cg)([(0,c.$)("esri.layers.CatalogLayer")],ce);const he=ce},87718:(e,t,r)=>{r.d(t,{F:()=>S,Y:()=>x});var i,n=r(31635),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(49186),l=r(25482),d=r(93637),p=r(76369),u=r(66552),c=r(4718),y=r(50498),h=r(61956),f=r(64272);const g=new u.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new u.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=i=class extends l.o{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new h.A({geometry:(0,c.o8)(r),objectIds:(0,c.o8)(s),spatialRelationship:i,timeExtent:(0,c.o8)(n),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new i({geometry:(0,c.o8)(t),objectIds:(0,c.o8)(s),spatialRelationship:r,timeExtent:(0,c.o8)(n),where:e,units:o,distance:a})}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,n.Cg)([(0,s.MZ)({types:y.yR,json:{write:!0}})],w.prototype,"geometry",void 0),(0,n.Cg)([(0,s.MZ)({type:g.apiValues,json:{name:"spatialRel",read:{reader:g.read},write:{allowNull:!1,writer:g.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,n.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n.Cg)([(0,s.MZ)({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,n.Cg)([(0,s.MZ)({type:f.T,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=i=(0,n.Cg)([(0,o.$)("esri.layers.support.FeatureFilter")],w);const v=w;var b;const _={read:{reader:p.LF},write:{writer:p.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},C={read:{reader:p.LF},write:{writer:p.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},M={name:"showExcludedLabels",default:!0};let Z=b=class extends l.o{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new b({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n.Cg)([(0,s.MZ)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,d.sM)(r,n,t):(0,d.sM)(r,null,t)}}}})],Z.prototype,"filter",void 0),(0,n.Cg)([(0,s.MZ)({json:{read:p.LF,write:{writer:p.M9,allowNull:!0},origins:{"web-map":_,"portal-item":_}}})],Z.prototype,"includedEffect",void 0),(0,n.Cg)([(0,s.MZ)({json:{read:p.LF,write:{writer:p.M9,allowNull:!0},origins:{"web-map":C,"portal-item":C}}})],Z.prototype,"excludedEffect",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":M,"portal-item":M}}})],Z.prototype,"excludedLabelsVisible",void 0),Z=b=(0,n.Cg)([(0,o.$)("esri.layers.support.FeatureEffect")],Z);const F={write:{allowNull:!0}},x={type:Z,json:{origins:{"web-map":F,"portal-item":F}}},S=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.featureEffect=null}};return(0,n.Cg)([(0,s.MZ)(x)],r.prototype,"featureEffect",void 0),r=(0,n.Cg)([(0,o.$)("esri.layers.mixins.FeatureEffectLayer")],r),r}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const d=new s.J({asc:"ascending",desc:"descending"});let p=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],p.prototype,"order",void 0),p=i=(0,n.Cg)([(0,l.$)("esri.layers.support.OrderByInfo")],p)},96520:(e,t,r)=>{r.d(t,{u:()=>o});var i=r(83047),n=r(21325);function s(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const n=(0,i.G9)(r);a(e,r,n),a(t,r,n)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;const o=(0,i.G9)(e.spatialReference)/r;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)s(e,e.rings,o);else if("paths"in e)s(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5356,5613],{4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(7036)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(3029),t.e(4111),t.e(4897),t.e(9784),t.e(7005),t.e(3474),t.e(6445),t.e(6298),t.e(3546),t.e(8207)]).then(t.bind(t,51613))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(3029),t.e(4111),t.e(4897),t.e(9784),t.e(5964)]).then(t.bind(t,68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(4111),t.e(4897),t.e(364),t.e(8628),t.e(2593),t.e(9279),t.e(3549)]).then(t.bind(t,83508))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9953),t.e(9186),t.e(5751)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(3029),t.e(4111),t.e(4897),t.e(9784),t.e(1072)]).then(t.bind(t,29784))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(6131),t.e(6730)]).then(t.bind(t,36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(3029),t.e(8766)]).then(t.bind(t,15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1093)]).then(t.bind(t,85582))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(3562),t.e(8256)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(9953),t.e(1956),t.e(364),t.e(1427),t.e(7654),t.e(3417)]).then(t.bind(t,42729))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(9953),t.e(1427),t.e(6049),t.e(7654),t.e(7677),t.e(9689)]).then(t.bind(t,39689))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(9499),t.e(6239)]).then(t.bind(t,7543))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(6298),t.e(9499),t.e(9752)]).then(t.bind(t,65506))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1863)]).then(t.bind(t,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(708),t.e(3029),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(5655),t.e(1082),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(7721),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(708),t.e(3029),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(5655),t.e(1082),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(4111),t.e(364),t.e(3249),t.e(7656),t.e(2042)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(3029),t.e(4111),t.e(4897),t.e(9784),t.e(5655),t.e(8110)]).then(t.bind(t,96299))).default,MediaLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(2763)]).then(t.bind(t,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(3029),t.e(6445),t.e(5363),t.e(4224)]).then(t.bind(t,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(3029),t.e(4111),t.e(4897),t.e(9784),t.e(9361),t.e(5549)]).then(t.bind(t,9352))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(7984),t.e(7885)]).then(t.bind(t,77885))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(217),t.e(979)]).then(t.bind(t,64185))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(7005),t.e(3474),t.e(6445),t.e(6298),t.e(3546),t.e(1713)]).then(t.bind(t,36969))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(3029),t.e(73)]).then(t.bind(t,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1956),t.e(3926),t.e(4111),t.e(4897),t.e(6731)]).then(t.bind(t,97483))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(4111),t.e(364),t.e(9186),t.e(3249),t.e(573)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(5897),t.e(4937)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await Promise.all([t.e(6131),t.e(3910),t.e(8096),t.e(5323),t.e(7732)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(7721),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(1005)]).then(t.bind(t,21005))).default,WCSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(9953),t.e(1427),t.e(6049),t.e(7654),t.e(7677),t.e(8854)]).then(t.bind(t,88854))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(3029),t.e(9110)]).then(t.bind(t,21901))).default,WMSLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(5323),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773)]).then(t.bind(t,47314))).default}},8947:(e,a,t)=>{t.d(a,{L:()=>l});var r=t(60999),n=t(74887),i=t(67076);async function l(e,a,t){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,r.Ke)(l.populateFromStyle());if((0,n.Te)(t),!1===s.ok){const t=s.error;a?.messages&&a.messages.push(new i.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${t.message}`,{error:t,context:a})),e.clear("renderer",a?.origin)}}}},9762:(e,a,t)=>{t.r(a),t.d(a,{projectBuffer:()=>n});var r=t(37539);function n(e,a,t,n,i,l,s=Math.floor(e.length/3)){const c=(0,r.jd)(a,i);if(null==c)return!1;if(c===r.pO){if(e===n&&t===l)return!0;const a=t+3*s;for(let r=t,i=l;r<a;r++,i++)n[i]=e[r];return!0}const o=t+3*s;for(let a=t,r=l;a<o;a+=3,r+=3)c(e,a,n,r);return!0}},10407:(e,a,t)=>{t.d(a,{It:()=>d,LG:()=>l,OM:()=>o,Sm:()=>u,Y:()=>s,bK:()=>c,mm:()=>f,sQ:()=>y});var r=t(98988),n=t(16930),i=t(28735);function l(e,a){if(!s(e,a)){const t=e.typeKeywords;t?t.push(a):e.typeKeywords=[a]}}function s(e,a){return!!e.typeKeywords?.includes(a)}function c(e){return s(e,f.HOSTED_SERVICE)}function o(e,a){const t=e.typeKeywords;if(t){const e=t.indexOf(a);e>-1&&t.splice(e,1)}}function u(e,a,t){t?l(e,a):o(e,a)}async function y(e){const a=e.clone().normalize();let t;if(a.length>1)for(const e of a)t?e.width>t.width&&(t=e):t=e;else t=a[0];return async function(e){const a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,i.ci)(e);const t=n.A.WGS84;return await(0,r.initializeProjection)(a,t),(0,r.project)(e,t)}(t)}const f={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:a,isOrgItem:t,itemControl:r}=e,n=a.user?.privileges;let i=!n||n.includes("features:user:edit"),l=!!t&&!!n?.includes("features:user:fullEdit");const s="update"===r||"admin"===r;return s?l=i=!0:l&&(i=!0),{features:{edit:i,fullEdit:l},content:{updateItem:s}}}},22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>l});var r=t(77548),n=t(24183);const i=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{loadContext:t,...i}=a||{},l=t?await t.fetchServiceMetadata(e,i):await(0,n.V)(e,i),s=(0,r.G$)();f(l),o(l);const c={serviceJSON:l,preferredHost:s};if((l.currentVersion??0)<10.5)return c;const u=`${(0,r.$x)()??e}/layers`,y=t?await t.fetchServiceMetadata(u,i):await(0,n.V)(u,i);return f(y),o(y),c.layersJSON={layers:y.layers,tables:y.tables},c}function s(e){const{type:a}=e;return!!a&&i.has(a)}function c(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(c)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function f(e){e.layers?.forEach(u),e.tables?.forEach(y)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},37539:(e,a,t)=>{t.d(a,{pO:()=>L,jd:()=>f,Tp:()=>d,w5:()=>y});var r=t(34727),n=t(83047),i=t(73941),l=t(79258);Math.PI;const s=l.$O.radius,c=l.$O.eccentricitySquared,o={a1:s*c,a2:s*c*s*c,a3:s*c*c/2,a4:s*c*s*c*2.5,a5:s*c+s*c*c/2,a6:1-c};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var u=t(21325);const y={2:{5:L,7:null,9:null,10:L,1:v,6:null,8:null,0:null,3:h,11:w,2:L,4:A},5:{5:L,7:null,9:null,10:L,1:v,6:null,8:null,0:null,3:h,11:w,2:L,4:A},7:{5:null,7:L,9:null,10:L,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:L,10:L,1:null,6:null,8:I,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,a,t,r){const n=e[a]/N,i=j-2*Math.atan(Math.exp(-e[a+1]/N)),l=N+e[a+2],s=Math.cos(i)*l;t[r]=Math.cos(n)*s,t[r+1]=Math.sin(n)*s,t[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:L,11:function(e,a,t,r){m(e,a,t,r),w(t,r,t,r)},2:m,4:function(e,a,t,r){m(e,a,t,r),A(t,r,t,r)}},4:{5:R,7:null,9:null,10:R,1:function(e,a,t,r){R(e,a,t,r),v(t,r,t,r)},6:null,8:null,0:null,3:function(e,a,t,r){R(e,a,t,r),h(t,r,t,r)},11:function(e,a,t,r){R(e,a,t,r),w(t,r,t,r)},2:R,4:L},1:{5:P,7:null,9:null,10:P,1:L,6:null,8:null,0:null,3:function(e,a,t,r){P(e,a,t,r),h(t,r,t,r)},11:function(e,a,t,r){P(e,a,t,r),w(t,r,t,r)},2:P,4:function(e,a,t,r){P(e,a,t,r),A(t,r,t,r)}},6:{5:null,7:G,9:null,10:G,1:null,6:L,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:T,10:T,1:null,6:null,8:L,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:L,3:null,11:null,2:null,4:null},10:{5:L,7:L,9:L,10:L,1:v,6:M,8:I,0:null,3:h,11:w,2:L,4:A},11:{5:S,7:null,9:null,10:S,1:function(e,a,t,r){S(e,a,t,r),v(t,r,t,r)},6:null,8:null,0:null,3:function(e,a,t,r){S(e,a,t,r),h(t,r,t,r)},11:L,2:S,4:function(e,a,t,r){S(e,a,t,r),A(t,r,t,r)}}};function f(e,a){return d(e,a)?.projector}function d(e,a){if(null==e||null==a)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===a)return C;const t=p(e,C.source),r=p(a,C.dest);return 0===t&&0===r?(0,u.aI)(e,a)?C.projector=L:C.projector=null:C.projector=y[t][r],C}function p(e,a){return e?a.spatialReference===e?a.spatialReferenceId:(a.spatialReference=e,"metersPerUnit"in a&&(a.metersPerUnit=(0,n.GA)(e,1)),(0,i.jA)(e)?a.spatialReferenceId=1:(0,u.oT)(e)?a.spatialReferenceId=2:(0,u.K8)(e)?a.spatialReferenceId=3:(0,u.r1)(e)?a.spatialReferenceId=11:e.wkt===i.Ro.wkt?a.spatialReferenceId=4:4490===e.wkid?a.spatialReferenceId=5:e.wkt===i.FY.wkt?a.spatialReferenceId=6:e.wkt===i.LJ.wkt?a.spatialReferenceId=8:(0,u.q8)(e)?a.spatialReferenceId=7:(0,u.KQ)(e)?a.spatialReferenceId=9:a.spatialReferenceId=0):0}function L(e,a,t,r){e!==t&&(t[r++]=e[a++],t[r++]=e[a++],t[r]=e[a])}function m(e,a,t,r){t[r]=k*(e[a]/N),t[r+1]=k*(j-2*Math.atan(Math.exp(-e[a+1]/N))),t[r+2]=e[a+2]}function h(e,a,t,n){!function(e,a,t,n,i){const l=.4999999*Math.PI,s=(0,r.qE)(O*e[a+1],-l,l),c=Math.sin(s);t[n++]=O*e[a]*i.radius,t[n++]=i.halfSemiMajorAxis*Math.log((1+c)/(1-c)),t[n]=e[a+2]}(e,a,t,n,l.$O)}function w(e,a,t,r){t[r]=e[a]*_,t[r+1]=e[a+1]*_,t[r+2]=e[a+2]}function S(e,a,t,r){t[r]=e[a]*E,t[r+1]=e[a+1]*E,t[r+2]=e[a+2]}function g(e,a,t,r,n){const i=n+e[a+2],l=O*e[a+1],s=O*e[a],c=Math.cos(l)*i;t[r]=Math.cos(s)*c,t[r+1]=Math.sin(s)*c,t[r+2]=Math.sin(l)*i}function I(e,a,t,r){g(e,a,t,r,l.Sw.radius)}function M(e,a,t,r){g(e,a,t,r,l.sH.radius)}function v(e,a,t,r){g(e,a,t,r,l.$O.radius)}function b(e,a,t,n,i){const l=e[a],s=e[a+1],c=e[a+2],o=Math.sqrt(l*l+s*s+c*c),u=(0,r.YN)(c/(0===o?1:o)),y=Math.atan2(s,l);t[n++]=k*y,t[n++]=k*u,t[n]=o-i}function T(e,a,t,r){b(e,a,t,r,l.Sw.radius)}function G(e,a,t,r){b(e,a,t,r,l.sH.radius)}function P(e,a,t,r){b(e,a,t,r,l.$O.radius)}function A(e,a,t,r){!function(e,a,t,r,n){const i=O*e[a],l=O*e[a+1],s=e[a+2],c=Math.sin(l),o=Math.cos(l),u=n.radius/Math.sqrt(1-n.eccentricitySquared*c*c);t[r++]=(u+s)*o*Math.cos(i),t[r++]=(u+s)*o*Math.sin(i),t[r++]=(u*(1-n.eccentricitySquared)+s)*c}(e,a,t,r,l.$O)}function R(e,a,t,r){const n=o,i=e[a],s=e[a+1],c=e[a+2];let u,y,f,d,p,L,m,h,w,S,g,I,M,v,b,T,G,P,A,R,C;u=Math.abs(c),y=i*i+s*s,f=Math.sqrt(y),d=y+c*c,p=Math.sqrt(d),R=Math.atan2(s,i),L=c*c/d,m=y/d,v=n.a2/p,b=n.a3-n.a4/p,m>.3?(h=u/p*(1+m*(n.a1+v+L*b)/p),A=Math.asin(h),S=h*h,w=Math.sqrt(1-S)):(w=f/p*(1-L*(n.a5-v-m*b)/p),A=Math.acos(w),S=1-w*w,h=Math.sqrt(S)),g=1-l.$O.eccentricitySquared*S,I=l.$O.radius/Math.sqrt(g),M=n.a6*I,v=f-I*w,b=u-M*h,G=w*v+h*b,T=w*b-h*v,P=T/(M/g+G),A+=P,C=G+T*P/2,c<0&&(A=-A),t[r++]=k*R,t[r++]=k*A,t[r]=C}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:L},O=(0,r.kU)(1),k=(0,r.KJ)(1),j=.5*Math.PI,N=l.$O.radius,_=N*Math.PI/180,E=180/(N*Math.PI)},45613:(e,a,t)=>{t.d(a,{fromItem:()=>f,n:()=>d});var r=t(49186),n=t(92009),i=t(23154),l=t(22429),s=t(77548),c=t(4513),o=t(80812),u=t(66964),y=t(10407);async function f(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const t=await async function(e){await e.load();const a=new l.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await d(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function d(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,u.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await p(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly"),c=i.tileInfo?.format?.toLowerCase()??"",o=null==l&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===l||o||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await p(e,a,async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}});if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(s.XX))if(e.typeKeywords.includes(a))return{className:s.XX[a]};const i=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return{className:s.XX[i?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Video Service":return async function(e,a){return"object"==typeof await p(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e,a,t){const{url:r,type:n}=e,l="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(l){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return(0,s.Gh)(e,(0,s.G$)()),{id:t.id,className:(0,i.K)(t.type),sourceJSON:t}}return{}}if("Video Service"===n){const e=await a.fetchServiceMetadata(r);return!((e.layers?.length??0)>1)&&{}}await e.load();let c=await a.fetchItemData(e);if(l){const{data:t,preferredHost:n}=await(0,u.bO)(c,r,a);(0,s.Gh)(e,n);const i=L(t);if("object"==typeof i){const e=(0,u.rc)(t,i.id);i.className=(0,u.K8)(e?.layerType)}return i}if("Scene Service"===n&&(c=await(0,u.nu)(e,c,a)),(0,u.XH)(c)>0)return L(c);const o=await a.fetchServiceMetadata(r);return t&&(o.tables=await t()),L(o)}function L(e){return 1===(0,u.XH)(e)&&{id:(0,u.pJ)(e)?.id}}},62815:(e,a,t)=>{t.d(a,{N:()=>l});var r=t(83047),n=t(73941),i=t(21325);function l(e,a,t){if(null==a||null==t||t.vcsWkid||(0,i.aI)(a,t)||(0,n.xP)(a)||(0,n.xP)(t))return null;const l=(0,r.G9)(a)/(0,r.G9)(t);if(1===l)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,a){null!=e?.z&&(e.z*=a)}(e,l);case"polyline":case"esriGeometryPolyline":return e=>function(e,a){if(e)for(const t of e.paths)for(const e of t)e.length>2&&(e[2]*=a)}(e,l);case"polygon":case"esriGeometryPolygon":return e=>function(e,a){if(e)for(const t of e.rings)for(const e of t)e.length>2&&(e[2]*=a)}(e,l);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,a){if(e)for(const t of e.points)t.length>2&&(t[2]*=a)}(e,l);case"extent":case"esriGeometryEnvelope":return e=>function(e,a){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=a,e.zmax*=a)}(e,l);default:return null}}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>y,_r:()=>l,bO:()=>s,l:()=>f,nu:()=>p,pJ:()=>c,rc:()=>o});var r=t(92009),n=t(23154),i=t(77548);function l(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function s(e,a,t){let r;if(null==e?.layers||null==e?.tables){const n=await t.fetchServiceMetadata(a,{customParameters:c(e)?.customParameters});r=(0,i.G$)(),(e=e||{}).layers=e.layers||n?.layers?.map(l),e.tables=e.tables||n?.tables?.map(l)}return{data:e,preferredHost:r}}function c(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function o(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find(e=>e.id===a)}function u(e,a){return[...e.layers||[],...e.tables||[]].filter(({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer"))}function y(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function f(e){switch(e){case"catalog":return["CatalogLayer"];case"feature":return["ArcGISFeatureLayer"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return"FeatureLayer"}async function p(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(l)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:c(a)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData().catch(()=>null);if(e?.tables)a.tables=e.tables.map(l);else{const r=await t.fetchServiceMetadata(n,{customParameters:c(e)?.customParameters}).catch(()=>null);a.tables=r?.tables?.map(l)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},75356:(e,a,t)=>{t.d(a,{N:()=>G,populateOperationalLayers:()=>u});var r=t(7762),n=(t(44208),t(22429)),i=t(4513),l=t(80812);function s(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=t(45613),o=t(8947);async function u(e,a,t){if(!a)return;const r=a.map(e=>async function(e,a){return async function(e,a,t){const r=new e;return r.read(a,t.context),"group"===r.type&&("GroupLayer"===a.layerType?await G(r,a,t):b(a)?function(e,a,t){a.itemId&&(e.portalItem=new l.default({id:a.itemId,portal:t?.portal}),e.when(()=>{const r=r=>{const n=r.layerId;P(r,e,a,n,t);const i=a.featureCollection?.layers?.[n];i&&r.read(i,t)};e.layers?.forEach(r),e.tables?.forEach(r)}))}(r,a,t.context):v(a)&&await async function(e,a,t){const r=i.S.FeatureLayer,n=await r(),l=a.featureCollection,s=l?.showLegend,c=l?.layers?.map((r,i)=>{const l=new n;l.read(r,t);const c={...t,ignoreDefaults:!0};return P(l,e,a,i,c),null!=s&&l.read({showLegend:s},c),l});e.layers.addMany(c??[])}(r,a,t.context)),await(0,o.L)(r,t.context),r}(await M(e,a),e,a)}(e,t)),n=await Promise.allSettled(r);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const y={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},f={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},d={ArcGISFeatureLayer:"FeatureLayer"},p={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},L={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},m={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},h={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},w={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},S={...m,LinkChartLayer:"LinkChartLayer"},g={...h},I={...w};async function M(e,a){const t=a.context,r=T(t);let o=e.layerType||e.type;!o&&a?.defaultLayerType&&(o=a.defaultLayerType);const u=r[o];let y=u?i.S[u]:i.S.UnknownLayer;if(b(e)){const a=t?.portal;if(e.itemId){const t=new l.default({id:e.itemId,portal:a});await t.load();const r=(await(0,c.n)(t,new n.v)).className||"UnknownLayer";y=i.S[r]}}else"ArcGISFeatureLayer"===o?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?y=i.S.MapNotesLayer:function(e){return s(e,"route")}(e)?y=i.S.RouteLayer:v(e)&&(y=i.S.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?y=i.S.WMTSLayer:"WFS"===o&&"2.0.0"!==e.wfsInfo?.version&&(y=i.S.UnsupportedLayer);return y()}function v(e){return"ArcGISFeatureLayer"===e.layerType&&!b(e)&&(e.featureCollection?.layers?.length??0)>1}function b(e){return"Feature Collection"===e.type}function T(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":a=p;break;case"basemap-ground-layers":a=L;break;case"ground":a=f;break;case"tables":a=d;break;default:a=y}break;case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":a=I;break;case"tables":a=g;break;default:a=S}break;default:switch(e.layerContainerType){case"basemap-base-layers":a=w;break;case"tables":a=h;break;default:a=m}}return a}async function G(e,a,t){const n=new r.A,i=u(n,Array.isArray(a.layers)?a.layers:[],t);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function P(e,a,t,r,n){e.read({id:`${a.id}-sublayer-${r}`,visibility:t.visibleLayers?.includes(r)??!0},n)}},92009:(e,a,t)=>{t.d(a,{L:()=>u});var r=t(70333),n=t(78888),i=t(49186),l=t(74887),s=t(60694),c=t(20655),o=t(80812);async function u(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.QP)(e)}return null}(e);null!=i&&(t.portal=new c.A({url:i}));try{return await t.load({signal:e.signal})}catch(e){return(0,l.QP)(e),null}}(u),null==u.sceneLayerItem)return f(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const d=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,l.QP)(e),null}}(u);if(!d?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=d;const p=await f(d.url,u);return p.portalItem=d,p}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function f(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,l=a.layerId;if(null==l)return{serverUrl:r};const c=y(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,f=e=>{const t={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},d=f("anonymous").catch(()=>f("no-prompt")),[p,L]=await Promise.all([d,c]),m=L?.layers,h=p.data&&p.data.layers;if(!Array.isArray(h))throw new Error("expected layers array");if(Array.isArray(m)){for(let e=0;e<Math.min(m.length,h.length);e++)if(m[e].id===l)return{serverUrl:r,layerId:h[e].id}}else if(null!=l&&l<h.length)return{serverUrl:r,layerId:h[l].id};throw new Error("could not find matching associated sublayer")}},98988:(e,a,t)=>{t.r(a),t.d(a,{canProjectWithoutEngine:()=>J,getTransformation:()=>D,getTransformations:()=>V,initializeProjection:()=>H,isEqualBaseGCS:()=>z,isLoaded:()=>O,isLoadedOrLoad:()=>k,isLoadedOrLoadFor:()=>j,load:()=>_,project:()=>E,projectExtent:()=>ie,projectMany:()=>x,projectMultipoint:()=>Q,projectOrLoad:()=>W,projectOrLoadMany:()=>F,projectPoint:()=>Z,projectPolygon:()=>re,projectPolyline:()=>ae,projectWithZConversion:()=>q,projectWithoutEngine:()=>Y,requiresLoad:()=>N,test:()=>B,tryProjectWithZConversion:()=>$,unload:()=>K});var r=t(49186),n=t(74887),i=t(62788),l=t(95488),s=t(51850),c=t(21276),o=t(73941),u=t(5443),y=t(48526),f=t(83290),d=t(86738),p=t(39829),L=t(82799),m=t(16930),h=t(9762),w=t(37539);function S(e,a,t,r,n,i){return g[0]=e,g[1]=a,g[2]=t,(0,h.projectBuffer)(g,r,0,n,i,0)}const g=(0,s.vt)();let I=0;class M{static fromGE(e){const a=new M;return a._wkt=e.wkt,a._wkid=e.wkid,a._isInverse=e.isInverse,a}constructor(e){this.uid=I++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=I++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=I++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=I++}getInverse(){const e=new M;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class v{static cacheKey(e,a){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",a.wkid?.toString()??"-1",a.wkt?.toString()??"",a.wkt2?.toString()??""].join()}static fromGE(e){const a=new v;let t="";for(const r of e.steps){const e=M.fromGE(r);a.steps.push(e),t+=e.uid.toString()+","}return a._cachedProjection={},a._gtlistentry=null,a._chain=t,a}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const a of e.steps)a instanceof M?this.steps.push(a):this.steps.push(new M({wkid:a.wkid,wkt:a.wkt,isInverse:a.isInverse}))}getInverse(){const e=new v;e.steps=[];for(let a=this.steps.length-1;a>=0;a--){const t=this.steps[a];e.steps.push(t.getInverse())}return e}getGTListEntry(){let e="";for(const a of this.steps)e+=a.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,a,t){this._cachedProjection[v.cacheKey(e,a)]=t}getCachedGeTransformation(e,a){let t="";for(const e of this.steps)t+=e.uid.toString()+",";t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t);const r=this._cachedProjection[v.cacheKey(e,a)];return void 0===r?null:r}}var b=t(21325),T=t(62815);let G=null,P=null,A=null,R={};const C=new l.I;function O(){return!!G&&(0,f.i)()}function k(){return!!O()||((0,i.gc)(C),_(),!1)}function j(e,a){return!e||!a||J(e,a)||k()}function N(e,a){return!J(e,a)&&!O()}function _(e){return null==A&&(A=Promise.all([(0,f.l)(),t.e(9930).then(t.bind(t,49930)).then(e=>e.g),t.e(2731).then(t.bind(t,12731))])),A.then(([,a,{hydratedAdapter:t}])=>{(0,n.Te)(e),P=t,G=a.default,G._enableProjection(f.p),C.notify()})}function E(e,a,t=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,c.H)(e),x(P,e,e[0].spatialReference,a,t,r)):((0,c.f)(e),x(P,[e],e.spatialReference,a,t,r)[0])}function x(e,a,t,r,n=null,i=null){if(null==t||null==r)return a;if(J(t,r,n))return a.map(e=>Y(e,t,r));if(null==n&&(0,o.jA)(t))return a.map(e=>Y(e,t,m.A.WGS84)).map(e=>$(e,r));if(null==n&&(0,o.jA)(r))return a.map(e=>$(e,m.A.WGS84)).map(e=>Y(e,m.A.WGS84,r));if(null==n){const e=v.cacheKey(t,r);void 0!==R[e]?n=R[e]:(null==(n=D(t,r,void 0))&&(n=new v),R[e]=n)}if(null==G||null==e)throw new U;return null!=i?G._project(e,a,t,r,n,i):G._project(e,a,t,r,n)}function W(e,a){const t=F([e],a);return null!=t.pending?{pending:t.pending,geometry:null}:null!=t.geometries?{pending:null,geometry:t.geometries[0]}:{pending:null,geometry:null}}function F(e,a){if(!O())for(const t of e)if(null!=t&&!(0,b.aI)(t.spatialReference,a)&&(0,b.fn)(t.spatialReference)&&(0,b.fn)(a)&&!J(t.spatialReference,a))return(0,i.gc)(C),{pending:_(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,b.aI)(e.spatialReference,a)?e:(0,b.fn)(e.spatialReference)&&(0,b.fn)(a)?$(e,a):null)}}function D(e,a,t=null){if(null==e||null==a)return null;if(null==G||null==P)throw new U;const r=G._getTransformation(P,e,a,t,t?.spatialReference);return null!==r?v.fromGE(r):null}function V(e,a,t=null){if(null==G||null==P)throw new U;const r=G._getTransformationBySuitability(P,e,a,t,t?.spatialReference);if(null!==r){const e=[];for(const a of r)e.push(v.fromGE(a));return e}return[]}class U extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function K(){G=null,P=null,A=null,R={}}const B={get loadPromise(){return A}};function $(e,a){try{const t=E(e,a);if(null==t)return null;"xmin"in e&&"xmin"in t&&(t.zmin=e.zmin,t.zmax=e.zmax);const r=(0,T.N)(t.type,e.spatialReference,a);return null!=r&&r(t),t}catch(e){if(!(e instanceof U))throw e;return null}}async function q(e,a,t){const r=e.spatialReference;return null!=r&&null!=a&&await H(r,a,null,t),$(e,a)}function J(e,a,t){return!t&&(!!(0,b.aI)(e,a)||(0,b.fn)(e)&&(0,b.fn)(a)&&!!(0,w.jd)(e,a))}function z(e,a){if((0,b.aI)(e,a))return!0;if(!(0,b.fn)(e)||!(0,b.fn)(a))return!1;const t=(0,b.oT)(e)||(0,b.K8)(e)||(0,b.x1)(e),r=(0,b.oT)(a)||(0,b.K8)(a)||(0,b.x1)(a);return t&&r}async function H(e,a,t,r){if(O())return(0,n.NO)(r);if(Array.isArray(e)){for(const{source:a,dest:t,geographicTransformation:n}of e)if(a&&t&&!J(a,t,n))return _(r)}else if(e&&a&&!J(e,a,t))return _(r);return(0,n.NO)(r)}function Y(e,a,t){return e?"x"in e?X(e,a,new d.A,t,0):"xmin"in e?le(e,a,new u.A,t,0):"rings"in e?ne(e,a,new p.A,t,0):"paths"in e?te(e,a,new L.A,t,0):"points"in e?ee(e,a,new y.A,t,0):null:null}function Z(e,a,t=a.spatialReference,r=0){return null!=t&&null!=e.spatialReference&&null!=X(e,e.spatialReference,a,t,r)}function X(e,a,t,r,n){ce[0]=e.x,ce[1]=e.y;const i=e.z;return ce[2]=void 0!==i?i:n,(0,h.projectBuffer)(ce,a,0,ce,r,0)?(t.x=ce[0],t.y=ce[1],t.spatialReference=r,void 0!==i||(0,o.xP)(r)?(t.z=ce[2],t.hasZ=!0):(t.z=void 0,t.hasZ=!1),void 0===e.m?(t.m=void 0,t.hasM=!1):(t.m=e.m,t.hasM=!0),t):null}function Q(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ee(e,e.spatialReference,a,t,r)}function ee(e,a,t,r,n){const{points:i,hasZ:l,hasM:s}=e,c=[],u=i.length,y=[];for(const e of i)y.push(e[0],e[1],l?e[2]:n);if(!(0,h.projectBuffer)(y,a,0,y,r,0,u))return null;const f=l||(0,o.xP)(r);for(let e=0;e<u;++e){const a=3*e,t=y[a],r=y[a+1];f&&s?c.push([t,r,y[a+2],i[e][3]]):f?c.push([t,r,y[a+2]]):s?c.push([t,r,i[e][2]]):c.push([t,r])}return t.points=c,t.spatialReference=r,t.hasZ=l,t.hasM=s,t}function ae(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=te(e,e.spatialReference,a,t,r)}function te(e,a,t,r,n){const{paths:i,hasZ:l,hasM:s}=e,c=[];if(!se(i,l??!1,s??!1,a,c,r,n))return null;const u=l||(0,o.xP)(r);return t.paths=c,t.spatialReference=r,t.hasZ=u,t.hasM=s,t}function re(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ne(e,e.spatialReference,a,t,r)}function ne(e,a,t,r,n){const{rings:i,hasZ:l,hasM:s}=e,c=[];if(!se(i,l??!1,s??!1,a,c,r,n))return null;const u=l||(0,o.xP)(r);return t.rings=c,t.spatialReference=r,t.hasZ=u,t.hasM=s,t}function ie(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=le(e,e.spatialReference,a,t,r)}function le(e,a,t,r,n){const{xmin:i,ymin:l,xmax:s,ymax:c,hasZ:u,hasM:y}=e;if(!S(i,l,u?e.zmin:n,a,ce,r))return null;const f=u||(0,o.xP)(r);return t.xmin=ce[0],t.ymin=ce[1],f&&(t.zmin=ce[2]),S(s,c,u?e.zmax:n,a,ce,r)?(t.xmax=ce[0],t.ymax=ce[1],f&&(t.zmax=ce[2]),y&&(t.mmin=e.mmin,t.mmax=e.mmax),t.spatialReference=r,t):null}function se(e,a,t,r,n,i,l=0){const s=new Array;for(const t of e)for(const e of t)s.push(e[0],e[1],a?e[2]:l);if(!(0,h.projectBuffer)(s,r,0,s,i,0))return!1;let c=0;n.length=0;const u=a||(0,o.xP)(i);for(const a of e){const e=new Array;for(const r of a)u&&t?e.push([s[c++],s[c++],s[c++],r[3]]):u?e.push([s[c++],s[c++],s[c++]]):t?(e.push([s[c++],s[c++],r[2]]),c++):(e.push([s[c++],s[c++]]),c++);n.push(e)}return!0}const ce=(0,s.vt)()}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5356,5613],{4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(7036)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(1017),t.e(4111),t.e(8506),t.e(9784),t.e(7005),t.e(3474),t.e(6445),t.e(6298),t.e(3546),t.e(8207)]).then(t.bind(t,51613))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(1017),t.e(4111),t.e(8506),t.e(9784),t.e(5964)]).then(t.bind(t,68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(4111),t.e(8506),t.e(364),t.e(8628),t.e(2593),t.e(9279),t.e(3549)]).then(t.bind(t,83508))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9953),t.e(9186),t.e(5751)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(1017),t.e(4111),t.e(8506),t.e(9784),t.e(1072)]).then(t.bind(t,29784))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(6131),t.e(6730)]).then(t.bind(t,36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(1017),t.e(8766)]).then(t.bind(t,15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(1093)]).then(t.bind(t,85582))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(3562),t.e(8256)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(9953),t.e(1956),t.e(364),t.e(3356),t.e(7654),t.e(3417)]).then(t.bind(t,42729))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(9953),t.e(3356),t.e(6049),t.e(7654),t.e(7677),t.e(9689)]).then(t.bind(t,39689))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(9499),t.e(6239)]).then(t.bind(t,7543))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(6298),t.e(9499),t.e(9752)]).then(t.bind(t,65506))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1863)]).then(t.bind(t,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(708),t.e(1017),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(5655),t.e(1082),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(7721),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(708),t.e(1017),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(5655),t.e(1082),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(4111),t.e(364),t.e(3249),t.e(7656),t.e(2042)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(1017),t.e(4111),t.e(8506),t.e(9784),t.e(5655),t.e(8110)]).then(t.bind(t,96299))).default,MediaLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(2763)]).then(t.bind(t,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(1017),t.e(6445),t.e(5363),t.e(4224)]).then(t.bind(t,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(1017),t.e(4111),t.e(8506),t.e(9784),t.e(9361),t.e(5549)]).then(t.bind(t,9352))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(7984),t.e(7885)]).then(t.bind(t,77885))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(217),t.e(979)]).then(t.bind(t,64185))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(7005),t.e(3474),t.e(6445),t.e(6298),t.e(3546),t.e(1713)]).then(t.bind(t,36969))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(1017),t.e(73)]).then(t.bind(t,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1956),t.e(3926),t.e(4111),t.e(8506),t.e(6731)]).then(t.bind(t,97483))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(1956),t.e(3926),t.e(708),t.e(4111),t.e(364),t.e(9186),t.e(3249),t.e(573)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(5897),t.e(4937)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await Promise.all([t.e(6131),t.e(3910),t.e(8096),t.e(5323),t.e(7732)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(7721),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(1005)]).then(t.bind(t,21005))).default,WCSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(9953),t.e(3356),t.e(6049),t.e(7654),t.e(7677),t.e(8854)]).then(t.bind(t,88854))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(5323),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(3926),t.e(1017),t.e(9110)]).then(t.bind(t,21901))).default,WMSLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(5323),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773)]).then(t.bind(t,47314))).default}},8947:(e,a,t)=>{t.d(a,{L:()=>l});var r=t(60999),n=t(74887),i=t(67076);async function l(e,a,t){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,r.Ke)(l.populateFromStyle());if((0,n.Te)(t),!1===s.ok){const t=s.error;a?.messages&&a.messages.push(new i.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${t.message}`,{error:t,context:a})),e.clear("renderer",a?.origin)}}}},9762:(e,a,t)=>{t.r(a),t.d(a,{projectBuffer:()=>n});var r=t(37539);function n(e,a,t,n,i,l,s=Math.floor(e.length/3)){const c=(0,r.jd)(a,i);if(null==c)return!1;if(c===r.pO){if(e===n&&t===l)return!0;const a=t+3*s;for(let r=t,i=l;r<a;r++,i++)n[i]=e[r];return!0}const o=t+3*s;for(let a=t,r=l;a<o;a+=3,r+=3)c(e,a,n,r);return!0}},10407:(e,a,t)=>{t.d(a,{It:()=>d,LG:()=>l,OM:()=>o,Sm:()=>u,Y:()=>s,bK:()=>c,mm:()=>f,sQ:()=>y});var r=t(98988),n=t(16930),i=t(28735);function l(e,a){if(!s(e,a)){const t=e.typeKeywords;t?t.push(a):e.typeKeywords=[a]}}function s(e,a){return!!e.typeKeywords?.includes(a)}function c(e){return s(e,f.HOSTED_SERVICE)}function o(e,a){const t=e.typeKeywords;if(t){const e=t.indexOf(a);e>-1&&t.splice(e,1)}}function u(e,a,t){t?l(e,a):o(e,a)}async function y(e){const a=e.clone().normalize();let t;if(a.length>1)for(const e of a)t?e.width>t.width&&(t=e):t=e;else t=a[0];return async function(e){const a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,i.ci)(e);const t=n.A.WGS84;return await(0,r.initializeProjection)(a,t),(0,r.project)(e,t)}(t)}const f={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:a,isOrgItem:t,itemControl:r}=e,n=a.user?.privileges;let i=!n||n.includes("features:user:edit"),l=!!t&&!!n?.includes("features:user:fullEdit");const s="update"===r||"admin"===r;return s?l=i=!0:l&&(i=!0),{features:{edit:i,fullEdit:l},content:{updateItem:s}}}},22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>l});var r=t(77548),n=t(24183);const i=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{loadContext:t,...i}=a||{},l=t?await t.fetchServiceMetadata(e,i):await(0,n.V)(e,i),s=(0,r.G$)();f(l),o(l);const c={serviceJSON:l,preferredHost:s};if((l.currentVersion??0)<10.5)return c;const u=`${(0,r.$x)()??e}/layers`,y=t?await t.fetchServiceMetadata(u,i):await(0,n.V)(u,i);return f(y),o(y),c.layersJSON={layers:y.layers,tables:y.tables},c}function s(e){const{type:a}=e;return!!a&&i.has(a)}function c(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(c)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function f(e){e.layers?.forEach(u),e.tables?.forEach(y)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},37539:(e,a,t)=>{t.d(a,{pO:()=>L,jd:()=>f,Tp:()=>d,w5:()=>y});var r=t(34727),n=t(83047),i=t(73941),l=t(79258);Math.PI;const s=l.$O.radius,c=l.$O.eccentricitySquared,o={a1:s*c,a2:s*c*s*c,a3:s*c*c/2,a4:s*c*s*c*2.5,a5:s*c+s*c*c/2,a6:1-c};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var u=t(21325);const y={2:{5:L,7:null,9:null,10:L,1:v,6:null,8:null,0:null,3:h,11:w,2:L,4:A},5:{5:L,7:null,9:null,10:L,1:v,6:null,8:null,0:null,3:h,11:w,2:L,4:A},7:{5:null,7:L,9:null,10:L,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:L,10:L,1:null,6:null,8:I,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,a,t,r){const n=e[a]/N,i=j-2*Math.atan(Math.exp(-e[a+1]/N)),l=N+e[a+2],s=Math.cos(i)*l;t[r]=Math.cos(n)*s,t[r+1]=Math.sin(n)*s,t[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:L,11:function(e,a,t,r){m(e,a,t,r),w(t,r,t,r)},2:m,4:function(e,a,t,r){m(e,a,t,r),A(t,r,t,r)}},4:{5:R,7:null,9:null,10:R,1:function(e,a,t,r){R(e,a,t,r),v(t,r,t,r)},6:null,8:null,0:null,3:function(e,a,t,r){R(e,a,t,r),h(t,r,t,r)},11:function(e,a,t,r){R(e,a,t,r),w(t,r,t,r)},2:R,4:L},1:{5:P,7:null,9:null,10:P,1:L,6:null,8:null,0:null,3:function(e,a,t,r){P(e,a,t,r),h(t,r,t,r)},11:function(e,a,t,r){P(e,a,t,r),w(t,r,t,r)},2:P,4:function(e,a,t,r){P(e,a,t,r),A(t,r,t,r)}},6:{5:null,7:G,9:null,10:G,1:null,6:L,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:T,10:T,1:null,6:null,8:L,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:L,3:null,11:null,2:null,4:null},10:{5:L,7:L,9:L,10:L,1:v,6:M,8:I,0:null,3:h,11:w,2:L,4:A},11:{5:S,7:null,9:null,10:S,1:function(e,a,t,r){S(e,a,t,r),v(t,r,t,r)},6:null,8:null,0:null,3:function(e,a,t,r){S(e,a,t,r),h(t,r,t,r)},11:L,2:S,4:function(e,a,t,r){S(e,a,t,r),A(t,r,t,r)}}};function f(e,a){return d(e,a)?.projector}function d(e,a){if(null==e||null==a)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===a)return C;const t=p(e,C.source),r=p(a,C.dest);return 0===t&&0===r?(0,u.aI)(e,a)?C.projector=L:C.projector=null:C.projector=y[t][r],C}function p(e,a){return e?a.spatialReference===e?a.spatialReferenceId:(a.spatialReference=e,"metersPerUnit"in a&&(a.metersPerUnit=(0,n.GA)(e,1)),(0,i.jA)(e)?a.spatialReferenceId=1:(0,u.oT)(e)?a.spatialReferenceId=2:(0,u.K8)(e)?a.spatialReferenceId=3:(0,u.r1)(e)?a.spatialReferenceId=11:e.wkt===i.Ro.wkt?a.spatialReferenceId=4:4490===e.wkid?a.spatialReferenceId=5:e.wkt===i.FY.wkt?a.spatialReferenceId=6:e.wkt===i.LJ.wkt?a.spatialReferenceId=8:(0,u.q8)(e)?a.spatialReferenceId=7:(0,u.KQ)(e)?a.spatialReferenceId=9:a.spatialReferenceId=0):0}function L(e,a,t,r){e!==t&&(t[r++]=e[a++],t[r++]=e[a++],t[r]=e[a])}function m(e,a,t,r){t[r]=k*(e[a]/N),t[r+1]=k*(j-2*Math.atan(Math.exp(-e[a+1]/N))),t[r+2]=e[a+2]}function h(e,a,t,n){!function(e,a,t,n,i){const l=.4999999*Math.PI,s=(0,r.qE)(O*e[a+1],-l,l),c=Math.sin(s);t[n++]=O*e[a]*i.radius,t[n++]=i.halfSemiMajorAxis*Math.log((1+c)/(1-c)),t[n]=e[a+2]}(e,a,t,n,l.$O)}function w(e,a,t,r){t[r]=e[a]*_,t[r+1]=e[a+1]*_,t[r+2]=e[a+2]}function S(e,a,t,r){t[r]=e[a]*E,t[r+1]=e[a+1]*E,t[r+2]=e[a+2]}function g(e,a,t,r,n){const i=n+e[a+2],l=O*e[a+1],s=O*e[a],c=Math.cos(l)*i;t[r]=Math.cos(s)*c,t[r+1]=Math.sin(s)*c,t[r+2]=Math.sin(l)*i}function I(e,a,t,r){g(e,a,t,r,l.Sw.radius)}function M(e,a,t,r){g(e,a,t,r,l.sH.radius)}function v(e,a,t,r){g(e,a,t,r,l.$O.radius)}function b(e,a,t,n,i){const l=e[a],s=e[a+1],c=e[a+2],o=Math.sqrt(l*l+s*s+c*c),u=(0,r.YN)(c/(0===o?1:o)),y=Math.atan2(s,l);t[n++]=k*y,t[n++]=k*u,t[n]=o-i}function T(e,a,t,r){b(e,a,t,r,l.Sw.radius)}function G(e,a,t,r){b(e,a,t,r,l.sH.radius)}function P(e,a,t,r){b(e,a,t,r,l.$O.radius)}function A(e,a,t,r){!function(e,a,t,r,n){const i=O*e[a],l=O*e[a+1],s=e[a+2],c=Math.sin(l),o=Math.cos(l),u=n.radius/Math.sqrt(1-n.eccentricitySquared*c*c);t[r++]=(u+s)*o*Math.cos(i),t[r++]=(u+s)*o*Math.sin(i),t[r++]=(u*(1-n.eccentricitySquared)+s)*c}(e,a,t,r,l.$O)}function R(e,a,t,r){const n=o,i=e[a],s=e[a+1],c=e[a+2];let u,y,f,d,p,L,m,h,w,S,g,I,M,v,b,T,G,P,A,R,C;u=Math.abs(c),y=i*i+s*s,f=Math.sqrt(y),d=y+c*c,p=Math.sqrt(d),R=Math.atan2(s,i),L=c*c/d,m=y/d,v=n.a2/p,b=n.a3-n.a4/p,m>.3?(h=u/p*(1+m*(n.a1+v+L*b)/p),A=Math.asin(h),S=h*h,w=Math.sqrt(1-S)):(w=f/p*(1-L*(n.a5-v-m*b)/p),A=Math.acos(w),S=1-w*w,h=Math.sqrt(S)),g=1-l.$O.eccentricitySquared*S,I=l.$O.radius/Math.sqrt(g),M=n.a6*I,v=f-I*w,b=u-M*h,G=w*v+h*b,T=w*b-h*v,P=T/(M/g+G),A+=P,C=G+T*P/2,c<0&&(A=-A),t[r++]=k*R,t[r++]=k*A,t[r]=C}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:L},O=(0,r.kU)(1),k=(0,r.KJ)(1),j=.5*Math.PI,N=l.$O.radius,_=N*Math.PI/180,E=180/(N*Math.PI)},45613:(e,a,t)=>{t.d(a,{fromItem:()=>f,n:()=>d});var r=t(49186),n=t(92009),i=t(23154),l=t(22429),s=t(77548),c=t(4513),o=t(80812),u=t(66964),y=t(10407);async function f(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const t=await async function(e){await e.load();const a=new l.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await d(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function d(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,u.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await p(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly"),c=i.tileInfo?.format?.toLowerCase()??"",o=null==l&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===l||o||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await p(e,a,async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}});if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(s.XX))if(e.typeKeywords.includes(a))return{className:s.XX[a]};const i=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return{className:s.XX[i?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Video Service":return async function(e,a){return"object"==typeof await p(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e,a,t){const{url:r,type:n}=e,l="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(l){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return(0,s.Gh)(e,(0,s.G$)()),{id:t.id,className:(0,i.K)(t.type),sourceJSON:t}}return{}}if("Video Service"===n){const e=await a.fetchServiceMetadata(r);return!((e.layers?.length??0)>1)&&{}}await e.load();let c=await a.fetchItemData(e);if(l){const{data:t,preferredHost:n}=await(0,u.bO)(c,r,a);(0,s.Gh)(e,n);const i=L(t);if("object"==typeof i){const e=(0,u.rc)(t,i.id);i.className=(0,u.K8)(e?.layerType)}return i}if("Scene Service"===n&&(c=await(0,u.nu)(e,c,a)),(0,u.XH)(c)>0)return L(c);const o=await a.fetchServiceMetadata(r);return t&&(o.tables=await t()),L(o)}function L(e){return 1===(0,u.XH)(e)&&{id:(0,u.pJ)(e)?.id}}},62815:(e,a,t)=>{t.d(a,{N:()=>l});var r=t(83047),n=t(73941),i=t(21325);function l(e,a,t){if(null==a||null==t||t.vcsWkid||(0,i.aI)(a,t)||(0,n.xP)(a)||(0,n.xP)(t))return null;const l=(0,r.G9)(a)/(0,r.G9)(t);if(1===l)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,a){null!=e?.z&&(e.z*=a)}(e,l);case"polyline":case"esriGeometryPolyline":return e=>function(e,a){if(e)for(const t of e.paths)for(const e of t)e.length>2&&(e[2]*=a)}(e,l);case"polygon":case"esriGeometryPolygon":return e=>function(e,a){if(e)for(const t of e.rings)for(const e of t)e.length>2&&(e[2]*=a)}(e,l);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,a){if(e)for(const t of e.points)t.length>2&&(t[2]*=a)}(e,l);case"extent":case"esriGeometryEnvelope":return e=>function(e,a){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=a,e.zmax*=a)}(e,l);default:return null}}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>y,_r:()=>l,bO:()=>s,l:()=>f,nu:()=>p,pJ:()=>c,rc:()=>o});var r=t(92009),n=t(23154),i=t(77548);function l(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function s(e,a,t){let r;if(null==e?.layers||null==e?.tables){const n=await t.fetchServiceMetadata(a,{customParameters:c(e)?.customParameters});r=(0,i.G$)(),(e=e||{}).layers=e.layers||n?.layers?.map(l),e.tables=e.tables||n?.tables?.map(l)}return{data:e,preferredHost:r}}function c(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function o(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find(e=>e.id===a)}function u(e,a){return[...e.layers||[],...e.tables||[]].filter(({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer"))}function y(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function f(e){switch(e){case"catalog":return["CatalogLayer"];case"feature":return["ArcGISFeatureLayer"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return"FeatureLayer"}async function p(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(l)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:c(a)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData().catch(()=>null);if(e?.tables)a.tables=e.tables.map(l);else{const r=await t.fetchServiceMetadata(n,{customParameters:c(e)?.customParameters}).catch(()=>null);a.tables=r?.tables?.map(l)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},75356:(e,a,t)=>{t.d(a,{N:()=>G,populateOperationalLayers:()=>u});var r=t(7762),n=(t(44208),t(22429)),i=t(4513),l=t(80812);function s(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=t(45613),o=t(8947);async function u(e,a,t){if(!a)return;const r=a.map(e=>async function(e,a){return async function(e,a,t){const r=new e;return r.read(a,t.context),"group"===r.type&&("GroupLayer"===a.layerType?await G(r,a,t):b(a)?function(e,a,t){a.itemId&&(e.portalItem=new l.default({id:a.itemId,portal:t?.portal}),e.when(()=>{const r=r=>{const n=r.layerId;P(r,e,a,n,t);const i=a.featureCollection?.layers?.[n];i&&r.read(i,t)};e.layers?.forEach(r),e.tables?.forEach(r)}))}(r,a,t.context):v(a)&&await async function(e,a,t){const r=i.S.FeatureLayer,n=await r(),l=a.featureCollection,s=l?.showLegend,c=l?.layers?.map((r,i)=>{const l=new n;l.read(r,t);const c={...t,ignoreDefaults:!0};return P(l,e,a,i,c),null!=s&&l.read({showLegend:s},c),l});e.layers.addMany(c??[])}(r,a,t.context)),await(0,o.L)(r,t.context),r}(await M(e,a),e,a)}(e,t)),n=await Promise.allSettled(r);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const y={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},f={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},d={ArcGISFeatureLayer:"FeatureLayer"},p={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},L={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},m={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},h={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},w={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},S={...m,LinkChartLayer:"LinkChartLayer"},g={...h},I={...w};async function M(e,a){const t=a.context,r=T(t);let o=e.layerType||e.type;!o&&a?.defaultLayerType&&(o=a.defaultLayerType);const u=r[o];let y=u?i.S[u]:i.S.UnknownLayer;if(b(e)){const a=t?.portal;if(e.itemId){const t=new l.default({id:e.itemId,portal:a});await t.load();const r=(await(0,c.n)(t,new n.v)).className||"UnknownLayer";y=i.S[r]}}else"ArcGISFeatureLayer"===o?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?y=i.S.MapNotesLayer:function(e){return s(e,"route")}(e)?y=i.S.RouteLayer:v(e)&&(y=i.S.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?y=i.S.WMTSLayer:"WFS"===o&&"2.0.0"!==e.wfsInfo?.version&&(y=i.S.UnsupportedLayer);return y()}function v(e){return"ArcGISFeatureLayer"===e.layerType&&!b(e)&&(e.featureCollection?.layers?.length??0)>1}function b(e){return"Feature Collection"===e.type}function T(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":a=p;break;case"basemap-ground-layers":a=L;break;case"ground":a=f;break;case"tables":a=d;break;default:a=y}break;case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":a=I;break;case"tables":a=g;break;default:a=S}break;default:switch(e.layerContainerType){case"basemap-base-layers":a=w;break;case"tables":a=h;break;default:a=m}}return a}async function G(e,a,t){const n=new r.A,i=u(n,Array.isArray(a.layers)?a.layers:[],t);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function P(e,a,t,r,n){e.read({id:`${a.id}-sublayer-${r}`,visibility:t.visibleLayers?.includes(r)??!0},n)}},92009:(e,a,t)=>{t.d(a,{L:()=>u});var r=t(70333),n=t(78888),i=t(49186),l=t(74887),s=t(60694),c=t(20655),o=t(80812);async function u(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.QP)(e)}return null}(e);null!=i&&(t.portal=new c.A({url:i}));try{return await t.load({signal:e.signal})}catch(e){return(0,l.QP)(e),null}}(u),null==u.sceneLayerItem)return f(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const d=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,l.QP)(e),null}}(u);if(!d?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=d;const p=await f(d.url,u);return p.portalItem=d,p}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function f(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,l=a.layerId;if(null==l)return{serverUrl:r};const c=y(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,f=e=>{const t={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},d=f("anonymous").catch(()=>f("no-prompt")),[p,L]=await Promise.all([d,c]),m=L?.layers,h=p.data&&p.data.layers;if(!Array.isArray(h))throw new Error("expected layers array");if(Array.isArray(m)){for(let e=0;e<Math.min(m.length,h.length);e++)if(m[e].id===l)return{serverUrl:r,layerId:h[e].id}}else if(null!=l&&l<h.length)return{serverUrl:r,layerId:h[l].id};throw new Error("could not find matching associated sublayer")}},98988:(e,a,t)=>{t.r(a),t.d(a,{canProjectWithoutEngine:()=>J,getTransformation:()=>D,getTransformations:()=>V,initializeProjection:()=>H,isEqualBaseGCS:()=>z,isLoaded:()=>O,isLoadedOrLoad:()=>k,isLoadedOrLoadFor:()=>j,load:()=>_,project:()=>E,projectExtent:()=>ie,projectMany:()=>x,projectMultipoint:()=>Q,projectOrLoad:()=>W,projectOrLoadMany:()=>F,projectPoint:()=>Z,projectPolygon:()=>re,projectPolyline:()=>ae,projectWithZConversion:()=>q,projectWithoutEngine:()=>Y,requiresLoad:()=>N,test:()=>B,tryProjectWithZConversion:()=>$,unload:()=>K});var r=t(49186),n=t(74887),i=t(62788),l=t(95488),s=t(51850),c=t(21276),o=t(73941),u=t(5443),y=t(48526),f=t(83290),d=t(86738),p=t(39829),L=t(82799),m=t(16930),h=t(9762),w=t(37539);function S(e,a,t,r,n,i){return g[0]=e,g[1]=a,g[2]=t,(0,h.projectBuffer)(g,r,0,n,i,0)}const g=(0,s.vt)();let I=0;class M{static fromGE(e){const a=new M;return a._wkt=e.wkt,a._wkid=e.wkid,a._isInverse=e.isInverse,a}constructor(e){this.uid=I++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=I++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=I++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=I++}getInverse(){const e=new M;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class v{static cacheKey(e,a){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",a.wkid?.toString()??"-1",a.wkt?.toString()??"",a.wkt2?.toString()??""].join()}static fromGE(e){const a=new v;let t="";for(const r of e.steps){const e=M.fromGE(r);a.steps.push(e),t+=e.uid.toString()+","}return a._cachedProjection={},a._gtlistentry=null,a._chain=t,a}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const a of e.steps)a instanceof M?this.steps.push(a):this.steps.push(new M({wkid:a.wkid,wkt:a.wkt,isInverse:a.isInverse}))}getInverse(){const e=new v;e.steps=[];for(let a=this.steps.length-1;a>=0;a--){const t=this.steps[a];e.steps.push(t.getInverse())}return e}getGTListEntry(){let e="";for(const a of this.steps)e+=a.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,a,t){this._cachedProjection[v.cacheKey(e,a)]=t}getCachedGeTransformation(e,a){let t="";for(const e of this.steps)t+=e.uid.toString()+",";t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t);const r=this._cachedProjection[v.cacheKey(e,a)];return void 0===r?null:r}}var b=t(21325),T=t(62815);let G=null,P=null,A=null,R={};const C=new l.I;function O(){return!!G&&(0,f.i)()}function k(){return!!O()||((0,i.gc)(C),_(),!1)}function j(e,a){return!e||!a||J(e,a)||k()}function N(e,a){return!J(e,a)&&!O()}function _(e){return null==A&&(A=Promise.all([(0,f.l)(),t.e(9930).then(t.bind(t,49930)).then(e=>e.g),t.e(2731).then(t.bind(t,12731))])),A.then(([,a,{hydratedAdapter:t}])=>{(0,n.Te)(e),P=t,G=a.default,G._enableProjection(f.p),C.notify()})}function E(e,a,t=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,c.H)(e),x(P,e,e[0].spatialReference,a,t,r)):((0,c.f)(e),x(P,[e],e.spatialReference,a,t,r)[0])}function x(e,a,t,r,n=null,i=null){if(null==t||null==r)return a;if(J(t,r,n))return a.map(e=>Y(e,t,r));if(null==n&&(0,o.jA)(t))return a.map(e=>Y(e,t,m.A.WGS84)).map(e=>$(e,r));if(null==n&&(0,o.jA)(r))return a.map(e=>$(e,m.A.WGS84)).map(e=>Y(e,m.A.WGS84,r));if(null==n){const e=v.cacheKey(t,r);void 0!==R[e]?n=R[e]:(null==(n=D(t,r,void 0))&&(n=new v),R[e]=n)}if(null==G||null==e)throw new U;return null!=i?G._project(e,a,t,r,n,i):G._project(e,a,t,r,n)}function W(e,a){const t=F([e],a);return null!=t.pending?{pending:t.pending,geometry:null}:null!=t.geometries?{pending:null,geometry:t.geometries[0]}:{pending:null,geometry:null}}function F(e,a){if(!O())for(const t of e)if(null!=t&&!(0,b.aI)(t.spatialReference,a)&&(0,b.fn)(t.spatialReference)&&(0,b.fn)(a)&&!J(t.spatialReference,a))return(0,i.gc)(C),{pending:_(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,b.aI)(e.spatialReference,a)?e:(0,b.fn)(e.spatialReference)&&(0,b.fn)(a)?$(e,a):null)}}function D(e,a,t=null){if(null==e||null==a)return null;if(null==G||null==P)throw new U;const r=G._getTransformation(P,e,a,t,t?.spatialReference);return null!==r?v.fromGE(r):null}function V(e,a,t=null){if(null==G||null==P)throw new U;const r=G._getTransformationBySuitability(P,e,a,t,t?.spatialReference);if(null!==r){const e=[];for(const a of r)e.push(v.fromGE(a));return e}return[]}class U extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function K(){G=null,P=null,A=null,R={}}const B={get loadPromise(){return A}};function $(e,a){try{const t=E(e,a);if(null==t)return null;"xmin"in e&&"xmin"in t&&(t.zmin=e.zmin,t.zmax=e.zmax);const r=(0,T.N)(t.type,e.spatialReference,a);return null!=r&&r(t),t}catch(e){if(!(e instanceof U))throw e;return null}}async function q(e,a,t){const r=e.spatialReference;return null!=r&&null!=a&&await H(r,a,null,t),$(e,a)}function J(e,a,t){return!t&&(!!(0,b.aI)(e,a)||(0,b.fn)(e)&&(0,b.fn)(a)&&!!(0,w.jd)(e,a))}function z(e,a){if((0,b.aI)(e,a))return!0;if(!(0,b.fn)(e)||!(0,b.fn)(a))return!1;const t=(0,b.oT)(e)||(0,b.K8)(e)||(0,b.x1)(e),r=(0,b.oT)(a)||(0,b.K8)(a)||(0,b.x1)(a);return t&&r}async function H(e,a,t,r){if(O())return(0,n.NO)(r);if(Array.isArray(e)){for(const{source:a,dest:t,geographicTransformation:n}of e)if(a&&t&&!J(a,t,n))return _(r)}else if(e&&a&&!J(e,a,t))return _(r);return(0,n.NO)(r)}function Y(e,a,t){return e?"x"in e?X(e,a,new d.A,t,0):"xmin"in e?le(e,a,new u.A,t,0):"rings"in e?ne(e,a,new p.A,t,0):"paths"in e?te(e,a,new L.A,t,0):"points"in e?ee(e,a,new y.A,t,0):null:null}function Z(e,a,t=a.spatialReference,r=0){return null!=t&&null!=e.spatialReference&&null!=X(e,e.spatialReference,a,t,r)}function X(e,a,t,r,n){ce[0]=e.x,ce[1]=e.y;const i=e.z;return ce[2]=void 0!==i?i:n,(0,h.projectBuffer)(ce,a,0,ce,r,0)?(t.x=ce[0],t.y=ce[1],t.spatialReference=r,void 0!==i||(0,o.xP)(r)?(t.z=ce[2],t.hasZ=!0):(t.z=void 0,t.hasZ=!1),void 0===e.m?(t.m=void 0,t.hasM=!1):(t.m=e.m,t.hasM=!0),t):null}function Q(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ee(e,e.spatialReference,a,t,r)}function ee(e,a,t,r,n){const{points:i,hasZ:l,hasM:s}=e,c=[],u=i.length,y=[];for(const e of i)y.push(e[0],e[1],l?e[2]:n);if(!(0,h.projectBuffer)(y,a,0,y,r,0,u))return null;const f=l||(0,o.xP)(r);for(let e=0;e<u;++e){const a=3*e,t=y[a],r=y[a+1];f&&s?c.push([t,r,y[a+2],i[e][3]]):f?c.push([t,r,y[a+2]]):s?c.push([t,r,i[e][2]]):c.push([t,r])}return t.points=c,t.spatialReference=r,t.hasZ=l,t.hasM=s,t}function ae(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=te(e,e.spatialReference,a,t,r)}function te(e,a,t,r,n){const{paths:i,hasZ:l,hasM:s}=e,c=[];if(!se(i,l??!1,s??!1,a,c,r,n))return null;const u=l||(0,o.xP)(r);return t.paths=c,t.spatialReference=r,t.hasZ=u,t.hasM=s,t}function re(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ne(e,e.spatialReference,a,t,r)}function ne(e,a,t,r,n){const{rings:i,hasZ:l,hasM:s}=e,c=[];if(!se(i,l??!1,s??!1,a,c,r,n))return null;const u=l||(0,o.xP)(r);return t.rings=c,t.spatialReference=r,t.hasZ=u,t.hasM=s,t}function ie(e,a,t=a.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=le(e,e.spatialReference,a,t,r)}function le(e,a,t,r,n){const{xmin:i,ymin:l,xmax:s,ymax:c,hasZ:u,hasM:y}=e;if(!S(i,l,u?e.zmin:n,a,ce,r))return null;const f=u||(0,o.xP)(r);return t.xmin=ce[0],t.ymin=ce[1],f&&(t.zmin=ce[2]),S(s,c,u?e.zmax:n,a,ce,r)?(t.xmax=ce[0],t.ymax=ce[1],f&&(t.zmax=ce[2]),y&&(t.mmin=e.mmin,t.mmax=e.mmax),t.spatialReference=r,t):null}function se(e,a,t,r,n,i,l=0){const s=new Array;for(const t of e)for(const e of t)s.push(e[0],e[1],a?e[2]:l);if(!(0,h.projectBuffer)(s,r,0,s,i,0))return!1;let c=0;n.length=0;const u=a||(0,o.xP)(i);for(const a of e){const e=new Array;for(const r of a)u&&t?e.push([s[c++],s[c++],s[c++],r[3]]):u?e.push([s[c++],s[c++],s[c++]]):t?(e.push([s[c++],s[c++],r[2]]),c++):(e.push([s[c++],s[c++]]),c++);n.push(e)}return!0}const ce=(0,s.vt)()}}]);