@arcgis/core 5.0.0-next.59 → 5.0.0-next.60

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 (347) hide show
  1. package/analysis/Analysis.d.ts +2 -3
  2. package/analysis/ElevationProfile/ElevationProfileLine.d.ts +1 -1
  3. package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -3
  4. package/analysis/ElevationProfile/{elevationProfileLineTypes.d.ts → types.d.ts} +2 -2
  5. package/analysis/ElevationProfileAnalysis.d.ts +1 -1
  6. package/analysis/LengthDimension.d.ts +1 -1
  7. package/analysis/LineOfSightAnalysisObserver.d.ts +1 -1
  8. package/analysis/LineOfSightAnalysisTarget.d.ts +1 -1
  9. package/analysis/Slice/SliceAnalysisExcludedLayer.js +5 -0
  10. package/analysis/Slice/types.d.ts +4 -0
  11. package/analysis/SliceAnalysis.d.ts +1 -4
  12. package/analysis/SliceAnalysis.js +1 -1
  13. package/analysis/Viewshed.d.ts +1 -1
  14. package/analysis/VolumeMeasurementAnalysis.d.ts +1 -1
  15. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  16. package/analysis/types.d.ts +22 -1
  17. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +6 -0
  18. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +4 -1
  19. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +11 -1
  20. package/applications/KnowledgeStudio/layerInternalAccessUtils.js +1 -1
  21. package/arcade/functions/featuresetbase.js +1 -1
  22. package/arcade.d.ts +27 -4
  23. package/arcade.js +1 -1
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/02cd179176fee25d09a8.js +1 -0
  26. package/assets/esri/core/workers/chunks/0367a8580fede8f804f9.js +1 -0
  27. package/assets/esri/core/workers/chunks/0483a2cfdb8c7158e73a.js +1 -0
  28. package/assets/esri/core/workers/chunks/{73f9cbf0f919b6adc2d5.js → 05ab54b81c366e98138f.js} +1 -1
  29. package/assets/esri/core/workers/chunks/108a4ab28b6586e281d9.js +1 -0
  30. package/assets/esri/core/workers/chunks/14f4f5b7549cea7b5a6a.js +1 -0
  31. package/assets/esri/core/workers/chunks/1b475593c80d7bccdda5.js +1 -0
  32. package/assets/esri/core/workers/chunks/{de05c59da6d67716795d.js → 1c350a2c4014146dbcd9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{b2425f6af7df6902dfc4.js → 1e8ceed33a3657ac02b3.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{2d61b6efa17e8c5832da.js → 21ebd234cf32ae52b3ea.js} +1 -1
  35. package/assets/esri/core/workers/chunks/27ec8688f72130239b98.js +1 -0
  36. package/assets/esri/core/workers/chunks/{087cf25ca211836a084a.js → 2a6231db5ee6cbfd59a5.js} +1 -1
  37. package/assets/esri/core/workers/chunks/2d8dca9a4a58469ddd05.js +1 -0
  38. package/assets/esri/core/workers/chunks/2e6bd743b88e83d43137.js +1 -0
  39. package/assets/esri/core/workers/chunks/2f6fa33692478e99d24b.js +1 -0
  40. package/assets/esri/core/workers/chunks/31eda00e6842005d0ec8.js +1 -0
  41. package/assets/esri/core/workers/chunks/{ce90e8489143228262e7.js → 33a13e80badd20ed8de2.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{01d38a9ca9e88c38aab9.js → 34178ace79e8dea3567d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/37a3e91791a18ed8b8da.js +1 -0
  44. package/assets/esri/core/workers/chunks/{47338472f5a8e004a671.js → 37e46461da3000949a26.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{c531c0e3d420a1be0ad2.js → 3d1a5a3467f3a6585b3e.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{be6a05d5375e80968877.js → 47e5149765beee46f208.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{44fb1184eeed0636704a.js → 4b088260252787734c00.js} +1 -1
  48. package/assets/esri/core/workers/chunks/4cbe78d6a5ff617e15d6.js +1 -0
  49. package/assets/esri/core/workers/chunks/509065a27bd07bd32475.js +1 -0
  50. package/assets/esri/core/workers/chunks/{c09cba77ee60a3d765e2.js → 522a6787d9e0f520ac79.js} +1 -1
  51. package/assets/esri/core/workers/chunks/5686220aed9a74dbd2b1.js +1 -0
  52. package/assets/esri/core/workers/chunks/584c4602d97a008afb83.js +1 -0
  53. package/assets/esri/core/workers/chunks/{60954ab810dbbf36e5e1.js → 5a66b7f1f4da75da8e7f.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{10094eb2b94e98dd4a8a.js → 5dc2f2e28c30386efadf.js} +1 -1
  55. package/assets/esri/core/workers/chunks/668a868fe2dcb6384ac9.js +1 -0
  56. package/assets/esri/core/workers/chunks/68cb43f2fa8cc826e99b.js +1 -0
  57. package/assets/esri/core/workers/chunks/68ee11589de0da7fed08.js +1 -0
  58. package/assets/esri/core/workers/chunks/{d42273394f575e71dd55.js → 73bee5659414b3687cfc.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{090dad5579f0148d6486.js → 76dbaef0d0794913f36f.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{09bd9bd37a339802907a.js → 7bf30c254228f9b7f224.js} +1 -1
  61. package/assets/esri/core/workers/chunks/7c5218eae13d3bd30598.js +1 -0
  62. package/assets/esri/core/workers/chunks/7fc09382f934e9223a9b.js +1 -0
  63. package/assets/esri/core/workers/chunks/{472d290f8eb1c1a85724.js → 8195310b4c53db902fc1.js} +1 -1
  64. package/assets/esri/core/workers/chunks/831b8282380844a7c4d5.js +1 -0
  65. package/assets/esri/core/workers/chunks/83c5dea24e36ac2e3497.js +1 -0
  66. package/assets/esri/core/workers/chunks/{49df576f0215618aa651.js → 84440efe2cc337dab81f.js} +1 -1
  67. package/assets/esri/core/workers/chunks/852007720e3bc29532db.js +1 -0
  68. package/assets/esri/core/workers/chunks/87c6470ee295d736b06d.js +1 -0
  69. package/assets/esri/core/workers/chunks/89853fccdf2bfcc290c0.js +1 -0
  70. package/assets/esri/core/workers/chunks/{1e152a34e368bd810a0f.js → 8d58e59ea13ecafdd45c.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{a2442549c5daf3653eb4.js → 8d6641d0f7c93f83c414.js} +1 -1
  72. package/assets/esri/core/workers/chunks/8db723b8468e408dda46.js +1 -0
  73. package/assets/esri/core/workers/chunks/92a4f56232f81ca457fa.js +1 -0
  74. package/assets/esri/core/workers/chunks/{8a132d91077ecf849248.js → 92ef6071ea87b7f940e2.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{bb4aefaf9b0327dda738.js → 942c80c425b1f13cced5.js} +1 -1
  76. package/assets/esri/core/workers/chunks/980313a6c35e79812d17.js +1 -0
  77. package/assets/esri/core/workers/chunks/{e6bab7b739bfbb39f6cd.js → 988f5e003377d734d282.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{7364fb5e99933533890d.js → 9ba8a2e1c0fb4e1efc7c.js} +1 -1
  79. package/assets/esri/core/workers/chunks/9c157c0eeadb824ad01e.js +1 -0
  80. package/assets/esri/core/workers/chunks/a39ac9127a215d14d412.js +1 -0
  81. package/assets/esri/core/workers/chunks/{63cf702cde83692126be.js → a6f29d1a6356e2de5a79.js} +1 -1
  82. package/assets/esri/core/workers/chunks/a94dd0f5839b6e2bb2d2.js +1 -0
  83. package/assets/esri/core/workers/chunks/ab0275669e28e7a34c38.js +1 -0
  84. package/assets/esri/core/workers/chunks/abc8015e13b1395b8d64.js +1 -0
  85. package/assets/esri/core/workers/chunks/abcee7cfd53cfe1d91e9.js +1 -0
  86. package/assets/esri/core/workers/chunks/acdbe0299024d58e1421.js +1 -0
  87. package/assets/esri/core/workers/chunks/{63c91421a71ae3b3599e.js → adff1791ae44631ad34a.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{0eb6b9c638a5fcfe9bab.js → b4a59dd11d75df7bd510.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{224f01b11fdba9250b1e.js → b64cfd86d9204be743c6.js} +1 -1
  90. package/assets/esri/core/workers/chunks/b7f2fb6684cf684b0bce.js +1 -0
  91. package/assets/esri/core/workers/chunks/b9f0d313f59fc7c43560.js +1 -0
  92. package/assets/esri/core/workers/chunks/bb5373ff7cdad7270095.js +1 -0
  93. package/assets/esri/core/workers/chunks/bb92a9daa0c5b019561f.js +1 -0
  94. package/assets/esri/core/workers/chunks/bbe2eaef7edfa33b6eea.js +1 -0
  95. package/assets/esri/core/workers/chunks/bddaa83fcb9fdb1e1856.js +1 -0
  96. package/assets/esri/core/workers/chunks/bfdf646d4c8f175a4236.js +1 -0
  97. package/assets/esri/core/workers/chunks/{0000781c850b1b4828b3.js → bfe052b386ec4874f350.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{aa297e0931213341f51b.js → c3272b09bff886b08ce1.js} +1 -1
  99. package/assets/esri/core/workers/chunks/c38a07e936226b361b63.js +1 -0
  100. package/assets/esri/core/workers/chunks/{0d9904ba62558686c289.js → c743e561e7d73a100576.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{b907d16e82ac908bb896.js → c96083838f919a8f64cd.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{be80ed6e2955eabe912f.js → ca761dc5f45cafef313e.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{8a6e50d95539b46f629c.js → cad1d7e5ce89f51b3ac9.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{dbe55d4731227d6e9571.js → ccc743e41854eb225c23.js} +1 -1
  105. package/assets/esri/core/workers/chunks/cf3a9ead26629f3508b3.js +1 -0
  106. package/assets/esri/core/workers/chunks/{3a612f873e29348370b2.js → d129a5a34e9ad09bd39e.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{461093ce28ceadd7853d.js → d14e75b160aa432233c6.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{e668ddc7332e5e560e78.js → d2abfcb0c8bf894c7f72.js} +1 -1
  109. package/assets/esri/core/workers/chunks/d749aa62ad694147aebe.js +1 -0
  110. package/assets/esri/core/workers/chunks/{f142c5cbdd16f1768275.js → d77f56576a49a998164a.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{044a0ccd89741c1ae770.js → d79d29b52a65fb6bf94d.js} +1 -1
  112. package/assets/esri/core/workers/chunks/da7685ec2b6eaf00fd2d.js +1 -0
  113. package/assets/esri/core/workers/chunks/dae09fb8da0faa6dede4.js +1 -0
  114. package/assets/esri/core/workers/chunks/e16e88de4e93b0f48b2c.js +1 -0
  115. package/assets/esri/core/workers/chunks/e8bf362b2631f977b1cb.js +1 -0
  116. package/assets/esri/core/workers/chunks/ec5f83aa752c39a96609.js +1 -0
  117. package/assets/esri/core/workers/chunks/ed7e353e290b3a272457.js +1 -0
  118. package/assets/esri/core/workers/chunks/ef9a23d41acb5ad36426.js +1 -0
  119. package/assets/esri/core/workers/chunks/{33154a245eeca4ba38c6.js → f3437ae6bba846b524d3.js} +1 -1
  120. package/assets/esri/core/workers/chunks/{cfd2839e218610a222e5.js → f54ec21fa67db6fef5a6.js} +1 -1
  121. package/assets/esri/core/workers/chunks/{58242447b72cc60a5040.js → f91e63d7842c427c7f72.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{914746077017fa50933f.js → fa0bbf0d7eadb924c473.js} +1 -1
  123. package/assets/esri/core/workers/chunks/fbd577f56529063ce491.js +1 -0
  124. package/assets/esri/core/workers/chunks/fe33b11ec3f58a0f541a.js +1 -0
  125. package/assets/esri/core/workers/chunks/fe5d2735f057c7789f4b.js +1 -0
  126. package/assets/esri/core/workers/chunks/ff7df6fb78fa2c0e9247.js +1 -0
  127. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  128. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
  129. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
  130. package/chunks/bundle.js +1 -1
  131. package/config.js +1 -1
  132. package/core/memoryEstimations.js +1 -1
  133. package/core/promiseUtils.d.ts +1 -1
  134. package/core/units.d.ts +2 -0
  135. package/geometry/FlatGeometry.js +1 -1
  136. package/geometry/operators/support/jsonConverter.js +1 -1
  137. package/interfaces.d.ts +29 -31
  138. package/kernel.js +1 -1
  139. package/layers/FeatureLayer.d.ts +3 -3
  140. package/layers/GeoJSONLayer.d.ts +1 -1
  141. package/layers/ImageryTileLayer.d.ts +1 -1
  142. package/layers/OGCFeatureLayer.d.ts +1 -1
  143. package/layers/ParquetLayer.d.ts +1 -1
  144. package/layers/ParquetLayer.js +1 -1
  145. package/layers/SceneLayer.d.ts +1 -1
  146. package/layers/StreamLayer.d.ts +8 -7
  147. package/layers/VoxelWasmPerSceneView.js +1 -1
  148. package/layers/WCSLayer.d.ts +1 -1
  149. package/layers/WFSLayer.d.ts +1 -1
  150. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +1 -1
  151. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  152. package/layers/graphics/FlatFeature.js +5 -0
  153. package/layers/graphics/FlatFeatureSet.js +5 -0
  154. package/layers/graphics/data/FlatFeatureStore.js +5 -0
  155. package/layers/graphics/data/QueryEngine.js +1 -1
  156. package/layers/graphics/data/QueryEngineResult.js +1 -1
  157. package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +5 -0
  158. package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
  159. package/layers/graphics/featureConversionUtils.js +1 -1
  160. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  161. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  162. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
  163. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  164. package/layers/mixins/ImageryTileMixin.d.ts +1 -1
  165. package/layers/ogc/ogcFeatureUtils.d.ts +57 -0
  166. package/layers/ogc/ogcFeatureUtils.js +1 -1
  167. package/layers/ogc/types.d.ts +73 -0
  168. package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +1 -1
  169. package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +1 -1
  170. package/layers/support/FeatureReductionBinning.d.ts +1 -1
  171. package/layers/support/FeatureReductionCluster.d.ts +1 -1
  172. package/layers/support/StreamConnection.d.ts +37 -4
  173. package/layers/support/Sublayer.d.ts +1 -1
  174. package/layers/support/TrackPartInfo.d.ts +1 -1
  175. package/layers/support/fieldUtils.d.ts +1 -1
  176. package/layers/support/parquetUtils.js +1 -1
  177. package/libs/parquet/parquet.js +1 -1
  178. package/package.json +1 -1
  179. package/pointCloudRenderers.d.ts +1 -1
  180. package/portal/jsonTypes.d.ts +6 -0
  181. package/renderers/DictionaryRenderer.d.ts +2 -5
  182. package/renderers/PointCloudClassBreaksRenderer.d.ts +2 -1
  183. package/renderers/PointCloudRenderer.d.ts +3 -6
  184. package/renderers/PointCloudStretchRenderer.d.ts +2 -1
  185. package/renderers/PointCloudUniqueValueRenderer.d.ts +2 -1
  186. package/renderers/RasterShadedReliefRenderer.d.ts +2 -3
  187. package/renderers/RasterStretchRenderer.d.ts +1 -1
  188. package/renderers/Renderer.d.ts +2 -2
  189. package/renderers/VectorFieldRenderer.d.ts +4 -3
  190. package/renderers/support/AuthoringInfo.d.ts +2 -25
  191. package/renderers/support/AuthoringInfoVisualVariable.d.ts +2 -17
  192. package/renderers/support/RasterPresetRenderer.d.ts +1 -1
  193. package/renderers/support/RendererLegendOptions.d.ts +1 -4
  194. package/renderers/support/jsonUtils.d.ts +1 -1
  195. package/renderers/support/pointCloud/types.d.ts +10 -0
  196. package/renderers/support/raster/types.d.ts +54 -0
  197. package/renderers/support/types.d.ts +44 -0
  198. package/renderers/support/utils.d.ts +1 -1
  199. package/renderers/types.d.ts +16 -6
  200. package/renderers.d.ts +1 -1
  201. package/rest/knowledgeGraph/GraphObject.d.ts +1 -1
  202. package/rest/knowledgeGraph/GraphObject.js +1 -1
  203. package/smartMapping/labels/bins.d.ts +1 -1
  204. package/smartMapping/popup/clusters.d.ts +1 -1
  205. package/smartMapping/popup/templates.d.ts +1 -1
  206. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
  207. package/smartMapping/raster/renderers/rgb.d.ts +1 -1
  208. package/smartMapping/raster/renderers/stretch.d.ts +1 -1
  209. package/smartMapping/raster/support/utils.d.ts +1 -1
  210. package/smartMapping/renderers/color.d.ts +1 -2
  211. package/smartMapping/renderers/pieChart.d.ts +1 -1
  212. package/smartMapping/renderers/predominance.d.ts +1 -1
  213. package/smartMapping/renderers/size.d.ts +1 -2
  214. package/smartMapping/renderers/support/rendererUtils.d.ts +1 -1
  215. package/smartMapping/renderers/univariateColorSize.d.ts +1 -1
  216. package/support/revision.js +1 -1
  217. package/unionTypes.d.ts +23 -7
  218. package/views/2d/engine/Stage.js +1 -1
  219. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  220. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  221. package/views/2d/engine/webgl/Painter.js +1 -1
  222. package/views/2d/engine/webgl/TileContainer.js +1 -1
  223. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  224. package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
  225. package/views/2d/engine/webgl/shaderGraph/techniques/Technique.js +1 -1
  226. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
  227. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  228. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  229. package/views/2d/layers/features/FeaturePipelineWorkerProxy.d.ts +2 -2
  230. package/views/2d/layers/features/FeatureStoreQueryAdapter.js +1 -1
  231. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  232. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  233. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  234. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  235. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  236. package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
  237. package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
  238. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  239. package/views/2d/layers/features/support/Tile.js +1 -1
  240. package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
  241. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  242. package/views/2d/layers/support/DebouncedFeatureOverride.js +1 -1
  243. package/views/2d/layers/support/DebugOverlay.js +1 -1
  244. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +1 -1
  245. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  246. package/views/3d/environment/Fog.js +1 -1
  247. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  248. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  249. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  250. package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
  251. package/views/3d/state/ViewStateManager.js +1 -1
  252. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  253. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  254. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  255. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  256. package/views/BreakpointsOwner.d.ts +26 -21
  257. package/views/DOMContainer.d.ts +2 -1
  258. package/views/MapView.d.ts +3 -3
  259. package/views/SceneView.d.ts +3 -3
  260. package/views/View.d.ts +2 -2
  261. package/views/View2D.js +1 -1
  262. package/views/Viewport2DMixin.d.ts +3 -2
  263. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +1 -1
  264. package/views/interactive/snapping/LineSnapper.js +1 -1
  265. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  266. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  267. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  268. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  269. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  270. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  271. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  272. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  273. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -2
  274. package/widgets/Features/FeaturesViewModel.d.ts +1 -1
  275. package/widgets/Home/HomeViewModel.d.ts +1 -1
  276. package/widgets/Locate/LocateViewModel.d.ts +2 -2
  277. package/widgets/Slice/SliceViewModel.d.ts +2 -1
  278. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
  279. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  280. package/widgets/types.d.ts +1 -1
  281. package/analysis/FeatureReference.d.ts +0 -19
  282. package/analysis/VolumeMeasurement/volumeMeasurementUtils.js +0 -5
  283. package/analysis/support/SliceAnalysisExcludedLayer.js +0 -5
  284. package/assets/esri/core/workers/chunks/00f044370bf3bb6b24d7.js +0 -1
  285. package/assets/esri/core/workers/chunks/0136cd1a5da204b6daeb.js +0 -1
  286. package/assets/esri/core/workers/chunks/097001462d93b78b64f4.js +0 -1
  287. package/assets/esri/core/workers/chunks/0fcb40204db8ee5571c3.js +0 -1
  288. package/assets/esri/core/workers/chunks/13167bdd486b41163147.js +0 -1
  289. package/assets/esri/core/workers/chunks/1363345f31f4f5051132.js +0 -1
  290. package/assets/esri/core/workers/chunks/13be94357dcf5afc4fcb.js +0 -1
  291. package/assets/esri/core/workers/chunks/1693f19f1c37e0a2087e.js +0 -1
  292. package/assets/esri/core/workers/chunks/18c4cd160a4052b05831.js +0 -1
  293. package/assets/esri/core/workers/chunks/18ce7b1559a45d017c45.js +0 -1
  294. package/assets/esri/core/workers/chunks/1dc3ab52fcde7bff0f23.js +0 -1
  295. package/assets/esri/core/workers/chunks/27794d48c04a5875fd22.js +0 -1
  296. package/assets/esri/core/workers/chunks/2a66841243975cac3e3c.js +0 -1
  297. package/assets/esri/core/workers/chunks/2c12848e4934e9bb2bd0.js +0 -1
  298. package/assets/esri/core/workers/chunks/311c4914a4f69f3c1525.js +0 -1
  299. package/assets/esri/core/workers/chunks/35cbc61a006351620ead.js +0 -1
  300. package/assets/esri/core/workers/chunks/36a04be40369111a633d.js +0 -1
  301. package/assets/esri/core/workers/chunks/3b5e71b156244789f624.js +0 -1
  302. package/assets/esri/core/workers/chunks/3dd0db77a05263000bd8.js +0 -1
  303. package/assets/esri/core/workers/chunks/5047acfd66539eefe353.js +0 -1
  304. package/assets/esri/core/workers/chunks/51fd6662245b920af652.js +0 -1
  305. package/assets/esri/core/workers/chunks/58419d362f24b35003c1.js +0 -1
  306. package/assets/esri/core/workers/chunks/58cf5b9a6aa685fc3367.js +0 -1
  307. package/assets/esri/core/workers/chunks/5ffeb8fb58d59bad68c3.js +0 -1
  308. package/assets/esri/core/workers/chunks/6d09965ab2bff9da88b6.js +0 -1
  309. package/assets/esri/core/workers/chunks/700122f775b98a7ed353.js +0 -1
  310. package/assets/esri/core/workers/chunks/7353d78feba7e6302b6e.js +0 -1
  311. package/assets/esri/core/workers/chunks/7737e69da604d2521da8.js +0 -1
  312. package/assets/esri/core/workers/chunks/7ba31425caa404f86424.js +0 -1
  313. package/assets/esri/core/workers/chunks/7cd0ab01933bfb2c6e43.js +0 -1
  314. package/assets/esri/core/workers/chunks/80c36f1786ae0be00962.js +0 -1
  315. package/assets/esri/core/workers/chunks/81c2cc77c275a5b555c0.js +0 -1
  316. package/assets/esri/core/workers/chunks/8892bf3d2367e35de001.js +0 -1
  317. package/assets/esri/core/workers/chunks/8d941204425571b656ec.js +0 -1
  318. package/assets/esri/core/workers/chunks/973bf2ed34d57f299472.js +0 -1
  319. package/assets/esri/core/workers/chunks/9b6e2099aabf67b9f9f2.js +0 -1
  320. package/assets/esri/core/workers/chunks/a6b1e3ec30f6d641aea9.js +0 -1
  321. package/assets/esri/core/workers/chunks/a8f7e44657083f6aa3fd.js +0 -1
  322. package/assets/esri/core/workers/chunks/b648a1e641cf5c772d67.js +0 -1
  323. package/assets/esri/core/workers/chunks/b91c13f44f4d1bac5799.js +0 -1
  324. package/assets/esri/core/workers/chunks/be6cc8a1485961f22372.js +0 -1
  325. package/assets/esri/core/workers/chunks/c91201b37d1cb3875fb4.js +0 -1
  326. package/assets/esri/core/workers/chunks/d22e0d733bfe821c0510.js +0 -1
  327. package/assets/esri/core/workers/chunks/d54988c21ea5667d00b7.js +0 -1
  328. package/assets/esri/core/workers/chunks/d62193323c67b379dee3.js +0 -1
  329. package/assets/esri/core/workers/chunks/d65ca3b8fccae8c3c3fa.js +0 -1
  330. package/assets/esri/core/workers/chunks/d8dc130ea559be1f68c6.js +0 -1
  331. package/assets/esri/core/workers/chunks/dcf6f7001f470f76bd3e.js +0 -1
  332. package/assets/esri/core/workers/chunks/e00d56ae5e68267fe269.js +0 -1
  333. package/assets/esri/core/workers/chunks/e2c7c269be93c552dc5b.js +0 -1
  334. package/assets/esri/core/workers/chunks/e4d593ddcbcf06010ab0.js +0 -1
  335. package/assets/esri/core/workers/chunks/f286f13686f003c5eec5.js +0 -1
  336. package/assets/esri/core/workers/chunks/fb6670a929b7333f1764.js +0 -1
  337. package/assets/esri/core/workers/chunks/fbdf553253cf8f22c022.js +0 -1
  338. package/assets/esri/core/workers/chunks/fc10c738bae304721ab2.js +0 -1
  339. package/assets/esri/core/workers/chunks/ff79c2cb28db7e0a1fc4.js +0 -1
  340. package/assets/esri/core/workers/chunks/ffdf1cbc1e54414d0f96.js +0 -1
  341. package/renderers/support/colorRampUtils.d.ts +0 -4
  342. package/renderers/support/pointCloudTypeUtils.d.ts +0 -6
  343. package/renderers/support/rasterRendererHelper.d.ts +0 -37
  344. package/renderers/support/rasterTypeUtils.d.ts +0 -9
  345. package/renderers/support/typeUtils.d.ts +0 -11
  346. /package/analysis/{dimensionUtils.d.ts → Dimension/types.d.ts} +0 -0
  347. /package/analysis/VolumeMeasurement/{volumeMeasurementUtils.d.ts → types.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[708],{27647:(t,e,r)=>{r.d(e,{Q:()=>s});var n=r(92722);function o(t,e){return t?e?4:3:e?3:2}function s(t){if(null==t)return null;if(!t?.lengths.length)return null;const{lengths:e,coords:r,stride:o,hasZ:s,hasM:l}=t,c=new n.A([],[],s,!1),h=c.coords,f=[],a=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let d=0;for(const t of e){const e=i(a,r,d,t,s,l);e&&f.push(e),d+=t*o}if(f.sort((t,e)=>{let r=t[2]-e[2];return 0===r&&s&&(r=t[4]-e[4]),r}),f.length){let t=6*f[0][2];h[0]=f[0][0]/t,h[1]=f[0][1]/t,s&&(t=6*f[0][4],h[2]=0!==t?f[0][3]/t:0),(h[0]<a[0]||h[0]>a[1]||h[1]<a[2]||h[1]>a[3]||s&&(h[2]<a[4]||h[2]>a[5]))&&(h.length=0)}if(!h.length){const n=t.lengths[0]?u(r,0,e[0],s,l):null;if(!n)return null;h[0]=n[0],h[1]=n[1],s&&(h[2]=n[2]??0)}return c}function i(t,e,r,n,s,i){const u=o(s,i);let l=r,c=r+u,h=0,f=0,a=0,d=0,m=0;for(let r=0,o=n-1;r<o;r++,l+=u,c+=u){const r=e[l],n=e[l+1],o=e[l+2],i=e[c],u=e[c+1],g=e[c+2];let y=r*u-i*n;d+=y,h+=(r+i)*y,f+=(n+u)*y,s&&(y=r*g-i*o,a+=(o+g)*y,m+=y),r<t[0]&&(t[0]=r),r>t[1]&&(t[1]=r),n<t[2]&&(t[2]=n),n>t[3]&&(t[3]=n),s&&(o<t[4]&&(t[4]=o),o>t[5]&&(t[5]=o))}if(d>0&&(d*=-1),m>0&&(m*=-1),!d)return null;const g=[h,f,.5*d];return s&&(g[3]=a,g[4]=.5*m),g}function u(t,e,r,n,s){const i=o(n,s);let u=e,a=e+i,d=0,m=0,g=0,y=0;for(let e=0,o=r-1;e<o;e++,u+=i,a+=i){const e=t[u],r=t[u+1],o=t[u+2],s=t[a],i=t[a+1],p=t[a+2],I=n?c(e,r,o,s,i,p):l(e,r,s,i);if(I)if(d+=I,n){const t=f(e,r,o,s,i,p);m+=I*t[0],g+=I*t[1],y+=I*t[2]}else{const t=h(e,r,s,i);m+=I*t[0],g+=I*t[1]}}return d>0?n?[m/d,g/d,y/d]:[m/d,g/d]:r>0?n?[t[e],t[e+1],t[e+2]]:[t[e],t[e+1]]:null}function l(t,e,r,n){const o=r-t,s=n-e;return Math.sqrt(o*o+s*s)}function c(t,e,r,n,o,s){const i=n-t,u=o-e,l=s-r;return Math.sqrt(i*i+u*u+l*l)}function h(t,e,r,n){return[t+.5*(r-t),e+.5*(n-e)]}function f(t,e,r,n,o,s){return[t+.5*(n-t),e+.5*(o-e),r+.5*(s-r)]}},43334:(t,e,r)=>{r.d(e,{N3:()=>u,Om:()=>i});var n=r(69397),o=r(27647),s=r(92722);class i{constructor(t=null,e={},r,n,o=0){this.geometry=t,this.attributes=e,this.centroid=r,this.objectId=n,this.displayId=o}static fromJSON(t){const e=t.geometry?s.A.fromJSON(t.geometry):null,r=t.centroid?s.A.fromJSON(t.centroid):null,n=t.objectId;return new i(e,t.attributes,r,n)}weakClone(){const t=new i(this.geometry,this.attributes,this.centroid,this.objectId);return t.displayId=this.displayId,t}clone(){const t=this.geometry?.clone(),e=new i(t,{...this.attributes},this.centroid?.clone(),this.objectId);return e.displayId=this.displayId,e}ensureCentroid(t){return this.centroid??=(0,o.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function u(t){return!!t.geometry?.coords?.length}},58512:(t,e,r)=>{r.d(e,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const t=new n;return t.globalIdFieldName=this.globalIdFieldName,t.geohashFieldName=this.geohashFieldName,t.geometryProperties=this.geometryProperties,t.geometryType=this.geometryType,t.spatialReference=this.spatialReference,t.hasZ=this.hasZ,t.hasM=this.hasM,t.features=this.features,t.fields=this.fields,t.transform=this.transform,t.exceededTransferLimit=this.exceededTransferLimit,t.uniqueIdField=this.uniqueIdField,t.queryGeometry=this.queryGeometry,t.queryGeometryType=this.queryGeometryType,t}}},69397:(t,e,r)=>{r.d(e,{$B:()=>o,Qf:()=>c,Qh:()=>u,RS:()=>s,Ul:()=>m,ez:()=>a,lM:()=>i,qK:()=>f});var n=r(34275);function o(t){return 32+t.length}const s=16;function i(t){if(!t)return 0;let e=f;for(const r in t)t.hasOwnProperty(r)&&(e+=l(t[r],!1));return e}function u(t){if(!t)return 0;if("number"==typeof t[0])return c(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let r=a;for(let n=0;n<e;n++)r+=l(t[n]);return r}(t);let e=f;for(const r in t)t.hasOwnProperty(r)&&(e+=l(t[r]));return e}function l(t,e=!0){switch(typeof t){case"object":return e?u(t):f;case"string":return o(t);case"number":return s;case"boolean":return 4;default:return 8}}function c(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+d:Array.isArray(e)?h(e,s):0:0),0)}function h(t,e){return a+t.length*e}const f=32,a=16,d=145,m=64},90708:(t,e,r)=>{r.d(e,{Ap:()=>F,B2:()=>y,DF:()=>T,Di:()=>q,E2:()=>k,IE:()=>g,Nl:()=>C,PR:()=>G,Rk:()=>J,Ux:()=>x,Ye:()=>E,ZF:()=>S,aQ:()=>$,eY:()=>_,hK:()=>K,jH:()=>L,jQ:()=>Q,kz:()=>j,oN:()=>Y,q3:()=>W,qN:()=>P,zv:()=>V});var n=r(49186),o=r(53966),s=r(97768),i=r(70328),u=r(19419),l=r(60408),c=r(43334),h=r(58512),f=r(92722),a=r(54339);const d=()=>o.A.getLogger("esri.layers.graphics.featureConversionUtils"),m={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function g({scale:t,translate:e},r){return Math.round((r-e[0])/t[0])}function y({scale:t,translate:e},r){return Math.round((e[1]-r)/t[1])}function p({scale:t,translate:e},r){return Math.round((r-e[0])/t[0])}function I({scale:t,translate:e},r){return Math.round((r-e[1])/t[1])}function N({scale:t,translate:e},r,n){return r*t[n]+e[n]}function b(t,e,r){return e&&(t.hasZ=!0),r&&(t.hasM=!0),t}function w(t,e,r,n){if(e&&n&&t!==r)return(e,r,n,o)=>{n[o++]=e[r++],n[o++]=e[r++],t?r++:n[o++]=0,n[o++]=e[r++]??0};const o=2+(r?1:0)+(n?1:0),s=o-((!t&&r?1:0)+(!e&&n?1:0));return(t,e,r,n)=>{for(let i=0;i<o;++i)r[n++]=i<s?t[e++]??0:0}}function T(t,e,r){if(!t)return null;const{coords:n,hasZ:o,hasM:s}=t,[i,u]=n,l=o?n[2]:0,c=s?n[2+(o?1:0)]:0;return{x:i,y:u,z:e?l:void 0,m:r?c:void 0}}function P(t,e=(0,l.Pv)(t),r=(0,l.W0)(t)){const{x:n,y:o,z:s,m:i}=t,u=[n,o];return e&&u.push(s??0),r&&u.push(i??0),new f.A([],u,e,r)}function M(t,e,r){if(null==t)return null;const{coords:n,stride:o,hasZ:s,hasM:i}=t,u=w(s,i,e,r),l=[];for(let t=0;t<n.length;t+=o){const e=[];u(n,t,e,0),l.push(e)}return b({points:l},e,r)}function G(t,e=(0,l.Pv)(t),r=(0,l.W0)(t)){const{points:n,hasZ:o,hasM:s}=t,i=new f.A([n.length],[],e,r),{coords:u,stride:c}=i;let h=0;const a=w(o??!1,s??!1,e,r);for(const t of n)a(t,0,u,h),h+=c;return i}function A(t,e,r){if(!t)return null;const{coords:n,lengths:o,stride:s,hasZ:i,hasM:u}=t;let l=0;const c=w(i,u,e,r),h=[];for(const t of o){const e=[];for(let r=0;r<t;r++){const t=[];c(n,l,t,0),l+=s,e.push(t)}h.push(e)}return b({paths:h},e,r)}function F(t,e=(0,l.Pv)(t),r=(0,l.W0)(t)){const{paths:n,hasZ:o,hasM:s}=t,i=w(o??!1,s??!1,e,r),u=new f.A([],[],e,r),{lengths:c,coords:h,stride:a}=u;let d=0;for(const t of n){for(const e of t)i(e,0,h,d),d+=a;c.push(t.length)}return u}function v(t,e,r){if(!t)return null;const{coords:n,lengths:o,stride:s,hasZ:i,hasM:u}=t;let l=0;const c=w(i,u,e,r),h=[];for(const t of o){const e=[];for(let r=0;r<t;r++){const t=[];c(n,l,t,0),l+=s,e.push(t)}h.push(e)}return b({rings:h},e,r)}function E(t,e=(0,l.Pv)(t),r=(0,l.W0)(t)){const{rings:n,hasZ:o,hasM:s}=t,i=new f.A([],[],e,r),{lengths:u,coords:c,stride:h}=i;let a=0;const d=w(o??!1,s??!1,e,r);for(const t of n){for(const e of t)d(e,0,c,a),a+=h;u.push(t.length)}return i}const Z=[],O=[];function k(t,e,r,n,o){Z[0]=t;const[s]=q(O,Z,e,r,n,o);return H(Z),H(O),s}function q(t,e,r,o,s,i){if(H(t),!r){for(const r of e){const e=(0,a.W)(r,i);t.push(new c.Om(null,r.attributes,null,e))}return t}switch(r){case"esriGeometryPoint":return function(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:i,centroid:u}=s,h=(0,l.Pv)(e),f=(0,l.W0)(e);t.push(new c.Om(e?P(e,r&&h,n&&f):null,i,u?P(u,!1,!1):null,(0,a.W)(s,o)))}return t}(t,e,o,s,i);case"esriGeometryMultipoint":return function(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:i}=s,u=(0,l.Pv)(e),h=(0,l.W0)(e);t.push(new c.Om(e?G(e,r&&u,n&&h):null,i,null,(0,a.W)(s,o)))}return t}(t,e,o,s,i);case"esriGeometryPolyline":return function(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:i,centroid:u}=s,h=(0,l.Pv)(e),f=(0,l.W0)(e);t.push(new c.Om(e?F(e,r&&h,n&&f):null,i,u?P(u,!1,!1):null,(0,a.W)(s,o)))}return t}(t,e,o,s,i);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:i,centroid:u}=s,h=(0,l.Pv)(e),f=(0,l.W0)(e);t.push(new c.Om(e?E(e,r&&h,n&&f):null,i,u?P(u,!1,!1):null,(0,a.W)(s,o)))}return t}(t,e,o,s,i);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),H(t)}return t}function Y(t,e,r,n){O[0]=t,R(Z,O,e,r,n);const o=Z[0];return H(Z),H(O),o}function x(t,e=(0,l.Pv)(t),r=(0,l.W0)(t)){return null==t?null:(0,l.fT)(t)?P(t,e,r):(0,l.Bi)(t)?E(t,e,r):(0,l.Rg)(t)?F(t,e,r):(0,l.U9)(t)?G(t,e,r):void d().error("convertFromGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`))}function V(t,e,r,o){if(null==t)return null;const s="coords"in t?t:t.geometry;if(null==s)return null;switch(e){case"esriGeometryPoint":return T(s,r,o);case"esriGeometryMultipoint":return M(s,r,o);case"esriGeometryPolyline":return A(s,r,o);case"esriGeometryPolygon":return v(s,r,o);default:return d().error("convertToGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`)),null}}function R(t,e,r,o,s){if(H(t),null==r)return function(t,e){for(const r of e)t.push({attributes:r.attributes});return t}(t,e);switch(r){case"esriGeometryPoint":return function(t,e,r,n){for(const{geometry:o,attributes:s}of e)t.push({attributes:s,geometry:T(o,r,n)});return t}(t,e,o,s);case"esriGeometryMultipoint":return function(t,e,r,n){for(const{geometry:o,attributes:s}of e)t.push({geometry:o&&M(o,r,n),attributes:s});return t}(t,e,o,s);case"esriGeometryPolyline":return function(t,e,r,n){for(const{geometry:o,attributes:s}of e)t.push({geometry:o&&A(o,r,n),attributes:s});return t}(t,e,o,s);case"esriGeometryPolygon":return function(t,e,r,n){for(const{geometry:o,attributes:s,centroid:i}of e){const e=v(o,r,n),u=T(i,!1,!1);t.push(i?{geometry:e,attributes:s,centroid:u}:{geometry:e,attributes:s})}return t}(t,e,o,s);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return t}function S(t){const{spatialReference:e,transform:r,fields:n,hasM:o,hasZ:s,features:i,geometryType:u,exceededTransferLimit:l,queryGeometry:c,queryGeometryType:h}=t,f={features:R([],i,u,s,o),fields:n,geometryType:u,spatialReference:e,queryGeometry:V(c,h,s,o)};return r&&(f.transform=r),l&&(f.exceededTransferLimit=l),o&&(f.hasM=o),s&&(f.hasZ=s),f}function W(t,e){const r=new h.A,{hasM:n,hasZ:o,features:s,spatialReference:i,geometryType:u,exceededTransferLimit:l,transform:c,fields:f}=t;return f&&(r.fields=f),r.geometryType=u??null,r.spatialReference=i??null,s&&q(r.features,s,u,o,n,e),l&&(r.exceededTransferLimit=l),n&&(r.hasM=n),o&&(r.hasZ=o),c&&(r.transform=c),r}function _(t){const{transform:e,features:r}=t;if(!e)return t;for(const t of r)null!=t.geometry&&$(t.geometry,e),null!=t.centroid&&$(t.centroid,e);return t.transform=null,t}function L(t,e){const{geometryType:r,features:n}=e;if(!t)return e;for(let e=0;e<n.length;e++){const o=n[e],s=o.weakClone();s.geometry=C(o.geometry,r,t),s.centroid=C(o.centroid,"esriGeometryPoint",t),n[e]=s}return e.transform=t,e}function C(t,e,r,n,o){if(null==t)return null;if(!t?.coords.length)return null;const s=m[e],{coords:i,lengths:u,stride:l,hasZ:c,hasM:h}=t;n??=c,o??=h;const a=new f.A([],[],n,o),d=a.stride,p=w(c,h,n,o);let I=0;const N=[0,0,0,0].slice(d);function b(){p(i,I,N,0),I+=l,N[0]=g(r,N[0]),N[1]=y(r,N[1])}if(t.isPoint)return b(),a.coords.push(...N),a;let T=0;for(const t of u){if(t<s)continue;let e=1;b(),a.coords.push(...N);let[r,n]=N;for(let o=1;o<t;o++){b();const[t,o]=N;r===t&&n===o||(N[0]-=r,N[1]-=n,a.coords.push(...N),r=t,n=o,e++)}e>=s?(a.lengths.push(e),T=a.coords.length):H(a.coords,T)}return H(a.coords,T),a.coords.length?a:null}function j(t,e,r,n=t.hasZ,o=t.hasM){if(!t.coords.length)return null;const s=m[e],{coords:i,lengths:u,stride:l,hasZ:c,hasM:h}=t,a=new f.A([],[],n,o),d=a.stride,g=w(c,h,n,o);if(t.isPoint)return g(i,0,a.coords,0),a;let y=0;const p=r*r;for(const t of u){if(t<s){y+=t*l;continue}const e=a.coords.length/d,r=y,n=y+(t-1)*l;g(i,r,a.coords,a.coords.length),U(a.coords,i,l,p,g,r,n),g(i,n,a.coords,a.coords.length);const o=a.coords.length/d-e;o>=s?a.lengths.push(o):H(a.coords,e*d),y+=t*l}return a.coords.length?a:null}function z(t,e,r,n){const o=t[e],s=t[e+1],i=t[r],u=t[r+1],l=t[n],c=t[n+1];let h=i,f=u,a=l-h,d=c-f;if(0!==a||0!==d){const t=((o-h)*a+(s-f)*d)/(a*a+d*d);t>1?(h=l,f=c):t>0&&(h+=a*t,f+=d*t)}return a=o-h,d=s-f,a*a+d*d}function U(t,e,r,n,o,s,i){let u,l=n,c=0;for(let t=s+r;t<i;t+=r)u=z(e,t,s,i),u>l&&(c=t,l=u);l>n&&(c-s>r&&U(t,e,r,n,o,s,c),o(e,c,t,t.length),i-c>r&&U(t,e,r,n,o,c,i))}function Q(t,e){if(!e?.coords?.length)return null;let r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const{coords:l,stride:c}=e;for(let t=0;t<l.length;t+=c){const e=l[t],i=l[t+1];r=Math.min(r,e),o=Math.max(o,e),n=Math.min(n,i),s=Math.max(s,i)}return(0,i.is)(t)?(0,i.BI)(t,r,n,o,s):(0,u.fA)(r,n,o,s,t),t}function $(t,e){const{coords:r,lengths:n,stride:o}=t;if(!r.length)return void(n.length=0);(0,s.Lw)(e);const{originPosition:i,scale:u,translate:l}=e,c=X;c.originPosition=i;const h=c.scale;h[0]=u[0]??1,h[1]=-(u[1]??1),h[2]=u[2]??1,h[3]=u[3]??1;const f=c.translate;if(f[0]=l[0]??0,f[1]=l[1]??0,f[2]=l[2]??0,f[3]=l[3]??0,!n.length){for(let t=0;t<o;++t)r[t]=N(c,r[t],t);return void(n.length=0)}let a=0;for(let t=0;t<n.length;t++){const e=n[t];n[t]=e;for(let t=0;t<o;++t)r[a+t]=N(c,r[a+t],t);let s=r[a],i=r[a+1];a+=o;for(let t=1;t<e;t++,a+=o){s+=r[a]*h[0],i+=r[a+1]*h[1],r[a]=s,r[a+1]=i;for(let t=2;t<o;++t)r[a+t]=N(c,r[a+t],t)}}}function B(t,e,r,n){let o=0,s=t[n*e],i=t[n*(e+1)];for(let u=1;u<r;u++){const r=s+t[n*(e+u)],l=i+t[n*(e+u)+1],c=(r-s)*(l+i);s=r,i=l,o+=c}return.5*o}function J(t,e){const{coords:r,lengths:n}=t;let o=0,s=0;for(let t=0;t<n.length;t++){const i=n[t];s+=B(r,o,i,e),o+=i}return Math.abs(s)}function D(t,e,r,n){return 0===t*n-r*e&&t*r+e*n>0}function K(t,e,r){const{stride:n}=t;if(t.isPoint){if(t.coords.length<2)return null;const[r,n]=t.coords,o=p(e,r),s=I(e,n);return new f.A([],[o,s])}const o=new f.A([],[0,0]),s=m[r],i="esriGeometryPolygon"===r||"esriGeometryPolyline"===r;let u=0,l=0;for(let r=0;r<t.lengths.length;r++){const c=t.lengths[r],h=l;let f=p(e,t.coords[n*u]),a=I(e,t.coords[n*u+1]);o.coords[l++]=f,o.coords[l++]=a;let d=0,m=0,g=1;for(let r=1;r<c;r++){const s=p(e,t.coords[n*(r+u)]),c=I(e,t.coords[n*(r+u)+1]);if(s!==f||c!==a){const t=s-f,e=c-a;i&&D(d,m,t,e)?(o.coords[l-2]+=t,o.coords[l-1]+=e,f+=t,a+=e):(o.coords[l++]=s,o.coords[l++]=c,f=s,a=c,d=t,m=e,g+=1)}}g<s?l=h:o.lengths.push(g),u+=c}return 0===o.lengths.length?null:o}function H(t,e=0){t.length!==e&&(t.length=e)}const X={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},92722:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(69397);class o{constructor(t=[],e=[],r=!1,n=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:t,coords:e,hasZ:r,hasM:n}){return new o(t,e,r||!1,n||!1)}static fromRect([t,e,r,n]){const s=r-t,i=n-e;return new o([5],[t,e,s,0,0,i,-s,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let o=this.coords[n*e],s=this.coords[n*e+1];for(let i=1;i<r;i+=1){const r=n*(e+i),u=this.coords[r],l=this.coords[r+1];t+=-.5*(u-o)*(l+s),o=u,s=l}e+=r}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let o=0;o<n;o++){const n=r*(e+o);t(this.coords[n],this.coords[n+1])}e+=n}}deltaDecode(){const t=this.clone(),{coords:e,lengths:r}=t;let n=0;const{stride:o}=this;for(const t of r){for(let r=1;r<t;r++){const t=o*(n+r);e[t]+=e[t-o],e[t+1]+=e[t+1-o]}n+=t}return t}clone(t){if(this.isPoint)return new o([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:r,size:n}=this,s=this.coords.slice(0,n*r);return t?(t.set(s),new o(e,t)):new o(e,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const r=new Array(e*t);for(let e=0,n=0;e<r.length;e+=t)r[n++]=this.coords[e],r[n++]=this.coords[e+1];return new o(this.lengths,r,!1,!1)}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710,7982],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9036)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(6673),r.e(7005),r.e(8570),r.e(6011),r.e(8993),r.e(1437)]).then(r.bind(r,82411))).default,CSVLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(1197)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(9708),r.e(6647),r.e(893),r.e(8628),r.e(2593),r.e(9279),r.e(1874)]).then(r.bind(r,83508))).default,DimensionLayer:async()=>(await Promise.all([r.e(3508),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(3508),r.e(9953),r.e(4802),r.e(8207)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9247)]).then(r.bind(r,68654))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6730)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(8766)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(5890)]).then(r.bind(r,85582))).default,GroupLayer:async()=>(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(9953),r.e(1956),r.e(893),r.e(6673),r.e(6543),r.e(5142),r.e(8824)]).then(r.bind(r,87772))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(9953),r.e(6673),r.e(6543),r.e(8144),r.e(5142),r.e(2168),r.e(9478)]).then(r.bind(r,9478))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(5942),r.e(1312)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6011),r.e(5942),r.e(7464)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1863)]).then(r.bind(r,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(8441),r.e(3463),r.e(8948),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(1224),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(8441),r.e(3463),r.e(8948),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(7048),r.e(7656),r.e(8999)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(3463),r.e(744)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(3444),r.e(9203)]).then(r.bind(r,29203))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(8570),r.e(5977)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2712)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9361),r.e(9644)]).then(r.bind(r,9352))).default,ParquetLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(5695)]).then(r.bind(r,99680))).default,PointCloudLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6673),r.e(7885)]).then(r.bind(r,77885))).default,RouteLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(217),r.e(9785)]).then(r.bind(r,34507))).default,SceneLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(6673),r.e(7005),r.e(8570),r.e(6011),r.e(8993),r.e(1713)]).then(r.bind(r,36969))).default,StreamLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(1017),r.e(73)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1956),r.e(8399),r.e(957),r.e(9708),r.e(6647),r.e(9645)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(4802),r.e(7048),r.e(573)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(5897),r.e(1776)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(3508),r.e(3910),r.e(6728),r.e(8303),r.e(957),r.e(3444),r.e(2274)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(3508),r.e(1224),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(1005)]).then(r.bind(r,21005))).default,WCSLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(9953),r.e(6543),r.e(8144),r.e(5142),r.e(2168),r.e(5694)]).then(r.bind(r,20521))).default,WFSLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9110)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(9573),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2848)]).then(r.bind(r,47314))).default}},7861:(e,a,r)=>{r.d(a,{L:()=>n});var t=r(11254);async function n(e,a){return(await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}},23154:(e,a,r)=>{r.d(a,{K:()=>f,Q:()=>s});var t=r(77548),n=r(7861);const l=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:r,...l}=a||{},s=r?await r.fetchServiceMetadata(e,l):await(0,n.L)(e,l),i=(0,t.G$)();d(s),c(s);const o={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return o;const u=`${(0,t.$x)()??e}/layers`,y=r?await r.fetchServiceMetadata(u,l):await(0,n.L)(u,l);return d(y),c(y),o.layersJSON={layers:y.layers,tables:y.tables},o}function i(e){const{type:a}=e;return!!a&&l.has(a)}function o(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(y)}function f(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(77548),c=r(4513),u=r(7861);const y={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function d(e){const{properties:a,url:c}=e,d={...a,url:c},p=await async function(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.L)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===c,L="SceneServer"===c,b={parsedUrl:r,Constructor:null,layerId:p||L?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.L)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.L)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.L)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.L)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.L)(e,{customParameters:a});b.sourceJSON=r,b.preferredUrl=(0,o.$x)(),f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l,c=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=(0,o.$x)(e,{preferredHost:a.preferredHost}),c=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.L)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.L)(t,{customParameters:a}).catch(()=>null);return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.L)(e,{customParameters:r})}const y=t?.layers,d=t?.tables;return{preferredUrl:l,layers:y?.map(e=>({id:e.id})).reverse()||[],tables:d?.map(e=>({serverUrl:n,id:e.id})).reverse()||[],layerInfos:c?y:[],tableInfos:c?d:[]}}(e,c,a);if(p&&(b.preferredUrl=r.preferredUrl,b.sublayerInfos=r.layerInfos,b.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)b.layers=r.layers,b.tables=r.tables,p&&r.layerInfos?.length&&(b.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(h((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach((e,a)=>{n.set(e,t[a])}),e=>n.get(e.type)}(r.layerInfos));else if(p||L){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(b.layerId=r.layers[0]?.id??r.tables[0]?.id,b.sourceJSON=e,p){const a=e?.type;f=(0,i.K)(a)}}}return b.Constructor=await h(f),b}(c,a?.customParameters),{Constructor:L,layerId:b,sourceJSON:S,parsedUrl:v,layers:P,tables:g}=p;if(P.length+g.length===0)return null!=b&&(d.layerId=b),null!=S&&(d.sourceJSON=S),new L(d);const I=new(0,(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default)({title:v.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await h("FeatureLayer");a.tables.forEach(({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)})}}(I,p,d),I}function f(e,a){return e?e.find(({id:e})=>e===a):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(11254),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}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 r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch(()=>d("no-prompt")),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7367],{71163:(n,t,e)=>{e.d(t,{C:()=>c});var r=e(29953);let a,i,o=!1;function s(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then(n=>{i=n,o=!0,a=void 0})}async function c(n,t){return o?i.apply("invokeGeometryOp",[n,t]):(await s(),c(n,t))}},80672:(n,t,e)=>{e.d(t,{R:()=>a});var r=e(20655);function a(n,t){return null===n?t:new r.A({url:n.field("url")})}},87367:(n,t,e)=>{e.r(t),e.d(t,{registerFunctions:()=>J});var r=e(47609),a=e(66395),i=e(85935),o=e(78502),s=e(78878),c=e(80672),u=e(16442),l=e(71163),f=e(4576),d=e(5443),w=e(91075),y=e(48526),h=e(86738),A=e(39829),S=e(82799),m=e(65864),C=e(20655),N=e(70333),g=e(11254);async function O(n,t,e){const r=N.id?.findCredential(n.restUrl);if(!r)return null;if("loaded"===n.loadStatus&&""===t&&n.user?.sourceJSON&&!1===e)return n.user.sourceJSON;const a={responseType:"json",query:{f:"json"}};if(e&&(a.query.returnUserLicenseTypeExtensions=!0),""===t){const t=await(0,g.A)(n.restUrl+"/community/self",a);if(t.data){const n=t.data;if(n?.username)return n}return null}const i=await(0,g.A)(n.restUrl+"/community/users/"+t,a);if(i.data){const n=i.data;return n.error?null:n}return null}var p=e(54218);function v(n){if(null==n)return n;switch(typeof n){case"string":case"number":return n;default:throw new i.D$(null,"InvalidParameter",null)}}function J(n){"async"===n.mode&&(n.functions.disjoint=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]||null===a[1]||(0,l.C)("disjoint",[a[0].toJSON(),a[1].toJSON()])))},n.functions.intersects=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("intersects",[a[0].toJSON(),a[1].toJSON()])))},n.functions.touches=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("touches",[a[0].toJSON(),a[1].toJSON()])))},n.functions.crosses=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("crosses",[a[0].toJSON(),a[1].toJSON()])))},n.functions.within=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("within",[a[0].toJSON(),a[1].toJSON()])))},n.functions.contains=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("contains",[a[0].toJSON(),a[1].toJSON()])))},n.functions.overlaps=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("overlaps",[a[0].toJSON(),a[1].toJSON()])))},n.functions.equals=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>((0,s.B)(a,2,2,t,e),a[0]===a[1]||(a[0]instanceof w.A&&a[1]instanceof w.A?(0,l.C)("equals",[a[0].toJSON(),a[1].toJSON()]):((0,s.e)(a[0])&&(0,s.e)(a[1])||!!((0,s.g)(a[0])&&(0,s.g)(a[1])||(0,s.f)(a[0])&&(0,s.f)(a[1])))&&a[0].equals(a[1]))))},n.functions.relate=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,3,3,t,e),a[0]instanceof w.A&&a[1]instanceof w.A)return(0,l.C)("relate",[a[0].toJSON(),a[1].toJSON(),(0,s.s)(a[2])]);if(a[0]instanceof w.A&&null===a[1])return!1;if(a[1]instanceof w.A&&null===a[0])return!1;if(null===a[0]&&null===a[1])return!1;throw new i.D$(t,"InvalidParameter",e)})},n.functions.intersection=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]||null===a[1]?null:(0,m.rS)(await(0,l.C)("intersection",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.union=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(0===(a=(0,s.C)(a)).length)throw new i.D$(t,"WrongNumberOfParameters",e);const c=[];if(1===a.length)if((0,p.cy)(a[0])){for(const n of(0,s.C)(a[0]))if(null!==n){if(!(n instanceof w.A))throw new i.D$(t,"InvalidParameter",e);c.push(n.toJSON())}}else{if(!(0,s.j)(a[0])){if(a[0]instanceof w.A)return(0,s.D)((0,o.Yq)(a[0]),t.spatialReference);if(null===a[0])return null;throw new i.D$(t,"InvalidParameter",e)}for(const n of(0,s.C)(a[0].toArray()))if(null!==n){if(!(n instanceof w.A))throw new i.D$(t,"InvalidParameter",e);c.push(n.toJSON())}}else for(const n of a)if(null!==n){if(!(n instanceof w.A))throw new i.D$(t,"InvalidParameter",e);c.push(n.toJSON())}return 0===c.length?null:(0,m.rS)(await(0,l.C)("union",[c]))})},n.functions.difference=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]?null:null===a[1]?(0,o.Yq)(a[0]):(0,m.rS)(await(0,l.C)("difference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.symmetricdifference=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]&&null===a[1]?null:null===a[0]?(0,o.Yq)(a[1]):null===a[1]?(0,o.Yq)(a[0]):(0,m.rS)(await(0,l.C)("symmetricDifference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.clip=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,t,e),!(a[1]instanceof d.A)&&null!==a[1])throw new i.D$(t,"InvalidParameter",e);if(null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return null===a[1]?null:(0,m.rS)(await(0,l.C)("clip",[a[0].toJSON(),a[1].toJSON()]))})},n.functions.cut=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,t,e),!(a[1]instanceof S.A)&&null!==a[1])throw new i.D$(t,"InvalidParameter",e);if(null===a[0])return[];if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return null===a[1]?[(0,o.Yq)(a[0])]:(await(0,l.C)("cut",[a[0].toJSON(),a[1].toJSON()])).map(n=>(0,m.rS)(n))})},n.functions.area=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if((0,s.B)(a,1,2,t,e),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumArea(v(a[1]),null,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}let o=a[0];if(((0,p.cy)(o)||(0,s.j)(o))&&(o=(0,s.E)(a[0],t.spatialReference)),null===o)return 0;if(!(o instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("area",[o.toJSON(),v(a[1])])})},n.functions.areageodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{(0,s.B)(a,1,3,t,e);let o=(a=(0,s.C)(a))[0];((0,p.cy)(o)||(0,s.j)(o))&&(o=(0,s.E)(o,t.spatialReference));const c=v(a[1]),f=(0,u.rE)(a[2]);if((0,s.m)(o)){const n=await o.sumArea(c,f,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}if(null==o)return 0;if(!(0,s.h)(o))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("geodeticArea",[o.toJSON(),c,f])})},n.functions.length=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if((0,s.B)(a,1,2,t,e),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumLength(v(a[1]),null,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}let o=a[0];if(((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(o=(0,s.F)(a[0],t.spatialReference)),null===o)return 0;if(!(o instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("length",[o.toJSON(),v(a[1])])})},n.functions.length3d=function(t,r){return n.standardFunctionAsync(t,r,async(n,a,o)=>{if((0,s.B)(o,1,2,t,r),null===(o=(0,s.C)(o))[0])return 0;let c=o[0];if(((0,p.cy)(o[0])||(0,s.j)(o[0]))&&(c=(0,s.F)(o[0],t.spatialReference)),null===c)return 0;if(!(c instanceof w.A))throw new i.D$(t,"InvalidParameter",r);if(!0===c.hasZ){const{convertFromSpatialReferenceUnit:n,toLengthUnit:t}=await Promise.resolve().then(e.bind(e,40547)),r=(0,u.UI)(c);return n(c.spatialReference,t(o[1]),r)}return(0,l.C)("length",[c.toJSON(),v(o[1])])})},n.functions.lengthgeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{(0,s.B)(a,1,3,t,e);let o=(a=(0,s.C)(a))[0];((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(o=(0,s.F)(a[0],t.spatialReference));const c=v(a[1]),f=(0,u.rE)(a[2]);if((0,s.m)(o)){const n=await o.sumLength(c,f,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}if(null===o)return 0;if(!(0,s.h)(o))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("geodeticLength",[o.toJSON(),c,f])})},n.functions.distance=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,3,t,e);let o=a[0];if(((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(o=(0,s.G)(a[0],t.spatialReference)),!(o instanceof w.A))throw new i.D$(t,"InvalidParameter",e);let c=a[1];if(((0,p.cy)(a[1])||(0,s.j)(a[1]))&&(c=(0,s.G)(a[1],t.spatialReference)),!(c instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("distance",[o.toJSON(),c.toJSON(),v(a[2])])})},n.functions.distancegeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,t,e);const o=a[0];if(!(o instanceof h.A))throw new i.D$(t,"InvalidParameter",e);const c=a[1];if(!(c instanceof h.A))throw new i.D$(t,"InvalidParameter",e);const f=new S.A({paths:[],spatialReference:o.spatialReference});return f.addPath([o,c]),(0,l.C)("geodeticLength",[f.toJSON(),v(a[2]),(0,u.rE)(a[3])])})},n.functions.densify=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const o=(0,s.r)(a[1]);if(isNaN(o))throw new i.D$(t,"InvalidParameter",e);if(o<=0)throw new i.D$(t,"InvalidParameter",e);switch(a[0].type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,l.C)("densify",[a[0].toJSON(),o,v(a[2])]));default:return a[0]}})},n.functions.densifygeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,t,e);const o=a[0];if(null==o)return null;if(!(0,s.h)(o))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);if(c<=0)throw new i.D$(t,"InvalidParameter",e);const f=v(a[2]),d=(0,u.rE)(a[3]);switch(o.type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,l.C)("geodeticDensify",[o.toJSON(),c,f,d]));default:return o}})},n.functions.generalize=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,4,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const o=(0,s.r)(a[1]);if(isNaN(o))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.H)((0,s.J)(a[2],!0));return(0,m.rS)(await(0,l.C)("generalize",[a[0].toJSON(),o,v(a[3]),{removeDegenerateParts:c}]))})},n.functions.buffer=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);return 0===c?(0,o.Yq)(a[0]):(0,m.rS)(await(0,l.C)("buffer",[a[0].toJSON(),c,v(a[2])]))})},n.functions.buffergeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,t,e);const c=a[0];if(null==c)return null;if(!(0,s.h)(c))throw new i.D$(t,"InvalidParameter",e);const f=(0,s.r)(a[1]);if(isNaN(f))throw new i.D$(t,"InvalidParameter",e);if(0===f)return(0,o.Yq)(c);const d=v(a[2]),w=(0,u.rE)(a[3]);return(0,m.rS)(await(0,l.C)("geodesicBuffer",[c.toJSON(),f,d,w]))})},n.functions.offset=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,6,t,e);const o=a[0];if(null===o)return null;if(!(o instanceof A.A||o instanceof S.A))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);const f=a[2],d=(0,u.R$)(a[3]),w=(0,s.r)((0,s.J)(a[4],10));if(isNaN(w))throw new i.D$(t,"InvalidParameter",e);const y=(0,s.r)((0,s.J)(a[5],0));if(isNaN(y))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)(await(0,l.C)("offset",[o.toJSON(),c,v(f),d,w,y]))})},n.functions.rotate=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const o=a[0]instanceof d.A?A.A.fromExtent(a[0]):a[0],c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);const u=(0,s.J)(a[2],null);if(null===u){const n="point"===o.type?o:o.extent?.center;return(0,m.rS)(await(0,l.C)("rotate",[o.toJSON(),c,n?.x,n?.y]))}if(u instanceof h.A)return(0,m.rS)(await(0,l.C)("rotate",[o.toJSON(),c,u.x,u.y]));throw new i.D$(t,"InvalidParameter",e)})},n.functions.centroid=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,2,t,e),null===a[0])return null;const o=(0,u.Hz)(a[1]);let c=a[0];if(((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(c="geometric"===o?(0,s.G)(a[0],t.spatialReference):(0,s.E)(a[0],t.spatialReference),null===c))return null;if(!(c instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)("geometric"===o?await(0,l.C)("centroid",[c.toJSON()]):await(0,l.C)("labelPoint",[c.toJSON()]))})},n.functions.measuretocoordinate=function(t,e){return n.standardFunctionAsync(t,e,u.Cd)},n.functions.pointtocoordinate=function(t,e){return n.standardFunctionAsync(t,e,u.kr)},n.functions.distancetocoordinate=function(t,e){return n.standardFunctionAsync(t,e,u.Bn)},n.functions.multiparttosinglepart=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);if(a[0]instanceof h.A)return[(0,s.D)((0,o.Yq)(a[0]),t.spatialReference)];if(a[0]instanceof d.A)return[(0,s.D)((0,o.Yq)(a[0]),t.spatialReference)];const c=(0,m.rS)(await(0,l.C)("simplify",[a[0].toJSON()]));if(c instanceof A.A){const n=[],t=[];for(let e=0;e<c.rings.length;e++)if(c.isClockwise(c.rings[e])){const t=(0,m.rS)({rings:[c.rings[e]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(t)}else t.push({ring:c.rings[e],pt:c.getPoint(e,0)});for(let e=0;e<t.length;e++)for(let r=0;r<n.length;r++)if(n[r].contains(t[e].pt)){n[r].addRing(t[e].ring);break}return n}if(c instanceof S.A){const n=[];for(let t=0;t<c.paths.length;t++){const e=(0,m.rS)({paths:[c.paths[t]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(e)}return n}if(a[0]instanceof y.A){const n=[],e=(0,s.D)((0,o.Yq)(a[0]),t.spatialReference);for(let t=0;t<e.points.length;t++)n.push(e.getPoint(t));return n}return null})},n.functions.isselfintersecting=function(t,e){return n.standardFunctionAsync(t,e,async(n,t,e)=>{(0,s.B)(e,1,1,n,t);let r=(e=(0,s.C)(e))[0];if(((0,p.cy)(e[0])||(0,s.j)(e[0]))&&(r=(0,s.F)(e[0],n.spatialReference)),r instanceof y.A){const n=r.points;for(let t=0;t<n.length;t++)for(let e=t+1;e<n.length;e++)if((0,f.aI)(n[t],n[e]))return!0;return!1}return(r instanceof S.A||r instanceof A.A)&&await(0,l.C)("isSelfIntersecting",[r.toJSON()])})},n.functions.issimple=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return!0;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("isSimple",[a[0].toJSON()])})},n.functions.simplify=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)(await(0,l.C)("simplify",[a[0].toJSON()]))})},n.functions.convexhull=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)(await(0,l.C)("convexHull",[a[0].toJSON()]))})},n.functions.getuser=function(t,e){return n.standardFunctionAsync(t,e,async(n,o,u)=>{(0,s.B)(u,0,2,t,e);let l=(0,s.J)(u[1],""),f=!0===l;if(l=!0===l||!1===l?"":(0,s.s)(l),0===u.length||u[0]instanceof r.A){let n;n=t.services?.portal?t.services.portal:C.A.getDefault(),u.length>0&&(n=(0,c.R)(u[0],n));const e=await O(n,l,f);if(e){const n=JSON.parse(JSON.stringify(e));for(const t of["lastLogin","created","modified"])void 0!==n[t]&&null!==n[t]&&(n[t]=new Date(n[t]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(t))}return null}let d=null;if((0,s.m)(u[0])&&(d=u[0]),d){if(f=!1,l)return null;await d.load();const n=await d.getOwningSystemUrl();if(!n){if(!l){const n=await d.getIdentityUser();return n?a.A.convertObjectToArcadeDictionary({username:n},(0,s.K)(t)):null}return null}let e;e=t.services?.portal?t.services.portal:C.A.getDefault(),e=(0,c.R)(new r.A(n),e);const i=await O(e,l,f);if(i){const n=JSON.parse(JSON.stringify(i));for(const t of["lastLogin","created","modified"])void 0!==n[t]&&null!==n[t]&&(n[t]=new Date(n[t]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(t))}return null}throw new i.D$(t,"InvalidParameter",e)})},n.functions.nearestcoordinate=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,o)=>{if(o=(0,s.C)(o),(0,s.B)(o,2,2,t,e),!(o[0]instanceof w.A||null===o[0]))throw new i.D$(t,"InvalidParameter",e);if(!(o[1]instanceof h.A||null===o[1]))throw new i.D$(t,"InvalidParameter",e);if(null===o[0]||null===o[1])return null;const c=o[0]instanceof d.A?A.A.fromExtent(o[0]):o[0],u=await(0,l.C)("getNearestCoordinate",[c.toJSON(),o[1].toJSON(),{calculateLeftRightSide:!0}]);return null===u?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(u.coordinate),distance:u.distance,sideOfLine:0===u.distance?"straddle":u.isRightSide?"right":"left"},(0,s.K)(t),!1,!0)})},n.functions.nearestvertex=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,o)=>{if(o=(0,s.C)(o),(0,s.B)(o,2,2,t,e),!(o[0]instanceof w.A||null===o[0]))throw new i.D$(t,"InvalidParameter",e);if(!(o[1]instanceof h.A||null===o[1]))throw new i.D$(t,"InvalidParameter",e);if(null===o[0]||null===o[1])return null;const c=o[0]instanceof d.A?A.A.fromExtent(o[0]):o[0],u=await(0,l.C)("getNearestVertex",[c.toJSON(),o[1].toJSON()]);return null==u?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(u.coordinate),distance:u.distance,sideOfLine:u.sideOfLine},(0,s.K)(t),!1,!0)})})}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7367],{71163:(n,t,e)=>{e.d(t,{C:()=>c});var r=e(29953);let a,i,o=!1;function s(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then(n=>{i=n,o=!0,a=void 0})}async function c(n,t){return o?i.apply("invokeGeometryOp",[n,t]):(await s(),c(n,t))}},80672:(n,t,e)=>{e.d(t,{R:()=>a});var r=e(20655);function a(n,t){return null===n?t:new r.A({url:n.field("url")})}},87367:(n,t,e)=>{e.r(t),e.d(t,{registerFunctions:()=>J});var r=e(47609),a=e(66395),i=e(85935),o=e(78502),s=e(78878),c=e(80672),u=e(98919),l=e(71163),f=e(4576),d=e(5443),w=e(91075),y=e(48526),h=e(86738),A=e(39829),S=e(82799),m=e(65864),C=e(20655),N=e(70333),g=e(11254);async function O(n,t,e){const r=N.id?.findCredential(n.restUrl);if(!r)return null;if("loaded"===n.loadStatus&&""===t&&n.user?.sourceJSON&&!1===e)return n.user.sourceJSON;const a={responseType:"json",query:{f:"json"}};if(e&&(a.query.returnUserLicenseTypeExtensions=!0),""===t){const t=await(0,g.A)(n.restUrl+"/community/self",a);if(t.data){const n=t.data;if(n?.username)return n}return null}const i=await(0,g.A)(n.restUrl+"/community/users/"+t,a);if(i.data){const n=i.data;return n.error?null:n}return null}var p=e(54218);function v(n){if(null==n)return n;switch(typeof n){case"string":case"number":return n;default:throw new i.D$(null,"InvalidParameter",null)}}function J(n){"async"===n.mode&&(n.functions.disjoint=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]||null===a[1]||(0,l.C)("disjoint",[a[0].toJSON(),a[1].toJSON()])))},n.functions.intersects=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("intersects",[a[0].toJSON(),a[1].toJSON()])))},n.functions.touches=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("touches",[a[0].toJSON(),a[1].toJSON()])))},n.functions.crosses=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("crosses",[a[0].toJSON(),a[1].toJSON()])))},n.functions.within=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("within",[a[0].toJSON(),a[1].toJSON()])))},n.functions.contains=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("contains",[a[0].toJSON(),a[1].toJSON()])))},n.functions.overlaps=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null!==a[0]&&null!==a[1]&&(0,l.C)("overlaps",[a[0].toJSON(),a[1].toJSON()])))},n.functions.equals=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>((0,s.B)(a,2,2,t,e),a[0]===a[1]||(a[0]instanceof w.A&&a[1]instanceof w.A?(0,l.C)("equals",[a[0].toJSON(),a[1].toJSON()]):((0,s.e)(a[0])&&(0,s.e)(a[1])||!!((0,s.g)(a[0])&&(0,s.g)(a[1])||(0,s.f)(a[0])&&(0,s.f)(a[1])))&&a[0].equals(a[1]))))},n.functions.relate=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,3,3,t,e),a[0]instanceof w.A&&a[1]instanceof w.A)return(0,l.C)("relate",[a[0].toJSON(),a[1].toJSON(),(0,s.s)(a[2])]);if(a[0]instanceof w.A&&null===a[1])return!1;if(a[1]instanceof w.A&&null===a[0])return!1;if(null===a[0]&&null===a[1])return!1;throw new i.D$(t,"InvalidParameter",e)})},n.functions.intersection=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]||null===a[1]?null:(0,m.rS)(await(0,l.C)("intersection",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.union=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(0===(a=(0,s.C)(a)).length)throw new i.D$(t,"WrongNumberOfParameters",e);const c=[];if(1===a.length)if((0,p.cy)(a[0])){for(const n of(0,s.C)(a[0]))if(null!==n){if(!(n instanceof w.A))throw new i.D$(t,"InvalidParameter",e);c.push(n.toJSON())}}else{if(!(0,s.j)(a[0])){if(a[0]instanceof w.A)return(0,s.D)((0,o.Yq)(a[0]),t.spatialReference);if(null===a[0])return null;throw new i.D$(t,"InvalidParameter",e)}for(const n of(0,s.C)(a[0].toArray()))if(null!==n){if(!(n instanceof w.A))throw new i.D$(t,"InvalidParameter",e);c.push(n.toJSON())}}else for(const n of a)if(null!==n){if(!(n instanceof w.A))throw new i.D$(t,"InvalidParameter",e);c.push(n.toJSON())}return 0===c.length?null:(0,m.rS)(await(0,l.C)("union",[c]))})},n.functions.difference=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]?null:null===a[1]?(0,o.Yq)(a[0]):(0,m.rS)(await(0,l.C)("difference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.symmetricdifference=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>(a=(0,s.C)(a),(0,u.ZL)(a,t,e),null===a[0]&&null===a[1]?null:null===a[0]?(0,o.Yq)(a[1]):null===a[1]?(0,o.Yq)(a[0]):(0,m.rS)(await(0,l.C)("symmetricDifference",[a[0].toJSON(),a[1].toJSON()]))))},n.functions.clip=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,t,e),!(a[1]instanceof d.A)&&null!==a[1])throw new i.D$(t,"InvalidParameter",e);if(null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return null===a[1]?null:(0,m.rS)(await(0,l.C)("clip",[a[0].toJSON(),a[1].toJSON()]))})},n.functions.cut=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,2,t,e),!(a[1]instanceof S.A)&&null!==a[1])throw new i.D$(t,"InvalidParameter",e);if(null===a[0])return[];if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return null===a[1]?[(0,o.Yq)(a[0])]:(await(0,l.C)("cut",[a[0].toJSON(),a[1].toJSON()])).map(n=>(0,m.rS)(n))})},n.functions.area=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if((0,s.B)(a,1,2,t,e),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumArea(v(a[1]),null,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}let o=a[0];if(((0,p.cy)(o)||(0,s.j)(o))&&(o=(0,s.E)(a[0],t.spatialReference)),null===o)return 0;if(!(o instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("area",[o.toJSON(),v(a[1])])})},n.functions.areageodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{(0,s.B)(a,1,3,t,e);let o=(a=(0,s.C)(a))[0];((0,p.cy)(o)||(0,s.j)(o))&&(o=(0,s.E)(o,t.spatialReference));const c=v(a[1]),f=(0,u.rE)(a[2]);if((0,s.m)(o)){const n=await o.sumArea(c,f,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}if(null==o)return 0;if(!(0,s.h)(o))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("geodeticArea",[o.toJSON(),c,f])})},n.functions.length=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if((0,s.B)(a,1,2,t,e),a=(0,s.C)(a),(0,s.m)(a[0])){const n=await a[0].sumLength(v(a[1]),null,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}let o=a[0];if(((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(o=(0,s.F)(a[0],t.spatialReference)),null===o)return 0;if(!(o instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("length",[o.toJSON(),v(a[1])])})},n.functions.length3d=function(t,r){return n.standardFunctionAsync(t,r,async(n,a,o)=>{if((0,s.B)(o,1,2,t,r),null===(o=(0,s.C)(o))[0])return 0;let c=o[0];if(((0,p.cy)(o[0])||(0,s.j)(o[0]))&&(c=(0,s.F)(o[0],t.spatialReference)),null===c)return 0;if(!(c instanceof w.A))throw new i.D$(t,"InvalidParameter",r);if(!0===c.hasZ){const{convertFromSpatialReferenceUnit:n,toLengthUnit:t}=await Promise.resolve().then(e.bind(e,40547)),r=(0,u.UI)(c);return n(c.spatialReference,t(o[1]),r)}return(0,l.C)("length",[c.toJSON(),v(o[1])])})},n.functions.lengthgeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{(0,s.B)(a,1,3,t,e);let o=(a=(0,s.C)(a))[0];((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(o=(0,s.F)(a[0],t.spatialReference));const c=v(a[1]),f=(0,u.rE)(a[2]);if((0,s.m)(o)){const n=await o.sumLength(c,f,t.abortSignal);if(t.abortSignal.aborted)throw new i.D$(t,"Cancelled",e);return n}if(null===o)return 0;if(!(0,s.h)(o))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("geodeticLength",[o.toJSON(),c,f])})},n.functions.distance=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,3,t,e);let o=a[0];if(((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(o=(0,s.G)(a[0],t.spatialReference)),!(o instanceof w.A))throw new i.D$(t,"InvalidParameter",e);let c=a[1];if(((0,p.cy)(a[1])||(0,s.j)(a[1]))&&(c=(0,s.G)(a[1],t.spatialReference)),!(c instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("distance",[o.toJSON(),c.toJSON(),v(a[2])])})},n.functions.distancegeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,t,e);const o=a[0];if(!(o instanceof h.A))throw new i.D$(t,"InvalidParameter",e);const c=a[1];if(!(c instanceof h.A))throw new i.D$(t,"InvalidParameter",e);const f=new S.A({paths:[],spatialReference:o.spatialReference});return f.addPath([o,c]),(0,l.C)("geodeticLength",[f.toJSON(),v(a[2]),(0,u.rE)(a[3])])})},n.functions.densify=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const o=(0,s.r)(a[1]);if(isNaN(o))throw new i.D$(t,"InvalidParameter",e);if(o<=0)throw new i.D$(t,"InvalidParameter",e);switch(a[0].type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,l.C)("densify",[a[0].toJSON(),o,v(a[2])]));default:return a[0]}})},n.functions.densifygeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,t,e);const o=a[0];if(null==o)return null;if(!(0,s.h)(o))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);if(c<=0)throw new i.D$(t,"InvalidParameter",e);const f=v(a[2]),d=(0,u.rE)(a[3]);switch(o.type){case"polygon":case"polyline":case"extent":return(0,m.rS)(await(0,l.C)("geodeticDensify",[o.toJSON(),c,f,d]));default:return o}})},n.functions.generalize=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,4,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const o=(0,s.r)(a[1]);if(isNaN(o))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.H)((0,s.J)(a[2],!0));return(0,m.rS)(await(0,l.C)("generalize",[a[0].toJSON(),o,v(a[3]),{removeDegenerateParts:c}]))})},n.functions.buffer=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);return 0===c?(0,o.Yq)(a[0]):(0,m.rS)(await(0,l.C)("buffer",[a[0].toJSON(),c,v(a[2])]))})},n.functions.buffergeodetic=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,4,t,e);const c=a[0];if(null==c)return null;if(!(0,s.h)(c))throw new i.D$(t,"InvalidParameter",e);const f=(0,s.r)(a[1]);if(isNaN(f))throw new i.D$(t,"InvalidParameter",e);if(0===f)return(0,o.Yq)(c);const d=v(a[2]),w=(0,u.rE)(a[3]);return(0,m.rS)(await(0,l.C)("geodesicBuffer",[c.toJSON(),f,d,w]))})},n.functions.offset=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{a=(0,s.C)(a),(0,s.B)(a,2,6,t,e);const o=a[0];if(null===o)return null;if(!(o instanceof A.A||o instanceof S.A))throw new i.D$(t,"InvalidParameter",e);const c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);const f=a[2],d=(0,u.R$)(a[3]),w=(0,s.r)((0,s.J)(a[4],10));if(isNaN(w))throw new i.D$(t,"InvalidParameter",e);const y=(0,s.r)((0,s.J)(a[5],0));if(isNaN(y))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)(await(0,l.C)("offset",[o.toJSON(),c,v(f),d,w,y]))})},n.functions.rotate=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,2,3,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);const o=a[0]instanceof d.A?A.A.fromExtent(a[0]):a[0],c=(0,s.r)(a[1]);if(isNaN(c))throw new i.D$(t,"InvalidParameter",e);const u=(0,s.J)(a[2],null);if(null===u){const n="point"===o.type?o:o.extent?.center;return(0,m.rS)(await(0,l.C)("rotate",[o.toJSON(),c,n?.x,n?.y]))}if(u instanceof h.A)return(0,m.rS)(await(0,l.C)("rotate",[o.toJSON(),c,u.x,u.y]));throw new i.D$(t,"InvalidParameter",e)})},n.functions.centroid=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,2,t,e),null===a[0])return null;const o=(0,u.Hz)(a[1]);let c=a[0];if(((0,p.cy)(a[0])||(0,s.j)(a[0]))&&(c="geometric"===o?(0,s.G)(a[0],t.spatialReference):(0,s.E)(a[0],t.spatialReference),null===c))return null;if(!(c instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)("geometric"===o?await(0,l.C)("centroid",[c.toJSON()]):await(0,l.C)("labelPoint",[c.toJSON()]))})},n.functions.measuretocoordinate=function(t,e){return n.standardFunctionAsync(t,e,u.Cd)},n.functions.pointtocoordinate=function(t,e){return n.standardFunctionAsync(t,e,u.kr)},n.functions.distancetocoordinate=function(t,e){return n.standardFunctionAsync(t,e,u.Bn)},n.functions.multiparttosinglepart=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);if(a[0]instanceof h.A)return[(0,s.D)((0,o.Yq)(a[0]),t.spatialReference)];if(a[0]instanceof d.A)return[(0,s.D)((0,o.Yq)(a[0]),t.spatialReference)];const c=(0,m.rS)(await(0,l.C)("simplify",[a[0].toJSON()]));if(c instanceof A.A){const n=[],t=[];for(let e=0;e<c.rings.length;e++)if(c.isClockwise(c.rings[e])){const t=(0,m.rS)({rings:[c.rings[e]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(t)}else t.push({ring:c.rings[e],pt:c.getPoint(e,0)});for(let e=0;e<t.length;e++)for(let r=0;r<n.length;r++)if(n[r].contains(t[e].pt)){n[r].addRing(t[e].ring);break}return n}if(c instanceof S.A){const n=[];for(let t=0;t<c.paths.length;t++){const e=(0,m.rS)({paths:[c.paths[t]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});n.push(e)}return n}if(a[0]instanceof y.A){const n=[],e=(0,s.D)((0,o.Yq)(a[0]),t.spatialReference);for(let t=0;t<e.points.length;t++)n.push(e.getPoint(t));return n}return null})},n.functions.isselfintersecting=function(t,e){return n.standardFunctionAsync(t,e,async(n,t,e)=>{(0,s.B)(e,1,1,n,t);let r=(e=(0,s.C)(e))[0];if(((0,p.cy)(e[0])||(0,s.j)(e[0]))&&(r=(0,s.F)(e[0],n.spatialReference)),r instanceof y.A){const n=r.points;for(let t=0;t<n.length;t++)for(let e=t+1;e<n.length;e++)if((0,f.aI)(n[t],n[e]))return!0;return!1}return(r instanceof S.A||r instanceof A.A)&&await(0,l.C)("isSelfIntersecting",[r.toJSON()])})},n.functions.issimple=function(t,e){return n.standardFunctionAsync(t,e,(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return!0;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,l.C)("isSimple",[a[0].toJSON()])})},n.functions.simplify=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)(await(0,l.C)("simplify",[a[0].toJSON()]))})},n.functions.convexhull=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,a)=>{if(a=(0,s.C)(a),(0,s.B)(a,1,1,t,e),null===a[0])return null;if(!(a[0]instanceof w.A))throw new i.D$(t,"InvalidParameter",e);return(0,m.rS)(await(0,l.C)("convexHull",[a[0].toJSON()]))})},n.functions.getuser=function(t,e){return n.standardFunctionAsync(t,e,async(n,o,u)=>{(0,s.B)(u,0,2,t,e);let l=(0,s.J)(u[1],""),f=!0===l;if(l=!0===l||!1===l?"":(0,s.s)(l),0===u.length||u[0]instanceof r.A){let n;n=t.services?.portal?t.services.portal:C.A.getDefault(),u.length>0&&(n=(0,c.R)(u[0],n));const e=await O(n,l,f);if(e){const n=JSON.parse(JSON.stringify(e));for(const t of["lastLogin","created","modified"])void 0!==n[t]&&null!==n[t]&&(n[t]=new Date(n[t]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(t))}return null}let d=null;if((0,s.m)(u[0])&&(d=u[0]),d){if(f=!1,l)return null;await d.load();const n=await d.getOwningSystemUrl();if(!n){if(!l){const n=await d.getIdentityUser();return n?a.A.convertObjectToArcadeDictionary({username:n},(0,s.K)(t)):null}return null}let e;e=t.services?.portal?t.services.portal:C.A.getDefault(),e=(0,c.R)(new r.A(n),e);const i=await O(e,l,f);if(i){const n=JSON.parse(JSON.stringify(i));for(const t of["lastLogin","created","modified"])void 0!==n[t]&&null!==n[t]&&(n[t]=new Date(n[t]));return a.A.convertObjectToArcadeDictionary(n,(0,s.K)(t))}return null}throw new i.D$(t,"InvalidParameter",e)})},n.functions.nearestcoordinate=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,o)=>{if(o=(0,s.C)(o),(0,s.B)(o,2,2,t,e),!(o[0]instanceof w.A||null===o[0]))throw new i.D$(t,"InvalidParameter",e);if(!(o[1]instanceof h.A||null===o[1]))throw new i.D$(t,"InvalidParameter",e);if(null===o[0]||null===o[1])return null;const c=o[0]instanceof d.A?A.A.fromExtent(o[0]):o[0],u=await(0,l.C)("getNearestCoordinate",[c.toJSON(),o[1].toJSON(),{calculateLeftRightSide:!0}]);return null===u?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(u.coordinate),distance:u.distance,sideOfLine:0===u.distance?"straddle":u.isRightSide?"right":"left"},(0,s.K)(t),!1,!0)})},n.functions.nearestvertex=function(t,e){return n.standardFunctionAsync(t,e,async(n,r,o)=>{if(o=(0,s.C)(o),(0,s.B)(o,2,2,t,e),!(o[0]instanceof w.A||null===o[0]))throw new i.D$(t,"InvalidParameter",e);if(!(o[1]instanceof h.A||null===o[1]))throw new i.D$(t,"InvalidParameter",e);if(null===o[0]||null===o[1])return null;const c=o[0]instanceof d.A?A.A.fromExtent(o[0]):o[0],u=await(0,l.C)("getNearestVertex",[c.toJSON(),o[1].toJSON()]);return null==u?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,m.rS)(u.coordinate),distance:u.distance,sideOfLine:u.sideOfLine},(0,s.K)(t),!1,!0)})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[588,7548,8207],{4146:(e,t,i)=>{i.d(t,{A:()=>v});var r=i(31635),s=i(11254),n=i(49186),a=i(65529),l=i(4902),o=i(92474),h=i(53966),u=i(74887),c=i(84952),d=i(91429),p=i(5443),y=i(16930),f=i(92602),g=i(79677);let m=0,v=class extends((0,a.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([i.e(812),i.e(5613),i.e(5710)]).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",s=i?.portal?.url||f.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,d.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r.Cg)([(0,d.MZ)({type:p.A})],v.prototype,"fullExtent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r.Cg)([(0,d.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r.Cg)([(0,d.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,d.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,r.Cg)([(0,d.MZ)({type:String})],v.prototype,"title",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r.Cg)([(0,d.MZ)()],v.prototype,"url",void 0),(0,r.Cg)([(0,d.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r.Cg)([(0,d.$K)("esri.layers.Layer")],v)},4902:(e,t,i)=>{i.d(t,{s:()=>a});var r=i(31635),s=i(64108);let n=0;const a=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable")],i),i};a(class{})},8303:(e,t,i)=>{i.d(t,{A:()=>b});var r=i(31635),s=i(92602),n=i(70333),a=i(11254),l=i(60999),o=i(49186),h=i(53966),u=i(97768),c=i(74887),d=i(84952),p=i(91429),y=i(77548),f=i(20655),g=i(80812),m=i(41318),v=i(10407),_=i(36005),w=i(43937);const b=e=>{const t=e;let b=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,c.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||h.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,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let a,l;if(s)a=i.portal.url;else try{a=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!a||!(0,d.b8)(a,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const o=!0,h=!1,u=!1;if(!l)return{features:{edit:o,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new g.default({id:e,portal:{url:a}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,c.QP)(e)}return{features:{edit:o,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,v.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.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 i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=f.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;const o=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,l.Ke)((0,a.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?m.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.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,r.Cg)([(0,p.MZ)({type:g.default})],b.prototype,"portalItem",null),(0,r.Cg)([(0,_.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,r.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,r.Cg)([(0,p.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,r.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],b),b},C={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>u,Y:()=>l,bK:()=>o,mm:()=>d,sQ:()=>c});var r=i(91218),s=i(16930),n=i(28735);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,d.HOSTED_SERVICE)}function h(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?a(e,t):h(e,t)}async function c(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={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 p(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},16215:(e,t,i)=>{i.d(t,{S:()=>s,Y:()=>r});const r=Symbol("BasemapInstance");function s(e){return null!=e&&"object"==typeof e&&r in e}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(31635),s=i(53966),n=i(91429),a=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],i),i}},25943:(e,t,i)=>{i.d(t,{d:()=>M});var r,s=i(31635),n=i(11254),a=i(69622),l=i(49186),o=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(74887),d=i(36708),p=i(76030),y=i(84952),f=i(91429),g=i(72802),m=i(4718),v=i(69397),_=i(34275);class w{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));const r=this.location.width,s=this.location.height;let n=!0,a=!0;const o=function(e,t=!1){return e<=_.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*s/32));let h=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[h]|=1<<t):n=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,n=this._availability;return s<0||s>n.length?"unknown":n[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:r,col:s,width:a,height:o}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:a,height:o},valid:!0,data:new Array(a*o).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:o}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let M=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof w){const s=r.getAvailability(t,i);if("unavailable"===s)throw C(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;const n=this.layer.tileInfo;n.updateTileInfo(r);const a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,n){if(!this._prefetchingEnabled)return;const a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;const l=new AbortController;n.then(()=>l.abort(),()=>l.abort());let h=!1;const u=(0,o.hA)(()=>{h||(h=!0,l.abort())});if(this.addHandles(u,a),await(0,p.md)(10,l.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,c.G4)(l))return;const d=new g.U(e,t,i),y={...s,signal:l.signal},f=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&f.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,y);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,s);if(n)return Promise.resolve(n);const a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(a,()=>t((0,c.NK)()));const i=b(s);let n=this._pendingTilemapRequests[i];if(!n){n=w.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,y.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const s=b(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=r=(0,s.Cg)([(0,f.$K)("esri.layers.support.TilemapCache")],M)},35982:(e,t,i)=>{i.d(t,{B:()=>o});var r=i(4576),s=i(36563),n=i(53966),a=i(74887),l=i(83027);class o{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,l.h)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function h(){}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>f,Vh:()=>g,on:()=>c,pc:()=>m,wB:()=>o,z7:()=>h});var r=i(37955),s=i(36563),n=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return u(e,t,i,p)}function h(e,t,i={}){return u(e,t,i,y)}function u(e,t,i={},r){let s=null;const a=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return s}function c(e,t,i,a={}){let l=null,h=null,u=null;function c(){l&&h&&(h.remove(),a.onListenerRemove?.(l),l=null,h=null)}function d(e){a.once&&a.once&&(0,n.xt)(u),i(e)}const p=o(e,(e,i)=>{c(),(0,r.wb)(e)&&(l=e,h=(0,r.on)(e,t,d),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return u=(0,s.hA)(()=>{p.remove(),c()}),u}function d(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,n.xt)(l)}return new Promise((r,n)=>{l=(0,s.vE)([(0,a.u7)(i,()=>{o(),n((0,a.NK)())}),u(e,e=>{o(),r(e)},{sync:!1,once:!0},t??p)])})}(e,y,t)}function p(e){return!0}function y(e){return!!e}i(80559);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},54239:(e,t,i)=>{i.d(t,{A:()=>g});var r,s=i(31635),n=i(4576),a=i(66552),l=i(25482),o=i(86211),h=i(67076),u=i(91429),c=i(43937),d=i(36005);const p=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=p.jsonValues.slice();(0,n.Xy)(y,"orthometric");const f=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends l.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return p.write(e,t,i)}readHeightModel(e,t,i){return p.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,o.LA)(e)||f.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,o.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,s.Cg)([(0,c.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,s.Cg)([(0,d.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s.Cg)([(0,d.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,s.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],g)},60999:(e,t,i)=>{i.d(t,{DZ:()=>y,Ke:()=>p,Tj:()=>u,UT:()=>f,aD:()=>m,jJ:()=>h});var r=i(31635),s=i(69622),n=i(97768),a=i(74887),l=i(10107),o=i(64108);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function y(e){try{return c(await e)}catch(e){return(0,a.QP)(e),d(e)}}function f(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,l.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,l.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],g);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},66344:(e,t,i)=>{i.d(t,{q:()=>l});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,a){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==i&&this._notifyRemove(t,l.entry,l.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const o=1+Math.max(a,-4)- -3;this._db.set(t,new n(i,s,o)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,l]of this._db)if(0===l.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,l,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>A});var r=i(31635),s=i(11254),n=i(49186),a=i(97768),l=i(25728),o=i(74887),h=i(84952),u=i(91429),c=i(54239),d=i(4146),p=i(89186),y=i(18768),f=i(16131),g=i(8303),m=i(10873);class v{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var _=i(35982);class w extends _.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(b.forEach((e,t)=>{e===this&&b.delete(t)}),this.destroy())}}const b=new Map;var C=i(36005);let M=class extends((0,p.f)((0,y.b)((0,f.q)((0,g.A)((0,l.P)(d.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=b.get(e);return t||(null!=e?(t=new w(t=>e.immediate.schedule(t)),b.set(e,t)):(t=new w,b.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(o.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,a={responseType:"array-buffer",signal:n},l={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),a)).then(e=>this._lercDecoder.decode(e.data,l,n)).then(e=>new v(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{query:r}=await i.e(4375).then(i.bind(i,94375));return(0,o.Te)(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await i.e(4375).then(i.bind(i,94375));return(0,o.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[S]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,type:c.A})],M.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)(m.OZ)],M.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"version",void 0),(0,r.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r.Cg)([(0,u.$K)("esri.layers.ElevationLayer")],M);const S=Symbol("default-fetch-tile");M.prototype.fetchTile[S]=!0;const A=M},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>l,RS:()=>n,ez:()=>d,lM:()=>a,qK:()=>c});var r=i(34275);function s(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=o(e[i],!1));return t}function l(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=d;for(let r=0;r<t;r++)i+=o(e[r]);return i}(e);let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=o(e[i]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?l(e):c;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return d+e.length*t}const c=32,d=16,p=145},69540:(e,t,i)=>{i.d(t,{OU:()=>u,Pw:()=>c});var r=i(31635),s=i(69622),n=(i(44208),i(4718)),a=(i(53966),i(97768)),l=i(88620),o=i(64108);const h=Symbol("ClonableMixin"),u=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,l.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},o=new Map;for(const t in i){const a=i[t],l=r?.originOf(t),h=a.clonable;if(a.readOnly||!1===h||7!==l&&0!==l&&5!==l&&4!==l)continue;const u=this[t];let c=null;if("function"==typeof h)c=h(u,e);else if("reference"===h)c=u;else if(c=(0,n.TU)(u,e),null!=u&&null==c)continue;0===l?o.set(t,c):s[t]=c}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(o.size){const e=(0,l.oY)(h)?.store;if(e)for(const[t,i]of o)e.set(t,i,0)}return h}};return s=(0,r.Cg)([(0,o.$)("esri.core.Clonable")],s),s},c=u(s.A)},77548:(e,t,i)=>{i.d(t,{Gh:()=>m,tk:()=>p,BR:()=>d,wI:()=>c,G$:()=>f,$x:()=>y,Ov:()=>o,UC:()=>n,W_:()=>h,OP:()=>g,TU:()=>l,XX:()=>a,jy:()=>u});var r=i(70333),s=i(11254);function n(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}i(7762),i(84952),i(36563),i(36708),i(4146),new WeakMap,i(16215);const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function l(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function h(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function c(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.slice(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function y(e,t){return null}function f(e){return null}function g(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function m(e,t){if(!t||!g(e))return;const i=(e.url,null);i&&(e.url=i)}},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},79677:(e,t,i)=>{i.d(t,{A:()=>c});var r,s=i(31635),n=i(25482),a=i(88930),l=i(91429),o=i(98623),h=i(36005),u=i(43937);let c=class extends n.o{static{r=this}static get allTime(){return d}static get empty(){return p}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=o.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,a.lL)(i,e,t));let s=this.end;if(s){const i=(0,a.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,a.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let a,l;return s>=t&&s<=i?a=s:t>=s&&t<=n&&(a=t),i>=s&&i<=n?l=i:n>=t&&n<=i&&(l=n),null==a||null==l||isNaN(a)||isNaN(l)?r.empty:new r({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,i=o.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:l}=this;return null!=n&&(s.start=(0,a.S1)(n,e,t,i)),null!=l&&(s.end=(0,a.S1)(l,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s.Cg)([(0,h.w)("end")],c.prototype,"readEnd",null),(0,s.Cg)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s.Cg)([(0,h.w)("start")],c.prototype,"readStart",null),(0,s.Cg)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,s.Cg)([(0,l.$K)("esri.time.TimeExtent")],c);const d=new c,p=new c({start:void 0,end:void 0})},83027:(e,t,i)=>{i.d(t,{h:()=>r});const r=i(29953).ho},89186:(e,t,i)=>{i.d(t,{f:()=>u});var r=i(31635),s=i(91429),n=i(16930),a=i(87045),l=i(65509),o=i(25943),h=i(36005);const u=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const r=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:n,minScale:h,maxScale:u}=t;if(null==s&&null==n&&(0!==h||0!==u)){const e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=h?i.level:s,n=t>=u?i.level:n}}if(r)return new o.d({layer:this,minLOD:s,maxLOD:n});if(t.tileInfo){const e=new a.A;return e.read(t.tileInfo,i),new l.A(e,s,n)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:n.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[588,7548,8207],{4146:(e,t,i)=>{i.d(t,{A:()=>v});var r=i(31635),s=i(11254),n=i(49186),a=i(65529),l=i(4902),o=i(92474),h=i(53966),u=i(74887),c=i(84952),d=i(91429),p=i(5443),y=i(16930),f=i(92602),g=i(79677);let m=0,v=class extends((0,a.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([i.e(812),i.e(5613),i.e(5710)]).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",s=i?.portal?.url||f.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,d.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r.Cg)([(0,d.MZ)({type:p.A})],v.prototype,"fullExtent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r.Cg)([(0,d.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r.Cg)([(0,d.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,d.MZ)({type:y.A})],v.prototype,"spatialReference",void 0),(0,r.Cg)([(0,d.MZ)({type:String})],v.prototype,"title",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r.Cg)([(0,d.MZ)()],v.prototype,"url",void 0),(0,r.Cg)([(0,d.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r.Cg)([(0,d.$K)("esri.layers.Layer")],v)},4902:(e,t,i)=>{i.d(t,{s:()=>a});var r=i(31635),s=i(64108);let n=0;const a=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable")],i),i};a(class{})},8303:(e,t,i)=>{i.d(t,{A:()=>b});var r=i(31635),s=i(92602),n=i(70333),a=i(11254),l=i(60999),o=i(49186),h=i(53966),u=i(97768),c=i(74887),d=i(84952),p=i(91429),y=i(77548),f=i(20655),g=i(80812),m=i(41318),v=i(10407),_=i(36005),w=i(43937);const b=e=>{const t=e;let b=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,c.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||h.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,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let a,l;if(s)a=i.portal.url;else try{a=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!a||!(0,d.b8)(a,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const o=!0,h=!1,u=!1;if(!l)return{features:{edit:o,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new g.default({id:e,portal:{url:a}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,c.QP)(e)}return{features:{edit:o,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,v.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.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 i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=f.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;const o=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,l.Ke)((0,a.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?m.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.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,r.Cg)([(0,p.MZ)({type:g.default})],b.prototype,"portalItem",null),(0,r.Cg)([(0,_.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,r.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,r.Cg)([(0,p.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,r.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],b),b},C={credential:null,user:null}},10407:(e,t,i)=>{i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>u,Y:()=>l,bK:()=>o,mm:()=>d,sQ:()=>c});var r=i(91218),s=i(16930),n=i(28735);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,d.HOSTED_SERVICE)}function h(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?a(e,t):h(e,t)}async function c(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={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 p(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},16215:(e,t,i)=>{i.d(t,{S:()=>s,Y:()=>r});const r=Symbol("BasemapInstance");function s(e){return null!=e&&"object"==typeof e&&r in e}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(31635),s=i(53966),n=i(91429),a=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],i),i}},25943:(e,t,i)=>{i.d(t,{d:()=>M});var r,s=i(31635),n=i(11254),a=i(69622),l=i(49186),o=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(74887),d=i(36708),p=i(76030),y=i(84952),f=i(91429),g=i(72802),m=i(4718),v=i(69397),_=i(34275);class w{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));const r=this.location.width,s=this.location.height;let n=!0,a=!0;const o=function(e,t=!1){return e<=_.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*s/32));let h=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[h]|=1<<t):n=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,n=this._availability;return s<0||s>n.length?"unknown":n[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:r,col:s,width:a,height:o}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:a,height:o},valid:!0,data:new Array(a*o).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:o}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let M=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof w){const s=r.getAvailability(t,i);if("unavailable"===s)throw C(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;const n=this.layer.tileInfo;n.updateTileInfo(r);const a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,n){if(!this._prefetchingEnabled)return;const a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;const l=new AbortController;n.then(()=>l.abort(),()=>l.abort());let h=!1;const u=(0,o.hA)(()=>{h||(h=!0,l.abort())});if(this.addHandles(u,a),await(0,p.md)(10,l.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,c.G4)(l))return;const d=new g.U(e,t,i),y={...s,signal:l.signal},f=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&f.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,y);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,s);if(n)return Promise.resolve(n);const a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(a,()=>t((0,c.NK)()));const i=b(s);let n=this._pendingTilemapRequests[i];if(!n){n=w.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,y.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const s=b(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,s.Cg)([(0,f.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=r=(0,s.Cg)([(0,f.$K)("esri.layers.support.TilemapCache")],M)},35982:(e,t,i)=>{i.d(t,{B:()=>o});var r=i(4576),s=i(36563),n=i(53966),a=i(74887),l=i(83027);class o{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,l.h)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function h(){}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>f,Vh:()=>g,on:()=>c,pc:()=>m,wB:()=>o,z7:()=>h});var r=i(37955),s=i(36563),n=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return u(e,t,i,p)}function h(e,t,i={}){return u(e,t,i,y)}function u(e,t,i={},r){let s=null;const a=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return s}function c(e,t,i,a={}){let l=null,h=null,u=null;function c(){l&&h&&(h.remove(),a.onListenerRemove?.(l),l=null,h=null)}function d(e){a.once&&a.once&&(0,n.xt)(u),i(e)}const p=o(e,(e,i)=>{c(),(0,r.wb)(e)&&(l=e,h=(0,r.on)(e,t,d),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return u=(0,s.hA)(()=>{p.remove(),c()}),u}function d(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,n.xt)(l)}return new Promise((r,n)=>{l=(0,s.vE)([(0,a.u7)(i,()=>{o(),n((0,a.NK)())}),u(e,e=>{o(),r(e)},{sync:!1,once:!0},t??p)])})}(e,y,t)}function p(e){return!0}function y(e){return!!e}i(80559);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},54239:(e,t,i)=>{i.d(t,{A:()=>g});var r,s=i(31635),n=i(4576),a=i(66552),l=i(25482),o=i(86211),h=i(67076),u=i(91429),c=i(43937),d=i(36005);const p=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=p.jsonValues.slice();(0,n.Xy)(y,"orthometric");const f=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends l.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return p.write(e,t,i)}readHeightModel(e,t,i){return p.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,o.LA)(e)||f.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,o.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,s.Cg)([(0,c.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,s.Cg)([(0,d.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s.Cg)([(0,d.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,s.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],g)},60999:(e,t,i)=>{i.d(t,{DZ:()=>y,Ke:()=>p,Tj:()=>u,UT:()=>f,aD:()=>m,jJ:()=>h});var r=i(31635),s=i(69622),n=i(97768),a=i(74887),l=i(10107),o=i(64108);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function y(e){try{return c(await e)}catch(e){return(0,a.QP)(e),d(e)}}function f(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,l.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,l.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,l.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],g);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},66344:(e,t,i)=>{i.d(t,{q:()=>l});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,a){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==i&&this._notifyRemove(t,l.entry,l.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const o=1+Math.max(a,-4)- -3;this._db.set(t,new n(i,s,o)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,l]of this._db)if(0===l.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,l,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>A});var r=i(31635),s=i(11254),n=i(49186),a=i(97768),l=i(25728),o=i(74887),h=i(84952),u=i(91429),c=i(54239),d=i(4146),p=i(89186),y=i(18768),f=i(16131),g=i(8303),m=i(10873);class v{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var _=i(35982);class w extends _.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(b.forEach((e,t)=>{e===this&&b.delete(t)}),this.destroy())}}const b=new Map;var C=i(36005);let M=class extends((0,p.f)((0,y.b)((0,f.q)((0,g.A)((0,l.P)(d.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=b.get(e);return t||(null!=e?(t=new w(t=>e.immediate.schedule(t)),b.set(e,t)):(t=new w,b.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(o.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,a={responseType:"array-buffer",signal:n},l={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),a)).then(e=>this._lercDecoder.decode(e.data,l,n)).then(e=>new v(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{query:r}=await i.e(4375).then(i.bind(i,94375));return(0,o.Te)(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await i.e(4375).then(i.bind(i,94375));return(0,o.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[S]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,type:c.A})],M.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)(m.OZ)],M.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"version",void 0),(0,r.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r.Cg)([(0,u.$K)("esri.layers.ElevationLayer")],M);const S=Symbol("default-fetch-tile");M.prototype.fetchTile[S]=!0;const A=M},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>l,RS:()=>n,Ul:()=>y,ez:()=>d,lM:()=>a,qK:()=>c});var r=i(34275);function s(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=o(e[i],!1));return t}function l(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=d;for(let r=0;r<t;r++)i+=o(e[r]);return i}(e);let t=c;for(const i in e)e.hasOwnProperty(i)&&(t+=o(e[i]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?l(e):c;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return d+e.length*t}const c=32,d=16,p=145,y=64},69540:(e,t,i)=>{i.d(t,{OU:()=>u,Pw:()=>c});var r=i(31635),s=i(69622),n=(i(44208),i(4718)),a=(i(53966),i(97768)),l=i(88620),o=i(64108);const h=Symbol("ClonableMixin"),u=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,l.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},o=new Map;for(const t in i){const a=i[t],l=r?.originOf(t),h=a.clonable;if(a.readOnly||!1===h||7!==l&&0!==l&&5!==l&&4!==l)continue;const u=this[t];let c=null;if("function"==typeof h)c=h(u,e);else if("reference"===h)c=u;else if(c=(0,n.TU)(u,e),null!=u&&null==c)continue;0===l?o.set(t,c):s[t]=c}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(o.size){const e=(0,l.oY)(h)?.store;if(e)for(const[t,i]of o)e.set(t,i,0)}return h}};return s=(0,r.Cg)([(0,o.$)("esri.core.Clonable")],s),s},c=u(s.A)},77548:(e,t,i)=>{i.d(t,{Gh:()=>m,tk:()=>p,BR:()=>d,wI:()=>c,G$:()=>f,$x:()=>y,Ov:()=>o,UC:()=>n,W_:()=>h,OP:()=>g,TU:()=>l,XX:()=>a,jy:()=>u});var r=i(70333),s=i(11254);function n(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}i(7762),i(84952),i(36563),i(36708),i(4146),new WeakMap,i(16215);const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function l(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function h(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function c(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.slice(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function y(e,t){return null}function f(e){return null}function g(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function m(e,t){if(!t||!g(e))return;const i=(e.url,null);i&&(e.url=i)}},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},79677:(e,t,i)=>{i.d(t,{A:()=>c});var r,s=i(31635),n=i(25482),a=i(88930),l=i(91429),o=i(98623),h=i(36005),u=i(43937);let c=class extends n.o{static{r=this}static get allTime(){return d}static get empty(){return p}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=o.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,a.lL)(i,e,t));let s=this.end;if(s){const i=(0,a.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,a.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let a,l;return s>=t&&s<=i?a=s:t>=s&&t<=n&&(a=t),i>=s&&i<=n?l=i:n>=t&&n<=i&&(l=n),null==a||null==l||isNaN(a)||isNaN(l)?r.empty:new r({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,i=o.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:l}=this;return null!=n&&(s.start=(0,a.S1)(n,e,t,i)),null!=l&&(s.end=(0,a.S1)(l,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s.Cg)([(0,h.w)("end")],c.prototype,"readEnd",null),(0,s.Cg)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s.Cg)([(0,h.w)("start")],c.prototype,"readStart",null),(0,s.Cg)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,s.Cg)([(0,l.$K)("esri.time.TimeExtent")],c);const d=new c,p=new c({start:void 0,end:void 0})},83027:(e,t,i)=>{i.d(t,{h:()=>r});const r=i(29953).ho},89186:(e,t,i)=>{i.d(t,{f:()=>u});var r=i(31635),s=i(91429),n=i(16930),a=i(87045),l=i(65509),o=i(25943),h=i(36005);const u=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const r=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:n,minScale:h,maxScale:u}=t;if(null==s&&null==n&&(0!==h||0!==u)){const e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=h?i.level:s,n=t>=u?i.level:n}}if(r)return new o.d({layer:this,minLOD:s,maxLOD:n});if(t.tileInfo){const e=new a.A;return e.read(t.tileInfo,i),new l.A(e,s,n)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:n.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}}}]);