@arcgis/core 4.34.0-next.55 → 4.34.0-next.56

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 (118) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0a4586e596413ef7a4b5.js +1 -0
  4. package/assets/esri/core/workers/chunks/{62ade6f18b375795ddfd.js → 10b46438885916d18425.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1166ed298cf5ca7ad444.js +1 -0
  6. package/assets/esri/core/workers/chunks/13797036850dcc3671c3.js +1 -0
  7. package/assets/esri/core/workers/chunks/{c9c109d43a1e5160955d.js → 3490d47cac7c8dec70cd.js} +2 -2
  8. package/assets/esri/core/workers/chunks/43a56c8fa4e5be18c12a.js +1 -0
  9. package/assets/esri/core/workers/chunks/4b58da6cb91f7bf6af8b.js +1 -0
  10. package/assets/esri/core/workers/chunks/{cac060a187f3a27a19ba.js → 4d5abcf57a6ded4750ba.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{d0bf1fc6e3c198bc565d.js → 57486b18421a3c9690d0.js} +1 -1
  12. package/assets/esri/core/workers/chunks/5f518931a660b3c4f519.js +1 -0
  13. package/assets/esri/core/workers/chunks/66f3659ba18f92cd623e.js +1 -0
  14. package/assets/esri/core/workers/chunks/67355372ac5fd8a15d18.js +1 -0
  15. package/assets/esri/core/workers/chunks/{5691d504ffe5592bc40f.js → 6dc0009889f2b7cc8cff.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{4d2473e680324dc17cfa.js → 853b9f29b4d62fa621b9.js} +1 -1
  17. package/assets/esri/core/workers/chunks/855f25ce748aaef44b1a.js +1 -0
  18. package/assets/esri/core/workers/chunks/{71acded1b3c0057917a1.js → 862fe2f96d4b777ff5b8.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{fe5c37c69da3ec1e56ac.js → 8fa50cac57b6e1ecec76.js} +1 -1
  20. package/assets/esri/core/workers/chunks/9307108821d82c131654.js +1 -0
  21. package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +1 -0
  22. package/assets/esri/core/workers/chunks/{3b51b61a7b8a1ef87c9b.js → adf11d31f95481f89a55.js} +1 -1
  23. package/assets/esri/core/workers/chunks/af4412e79275c5a87539.js +1 -0
  24. package/assets/esri/core/workers/chunks/{7a8d740d1226719a578a.js → b457b7dd907f06278bee.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{81e518dd62bd95611d00.js → b47688e3263099540873.js} +1 -1
  26. package/assets/esri/core/workers/chunks/c91217d977a6baaee74a.js +1 -0
  27. package/assets/esri/core/workers/chunks/{e1b25b1ce3bd4f0f2cda.js → cb57cdff976d2d4b0b41.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{9fef330b241f958b55df.js → d0124b0dd62b331afe58.js} +1 -1
  29. package/assets/esri/core/workers/chunks/d3a7747f23e91d1f1b5e.js +1 -0
  30. package/assets/esri/core/workers/chunks/d3ae88fcde2d7fb3e2e2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{b6a201e86f9caef45ff0.js → d42fd0effc560eefb14b.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{4f8dab492331c9a2d67a.js → d87fdc64a5cc6be4bd69.js} +1 -1
  33. package/assets/esri/core/workers/chunks/db5d3feeb61ccb5ede98.js +1 -0
  34. package/assets/esri/core/workers/chunks/{aab349d4624b78ef429f.js → e6bf4f3f6868dc9028e3.js} +1 -1
  35. package/assets/esri/core/workers/chunks/f74b0cdc1c2b56bac5f0.js +1 -0
  36. package/assets/esri/core/workers/chunks/f807e7fc90e0e7ce6b67.js +1 -0
  37. package/assets/esri/core/workers/chunks/{fae6030a81cb91a91b69.js → faf4002f9547a0cc4e33.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{fe55833c80cf59df9c2b.js → ff42b24b48019a03d841.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{e10c5405f956b2cc59e4.js → ff4e15a872de94d2b438.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{ff7962063d132c1ec814.js → ff8a4bf1bceb362d67ab.js} +1 -1
  41. package/config.js +1 -1
  42. package/core/has.js +1 -1
  43. package/geometry/Multipoint.js +1 -1
  44. package/geometry/support/coordsUtils.js +1 -1
  45. package/geometry/support/extentUtils.js +1 -1
  46. package/graphic/KMLGraphicOrigin.js +5 -0
  47. package/graphic/isKMLGraphicOrigin.js +5 -0
  48. package/interfaces.d.ts +6 -3
  49. package/kernel.js +1 -1
  50. package/layers/KMLLayer.js +1 -1
  51. package/layers/SceneLayer.js +1 -1
  52. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  53. package/layers/support/ElevationQuery.js +1 -1
  54. package/layers/support/KMLSublayer.js +1 -1
  55. package/layers/support/featureReductionUtils.js +1 -1
  56. package/layers/support/kmlUtils.js +1 -1
  57. package/package.json +1 -1
  58. package/renderers/support/colorRampUtils.js +1 -1
  59. package/support/requestUtils.js +1 -1
  60. package/support/revision.js +1 -1
  61. package/views/2d/layers/KMLLayerView2D.js +1 -1
  62. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  63. package/views/3d/analysis/Viewshed/{ArrowManipulator.js → ViewshedArrowManipulator.js} +1 -1
  64. package/views/3d/analysis/Viewshed/{FieldOfViewManipulation.js → ViewshedFieldOfViewManipulation.js} +1 -1
  65. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +5 -0
  66. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +5 -0
  67. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  68. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +5 -0
  69. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  70. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  71. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  72. package/views/draw/DrawOperation.js +1 -1
  73. package/views/draw/MultipointDrawAction.js +1 -1
  74. package/views/draw/PointDrawAction.js +1 -1
  75. package/views/draw/PolygonDrawAction.js +1 -1
  76. package/views/draw/PolylineDrawAction.js +1 -1
  77. package/views/draw/SegmentDrawAction.js +1 -1
  78. package/views/draw/support/Box.js +1 -1
  79. package/views/draw/support/GraphicMover.js +1 -1
  80. package/views/draw/support/Reshape.js +1 -1
  81. package/views/draw/support/drawUtils.js +1 -1
  82. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  83. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  84. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  85. package/views/interactive/editGeometry/operations/AppendVertex.js +1 -1
  86. package/views/interactive/tooltip/infos/SelectedVertexTooltipInfo.js +1 -1
  87. package/webscene/spec-certification/api.js +1 -1
  88. package/webscene/spec-certification/compare.js +1 -1
  89. package/webscene/spec-certification/spec.js +1 -1
  90. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  91. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  92. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  93. package/widgets/OrientedImageryViewer.js +1 -1
  94. package/widgets/Sketch/SketchViewModel.js +1 -1
  95. package/widgets/Sketch/support/sketchUtils.js +1 -1
  96. package/assets/esri/core/workers/chunks/02902303e5585a16ebea.js +0 -1
  97. package/assets/esri/core/workers/chunks/0445de3a8968c0734c91.js +0 -1
  98. package/assets/esri/core/workers/chunks/09268dc856c3d5ce178f.js +0 -1
  99. package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +0 -1
  100. package/assets/esri/core/workers/chunks/17776d9d3558d45ea7b5.js +0 -1
  101. package/assets/esri/core/workers/chunks/1cbd59918c60a1a21494.js +0 -1
  102. package/assets/esri/core/workers/chunks/252ee00fd6c4ae0ee7fa.js +0 -1
  103. package/assets/esri/core/workers/chunks/3800764932a1c32cb29f.js +0 -1
  104. package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +0 -1
  105. package/assets/esri/core/workers/chunks/772e81e9162e2240a7a6.js +0 -1
  106. package/assets/esri/core/workers/chunks/8c81156b1605a16acc29.js +0 -1
  107. package/assets/esri/core/workers/chunks/8f6ff09e7d2f01b79faf.js +0 -1
  108. package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +0 -1
  109. package/assets/esri/core/workers/chunks/a7530dcb08b43e37bbb2.js +0 -1
  110. package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +0 -1
  111. package/assets/esri/core/workers/chunks/d1842745a7699879a1e1.js +0 -1
  112. package/assets/esri/core/workers/chunks/d578c3880eaf2dd62324.js +0 -1
  113. package/assets/esri/core/workers/chunks/de499e33035b56b6697d.js +0 -1
  114. package/assets/esri/core/workers/chunks/e04951ee32f041faaeca.js +0 -1
  115. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +0 -5
  116. package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +0 -5
  117. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +0 -5
  118. /package/assets/esri/core/workers/chunks/{c9c109d43a1e5160955d.js.LICENSE.txt → 3490d47cac7c8dec70cd.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(7985)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(7937),t.e(7005),t.e(6445),t.e(6298),t.e(3546),t.e(1624)]).then(t.bind(t,53892))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(5964)]).then(t.bind(t,68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(4111),t.e(8506),t.e(364),t.e(8628),t.e(2593),t.e(2696),t.e(3549)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9953),t.e(9186),t.e(3340)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(2236)]).then(t.bind(t,29784))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(6131),t.e(4447)]).then(t.bind(t,36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(8766)]).then(t.bind(t,15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(2157)]).then(t.bind(t,85582))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(2165),t.e(8256)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(9953),t.e(1956),t.e(364),t.e(1427),t.e(8106),t.e(4990)]).then(t.bind(t,58434))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(9953),t.e(1427),t.e(6049),t.e(8106),t.e(7677),t.e(5943)]).then(t.bind(t,35943))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(7196),t.e(1312)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(6298),t.e(7196),t.e(6894)]).then(t.bind(t,74660))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1863)]).then(t.bind(t,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(708),t.e(3029),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(7213),t.e(9171),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(7937),t.e(7721),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(708),t.e(3029),t.e(8368),t.e(4649),t.e(217),t.e(2568),t.e(7213),t.e(9171),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(4111),t.e(364),t.e(3249),t.e(7656),t.e(2042)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(7213),t.e(8110)]).then(t.bind(t,96299))).default,MediaLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(2763)]).then(t.bind(t,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(3029),t.e(6445),t.e(9936),t.e(4224)]).then(t.bind(t,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9344),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(9784),t.e(9361),t.e(4151)]).then(t.bind(t,9352))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(6742)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(217),t.e(979)]).then(t.bind(t,64185))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(7937),t.e(7005),t.e(6445),t.e(6298),t.e(3546),t.e(1395)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(3029),t.e(73)]).then(t.bind(t,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1956),t.e(4796),t.e(4111),t.e(8506),t.e(6731)]).then(t.bind(t,97483))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(1956),t.e(4796),t.e(708),t.e(4111),t.e(364),t.e(9186),t.e(3249),t.e(573)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(5897),t.e(2272)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await Promise.all([t.e(6131),t.e(3910),t.e(8096),t.e(6638),t.e(7732)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(7937),t.e(7721),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(6183)]).then(t.bind(t,16183))).default,WCSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(9953),t.e(1427),t.e(6049),t.e(8106),t.e(7677),t.e(9547)]).then(t.bind(t,19547))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(8096),t.e(6638),t.e(13),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(9110)]).then(t.bind(t,21901))).default,WMSLayer:async()=>(await Promise.all([t.e(7330),t.e(6131),t.e(8219),t.e(8948),t.e(3910),t.e(6638),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9344),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9344)]).then(t.bind(t,47314))).default}},22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},23154:(e,a,t)=>{t.d(a,{K:()=>f,Q:()=>i});var r=t(77548),n=t(24183);const s=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...s}=a||{},i=t?await t.fetchServiceMetadata(e,s):await(0,n.V)(e,s),l=(0,r.G$)();d(i),o(i);const c={serviceJSON:i,preferredHost:l};if((i.currentVersion??0)<10.5)return c;const u=`${(0,r.$x)()??e}/layers`,y=t?await t.fetchServiceMetadata(u,s):await(0,n.V)(u,s);return d(y),o(y),c.layersJSON={layers:y.layers,tables:y.tables},c}function l(e){const{type:a}=e;return!!a&&s.has(a)}function c(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(l),e.tables=e.tables?.filter(c)}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"}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(77548),c=t(4513),o=t(80812),u=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof o.default||(a=new o.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,u.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly"),c=s.tileInfo?.format?.toLowerCase()??"",o=null==i&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===i||o||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}});if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Video Service":return async function(e,a){return"object"==typeof await m(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,e=>(0,u.pJ)(e)?.customParameters)});return(0,l.Gh)(e,(0,l.G$)()),{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}if("Video Service"===n){const e=await a.fetchServiceMetadata(r);return!((e.layers?.length??0)>1)&&{}}await e.load();let c=await a.fetchItemData(e);if(i){const{data:t,preferredHost:n}=await(0,u.bO)(c,r,a);(0,l.Gh)(e,n);const s=w(t);if("object"==typeof s){const e=(0,u.rc)(t,s.id);s.className=(0,u.K8)(e?.layerType)}return s}if("Scene Service"===n&&(c=await(0,u.nu)(e,c,a)),(0,u.XH)(c)>0)return w(c);const o=await a.fetchServiceMetadata(r);return t&&(o.tables=await t()),w(o)}function w(e){return 1===(0,u.XH)(e)&&{id:(0,u.pJ)(e)?.id}}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>f,XH:()=>y,_r:()=>i,bO:()=>l,l:()=>d,nu:()=>m,pJ:()=>c,rc:()=>o});var r=t(92009),n=t(23154),s=t(77548);function i(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function l(e,a,t){let r;if(null==e?.layers||null==e?.tables){const n=await t.fetchServiceMetadata(a,{customParameters:c(e)?.customParameters});r=(0,s.G$)(),(e=e||{}).layers=e.layers||n?.layers?.map(i),e.tables=e.tables||n?.tables?.map(i)}return{data:e,preferredHost:r}}function c(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function o(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find(e=>e.id===a)}function u(e,a){return[...e.layers||[],...e.tables||[]].filter(({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer"))}function y(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function d(e){switch(e){case"catalog":return["CatalogLayer"];case"feature":return["ArcGISFeatureLayer"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function f(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return"FeatureLayer"}async function m(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(i)}const{serverUrl:n,portalItem:s}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:c(a)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==n)return a.tables=[],a;if(!a.tables&&s){const e=await s.fetchData().catch(()=>null);if(e?.tables)a.tables=e.tables.map(i);else{const r=await t.fetchServiceMetadata(n,{customParameters:c(e)?.customParameters}).catch(()=>null);a.tables=r?.tables?.map(i)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},92009:(e,a,t)=>{t.d(a,{L:()=>u});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),o=t(80812);async function u(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new o.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return await t.load({signal:e.signal})}catch(e){return(0,i.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 t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;const r=new o.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(u);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),o=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(o?.layers?.[0]||o?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch(()=>d("no-prompt")),[m,w]=await Promise.all([f,c]),p=w?.layers,h=m.data&&m.data.layers;if(!Array.isArray(h))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,h.length);e++)if(p[e].id===i)return{serverUrl:r,layerId:h[e].id}}else if(null!=i&&i<h.length)return{serverUrl:r,layerId:h[i].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2956],{2272:(e,t,i)=>{i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),n=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function h(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map(e=>h(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}async function c(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&s.A.request.useIdentity&&await Promise.all([i.e(7330),i.e(4813),i.e(3747)]).then(i.bind(i,73747));const l=await n.id.getCredential(e,r);return l?.token}},6518:(e,t,i)=>{i.d(t,{F:()=>a});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9762:(e,t,i)=>{i.r(t),i.d(t,{projectBuffer:()=>n});var s=i(37539);function n(e,t,i,n,r,o,a=Math.floor(e.length/3)){const l=(0,s.jd)(t,r);if(null==l)return!1;if(l===s.pO){if(e===n&&i===o)return!0;const t=i+3*a;for(let s=i,r=o;s<t;s++,r++)n[r]=e[s];return!0}const u=i+3*a;for(let t=i,s=o;t<u;t+=3,s+=3)l(e,t,n,s);return!0}},12543:(e,t,i)=>{i.r(t),i.d(t,{default:()=>me});var s=i(31635),n=i(65529),r=i(74887),o=i(36708),a=i(10107),l=(i(44208),i(53966)),u=(i(87811),i(40608)),h=i(79897),c=i(16930),d=i(65864),f=i(83221),p=i(56390),_=i(87045),m=i(61956),g=i(88625),y=i(66344),v=i(91869),w=i(83047),x=i(16271);function I(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:i}=t;return new b(e,i)}return new M}class M{async alignCandidates(e,t,i){return e}notifyElevationSourceChange(){}}class b{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new y.q(1024),this._cacheVersion=0}async alignCandidates(e,t,i){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,i):(function(e,t,i){const{offset:s,unit:n}=i;if(null==s)return;const r=(0,w.G9)(t),o=s*((0,x.Ao)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,i){const s=new Map;for(const t of e)(0,v.tE)(s,t.objectId,F).push(t);const[n,o,a]=this._prepareQuery(s,t),l=await this._alignPointsInFeatures(n,i);if((0,r.Te)(i),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,i);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const i=[],s=[];for(const[t,n]of e){const e=[];for(const i of n)this._addToQueriesOrCachedResult(t,i.target,e,s),"edge"===i.type&&(this._addToQueriesOrCachedResult(t,i.start,e,s),this._addToQueriesOrCachedResult(t,i.end,e,s));0!==e.length&&i.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:i},s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,i,s){const n=C(e,t),r=this._alignmentsCache.get(n);null==r?i.push(t):s.push(new S(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:i,failedObjectIds:s},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(s.has(n)){r+=a.length;continue}const e=!i.has(n);for(const i of a){const s=C(n,i),a=t[r++];i.z=a,e&&o.put(s,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function C(e,{x:t,y:i,z:s,spatialReference:n}){return`${e}-${t}-${i}-${s??0}}-wkid:${n?.wkid}`}function F(){return[]}class T{filter(e,t){return t}notifyElevationSourceChange(){}}class z{filter(e,t){const{point:i,distance:s}=e,{z:n}=i;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(s),o=this._updateCandidatesTo3D(t,i,r).filter(R);return o.sort(P),o}_updateCandidatesTo3D(e,t,i){for(const s of e)switch(s.type){case"edge":E(s,t,i);continue;case"vertex":A(s,t,i);continue}return e}}function R(e){return e.distance<=1}function B(e=!1){return e?new z:new T}function E(e,t,{x:i,y:s,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,o=s.z-i.z,a=n*n+r*r+o*o,l=(t.x-i.x)*n+(t.y-i.y)*r+o*(t.z-i.z),u=Math.min(1,Math.max(0,l/a)),h=i.x+n*u,c=i.y+r*u,d=i.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,r,o);const l=(t.x-a.x)/i,u=(t.y-a.y)/s,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function A(e,t,{x:i,y:s,z:n}){const{target:r}=e,o=(t.x-r.x)/i,a=(t.y-r.y)/s,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function P(e,t){return e.distance-t.distance}var j=i(4718),O=i(799);function k(e=!1,t){return e?new q(t):new Z}class Z{async fetch(){return[]}notifySymbologyChange(){}}class q{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new y.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const i=[],s=[],n=this._candidatesCache;for(const t of e){const e=L(t),r=n.get(e);if(r)for(const e of r)s.push((0,j.o8)(e));else i.push(t),n.put(e,[],1)}if(0===i.length)return s;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,t);if((0,r.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],s=L(i[l[e]]),r=n.get(s);r.push(t),n.put(s,r,r.length),u.push((0,j.o8)(t))}return s.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function L(e){switch(e.type){case"vertex":{const{objectId:t,target:i}=e,s=`${t}-vertex-${i.x}-${i.y}-${i.z??0}`;return(0,O.Wm)(s).toString()}case"edge":{const{objectId:t,start:i,end:s}=e,n=`${t}-edge-${i.x}-${i.y}-${i.z??0}-to-${s.x}-${s.y}-${s.z??0}`;return(0,O.Wm)(n).toString()}default:return""}}var H=i(65008),Y=i(4576),X=i(60999),N=i(3483),$=i(13069),U=i(5443),G=i(19419),D=i(90708),J=i(60694),K=i(69418),Q=i(80893);class V{constructor(e,t){this.data=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,X.UT)(async e=>{const i=await(0,X.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,i.ok?i.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,X.UT)(async i=>{const s=await(0,X.DZ)(t.fetchFeatures(this,e.featureCount,i));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,s.ok?s.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,G.VY)(e,W),(0,G.HY)(this.data.extent,W))}}const W=(0,G.vt)();let ee=class extends H.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=(0,N.KC)(e,this._mandatoryOutFields);(0,N.aI)(i,t)||(this._set("outFields",i),(0,N.Yy)(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new h.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,Y.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(e=>e.id??"")??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=(0,X.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,J.Wo)(this.url))return;const e=(0,X.UT)(async e=>{try{const t=await(0,Q.Jf)(this.url,new m.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=U.A.fromJSON(t.data?.extent)}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<se}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(ne/(i*i))<re}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new V(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,i){let s=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,i);l&&(s+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const n=e?(0,$.AG)(e):e;if(this.store.featureStore.forEach(e=>{n===(0,$.AG)(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,Q.IJ)(this.url,e,new K.S({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,D.eY)(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,Q.eW)(this.url,e,i,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,D.q3)(s,{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,s=(0,N.KC)((0,N.iv)(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new m.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,G.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?m.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||te);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"url",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"objectIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"globalIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"capabilities",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"spatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"store",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"_minimumVerticesPerFeature",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"_mandatoryOutFields",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"outFields",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"suspended",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"_historicMoment",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"filter",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"customParameters",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"_configuration",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tileInfo",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tileSize",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tilesOfInterest",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"availability",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"hasZ",null),ee=(0,s.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ee);const te=2e3,ie=6e5,se=1e6,ne=25,re=1;var oe=i(6518),ae=i(72802);class le{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const i=this._priorities.get(e);if(null==i||i<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[i,s]of this._store)if(!t.has(i)&&e(s,i))return!0;for(const[i]of t){const t=this._store.get(i);if(t&&e(t,i))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let ue=class extends H.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new oe.F,this._tiles=new le,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,G.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const i=this.featureStore.upsertMany(t),s=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,N.E$)(e,t),new Set(Object.keys(i[0]?.attributes??[]))),n=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),s),n&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:i}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<i||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const i of e.objectIds)if(1===this._refCounts.get(i)){const e=this.featureStore.getFeature(i);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){const s=e.id;this._tiles.set(s,new he(e,t,i)),this._tileBounds.set(s,e.extent),this._tileFeatureCounts.set(s,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const i=e.data.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){if(!e.length)return;const s=(await t(e,i)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of s){const t=(0,D.jQ)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,t=>{const i=this._tiles.get(t);this.featureStore.add(e);const s=e.objectId;i.objectIds.has(s)||(i.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(i.data.id,i.objectIds.size))})}}process(e,t=()=>!0,i){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,G.HY)((0,G.VY)(this.extent,this._tmpBoundingRect),e.extent))return new de(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new de(e);const s=this.getAttributesForTile(e.id);if((0,N.Yy)(i,s))return new de(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,i)}get debugInfo(){return Array.from(this._tiles.values()).map(({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,i,s){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,Q.gW)(t,i,s);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const i=new ce(e.level,e.row,e.col);return t.updateTileInfo(i,1),this._tileBounds.forEachInBounds(e.extent,s=>{const n=this._tiles.get(s)?.data;n&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,n=i?t:e,r=1<<n.level-s.level;return Math.floor(n.row/r)===s.row&&Math.floor(n.col/r)===s.col}(e,n)&&this._populateChildren(i,n,t,this._tileFeatureCounts.get(n.id)||0)}),i}_populateChildren(e,t,i,s){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,i,s);else{const n=new ce(e.level+1,r,o);i.updateTileInfo(n,1),e.children[l]=n,this._populateChildren(n,t,i,s)}}_simplify(e,t,i,s,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=i&&(i.children[s]=null),r);const o=n/2,a=o*o;let l=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];l+=null!=s?this._simplify(s,t,e,i,o):a}return 0===l?this._mergeChildren(e):1-l/r<pe&&(this._purge(e),null!=i&&(i.children[s]=null),l=r),l}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const s=this._tiles.get(e.id);if(s){i=i?(0,N.E$)(i,s.attributeKeys):new Set(s.attributeKeys);for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const i of e.children)null!=i&&(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i,s){const n=new fe(i,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,s),n.info}_collectMissingTilesRecurse(e,t,i,s){const n=this.getAttributesForTile(e.id),r=n&&!(0,N.Yy)(s,n);if(r&&t.addMissing(e.level,e.row,e.col,i),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,i));const o=i/2;for(let i=0;i<e.children.length;i++){const n=e.children[i];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),o):this._collectMissingTilesRecurse(n,t,o,s)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ue.prototype,"featureStore",void 0),(0,s.Cg)([(0,a.MZ)()],ue.prototype,"tileInfo",void 0),(0,s.Cg)([(0,a.MZ)()],ue.prototype,"extent",void 0),(0,s.Cg)([(0,a.MZ)()],ue.prototype,"maximumByteSize",void 0),ue=(0,s.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ue);class he{constructor(e,t,i){this.data=e,this.objectIds=t,this.attributeKeys=i}}class ce{constructor(e,t,i){this.level=e,this.row=t,this.col=i,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class de{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,G.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class fe{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new de(t),null!=i&&(this._extent=(0,G.VY)(i))}addMissing(e,t,i,s){const n=new ae.U(null,e,t,i);this._tileInfo.updateTileInfo(n,1),null==n.extent||null!=this._extent&&!(0,G.HY)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:s}),this.info.coveredArea-=(0,G.Wc)(n.extent))}}const pe=.18751;let _e=class extends n.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.Tw)(),this._elevationAligner=I(),this._elevationFilter=B(),this._symbologyCandidatesFetcher=k(),this._updatingHandles=new h.U,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return(0,r.Te)(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return(0,r.Te)(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:s,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=c.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new f.A({...e.serviceInfo,hasZ:r,hasM:!1}),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new p.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:s}),this._featureFetcher=new ee({store:new ue({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:c.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=I(l,{elevationInfo:null!=e.elevationInfo?g.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=B(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),ge}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.suspended=e,ge}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.outFields=new Set(e??[]),ge}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.Te)(t);const i=function(e,t){const i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};const{distance:s,units:n,spatialRel:r,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,d.rS)(e.filter.geometry):void 0,distance:s,units:n,spatialRel:r,timeExtent:a,objectIds:l,returnZ:i,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),s=t?.signal,n=await this._queryEngine.executeQueryForSnapping(i,s);(0,r.Te)(s);const o=await this._elevationAligner.alignCandidates(n.candidates,c.A.fromJSON(e.point.spatialReference)??c.A.WGS84,s);(0,r.Te)(s);const a=await this._symbologyCandidatesFetcher.fetch(o,s);(0,r.Te)(s);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?_.A.fromJSON(e.tileInfo):null,ge}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.refresh(),ge}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,r.Te)(t),ge}async getDebugInfo(e,t){return(0,r.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,r.Te)(t),ge}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),ge}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),ge}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),ge}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=k(e,this._getSymbologyCandidates),ge}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?m.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],_e.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)()],_e.prototype,"_isInitializing",void 0),_e=(0,s.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],_e);const me=_e,ge={result:{}}},16271:(e,t,i)=>{i.d(t,{Ao:()=>r,KQ:()=>o});var s=i(4576),n=i(31756);function r(e){return 1/(n.j[e]||1)}const o=function(){const e=Object.keys(n.j);return(0,s.TF)(e,"decimal-degrees"),e.sort(),e}()},31756:(e,t,i)=>{i.d(t,{j:()=>r});var s=i(83047),n=i(79258);const r={unknown:1,inches:(0,s.oU)(1,"meters","inches"),feet:(0,s.oU)(1,"meters","feet"),"us-feet":(0,s.oU)(1,"meters","us-feet"),yards:(0,s.oU)(1,"meters","yards"),miles:(0,s.oU)(1,"meters","miles"),"nautical-miles":(0,s.oU)(1,"meters","nautical-miles"),millimeters:(0,s.oU)(1,"meters","millimeters"),centimeters:(0,s.oU)(1,"meters","centimeters"),decimeters:(0,s.oU)(1,"meters","decimeters"),meters:(0,s.oU)(1,"meters","meters"),kilometers:(0,s.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,s.vl)(1,"meters",n.$O.radius)}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>_,Vh:()=>m,on:()=>c,pc:()=>g,wB:()=>l,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(74887),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function u(e,t,i={}){return h(e,t,i,p)}function h(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(h),i(e)}const f=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,n.hA)(()=>{f.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((s,r)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),h(e,e=>{l(),s(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const _={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},37539:(e,t,i)=>{i.d(t,{pO:()=>_,jd:()=>d,Tp:()=>f,w5:()=>c});var s=i(34727),n=i(83047),r=i(73941),o=i(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var h=i(21325);const c={2:{5:_,7:null,9:null,10:_,1:M,6:null,8:null,0:null,3:g,11:y,2:_,4:T},5:{5:_,7:null,9:null,10:_,1:M,6:null,8:null,0:null,3:g,11:y,2:_,4:T},7:{5:null,7:_,9:null,10:_,1:null,6:I,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:_,10:_,1:null,6:null,8:x,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,t,i,s){const n=e[t]/P,r=A-2*Math.atan(Math.exp(-e[t+1]/P)),o=P+e[t+2],a=Math.cos(r)*o;i[s]=Math.cos(n)*a,i[s+1]=Math.sin(n)*a,i[s+2]=Math.sin(r)*o},6:null,8:null,0:null,3:_,11:function(e,t,i,s){m(e,t,i,s),y(i,s,i,s)},2:m,4:function(e,t,i,s){m(e,t,i,s),T(i,s,i,s)}},4:{5:z,7:null,9:null,10:z,1:function(e,t,i,s){z(e,t,i,s),M(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){z(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){z(e,t,i,s),y(i,s,i,s)},2:z,4:_},1:{5:F,7:null,9:null,10:F,1:_,6:null,8:null,0:null,3:function(e,t,i,s){F(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){F(e,t,i,s),y(i,s,i,s)},2:F,4:function(e,t,i,s){F(e,t,i,s),T(i,s,i,s)}},6:{5:null,7:C,9:null,10:C,1:null,6:_,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:S,10:S,1:null,6:null,8:_,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:_,3:null,11:null,2:null,4:null},10:{5:_,7:_,9:_,10:_,1:M,6:I,8:x,0:null,3:g,11:y,2:_,4:T},11:{5:v,7:null,9:null,10:v,1:function(e,t,i,s){v(e,t,i,s),M(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){v(e,t,i,s),g(i,s,i,s)},11:_,2:v,4:function(e,t,i,s){v(e,t,i,s),T(i,s,i,s)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(R.source.spatialReference===e&&R.dest.spatialReference===t)return R;const i=p(e,R.source),s=p(t,R.dest);return 0===i&&0===s?(0,h.aI)(e,t)?R.projector=_:R.projector=null:R.projector=c[i][s],R}function p(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,h.oT)(e)?t.spatialReferenceId=2:(0,h.K8)(e)?t.spatialReferenceId=3:(0,h.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,h.q8)(e)?t.spatialReferenceId=7:(0,h.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function _(e,t,i,s){e!==i&&(i[s++]=e[t++],i[s++]=e[t++],i[s]=e[t])}function m(e,t,i,s){i[s]=E*(e[t]/P),i[s+1]=E*(A-2*Math.atan(Math.exp(-e[t+1]/P))),i[s+2]=e[t+2]}function g(e,t,i,n){!function(e,t,i,n,r){const o=.4999999*Math.PI,a=(0,s.qE)(B*e[t+1],-o,o),l=Math.sin(a);i[n++]=B*e[t]*r.radius,i[n++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),i[n]=e[t+2]}(e,t,i,n,o.$O)}function y(e,t,i,s){i[s]=e[t]*j,i[s+1]=e[t+1]*j,i[s+2]=e[t+2]}function v(e,t,i,s){i[s]=e[t]*O,i[s+1]=e[t+1]*O,i[s+2]=e[t+2]}function w(e,t,i,s,n){const r=n+e[t+2],o=B*e[t+1],a=B*e[t],l=Math.cos(o)*r;i[s]=Math.cos(a)*l,i[s+1]=Math.sin(a)*l,i[s+2]=Math.sin(o)*r}function x(e,t,i,s){w(e,t,i,s,o.Sw.radius)}function I(e,t,i,s){w(e,t,i,s,o.sH.radius)}function M(e,t,i,s){w(e,t,i,s,o.$O.radius)}function b(e,t,i,n,r){const o=e[t],a=e[t+1],l=e[t+2],u=Math.sqrt(o*o+a*a+l*l),h=(0,s.YN)(l/(0===u?1:u)),c=Math.atan2(a,o);i[n++]=E*c,i[n++]=E*h,i[n]=u-r}function S(e,t,i,s){b(e,t,i,s,o.Sw.radius)}function C(e,t,i,s){b(e,t,i,s,o.sH.radius)}function F(e,t,i,s){b(e,t,i,s,o.$O.radius)}function T(e,t,i,s){!function(e,t,i,s,n){const r=B*e[t],o=B*e[t+1],a=e[t+2],l=Math.sin(o),u=Math.cos(o),h=n.radius/Math.sqrt(1-n.eccentricitySquared*l*l);i[s++]=(h+a)*u*Math.cos(r),i[s++]=(h+a)*u*Math.sin(r),i[s++]=(h*(1-n.eccentricitySquared)+a)*l}(e,t,i,s,o.$O)}function z(e,t,i,s){const n=u,r=e[t],a=e[t+1],l=e[t+2];let h,c,d,f,p,_,m,g,y,v,w,x,I,M,b,S,C,F,T,z,R;h=Math.abs(l),c=r*r+a*a,d=Math.sqrt(c),f=c+l*l,p=Math.sqrt(f),z=Math.atan2(a,r),_=l*l/f,m=c/f,M=n.a2/p,b=n.a3-n.a4/p,m>.3?(g=h/p*(1+m*(n.a1+M+_*b)/p),T=Math.asin(g),v=g*g,y=Math.sqrt(1-v)):(y=d/p*(1-_*(n.a5-M-m*b)/p),T=Math.acos(y),v=1-y*y,g=Math.sqrt(v)),w=1-o.$O.eccentricitySquared*v,x=o.$O.radius/Math.sqrt(w),I=n.a6*x,M=d-x*y,b=h-I*g,C=y*M+g*b,S=y*b-g*M,F=S/(I/w+C),T+=F,R=C+S*F/2,l<0&&(T=-T),i[s++]=E*z,i[s++]=E*T,i[s]=R}const R={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:_},B=(0,s.kU)(1),E=(0,s.KJ)(1),A=.5*Math.PI,P=o.$O.radius,j=P*Math.PI/180,O=180/(P*Math.PI)},60999:(e,t,i)=>{i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>h,UT:()=>_,jJ:()=>u});var s=i(31635),n=i(65008),r=i(97768),o=i(74887),a=i(10107),l=i(40608);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(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 p(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function _(e,t){return new m(e,t)}let m=class extends n.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,r.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,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},62815:(e,t,i)=>{i.d(t,{N:()=>o});var s=i(83047),n=i(73941),r=i(21325);function o(e,t,i){if(null==t||null==i||i.vcsWkid||(0,r.aI)(t,i)||(0,n.xP)(t)||(0,n.xP)(i))return null;const o=(0,s.G9)(t)/(0,s.G9)(i);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},64272:(e,t,i)=>{i.d(t,{T:()=>d});var s,n=i(31635),r=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),h=i(43937),c=i(98623);let d=class extends r.o{static{s=this}static get allTime(){return f}static get empty(){return p}static fromArray(e){return new s({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(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({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,s=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===s&&i===n}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let n=this.end;if(n){const i=(0,o.lL)(n,e,t);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new s({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.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,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=i?o=n:t>=n&&t<=r&&(o=t),i>=n&&i<=r?a=i:r>=t&&r<=i&&(a=r),null==o||null==a||isNaN(o)||isNaN(a)?s.empty:new s({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:r,end:a}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,i)),null!=a&&(n.end=(0,o.S1)(a,e,t,i)),n}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 f.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 s({start:t,end:i})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,h.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,h.K)("start")],d.prototype,"writeStart",null),d=s=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0})},66344:(e,t,i)=>{i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{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=null}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,n,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,l)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,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,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._users.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/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,s){const n=this._users.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r: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 s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,a,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,r,s),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 s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new n,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(){}}},69540:(e,t,i)=>{i.d(t,{O:()=>u,P:()=>h});var s=i(31635),n=i(65008),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(40608);const u=e=>{const t=e;let i=class extends t{clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,r.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):n[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return i=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],i),i},h=u(n.A)},75503:(e,t,i)=>{i.d(t,{EC:()=>S,wq:()=>a});var s=i(4576),n=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),I.prune(),M.prune(),b.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(v(e,i))for(x.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;v(e,o)&&(i.leaf?t(r):y(e,o)?l(r,t):x.push(r))}i=x.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!v(e,t))return!1;for(x.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(v(e,r)){if(t.leaf||y(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(M.clear(),b.clear();i||M.length>0;){if(i||(i=M.pop(),r=M.data[M.length-1],o=b.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,n.zI)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),M.push(i),this._condense(M),this;a||i.leaf||!y(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(M.push(i),b.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new F(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));w(e,t,i,l,this._compareMinX);for(let n=t;n<=i;n+=l){const t=Math.min(n+l-1,i);w(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);M.clear();const r=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=m(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,M);for(r.children.push(e),c(r,n);t>=0&&M.data[t].children.length>this._maxEntries;)this._split(M,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(n,M,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new F(o):new T(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=g(t,a),u=p(t)+p(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=h(e,0,t,n),o=h(e,i-t,i,n);let a=_(r)+_(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(r,e.leaf?n(t):t),a+=_(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?n(t):t),a+=_(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(I.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,n.zI)(e));else I.pushArray(i.children);i=I.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],c(n,e.leaf?s(r):r);return n}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,i,s,n){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,n),r.push(i,a,a,t)}}const x=new r.A,I=new r.A,M=new r.A,b=new r.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class F extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},83221:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),c=i(51441),d=i(37730);const f=(0,a.vt)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,u.jQ)(null!=s?s:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},88625:(e,t,i)=>{i.d(t,{A:()=>v});var s,n=i(31635),r=i(69540),o=i(66552),a=i(25482),l=i(97768),u=i(10107),h=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),d=i(43937),f=i(30524);let p=s=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,f.Dx)(e,t,this.expression)}clone(){return new s({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"expression",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=s=(0,n.Cg)([(0,c.$)("esri.symbols.support.FeatureExpressionInfo")],p);const _=p;var m=i(16271);const g=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=class extends((0,r.O)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,i,s){t[i]=e.write({},s),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n.Cg)([(0,u.MZ)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n.Cg)([(0,h.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n.Cg)([(0,d.K)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n.Cg)([(0,u.MZ)({type:m.KQ,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=(0,n.Cg)([(0,c.$)("esri.symbols.support.ElevationInfo")],v)},98453:(e,t,i)=>{i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},98988:(e,t,i)=>{i.r(t),i.d(t,{canProjectWithoutEngine:()=>G,getTransformation:()=>L,getTransformations:()=>H,initializeProjection:()=>J,isEqualBaseGCS:()=>D,isLoaded:()=>B,isLoadedOrLoad:()=>E,isLoadedOrLoadFor:()=>A,load:()=>j,project:()=>O,projectExtent:()=>re,projectMany:()=>k,projectMultipoint:()=>W,projectOrLoad:()=>Z,projectOrLoadMany:()=>q,projectPoint:()=>Q,projectPolygon:()=>se,projectPolyline:()=>te,projectWithZConversion:()=>U,projectWithoutEngine:()=>K,requiresLoad:()=>P,test:()=>N,tryProjectWithZConversion:()=>$,unload:()=>X});var s=i(49186),n=i(74887),r=i(62788),o=i(95488),a=i(51850),l=i(21276),u=i(73941),h=i(5443),c=i(48526),d=i(83290),f=i(86738),p=i(39829),_=i(82799),m=i(16930),g=i(9762),y=i(37539);function v(e,t,i,s,n,r){return w[0]=e,w[1]=t,w[2]=i,(0,g.projectBuffer)(w,s,0,n,r,0)}const w=(0,a.vt)();let x=0;class I{static fromGE(e){const t=new I;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=x++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=x++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=x++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=x++}getInverse(){const e=new I;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class M{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new M;let i="";for(const s of e.steps){const e=I.fromGE(s);t.steps.push(e),i+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=i,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof I?this.steps.push(t):this.steps.push(new I({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new M;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,i){this._cachedProjection[M.cacheKey(e,t)]=i}getCachedGeTransformation(e,t){let i="";for(const e of this.steps)i+=e.uid.toString()+",";i!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=i);const s=this._cachedProjection[M.cacheKey(e,t)];return void 0===s?null:s}}var b=i(21325),S=i(62815);let C=null,F=null,T=null,z={};const R=new o.I;function B(){return!!C&&(0,d.i)()}function E(){return!!B()||((0,r.gc)(R),j(),!1)}function A(e,t){return!e||!t||G(e,t)||E()}function P(e,t){return!G(e,t)&&!B()}function j(e){return null==T&&(T=Promise.all([(0,d.l)(),i.e(9930).then(i.bind(i,49930)).then(e=>e.g),i.e(2731).then(i.bind(i,12731))])),T.then(([,t,{hydratedAdapter:i}])=>{(0,n.Te)(e),F=i,C=t.default,C._enableProjection(d.p),R.notify()})}function O(e,t,i=null,s=null){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),k(F,e,e[0].spatialReference,t,i,s)):((0,l.f)(e),k(F,[e],e.spatialReference,t,i,s)[0])}function k(e,t,i,s,n=null,r=null){if(null==i||null==s)return t;if(G(i,s,n))return t.map(e=>K(e,i,s));if(null==n&&(0,u.jA)(i))return t.map(e=>K(e,i,m.A.WGS84)).map(e=>$(e,s));if(null==n&&(0,u.jA)(s))return t.map(e=>$(e,m.A.WGS84)).map(e=>K(e,m.A.WGS84,s));if(null==n){const e=M.cacheKey(i,s);void 0!==z[e]?n=z[e]:(null==(n=L(i,s,void 0))&&(n=new M),z[e]=n)}if(null==C||null==e)throw new Y;return null!=r?C._project(e,t,i,s,n,r):C._project(e,t,i,s,n)}function Z(e,t){const i=q([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function q(e,t){if(!B())for(const i of e)if(null!=i&&!(0,b.aI)(i.spatialReference,t)&&(0,b.fn)(i.spatialReference)&&(0,b.fn)(t)&&!G(i.spatialReference,t))return(0,r.gc)(R),{pending:j(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,b.aI)(e.spatialReference,t)?e:(0,b.fn)(e.spatialReference)&&(0,b.fn)(t)?$(e,t):null)}}function L(e,t,i=null){if(null==e||null==t)return null;if(null==C||null==F)throw new Y;const s=C._getTransformation(F,e,t,i,i?.spatialReference);return null!==s?M.fromGE(s):null}function H(e,t,i=null){if(null==C||null==F)throw new Y;const s=C._getTransformationBySuitability(F,e,t,i,i?.spatialReference);if(null!==s){const e=[];for(const t of s)e.push(M.fromGE(t));return e}return[]}class Y extends s.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function X(){C=null,F=null,T=null,z={}}const N={get loadPromise(){return T}};function $(e,t){try{const i=O(e,t);if(null==i)return null;"xmin"in e&&"xmin"in i&&(i.zmin=e.zmin,i.zmax=e.zmax);const s=(0,S.N)(i.type,e.spatialReference,t);return null!=s&&s(i),i}catch(e){if(!(e instanceof Y))throw e;return null}}async function U(e,t,i){const s=e.spatialReference;return null!=s&&null!=t&&await J(s,t,null,i),$(e,t)}function G(e,t,i){return!i&&(!!(0,b.aI)(e,t)||(0,b.fn)(e)&&(0,b.fn)(t)&&!!(0,y.jd)(e,t))}function D(e,t){if((0,b.aI)(e,t))return!0;if(!(0,b.fn)(e)||!(0,b.fn)(t))return!1;const i=(0,b.oT)(e)||(0,b.K8)(e)||(0,b.x1)(e),s=(0,b.oT)(t)||(0,b.K8)(t)||(0,b.x1)(t);return i&&s}async function J(e,t,i,s){if(B())return(0,n.NO)(s);if(Array.isArray(e)){for(const{source:t,dest:i,geographicTransformation:n}of e)if(t&&i&&!G(t,i,n))return j(s)}else if(e&&t&&!G(e,t,i))return j(s);return(0,n.NO)(s)}function K(e,t,i){return e?"x"in e?V(e,t,new f.A,i,0):"xmin"in e?oe(e,t,new h.A,i,0):"rings"in e?ne(e,t,new p.A,i,0):"paths"in e?ie(e,t,new _.A,i,0):"points"in e?ee(e,t,new c.A,i,0):null:null}function Q(e,t,i=t.spatialReference,s=0){return null!=i&&null!=e.spatialReference&&null!=V(e,e.spatialReference,t,i,s)}function V(e,t,i,s,n){le[0]=e.x,le[1]=e.y;const r=e.z;return le[2]=void 0!==r?r:n,(0,g.projectBuffer)(le,t,0,le,s,0)?(i.x=le[0],i.y=le[1],i.spatialReference=s,void 0!==r||(0,u.xP)(s)?(i.z=le[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function W(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=ee(e,e.spatialReference,t,i,s)}function ee(e,t,i,s,n){const{points:r,hasZ:o,hasM:a}=e,l=[],h=r.length,c=[];for(const e of r)c.push(e[0],e[1],o?e[2]:n);if(!(0,g.projectBuffer)(c,t,0,c,s,0,h))return null;const d=o||(0,u.xP)(s);for(let e=0;e<h;++e){const t=3*e,i=c[t],s=c[t+1];d&&a?l.push([i,s,c[t+2],r[e][3]]):d?l.push([i,s,c[t+2]]):a?l.push([i,s,r[e][2]]):l.push([i,s])}return i.points=l,i.spatialReference=s,i.hasZ=o,i.hasM=a,i}function te(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=ie(e,e.spatialReference,t,i,s)}function ie(e,t,i,s,n){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!ae(r,o??!1,a??!1,t,l,s,n))return null;const h=o||(0,u.xP)(s);return i.paths=l,i.spatialReference=s,i.hasZ=h,i.hasM=a,i}function se(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=ne(e,e.spatialReference,t,i,s)}function ne(e,t,i,s,n){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!ae(r,o??!1,a??!1,t,l,s,n))return null;const h=o||(0,u.xP)(s);return i.rings=l,i.spatialReference=s,i.hasZ=h,i.hasM=a,i}function re(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=oe(e,e.spatialReference,t,i,s)}function oe(e,t,i,s,n){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:h,hasM:c}=e;if(!v(r,o,h?e.zmin:n,t,le,s))return null;const d=h||(0,u.xP)(s);return i.xmin=le[0],i.ymin=le[1],d&&(i.zmin=le[2]),v(a,l,h?e.zmax:n,t,le,s)?(i.xmax=le[0],i.ymax=le[1],d&&(i.zmax=le[2]),c&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=s,i):null}function ae(e,t,i,s,n,r,o=0){const a=new Array;for(const i of e)for(const e of i)a.push(e[0],e[1],t?e[2]:o);if(!(0,g.projectBuffer)(a,s,0,a,r,0))return!1;let l=0;n.length=0;const h=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const s of t)h&&i?e.push([a[l++],a[l++],a[l++],s[3]]):h?e.push([a[l++],a[l++],a[l++]]):i?(e.push([a[l++],a[l++],s[2]]),l++):(e.push([a[l++],a[l++]]),l++);n.push(e)}return!0}const le=(0,a.vt)()}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2956],{2272:(e,t,i)=>{i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),n=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function h(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map(e=>h(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}async function c(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&s.A.request.useIdentity&&await Promise.all([i.e(7330),i.e(4813),i.e(3747)]).then(i.bind(i,73747));const l=await n.id.getCredential(e,r);return l?.token}},6518:(e,t,i)=>{i.d(t,{F:()=>a});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9762:(e,t,i)=>{i.r(t),i.d(t,{projectBuffer:()=>n});var s=i(37539);function n(e,t,i,n,r,o,a=Math.floor(e.length/3)){const l=(0,s.jd)(t,r);if(null==l)return!1;if(l===s.pO){if(e===n&&i===o)return!0;const t=i+3*a;for(let s=i,r=o;s<t;s++,r++)n[r]=e[s];return!0}const u=i+3*a;for(let t=i,s=o;t<u;t+=3,s+=3)l(e,t,n,s);return!0}},12543:(e,t,i)=>{i.r(t),i.d(t,{default:()=>me});var s=i(31635),n=i(65529),r=i(74887),o=i(36708),a=i(10107),l=(i(44208),i(53966)),u=(i(87811),i(40608)),h=i(79897),c=i(16930),d=i(65864),f=i(83221),p=i(56390),_=i(87045),m=i(61956),g=i(88625),y=i(66344),v=i(91869),x=i(83047),w=i(16271);function I(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:i}=t;return new b(e,i)}return new M}class M{async alignCandidates(e,t,i){return e}notifyElevationSourceChange(){}}class b{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new y.q(1024),this._cacheVersion=0}async alignCandidates(e,t,i){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,i):(function(e,t,i){const{offset:s,unit:n}=i;if(null==s)return;const r=(0,x.G9)(t),o=s*((0,w.Ao)(n??"meters")/r);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,i){const s=new Map;for(const t of e)(0,v.tE)(s,t.objectId,F).push(t);const[n,o,a]=this._prepareQuery(s,t),l=await this._alignPointsInFeatures(n,i);if((0,r.Te)(i),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,i);this._applyCacheAndResponse(n,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const i=[],s=[];for(const[t,n]of e){const e=[];for(const i of n)this._addToQueriesOrCachedResult(t,i.target,e,s),"edge"===i.type&&(this._addToQueriesOrCachedResult(t,i.start,e,s),this._addToQueriesOrCachedResult(t,i.end,e,s));0!==e.length&&i.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:i},s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,i,s){const n=C(e,t),r=this._alignmentsCache.get(n);null==r?i.push(t):s.push(new S(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:i,failedObjectIds:s},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e.pointsInFeatures){if(s.has(n)){r+=a.length;continue}const e=!i.has(n);for(const i of a){const s=C(n,i),a=t[r++];i.z=a,e&&o.put(s,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function C(e,{x:t,y:i,z:s,spatialReference:n}){return`${e}-${t}-${i}-${s??0}}-wkid:${n?.wkid}`}function F(){return[]}class T{filter(e,t){return t}notifyElevationSourceChange(){}}class z{filter(e,t){const{point:i,distance:s}=e,{z:n}=i;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(s),o=this._updateCandidatesTo3D(t,i,r).filter(R);return o.sort(P),o}_updateCandidatesTo3D(e,t,i){for(const s of e)switch(s.type){case"edge":E(s,t,i);continue;case"vertex":A(s,t,i);continue}return e}}function R(e){return e.distance<=1}function B(e=!1){return e?new z:new T}function E(e,t,{x:i,y:s,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,o=s.z-i.z,a=n*n+r*r+o*o,l=(t.x-i.x)*n+(t.y-i.y)*r+o*(t.z-i.z),u=Math.min(1,Math.max(0,l/a)),h=i.x+n*u,c=i.y+r*u,d=i.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,r,o);const l=(t.x-a.x)/i,u=(t.y-a.y)/s,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function A(e,t,{x:i,y:s,z:n}){const{target:r}=e,o=(t.x-r.x)/i,a=(t.y-r.y)/s,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function P(e,t){return e.distance-t.distance}var j=i(4718),O=i(799);function k(e=!1,t){return e?new q(t):new Z}class Z{async fetch(){return[]}notifySymbologyChange(){}}class q{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new y.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const i=[],s=[],n=this._candidatesCache;for(const t of e){const e=L(t),r=n.get(e);if(r)for(const e of r)s.push((0,j.o8)(e));else i.push(t),n.put(e,[],1)}if(0===i.length)return s;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,t);if((0,r.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],s=L(i[l[e]]),r=n.get(s);r.push(t),n.put(s,r,r.length),u.push((0,j.o8)(t))}return s.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function L(e){switch(e.type){case"vertex":{const{objectId:t,target:i}=e,s=`${t}-vertex-${i.x}-${i.y}-${i.z??0}`;return(0,O.Wm)(s).toString()}case"edge":{const{objectId:t,start:i,end:s}=e,n=`${t}-edge-${i.x}-${i.y}-${i.z??0}-to-${s.x}-${s.y}-${s.z??0}`;return(0,O.Wm)(n).toString()}default:return""}}var H=i(65008),Y=i(4576),X=i(60999),N=i(3483),$=i(13069),U=i(5443),G=i(19419),D=i(90708),J=i(60694),K=i(69418),Q=i(80893);class V{constructor(e,t){this.data=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,X.UT)(async e=>{const i=await(0,X.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,i.ok?i.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,X.UT)(async i=>{const s=await(0,X.DZ)(t.fetchFeatures(this,e.featureCount,i));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,s.ok?s.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,G.VY)(e,W),(0,G.HY)(this.data.extent,W))}}const W=(0,G.vt)();let ee=class extends H.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=(0,N.KC)(e,this._mandatoryOutFields);(0,N.aI)(i,t)||(this._set("outFields",i),(0,N.Yy)(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new h.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,Y.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(e=>e.id??"")??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=(0,X.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,J.Wo)(this.url))return;const e=(0,X.UT)(async e=>{try{const t=await(0,Q.Jf)(this.url,new m.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=U.A.fromJSON(t.data?.extent)}catch(e){(0,r.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<se}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(ne/(i*i))<re}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new V(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,i){let s=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,i);l&&(s+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const n=e?(0,$.AG)(e):e;if(this.store.featureStore.forEach(e=>{n===(0,$.AG)(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,Q.IJ)(this.url,e,new K.S({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,D.eY)(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,Q.eW)(this.url,e,i,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,D.q3)(s,{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,s=(0,N.KC)((0,N.iv)(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new m.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,G.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?m.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||te);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"url",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"objectIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"globalIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"capabilities",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"spatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"store",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"_minimumVerticesPerFeature",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"_mandatoryOutFields",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"outFields",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"suspended",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"_historicMoment",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"filter",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"customParameters",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"_configuration",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tileInfo",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tileSize",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tilesOfInterest",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"availability",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"hasZ",null),ee=(0,s.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ee);const te=2e3,ie=6e5,se=1e6,ne=25,re=1;var oe=i(6518),ae=i(72802);class le{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const i=this._priorities.get(e);if(null==i||i<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[i,s]of this._store)if(!t.has(i)&&e(s,i))return!0;for(const[i]of t){const t=this._store.get(i);if(t&&e(t,i))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let ue=class extends H.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new oe.F,this._tiles=new le,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,G.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const i=this.featureStore.upsertMany(t),s=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,N.E$)(e,t),new Set(Object.keys(i[0]?.attributes??[]))),n=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),s),n&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:i}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<i||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const i of e.objectIds)if(1===this._refCounts.get(i)){const e=this.featureStore.getFeature(i);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){const s=e.id;this._tiles.set(s,new he(e,t,i)),this._tileBounds.set(s,e.extent),this._tileFeatureCounts.set(s,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const i=e.data.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){if(!e.length)return;const s=(await t(e,i)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of s){const t=(0,D.jQ)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,t=>{const i=this._tiles.get(t);this.featureStore.add(e);const s=e.objectId;i.objectIds.has(s)||(i.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(i.data.id,i.objectIds.size))})}}process(e,t=()=>!0,i){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,G.HY)((0,G.VY)(this.extent,this._tmpBoundingRect),e.extent))return new de(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new de(e);const s=this.getAttributesForTile(e.id);if((0,N.Yy)(i,s))return new de(e);const n=this._createTileTree(e,this.tileInfo);return this._simplify(n,t,null,0,1),this._collectMissingTiles(e,n,this.tileInfo,i)}get debugInfo(){return Array.from(this._tiles.values()).map(({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,i,s){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,Q.gW)(t,i,s);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const i=new ce(e.level,e.row,e.col);return t.updateTileInfo(i,1),this._tileBounds.forEachInBounds(e.extent,s=>{const n=this._tiles.get(s)?.data;n&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,n=i?t:e,r=1<<n.level-s.level;return Math.floor(n.row/r)===s.row&&Math.floor(n.col/r)===s.col}(e,n)&&this._populateChildren(i,n,t,this._tileFeatureCounts.get(n.id)||0)}),i}_populateChildren(e,t,i,s){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,i,s);else{const n=new ce(e.level+1,r,o);i.updateTileInfo(n,1),e.children[l]=n,this._populateChildren(n,t,i,s)}}_simplify(e,t,i,s,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=i&&(i.children[s]=null),r);const o=n/2,a=o*o;let l=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];l+=null!=s?this._simplify(s,t,e,i,o):a}return 0===l?this._mergeChildren(e):1-l/r<pe&&(this._purge(e),null!=i&&(i.children[s]=null),l=r),l}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const s=this._tiles.get(e.id);if(s){i=i?(0,N.E$)(i,s.attributeKeys):new Set(s.attributeKeys);for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const i of e.children)null!=i&&(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i,s){const n=new fe(i,e,this.extent);return this._collectMissingTilesRecurse(t,n,1,s),n.info}_collectMissingTilesRecurse(e,t,i,s){const n=this.getAttributesForTile(e.id),r=n&&!(0,N.Yy)(s,n);if(r&&t.addMissing(e.level,e.row,e.col,i),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,i));const o=i/2;for(let i=0;i<e.children.length;i++){const n=e.children[i];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),o):this._collectMissingTilesRecurse(n,t,o,s)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ue.prototype,"featureStore",void 0),(0,s.Cg)([(0,a.MZ)()],ue.prototype,"tileInfo",void 0),(0,s.Cg)([(0,a.MZ)()],ue.prototype,"extent",void 0),(0,s.Cg)([(0,a.MZ)()],ue.prototype,"maximumByteSize",void 0),ue=(0,s.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ue);class he{constructor(e,t,i){this.data=e,this.objectIds=t,this.attributeKeys=i}}class ce{constructor(e,t,i){this.level=e,this.row=t,this.col=i,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class de{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,G.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class fe{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new de(t),null!=i&&(this._extent=(0,G.VY)(i))}addMissing(e,t,i,s){const n=new ae.U(null,e,t,i);this._tileInfo.updateTileInfo(n,1),null==n.extent||null!=this._extent&&!(0,G.HY)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:s}),this.info.coveredArea-=(0,G.Wc)(n.extent))}}const pe=.18751;let _e=class extends n.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,r.Tw)(),this._elevationAligner=I(),this._elevationFilter=B(),this._symbologyCandidatesFetcher=k(),this._updatingHandles=new h.U,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return(0,r.Te)(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return(0,r.Te)(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:s,fieldsIndex:n}=e.serviceInfo,{hasZ:r}=e,a=c.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new f.A({...e.serviceInfo,hasZ:r,hasM:!1}),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new p.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:n,hasZ:r,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:s}),this._featureFetcher=new ee({store:new ue({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:c.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=I(l,{elevationInfo:null!=e.elevationInfo?g.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=B(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),ge}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.suspended=e,ge}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.outFields=new Set(e??[]),ge}async fetchCandidates(e,t){await this._whenSetup.promise,(0,r.Te)(t);const i=function(e,t){const i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};const{distance:s,units:n,spatialRel:r,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,d.rS)(e.filter.geometry):void 0,distance:s,units:n,spatialRel:r,timeExtent:a,objectIds:l,returnZ:i,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),s=t?.signal,n=await this._queryEngine.executeQueryForSnapping(i,s);(0,r.Te)(s);const o=await this._elevationAligner.alignCandidates(n.candidates,c.A.fromJSON(e.point.spatialReference)??c.A.WGS84,s);(0,r.Te)(s);const a=await this._symbologyCandidatesFetcher.fetch(o,s);(0,r.Te)(s);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?_.A.fromJSON(e.tileInfo):null,ge}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),this._featureFetcher.refresh(),ge}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,r.Te)(t),ge}async getDebugInfo(e,t){return(0,r.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,r.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,r.Te)(t),ge}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),ge}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),ge}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),ge}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=k(e,this._getSymbologyCandidates),ge}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?m.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],_e.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)()],_e.prototype,"_isInitializing",void 0),_e=(0,s.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],_e);const me=_e,ge={result:{}}},16271:(e,t,i)=>{i.d(t,{Ao:()=>r,KQ:()=>o});var s=i(4576),n=i(31756);function r(e){return 1/(n.j[e]||1)}const o=function(){const e=Object.keys(n.j);return(0,s.TF)(e,"decimal-degrees"),e.sort(),e}()},31756:(e,t,i)=>{i.d(t,{j:()=>r});var s=i(83047),n=i(79258);const r={unknown:1,inches:(0,s.oU)(1,"meters","inches"),feet:(0,s.oU)(1,"meters","feet"),"us-feet":(0,s.oU)(1,"meters","us-feet"),yards:(0,s.oU)(1,"meters","yards"),miles:(0,s.oU)(1,"meters","miles"),"nautical-miles":(0,s.oU)(1,"meters","nautical-miles"),millimeters:(0,s.oU)(1,"meters","millimeters"),centimeters:(0,s.oU)(1,"meters","centimeters"),decimeters:(0,s.oU)(1,"meters","decimeters"),meters:(0,s.oU)(1,"meters","meters"),kilometers:(0,s.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,s.vl)(1,"meters",n.$O.radius)}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>_,Vh:()=>m,on:()=>c,pc:()=>g,wB:()=>l,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(74887),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function u(e,t,i={}){return h(e,t,i,p)}function h(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(h),i(e)}const f=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,n.hA)(()=>{f.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((s,r)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),h(e,e=>{l(),s(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const _={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},37539:(e,t,i)=>{i.d(t,{pO:()=>_,jd:()=>d,Tp:()=>f,w5:()=>c});var s=i(34727),n=i(83047),r=i(73941),o=i(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var h=i(21325);const c={2:{5:_,7:null,9:null,10:_,1:M,6:null,8:null,0:null,3:g,11:y,2:_,4:T},5:{5:_,7:null,9:null,10:_,1:M,6:null,8:null,0:null,3:g,11:y,2:_,4:T},7:{5:null,7:_,9:null,10:_,1:null,6:I,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:_,10:_,1:null,6:null,8:w,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,t,i,s){const n=e[t]/P,r=A-2*Math.atan(Math.exp(-e[t+1]/P)),o=P+e[t+2],a=Math.cos(r)*o;i[s]=Math.cos(n)*a,i[s+1]=Math.sin(n)*a,i[s+2]=Math.sin(r)*o},6:null,8:null,0:null,3:_,11:function(e,t,i,s){m(e,t,i,s),y(i,s,i,s)},2:m,4:function(e,t,i,s){m(e,t,i,s),T(i,s,i,s)}},4:{5:z,7:null,9:null,10:z,1:function(e,t,i,s){z(e,t,i,s),M(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){z(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){z(e,t,i,s),y(i,s,i,s)},2:z,4:_},1:{5:F,7:null,9:null,10:F,1:_,6:null,8:null,0:null,3:function(e,t,i,s){F(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){F(e,t,i,s),y(i,s,i,s)},2:F,4:function(e,t,i,s){F(e,t,i,s),T(i,s,i,s)}},6:{5:null,7:C,9:null,10:C,1:null,6:_,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:S,10:S,1:null,6:null,8:_,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:_,3:null,11:null,2:null,4:null},10:{5:_,7:_,9:_,10:_,1:M,6:I,8:w,0:null,3:g,11:y,2:_,4:T},11:{5:v,7:null,9:null,10:v,1:function(e,t,i,s){v(e,t,i,s),M(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){v(e,t,i,s),g(i,s,i,s)},11:_,2:v,4:function(e,t,i,s){v(e,t,i,s),T(i,s,i,s)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(R.source.spatialReference===e&&R.dest.spatialReference===t)return R;const i=p(e,R.source),s=p(t,R.dest);return 0===i&&0===s?(0,h.aI)(e,t)?R.projector=_:R.projector=null:R.projector=c[i][s],R}function p(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,h.oT)(e)?t.spatialReferenceId=2:(0,h.K8)(e)?t.spatialReferenceId=3:(0,h.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,h.q8)(e)?t.spatialReferenceId=7:(0,h.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function _(e,t,i,s){e!==i&&(i[s++]=e[t++],i[s++]=e[t++],i[s]=e[t])}function m(e,t,i,s){i[s]=E*(e[t]/P),i[s+1]=E*(A-2*Math.atan(Math.exp(-e[t+1]/P))),i[s+2]=e[t+2]}function g(e,t,i,n){!function(e,t,i,n,r){const o=.4999999*Math.PI,a=(0,s.qE)(B*e[t+1],-o,o),l=Math.sin(a);i[n++]=B*e[t]*r.radius,i[n++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),i[n]=e[t+2]}(e,t,i,n,o.$O)}function y(e,t,i,s){i[s]=e[t]*j,i[s+1]=e[t+1]*j,i[s+2]=e[t+2]}function v(e,t,i,s){i[s]=e[t]*O,i[s+1]=e[t+1]*O,i[s+2]=e[t+2]}function x(e,t,i,s,n){const r=n+e[t+2],o=B*e[t+1],a=B*e[t],l=Math.cos(o)*r;i[s]=Math.cos(a)*l,i[s+1]=Math.sin(a)*l,i[s+2]=Math.sin(o)*r}function w(e,t,i,s){x(e,t,i,s,o.Sw.radius)}function I(e,t,i,s){x(e,t,i,s,o.sH.radius)}function M(e,t,i,s){x(e,t,i,s,o.$O.radius)}function b(e,t,i,n,r){const o=e[t],a=e[t+1],l=e[t+2],u=Math.sqrt(o*o+a*a+l*l),h=(0,s.YN)(l/(0===u?1:u)),c=Math.atan2(a,o);i[n++]=E*c,i[n++]=E*h,i[n]=u-r}function S(e,t,i,s){b(e,t,i,s,o.Sw.radius)}function C(e,t,i,s){b(e,t,i,s,o.sH.radius)}function F(e,t,i,s){b(e,t,i,s,o.$O.radius)}function T(e,t,i,s){!function(e,t,i,s,n){const r=B*e[t],o=B*e[t+1],a=e[t+2],l=Math.sin(o),u=Math.cos(o),h=n.radius/Math.sqrt(1-n.eccentricitySquared*l*l);i[s++]=(h+a)*u*Math.cos(r),i[s++]=(h+a)*u*Math.sin(r),i[s++]=(h*(1-n.eccentricitySquared)+a)*l}(e,t,i,s,o.$O)}function z(e,t,i,s){const n=u,r=e[t],a=e[t+1],l=e[t+2];let h,c,d,f,p,_,m,g,y,v,x,w,I,M,b,S,C,F,T,z,R;h=Math.abs(l),c=r*r+a*a,d=Math.sqrt(c),f=c+l*l,p=Math.sqrt(f),z=Math.atan2(a,r),_=l*l/f,m=c/f,M=n.a2/p,b=n.a3-n.a4/p,m>.3?(g=h/p*(1+m*(n.a1+M+_*b)/p),T=Math.asin(g),v=g*g,y=Math.sqrt(1-v)):(y=d/p*(1-_*(n.a5-M-m*b)/p),T=Math.acos(y),v=1-y*y,g=Math.sqrt(v)),x=1-o.$O.eccentricitySquared*v,w=o.$O.radius/Math.sqrt(x),I=n.a6*w,M=d-w*y,b=h-I*g,C=y*M+g*b,S=y*b-g*M,F=S/(I/x+C),T+=F,R=C+S*F/2,l<0&&(T=-T),i[s++]=E*z,i[s++]=E*T,i[s]=R}const R={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:_},B=(0,s.kU)(1),E=(0,s.KJ)(1),A=.5*Math.PI,P=o.$O.radius,j=P*Math.PI/180,O=180/(P*Math.PI)},60999:(e,t,i)=>{i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>h,UT:()=>_,jJ:()=>u});var s=i(31635),n=i(65008),r=i(97768),o=i(74887),a=i(10107),l=i(40608);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(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 p(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function _(e,t){return new m(e,t)}let m=class extends n.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,r.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,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},62815:(e,t,i)=>{i.d(t,{N:()=>o});var s=i(83047),n=i(73941),r=i(21325);function o(e,t,i){if(null==t||null==i||i.vcsWkid||(0,r.aI)(t,i)||(0,n.xP)(t)||(0,n.xP)(i))return null;const o=(0,s.G9)(t)/(0,s.G9)(i);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},64272:(e,t,i)=>{i.d(t,{T:()=>d});var s,n=i(31635),r=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),h=i(43937),c=i(98623);let d=class extends r.o{static{s=this}static get allTime(){return f}static get empty(){return p}static fromArray(e){return new s({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(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({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,s=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===s&&i===n}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let n=this.end;if(n){const i=(0,o.lL)(n,e,t);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new s({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.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,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=i?o=n:t>=n&&t<=r&&(o=t),i>=n&&i<=r?a=i:r>=t&&r<=i&&(a=r),null==o||null==a||isNaN(o)||isNaN(a)?s.empty:new s({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:r,end:a}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,i)),null!=a&&(n.end=(0,o.S1)(a,e,t,i)),n}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 f.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 s({start:t,end:i})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,h.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,h.K)("start")],d.prototype,"writeStart",null),d=s=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0})},66344:(e,t,i)=>{i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{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=null}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,n,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,l)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,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,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._users.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/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,s){const n=this._users.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r: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 s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,a,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,r,s),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 s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new n,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(){}}},75503:(e,t,i)=>{i.d(t,{EC:()=>S,wq:()=>a});var s=i(4576),n=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),I.prune(),M.prune(),b.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(v(e,i))for(w.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;v(e,o)&&(i.leaf?t(r):y(e,o)?l(r,t):w.push(r))}i=w.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!v(e,t))return!1;for(w.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(v(e,r)){if(t.leaf||y(e,r))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(M.clear(),b.clear();i||M.length>0;){if(i||(i=M.pop(),r=M.data[M.length-1],o=b.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,n.zI)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),M.push(i),this._condense(M),this;a||i.leaf||!y(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(M.push(i),b.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new F(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,i,l,this._compareMinX);for(let n=t;n<=i;n+=l){const t=Math.min(n+l-1,i);x(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);M.clear();const r=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=m(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,M);for(r.children.push(e),c(r,n);t>=0&&M.data[t].children.length>this._maxEntries;)this._split(M,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(n,M,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new F(o):new T(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=g(t,a),u=p(t)+p(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=h(e,0,t,n),o=h(e,i-t,i,n);let a=_(r)+_(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(r,e.leaf?n(t):t),a+=_(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?n(t):t),a+=_(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(I.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,n.zI)(e));else I.pushArray(i.children);i=I.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],c(n,e.leaf?s(r):r);return n}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,n){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,n),r.push(i,a,a,t)}}const w=new r.A,I=new r.A,M=new r.A,b=new r.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class F extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},83221:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),c=i(51441),d=i(37730);const f=(0,a.vt)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,u.jQ)(null!=s?s:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},88625:(e,t,i)=>{i.d(t,{A:()=>v});var s,n=i(31635),r=i(69540),o=i(66552),a=i(25482),l=i(97768),u=i(10107),h=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),d=i(43937),f=i(30524);let p=s=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,f.Dx)(e,t,this.expression)}clone(){return new s({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"expression",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=s=(0,n.Cg)([(0,c.$)("esri.symbols.support.FeatureExpressionInfo")],p);const _=p;var m=i(16271);const g=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=class extends((0,r.O)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,i,s){t[i]=e.write({},s),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n.Cg)([(0,u.MZ)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n.Cg)([(0,h.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n.Cg)([(0,d.K)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n.Cg)([(0,u.MZ)({type:m.KQ,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=(0,n.Cg)([(0,c.$)("esri.symbols.support.ElevationInfo")],v)},98453:(e,t,i)=>{i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},98988:(e,t,i)=>{i.r(t),i.d(t,{canProjectWithoutEngine:()=>G,getTransformation:()=>L,getTransformations:()=>H,initializeProjection:()=>J,isEqualBaseGCS:()=>D,isLoaded:()=>B,isLoadedOrLoad:()=>E,isLoadedOrLoadFor:()=>A,load:()=>j,project:()=>O,projectExtent:()=>re,projectMany:()=>k,projectMultipoint:()=>W,projectOrLoad:()=>Z,projectOrLoadMany:()=>q,projectPoint:()=>Q,projectPolygon:()=>se,projectPolyline:()=>te,projectWithZConversion:()=>U,projectWithoutEngine:()=>K,requiresLoad:()=>P,test:()=>N,tryProjectWithZConversion:()=>$,unload:()=>X});var s=i(49186),n=i(74887),r=i(62788),o=i(95488),a=i(51850),l=i(21276),u=i(73941),h=i(5443),c=i(48526),d=i(83290),f=i(86738),p=i(39829),_=i(82799),m=i(16930),g=i(9762),y=i(37539);function v(e,t,i,s,n,r){return x[0]=e,x[1]=t,x[2]=i,(0,g.projectBuffer)(x,s,0,n,r,0)}const x=(0,a.vt)();let w=0;class I{static fromGE(e){const t=new I;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}constructor(e){this.uid=w++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=w++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=w++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=w++}getInverse(){const e=new I;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class M{static cacheKey(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}static fromGE(e){const t=new M;let i="";for(const s of e.steps){const e=I.fromGE(s);t.steps.push(e),i+=e.uid.toString()+","}return t._cachedProjection={},t._gtlistentry=null,t._chain=i,t}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const t of e.steps)t instanceof I?this.steps.push(t):this.steps.push(new I({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}getInverse(){const e=new M;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,i){this._cachedProjection[M.cacheKey(e,t)]=i}getCachedGeTransformation(e,t){let i="";for(const e of this.steps)i+=e.uid.toString()+",";i!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=i);const s=this._cachedProjection[M.cacheKey(e,t)];return void 0===s?null:s}}var b=i(21325),S=i(62815);let C=null,F=null,T=null,z={};const R=new o.I;function B(){return!!C&&(0,d.i)()}function E(){return!!B()||((0,r.gc)(R),j(),!1)}function A(e,t){return!e||!t||G(e,t)||E()}function P(e,t){return!G(e,t)&&!B()}function j(e){return null==T&&(T=Promise.all([(0,d.l)(),i.e(9930).then(i.bind(i,49930)).then(e=>e.g),i.e(2731).then(i.bind(i,12731))])),T.then(([,t,{hydratedAdapter:i}])=>{(0,n.Te)(e),F=i,C=t.default,C._enableProjection(d.p),R.notify()})}function O(e,t,i=null,s=null){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),k(F,e,e[0].spatialReference,t,i,s)):((0,l.f)(e),k(F,[e],e.spatialReference,t,i,s)[0])}function k(e,t,i,s,n=null,r=null){if(null==i||null==s)return t;if(G(i,s,n))return t.map(e=>K(e,i,s));if(null==n&&(0,u.jA)(i))return t.map(e=>K(e,i,m.A.WGS84)).map(e=>$(e,s));if(null==n&&(0,u.jA)(s))return t.map(e=>$(e,m.A.WGS84)).map(e=>K(e,m.A.WGS84,s));if(null==n){const e=M.cacheKey(i,s);void 0!==z[e]?n=z[e]:(null==(n=L(i,s,void 0))&&(n=new M),z[e]=n)}if(null==C||null==e)throw new Y;return null!=r?C._project(e,t,i,s,n,r):C._project(e,t,i,s,n)}function Z(e,t){const i=q([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function q(e,t){if(!B())for(const i of e)if(null!=i&&!(0,b.aI)(i.spatialReference,t)&&(0,b.fn)(i.spatialReference)&&(0,b.fn)(t)&&!G(i.spatialReference,t))return(0,r.gc)(R),{pending:j(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,b.aI)(e.spatialReference,t)?e:(0,b.fn)(e.spatialReference)&&(0,b.fn)(t)?$(e,t):null)}}function L(e,t,i=null){if(null==e||null==t)return null;if(null==C||null==F)throw new Y;const s=C._getTransformation(F,e,t,i,i?.spatialReference);return null!==s?M.fromGE(s):null}function H(e,t,i=null){if(null==C||null==F)throw new Y;const s=C._getTransformationBySuitability(F,e,t,i,i?.spatialReference);if(null!==s){const e=[];for(const t of s)e.push(M.fromGE(t));return e}return[]}class Y extends s.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function X(){C=null,F=null,T=null,z={}}const N={get loadPromise(){return T}};function $(e,t){try{const i=O(e,t);if(null==i)return null;"xmin"in e&&"xmin"in i&&(i.zmin=e.zmin,i.zmax=e.zmax);const s=(0,S.N)(i.type,e.spatialReference,t);return null!=s&&s(i),i}catch(e){if(!(e instanceof Y))throw e;return null}}async function U(e,t,i){const s=e.spatialReference;return null!=s&&null!=t&&await J(s,t,null,i),$(e,t)}function G(e,t,i){return!i&&(!!(0,b.aI)(e,t)||(0,b.fn)(e)&&(0,b.fn)(t)&&!!(0,y.jd)(e,t))}function D(e,t){if((0,b.aI)(e,t))return!0;if(!(0,b.fn)(e)||!(0,b.fn)(t))return!1;const i=(0,b.oT)(e)||(0,b.K8)(e)||(0,b.x1)(e),s=(0,b.oT)(t)||(0,b.K8)(t)||(0,b.x1)(t);return i&&s}async function J(e,t,i,s){if(B())return(0,n.NO)(s);if(Array.isArray(e)){for(const{source:t,dest:i,geographicTransformation:n}of e)if(t&&i&&!G(t,i,n))return j(s)}else if(e&&t&&!G(e,t,i))return j(s);return(0,n.NO)(s)}function K(e,t,i){return e?"x"in e?V(e,t,new f.A,i,0):"xmin"in e?oe(e,t,new h.A,i,0):"rings"in e?ne(e,t,new p.A,i,0):"paths"in e?ie(e,t,new _.A,i,0):"points"in e?ee(e,t,new c.A,i,0):null:null}function Q(e,t,i=t.spatialReference,s=0){return null!=i&&null!=e.spatialReference&&null!=V(e,e.spatialReference,t,i,s)}function V(e,t,i,s,n){le[0]=e.x,le[1]=e.y;const r=e.z;return le[2]=void 0!==r?r:n,(0,g.projectBuffer)(le,t,0,le,s,0)?(i.x=le[0],i.y=le[1],i.spatialReference=s,void 0!==r||(0,u.xP)(s)?(i.z=le[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function W(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=ee(e,e.spatialReference,t,i,s)}function ee(e,t,i,s,n){const{points:r,hasZ:o,hasM:a}=e,l=[],h=r.length,c=[];for(const e of r)c.push(e[0],e[1],o?e[2]:n);if(!(0,g.projectBuffer)(c,t,0,c,s,0,h))return null;const d=o||(0,u.xP)(s);for(let e=0;e<h;++e){const t=3*e,i=c[t],s=c[t+1];d&&a?l.push([i,s,c[t+2],r[e][3]]):d?l.push([i,s,c[t+2]]):a?l.push([i,s,r[e][2]]):l.push([i,s])}return i.points=l,i.spatialReference=s,i.hasZ=o,i.hasM=a,i}function te(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=ie(e,e.spatialReference,t,i,s)}function ie(e,t,i,s,n){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!ae(r,o??!1,a??!1,t,l,s,n))return null;const h=o||(0,u.xP)(s);return i.paths=l,i.spatialReference=s,i.hasZ=h,i.hasM=a,i}function se(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=ne(e,e.spatialReference,t,i,s)}function ne(e,t,i,s,n){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!ae(r,o??!1,a??!1,t,l,s,n))return null;const h=o||(0,u.xP)(s);return i.rings=l,i.spatialReference=s,i.hasZ=h,i.hasM=a,i}function re(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=oe(e,e.spatialReference,t,i,s)}function oe(e,t,i,s,n){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:h,hasM:c}=e;if(!v(r,o,h?e.zmin:n,t,le,s))return null;const d=h||(0,u.xP)(s);return i.xmin=le[0],i.ymin=le[1],d&&(i.zmin=le[2]),v(a,l,h?e.zmax:n,t,le,s)?(i.xmax=le[0],i.ymax=le[1],d&&(i.zmax=le[2]),c&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=s,i):null}function ae(e,t,i,s,n,r,o=0){const a=new Array;for(const i of e)for(const e of i)a.push(e[0],e[1],t?e[2]:o);if(!(0,g.projectBuffer)(a,s,0,a,r,0))return!1;let l=0;n.length=0;const h=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const s of t)h&&i?e.push([a[l++],a[l++],a[l++],s[3]]):h?e.push([a[l++],a[l++],a[l++]]):i?(e.push([a[l++],a[l++],s[2]]),l++):(e.push([a[l++],a[l++]]),l++);n.push(e)}return!0}const le=(0,a.vt)()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3492],{63492:(e,t,n)=>{n.d(t,{ElevationQuery:()=>q});var i=n(60999),s=n(49186),l=n(97768),a=n(74887),o=n(83047),r=n(48526),c=n(86738),u=n(82799),h=n(98988),f=n(19419),p=(n(44208),n(36563)),m=n(53966),d=n(28735);const y=()=>m.A.getLogger("esri.layers.support.ElevationSampler");class x{queryElevation(e){return function(e,t){const n=T(e,t.spatialReference);if(!n)return null;switch(e.type){case"point":!function(e,t,n){e.z=n.elevationAt(t.x,t.y)}(e,n,t);break;case"polyline":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.paths.length;s++){const l=e.paths[s],a=t.paths[s];for(let e=0;e<l.length;e++){const t=l[e],s=a[e];g.x=s[0],g.y=s[1],i&&(t[3]=t[2]),t[2]=n.elevationAt(g.x,g.y)}}e.hasZ=!0}(e,n,t);break;case"multipoint":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.points.length;s++){const l=e.points[s],a=t.points[s];g.x=a[0],g.y=a[1],i&&(l[3]=l[2]),l[2]=n.elevationAt(g.x,g.y)}e.hasZ=!0}(e,n,t)}return e}(e.clone(),this)}on(){return(0,p.hA)()}projectIfRequired(e,t){return T(e,t)}}class v extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){super(),this.tile=e,this.noDataValue=n;const i=e.tile.extent;this.extent=(0,f.w1)(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const s=(0,o.GA)(t.spatialReference),l=t.lodAt(e.tile.level).resolution*s;this.demResolution={min:l,max:l}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,f.Rj)(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,i=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${i})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class w extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let i;super(),"number"==typeof t?(this.noDataValue=t,i=null):(i=t,this.noDataValue=n),this.samplers=i?e.map(e=>new v(e,i,this.noDataValue)):e;const s=this.samplers[0];if(s){this.extent=s.extent.clone();const{min:e,max:t}=s.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<this.samplers.length;e++){const t=this.samplers[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else this.extent=(0,f.w1)((0,f.vt)(),i.spatialReference),this.demResolution={min:0,max:0}}elevationAt(e,t){let n,i=!1;for(const s of this.samplers)if(s.containsAt(e,t)&&(i=!0,n=s.elevationAt(e,t),n!==s.noDataValue))return n;return null!=n?n:(i||y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}}function T(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const i=(0,d.Cv)(e,t);return i||y().error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),i}const g=new c.A;class R{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class A{constructor(e,t=null){if(this.tile=e,null!=t&&null!=e){const n=e.extent;this._samplerData=new R(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:i,dx:s,dy:l,y1:a,x0:o}=this._samplerData,{width:r,values:c,noDataValue:u}=i,h=_(l*(a-t),0,n),f=_(s*(e-o),0,n),p=Math.floor(h),m=Math.floor(f),d=p*r+m,y=d+r,x=c[d],v=c[y],w=c[d+1],T=c[y+1];if(x!==u&&v!==u&&w!==u&&T!==u){const e=f-m,t=x+(w-x)*e;return t+(v+(T-v)*e-t)*(h-p)}}}function _(e,t,n){return e<t?t:e>n?n:e}var E=n(72802);class q{async queryAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const i=D.fromGeometry(t);let l=!1;n?.returnSampleInfo||(l=!0);const a={...b,...n,returnSampleInfo:!0},o=await this.query(e[e.length-1],i,a),r=await this._queryAllContinue(e,o,a);return r.geometry=r.geometry.export(),l&&delete r.sampleInfo,r}async query(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof D)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new s.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const i={...b,...n},a=new z(e,t.spatialReference,i),r=i.signal;return await e.load({signal:r}),await async function(e,t,n){let i;const l=e.layer.tileInfo.spatialReference;if(t instanceof D?i=await t.project(l,n):(await(0,h.initializeProjection)([{source:t.spatialReference,dest:l}],{signal:n}),i=(0,h.project)(t,l)),!i)throw new s.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${l.wkid}'`);e.geometry=D.fromGeometry(i)}(a,t,r),await this._selectTiles(a,r),await F(a,r),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let i=e.options.noDataValue;if(n){const e=n.sample(t.x,t.y);null!=e?i=e:t.elevationTile=null}t.z=i})}(a),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,l.Lw)(n);const i={geometry:n.export(),noDataValue:e.options.noDataValue};return e.options.returnSampleInfo&&(i.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,o.GA)(t.spatialReference);return e.geometry.coordinates.map(i=>{let s=-1;return i.elevationTile&&i.elevationTile!==e.outsideExtentTile&&(s=t.lodAt(i.elevationTile.tile.level).resolution*n),{demResolution:s}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),i}(a,r)}async createSampler(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n};return this._createSampler(e,t,i)}async createSamplerAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n,returnSampleInfo:!0},l=await this._createSampler(e[e.length-1],t,i);return this._createSamplerAllContinue(e,t,l,i)}async _createSampler(e,t,n,i){const s=n.signal;await e.load({signal:s});const l=t.spatialReference,a=e.tileInfo.spatialReference;l.equals(a)||(await(0,h.initializeProjection)([{source:l,dest:a}],{signal:s}),t=(0,h.project)(t,a));const o=new M(e,t,n,i);return await this._selectTiles(o,s),await F(o,s),new w(o.elevationTiles,o.layer.tileInfo,o.options.noDataValue)}async _createSamplerAllContinue(e,t,n,i){if(e.pop(),!e.length)return n;const s=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,f.VY)(e.extent)),l=await this._createSampler(e[e.length-1],t,i,s);if(0===l.samplers.length)return n;const a=n.samplers.concat(l.samplers),o=new w(a,i.noDataValue);return this._createSamplerAllContinue(e,t,o,i)}async _queryAllContinue(e,t,n){const i=e.pop(),s=t.geometry.coordinates,a=t.sampleInfo;(0,l.Lw)(a);const o=[],r=[];for(let t=0;t<s.length;t++){const n=a[t];n.demResolution>=0?n.source||(n.source=i):e.length&&(o.push(s[t]),r.push(t))}if(!e.length||0===o.length)return t;const c=t.geometry.clone(o),u=await this.query(e[e.length-1],c,n),h=u.sampleInfo;if(!h)throw new Error("no sampleInfo");return r.forEach((e,t)=>{s[e].z=u.geometry.coordinates[t].z,a[e].demResolution=h[t].demResolution}),this._queryAllContinue(e,t,n)}async _selectTiles(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new A(null);t.sample=()=>e.options.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const i=e.x,s=e.y;(i<n.xmin||i>n.xmax||s<n.ymin||s>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.options.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=t/(0,o.GA)(n.spatialReference),l=k(n,i);let a=l[0],r=0;for(let e=1;e<l.length;e++){const t=l[e];Math.abs(t.resolution-s)<Math.abs(a.resolution-s)&&(a=t,r=e)}return r}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(e,t);else{if("auto"!==n)throw new s.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(e,t)}}async _selectTilesFinestContiguous(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=V(n,i,e.options.minDemResolution);await this._selectTilesFinestContiguousAt(e,s,t)}async _selectTilesFinestContiguousAt(e,t,n){const i=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const l=i.tilemapCache,o=e.getTilesToFetch();try{if(l&&!$(l))await(0,a.qr)(Promise.all(o.map(e=>l.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await F(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new s.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(i){(0,a.QP)(i),await this._selectTilesFinestContiguousAt(e,t-1,n)}}async _selectTilesAuto(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,i=V(t,n,e.options.minDemResolution);e.selectTilesAtLOD(i,e.options.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const i={},s=e=>{null!=e.id&&(e.id in i?i[e.id]++:(i[e.id]=1,n++))},l=e=>{if(null==e.id)return;const t=i[e.id];1===t?(delete i[e.id],n--):i[e.id]=t-1};e.forEachTileToFetch(s,l);let a=!0;for(;a&&(a=!1,e.forEachTileToFetch(i=>{n<=e.options.maximumAutoTileRequests||(l(i),t.upsampleTile(i)&&(a=!0),s(i))},l),a););}(e);const n=e.layer.tilemapCache;if(!n||$(n))return this._selectTilesAutoPrefetchUpsample(e,t);const s=e.getTilesToFetch(),l={},o=s.map(async e=>{const s=new E.U(null,0,0,0,(0,f.vt)()),o=await(0,i.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,s,{signal:t}));!1!==o.ok?null!=e.id&&(l[e.id]=s):(0,a.QP)(o.error)});await(0,a.qr)(Promise.all(o),t),e.remapTiles(l)}async _selectTilesAutoPrefetchUpsample(e,t){const n=e.layer.tileInfo;await F(e,t);let i=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?i=!0:t()}),i&&await this._selectTilesAutoPrefetchUpsample(e,t)}}class D{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new D;return t.geometry=this.geometry,t.spatialReference=this.spatialReference,t.coordinates=e||this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,h.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new r.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,h.project)(n,e);if(!i)return null;const s=this.coordinates.map((e,t)=>{const n=e.clone(),s=i.points[t];return n.x=s[0],n.y=s[1],n}),l=this.clone(s);return l.spatialReference=e,l}static fromGeometry(e){const t=new D;if(t.geometry=e,t.spatialReference=e.spatialReference,e instanceof D)t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const i=e.clone(t);return i.spatialReference=n,i};else switch(e.type){case"point":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?[new C(n.x,n.y,n.z,n.m)]:i?[new C(n.x,n.y,n.z)]:s?[new C(n.x,n.y,null,n.m)]:[new C(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new c.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new c.A(t[0].x,t[0].y,t[0].z,n);break}case"multipoint":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?n.points.map(e=>new C(e[0],e[1],e[2],e[3])):i?n.points.map(e=>new C(e[0],e[1],e[2])):s?n.points.map(e=>new C(e[0],e[1],null,e[2])):n.points.map(e=>new C(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new r.A({points:t.map(e=>[e.x,e.y,e.z,e.m]),hasZ:!0,hasM:!0,spatialReference:n}):new r.A(t.map(e=>[e.x,e.y,e.z]),n);break}case"polyline":{const n=e,i=[],s=[],{hasZ:l,hasM:a}=e;let o=0;for(const e of n.paths)if(s.push([o,o+e.length]),o+=e.length,l&&a)for(const t of e)i.push(new C(t[0],t[1],t[2],t[3]));else if(l)for(const t of e)i.push(new C(t[0],t[1],t[2]));else if(a)for(const t of e)i.push(new C(t[0],t[1],null,t[2]));else for(const t of e)i.push(new C(t[0],t[1]));t.coordinates=i,t._exporter=(t,n)=>{const i=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),l=s.map(e=>i.slice(e[0],e[1]));return new u.A({paths:l,hasM:e.hasM,hasZ:!0,spatialReference:n})};break}}return t}}class C{constructor(e,t,n=null,i=null,s=null,l=null){this.x=e,this.y=t,this.z=n,this.m=i,this.tile=s,this.elevationTile=l}clone(){return new C(this.x,this.y,this.z,this.m)}}class I{constructor(e,t){this.layer=e,this.options=t}}class z extends I{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(i,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){const e={},t=[];for(const n of this.geometry.coordinates){const i=n.tile;if(!i)continue;const s=n.tile?.id;n.elevationTile||!s||e[s]||(e[s]=i,t.push(i))}return t}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>{t.tile=null})}}class M extends I{constructor(e,t,n,i){super(e,n),this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent),this.maskExtents=i}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n);if(!e)return i.length-1;const s=this.extent;if(null==s)return-1;for(let n=i.length-1;n>=0;n--){const l=i[n],a=l.resolution*t.size[0],o=l.resolution*t.size[1];if(Math.ceil(s.width/a)*Math.ceil(s.height/o)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=S(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void t?.(n);let i=!1;e(n,()=>i=!0),i?t?.(n):this._candidateTiles.push(n)}),this._candidateTiles=S(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:i}=this.layer,s=k(n,i)[e],l=n.tileAt(s.level,t.xmin,t.ymin),a=l.extent;if(null==a)return;const o=s.resolution*n.size[0],r=s.resolution*n.size[1],c=Math.ceil((t.xmax-a[0])/o),u=Math.ceil((t.ymax-a[1])/r);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const i=new E.U(null,l.level,l.row-e,l.col+t);n.updateTileInfo(i),this._tileIsMasked(i)||this._candidateTiles.push(i)}}_tileIsMasked(e){return!!this.maskExtents&&this.maskExtents.some(t=>e.extent&&(0,f.gR)(t,e.extent))}}function V(e,t,n=0){const i=k(e,t);let s=i.length-1;if(n>0){const t=n/(0,o.GA)(e.spatialReference),l=i.findIndex(e=>e.resolution<t);0===l?s=0:l>0&&(s=l-1)}return s}const b={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0};function k(e,t){const n=e.lods;if($(t)){const{effectiveMinLOD:e,effectiveMaxLOD:i}=t;return n.filter(t=>t.level>=e&&t.level<=i)}return n}async function F(e,t){const n=e.getTilesToFetch(),i={},s=e.options.cache,l=e.options.noDataValue,o=n.map(async n=>{if(null==n.id)return;const a=`${e.layer.uid}:${n.id}:${l}`,o=null!=s?s.get(a):null,r=null!=o?o:await e.layer.fetchTile(n.level,n.row,n.col,{noDataValue:l,signal:t});null!=s&&s.put(a,r),i[n.id]=new A(n,r)});await(0,a.qr)(Promise.allSettled(o),t),e.populateElevationTiles(i)}function S(e,t){const n={},i=[];for(const s of e){const e=s.id;e&&!n[e]?(n[e]=s,i.push(s)):t?.(s)}const s=i.sort((e,t)=>e.level-t.level);return s.filter((e,n)=>{for(let i=0;i<n;i++){const n=s[i].extent;if(n&&e.extent&&(0,f.gR)(n,e.extent))return t?.(e),!1}return!0})}function $(e){return null!=e?.tileInfo}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3492],{63492:(e,t,n)=>{n.d(t,{ElevationQuery:()=>q});var i=n(60999),s=n(49186),l=n(97768),a=n(74887),o=n(83047),r=n(48526),c=n(86738),u=n(82799),h=n(98988),f=n(19419),p=(n(44208),n(36563)),m=n(53966),d=n(28735);const y=()=>m.A.getLogger("esri.layers.support.ElevationSampler");class x{queryElevation(e){return function(e,t){const n=T(e,t.spatialReference);if(!n)return null;switch(e.type){case"point":!function(e,t,n){e.z=n.elevationAt(t.x,t.y)}(e,n,t);break;case"polyline":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.paths.length;s++){const l=e.paths[s],a=t.paths[s];for(let e=0;e<l.length;e++){const t=l[e],s=a[e];g.x=s[0],g.y=s[1],i&&(t[3]=t[2]),t[2]=n.elevationAt(g.x,g.y)}}e.hasZ=!0}(e,n,t);break;case"multipoint":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.points.length;s++){const l=e.points[s],a=t.points[s];g.x=a[0],g.y=a[1],i&&(l[3]=l[2]),l[2]=n.elevationAt(g.x,g.y)}e.hasZ=!0}(e,n,t)}return e}(e.clone(),this)}on(){return(0,p.hA)()}projectIfRequired(e,t){return T(e,t)}}class v extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){super(),this.tile=e,this.noDataValue=n;const i=e.tile.extent;this.extent=(0,f.w1)(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const s=(0,o.GA)(t.spatialReference),l=t.lodAt(e.tile.level).resolution*s;this.demResolution={min:l,max:l}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,f.Rj)(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,i=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${i})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class w extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let i;super(),"number"==typeof t?(this.noDataValue=t,i=null):(i=t,this.noDataValue=n),this.samplers=i?e.map(e=>new v(e,i,this.noDataValue)):e;const s=this.samplers[0];if(s){this.extent=s.extent.clone();const{min:e,max:t}=s.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<this.samplers.length;e++){const t=this.samplers[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else this.extent=(0,f.w1)((0,f.vt)(),i.spatialReference),this.demResolution={min:0,max:0}}elevationAt(e,t){let n,i=!1;for(const s of this.samplers)if(s.containsAt(e,t)&&(i=!0,n=s.elevationAt(e,t),n!==s.noDataValue))return n;return null!=n?n:(i||y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}}function T(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const i=(0,d.Cv)(e,t);return i||y().error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),i}const g=new c.A;class R{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class A{constructor(e,t=null){if(this.tile=e,null!=t&&null!=e){const n=e.extent;this._samplerData=new R(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:i,dx:s,dy:l,y1:a,x0:o}=this._samplerData,{width:r,values:c,noDataValue:u}=i,h=_(l*(a-t),0,n),f=_(s*(e-o),0,n),p=Math.floor(h),m=Math.floor(f),d=p*r+m,y=d+r,x=c[d],v=c[y],w=c[d+1],T=c[y+1];if(x!==u&&v!==u&&w!==u&&T!==u){const e=f-m,t=x+(w-x)*e;return t+(v+(T-v)*e-t)*(h-p)}}}function _(e,t,n){return e<t?t:e>n?n:e}var E=n(72802);class q{async queryAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const i=D.fromGeometry(t);let l=!1;n?.returnSampleInfo||(l=!0);const a={...b,...n,returnSampleInfo:!0},o=await this.query(e[e.length-1],i,a),r=await this._queryAllContinue(e,o,a);return r.geometry=r.geometry.export(),l&&delete r.sampleInfo,r}async query(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof D)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new s.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const i={...b,...n},a=new z(e,t.spatialReference,i),r=i.signal;return await e.load({signal:r}),await async function(e,t,n){let i;const l=e.layer.tileInfo.spatialReference;if(t instanceof D?i=await t.project(l,n):(await(0,h.initializeProjection)([{source:t.spatialReference,dest:l}],{signal:n}),i=(0,h.project)(t,l)),!i)throw new s.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${l.wkid}'`);e.geometry=D.fromGeometry(i)}(a,t,r),await this._selectTiles(a,r),await F(a,r),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let i=e.options.noDataValue;if(n){const e=n.sample(t.x,t.y);null!=e?i=e:t.elevationTile=null}t.z=i})}(a),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,l.Lw)(n);const i={geometry:n.export(),noDataValue:e.options.noDataValue};return e.options.returnSampleInfo&&(i.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,o.GA)(t.spatialReference);return e.geometry.coordinates.map(i=>{let s=-1;return i.elevationTile&&i.elevationTile!==e.outsideExtentTile&&(s=t.lodAt(i.elevationTile.tile.level).resolution*n),{demResolution:s}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),i}(a,r)}async createSampler(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n};return this._createSampler(e,t,i)}async createSamplerAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n,returnSampleInfo:!0},l=await this._createSampler(e[e.length-1],t,i);return this._createSamplerAllContinue(e,t,l,i)}async _createSampler(e,t,n,i){const s=n.signal;await e.load({signal:s});const l=t.spatialReference,a=e.tileInfo.spatialReference;l.equals(a)||(await(0,h.initializeProjection)([{source:l,dest:a}],{signal:s}),t=(0,h.project)(t,a));const o=new M(e,t,n,i);return await this._selectTiles(o,s),await F(o,s),new w(o.elevationTiles,o.layer.tileInfo,o.options.noDataValue)}async _createSamplerAllContinue(e,t,n,i){if(e.pop(),!e.length)return n;const s=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,f.VY)(e.extent)),l=await this._createSampler(e[e.length-1],t,i,s);if(0===l.samplers.length)return n;const a=n.samplers.concat(l.samplers),o=new w(a,i.noDataValue);return this._createSamplerAllContinue(e,t,o,i)}async _queryAllContinue(e,t,n){const i=e.pop(),s=t.geometry.coordinates,a=t.sampleInfo;(0,l.Lw)(a);const o=[],r=[];for(let t=0;t<s.length;t++){const n=a[t];n.demResolution>=0?n.source||(n.source=i):e.length&&(o.push(s[t]),r.push(t))}if(!e.length||0===o.length)return t;const c=t.geometry.clone(o),u=await this.query(e[e.length-1],c,n),h=u.sampleInfo;if(!h)throw new Error("no sampleInfo");return r.forEach((e,t)=>{s[e].z=u.geometry.coordinates[t].z,a[e].demResolution=h[t].demResolution}),this._queryAllContinue(e,t,n)}async _selectTiles(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new A(null);t.sample=()=>e.options.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const i=e.x,s=e.y;(i<n.xmin||i>n.xmax||s<n.ymin||s>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.options.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=t/(0,o.GA)(n.spatialReference),l=k(n,i);let a=l[0],r=0;for(let e=1;e<l.length;e++){const t=l[e];Math.abs(t.resolution-s)<Math.abs(a.resolution-s)&&(a=t,r=e)}return r}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(e,t);else{if("auto"!==n)throw new s.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(e,t)}}async _selectTilesFinestContiguous(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=V(n,i,e.options.minDemResolution);await this._selectTilesFinestContiguousAt(e,s,t)}async _selectTilesFinestContiguousAt(e,t,n){const i=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const l=i.tilemapCache,o=e.getTilesToFetch();try{if(l&&!$(l))await(0,a.qr)(Promise.all(o.map(e=>l.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await F(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new s.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(i){(0,a.QP)(i),await this._selectTilesFinestContiguousAt(e,t-1,n)}}async _selectTilesAuto(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,i=V(t,n,e.options.minDemResolution);e.selectTilesAtLOD(i,e.options.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const i={},s=e=>{null!=e.id&&(e.id in i?i[e.id]++:(i[e.id]=1,n++))},l=e=>{if(null==e.id)return;const t=i[e.id];1===t?(delete i[e.id],n--):i[e.id]=t-1};e.forEachTileToFetch(s,l);let a=!0;for(;a&&(a=!1,e.forEachTileToFetch(i=>{n<=e.options.maximumAutoTileRequests||(l(i),t.upsampleTile(i)&&(a=!0),s(i))},l),a););}(e);const n=e.layer.tilemapCache;if(!n||$(n))return this._selectTilesAutoPrefetchUpsample(e,t);const s=e.getTilesToFetch(),l={},o=s.map(async e=>{const s=new E.U(null,0,0,0,(0,f.vt)()),o=await(0,i.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,s,{signal:t}));!1!==o.ok?null!=e.id&&(l[e.id]=s):(0,a.QP)(o.error)});await(0,a.qr)(Promise.all(o),t),e.remapTiles(l)}async _selectTilesAutoPrefetchUpsample(e,t){const n=e.layer.tileInfo;await F(e,t);let i=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?i=!0:t()}),i&&await this._selectTilesAutoPrefetchUpsample(e,t)}}class D{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new D;return t.geometry=this.geometry,t.spatialReference=this.spatialReference,t.coordinates=e||this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,h.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new r.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,h.project)(n,e);if(!i)return null;const s=this.coordinates.map((e,t)=>{const n=e.clone(),s=i.points[t];return n.x=s[0],n.y=s[1],n}),l=this.clone(s);return l.spatialReference=e,l}static fromGeometry(e){const t=new D;if(t.geometry=e,t.spatialReference=e.spatialReference,e instanceof D)t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const i=e.clone(t);return i.spatialReference=n,i};else switch(e.type){case"point":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?[new C(n.x,n.y,n.z,n.m)]:i?[new C(n.x,n.y,n.z)]:s?[new C(n.x,n.y,null,n.m)]:[new C(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new c.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new c.A(t[0].x,t[0].y,t[0].z,n);break}case"multipoint":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?n.points.map(e=>new C(e[0],e[1],e[2],e[3])):i?n.points.map(e=>new C(e[0],e[1],e[2])):s?n.points.map(e=>new C(e[0],e[1],null,e[2])):n.points.map(e=>new C(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new r.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:n}):new r.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:n});break}case"polyline":{const n=e,i=[],s=[],{hasZ:l,hasM:a}=e;let o=0;for(const e of n.paths)if(s.push([o,o+e.length]),o+=e.length,l&&a)for(const t of e)i.push(new C(t[0],t[1],t[2],t[3]));else if(l)for(const t of e)i.push(new C(t[0],t[1],t[2]));else if(a)for(const t of e)i.push(new C(t[0],t[1],null,t[2]));else for(const t of e)i.push(new C(t[0],t[1]));t.coordinates=i,t._exporter=(t,n)=>{const i=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),l=s.map(e=>i.slice(e[0],e[1]));return new u.A({paths:l,hasM:e.hasM,hasZ:!0,spatialReference:n})};break}}return t}}class C{constructor(e,t,n=null,i=null,s=null,l=null){this.x=e,this.y=t,this.z=n,this.m=i,this.tile=s,this.elevationTile=l}clone(){return new C(this.x,this.y,this.z,this.m)}}class I{constructor(e,t){this.layer=e,this.options=t}}class z extends I{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(i,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){const e={},t=[];for(const n of this.geometry.coordinates){const i=n.tile;if(!i)continue;const s=n.tile?.id;n.elevationTile||!s||e[s]||(e[s]=i,t.push(i))}return t}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>{t.tile=null})}}class M extends I{constructor(e,t,n,i){super(e,n),this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent),this.maskExtents=i}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n);if(!e)return i.length-1;const s=this.extent;if(null==s)return-1;for(let n=i.length-1;n>=0;n--){const l=i[n],a=l.resolution*t.size[0],o=l.resolution*t.size[1];if(Math.ceil(s.width/a)*Math.ceil(s.height/o)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=S(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void t?.(n);let i=!1;e(n,()=>i=!0),i?t?.(n):this._candidateTiles.push(n)}),this._candidateTiles=S(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:i}=this.layer,s=k(n,i)[e],l=n.tileAt(s.level,t.xmin,t.ymin),a=l.extent;if(null==a)return;const o=s.resolution*n.size[0],r=s.resolution*n.size[1],c=Math.ceil((t.xmax-a[0])/o),u=Math.ceil((t.ymax-a[1])/r);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const i=new E.U(null,l.level,l.row-e,l.col+t);n.updateTileInfo(i),this._tileIsMasked(i)||this._candidateTiles.push(i)}}_tileIsMasked(e){return!!this.maskExtents&&this.maskExtents.some(t=>e.extent&&(0,f.gR)(t,e.extent))}}function V(e,t,n=0){const i=k(e,t);let s=i.length-1;if(n>0){const t=n/(0,o.GA)(e.spatialReference),l=i.findIndex(e=>e.resolution<t);0===l?s=0:l>0&&(s=l-1)}return s}const b={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0};function k(e,t){const n=e.lods;if($(t)){const{effectiveMinLOD:e,effectiveMaxLOD:i}=t;return n.filter(t=>t.level>=e&&t.level<=i)}return n}async function F(e,t){const n=e.getTilesToFetch(),i={},s=e.options.cache,l=e.options.noDataValue,o=n.map(async n=>{if(null==n.id)return;const a=`${e.layer.uid}:${n.id}:${l}`,o=null!=s?s.get(a):null,r=null!=o?o:await e.layer.fetchTile(n.level,n.row,n.col,{noDataValue:l,signal:t});null!=s&&s.put(a,r),i[n.id]=new A(n,r)});await(0,a.qr)(Promise.allSettled(o),t),e.populateElevationTiles(i)}function S(e,t){const n={},i=[];for(const s of e){const e=s.id;e&&!n[e]?(n[e]=s,i.push(s)):t?.(s)}const s=i.sort((e,t)=>e.level-t.level);return s.filter((e,n)=>{for(let i=0;i<n;i++){const n=s[i].extent;if(n&&e.extent&&(0,f.gR)(n,e.extent))return t?.(e),!1}return!0})}function $(e){return null!=e?.tileInfo}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7721,8256],{4146:(t,e,r)=>{r.d(e,{A:()=>b});var i=r(31635),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),h=r(84952),d=r(10107),p=(r(44208),r(87811),r(40608)),y=r(5443),g=r(16930),f=r(92602),m=r(64272);let v=0,b=class extends((0,o.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(e)}catch(t){const r=e?.portalItem,i=r?.id||"unset",n=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch(t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"groundLayers"in t&&t.groundLayers.includes(e)?t.groundLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i.Cg)([(0,d.MZ)({type:y.A})],b.prototype,"fullExtent",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i.Cg)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i.Cg)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,d.MZ)({type:g.A})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,i.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i.Cg)([(0,d.MZ)()],b.prototype,"url",void 0),(0,i.Cg)([(0,d.MZ)({type:m.T})],b.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i.Cg)([(0,p.$)("esri.layers.Layer")],b)},4197:(t,e,r)=>{r.d(e,{Vj:()=>u,cj:()=>l,jh:()=>s,l5:()=>a,xm:()=>o});var i=r(34275),n=r(9093);function s(t){return t<=i.y9?new Array(t).fill(0):new Float64Array(t)}function o(t){return((0,i.iu)(t)?t.byteLength/8:t.length)<=i.y9?Array.from(t):new Float64Array(t)}function a(t,e,r){return Array.isArray(t)?t.slice(e,e+r):t.subarray(e,e+r)}function l(t){return[...t]}function u(t){const e=(0,n.vt)();for(let r=0;r<16;++r)e[r]=t[r];return e}},4902:(t,e,r)=>{r.d(e,{PH:()=>a,sA:()=>o});var i=r(31635),n=r(40608);let s=0;const o=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable")],r),r},a=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],r),r};o(class{})},6867:(t,e,r)=>{r.d(e,{i:()=>c});var i=r(58083),n=r(9093),s=r(38954),o=r(51850),a=r(87317),l=r(91829),u=r(71351);class c{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.g)(d,this.ray.direction,this.distance),(0,s.l)(d))}withinDistance(t){return!!h(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!h(this)&&((0,s.g)(d,this.ray.direction,this.distance),(0,s.f)(t,this.ray.origin,d),!0)}getTransformedNormal(t){return(0,s.c)(p,this.normal),p[3]=0,(0,a.t)(p,p,this.transformation),(0,s.c)(t,p),(0,s.n)(t,t)}constructor(t){this.intersector=0,this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,u.vt)(),this.init(t)}init(t){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=0,(0,u.C)(t,this._ray)}set(t,e,r,a,l,u,c){this.intersector=t,this.distance=r,(0,s.c)(this.normal,a??o.Cb),(0,i.C)(this.transformation,l??n.zK),this.target=e,this.drapedLayerOrder=u,this.renderPriority=c}copy(t){(0,u.C)(t.ray,this._ray),this.intersector=t.intersector,this.distance=t.distance,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.renderPriority=t.renderPriority,(0,s.c)(this.normal,t.normal),(0,i.C)(this.transformation,t.transformation)}}function h(t){return null!=t?.distance}const d=(0,o.vt)(),p=(0,l.vt)()},9093:(t,e,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(e,{o8:()=>n,vt:()=>i,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:n,create:i,fromValues:function(t,e,r,i,n,s,o,a,l,u,c,h,d,p,y,g){return[t,e,r,i,n,s,o,a,l,u,c,h,d,p,y,g]}},Symbol.toStringTag,{value:"Module"}))},29133:(t,e,r)=>{r.d(e,{xH:()=>o,N1:()=>l}),r(38954);var i=r(51850),n=r(71351),s=(r(58083),r(70328),r(97937),r(6867),r(65215));function o(t,e){return a(t)===a(e)}function a(t){if(null==t)return null;const e=null!=t.layer?t.layer.id:"";let r=null;return r=null!=t.objectId?t.objectId:null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid,null==r?null:`o-${e}-${r}`}s.R,s.H,s.R,s.R,s.R,r(49718),r(87582),(0,i.vt)();const l={json:{write:{writer:function(t,e){null!=t?.layer?.objectIdField&&null!=t.attributes&&(e.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}},clonable:"reference"};(0,n.vt)(),(0,i.vt)()},49718:(t,e,r)=>{r(51850),r(6867).i},62885:(t,e,r)=>{r.d(e,{H:()=>s,V:()=>n});var i=r(7762);function n(t,e,r=i.A){return e||(e=new r),e===t||e.destroyed||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},64272:(t,e,r)=>{r.d(e,{T:()=>d});var i,n=r(31635),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),h=r(98623);let d=class extends s.o{static{i=this}static get allTime(){return p}static get empty(){return y}static fromArray(t){return new i({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===i&&r===n}expandTo(t,e=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,t,e));let n=this.end;if(n){const r=(0,o.lL)(n,t,e);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,t,e)}return new i({start:r,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,a;return n>=e&&n<=r?o=n:e>=n&&e<=s&&(o=e),r>=n&&r<=s?a=r:s>=e&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,r=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,r)),null!=a&&(n.end=(0,o.S1)(a,t,e,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],d.prototype,"writeStart",null),d=i=(0,n.Cg)([(0,u.$)("esri.time.TimeExtent")],d);const p=new d,y=new d({start:void 0,end:void 0})},65215:(t,e,r)=>{r.d(e,{H:()=>i,R:()=>n});class i{constructor(t){this.layerViewUid=t}}class n extends i{constructor(t,e){super(t),this.graphicUid=e}}},70328:(t,e,r)=>{r.d(e,{BI:()=>b,DC:()=>h,Ej:()=>p,Ie:()=>m,Jt:()=>v,Ne:()=>y,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>l,hZ:()=>f,iT:()=>d,is:()=>M,qv:()=>A,vI:()=>g,vY:()=>a,v_:()=>O,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(t=O){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e,r,i,n,o,a=s()){return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function a(t,e=s()){return function(t,e,r,i=s()){return f(i,A),function(t,e,r=0,i=e.length/3){let n=t[0],s=t[1],o=t[2],a=t[3],l=t[4],u=t[5];for(let t=0;t<i;t++)n=Math.min(n,e[r+3*t]),s=Math.min(s,e[r+3*t+1]),o=Math.min(o,e[r+3*t+2]),a=Math.max(a,e[r+3*t]),l=Math.max(l,e[r+3*t+1]),u=Math.max(u,e[r+3*t+2]);t[0]=n,t[1]=s,t[2]=o,t[3]=a,t[4]=l,t[5]=u}(i,t,e,r),i}(t,0,t.length/3,e)}function l(t,e=(0,n.jh)(24)){const[r,i,s,o,a,l]=t;return e[0]=r,e[1]=i,e[2]=s,e[3]=r,e[4]=i,e[5]=l,e[6]=r,e[7]=a,e[8]=s,e[9]=r,e[10]=a,e[11]=l,e[12]=o,e[13]=i,e[14]=s,e[15]=o,e[16]=i,e[17]=l,e[18]=o,e[19]=a,e[20]=s,e[21]=o,e[22]=a,e[23]=l,e}function u(t,e){const r=isFinite(t[2])||isFinite(t[5]);return new i.A(r?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function h(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function p(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function y(t,e,r=t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r!==t&&(r[3]=t[3],r[4]=t[4],r[5]=t[5]),r}function g(t,e,r=t){return r[3]=e[0],r[4]=e[1],r[5]=e[2],r!==t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),t}function f(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function m(t){return t?f(t,A):s(A)}function v(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function b(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=Number.NEGATIVE_INFINITY,t[3]=i,t[4]=n,t[5]=Number.POSITIVE_INFINITY,t}function M(t){return 6===t.length}function w(t,e,r){if(null==t||null==e)return t===e;if(!M(t)||!M(e))return!1;if(r){for(let i=0;i<t.length;i++)if(!r(t[i],e[i]))return!1}else for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}const A=[1/0,1/0,1/0,-1/0,-1/0,-1/0],O=[0,0,0,0,0,0];s()},78553:(t,e,r)=>{r.d(e,{D:()=>s,p:()=>n});var i=r(56507);function n(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,r)=>{r.d(e,{A:()=>p});var i=r(31635),n=r(69540),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.P{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,i.Cg)([(0,s.MZ)()],a.prototype,"type",void 0),a=(0,i.Cg)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],a);const l=a;var u=r(65008),c=r(4902),h=r(25482);let d=0,p=class extends((0,h.T)((0,n.O)((0,c.sA)(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${d++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}equals(t){return!0}};(0,i.Cg)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],p.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({clonable:!1,value:null})],p.prototype,"parent",null),(0,i.Cg)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":l}}})],p.prototype,"origin",void 0),p=(0,i.Cg)([(0,o.$)("esri.analysis.Analysis")],p)},87582:(t,e,r)=>{r(6867),r(65215).R},92071:(t,e,r)=>{r.d(e,{P:()=>v,L:()=>b});var i=r(31635),n=r(65008),s=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,r=this._originStores[0];r&&r.forEach((t,r)=>{e.set(r,(0,o.o8)(t),0)});for(let r=2;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(i),r)})}return e}get(t,e){const r=void 0===e?this._values:this._originStores[e];return r?r.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,r=7){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=r){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,r),i!==e}return!1}delete(t,e=7){const r=this._originStores[e];if(!r)return;const i=r.get(t);if(r.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let r=e-1;r>=0;r--){const e=this._originStores[r];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,r);break}}}return i}has(t,e){const r=void 0===e?this._values:this._originStores[e];return!!r&&r.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const r=this._originStores[e],i=r?.get(t),n=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),n!==i}originOf(t){return this._propertyOriginMap.get(t)||0}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=r(45917),c=r(88620),h=r(40608);const d=t=>{const e=t;let r=class extends e{constructor(...t){super(...t);const e=(0,c.oY)(this),r=e.store,i=new l;e.store=i,(0,s.k)(e,r,i)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const r=p(this),i=(0,a.aB)(e);if("string"==typeof t)return r.get(t,i);const n={};return t.forEach(t=>{n[t]=r.get(t,i)}),n}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return p(this).originOf(t)}revert(t,e){const r=p(this),i=(0,a.aB)(e),n=(0,c.oY)(this);let s;s="string"==typeof t?"*"===t?r.keys(i):[t]:t,s.forEach(t=>{n.invalidate(t),r.revert(t,i),n.commit(t)})}};return r=(0,i.Cg)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function p(t){return(0,c.oY)(t).store}d(n.A);var y=r(16649),g=r(49422);const f=t=>{const e=t;let r=class extends e{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,g.M)(this,t=t||{},e),t}setAtOrigin(t,e,r){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(r))}removeOrigin(t){const e=m(this),r=(0,a.aB)(t),i=e.keys(r);for(const t of i)e.originOf(t)===r&&e.set(t,e.get(t,r),7)}updateOrigin(t,e){const r=m(this),i=(0,a.aB)(e),n=(0,y.Jt)(this,t);for(let e=i+1;e<a.AU;++e)r.delete(t,e);r.set(t,n,i)}toJSON(t){return this.write({},t)}};return r=(0,i.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function m(t){return(0,c.oY)(t).store}const v=t=>{const e=f(d(t));let r=class extends e{constructor(...t){super(...t)}};return r=(0,i.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport")],r),r},b=v(n.A)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6638],{5760:(t,e,i)=>{i.d(e,{NM:()=>n,Tb:()=>h,_R:()=>l,h9:()=>s,rM:()=>a,x0:()=>p,y7:()=>y});var o=i(34727),r=i(56507);const s=["none","underline","line-through"],l=["normal","italic","oblique"],n=["normal","lighter","bold","bolder"],h={type:Number,cast:t=>{const e=(0,r.GB)(t);return 0===e?1:(0,o.qE)(e,.1,4)},nonNullable:!0},a={type:["left","right","center"],nonNullable:!0},p={type:["baseline","top","middle","bottom"],nonNullable:!0},y=8},11831:(t,e,i)=>{i.d(e,{A:()=>y});var o,r=i(31635),s=i(25482),l=i(90629),n=i(10107),h=i(79901),a=(i(44208),i(87811),i(40608)),p=i(5760);let y=o=class extends s.o{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return(0,l.cr)(t)}clone(){return new o({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,r.Cg)([(0,n.MZ)({type:p.h9,json:{default:"none",write:!0}})],y.prototype,"decoration",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],y.prototype,"family",void 0),(0,r.Cg)([(0,n.MZ)({type:Number,json:{write:{overridePolicy:(t,e,i)=>({enabled:!i||!i.textSymbol3D})}}})],y.prototype,"size",void 0),(0,r.Cg)([(0,h.w)("size")],y.prototype,"castSize",null),(0,r.Cg)([(0,n.MZ)({type:p._R,json:{default:"normal",write:!0}})],y.prototype,"style",void 0),(0,r.Cg)([(0,n.MZ)({type:p.NM,json:{default:"normal",write:!0}})],y.prototype,"weight",void 0),y=o=(0,r.Cg)([(0,a.$)("esri.symbols.Font")],y)},20378:(t,e,i)=>{i.d(e,{A:()=>d});var o=i(31635),r=i(68197),s=i(66552),l=i(25482),n=i(10107),h=(i(44208),i(53966),i(87811),i(36005)),a=i(40608);const p=new s.J({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let y=0,d=class extends l.o{constructor(t){super(t),this.id="sym"+y++,this.type=null,this.color=new r.A([0,0,0,1])}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}async collectRequiredFields(t,e){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,o.Cg)([(0,n.MZ)({type:p.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:p.write,isRequired:!0}}})],d.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:r.A,json:{write:{allowNull:!0}}})],d.prototype,"color",void 0),(0,o.Cg)([(0,h.w)("color")],d.prototype,"readColor",null),d=(0,o.Cg)([(0,a.$)("esri.symbols.Symbol")],d)},31593:(t,e,i)=>{i.d(e,{A:()=>v});var o=i(31635),r=i(66552),s=i(4718),l=i(90629),n=i(10107),h=(i(44208),i(53966),i(93223)),a=i(40608),p=(i(87811),i(20378));let y=class extends p.A{constructor(t){super(t),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};(0,o.Cg)([(0,h.e)({esriSLS:"simple-line"},{readOnly:!0})],y.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:Number,cast:l.cr,json:{write:!0}})],y.prototype,"width",void 0),y=(0,o.Cg)([(0,a.$)("esri.symbols.LineSymbol")],y);var d,u=i(68197),g=i(25482),c=i(36005),m=i(43937),S=i(83213);let b=d=class extends g.o{constructor(t){super(t),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(t,e,i,o){e[i]="web-map"===o?.origin?"arrow":t}set color(t){this._set("color",t)}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}writeColor(t,e,i,o){"web-map"===o?.origin||(e[i]=t)}clone(){return new d({color:(0,s.o8)(this.color),placement:this.placement,style:this.style})}hash(){return`${this.placement}.${this.color?.hash()}.${this.style}`}};(0,o.Cg)([(0,n.MZ)({type:["begin","end","begin-end"],json:{write:!0}})],b.prototype,"placement",void 0),(0,o.Cg)([(0,h.e)({"line-marker":"line-marker"},{readOnly:!0}),(0,n.MZ)({json:{origins:{"web-map":{write:!1}}}})],b.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:S.z})],b.prototype,"style",void 0),(0,o.Cg)([(0,m.K)("style")],b.prototype,"writeStyle",null),(0,o.Cg)([(0,n.MZ)({type:u.A,value:null,json:{write:{allowNull:!0}}})],b.prototype,"color",null),(0,o.Cg)([(0,c.w)("color")],b.prototype,"readColor",null),(0,o.Cg)([(0,m.K)("color")],b.prototype,"writeColor",null),b=d=(0,o.Cg)([(0,a.$)("esri.symbols.LineSymbolMarker")],b);const C=b;var w;const f=new r.J({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let v=w=class extends y{constructor(...t){super(...t),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(t,e,i,o,r,s){if(t&&"string"!=typeof t)return t;const n={};return null!=t&&(n.style=t),null!=e&&(n.color=e),null!=i&&(n.width=(0,l.cr)(i)),null!=o&&(n.cap=o),null!=r&&(n.join=r),null!=s&&(n.miterLimit=(0,l.cr)(s)),n}clone(){return new w({color:(0,s.o8)(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:this.marker?.clone()})}hash(){return`${super.hash()}.${this.color?.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${this.marker?.hash()}`}};(0,o.Cg)([(0,h.e)({esriSLS:"simple-line"},{readOnly:!0})],v.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:f.apiValues,json:{read:f.read,write:f.write}})],v.prototype,"style",void 0),(0,o.Cg)([(0,n.MZ)({type:["butt","round","square"],json:{write:{overridePolicy:(t,e,i)=>({enabled:"round"!==t&&null==i?.origin})}}})],v.prototype,"cap",void 0),(0,o.Cg)([(0,n.MZ)({type:["miter","round","bevel"],json:{write:{overridePolicy:(t,e,i)=>({enabled:"round"!==t&&null==i?.origin})}}})],v.prototype,"join",void 0),(0,o.Cg)([(0,n.MZ)({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":C}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],v.prototype,"marker",void 0),(0,o.Cg)([(0,n.MZ)({type:Number,json:{read:!1,write:!1}})],v.prototype,"miterLimit",void 0),v=w=(0,o.Cg)([(0,a.$)("esri.symbols.SimpleLineSymbol")],v)},53930:(t,e,i)=>{i.d(e,{A:()=>m});var o,r=i(31635),s=i(68197),l=i(66552),n=i(4718),h=i(90629),a=i(10107),p=(i(44208),i(53966),i(93223)),y=i(40608),d=i(43937),u=i(89420),g=i(31593);const c=new l.J({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let m=o=class extends u.A{constructor(...t){super(...t),this.color=new s.A([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new g.A}normalizeCtorArgs(t,e,i,o){if(t&&"string"!=typeof t)return t;const r={};return t&&(r.style=t),null!=e&&(r.size=(0,h.cr)(e)),i&&(r.outline=i),o&&(r.color=o),r}writeColor(t,e){t&&"x"!==this.style&&"cross"!==this.style&&(e.color=t.toJSON()),null===t&&(e.color=null)}set path(t){this.style="path",this._set("path",t)}clone(){return new o({angle:this.angle,color:(0,n.o8)(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${this.outline?.hash()}`}};(0,r.Cg)([(0,a.MZ)()],m.prototype,"color",void 0),(0,r.Cg)([(0,d.K)("color")],m.prototype,"writeColor",null),(0,r.Cg)([(0,p.e)({esriSMS:"simple-marker"},{readOnly:!0})],m.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],m.prototype,"size",void 0),(0,r.Cg)([(0,a.MZ)({type:c.apiValues,json:{read:c.read,write:c.write}})],m.prototype,"style",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"path",null),(0,r.Cg)([(0,a.MZ)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":g.A}},json:{default:null,write:!0}})],m.prototype,"outline",void 0),m=o=(0,r.Cg)([(0,y.$)("esri.symbols.SimpleMarkerSymbol")],m)},65851:(t,e,i)=>{i.d(e,{A:()=>h});var o=i(31635),r=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),l=i(31593),n=i(20378);let h=class extends n.A{constructor(t){super(t),this.outline=null,this.type=null}hash(){return`${this.type}.${this.outline?.hash()}`}};(0,o.Cg)([(0,r.MZ)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":l.A}},json:{default:null,write:!0}})],h.prototype,"outline",void 0),(0,o.Cg)([(0,r.MZ)({type:["simple-fill","picture-fill"],readOnly:!0})],h.prototype,"type",void 0),h=(0,o.Cg)([(0,s.$)("esri.symbols.FillSymbol")],h)},68197:(t,e,i)=>{i.d(e,{A:()=>h});var o=i(40876),r=i(34727),s=i(56507);function l(t){return(0,r.qE)((0,s.Vr)(t),0,255)}function n(t,e){const i=t.toString(16).padStart(2,"0");return e?i.slice(0,1):i}class h{static blendColors(t,e,i,o=new h){return o.r=Math.round(t.r+(e.r-t.r)*i),o.g=Math.round(t.g+(e.g-t.g)*i),o.b=Math.round(t.b+(e.b-t.b)*i),o.a=t.a+(e.a-t.a)*i,o._sanitize()}static fromRgb(t,e){const i=(0,o.lT)(t);return i?h.fromArray(i,e):null}static fromHex(t,e=new h){const i=(0,o.oW)(t);return i?h.fromArray(i,e):null}static fromArray(t,e=new h){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,o.Eq)(t);return i?h.fromArray(i,e):null}static fromJSON(t){return null!=t?new h([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?h.fromString(t,this):Array.isArray(t)?h.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,o=3===i||4===i,r=4===i||8===i,s=`#${n(this.r,o)}${n(this.g,o)}${n(this.b,o)}${r?n(Math.round(255*this.a),o):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=0){const e=l(this.r),i=l(this.g),o=l(this.b);return 0===t||1!==this.a?[e,i,o,l(255*this.a)]:[e,i,o]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,o.c1)(this.r),this.g=(0,o.c1)(this.g),this.b=(0,o.c1)(this.b),this.a=(0,o.G1)(this.a),this}_set(t,e,i,o){this.r=t,this.g=e,this.b=i,this.a=o}}h.prototype.declaredClass="esri.Color"},68249:(t,e,i)=>{i.d(e,{A:()=>m});var o,r=i(31635),s=i(68197),l=i(4718),n=i(90629),h=i(10107),a=i(79901),p=i(93223),y=i(40608),d=i(43937),u=i(11831),g=i(20378),c=i(5760);let m=o=class extends g.A{constructor(...t){super(...t),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new u.A,this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(t,e,i){if(t&&"string"!=typeof t)return t;const o={};return t&&(o.text=t),e&&(o.font=e),i&&(o.color=i),o}writeLineWidth(t,e,i,o){o&&"string"!=typeof o?o.origin:e[i]=t}castLineWidth(t){return(0,n.cr)(t)}writeLineHeight(t,e,i,o){o&&"string"!=typeof o?o.origin:e[i]=t}clone(){return new o({angle:this.angle,backgroundColor:(0,l.o8)(this.backgroundColor),borderLineColor:(0,l.o8)(this.borderLineColor),borderLineSize:this.borderLineSize,color:(0,l.o8)(this.color),font:this.font&&this.font.clone(),haloColor:(0,l.o8)(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${this.backgroundColor?.hash()}.${this.borderLineColor}.${this.borderLineSize}.${this.color?.hash()}.${this.font&&this.font.hash()}.${this.haloColor?.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};(0,r.Cg)([(0,h.MZ)({type:s.A,json:{write:!0}})],m.prototype,"backgroundColor",void 0),(0,r.Cg)([(0,h.MZ)({type:s.A,json:{write:!0}})],m.prototype,"borderLineColor",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,json:{write:!0},cast:n.cr})],m.prototype,"borderLineSize",void 0),(0,r.Cg)([(0,h.MZ)({type:u.A,json:{write:!0}})],m.prototype,"font",void 0),(0,r.Cg)([(0,h.MZ)({...c.rM,json:{write:!0}})],m.prototype,"horizontalAlignment",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"kerning",void 0),(0,r.Cg)([(0,h.MZ)({type:s.A,json:{write:!0}})],m.prototype,"haloColor",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,cast:n.cr,json:{write:!0}})],m.prototype,"haloSize",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"rightToLeft",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"rotated",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],m.prototype,"text",void 0),(0,r.Cg)([(0,p.e)({esriTS:"text"},{readOnly:!0})],m.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)({...c.x0,json:{write:!0}})],m.prototype,"verticalAlignment",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,cast:n.cr,json:{write:!0}})],m.prototype,"xoffset",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,cast:n.cr,json:{write:!0}})],m.prototype,"yoffset",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],m.prototype,"angle",void 0),(0,r.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],m.prototype,"width",void 0),(0,r.Cg)([(0,h.MZ)({type:Number})],m.prototype,"lineWidth",void 0),(0,r.Cg)([(0,d.K)("lineWidth")],m.prototype,"writeLineWidth",null),(0,r.Cg)([(0,a.w)("lineWidth")],m.prototype,"castLineWidth",null),(0,r.Cg)([(0,h.MZ)(c.Tb)],m.prototype,"lineHeight",void 0),(0,r.Cg)([(0,d.K)("lineHeight")],m.prototype,"writeLineHeight",null),m=o=(0,r.Cg)([(0,y.$)("esri.symbols.TextSymbol")],m)},83213:(t,e,i)=>{i.d(e,{x:()=>o,z:()=>r});const o=["begin","end","begin-end"],r=["arrow","circle","square","diamond","cross","x"]},89420:(t,e,i)=>{i.d(e,{A:()=>a});var o=i(31635),r=i(90629),s=i(10107),l=i(56507),n=(i(44208),i(87811),i(40608)),h=i(20378);let a=class extends h.A{constructor(t){super(t),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};(0,o.Cg)([(0,s.MZ)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],a.prototype,"angle",void 0),(0,o.Cg)([(0,s.MZ)({type:["simple-marker","picture-marker"],readOnly:!0})],a.prototype,"type",void 0),(0,o.Cg)([(0,s.MZ)({type:Number,cast:r.cr,json:{write:!0}})],a.prototype,"xoffset",void 0),(0,o.Cg)([(0,s.MZ)({type:Number,cast:r.cr,json:{write:!0}})],a.prototype,"yoffset",void 0),(0,o.Cg)([(0,s.MZ)({cast:t=>"auto"===t?t:(0,l.GB)((0,r.cr)(t)),json:{write:!0}})],a.prototype,"size",void 0),a=(0,o.Cg)([(0,n.$)("esri.symbols.MarkerSymbol")],a)},94985:(t,e,i)=>{i.d(e,{A:()=>g});var o,r=i(31635),s=i(68197),l=i(66552),n=i(4718),h=i(10107),a=(i(44208),i(53966),i(93223)),p=i(40608),y=i(65851),d=i(31593);const u=new l.J({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let g=o=class extends y.A{constructor(...t){super(...t),this.color=new s.A([0,0,0,.25]),this.outline=new d.A,this.type="simple-fill",this.style="solid"}normalizeCtorArgs(t,e,i){if(t&&"string"!=typeof t)return t;const o={};return t&&(o.style=t),e&&(o.outline=e),i&&(o.color=i),o}clone(){return new o({color:(0,n.o8)(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};(0,r.Cg)([(0,h.MZ)()],g.prototype,"color",void 0),(0,r.Cg)([(0,h.MZ)()],g.prototype,"outline",void 0),(0,r.Cg)([(0,a.e)({esriSFS:"simple-fill"},{readOnly:!0})],g.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)({type:u.apiValues,json:{read:u.read,write:u.write}})],g.prototype,"style",void 0),g=o=(0,r.Cg)([(0,p.$)("esri.symbols.SimpleFillSymbol")],g)}}]);