@arcgis/core 5.2.0-next.72 → 5.2.0-next.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/analysis/ViewshedAnalysis.js +1 -1
  2. package/arcgisGlobal.d.ts +1 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{d3be4d914fc99a1d686c.js → 075e65cc4275ac886f08.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{3b3a8a6167f2e1eeb828.js → 0823961e5d0bdedbf8cf.js} +2 -2
  6. package/assets/esri/core/workers/chunks/087bd698b80ca0cea71e.js +1 -0
  7. package/assets/esri/core/workers/chunks/{b6c7b7b7f87dce5de811.js → 0bf644f93c180a2bc2f8.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{a62f1b8ed065b2a38f1a.js → 0dbf31a663b5220a3136.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{fe10a95ebe1da2322af6.js → 0df660dfd941cff3ea1d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0e81c6d4f1c81f9b0a1b.js +1 -0
  11. package/assets/esri/core/workers/chunks/{d93d0cb69f3a9a722510.js → 1418c03c4ab87f7ab5f4.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{c03da138651ac53cadcb.js → 186bedc377cc97731ca2.js} +2 -2
  13. package/assets/esri/core/workers/chunks/193aed69de2dec4f36b6.js +1 -0
  14. package/assets/esri/core/workers/chunks/1a3afee3ecd806b4aa81.js +1 -0
  15. package/assets/esri/core/workers/chunks/{359584a8fb5687a7d098.js → 264fd750691d517ab1f3.js} +1 -1
  16. package/assets/esri/core/workers/chunks/28f87daaba1ae3441364.js +1 -0
  17. package/assets/esri/core/workers/chunks/{fff23b2682590c4b21e3.js → 2a2ed7bd44010f24c2dd.js} +1 -1
  18. package/assets/esri/core/workers/chunks/2baa16ec8559e77c226f.js +1 -0
  19. package/assets/esri/core/workers/chunks/2c31648a4b95275516ee.js +1 -0
  20. package/assets/esri/core/workers/chunks/2e44978ee677aa23163d.js +256 -0
  21. package/assets/esri/core/workers/chunks/2f81047790c4890ae625.js +1 -0
  22. package/assets/esri/core/workers/chunks/305eea9c1fc4aee3309e.js +1 -0
  23. package/assets/esri/core/workers/chunks/31d19bb72a9e79b30070.js +1 -0
  24. package/assets/esri/core/workers/chunks/{fc2cae359d571690d754.js → 35fd2f765d2cb3f59a22.js} +4 -4
  25. package/assets/esri/core/workers/chunks/{6b208bac120bcfecd9e4.js → 3e2b4e734aa20a308f3e.js} +1 -1
  26. package/assets/esri/core/workers/chunks/45ccca01db0027b9dc16.js +1 -0
  27. package/assets/esri/core/workers/chunks/495f90fe3d0ad32bb82d.js +1 -0
  28. package/assets/esri/core/workers/chunks/4b5bd0c9a55ea2998601.js +1 -0
  29. package/assets/esri/core/workers/chunks/{50e0dd74795978468625.js → 4cf2b0558a4acc141429.js} +1 -1
  30. package/assets/esri/core/workers/chunks/509aecafbc629bee1c15.js +1 -0
  31. package/assets/esri/core/workers/chunks/{d901f8503a73277cfa58.js → 553be2bd69bd311477ea.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{2d3a18d56e2e5669c562.js → 64176f7ae719289a2f79.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{31669511cfddf116d991.js → 66e60351aacbd162775f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{9684ab5e8254fdfcb7bb.js → 67f54586156d1ab80257.js} +1 -1
  35. package/assets/esri/core/workers/chunks/762be5d3e6aeaea33f74.js +29 -0
  36. package/assets/esri/core/workers/chunks/76b573143d1a65fdbcb6.js +1 -0
  37. package/assets/esri/core/workers/chunks/7aaa051b51a8e34bbfb0.js +1 -0
  38. package/assets/esri/core/workers/chunks/{fa19d5923276418096da.js → 7b5b66ae79e0287e3ade.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{2cfe6f41865ffb3a4645.js → 7e373d9c98ce910db9d2.js} +1 -1
  40. package/assets/esri/core/workers/chunks/81130dbcb738d40f723b.js +1 -0
  41. package/assets/esri/core/workers/chunks/{4da993c79b373b9d304e.js → 8302bffd28cc6720e0fe.js} +2 -2
  42. package/assets/esri/core/workers/chunks/835af7b4fd92cb4e7af0.js +1 -0
  43. package/assets/esri/core/workers/chunks/859dd86c921053bf03a1.js +1 -0
  44. package/assets/esri/core/workers/chunks/877594b6db08da98acd7.js +1 -0
  45. package/assets/esri/core/workers/chunks/{96d861265566854760cd.js → 88fd698b940dadcc6dc5.js} +1 -1
  46. package/assets/esri/core/workers/chunks/8f0d4aec8bd3cbfefc40.js +1 -0
  47. package/assets/esri/core/workers/chunks/{7f208ef75ef2ce0d7cf9.js → 910c93bbbf8113a4a51f.js} +1 -1
  48. package/assets/esri/core/workers/chunks/92c4464b67fce6cea134.js +1 -0
  49. package/assets/esri/core/workers/chunks/{509cfac9e5d86a8ee449.js → 936d44c7bc3a181e64a3.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{b9953277d0cd4a01bdc6.js → 94368a097e6190ce3c7a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/947f1ea4dbc3e3419ecc.js +1 -0
  52. package/assets/esri/core/workers/chunks/9b76c8974424a1908e86.js +1 -0
  53. package/assets/esri/core/workers/chunks/{c203df41f9d2e4b80889.js → 9ca59077712e45ef4d56.js} +1 -1
  54. package/assets/esri/core/workers/chunks/9e25f715cda59c686a4c.js +1 -0
  55. package/assets/esri/core/workers/chunks/{36171c72a3c04b0d13ef.js → a0a1f0bd3648738354a6.js} +1 -1
  56. package/assets/esri/core/workers/chunks/a101152066dd56259619.js +1 -0
  57. package/assets/esri/core/workers/chunks/a2a2c7e274fb32fecffa.js +1 -0
  58. package/assets/esri/core/workers/chunks/a50421fe79f264ae3619.js +1 -0
  59. package/assets/esri/core/workers/chunks/a9053ad0f4e8c4705665.js +1 -0
  60. package/assets/esri/core/workers/chunks/aca5c524bd3c955e9243.js +1 -0
  61. package/assets/esri/core/workers/chunks/{9dda9414104f585560a4.js → ad1d06a91121ebfe9162.js} +2 -2
  62. package/assets/esri/core/workers/chunks/b1a175b3b2d1a7ddde8e.js +1 -0
  63. package/assets/esri/core/workers/chunks/{065e3353124fc5ac44ce.js → b33d870cbfa238762c5e.js} +1 -1
  64. package/assets/esri/core/workers/chunks/b3b53cf0a3a30164d337.js +1 -0
  65. package/assets/esri/core/workers/chunks/b6d26d9738c0787acc38.js +1 -0
  66. package/assets/esri/core/workers/chunks/b9c61b20bbc91cb63036.js +1 -0
  67. package/assets/esri/core/workers/chunks/bf3dc3ad8df8488da3f0.js +1 -0
  68. package/assets/esri/core/workers/chunks/bff75cc7413bf0d319db.js +1 -0
  69. package/assets/esri/core/workers/chunks/c1568bcd3f04014152e1.js +1 -0
  70. package/assets/esri/core/workers/chunks/c1a4d499a30f3d80567b.js +1 -0
  71. package/assets/esri/core/workers/chunks/c374e5d5980db74c4aca.js +1 -0
  72. package/assets/esri/core/workers/chunks/{8c76f31a363dd0c3354d.js → c46f79d5b7712adbbd1c.js} +1 -1
  73. package/assets/esri/core/workers/chunks/c67e4a848d41038367b8.js +1 -0
  74. package/assets/esri/core/workers/chunks/{684d3cb4fb233180b2d0.js → cd892c9603710d6130a9.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{fa5d27e47d47ff8fcb96.js → d03e7be74c57c3dbf003.js} +2 -2
  76. package/assets/esri/core/workers/chunks/de5013f89f0eae93978f.js +1 -0
  77. package/assets/esri/core/workers/chunks/e557043f90c051e93925.js +1 -0
  78. package/assets/esri/core/workers/chunks/{bee5e738ecf8680909c4.js → eaf26c1cc938789d5336.js} +1 -1
  79. package/assets/esri/core/workers/chunks/ebfb3cdc0df15eb05d75.js +1 -0
  80. package/assets/esri/core/workers/chunks/f1727b4a32cb6f36a5e6.js +1 -0
  81. package/assets/esri/core/workers/chunks/f4bc563c71c478d3912f.js +1 -0
  82. package/assets/esri/core/workers/chunks/fb0b89bbb4f8607d5f20.js +1 -0
  83. package/assets/esri/core/workers/chunks/fdca9873914b9dbd9244.js +1 -0
  84. package/assets/esri/core/workers/chunks/ff890167ff2baabfc4ce.js +1 -0
  85. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  86. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  87. package/chunks/Component.glsl.js +3 -3
  88. package/chunks/HUDMaterial.glsl.js +8 -8
  89. package/chunks/lyr3DMain.js +1 -1
  90. package/config.js +1 -1
  91. package/kernel.js +1 -1
  92. package/layers/DimensionFeatureLayer.d.ts +22 -0
  93. package/layers/DimensionFeatureLayer.js +1 -1
  94. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  95. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  96. package/layers/save/featureLayerUtils.js +1 -1
  97. package/layers/support/layerUtils.js +1 -1
  98. package/layers/support/layersMapping.js +1 -1
  99. package/layers/support/tiles3DUtils.js +1 -1
  100. package/layers/video/VideoController.js +1 -1
  101. package/package.json +3 -3
  102. package/support/revision.js +1 -1
  103. package/views/2d/engine/Bitmap.js +1 -1
  104. package/views/2d/engine/BitmapTile.js +1 -1
  105. package/views/2d/engine/BitmapTileContainer.js +1 -1
  106. package/views/2d/engine/flow/FlowContainer.js +1 -1
  107. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  108. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  109. package/views/2d/engine/flow/styles/Particles.js +1 -1
  110. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  111. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  112. package/views/2d/engine/imagery/RasterTile.js +1 -1
  113. package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
  114. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  115. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  116. package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
  117. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  118. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  119. package/views/2d/engine/webgl/Overlay.js +1 -1
  120. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  121. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  122. package/views/2d/engine/webgl/TileContainer.js +1 -1
  123. package/views/2d/engine/webgl/normalizedTileUtils.js +2 -0
  124. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  125. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  126. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  127. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
  132. package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
  133. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  134. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  135. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  136. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  137. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  138. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
  139. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  147. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  148. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  149. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  150. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  151. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  152. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  153. package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
  154. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  155. package/views/2d/engine/webgl/shaderGraph/techniques/raster/rasterVFUtils.js +2 -0
  156. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  157. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  158. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ClipShader.js +1 -1
  159. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  160. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  161. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DebugOverlayShader.js +1 -1
  162. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
  163. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  164. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  165. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  166. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  167. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  168. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  169. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  170. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  171. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
  172. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  173. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/Tile.js +2 -0
  174. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
  175. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js +2 -0
  176. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +1 -1
  177. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
  178. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
  179. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +1 -1
  180. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +1 -1
  181. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
  182. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  183. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  184. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterHighlightShader.js +1 -1
  185. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +1 -1
  186. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterVFTransform.js +2 -0
  187. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ReprojectShader.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
  190. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +1 -1
  191. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
  192. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
  193. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +1 -1
  195. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
  196. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  197. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  198. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  199. package/views/2d/engine/webgl/shaderGraph/techniques/utility/DebugOverlayTechnique.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  206. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  207. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  208. package/views/2d/layers/MediaLayerView2D.js +1 -1
  209. package/views/2d/layers/TileLayerView2D.js +1 -1
  210. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  211. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  212. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  213. package/views/2d/layers/support/DebugOverlay.js +1 -1
  214. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  215. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +1 -1
  216. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  217. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  218. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  219. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  220. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  221. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  222. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  223. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  224. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  225. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  226. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  227. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  228. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  229. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  230. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  231. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  232. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  233. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  234. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  235. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
  236. package/views/3d/interactive/editingTools/settings.js +1 -1
  237. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  238. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  239. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  240. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  241. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
  242. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  243. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  244. package/views/3d/interactive/manipulatorUtils.js +1 -1
  245. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  246. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  247. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  248. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  249. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  250. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  251. package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
  252. package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
  253. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  254. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  255. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  256. package/views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js +1 -1
  257. package/views/3d/webgl-engine/core/shaderLibrary/output/DepthConversion.glsl.js +14 -0
  258. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +3 -15
  259. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js +1 -1
  260. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  261. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  262. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  263. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  264. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  265. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  266. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  267. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  268. package/views/3d/webgl.js +1 -1
  269. package/views/VideoView.js +1 -1
  270. package/views/View.js +1 -1
  271. package/views/draw/DrawGraphicTool.js +1 -1
  272. package/views/draw/DrawOperation.js +1 -1
  273. package/views/draw/DrawTool.js +1 -1
  274. package/views/draw/plugins/PolylinePlugin.js +1 -1
  275. package/views/draw/support/Box.js +1 -1
  276. package/views/draw/support/InteractiveHandle.js +1 -1
  277. package/views/draw/support/Reshape.js +1 -1
  278. package/views/draw/support/drawToolUtils.js +1 -1
  279. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  280. package/views/draw/support/managers/TooltipManager.js +1 -1
  281. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  282. package/views/draw/support/tooltipUtils.js +1 -1
  283. package/views/interactive/options/InteractiveToolOptions.d.ts +36 -0
  284. package/views/interactive/options/InteractiveToolOptions.js +2 -0
  285. package/views/interactive/sketch/SketchOptions.d.ts +4 -3
  286. package/views/interactive/sketch/SketchOptions.js +1 -1
  287. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  288. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  289. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  290. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  291. package/views/interactive/tooltip/content/TooltipContentDynamic.js +1 -1
  292. package/views/interactive/tooltip/fields/fields.js +1 -1
  293. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  294. package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
  295. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  296. package/views/support/imageReprojection.js +1 -1
  297. package/widgets/Sketch/SketchViewModel.js +1 -1
  298. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  299. package/assets/esri/core/workers/chunks/0623acb2bd14a61b65c9.js +0 -29
  300. package/assets/esri/core/workers/chunks/06c9aac75a01d3af6d54.js +0 -1
  301. package/assets/esri/core/workers/chunks/089f8c60e96d920a2cb2.js +0 -1
  302. package/assets/esri/core/workers/chunks/0c3c311400ee352187ea.js +0 -1
  303. package/assets/esri/core/workers/chunks/158d2ac0333d53556e33.js +0 -1
  304. package/assets/esri/core/workers/chunks/16cade1c2ddf44e336ee.js +0 -1
  305. package/assets/esri/core/workers/chunks/1b130af7d14eaae69d96.js +0 -1
  306. package/assets/esri/core/workers/chunks/1e0140556c2e3fa72545.js +0 -1
  307. package/assets/esri/core/workers/chunks/1e5cb72830c7f32f2961.js +0 -1
  308. package/assets/esri/core/workers/chunks/259bdacfb7b0f866a8d0.js +0 -1
  309. package/assets/esri/core/workers/chunks/2f58e1f64df2da8259a2.js +0 -1
  310. package/assets/esri/core/workers/chunks/383304d33b496c5d8baa.js +0 -1
  311. package/assets/esri/core/workers/chunks/3aacb935d632834d4154.js +0 -1
  312. package/assets/esri/core/workers/chunks/3c8e98cf23ad8ef12fcb.js +0 -1
  313. package/assets/esri/core/workers/chunks/3dc71e03a630dd50b28e.js +0 -1
  314. package/assets/esri/core/workers/chunks/3fd022df127af32782ce.js +0 -1
  315. package/assets/esri/core/workers/chunks/4344ab1250a1c550bf8b.js +0 -1
  316. package/assets/esri/core/workers/chunks/43de723f765ec8f268ac.js +0 -1
  317. package/assets/esri/core/workers/chunks/4695cd6120f60b234d5c.js +0 -1
  318. package/assets/esri/core/workers/chunks/582a1d468089b9986416.js +0 -1
  319. package/assets/esri/core/workers/chunks/5f201c77a09ae0df29d6.js +0 -1
  320. package/assets/esri/core/workers/chunks/6080e46fc79127500283.js +0 -1
  321. package/assets/esri/core/workers/chunks/6357c7cac401aee9fe77.js +0 -1
  322. package/assets/esri/core/workers/chunks/67d3ff7fcefaa7d5d27f.js +0 -1
  323. package/assets/esri/core/workers/chunks/6a9002fcba11e2cf3f2e.js +0 -1
  324. package/assets/esri/core/workers/chunks/72dcd4bd1a28bf8605c5.js +0 -1
  325. package/assets/esri/core/workers/chunks/73f228d966b89c73c9e9.js +0 -1
  326. package/assets/esri/core/workers/chunks/77df0bb35d2688729479.js +0 -1
  327. package/assets/esri/core/workers/chunks/7a143ca61c0a70306185.js +0 -1
  328. package/assets/esri/core/workers/chunks/869d292a60747c93dc84.js +0 -1
  329. package/assets/esri/core/workers/chunks/9c57161ad48d8d546dc7.js +0 -1
  330. package/assets/esri/core/workers/chunks/a7f42ada0aa69873a938.js +0 -1
  331. package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +0 -1
  332. package/assets/esri/core/workers/chunks/aff0e7761276036e029d.js +0 -1
  333. package/assets/esri/core/workers/chunks/b7d8817018b3d277c454.js +0 -1
  334. package/assets/esri/core/workers/chunks/bfb6566c27c09deb0929.js +0 -1
  335. package/assets/esri/core/workers/chunks/c715c585c42d8c2b86f5.js +0 -1
  336. package/assets/esri/core/workers/chunks/c7e9513f75b8ec205562.js +0 -1
  337. package/assets/esri/core/workers/chunks/c838cc1c786368b78598.js +0 -1
  338. package/assets/esri/core/workers/chunks/cd4e5c948d1bfa9b9a2d.js +0 -1
  339. package/assets/esri/core/workers/chunks/cfe31b7d1c6c05fbd268.js +0 -1
  340. package/assets/esri/core/workers/chunks/d0c1bc90e474f706211c.js +0 -1
  341. package/assets/esri/core/workers/chunks/d2faac81142586cf7509.js +0 -1
  342. package/assets/esri/core/workers/chunks/da484787bd9fd3b13d15.js +0 -1
  343. package/assets/esri/core/workers/chunks/e21b3490bfce75405e55.js +0 -1
  344. package/assets/esri/core/workers/chunks/e4353f0792f45aa6a62f.js +0 -1
  345. package/assets/esri/core/workers/chunks/e702abaeccef20b64a81.js +0 -1
  346. package/assets/esri/core/workers/chunks/ebd619533be077059494.js +0 -1
  347. package/assets/esri/core/workers/chunks/f475672ff4c2ec9367c2.js +0 -1
  348. package/assets/esri/core/workers/chunks/f69329b85b362b349a8c.js +0 -1
  349. package/assets/esri/core/workers/chunks/fba8065a3a6fbd877e23.js +0 -1
  350. package/assets/esri/core/workers/chunks/fd6107f95082e05f016a.js +0 -256
  351. package/assets/esri/core/workers/chunks/fec07a16b72cdcafc641.js +0 -1
  352. package/views/2d/engine/webgl/shaderGraph/techniques/line/utils.js +0 -2
  353. /package/assets/esri/core/workers/chunks/{3b3a8a6167f2e1eeb828.js.LICENSE.txt → 0823961e5d0bdedbf8cf.js.LICENSE.txt} +0 -0
  354. /package/assets/esri/core/workers/chunks/{c03da138651ac53cadcb.js.LICENSE.txt → 186bedc377cc97731ca2.js.LICENSE.txt} +0 -0
  355. /package/assets/esri/core/workers/chunks/{4da993c79b373b9d304e.js.LICENSE.txt → 8302bffd28cc6720e0fe.js.LICENSE.txt} +0 -0
  356. /package/assets/esri/core/workers/chunks/{9dda9414104f585560a4.js.LICENSE.txt → ad1d06a91121ebfe9162.js.LICENSE.txt} +0 -0
  357. /package/assets/esri/core/workers/chunks/{fa5d27e47d47ff8fcb96.js.LICENSE.txt → d03e7be74c57c3dbf003.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{isSome as o}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{when as i,syncAndInitial as n}from"../../../../core/reactiveUtils.js";import{property as a,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{absoluteHeightElevationInfo as s}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as l}from"./lineOfSightPlacementUtils.js";import{createLineOfSightRootPluginConfiguration as d}from"./LineOfSightRootPlugin.js";import{Manipulator3D as p}from"../../interactive/Manipulator3D.js";const h=Symbol("hiddenManipulatorHandle");let c=class extends e{get active(){return!!this._drawTool?.active}get canRedo(){return this._drawTool?.canRedo??!1}get canUndo(){return this._drawTool?.canUndo??!1}get updating(){return this._drawTool?.updating??!1}get activeTooltipInfo(){return this._drawTool?.activeTooltipInfo??null}get tooltip(){return this._drawTool?.tooltip??null}constructor(t){super(t),this.visible=!0,this.observerPlacementElevationInfo=null,this.targetPlacementElevationInfo=null,this._drawTool=null,this._renderer=null,this._sessionStartedWithValidAnalysis=!1}initialize(){this.addHandles([i(()=>!this.active,()=>{this.analysisViewData.cursorTarget=null},n)])}destroy(){this._destroyDrawTool()}get activeSnappingManager(){return this.active?this._drawTool?.snappingManager??null:null}get _snapToSceneEnabled(){const t=this._effectiveElevationInfo.mode;return"relative-to-ground"!==t&&"on-the-ground"!==t&&null}get _placementElevationInfo(){return null==this.analysis.observer?this.observerPlacementElevationInfo:this.targetPlacementElevationInfo}get _effectiveElevationInfo(){return this._placementElevationInfo??s}continue(){if(this._drawTool?.active)return;this._sessionStartedWithValidAnalysis=this.analysis.valid;const{drawTool:t,renderer:e}=this._createDrawTool();this._drawTool=t,this._renderer=e,this.view.addAndActivateTool(t),t.begin([d({analysis:this.analysis,analysisViewData:this.analysisViewData,observerElevationInfo:this.observerPlacementElevationInfo,targetElevationInfo:this.targetPlacementElevationInfo,view:this.view})])}stop(){this._destroyDrawTool()}redo(){this._drawTool?.redo()}undo(){this._drawTool?.undo()}get testInfo(){}_createDrawTool(){return l({analysis:this.analysis,analysisViewData:this.analysisViewData,view:this.view,getSnapToSceneEnabled:()=>this._snapToSceneEnabled,getSourceElevationInfo:()=>this._effectiveElevationInfo,getVisible:()=>this.visible,onCancel:t=>{t!==this._drawTool||this._sessionStartedWithValidAnalysis||null!=this.analysis.observer||(this.analysis.clear(),this.analysisViewData.cursorTarget=null),this._destroyDrawTool(t)},onComplete:t=>this._destroyDrawTool(t),onManipulatorCountChange:t=>this._hideManipulatorOnAppearance(t),shouldPreventVertexAdd:this.shouldPreventVertexAdd})}_destroyDrawTool(t=this._drawTool){if(null==t)return;const e=t===this._drawTool;this.view.activeTool===t&&(this.view.activeTool=null),this.view.tools.includes(t)&&this.view.tools.remove(t),t.destroy(),e&&(this._drawTool=null,this._renderer=null,this._sessionStartedWithValidAnalysis=!1)}_hideManipulatorOnAppearance(t){t.removeHandles(h),t.addHandles(t.manipulators.toArray().map(t=>t instanceof p?t.disableDisplay():null).filter(o),h)}};t([a({constructOnly:!0})],c.prototype,"view",void 0),t([a({constructOnly:!0})],c.prototype,"analysis",void 0),t([a({constructOnly:!0})],c.prototype,"analysisViewData",void 0),t([a({constructOnly:!0})],c.prototype,"parent",void 0),t([a({constructOnly:!0})],c.prototype,"shouldPreventVertexAdd",void 0),t([a()],c.prototype,"visible",void 0),t([a()],c.prototype,"observerPlacementElevationInfo",void 0),t([a()],c.prototype,"targetPlacementElevationInfo",void 0),t([a()],c.prototype,"active",null),t([a()],c.prototype,"canRedo",null),t([a()],c.prototype,"canUndo",null),t([a()],c.prototype,"updating",null),t([a()],c.prototype,"activeTooltipInfo",null),t([a()],c.prototype,"tooltip",null),t([a()],c.prototype,"_drawTool",void 0),t([a()],c.prototype,"_renderer",void 0),c=t([r("esri.views.3d.analysis.LineOfSight.LineOfSightPlacementController")],c);export{c as LineOfSightPlacementController};
2
+ import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{isSome as o}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{when as i,syncAndInitial as n}from"../../../../core/reactiveUtils.js";import{property as a,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{absoluteHeightElevationInfo as s}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as l}from"./lineOfSightPlacementUtils.js";import{createLineOfSightRootPluginConfiguration as d}from"./LineOfSightRootPlugin.js";import{Manipulator3D as p}from"../../interactive/Manipulator3D.js";const c=Symbol("hiddenManipulatorHandle");let h=class extends e{get active(){return!!this._drawTool?.active}get canRedo(){return this._drawTool?.canRedo??!1}get canUndo(){return this._drawTool?.canUndo??!1}get updating(){return this._drawTool?.updating??!1}get activeTooltipInfo(){return this._drawTool?.activeTooltipInfo??null}get tooltip(){return this._drawTool?.tooltip??null}constructor(t){super(t),this.visible=!0,this.observerPlacementElevationInfo=null,this.targetPlacementElevationInfo=null,this._drawTool=null,this._renderer=null,this._sessionStartedWithValidAnalysis=!1}initialize(){this.addHandles([i(()=>!this.active,()=>{this.analysisViewData.cursorTarget=null},n)])}destroy(){this._destroyDrawTool()}get _snapToSceneEnabled(){const t=this._effectiveElevationInfo.mode;return"relative-to-ground"!==t&&"on-the-ground"!==t&&null}get _placementElevationInfo(){return null==this.analysis.observer?this.observerPlacementElevationInfo:this.targetPlacementElevationInfo}get _effectiveElevationInfo(){return this._placementElevationInfo??s}continue(){if(this._drawTool?.active)return;this._sessionStartedWithValidAnalysis=this.analysis.valid;const{drawTool:t,renderer:e}=this._createDrawTool();this._drawTool=t,this._renderer=e,this.view.addAndActivateTool(t),t.begin([d({analysis:this.analysis,analysisViewData:this.analysisViewData,observerElevationInfo:this.observerPlacementElevationInfo,targetElevationInfo:this.targetPlacementElevationInfo,view:this.view})])}stop(){this._destroyDrawTool()}redo(){this._drawTool?.redo()}undo(){this._drawTool?.undo()}get testInfo(){}_createDrawTool(){return l({analysis:this.analysis,analysisViewData:this.analysisViewData,snappingManager:this.snappingManager,view:this.view,getSnapToSceneEnabled:()=>this._snapToSceneEnabled,getSourceElevationInfo:()=>this._effectiveElevationInfo,getVisible:()=>this.visible,onCancel:t=>{t!==this._drawTool||this._sessionStartedWithValidAnalysis||null!=this.analysis.observer||(this.analysis.clear(),this.analysisViewData.cursorTarget=null),this._destroyDrawTool(t)},onComplete:t=>this._destroyDrawTool(t),onManipulatorCountChange:t=>this._hideManipulatorOnAppearance(t),shouldPreventVertexAdd:this.shouldPreventVertexAdd})}_destroyDrawTool(t=this._drawTool){if(null==t)return;const e=t===this._drawTool;this.view.activeTool===t&&(this.view.activeTool=null),this.view.tools.includes(t)&&this.view.tools.remove(t),t.destroy(),e&&(this._drawTool=null,this._renderer=null,this._sessionStartedWithValidAnalysis=!1)}_hideManipulatorOnAppearance(t){t.removeHandles(c),t.addHandles(t.manipulators.toArray().map(t=>t instanceof p?t.disableDisplay():null).filter(o),c)}};t([a({constructOnly:!0})],h.prototype,"view",void 0),t([a({constructOnly:!0})],h.prototype,"analysis",void 0),t([a({constructOnly:!0})],h.prototype,"analysisViewData",void 0),t([a({constructOnly:!0})],h.prototype,"parent",void 0),t([a({constructOnly:!0})],h.prototype,"shouldPreventVertexAdd",void 0),t([a({constructOnly:!0})],h.prototype,"snappingManager",void 0),t([a()],h.prototype,"visible",void 0),t([a()],h.prototype,"observerPlacementElevationInfo",void 0),t([a()],h.prototype,"targetPlacementElevationInfo",void 0),t([a()],h.prototype,"active",null),t([a()],h.prototype,"canRedo",null),t([a()],h.prototype,"canUndo",null),t([a()],h.prototype,"updating",null),t([a()],h.prototype,"activeTooltipInfo",null),t([a()],h.prototype,"tooltip",null),t([a()],h.prototype,"_drawTool",void 0),t([a()],h.prototype,"_renderer",void 0),h=t([r("esri.views.3d.analysis.LineOfSight.LineOfSightPlacementController")],h);export{h as LineOfSightPlacementController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../core/Evented.js";import{handlesGroup as i}from"../../../../core/handleUtils.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import a from"../../../../core/ReactiveSet.js";import{watch as s,initial as o,when as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h,fromPoints as p}from"../../../../geometry/support/lineSegment.js";import{LineOfSightAggregateManipulatedObject3D as u}from"./LineOfSightAggregateManipulatedObject3D.js";import{LineOfSightInteractionVisuals as d}from"./LineOfSightInteractionVisuals.js";import{ReshapeTool3D as g}from"../../interactive/editingTools/reshape/ReshapeTool3D.js";import _ from"../../../interactive/sketch/SketchOptions.js";import{acquire as v}from"../../../interactive/snapping/SnappingManagerPool.js";const b=Symbol("line-of-sight-reshape-line-of-sight-manipulators"),M=Symbol("line-of-sight-reshape-tool-operations"),m=h();let f=class extends t{get visible(){return this._get("visible")??!0}set visible(e){this._set("visible",e),null!=this._reshapeTool&&(this._reshapeTool.visible=e)}constructor(e){super(e),this.isParentToolInteracting=!1,this.manipulatorsInteractive=!0,this._selectedManipulators=new a,this._grabbedManipulator=null,this._interactionVisuals=null,this._snappingManagerResult=v(e.view),this._object=new u({analysis:e.analysis,analysisViewData:e.analysisViewData,intersector:e.intersector,view:e.view}),this._reshapeTool=new g({autoHideManipulators:!1,enableDeleteVertices:!0,enableEdgeOffset:!1,enableMidpoints:!1,enableMoveObject:!1,object:this._object,snapToScene:!0,sketchOptions:new _({tooltips:{enabled:!0}}),snappingManager:this._snappingManagerResult.snappingManager,view:e.view})}initialize(){this.view.tools.add(this._reshapeTool),this._interactionVisuals=new d({view:this.view}),this.addHandles([this._snappingManagerResult,this._connectReshapeEvents(),this._connectActiveState(),this._connectManipulators(),this._connectGrabbedManipulator(),this._connectObjectInteracting(),this._connectOperations()])}destroy(){this.stop(),this.removeHandles(b),this.view.tools.remove(this._reshapeTool),this._reshapeTool.destroy(),this._object.destroy(),this._interactionVisuals=n(this._interactionVisuals),this._selectedManipulators.clear()}get active(){return this._reshapeTool.active}get canRedo(){return this._reshapeTool.canRedo}get canUndo(){return this._reshapeTool.canUndo}get updating(){return this._reshapeTool.updating}get snappingManager(){return this.active?this._reshapeTool.snappingManager:null}get laserLineVisualElement(){return this._interactionVisuals?.laserLineVisualElement??null}activate(){this.view.activeTool!==this._reshapeTool&&(this.view.activeTool=this._reshapeTool),this._reshapeTool.activate()}getTargetManipulator(e){return this._object.getTargetManipulator(e)}getObserverManipulator(){return this._object.observerManipulator}hasManipulatorAt(e,t){for(const i of this._object.lineOfSightManipulators)if(y(i,e,t))return!0;return!1}redo(){this._reshapeTool.redo()}clearSelection(){this._reshapeTool.clearSelection(),this._selectedManipulators.clear(),this._grabbedManipulator=null}get hasSelection(){return this._selectedManipulators.size>0}get _objectInteracting(){return this.analysisViewData.visible&&(this.isParentToolInteracting||this.hasSelection)}applySelection(e){const t="observer"===e.type?this._object.observerManipulator:this._object.getTargetManipulator(e.target);return null!=t&&this._reshapeTool.selectManipulator(t)}setEditableFlag(e,t){this._reshapeTool.setEditableFlag(e,t)}stop(){this.view.activeTool===this._reshapeTool&&(this.view.activeTool=null),this.snappingManager?.doneSnapping(),this.clearSelection()}undo(){this._reshapeTool.undo()}_connectReshapeEvents(){return i([this._reshapeTool.events.on("reshape",e=>{if(1===this._selectedManipulators.size){if("reshape-start"===e.type){const e=this._selectedManipulators.values().next().value;this._grabbedManipulator??=e}"reshape-stop"===e.type&&(this._grabbedManipulator=null)}}),this._reshapeTool.on("cancel",()=>this.clearSelection()),this._reshapeTool.events.on("before-vertex-remove",e=>{let t=this.analysis.targets.length;for(const i of e.vertices){if(0===i.componentIndex)return void e.preventDefault();if(t-=1,0===t)return void e.preventDefault()}})])}_connectActiveState(){return s(()=>this.active,e=>{e||this._reshapeTool.snappingManager?.doneSnapping()},o)}_connectManipulators(){return s(()=>({manipulators:this._object.lineOfSightManipulators,interactive:this.manipulatorsInteractive}),({manipulators:e,interactive:t})=>{this.removeHandles(b),this._selectedManipulators.batch(()=>{this._selectedManipulators.clear();for(const i of e)i.interactive=t,i.selected&&this._selectedManipulators.add(i)}),this.addHandles(e.map(e=>this._connectManipulator(e)),b)},o)}_connectManipulator(e){return i([e.events.on("grab-changed",t=>{if("start"===t.action){this._selectedManipulators.add(e),this._grabbedManipulator??=e;const t=this.active,i=this.analysisViewData.visible,n=this._object.observerManipulator,a=this.visible,s=this._grabbedManipulator;if(s!==e)return;if(null==this._interactionVisuals||!t||!a||!i||null==n)return void this._hideLaserLine();this._interactionVisuals.update({target:s.renderLocation,lineVerticalPlaneSegment:s===n?null:p(n.renderLocation,s.renderLocation,m),visible:!0})}"end"===t.action&&(this._grabbedManipulator=null)}),e.events.on("select-changed",({action:t})=>{"select"===t?this._selectedManipulators.add(e):this._selectedManipulators.delete(e)}),e.events.on("location-update",()=>{const t=this.active,i=this.analysisViewData.visible,n=this._object.observerManipulator,a=this.visible,s=this._grabbedManipulator;s===e&&(null!=this._interactionVisuals&&t&&a&&i&&null!=n?this._interactionVisuals.update({target:s.renderLocation,lineVerticalPlaneSegment:s===n?null:p(n.renderLocation,s.renderLocation,m),visible:!0}):this._hideLaserLine())})])}_connectGrabbedManipulator(){return r(()=>null==this._grabbedManipulator,()=>{this._hideLaserLine()})}_connectObjectInteracting(){return s(()=>this._objectInteracting,e=>{this._object.interacting=e},o)}_connectOperations(){return s(()=>this._object.operations,e=>{this.removeHandles(M),null!=e&&this.addHandles([e.on("can-redo-change",()=>this.notifyChange("canRedo")),e.on("can-undo-change",()=>this.notifyChange("canUndo"))],M),this.notifyChange("canUndo"),this.notifyChange("canRedo")},o)}_hideLaserLine(){this._interactionVisuals?.hide()}};function y(e,t,i){return null!=e&&e.consumesClicks&&null!=e.intersectionDistance(t,i)}e([l({constructOnly:!0})],f.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],f.prototype,"analysis",void 0),e([l({constructOnly:!0})],f.prototype,"intersector",void 0),e([l({constructOnly:!0})],f.prototype,"view",void 0),e([l()],f.prototype,"visible",null),e([l()],f.prototype,"isParentToolInteracting",void 0),e([l()],f.prototype,"manipulatorsInteractive",void 0),e([l()],f.prototype,"_grabbedManipulator",void 0),e([l()],f.prototype,"active",null),e([l()],f.prototype,"canRedo",null),e([l()],f.prototype,"canUndo",null),e([l()],f.prototype,"updating",null),e([l()],f.prototype,"hasSelection",null),e([l()],f.prototype,"_objectInteracting",null),f=e([c("esri.views.3d.analysis.LineOfSight.LineOfSightReshapeTool3D")],f);export{f as LineOfSightReshapeTool3D};
2
+ import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../core/Evented.js";import{handlesGroup as i}from"../../../../core/handleUtils.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import o from"../../../../core/ReactiveSet.js";import{watch as a,initial as s,when as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h,fromPoints as p}from"../../../../geometry/support/lineSegment.js";import{LineOfSightAggregateManipulatedObject3D as u}from"./LineOfSightAggregateManipulatedObject3D.js";import{LineOfSightInteractionVisuals as d}from"./LineOfSightInteractionVisuals.js";import{ReshapeTool3D as _}from"../../interactive/editingTools/reshape/ReshapeTool3D.js";import v from"../../../interactive/options/InteractiveToolOptions.js";const g=Symbol("line-of-sight-reshape-line-of-sight-manipulators"),b=Symbol("line-of-sight-reshape-tool-operations"),M=h();let m=class extends t{get visible(){return this._get("visible")??!0}set visible(e){this._set("visible",e),null!=this._reshapeTool&&(this._reshapeTool.visible=e)}constructor(e){super(e),this.isParentToolInteracting=!1,this.manipulatorsInteractive=!0,this._selectedManipulators=new o,this._grabbedManipulator=null,this._interactionVisuals=null,this._object=new u({analysis:e.analysis,analysisViewData:e.analysisViewData,intersector:e.intersector,view:e.view}),this._reshapeTool=new _({autoHideManipulators:!1,enableDeleteVertices:!0,enableEdgeOffset:!1,enableMidpoints:!1,enableMoveObject:!1,object:this._object,snapToScene:!0,toolOptions:new v({tooltips:{enabled:!0}}),snappingManager:e.snappingManager,view:e.view})}initialize(){this.view.tools.add(this._reshapeTool),this._interactionVisuals=new d({view:this.view}),this.addHandles([this._connectReshapeEvents(),this._connectActiveState(),this._connectManipulators(),this._connectGrabbedManipulator(),this._connectObjectInteracting(),this._connectOperations()])}destroy(){this.stop(),this.removeHandles(g),this.view.tools.remove(this._reshapeTool),this._reshapeTool.destroy(),this._object.destroy(),this._interactionVisuals=n(this._interactionVisuals),this._selectedManipulators.clear()}get active(){return this._reshapeTool.active}get canRedo(){return this._reshapeTool.canRedo}get canUndo(){return this._reshapeTool.canUndo}get updating(){return this._reshapeTool.updating}get laserLineVisualElement(){return this._interactionVisuals?.laserLineVisualElement??null}activate(){this.view.activeTool!==this._reshapeTool&&(this.view.activeTool=this._reshapeTool),this._reshapeTool.activate()}getTargetManipulator(e){return this._object.getTargetManipulator(e)}getObserverManipulator(){return this._object.observerManipulator}hasManipulatorAt(e,t){for(const i of this._object.lineOfSightManipulators)if(y(i,e,t))return!0;return!1}redo(){this._reshapeTool.redo()}clearSelection(){this._reshapeTool.clearSelection(),this._selectedManipulators.clear(),this._grabbedManipulator=null}get hasSelection(){return this._selectedManipulators.size>0}get _objectInteracting(){return this.analysisViewData.visible&&(this.isParentToolInteracting||this.hasSelection)}applySelection(e){const t="observer"===e.type?this._object.observerManipulator:this._object.getTargetManipulator(e.target);return null!=t&&this._reshapeTool.selectManipulator(t)}setEditableFlag(e,t){this._reshapeTool.setEditableFlag(e,t)}stop(){this.view.activeTool===this._reshapeTool&&(this.view.activeTool=null),this.clearSelection()}undo(){this._reshapeTool.undo()}_connectReshapeEvents(){return i([this._reshapeTool.events.on("reshape",e=>{if(1===this._selectedManipulators.size){if("reshape-start"===e.type){const e=this._selectedManipulators.values().next().value;this._grabbedManipulator??=e}"reshape-stop"===e.type&&(this._grabbedManipulator=null)}}),this._reshapeTool.on("cancel",()=>this.clearSelection()),this._reshapeTool.events.on("before-vertex-remove",e=>{let t=this.analysis.targets.length;for(const i of e.vertices){if(0===i.componentIndex)return void e.preventDefault();if(t-=1,0===t)return void e.preventDefault()}})])}_connectActiveState(){return a(()=>this.active,e=>{e||this.snappingManager.doneSnapping()},s)}_connectManipulators(){return a(()=>({manipulators:this._object.lineOfSightManipulators,interactive:this.manipulatorsInteractive}),({manipulators:e,interactive:t})=>{this.removeHandles(g),this._selectedManipulators.batch(()=>{this._selectedManipulators.clear();for(const i of e)i.interactive=t,i.selected&&this._selectedManipulators.add(i)}),this.addHandles(e.map(e=>this._connectManipulator(e)),g)},s)}_connectManipulator(e){return i([e.events.on("grab-changed",t=>{if("start"===t.action){this._selectedManipulators.add(e),this._grabbedManipulator??=e;const t=this.active,i=this.analysisViewData.visible,n=this._object.observerManipulator,o=this.visible,a=this._grabbedManipulator;if(a!==e)return;if(null==this._interactionVisuals||!t||!o||!i||null==n)return void this._hideLaserLine();this._interactionVisuals.update({target:a.renderLocation,lineVerticalPlaneSegment:a===n?null:p(n.renderLocation,a.renderLocation,M),visible:!0})}"end"===t.action&&(this._grabbedManipulator=null)}),e.events.on("select-changed",({action:t})=>{"select"===t?this._selectedManipulators.add(e):this._selectedManipulators.delete(e)}),e.events.on("location-update",()=>{const t=this.active,i=this.analysisViewData.visible,n=this._object.observerManipulator,o=this.visible,a=this._grabbedManipulator;a===e&&(null!=this._interactionVisuals&&t&&o&&i&&null!=n?this._interactionVisuals.update({target:a.renderLocation,lineVerticalPlaneSegment:a===n?null:p(n.renderLocation,a.renderLocation,M),visible:!0}):this._hideLaserLine())})])}_connectGrabbedManipulator(){return r(()=>null==this._grabbedManipulator,()=>{this._hideLaserLine()})}_connectObjectInteracting(){return a(()=>this._objectInteracting,e=>{this._object.interacting=e},s)}_connectOperations(){return a(()=>this._object.operations,e=>{this.removeHandles(b),null!=e&&this.addHandles([e.on("can-redo-change",()=>this.notifyChange("canRedo")),e.on("can-undo-change",()=>this.notifyChange("canUndo"))],b),this.notifyChange("canUndo"),this.notifyChange("canRedo")},s)}_hideLaserLine(){this._interactionVisuals?.hide()}};function y(e,t,i){return null!=e&&e.consumesClicks&&null!=e.intersectionDistance(t,i)}e([l({constructOnly:!0})],m.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],m.prototype,"analysis",void 0),e([l({constructOnly:!0})],m.prototype,"intersector",void 0),e([l({constructOnly:!0})],m.prototype,"view",void 0),e([l({constructOnly:!0})],m.prototype,"snappingManager",void 0),e([l()],m.prototype,"visible",null),e([l()],m.prototype,"isParentToolInteracting",void 0),e([l()],m.prototype,"manipulatorsInteractive",void 0),e([l()],m.prototype,"_grabbedManipulator",void 0),e([l()],m.prototype,"active",null),e([l()],m.prototype,"canRedo",null),e([l()],m.prototype,"canUndo",null),e([l()],m.prototype,"updating",null),e([l()],m.prototype,"hasSelection",null),e([l()],m.prototype,"_objectInteracting",null),m=e([c("esri.views.3d.analysis.LineOfSight.LineOfSightReshapeTool3D")],m);export{m as LineOfSightReshapeTool3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{makeHandle as t}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../../core/accessorSupport/decorators.js";import n from"../../../../symbols/support/ElevationInfo.js";import{LineOfSightPlacementController as r}from"./LineOfSightPlacementController.js";import{LineOfSightRayIntersector as l}from"./LineOfSightRayIntersector.js";import{LineOfSightReshapeTool3D as h}from"./LineOfSightReshapeTool3D.js";import{ExclusiveOperationManager as c}from"../../../analysis/ExclusiveOperationManager.js";import{ViewEventPriorities as p}from"../../../input/InputManager.js";import{AnalysisToolBase as v}from"../../../interactive/AnalysisToolBase.js";import{deactivevateTool as d}from"../../../interactive/interactiveToolUtils.js";import{sketchKeys as y}from"../../../interactive/keybindings.js";const _={ready:"ready",creating:"creating",created:"created"};let u=class extends v{constructor(e){super(e),this._operationManager=new c,this._syncingActiveTool=!1,this.analysisViewData=null,this.removeIncompleteOnCancel=!1,this._reshapeIntersector=new l({view:e.view}),this._reshapeTool=new h({analysis:e.analysis,analysisViewData:e.analysisViewData,intersector:this._reshapeIntersector,view:e.view}),this._placementController=new r({...e,parent:this,shouldPreventVertexAdd:(e,t)=>this._reshapeTool.hasManipulatorAt(e,t)})}get active(){return this._reshapeTool.active||this._placementController.active}get canRedo(){return this._activeUndoRedoComponent?.canRedo??!1}get canUndo(){return this._activeUndoRedoComponent?.canUndo??!1}get state(){return this._placementController.active?_.creating:null!=this.analysis.observer?.position?_.created:_.ready}get cursor(){return this._placementController.active?"crosshair":null}get updating(){return this._reshapeTool.updating||this._placementController.updating}initialize(){this.addHandles([this.view.on("key-down",e=>this._onKeyDown(e),p.WIDGET),i(()=>({editable:this.editable,interactive:this.analysisViewData.interactive,placementActive:this._placementController.active,valid:this.analysis.valid,visible:this.visible}),()=>this._syncActiveTool(),s),i(()=>this.state===_.created,e=>{e?this.finishToolCreation():this._set("created",!1)},s),i(()=>this.analysisViewData.visible,e=>{this.visible=e},s),i(()=>{const{analysis:e}=this,{observer:t,targets:i}=e;return{observer:t,observerPosition:t?.position,observerElevationInfo:t?.elevationInfo,observerFeature:t?.feature,targets:i.toArray().map(e=>[e,e.position,e.elevationInfo,e.feature])}},()=>this._syncItemsFromAnalysis(),s),i(()=>this.editable,e=>{this.analysisViewData.editable=e},s)])}destroy(){this._operationManager.destroy(),this._reshapeTool.stop(),this._placementController.stop(),this._reshapeTool.destroy(),this._placementController.destroy(),this._reshapeIntersector.destroy()}place(e){return this.analysisViewData.interactive=!0,this._operationManager.start("place",async(o,a)=>{const{elevationInfo:n}=e??{},r=n&&"observer"in n?n.observer:n,l=n&&"targets"in n?n.targets:n;this._placementController.observerPlacementElevationInfo=m(r),this._placementController.targetPlacementElevationInfo=m(l);const h=this.analysis.clone();let c=!1,p=!1;const v=()=>{if(!p){if(p=!0,this.stop(),!this.analysis.valid)return this.analysis.clear(),void o.reject();a.aborted||this.analysis.equals(h)?o.reject():o.resolve({})}};o.handles.push(t(()=>this.stop()),i(()=>this._placementController.active,e=>{e?c=!0:c&&v()},s)),this.continue()},e)}activate(){this.view.focus(),this.analysisViewData.interactive=!0,this._syncActiveTool(),this.analysis.valid||this._placementController.active||this.continue()}deactivate(){this.onDeactivate()}continue(){this.analysisViewData.interactive=!0,this._placementController.continue()}stop(){this._placementController.stop(),this._placementController.observerPlacementElevationInfo=null,this._placementController.targetPlacementElevationInfo=null,this._syncActiveTool()}redo(){this._activeUndoRedoComponent?.redo()}undo(){this._activeUndoRedoComponent?.undo()}get testInfo(){}onEditableChange(){this.analysisViewData.editable=this.editable,this._reshapeTool.setEditableFlag(1,!0),this._reshapeTool.setEditableFlag(0,this.editable),this._syncActiveTool()}_hideReshapeTool(){this._reshapeTool.stop(),this._reshapeTool.visible=!1}_onKeyDown(e){const t=e.key;t===y.undo&&this.canUndo?(e.stopPropagation(),this.undo()):t===y.redo&&this.canRedo?(e.stopPropagation(),this.redo()):t===y.cancel&&!this.active&&this._reshapeTool.hasSelection&&this._reshapeTool.clearSelection()}get _activeUndoRedoComponent(){return this.analysisViewData.interactive?this._placementController.active||!this._canActivateReshapeTool?this._placementController.active?this._placementController:null:this._reshapeTool:null}get _canActivateReshapeTool(){return this.visible&&this.editable&&this.analysis.valid&&null!=this.analysis.observer?.position}_syncActiveTool(){if(!this._syncingActiveTool){this._syncingActiveTool=!0;try{const e=this.analysisViewData.interactive,t=this._canActivateReshapeTool;if(this._placementController.visible=this.visible&&e,this._reshapeTool.isParentToolInteracting=e&&this._placementController.active,this._reshapeTool.manipulatorsInteractive=e&&!this._placementController.active,!e)return this._placementController.stop(),this._hideReshapeTool(),this.analysisViewData.cursorTarget=null,void d(this.view,this);if(this._placementController.active)return this._reshapeTool.stop(),this._reshapeTool.visible=this.visible,void d(this.view,this);if(!t)return this._hideReshapeTool(),void d(this.view,this);if(this._reshapeTool.visible=!0,this.analysisViewData.cursorTarget=null,!this._reshapeTool.active&&!this._reshapeTool.hasSelection){const e=this.analysis.targets.at(-1);null!=e&&this._reshapeTool.applySelection({type:"target",target:e})}d(this.view,this)}finally{this._syncingActiveTool=!1}}}_syncItemsFromAnalysis(){this._syncActiveTool()}};function m(e){if(null==e)return null;const{featureExpressionInfo:t,mode:i,offset:s,unit:o}=e;return new n({featureExpressionInfo:t,mode:i,offset:s,unit:o})}e([o({constructOnly:!0})],u.prototype,"view",void 0),e([o({constructOnly:!0})],u.prototype,"analysis",void 0),e([o({constructOnly:!0})],u.prototype,"analysisViewData",void 0),e([o()],u.prototype,"active",null),e([o()],u.prototype,"canRedo",null),e([o()],u.prototype,"canUndo",null),e([o()],u.prototype,"state",null),e([o()],u.prototype,"cursor",null),e([o()],u.prototype,"updating",null),e([o()],u.prototype,"removeIncompleteOnCancel",void 0),e([o()],u.prototype,"_canActivateReshapeTool",null),u=e([a("esri.views.3d.analysis.LineOfSight.LineOfSightTool")],u);export{u as LineOfSightTool};
2
+ import{__decorate as e}from"tslib";import{makeHandle as t}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import a from"../../../../symbols/support/ElevationInfo.js";import{LineOfSightPlacementController as r}from"./LineOfSightPlacementController.js";import{LineOfSightRayIntersector as l}from"./LineOfSightRayIntersector.js";import{LineOfSightReshapeTool3D as p}from"./LineOfSightReshapeTool3D.js";import{ExclusiveOperationManager as h}from"../../../analysis/ExclusiveOperationManager.js";import{ViewEventPriorities as c}from"../../../input/InputManager.js";import{AnalysisToolBase as v}from"../../../interactive/AnalysisToolBase.js";import{deactivevateTool as d}from"../../../interactive/interactiveToolUtils.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import{acquire as u}from"../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as y}from"../../../interactive/snapping/snappingUtils.js";const m={ready:"ready",creating:"creating",created:"created"};let g=class extends v{constructor(e){super(e),this._operationManager=new h,this._syncingActiveTool=!1,this.analysisViewData=null,this.removeIncompleteOnCancel=!1;const{snappingManager:t}=this._snappingManagerResult=u(e.view);this._reshapeIntersector=new l({view:e.view}),this._reshapeTool=new p({analysis:e.analysis,analysisViewData:e.analysisViewData,intersector:this._reshapeIntersector,snappingManager:t,view:e.view}),this._placementController=new r({...e,parent:this,snappingManager:t,shouldPreventVertexAdd:(e,t)=>this._reshapeTool.hasManipulatorAt(e,t)})}get active(){return this._reshapeTool.active||this._placementController.active}get canRedo(){return this._activeUndoRedoComponent?.canRedo??!1}get canUndo(){return this._activeUndoRedoComponent?.canUndo??!1}get state(){return this._placementController.active?m.creating:null!=this.analysis.observer?.position?m.created:m.ready}get cursor(){return this._placementController.active?"crosshair":null}get updating(){return this._reshapeTool.updating||this._placementController.updating}initialize(){y(this),this.addHandles([this._snappingManagerResult,this.view.on("key-down",e=>this._onKeyDown(e),c.WIDGET),i(()=>({editable:this.editable,interactive:this.analysisViewData.interactive,placementActive:this._placementController.active,valid:this.analysis.valid,visible:this.visible}),()=>this._syncActiveTool(),s),i(()=>this.state===m.created,e=>{e?this.finishToolCreation():this._set("created",!1)},s),i(()=>this.analysisViewData.visible,e=>{this.visible=e},s),i(()=>{const{analysis:e}=this,{observer:t,targets:i}=e;return{observer:t,observerPosition:t?.position,observerElevationInfo:t?.elevationInfo,observerFeature:t?.feature,targets:i.toArray().map(e=>[e,e.position,e.elevationInfo,e.feature])}},()=>this._syncItemsFromAnalysis(),s),i(()=>this.editable,e=>{this.analysisViewData.editable=e},s)])}destroy(){this._operationManager.destroy(),this._reshapeTool.stop(),this._placementController.stop(),this._reshapeTool.destroy(),this._placementController.destroy(),this._reshapeIntersector.destroy()}place(e){return this.analysisViewData.interactive=!0,this._operationManager.start("place",async(o,n)=>{const{elevationInfo:a}=e??{},r=a&&"observer"in a?a.observer:a,l=a&&"targets"in a?a.targets:a;this._placementController.observerPlacementElevationInfo=f(r),this._placementController.targetPlacementElevationInfo=f(l);const p=this.analysis.clone();let h=!1,c=!1;const v=()=>{if(!c){if(c=!0,this.stop(),!this.analysis.valid)return this.analysis.clear(),void o.reject();n.aborted||this.analysis.equals(p)?o.reject():o.resolve({})}};o.handles.push(t(()=>this.stop()),i(()=>this._placementController.active,e=>{e?h=!0:h&&v()},s)),this.continue()},e)}activate(){this.view.focus(),this.analysisViewData.interactive=!0,this._syncActiveTool(),this.analysis.valid||this._placementController.active||this.continue()}deactivate(){this.onDeactivate()}continue(){this.analysisViewData.interactive=!0,this._placementController.continue()}stop(){this._placementController.stop(),this._placementController.observerPlacementElevationInfo=null,this._placementController.targetPlacementElevationInfo=null,this._syncActiveTool()}redo(){this._activeUndoRedoComponent?.redo()}undo(){this._activeUndoRedoComponent?.undo()}get testInfo(){}get snappingOptions(){return this._snappingManager.options}set snappingOptions(e){this._snappingManager.options=e}get _snappingManager(){return this._snappingManagerResult.snappingManager}onEditableChange(){this.analysisViewData.editable=this.editable,this._reshapeTool.setEditableFlag(1,!0),this._reshapeTool.setEditableFlag(0,this.editable),this._syncActiveTool()}_hideReshapeTool(){this._reshapeTool.stop(),this._reshapeTool.visible=!1}_onKeyDown(e){const t=e.key;t===_.undo&&this.canUndo?(e.stopPropagation(),this.undo()):t===_.redo&&this.canRedo?(e.stopPropagation(),this.redo()):t===_.cancel&&!this.active&&this._reshapeTool.hasSelection&&this._reshapeTool.clearSelection()}get _activeUndoRedoComponent(){return this.analysisViewData.interactive?this._placementController.active||!this._canActivateReshapeTool?this._placementController.active?this._placementController:null:this._reshapeTool:null}get _canActivateReshapeTool(){return this.visible&&this.editable&&this.analysis.valid&&null!=this.analysis.observer?.position}_syncActiveTool(){if(!this._syncingActiveTool){this._syncingActiveTool=!0;try{const e=this.analysisViewData.interactive,t=this._canActivateReshapeTool;if(this._placementController.visible=this.visible&&e,this._reshapeTool.isParentToolInteracting=e&&this._placementController.active,this._reshapeTool.manipulatorsInteractive=e&&!this._placementController.active,!e)return this._placementController.stop(),this._hideReshapeTool(),this.analysisViewData.cursorTarget=null,void d(this.view,this);if(this._placementController.active)return this._reshapeTool.stop(),this._reshapeTool.visible=this.visible,void d(this.view,this);if(!t)return this._hideReshapeTool(),void d(this.view,this);if(this._reshapeTool.visible=!0,this.analysisViewData.cursorTarget=null,!this._reshapeTool.active&&!this._reshapeTool.hasSelection){const e=this.analysis.targets.at(-1);null!=e&&this._reshapeTool.applySelection({type:"target",target:e})}d(this.view,this)}finally{this._syncingActiveTool=!1}}}_syncItemsFromAnalysis(){this._syncActiveTool()}};function f(e){if(null==e)return null;const{featureExpressionInfo:t,mode:i,offset:s,unit:o}=e;return new a({featureExpressionInfo:t,mode:i,offset:s,unit:o})}e([o({constructOnly:!0})],g.prototype,"view",void 0),e([o({constructOnly:!0})],g.prototype,"analysis",void 0),e([o({constructOnly:!0})],g.prototype,"analysisViewData",void 0),e([o()],g.prototype,"active",null),e([o()],g.prototype,"canRedo",null),e([o()],g.prototype,"canUndo",null),e([o()],g.prototype,"state",null),e([o()],g.prototype,"cursor",null),e([o()],g.prototype,"updating",null),e([o()],g.prototype,"removeIncompleteOnCancel",void 0),e([o()],g.prototype,"snappingOptions",null),e([o()],g.prototype,"_canActivateReshapeTool",null),g=e([n("esri.views.3d.analysis.LineOfSight.LineOfSightTool")],g);export{g as LineOfSightTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as t}from"../../../../core/reactiveUtils.js";import{LineOfSightDrawToolRenderer as i}from"./LineOfSightDrawToolRenderer.js";import{isLineOfSightPlacementLeafPlugin as o}from"./LineOfSightPlacementLeafPlugin.js";import{LineOfSightRayIntersector as r}from"./LineOfSightRayIntersector.js";import{DrawTool as a}from"../../../draw/DrawTool.js";import s from"../../../interactive/sketch/SketchOptions.js";import{acquire as l}from"../../../interactive/snapping/SnappingManagerPool.js";import{createScreenPointFromEvent as p}from"../../../support/screenUtils.js";function c(c){const{analysis:f,analysisViewData:m,view:d,getVisible:v,getSourceElevationInfo:g,getSnapToSceneEnabled:u,onCancel:w,onComplete:h,onManipulatorCountChange:b,shouldPreventVertexAdd:S}=c,j=g(),y=new i({analysis:f,analysisViewData:m,view:d}),I=new r({view:d}),D=l(d),P=new a({elevationInfo:j,enableVertexVisuals:!1,hasZ:!0,renderer:y,sketchOptions:new s({tooltips:{enabled:!0}}),snappingManager:D.snappingManager,view:d});return y.elevationInfo=j,P.addHandles([D,e(y),e(I),P.on("cancel",()=>w(P)),P.on("complete",()=>h(P)),n(()=>[P.surfaceManager,u()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},t),n(()=>[v(),m.visible,g()],([e,n,t])=>{P.visible=e&&n,y.analysisVisible=P.visible,P.elevationInfo=t,y.elevationInfo=t,y.refresh()},t),n(()=>P.manipulators.length,()=>b(P),t),P.on(["before-vertex-add","before-vertex-add-at-point"],e=>{const n=e.detail.originalEvent;if("immediate-click"!==n?.type)return;const t=p(n);if(S(t,n.pointerType))return void e.preventDefault();const i=I.getScreenPointIntersection(t);if(null==i?.mapPoint)e.preventDefault();else{const e=P.mostDownstreamPlugin;o(e)&&(e.preservedIntersection=i)}})]),{drawTool:P,renderer:y}}export{c as createDrawTool};
2
+ import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{LineOfSightDrawToolRenderer as t}from"./LineOfSightDrawToolRenderer.js";import{isLineOfSightPlacementLeafPlugin as i}from"./LineOfSightPlacementLeafPlugin.js";import{LineOfSightRayIntersector as r}from"./LineOfSightRayIntersector.js";import{DrawTool as a}from"../../../draw/DrawTool.js";import s from"../../../interactive/options/InteractiveToolOptions.js";import{createScreenPointFromEvent as l}from"../../../support/screenUtils.js";function p(p){const{analysis:c,analysisViewData:f,snappingManager:m,view:d,getVisible:v,getSourceElevationInfo:g,getSnapToSceneEnabled:u,onCancel:w,onComplete:b,onManipulatorCountChange:h,shouldPreventVertexAdd:I}=p,j=g(),y=new t({analysis:c,analysisViewData:f,view:d}),S=new r({view:d}),D=new a({elevationInfo:j,enableVertexVisuals:!1,hasZ:!0,renderer:y,toolOptions:new s({tooltips:{enabled:!0}}),snappingManager:m,view:d});return y.elevationInfo=j,D.addHandles([e(y),e(S),D.on("cancel",()=>w(D)),D.on("complete",()=>b(D)),n(()=>[D.surfaceManager,u()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},o),n(()=>[v(),f.visible,g()],([e,n,o])=>{D.visible=e&&n,y.analysisVisible=D.visible,D.elevationInfo=o,y.elevationInfo=o,y.refresh()},o),n(()=>D.manipulators.length,()=>h(D),o),D.on(["before-vertex-add","before-vertex-add-at-point"],e=>{const n=e.detail.originalEvent;if("immediate-click"!==n?.type)return;const o=l(n);if(I(o,n.pointerType))return void e.preventDefault();const t=S.getScreenPointIntersection(o);if(null==t?.mapPoint)e.preventDefault();else{const e=D.mostDownstreamPlugin;i(e)&&(e.preservedIntersection=t)}})]),{drawTool:D,renderer:y}}export{p as createDrawTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import{destroyMaybe as a,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as r,when as l,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{createScreenPoint as p,screenPointObjectToArray as u}from"../../../../core/screenUtils.js";import{property as c,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as _,fromScaling as v,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{dot as y,length as P,copy as w,scale as f,add as g,transformMat4 as M,normalize as V,set as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as T,create as D}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as k,ZEROS as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{c as E,a as S,n as C,f as j}from"../../../../chunks/boundedPlane.js";import{signedDistance as H,create as R,intersectRay as z,getNormal as O}from"../../../../geometry/support/plane.js";import{create as G}from"../../../../geometry/support/ray.js";import{sv3d as U,sm4d as I,sv2d as K}from"../../../../geometry/support/vectorStacks.js";import{getSliceableContainer as A}from"../../../../graphic/getSliceableContainer.js";import{getRotateHeadingTexture as F,getTiltRotateTexture as B}from"../images/Factory.js";import{getOutlineColor as L,planeColor as q}from"./settings.js";import{pointerMoveTimerMs as N,planePreviewOutlineWidth as J,forceVerticalModifier as Q,forceHorizontalModifier as W,previewFadeDurationSeconds as X,previewFadeDotThreshold as Y,initialDepthOffsetFrac as Z}from"./sliceToolConfig.js";import{createGridVisualElement as $,createOutlineVisualElement as tt,planeToShape as et,createRotatePlane as it,resizePlane as at,calculatePlaneHalfSize as st,createPlane as nt,DidPointerMoveRecentlyFlag as rt,calculateBoundedPlaneTranslateRotate as lt,updateShiftRestartHandle as ot,updateRotateHeadingHandle as ht,updateRotateTiltHandle as pt,updateResizeHandle as ut,createShiftPlane as ct}from"./sliceToolUtils.js";import{calculateInputRotationTransform as dt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as _t}from"../../interactive/editingTools/dragEventPipeline3D.js";import{ResizeManipulator as vt}from"../../interactive/manipulators/ResizeManipulator.js";import{RotateManipulator as mt}from"../../interactive/manipulators/RotateManipulator.js";import{ShiftManipulator as yt}from"../../interactive/manipulators/ShiftManipulator.js";import{fromScreenNormalized as Pt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as wt}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as ft}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as gt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Mt}from"../../../support/screenUtils.js";var Vt;let bt=class extends wt{static{Vt=this}constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.multiTouchEnabled=!1,this.removeIncompleteOnCancel=!1,this._mode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._frameTask=null,this._pointerMoveTimerMs=N,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=E(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=p(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=gt(t.view.state.viewingMode)}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&S(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new yt(this.view,1);this.shiftManipulator=e,this.manipulators.add(e),this.addHandles([this._createShiftDragPipeline(e),e.events.on("grab-changed",i=>{this._onShiftGrab(i),t(e)})]);const i=!this.view.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result,a=new mt(this.view,(t,e)=>F(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateHeadingManipulator=a,this.manipulators.add(a),this.addHandles([this._createRotateHeadingDragPipeline(a),a.events.on("grab-changed",e=>{this._onRotateHeadingGrab(e),t(a)})]);const s=new mt(this.view,(t,e)=>B(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateTiltManipulator=s,this.manipulators.add(s),this.addHandles([this._createRotateTiltDragPipeline(s),s.events.on("grab-changed",e=>{this._onRotateTiltGrab(e),t(s)})]),this.resizeManipulators=this._resizeHandles.map((e,i)=>{const a=new vt(this.view,e);return this.addHandles([this._createResizeDragPipeline(a),a.events.on("grab-changed",e=>{this._onResizeGrab(e,i),t(a)})]),a}),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=$(this.view),this._previewPlaneOutlineVisualElement=tt(this.view),this._previewPlaneOutlineVisualElement.width=J,this.addHandles(n(()=>[this.analysisViewData.plane,this.analysis.tiltEnabled],()=>this._updateManipulators(),r)),this.addHandles([l(()=>"sliced"===this.state,()=>{this.finishToolCreation(),this.stop()},o),n(()=>this.view.state.camera,()=>this._onCameraChange())])}destroy(){this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=a(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=a(this._previewPlaneGridVisualElement)}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this.active&&(this._placingSlicePlane||"exclude"===this.mode)?"crosshair":null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this.removeHandles("analysis"),this._set("analysis",t)}get mode(){return this._mode}static{this.disableEngineLayers=!1}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _placingSlicePlane(){return this.active&&!this.inputState&&"place"===this._mode}start(t){this._finishToolCreationIfValid(),this._mode=t,this.active||(this.view.activeTool=this)}stop(){this.active&&(this.view.activeTool=null)}onActivate(){this._finishToolCreationIfValid(),"none"===this._mode&&null==this.analysisViewData.plane&&(this._mode="place")}onDeactivate(){this._mode="none",this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-move":this._onPointerMove(t);break;case"immediate-click":if(!kt(t))return;"exclude"===this._mode?t.defer(async()=>{await this._onClickExcludeLayer(t)&&t.stopPropagation()}):this._onClickPlacePlane(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Mt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onClickPlacePlane(t){if(!this._placingSlicePlane)return!1;const i=Mt(t),a=E();return!!this._pickPlane(i,!1,this._activeKeyModifiers,a)&&(S(a,this._startPlane),this.analysis.shape=et(a,this.view,this.view.spatialReference,new e),this.stop(),!0)}async _onClickExcludeLayer(t){if("exclude"!==this.mode)return!1;const e=await this.view.hitTest(Mt(t)),i=e.results.at(0);if(i){const t=("graphic"===i.type?A(i.graphic.origin)??i.graphic.sourceLayer??null:null)??i.layer;t&&"subtype-sublayer"!==t.type&&this.analysis.excludedLayers.push(t)}else e.ground.layer?this.analysis.excludedLayers.push(e.ground.layer):this.analysis.excludeGroundSurface=!0;return this.stop(),!0}_onKeyDown(t){return(t.key===Q||t.key===W)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==Q&&t.key!==W||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=Pt(this.view.state.camera,t.screenPoint,Et);S(this.analysisViewData.plane,this._startPlane),this.inputState=Dt(e,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(y(C(this.analysisViewData.plane),e.ray.direction)/P(e.ray.direction)))/i,1),s=-H(this._startPlane.plane,e.renderEnd),n=-H(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=w(U.get(),this._startPlane.origin),i=w(U.get(),C(this._startPlane));f(i,i,-t.depth),g(i,i,e);const a=j(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,E());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,1,R()),i=Pt(this.view.state.camera,t.screenPoint,Et),a=D();z(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,2,R()),i=Pt(this.view.state.camera,t.screenPoint,Et),a=D();z(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=O(t.rotatePlane),a=dt(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=_(I.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=M(U.get(),this._startPlane.basis1,e),a=M(U.get(),this._startPlane.basis2,e),s=j(this.analysisViewData.plane.origin,i,a,E());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=Pt(this.view.state.camera,t.screenPoint,Et),a=U.get();z(this.analysisViewData.plane.plane,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:T(a)})}_createResizeDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=S(this.analysisViewData.plane,E());e.next(_t(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next(()=>{this._updateBoundedPlane(s)})})}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=at(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,S(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){if("exclude"===this.mode)return;let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(this.active){const a=null!=i?i:E();if(i=null!=i?S(i,xt):null,this._pickPlane(t,!0,e,a)){const t=Y;let e=!1;null!=i&&(e=y(O(i.plane),O(a.plane))<t||y(V(U.get(),i.basis1),V(U.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=h({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*X),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=s(this._frameTask)}_pickMinResult(t){const e=u(t,K.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=U.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(U.get()),l=this.view.state.camera;y(r,l.viewForward)>0&&f(r,r,-1);const o=st(n,l),h=(e?1:-1)*o*Z,p=f(U.get(),r,h);g(p,p,n);const u=this.analysis.tiltEnabled?3:0,c=i[Q]?2:i[W]?1:u;return nt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=rt,this.rotateHeadingManipulator.state|=rt,this.rotateTiltManipulator.state|=rt,this._prevPointerMoveTimeout=this._clock.setTimeout(()=>{this.shiftManipulator.state&=~rt,this.rotateHeadingManipulator.state&=~rt,this.rotateTiltManipulator.state&=~rt},this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.disableEngineLayers)return;let t,e,i=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=this._previewPlane??t,i=!1;else{if(null==this._previewPlane)return this._setManipulatorVisibility(!1),void this._setPreviewPlaneVisibility(!1);e=t=this._previewPlane,i=!0}if(this._setManipulatorVisibility(!i),!i){const e=lt(t,I.get());ot(this.shiftManipulator,e,t,this.view.state.camera),ht(this.rotateHeadingManipulator,e,t,this.view.renderCoordsHelper),pt(this.rotateTiltManipulator,e,t),this.resizeManipulators.forEach((i,a)=>ut(i,this._resizeHandles[a],e,t))}this._setPreviewPlaneVisibility(i||"place"===this._mode),this._updatePreviewPlaneTransform(e),this._updateMaterials()}_setManipulatorVisibility(t){this.shiftManipulator.available=t,this.rotateHeadingManipulator.available=t,this.rotateTiltManipulator.available=t&&this.analysis.tiltEnabled,this.resizeManipulators.forEach(e=>e.available=t)}_updatePreviewPlaneTransform(t){const e=lt(t,I.get()),i=b(U.get(),P(t.basis1),P(t.basis2),1),a=v(I.get(),i),s=m(a,e,a);this._previewPlaneOutlineVisualElement.transform=s,this._previewPlaneGridVisualElement.transform=s}_setPreviewPlaneVisibility(t){const e=this._previewPlaneOutlineVisualElement,i=this._previewPlaneGridVisualElement;t&&(e.attached=!0,i.attached=!0),e.visible=t,i.visible=t}_updateMaterials(){const t=L(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=k(q);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=x}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach(t=>{t.interactive=!0});this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach(e=>{e.interactive=e===t})}_finishToolCreationIfValid(){this.analysis.valid&&this.finishToolCreation()}get test(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};t([c()],bt.prototype,"_clock",void 0),t([c({constructOnly:!0})],bt.prototype,"view",void 0),t([c()],bt.prototype,"analysisViewData",void 0),t([c({readOnly:!0})],bt.prototype,"state",null),t([c({readOnly:!0})],bt.prototype,"cursor",null),t([c()],bt.prototype,"analysis",null),t([c()],bt.prototype,"multiTouchEnabled",void 0),t([c()],bt.prototype,"removeIncompleteOnCancel",void 0),t([c()],bt.prototype,"_mode",void 0),t([c()],bt.prototype,"mode",null),t([c({value:null})],bt.prototype,"inputState",null),t([c()],bt.prototype,"_placingSlicePlane",null),bt=Vt=t([d("esri.views.3d.analysis.Slice.SliceTool")],bt);const Tt=bt;function Dt(t,e,i){const a=ct(e,C(i),t.direction,R()),s=D();return z(a,t,s)?{type:"shift",shiftPlane:a,depth:0,startPoint:s}:null}function kt(t){return"mouse"!==t.pointerType||0===t.button}const xt=E(),Et=G();export{Tt as default};
2
+ import{__decorate as t}from"tslib";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import{destroyMaybe as a,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as r,when as l,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{createScreenPoint as p,screenPointObjectToArray as u}from"../../../../core/screenUtils.js";import{property as c,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as _,fromScaling as v,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{dot as y,length as P,copy as w,scale as f,add as g,transformMat4 as M,normalize as V,set as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as T,create as D}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as k,ZEROS as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as E}from"../../../../core/support/UpdatingHandles.js";import{c as S,a as H,n as C,f as j}from"../../../../chunks/boundedPlane.js";import{signedDistance as R,create as z,intersectRay as O,getNormal as G}from"../../../../geometry/support/plane.js";import{create as U}from"../../../../geometry/support/ray.js";import{sv3d as I,sm4d as K,sv2d as A}from"../../../../geometry/support/vectorStacks.js";import{getSliceableContainer as F}from"../../../../graphic/getSliceableContainer.js";import{getRotateHeadingTexture as B,getTiltRotateTexture as L}from"../images/Factory.js";import{getOutlineColor as q,planeColor as N}from"./settings.js";import{pointerMoveTimerMs as J,planePreviewOutlineWidth as Q,forceVerticalModifier as W,forceHorizontalModifier as X,previewFadeDurationSeconds as Y,previewFadeDotThreshold as Z,initialDepthOffsetFrac as $}from"./sliceToolConfig.js";import{createGridVisualElement as tt,createOutlineVisualElement as et,planeToShape as it,createRotatePlane as at,resizePlane as st,calculatePlaneHalfSize as nt,createPlane as rt,DidPointerMoveRecentlyFlag as lt,calculateBoundedPlaneTranslateRotate as ot,updateShiftRestartHandle as ht,updateRotateHeadingHandle as pt,updateRotateTiltHandle as ut,updateResizeHandle as ct,createShiftPlane as dt}from"./sliceToolUtils.js";import{calculateInputRotationTransform as _t}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as vt}from"../../interactive/editingTools/dragEventPipeline3D.js";import{ResizeManipulator as mt}from"../../interactive/manipulators/ResizeManipulator.js";import{RotateManipulator as yt}from"../../interactive/manipulators/RotateManipulator.js";import{ShiftManipulator as Pt}from"../../interactive/manipulators/ShiftManipulator.js";import{fromScreenNormalized as wt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as ft}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as gt}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as Mt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Vt}from"../../../support/screenUtils.js";var bt;let Tt=class extends ft{static{bt=this}constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.multiTouchEnabled=!1,this.removeIncompleteOnCancel=!1,this._mode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._frameTask=null,this._pointerMoveTimerMs=J,this._prevPointerMoveTimeout=null,this._updatingHandles=new E,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=S(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=p(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=Mt(t.view.state.viewingMode)}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&H(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new Pt(this.view,1);this.shiftManipulator=e,this.manipulators.add(e),this.addHandles([this._createShiftDragPipeline(e),e.events.on("grab-changed",i=>{this._onShiftGrab(i),t(e)})]);const i=!this.view.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result,a=new yt(this.view,(t,e)=>B(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateHeadingManipulator=a,this.manipulators.add(a),this.addHandles([this._createRotateHeadingDragPipeline(a),a.events.on("grab-changed",e=>{this._onRotateHeadingGrab(e),t(a)})]);const s=new yt(this.view,(t,e)=>L(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateTiltManipulator=s,this.manipulators.add(s),this.addHandles([this._createRotateTiltDragPipeline(s),s.events.on("grab-changed",e=>{this._onRotateTiltGrab(e),t(s)})]),this.resizeManipulators=this._resizeHandles.map((e,i)=>{const a=new mt(this.view,e);return this.addHandles([this._createResizeDragPipeline(a),a.events.on("grab-changed",e=>{this._onResizeGrab(e,i),t(a)})]),a}),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=tt(this.view),this._previewPlaneOutlineVisualElement=et(this.view),this._previewPlaneOutlineVisualElement.width=Q,this.addHandles(n(()=>[this.analysisViewData.plane,this.analysis.tiltEnabled],()=>this._updateManipulators(),r)),this.addHandles([l(()=>"sliced"===this.state,()=>{this.finishToolCreation(),this.stop()},o),this._updatingHandles.add(()=>this.view.state.camera,()=>this._onCameraChange())])}destroy(){this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=a(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=a(this._previewPlaneGridVisualElement),this._updatingHandles.destroy()}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this.active&&(this._placingSlicePlane||"exclude"===this.mode)?"crosshair":null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this.removeHandles("analysis"),this._set("analysis",t)}get updating(){return this._updatingHandles.updating}get mode(){return this._mode}static{this.disableEngineLayers=!1}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _placingSlicePlane(){return this.active&&!this.inputState&&"place"===this._mode}start(t){this._finishToolCreationIfValid(),this._mode=t,this.active||(this.view.activeTool=this)}stop(){this.active&&(this.view.activeTool=null)}onActivate(){this._finishToolCreationIfValid(),"none"===this._mode&&null==this.analysisViewData.plane&&(this._mode="place")}onDeactivate(){this._mode="none",this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-move":this._onPointerMove(t);break;case"immediate-click":if(!xt(t))return;"exclude"===this._mode?t.defer(async()=>{await this._onClickExcludeLayer(t)&&t.stopPropagation()}):this._onClickPlacePlane(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Vt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onClickPlacePlane(t){if(!this._placingSlicePlane)return!1;const i=Vt(t),a=S();return!!this._pickPlane(i,!1,this._activeKeyModifiers,a)&&(H(a,this._startPlane),this.analysis.shape=it(a,this.view,this.view.spatialReference,new e),this.stop(),!0)}async _onClickExcludeLayer(t){if("exclude"!==this.mode)return!1;const e=await this.view.hitTest(Vt(t)),i=e.results.at(0);if(i){const t=("graphic"===i.type?F(i.graphic.origin)??i.graphic.sourceLayer??null:null)??i.layer;t&&"subtype-sublayer"!==t.type&&this.analysis.excludedLayers.push(t)}else e.ground.layer?this.analysis.excludedLayers.push(e.ground.layer):this.analysis.excludeGroundSurface=!0;return this.stop(),!0}_onKeyDown(t){return(t.key===W||t.key===X)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==W&&t.key!==X||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=wt(this.view.state.camera,t.screenPoint,St);H(this.analysisViewData.plane,this._startPlane),this.inputState=kt(e,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return gt(t,(t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(vt(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(y(C(this.analysisViewData.plane),e.ray.direction)/P(e.ray.direction)))/i,1),s=-R(this._startPlane.plane,e.renderEnd),n=-R(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=w(I.get(),this._startPlane.origin),i=w(I.get(),C(this._startPlane));f(i,i,-t.depth),g(i,i,e);const a=j(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,S());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=at(this.analysisViewData.plane,this.view.renderCoordsHelper,1,z()),i=wt(this.view.state.camera,t.screenPoint,St),a=D();O(e,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return gt(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(vt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=at(this.analysisViewData.plane,this.view.renderCoordsHelper,2,z()),i=wt(this.view.state.camera,t.screenPoint,St),a=D();O(e,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return gt(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?H(this.analysisViewData.plane,S()):null;e.next(vt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=G(t.rotatePlane),a=_t(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=_(K.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=M(I.get(),this._startPlane.basis1,e),a=M(I.get(),this._startPlane.basis2,e),s=j(this.analysisViewData.plane.origin,i,a,S());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=wt(this.view.state.camera,t.screenPoint,St),a=I.get();O(this.analysisViewData.plane.plane,i,a)&&(H(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:T(a)})}_createResizeDragPipeline(t){return gt(t,(t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=H(this.analysisViewData.plane,S());e.next(vt(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next(()=>{this._updateBoundedPlane(s)})})}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=st(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,H(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){if("exclude"===this.mode)return;let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(this.active){const a=null!=i?i:S();if(i=null!=i?H(i,Et):null,this._pickPlane(t,!0,e,a)){const t=Z;let e=!1;null!=i&&(e=y(G(i.plane),G(a.plane))<t||y(V(I.get(),i.basis1),V(I.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=h({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*Y),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=s(this._frameTask)}_pickMinResult(t){const e=u(t,A.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=I.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(I.get()),l=this.view.state.camera;y(r,l.viewForward)>0&&f(r,r,-1);const o=nt(n,l),h=(e?1:-1)*o*$,p=f(I.get(),r,h);g(p,p,n);const u=this.analysis.tiltEnabled?3:0,c=i[W]?2:i[X]?1:u;return rt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=lt,this.rotateHeadingManipulator.state|=lt,this.rotateTiltManipulator.state|=lt,this._prevPointerMoveTimeout=this._clock.setTimeout(()=>{this.shiftManipulator.state&=~lt,this.rotateHeadingManipulator.state&=~lt,this.rotateTiltManipulator.state&=~lt},this._pointerMoveTimerMs)}_updateManipulators(){if(bt.disableEngineLayers)return;let t,e,i=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=this._previewPlane??t,i=!1;else{if(null==this._previewPlane)return this._setManipulatorVisibility(!1),void this._setPreviewPlaneVisibility(!1);e=t=this._previewPlane,i=!0}if(this._setManipulatorVisibility(!i),!i){const e=ot(t,K.get());ht(this.shiftManipulator,e,t,this.view.state.camera),pt(this.rotateHeadingManipulator,e,t,this.view.renderCoordsHelper),ut(this.rotateTiltManipulator,e,t),this.resizeManipulators.forEach((i,a)=>ct(i,this._resizeHandles[a],e,t))}this._setPreviewPlaneVisibility(i||"place"===this._mode),this._updatePreviewPlaneTransform(e),this._updateMaterials()}_setManipulatorVisibility(t){this.shiftManipulator.available=t,this.rotateHeadingManipulator.available=t,this.rotateTiltManipulator.available=t&&this.analysis.tiltEnabled,this.resizeManipulators.forEach(e=>e.available=t)}_updatePreviewPlaneTransform(t){const e=ot(t,K.get()),i=b(I.get(),P(t.basis1),P(t.basis2),1),a=v(K.get(),i),s=m(a,e,a);this._previewPlaneOutlineVisualElement.transform=s,this._previewPlaneGridVisualElement.transform=s}_setPreviewPlaneVisibility(t){const e=this._previewPlaneOutlineVisualElement,i=this._previewPlaneGridVisualElement;t&&(e.attached=!0,i.attached=!0),e.visible=t,i.visible=t}_updateMaterials(){const t=q(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=k(N);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=x}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach(t=>{t.interactive=!0});this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach(e=>{e.interactive=e===t})}_finishToolCreationIfValid(){this.analysis.valid&&this.finishToolCreation()}get test(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};t([c()],Tt.prototype,"_clock",void 0),t([c({constructOnly:!0})],Tt.prototype,"view",void 0),t([c()],Tt.prototype,"analysisViewData",void 0),t([c({readOnly:!0})],Tt.prototype,"state",null),t([c({readOnly:!0})],Tt.prototype,"cursor",null),t([c()],Tt.prototype,"analysis",null),t([c()],Tt.prototype,"multiTouchEnabled",void 0),t([c()],Tt.prototype,"removeIncompleteOnCancel",void 0),t([c()],Tt.prototype,"updating",null),t([c()],Tt.prototype,"_mode",void 0),t([c()],Tt.prototype,"mode",null),t([c({value:null})],Tt.prototype,"inputState",null),t([c()],Tt.prototype,"_placingSlicePlane",null),Tt=bt=t([d("esri.views.3d.analysis.Slice.SliceTool")],Tt);const Dt=Tt;function kt(t,e,i){const a=dt(e,C(i),t.direction,z()),s=D();return O(a,t,s)?{type:"shift",shiftPlane:a,depth:0,startPoint:s}:null}function xt(t){return"mouse"!==t.pointerType||0===t.button}const Et=S(),St=U();export{Dt as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as a}from"../../../../core/reactiveUtils.js";import{property as r,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as d}from"./ViewshedSnappingController.js";import{ViewshedSubTool as u}from"./ViewshedSubTool.js";import{findSubTool as h}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as v}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as b}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as g}from"../../../interactive/keybindings.js";import _ from"../../../interactive/sketch/SketchOptions.js";import{enterInputModeIfAvailable as T,makeTooltip as y}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as m}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";let V=class extends b{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._selectedManipulator=null,this._observerTooltipSketchOptions=new _({tooltips:{enabled:!0}}),this._observerTooltipConnectionHandle=null}initialize(){const{snappingManager:e,view:t}=this;this._interactionVisuals=new c({view:t}),this._snappingController=new d({snappingManager:e,view:t}),this._initializeObserverTooltip(t);const o=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=i(()=>o,({viewshedComputedData:e})=>{const t=new u({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([n(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},l),n(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(null==e)return;const{subTool:t,observer:i,target:o}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(o,!1)},a),n(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),a),n(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;this._connectObserverTooltip(i),null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.observerManipulator)},a)])}destroy(){this._selectManipulator(null),this._disconnectObserverTooltip(),o(this.subToolHandles),o(this._interactionVisuals),o(this._snappingController),o(this._observerTooltip)}get updating(){return this._snappingController?.updating}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){const t=this._selectedSubTool,i=this.selectedViewshedComputedData;if(null==t||null==i)return void this._interactionVisuals?.setVisibility(!1);const o=t.moveInteractionState,s=e?o.grabbing:o.dragging,n=t.scaleOrientInteractionState,l=e?n.grabbing:n.dragging;if(!(this.analysisViewData.visible&&(s||l)))return void this._interactionVisuals?.setVisibility(!1);const a=s?i.elevationAlignedObserverRenderSpace:i.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:a,laserlineVisible:!0,verticalLineVisible:s,intersectsWorldUp:s})}createObserverMoveSnappingPipeline(e,t,i,o=!1){return this._snappingController.createObserverMoveSnappingPipeline(e,t,i,o)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!T(e,this._observerTooltip))switch(e.type){case"key-down":g.cancel===e.key?this._cancelKeyHandler(e):g.delete.includes(e.key)&&this._deleteKeyHandler(e);break;case"hold":this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){const t=this._observerTooltipSketchOptions;this._observerTooltip=y(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new m({sketchOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),null==e)return void this._observerTooltip.clear();const t=e.observerManipulatedObject;this._observerTooltipConnectionHandle=v(this._observerTooltip,t,()=>({sketchOptions:this._observerTooltipSketchOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=s(this._observerTooltipConnectionHandle)}_cancelKeyHandler(e){this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_deleteKeyHandler(e){const t=this.selectedViewshed;null!=t&&(this.analysis.viewsheds.remove(t),e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return h(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([r({constructOnly:!0})],V.prototype,"analysis",void 0),e([r({constructOnly:!0})],V.prototype,"analysisViewData",void 0),e([r({constructOnly:!0})],V.prototype,"snappingManager",void 0),e([r({constructOnly:!0})],V.prototype,"view",void 0),e([r()],V.prototype,"subToolHandles",void 0),e([r()],V.prototype,"removeIncompleteOnCancel",void 0),e([r()],V.prototype,"automaticManipulatorSelection",void 0),e([r()],V.prototype,"multiTouchEnabled",void 0),e([r()],V.prototype,"_selectedManipulator",void 0),e([r()],V.prototype,"_interactionVisuals",void 0),e([r()],V.prototype,"_snappingController",void 0),e([r()],V.prototype,"_observerTooltip",void 0),e([r()],V.prototype,"_observerTooltipInfo",void 0),e([r()],V.prototype,"updating",null),e([r()],V.prototype,"grabbing",null),e([r()],V.prototype,"cursor",null),e([r()],V.prototype,"selectedViewshed",null),e([r()],V.prototype,"selectedViewshedComputedData",null),e([r()],V.prototype,"_selectedSubTool",null),V=e([p("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],V);export{V as ViewshedEditTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as a}from"../../../../core/reactiveUtils.js";import{property as r,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as u}from"./ViewshedSnappingController.js";import{ViewshedSubTool as h}from"./ViewshedSubTool.js";import{findSubTool as v}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as b}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as g}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import T from"../../../interactive/options/InteractiveToolOptions.js";import{enterInputModeIfAvailable as m,makeTooltip as y}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as V}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";let w=class extends g{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._selectedManipulator=null,this._observerToolOptions=new T({tooltips:{enabled:!0}}),this._observerTooltipConnectionHandle=null,this._updatingHandles=new d}initialize(){const{snappingManager:e,view:t}=this;this._interactionVisuals=new c({view:t}),this._snappingController=new u({snappingManager:e,view:t}),this._initializeObserverTooltip(t);const o=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=i(()=>o,({viewshedComputedData:e})=>{const t=new h({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([n(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},l),this._updatingHandles.add(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(null==e)return;const{subTool:t,observer:i,target:o}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(o,!1)},a),this._updatingHandles.add(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),a),this._updatingHandles.add(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;this._connectObserverTooltip(i),null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.observerManipulator)},a)])}destroy(){this._selectManipulator(null),this._disconnectObserverTooltip(),o(this.subToolHandles),o(this._interactionVisuals),o(this._snappingController),o(this._observerTooltip),this._updatingHandles.destroy()}get updating(){return!!this._snappingController?.updating||this._updatingHandles.updating||this.subToolHandles.some(({subTool:e})=>e.updating)}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){const t=this._selectedSubTool,i=this.selectedViewshedComputedData;if(null==t||null==i)return void this._interactionVisuals?.setVisibility(!1);const o=t.moveInteractionState,s=e?o.grabbing:o.dragging,n=t.scaleOrientInteractionState,l=e?n.grabbing:n.dragging;if(!(this.analysisViewData.visible&&(s||l)))return void this._interactionVisuals?.setVisibility(!1);const a=s?i.elevationAlignedObserverRenderSpace:i.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:a,laserlineVisible:!0,verticalLineVisible:s,intersectsWorldUp:s})}createObserverMoveSnappingPipeline(e,t,i,o=!1){return this._snappingController.createObserverMoveSnappingPipeline(e,t,i,o)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!m(e,this._observerTooltip))switch(e.type){case"key-down":_.cancel===e.key?this._cancelKeyHandler(e):_.delete.includes(e.key)&&this._deleteKeyHandler(e);break;case"hold":this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){const t=this._observerToolOptions;this._observerTooltip=y(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new V({toolOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),null==e)return void this._observerTooltip.clear();const t=e.observerManipulatedObject;this._observerTooltipConnectionHandle=b(this._observerTooltip,t,()=>({toolOptions:this._observerToolOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=s(this._observerTooltipConnectionHandle)}_cancelKeyHandler(e){this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_deleteKeyHandler(e){const t=this.selectedViewshed;null!=t&&(this.analysis.viewsheds.remove(t),e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return v(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([r({constructOnly:!0})],w.prototype,"analysis",void 0),e([r({constructOnly:!0})],w.prototype,"analysisViewData",void 0),e([r({constructOnly:!0})],w.prototype,"snappingManager",void 0),e([r({constructOnly:!0})],w.prototype,"view",void 0),e([r()],w.prototype,"subToolHandles",void 0),e([r()],w.prototype,"removeIncompleteOnCancel",void 0),e([r()],w.prototype,"automaticManipulatorSelection",void 0),e([r()],w.prototype,"multiTouchEnabled",void 0),e([r()],w.prototype,"_selectedManipulator",void 0),e([r()],w.prototype,"_interactionVisuals",void 0),e([r()],w.prototype,"_snappingController",void 0),e([r()],w.prototype,"_observerTooltip",void 0),e([r()],w.prototype,"_observerTooltipInfo",void 0),e([r()],w.prototype,"updating",null),e([r()],w.prototype,"grabbing",null),e([r()],w.prototype,"cursor",null),e([r()],w.prototype,"selectedViewshed",null),e([r()],w.prototype,"selectedViewshedComputedData",null),e([r()],w.prototype,"_selectedSubTool",null),w=e([p("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],w);export{w as ViewshedEditTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import o from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as i,throwIfAborted as n,onAbort as a}from"../../../../core/promiseUtils.js";import{watch as s,sync as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as d,getFeatureReference as _}from"./placementUtils.js";import{detachToolFromView as v}from"./toolLifecycleUtils.js";import m from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as u}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as w}from"./viewshedToolUtils.js";import{vectorToRender as g}from"../../interactive/support/viewUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{sketchKeys as f}from"../../../interactive/keybindings.js";import S from"../../../interactive/sketch/SketchOptions.js";const y="multiple",O=Symbol("hiddenManipulatorHandle");let T=class extends o{constructor(e){super(e),this.placementMode=y,this.observerPlacementElevationInfo=null,this.stagedViewshed=null,this._placeOperation=null,this._drawTool=null,this._renderer=null,this._sketchOptions=new S({tooltips:{enabled:!1}}),this._observerScenePoint=h(),this._targetScenePoint=h(),this._mapPointVector=h()}initialize(){this.addHandles([this.view.on("key-down",e=>this._handleKeyDown(e),b.DEFAULT),s(()=>{const{stagedViewshed:e}=this;return{stagedViewshed:e,stagedViewshedInAnalysis:null!=e&&this.analysis.viewsheds.includes(e)}},({stagedViewshed:e,stagedViewshedInAnalysis:t})=>{null==e||t||this.analysis.viewsheds.add(e)},r)])}destroy(){this._cancelPlacementOperation()}get updating(){return!!this._drawTool?.updating}get active(){return!!this._drawTool?.active}get creationState(){return this._get("creationState")}set creationState(e){this._set("creationState",e),this._sketchOptions.tooltips.enabled="placing-observer"===e}startPlaceOperation(e,t){this._removeStaged(),this.creationState=null,this._rejectPlaceOperation(i()),n(t);const{resolve:o,reject:s,promise:r}=Promise.withResolvers(),l=a(t,()=>this._cancelPlacementOperation());return this._placeOperation=new m({abortHandle:l,reject:s,resolve:o}),this.placementMode=e,this.observerPlacementElevationInfo=t?.elevationInfo,this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),r}cancelPlaceOperation(){null==this.creationState&&null==this._placeOperation||(this._cancelPlacementOperation(),this.callbacks.cancelTool())}_handleDeleteDuringCreation(){return null!=this.creationState&&(this._destroyDrawTool(),this._removeStaged(),this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),!0)}_handleKeyDown(e){null!=this.creationState&&(f.cancel===e.key?(this._handleCancelDuringCreation(),e.stopPropagation(),e.preventDefault()):f.delete.includes(e.key)&&(this._handleDeleteDuringCreation(),e.stopPropagation(),e.preventDefault()))}_handleCancelDuringCreation(){if(this._removeStaged()&&"multiple"===this.placementMode)return this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement();this._destroyDrawTool(),this._abortCreation()}_removeStaged(){const{stagedViewshed:e}=this;return this.stagedViewshed=null,!!e&&(this.analysis.viewsheds.remove(e),!0)}_cancelPlacementOperation(){this._destroyDrawTool(),this._removeStaged(),this.creationState=null,this._finishPlaceOperation()}_abortCreation(){this.callbacks.cancelTool(),this.creationState=null,this._finishPlaceOperation()}_handleObserverPlacementComplete(e,o,i){const n=new t({observer:e,elevationInfo:this.observerPlacementElevationInfo,feature:i});this.analysis.viewsheds.add(n),this.stagedViewshed=n,this.creationState="placing-target",this._updateStagedViewshed(o),this.callbacks.setSelectedViewshed(null)}_onCancel(e){const t=this._removeStaged();return"placing-observer"===this.creationState?t&&"multiple"===this.placementMode?(this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement()):(this._destroyDrawTool(e),void this._abortCreation()):t?(this.creationState="placing-observer",this.callbacks.setSelectedViewshed(null),void("multiple"!==this.placementMode?(this._destroyDrawTool(e),this._abortCreation()):this._startPointPlacement())):(this._destroyDrawTool(e),void this._abortCreation())}_handleTargetPlacementComplete(e){this._updateStagedViewshed(e);const t=this.stagedViewshed;this._placeOperation?.markPlacedViewshed(),this.stagedViewshed=null,this.callbacks.setSelectedViewshed(t)}_resolvePlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.resolve())}_finishPlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.finish())}_rejectPlaceOperation(e){this._clearPlaceOperationAndRun(t=>t?.reject(e))}_clearPlaceOperationAndRun(e){const t=this._placeOperation;this._placeOperation=null,this.observerPlacementElevationInfo=null,e(t)}_startObserverPlacement(){this.creationState="placing-observer",this._startPointPlacement()}_startPointPlacement(){this._drawTool&&this._destroyDrawTool(this._drawTool);const{drawTool:e,intersector:t,renderer:o,snappingManager:i}=d({analysisViewData:this.analysisViewData,snappingManager:this.snappingManager,view:this.view,sketchOptions:this._sketchOptions,elevationInfo:this._observerDrawToolElevationInfo,getSnapToSceneEnabled:()=>this._snapToSceneEnabled,onCancel:e=>this._onCancel(e),onComplete:e=>this._onComplete(e),onManipulatorCountChange:e=>this._onManipulatorCountChange(e),isPlacingObserver:()=>"placing-observer"===this.creationState});this._drawTool=e,this._renderer=o;try{this.view.addAndActivateTool(e),e.begin([u({mode:this.placementMode,onObserverComplete:(e,o)=>this._onObserverMapPointComplete(t,i,e,o),onTargetComplete:e=>this._onTargetMapPointComplete(e),onObserverPreview:e=>this._onObserverMapPointPreview(e),onTargetPreview:e=>this._onTargetMapPointPreview(e)})])}catch(n){this._destroyDrawTool(e),this._rejectPlaceOperation(n instanceof Error?n:new Error(String(n)))}}_onComplete(e){this._removeStaged(),this._resolvePlaceOperation(),this._destroyDrawTool(e),this.creationState=null}_onObserverMapPointComplete(e,t,o,i){const n=o.clone(),a=this._toScenePoint(o,this._targetScenePoint,this._observerDrawToolElevationInfo),s=_({intersector:e,snappingManager:t,screenPoint:i,view:this.view});this._renderer?.updatePlacementLocation(a),this._handleObserverPlacementComplete(n,a,s),this._setDrawToolElevationInfo(p)}_onTargetMapPointComplete(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._handleTargetPlacementComplete(t),"multiple"===this.placementMode&&(this.creationState="placing-observer",this._setDrawToolElevationInfo(this._observerDrawToolElevationInfo),this._onObserverMapPointPreview(e))}_onObserverMapPointPreview(e){const t=e.clone(),o=this._toScenePoint(t,this._observerScenePoint,this._observerDrawToolElevationInfo);this._renderer?.updatePlacementLocation(o)}_onTargetMapPointPreview(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._updateStagedViewshed(t)}_setDrawToolElevationInfo(e){const t=this._drawTool;t&&(t.elevationInfo=e)}get _observerDrawToolElevationInfo(){return this.observerPlacementElevationInfo??p}get _snapToSceneEnabled(){const e=this.observerPlacementElevationInfo?.mode;return("placing-observer"!==this.creationState||null==e||"absolute-height"===e)&&null}_onManipulatorCountChange(e){e.removeHandles(O);const t=[];e.manipulators.forEach(({manipulator:e})=>{e instanceof P&&t.push(e.disableDisplay())}),e.addHandles(t,O)}_destroyDrawTool(e=this._drawTool){this._drawTool=null,this._renderer=null,e&&v(this.view,e)}_toScenePoint(e,t,o=p){const{x:i,y:n,z:a,spatialReference:s}=e,r=this._mapPointVector;return r[0]=i,r[1]=n,r[2]=a??0,g(r,s,o,this.view,t)}_updateStagedViewshed(e){const t=this.stagedViewshed;if(!t)return;const o=this.callbacks.findViewshedComputedData(t);if(!o)return;const{heading:i,tilt:n,farDistance:a}=w(this.view,o,e);t.farDistance=a,t.tilt=n,t.heading=i}get test(){}};e([l({constructOnly:!0})],T.prototype,"analysis",void 0),e([l({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],T.prototype,"snappingManager",void 0),e([l({constructOnly:!0})],T.prototype,"view",void 0),e([l({constructOnly:!0})],T.prototype,"callbacks",void 0),e([l()],T.prototype,"placementMode",void 0),e([l()],T.prototype,"observerPlacementElevationInfo",void 0),e([l()],T.prototype,"stagedViewshed",void 0),e([l()],T.prototype,"_placeOperation",void 0),e([l()],T.prototype,"_drawTool",void 0),e([l()],T.prototype,"_renderer",void 0),e([l()],T.prototype,"_sketchOptions",void 0),e([l()],T.prototype,"updating",null),e([l()],T.prototype,"active",null),e([l({value:null})],T.prototype,"creationState",null),T=e([c("esri.views.3d.analysis.Viewshed.ViewshedPlacementController")],T);export{T as ViewshedPlacementController};
2
+ import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import o from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as i,throwIfAborted as n,onAbort as a}from"../../../../core/promiseUtils.js";import{watch as s,sync as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as d,getFeatureReference as _}from"./placementUtils.js";import{detachToolFromView as v}from"./toolLifecycleUtils.js";import m from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as u}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as w}from"./viewshedToolUtils.js";import{vectorToRender as g}from"../../interactive/support/viewUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{sketchKeys as f}from"../../../interactive/keybindings.js";import S from"../../../interactive/options/InteractiveToolOptions.js";const y="multiple",O=Symbol("hiddenManipulatorHandle");let T=class extends o{constructor(e){super(e),this.placementMode=y,this.observerPlacementElevationInfo=null,this.stagedViewshed=null,this._placeOperation=null,this._drawTool=null,this._renderer=null,this._toolOptions=new S({tooltips:{enabled:!1}}),this._observerScenePoint=h(),this._targetScenePoint=h(),this._mapPointVector=h()}initialize(){this.addHandles([this.view.on("key-down",e=>this._handleKeyDown(e),b.DEFAULT),s(()=>{const{stagedViewshed:e}=this;return{stagedViewshed:e,stagedViewshedInAnalysis:null!=e&&this.analysis.viewsheds.includes(e)}},({stagedViewshed:e,stagedViewshedInAnalysis:t})=>{null==e||t||this.analysis.viewsheds.add(e)},r)])}destroy(){this._cancelPlacementOperation()}get updating(){return!!this._drawTool?.updating}get active(){return!!this._drawTool?.active}get creationState(){return this._get("creationState")}set creationState(e){this._set("creationState",e),this._toolOptions.tooltips.enabled="placing-observer"===e}startPlaceOperation(e,t){this._removeStaged(),this.creationState=null,this._rejectPlaceOperation(i()),n(t);const{resolve:o,reject:s,promise:r}=Promise.withResolvers(),l=a(t,()=>this._cancelPlacementOperation());return this._placeOperation=new m({abortHandle:l,reject:s,resolve:o}),this.placementMode=e,this.observerPlacementElevationInfo=t?.elevationInfo,this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),r}cancelPlaceOperation(){null==this.creationState&&null==this._placeOperation||(this._cancelPlacementOperation(),this.callbacks.cancelTool())}_handleDeleteDuringCreation(){return null!=this.creationState&&(this._destroyDrawTool(),this._removeStaged(),this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),!0)}_handleKeyDown(e){null!=this.creationState&&(f.cancel===e.key?(this._handleCancelDuringCreation(),e.stopPropagation(),e.preventDefault()):f.delete.includes(e.key)&&(this._handleDeleteDuringCreation(),e.stopPropagation(),e.preventDefault()))}_handleCancelDuringCreation(){if(this._removeStaged()&&"multiple"===this.placementMode)return this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement();this._destroyDrawTool(),this._abortCreation()}_removeStaged(){const{stagedViewshed:e}=this;return this.stagedViewshed=null,!!e&&(this.analysis.viewsheds.remove(e),!0)}_cancelPlacementOperation(){this._destroyDrawTool(),this._removeStaged(),this.creationState=null,this._finishPlaceOperation()}_abortCreation(){this.callbacks.cancelTool(),this.creationState=null,this._finishPlaceOperation()}_handleObserverPlacementComplete(e,o,i){const n=new t({observer:e,elevationInfo:this.observerPlacementElevationInfo,feature:i});this.analysis.viewsheds.add(n),this.stagedViewshed=n,this.creationState="placing-target",this._updateStagedViewshed(o),this.callbacks.setSelectedViewshed(null)}_onCancel(e){const t=this._removeStaged();return"placing-observer"===this.creationState?t&&"multiple"===this.placementMode?(this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement()):(this._destroyDrawTool(e),void this._abortCreation()):t?(this.creationState="placing-observer",this.callbacks.setSelectedViewshed(null),void("multiple"!==this.placementMode?(this._destroyDrawTool(e),this._abortCreation()):this._startPointPlacement())):(this._destroyDrawTool(e),void this._abortCreation())}_handleTargetPlacementComplete(e){this._updateStagedViewshed(e);const t=this.stagedViewshed;this._placeOperation?.markPlacedViewshed(),this.stagedViewshed=null,this.callbacks.setSelectedViewshed(t)}_resolvePlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.resolve())}_finishPlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.finish())}_rejectPlaceOperation(e){this._clearPlaceOperationAndRun(t=>t?.reject(e))}_clearPlaceOperationAndRun(e){const t=this._placeOperation;this._placeOperation=null,this.observerPlacementElevationInfo=null,e(t)}_startObserverPlacement(){this.creationState="placing-observer",this._startPointPlacement()}_startPointPlacement(){this._drawTool&&this._destroyDrawTool(this._drawTool);const{drawTool:e,intersector:t,renderer:o,snappingManager:i}=d({analysisViewData:this.analysisViewData,snappingManager:this.snappingManager,view:this.view,toolOptions:this._toolOptions,elevationInfo:this._observerDrawToolElevationInfo,getSnapToSceneEnabled:()=>this._snapToSceneEnabled,onCancel:e=>this._onCancel(e),onComplete:e=>this._onComplete(e),onManipulatorCountChange:e=>this._onManipulatorCountChange(e),isPlacingObserver:()=>"placing-observer"===this.creationState});this._drawTool=e,this._renderer=o;try{this.view.addAndActivateTool(e),e.begin([u({mode:this.placementMode,onObserverComplete:(e,o)=>this._onObserverMapPointComplete(t,i,e,o),onTargetComplete:e=>this._onTargetMapPointComplete(e),onObserverPreview:e=>this._onObserverMapPointPreview(e),onTargetPreview:e=>this._onTargetMapPointPreview(e)})])}catch(n){this._destroyDrawTool(e),this._rejectPlaceOperation(n instanceof Error?n:new Error(String(n)))}}_onComplete(e){this._removeStaged(),this._resolvePlaceOperation(),this._destroyDrawTool(e),this.creationState=null}_onObserverMapPointComplete(e,t,o,i){const n=o.clone(),a=this._toScenePoint(o,this._targetScenePoint,this._observerDrawToolElevationInfo),s=_({intersector:e,snappingManager:t,screenPoint:i,view:this.view});this._renderer?.updatePlacementLocation(a),this._handleObserverPlacementComplete(n,a,s),this._setDrawToolElevationInfo(p)}_onTargetMapPointComplete(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._handleTargetPlacementComplete(t),"multiple"===this.placementMode&&(this.creationState="placing-observer",this._setDrawToolElevationInfo(this._observerDrawToolElevationInfo),this._onObserverMapPointPreview(e))}_onObserverMapPointPreview(e){const t=e.clone(),o=this._toScenePoint(t,this._observerScenePoint,this._observerDrawToolElevationInfo);this._renderer?.updatePlacementLocation(o)}_onTargetMapPointPreview(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._updateStagedViewshed(t)}_setDrawToolElevationInfo(e){const t=this._drawTool;t&&(t.elevationInfo=e)}get _observerDrawToolElevationInfo(){return this.observerPlacementElevationInfo??p}get _snapToSceneEnabled(){const e=this.observerPlacementElevationInfo?.mode;return("placing-observer"!==this.creationState||null==e||"absolute-height"===e)&&null}_onManipulatorCountChange(e){e.removeHandles(O);const t=[];e.manipulators.forEach(({manipulator:e})=>{e instanceof P&&t.push(e.disableDisplay())}),e.addHandles(t,O)}_destroyDrawTool(e=this._drawTool){this._drawTool=null,this._renderer=null,e&&v(this.view,e)}_toScenePoint(e,t,o=p){const{x:i,y:n,z:a,spatialReference:s}=e,r=this._mapPointVector;return r[0]=i,r[1]=n,r[2]=a??0,g(r,s,o,this.view,t)}_updateStagedViewshed(e){const t=this.stagedViewshed;if(!t)return;const o=this.callbacks.findViewshedComputedData(t);if(!o)return;const{heading:i,tilt:n,farDistance:a}=w(this.view,o,e);t.farDistance=a,t.tilt=n,t.heading=i}get test(){}};e([l({constructOnly:!0})],T.prototype,"analysis",void 0),e([l({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],T.prototype,"snappingManager",void 0),e([l({constructOnly:!0})],T.prototype,"view",void 0),e([l({constructOnly:!0})],T.prototype,"callbacks",void 0),e([l()],T.prototype,"placementMode",void 0),e([l()],T.prototype,"observerPlacementElevationInfo",void 0),e([l()],T.prototype,"stagedViewshed",void 0),e([l()],T.prototype,"_placeOperation",void 0),e([l()],T.prototype,"_drawTool",void 0),e([l()],T.prototype,"_renderer",void 0),e([l()],T.prototype,"_toolOptions",void 0),e([l()],T.prototype,"updating",null),e([l()],T.prototype,"active",null),e([l({value:null})],T.prototype,"creationState",null),T=e([c("esri.views.3d.analysis.Viewshed.ViewshedPlacementController")],T);export{T as ViewshedPlacementController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as a,Cyclical as n}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as l}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as p,initial as u}from"../../../../core/reactiveUtils.js";import{property as d,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{sub as h,len as v,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{tryProject as g}from"../../../../geometry/projectionUtils.js";import{getZForElevationMode as m}from"../../../../support/elevationInfoUtils.js";import{viewshedToolManipulatorConfiguration as f}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as w,isSideHorizontal as _,flipSide as O}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as V}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as D}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as y}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as j}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as S}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as x,resetManipulatedObject as C,sceneSnappingAtLocation as T,dragManipulatedObject as A,sceneSnappingAtProjectedLocation as F,resetProperties as P}from"../../../interactive/dragEventPipeline.js";const z=Symbol("dragHandles");let E=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new w({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new D({view:this.view,tool:this.parentTool}),this._observerManipulator=new y(this.view,this.parentTool),this._observerManipulatedObject=new V({view:this.view,subTool:this}),this.addHandles([s(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},p),s(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},u),s(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:i,operations:a},n)=>{this._grabbing&&i!==n?.observer||(this.removeHandles(z),e?.valid&&null!=a&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),z))},u),s(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},u),s(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},u),s(()=>{const{viewshedComputedData:e,analysisViewData:i}=this,t=i.visible&&(e?.valid??!1),a=i.selectedViewshed===e?.viewshed,n=t&&a,r=e?.effectiveElevationInfo.mode;return{controlsAvailable:n,selected:a,visibleAndValid:t,zManipulationAvailable:n&&"on-the-ground"!==r}},({controlsAvailable:e,selected:i,visibleAndValid:t,zManipulationAvailable:a})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=a,this._scaleOrientManipulation.available=e,this._observerManipulator.available=t,this._observerManipulator.collisionPriority=i?2:0,this._fieldOfViewManipulation.available=e},u),s(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},u)]);const e=e=>{this.addHandles([e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i===e||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._observerManipulatedObject=l(this._observerManipulatedObject),this._moveManipulation=l(this._moveManipulation),this._fieldOfViewManipulation=l(this._fieldOfViewManipulation),this._scaleOrientManipulation=l(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=l(this._observerManipulator)}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:i||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._observerManipulator.interactive=i?e:e(this._observerManipulator),this._forEachManipulation(t=>{t.interactive=i?e:t.someManipulator(e)})}onManipulatorSelectionChanged(){if(!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new S({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:j})}_buildObserverManipulatorDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;if(null==a)return null;const n=a.data.spatialReference;return x(this._observerManipulator,(e,r,o,l)=>{let s=null;o=o.next(C(t));const p=this.parentTool.createObserverMoveSnappingPipeline(0,l,i,!0);let u=r.next(e=>{if("start"===e.action){const e=a.data.geometry;s="point"===e.type?e.clone():null}const t=this.view.toMap(e.screenEnd,{excludeLabels:!0});if(null==s||null==t)return null;t.z=m(t,this.view,i);const r=g(t,n);return null==r?null:{...e,mapStart:s,mapEnd:r}}).next(T(this.view,i));if(null!=p){const{snappingStep:e,cancelSnapping:i}=p;o.next(i),u=u.next(...e)}u.next(A(t))})}_buildMoveManipulationDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;return null==a?null:this._moveManipulation.createDragPipeline((e,a,n,r,o)=>{r=r.next(C(t));const l=this.parentTool.createObserverMoveSnappingPipeline(e,o,i);if(null!=l){const{snappingStep:e,cancelSnapping:a}=l;return r=r.next(a),{steps:n=n.next(F(this.view,i)).next(...e).next(A(t)),cancel:r}}return{steps:n=n.next(A(t)),cancel:r}},i,a.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((n,r,o)=>{if(null==e)return{steps:r,cancel:o};const l=e.viewshed;let s=null;o=o.next(P(l,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:r.next(n=>{"start"===n.action&&(s=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const r=n.deltaAngle;if(null==s&&0!==r){const e="bottom"===n.side||"left"===n.side?r>0:r<0;s=_(n.side)?0===i&&e||360===i&&!e:0===t&&e}const o=s?O(n.side):n.side;let p=0;switch(o){case"left":p=i/2-r;break;case"right":p=i/2+r;break;case"top":p=t+2*r;break;case"bottom":p=t-2*r}return _(o)?(p=a.normalize(p),p=p>270?0:p>180?180:p,l.horizontalFieldOfView=2*p):l.verticalFieldOfView=p,n}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const n=(i,t)=>(a,n,r)=>{if(null==e)return{steps:n,cancel:r};const o=e.viewshed;return r=r.next(P(o,[i])),{steps:n=n.next(t(o,e)),cancel:r}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(n("heading",(i,n)=>n=>("start"===n.action&&(t=e.heading),i.heading=a.normalize(t+n.deltaAngle),n)),e),this._scaleOrientManipulation.createTiltDragPipeline(n("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=R.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(n("farDistance",(e,i)=>t=>{const a=h(I,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=v(a)*i.metersPerUnit,r=b(a,i.targetDirection)<0?f.scaleOrientMinDistance:n;return e.farDistance=r,t}),e)])}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([d({constructOnly:!0})],E.prototype,"analysis",void 0),e([d({constructOnly:!0})],E.prototype,"analysisViewData",void 0),e([d({constructOnly:!0})],E.prototype,"parentTool",void 0),e([d({constructOnly:!0,nonNullable:!0})],E.prototype,"view",void 0),e([d()],E.prototype,"viewshed",null),e([d()],E.prototype,"_grabbing",void 0),e([d()],E.prototype,"grabbing",null),e([d()],E.prototype,"viewshedComputedData",void 0),e([d()],E.prototype,"observer",null),e([d()],E.prototype,"elevationAlignedObserverRenderSpace",null),E=e([c("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],E);const I=M(),R=new n(0,180);export{E as ViewshedSubTool};
2
+ import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as a,Cyclical as n}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as l}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as p,initial as u}from"../../../../core/reactiveUtils.js";import{property as d,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{sub as h,len as v,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as M}from"../../../../core/support/UpdatingHandles.js";import{tryProject as m}from"../../../../geometry/projectionUtils.js";import{getZForElevationMode as f}from"../../../../support/elevationInfoUtils.js";import{viewshedToolManipulatorConfiguration as _}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as w,isSideHorizontal as O,flipSide as V}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as D}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as y}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as j}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as S}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as x}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as C,resetManipulatedObject as T,sceneSnappingAtLocation as A,dragManipulatedObject as F,sceneSnappingAtProjectedLocation as P,resetProperties as H}from"../../../interactive/dragEventPipeline.js";const z=Symbol("dragHandles");let E=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._updatingHandles=new M,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new w({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new y({view:this.view,tool:this.parentTool}),this._observerManipulator=new j(this.view,this.parentTool),this._observerManipulatedObject=new D({view:this.view,subTool:this}),this.addHandles([s(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},p),this._updatingHandles.add(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},u),this._updatingHandles.add(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:i,operations:a},n)=>{this._grabbing&&i!==n?.observer||(this.removeHandles(z),e?.valid&&null!=a&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),z))},u),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},u),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},u),this._updatingHandles.add(()=>{const{viewshedComputedData:e,analysisViewData:i}=this,t=i.visible&&(e?.valid??!1),a=i.selectedViewshed===e?.viewshed,n=t&&a,r=e?.effectiveElevationInfo.mode;return{controlsAvailable:n,selected:a,visibleAndValid:t,zManipulationAvailable:n&&"on-the-ground"!==r}},({controlsAvailable:e,selected:i,visibleAndValid:t,zManipulationAvailable:a})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=a,this._scaleOrientManipulation.available=e,this._observerManipulator.available=t,this._observerManipulator.collisionPriority=i?2:0,this._fieldOfViewManipulation.available=e},u),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},u)]);const e=e=>{this.addHandles([e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i===e||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._observerManipulatedObject=l(this._observerManipulatedObject),this._moveManipulation=l(this._moveManipulation),this._fieldOfViewManipulation=l(this._fieldOfViewManipulation),this._scaleOrientManipulation=l(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=l(this._observerManipulator),this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:i||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._observerManipulator.interactive=i?e:e(this._observerManipulator),this._forEachManipulation(t=>{t.interactive=i?e:t.someManipulator(e)})}onManipulatorSelectionChanged(){if(!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new x({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:S})}_buildObserverManipulatorDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;if(null==a)return null;const n=a.data.spatialReference;return C(this._observerManipulator,(e,r,o,l)=>{let s=null;o=o.next(T(t));const p=this.parentTool.createObserverMoveSnappingPipeline(0,l,i,!0);let u=r.next(e=>{if("start"===e.action){const e=a.data.geometry;s="point"===e.type?e.clone():null}const t=this.view.toMap(e.screenEnd,{excludeLabels:!0});if(null==s||null==t)return null;t.z=f(t,this.view,i);const r=m(t,n);return null==r?null:{...e,mapStart:s,mapEnd:r}}).next(A(this.view,i));if(null!=p){const{snappingStep:e,cancelSnapping:i}=p;o.next(i),u=u.next(...e)}u.next(F(t))})}_buildMoveManipulationDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;return null==a?null:this._moveManipulation.createDragPipeline((e,a,n,r,o)=>{r=r.next(T(t));const l=this.parentTool.createObserverMoveSnappingPipeline(e,o,i);if(null!=l){const{snappingStep:e,cancelSnapping:a}=l;return r=r.next(a),{steps:n=n.next(P(this.view,i)).next(...e).next(F(t)),cancel:r}}return{steps:n=n.next(F(t)),cancel:r}},i,a.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((n,r,o)=>{if(null==e)return{steps:r,cancel:o};const l=e.viewshed;let s=null;o=o.next(H(l,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:r.next(n=>{"start"===n.action&&(s=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const r=n.deltaAngle;if(null==s&&0!==r){const e="bottom"===n.side||"left"===n.side?r>0:r<0;s=O(n.side)?0===i&&e||360===i&&!e:0===t&&e}const o=s?V(n.side):n.side;let p=0;switch(o){case"left":p=i/2-r;break;case"right":p=i/2+r;break;case"top":p=t+2*r;break;case"bottom":p=t-2*r}return O(o)?(p=a.normalize(p),p=p>270?0:p>180?180:p,l.horizontalFieldOfView=2*p):l.verticalFieldOfView=p,n}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const n=(i,t)=>(a,n,r)=>{if(null==e)return{steps:n,cancel:r};const o=e.viewshed;return r=r.next(H(o,[i])),{steps:n=n.next(t(o,e)),cancel:r}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(n("heading",(i,n)=>n=>("start"===n.action&&(t=e.heading),i.heading=a.normalize(t+n.deltaAngle),n)),e),this._scaleOrientManipulation.createTiltDragPipeline(n("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=R.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(n("farDistance",(e,i)=>t=>{const a=h(I,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=v(a)*i.metersPerUnit,r=b(a,i.targetDirection)<0?_.scaleOrientMinDistance:n;return e.farDistance=r,t}),e)])}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([d({constructOnly:!0})],E.prototype,"analysis",void 0),e([d({constructOnly:!0})],E.prototype,"analysisViewData",void 0),e([d({constructOnly:!0})],E.prototype,"parentTool",void 0),e([d({constructOnly:!0,nonNullable:!0})],E.prototype,"view",void 0),e([d()],E.prototype,"updating",null),e([d()],E.prototype,"viewshed",null),e([d()],E.prototype,"_grabbing",void 0),e([d()],E.prototype,"grabbing",null),e([d()],E.prototype,"viewshedComputedData",void 0),e([d()],E.prototype,"observer",null),e([d()],E.prototype,"elevationAlignedObserverRenderSpace",null),E=e([c("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],E);const I=g(),R=new n(0,180);export{E as ViewshedSubTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{detachToolFromView as l}from"./toolLifecycleUtils.js";import{ViewshedEditTool as r}from"./ViewshedEditTool.js";import{ViewshedPlacementController as p}from"./ViewshedPlacementController.js";import{acquire as d}from"../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as c}from"../../../interactive/snapping/snappingUtils.js";let h=class extends e{constructor(t){super(t),this._editTool=null}initialize(){const{view:t}=this;this._snappingManagerResult=d(t),this.addHandles(this._snappingManagerResult),this._placementController=new p({analysis:this.analysis,analysisViewData:this.analysisViewData,snappingManager:this._snappingManager,view:t,callbacks:{cancelTool:()=>{null!=t.activeTool&&(t.activeTool=null)},findViewshedComputedData:t=>this._findViewshedComputedData(t),isToolDestroyed:()=>this.destroyed,setSelectedViewshed:t=>{this.analysisViewData.selectedViewshed=t}}}),c(this),this.addHandles([s(()=>({creationState:this._placementController.creationState,interactive:this.analysisViewData.interactive}),({creationState:e,interactive:i})=>{if(!i)return this._placementController.cancelPlaceOperation(),void this._destroyEditTool();null==e?this._editTool||(this._editTool=new r({analysis:this.analysis,analysisViewData:this.analysisViewData,snappingManager:this._snappingManager,view:t}),t.tools.add(this._editTool)):this._destroyEditTool()},a),s(()=>t.activeTool,t=>{null!=t&&t!==this._editTool&&null==this._placementController.creationState&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._destroyEditTool(),i(this._placementController)}get selectedViewshedComputedData(){return this._editTool?.selectedViewshedComputedData}get stagedViewshed(){return this._placementController.stagedViewshed}get active(){return this._placementController.active||(this._editTool?.active??!1)}get updating(){return this._placementController.updating||!!this._editTool?.updating}get creating(){return null!=this._placementController.creationState}get snappingOptions(){return this._snappingManager.options}set snappingOptions(t){this._snappingManager.options=t}get _snappingManager(){return this._snappingManagerResult.snappingManager}async place(t,e){if(this.analysisViewData.interactive=!0,this._destroyEditTool(),await this._placementController.startPlaceOperation(t,e),"single"===t)return{}}_findViewshedComputedData(t){return this.analysisViewData.viewshedComputedDataHandles?.find(e=>e.viewshedComputedData.viewshed===t)?.viewshedComputedData}_destroyEditTool(){const t=this._editTool;this._editTool=null,null!=t&&(l(this.view,t),i(t))}get test(){}};t([o({constructOnly:!0})],h.prototype,"view",void 0),t([o({constructOnly:!0})],h.prototype,"analysis",void 0),t([o({constructOnly:!0})],h.prototype,"analysisViewData",void 0),t([o()],h.prototype,"_placementController",void 0),t([o()],h.prototype,"_editTool",void 0),t([o()],h.prototype,"_snappingManagerResult",void 0),t([o()],h.prototype,"selectedViewshedComputedData",null),t([o()],h.prototype,"stagedViewshed",null),t([o()],h.prototype,"active",null),t([o()],h.prototype,"updating",null),t([o()],h.prototype,"creating",null),t([o()],h.prototype,"snappingOptions",null),h=t([n("esri.views.3d.analysis.Viewshed.ViewshedTool")],h);const g=h;export{g as default};
2
+ import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{detachToolFromView as r}from"./toolLifecycleUtils.js";import{ViewshedEditTool as p}from"./ViewshedEditTool.js";import{ViewshedPlacementController as d}from"./ViewshedPlacementController.js";import{acquire as c}from"../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as h}from"../../../interactive/snapping/snappingUtils.js";let g=class extends e{constructor(t){super(t),this._editTool=null,this._updatingHandles=new l}initialize(){const{view:t}=this;this._snappingManagerResult=c(t),this.addHandles(this._snappingManagerResult),this._placementController=new d({analysis:this.analysis,analysisViewData:this.analysisViewData,snappingManager:this._snappingManager,view:t,callbacks:{cancelTool:()=>{null!=t.activeTool&&(t.activeTool=null)},findViewshedComputedData:t=>this._findViewshedComputedData(t),isToolDestroyed:()=>this.destroyed,setSelectedViewshed:t=>{this.analysisViewData.selectedViewshed=t}}}),h(this),this.addHandles([s(()=>({creationState:this._placementController.creationState,interactive:this.analysisViewData.interactive}),({creationState:e,interactive:i})=>{if(!i)return this._placementController.cancelPlaceOperation(),void this._destroyEditTool();null==e?this._editTool||(this._editTool=new p({analysis:this.analysis,analysisViewData:this.analysisViewData,snappingManager:this._snappingManager,view:t}),t.tools.add(this._editTool)):this._destroyEditTool()},a),this._updatingHandles.add(()=>t.activeTool,t=>{null!=t&&t!==this._editTool&&null==this._placementController.creationState&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._destroyEditTool(),i(this._placementController),this._updatingHandles.destroy()}get selectedViewshedComputedData(){return this._editTool?.selectedViewshedComputedData}get stagedViewshed(){return this._placementController.stagedViewshed}get active(){return this._placementController.active||(this._editTool?.active??!1)}get updating(){return this._updatingHandles.updating||this._placementController.updating||!!this._editTool?.updating}get creating(){return null!=this._placementController.creationState}get snappingOptions(){return this._snappingManager.options}set snappingOptions(t){this._snappingManager.options=t}get _snappingManager(){return this._snappingManagerResult.snappingManager}async place(t,e){if(this.analysisViewData.interactive=!0,this._destroyEditTool(),await this._placementController.startPlaceOperation(t,e),"single"===t)return{}}_findViewshedComputedData(t){return this.analysisViewData.viewshedComputedDataHandles?.find(e=>e.viewshedComputedData.viewshed===t)?.viewshedComputedData}_destroyEditTool(){const t=this._editTool;this._editTool=null,null!=t&&(r(this.view,t),i(t))}get test(){}};t([o({constructOnly:!0})],g.prototype,"view",void 0),t([o({constructOnly:!0})],g.prototype,"analysis",void 0),t([o({constructOnly:!0})],g.prototype,"analysisViewData",void 0),t([o()],g.prototype,"_placementController",void 0),t([o()],g.prototype,"_editTool",void 0),t([o()],g.prototype,"_snappingManagerResult",void 0),t([o()],g.prototype,"selectedViewshedComputedData",null),t([o()],g.prototype,"stagedViewshed",null),t([o()],g.prototype,"active",null),t([o()],g.prototype,"updating",null),t([o()],g.prototype,"creating",null),t([o()],g.prototype,"snappingOptions",null),g=t([n("esri.views.3d.analysis.Viewshed.ViewshedTool")],g);const u=g;export{u as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as r,sync as t,initial as o}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{ViewshedDrawToolRenderer as s}from"./ViewshedDrawToolRenderer.js";import{isValidIntersectorResult as a}from"../../webgl-engine/lib/IntersectorResult.js";import{toGraphic as l}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{DrawTool as c}from"../../../draw/DrawTool.js";import{newToolIntersector as d}from"../../../interactive/ToolIntersector.js";function p(i){const{analysisViewData:a,snappingManager:l,view:p,sketchOptions:u,elevationInfo:b,getSnapToSceneEnabled:g,onCancel:m,onComplete:j,onManipulatorCountChange:f,isPlacingObserver:w}=i,v=new s({view:p,isPlacingObserver:w}),I=d(p.state.viewingMode),M=new c({elevationInfo:b,enableVertexVisuals:!1,hasZ:!0,renderer:v,sketchOptions:u,snappingManager:l,view:p});return M.addHandles([e(v),M.on("cancel",()=>m(M)),M.on("complete",()=>j(M)),n(()=>[M.surfaceManager,g()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},r),n(()=>M.manipulators.length,()=>f(M),t),n(()=>a.visible,e=>v.analysisVisible=e,o)]),{drawTool:M,intersector:I,renderer:v,snappingManager:l}}function u({intersector:e,snappingManager:n,screenPoint:r,view:t}){const o=n.getMainFeatureCandidate();return o?g(o):r?b(r,t,e):null}function b(e,n,r){n.sceneIntersectionHelper.intersectToolIntersectorScreen(i(e.x,e.y),r);const t=r.results.min;return a(t)?l(t,n):null}function g(e){const n={id:e.layer.id,objectIdField:"objectIdField"in e.layer?e.layer.objectIdField:void 0};return{attributes:{[n.objectIdField??"ObjectId"]:e.objectId},layer:n,objectId:e.objectId,uid:null}}export{p as createDrawTool,u as getFeatureReference};
2
+ import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as r,sync as o,initial as t}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{ViewshedDrawToolRenderer as a}from"./ViewshedDrawToolRenderer.js";import{isValidIntersectorResult as s}from"../../webgl-engine/lib/IntersectorResult.js";import{toGraphic as l}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{DrawTool as c}from"../../../draw/DrawTool.js";import{newToolIntersector as d}from"../../../interactive/ToolIntersector.js";function p(i){const{analysisViewData:s,snappingManager:l,view:p,toolOptions:u,elevationInfo:b,getSnapToSceneEnabled:g,onCancel:m,onComplete:j,onManipulatorCountChange:f,isPlacingObserver:w}=i,v=new a({view:p,isPlacingObserver:w}),I=d(p.state.viewingMode),M=new c({elevationInfo:b,enableVertexVisuals:!1,hasZ:!0,renderer:v,toolOptions:u,snappingManager:l,view:p});return M.addHandles([e(v),M.on("cancel",()=>m(M)),M.on("complete",()=>j(M)),n(()=>[M.surfaceManager,g()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},r),n(()=>M.manipulators.length,()=>f(M),o),n(()=>s.visible,e=>v.analysisVisible=e,t)]),{drawTool:M,intersector:I,renderer:v,snappingManager:l}}function u({intersector:e,snappingManager:n,screenPoint:r,view:o}){const t=n.getMainFeatureCandidate();return t?g(t):r?b(r,o,e):null}function b(e,n,r){n.sceneIntersectionHelper.intersectToolIntersectorScreen(i(e.x,e.y),r);const o=r.results.min;return s(o)?l(o,n):null}function g(e){const n={id:e.layer.id,objectIdField:"objectIdField"in e.layer?e.layer.objectIdField:void 0};return{attributes:{[n.objectIdField??"ObjectId"]:e.objectId},layer:n,objectId:e.objectId,uid:null}}export{p as createDrawTool,u as getFeatureReference};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import"../../../core/has.js";import i from"../../../core/Logger.js";import{mapCollection as r}from"../../../core/mapCollectionUtils.js";import{abortMaybe as o,destroyMaybe as a}from"../../../core/maybe.js";import{watch as d,initial as l,when as n,syncAndInitial as h}from"../../../core/reactiveUtils.js";import{property as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import{copy as u,exactEquals as v}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as m,isLoaded as V}from"../../../geometry/projectionUtils.js";import g from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as _}from"./support/projectionUtils.js";import{registerAnalysisView as y,unselectViewshedInOtherAnalysisViews as f}from"./Viewshed/analysisViewRegister.js";import{ViewshedComputedData as b}from"./Viewshed/ViewshedComputedData.js";import j from"./Viewshed/ViewshedTool.js";import{ViewshedVisualization as R}from"./Viewshed/ViewshedVisualization.js";import{createElevationUpdateHandle as D}from"../support/elevationUpdateUtils.js";import{Intersector as C}from"../webgl-engine/lib/Intersector.js";import{Viewshed as O}from"../webgl-engine/lib/Viewshed.js";let F=class extends g{constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this._tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this.userOperation=null,this._viewshedRenderNode=null,this._intersector=null}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get toolActive(){return this._tool?.active??!1}get toolCreating(){return this._tool?.creating??!1}get stagedViewshed(){return this._tool?.stagedViewshed}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){const t=null!=e&&this.analysis.viewsheds.includes(e)?e:null;this._unselectOtherViewsheds(t),this._selectedViewshed=t}get selectedViewshedComputedData(){return this._tool?.selectedViewshedComputedData}get updating(){return!!this._tool?.updating}get _isDecoration(){return!this.parent}initialize(){const e=this.view;this.addHandles(y(e,this)),this._viewshedRenderNode=new O({view:e,selectedViewshed:()=>this.selectedViewshed??this.stagedViewshed,isDecoration:this._isDecoration}),this._intersector=new C(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=0,this.viewshedComputedDataHandles=r(()=>this.analysis.viewsheds,t=>{const s=new b({view:e,viewshed:t}),r=Symbol();return this.addHandles([d(()=>({valid:s.valid,canProject:m(s.observer?.spatialReference,this.view.spatialReference)||V()}),({valid:e,canProject:t},r)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):r?.valid&&r?.canProject&&this._removeViewshedsFromRenderer(s),t||_(this.analysis,s.observer.spatialReference,i.getLogger(this)))},l),D({view:e,geometry:s.observer,onElevationChanges:()=>s.onElevationChange()}),d(()=>[e.state.camera,e.slice.plane,s.elevationAlignedObserverRenderSpace,s.elevationAlignedTargetRenderSpace,s.verticalFieldOfView,s.horizontalFieldOfView,s.feature],()=>{this._updateObserverFromFeature(e,s)},l)],r),{viewshedComputedData:s,remove:()=>{this.selectedViewshed===s.viewshed&&(this.selectedViewshed=null),this.removeHandles(r),this._removeViewshedsFromRenderer(s),s.destroy()}}}),this._visualization=new R({view:e,analysisViewData:this,isDecoration:this._isDecoration}),this._tool=new j({analysis:this.analysis,analysisViewData:this,view:e}),this.addHandles([d(()=>this.visible,e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.map(e=>e.viewshedComputedData).filter(e=>e.valid).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)}),n(()=>this.interactive,()=>this._unselectOtherViewsheds(this.selectedViewshed),h)])}destroy(){this.userOperation=o(this.userOperation),this._tool=a(this._tool),this._visualization=a(this._visualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map(e=>e.viewshedComputedData).toArray())}async createViewsheds(e){return this._tool.place("multiple",e)}place(e){return this._tool.place("single",e)}_addViewshedsToRenderer(e){this._viewshedRenderNode.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderNode.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.elevationAlignedObserverRenderSpace,o=i.elevationAlignedTargetRenderSpace,a=u(w(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:u(w(),o),targetFeatureId:null};s(e,this._intersector,d,e=>Math.min(e,.05*i.farDistanceRenderSpace)),i.observerRenderSpaceOverride=v(a,r)?null:a}_unselectOtherViewsheds(e){null!=e&&f(this.view,this)}get test(){}};e([p({readOnly:!0})],F.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],F.prototype,"analysis",void 0),e([p()],F.prototype,"_tool",void 0),e([p()],F.prototype,"toolActive",null),e([p()],F.prototype,"toolCreating",null),e([p()],F.prototype,"stagedViewshed",null),e([p()],F.prototype,"_selectedViewshed",void 0),e([p()],F.prototype,"selectedViewshed",null),e([p()],F.prototype,"selectedViewshedComputedData",null),e([p()],F.prototype,"viewshedComputedDataHandles",void 0),e([p()],F.prototype,"userOperation",void 0),e([p()],F.prototype,"updating",null),e([p()],F.prototype,"_visualization",void 0),e([p()],F.prototype,"_viewshedRenderNode",void 0),F=e([c("esri.views.3d.analysis.ViewshedAnalysisView3D")],F);const A=F;export{A as default};
2
+ import{__decorate as e}from"tslib";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import"../../../core/has.js";import i from"../../../core/Logger.js";import{mapCollection as r}from"../../../core/mapCollectionUtils.js";import{abortMaybe as o,destroyMaybe as a}from"../../../core/maybe.js";import{watch as d,initial as l,when as n,syncAndInitial as h}from"../../../core/reactiveUtils.js";import{property as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import{copy as u,exactEquals as v}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as m,isLoaded as V}from"../../../geometry/projectionUtils.js";import g from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as _}from"./support/projectionUtils.js";import{registerAnalysisView as y,unselectViewshedInOtherAnalysisViews as f}from"./Viewshed/analysisViewRegister.js";import{ViewshedComputedData as b}from"./Viewshed/ViewshedComputedData.js";import j from"./Viewshed/ViewshedTool.js";import{ViewshedVisualization as R}from"./Viewshed/ViewshedVisualization.js";import{createElevationUpdateHandle as D}from"../support/elevationUpdateUtils.js";import{Intersector as C}from"../webgl-engine/lib/Intersector.js";import{Viewshed as O}from"../webgl-engine/lib/Viewshed.js";let F=class extends g{constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this._tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this.userOperation=null,this._viewshedRenderNode=null,this._intersector=null}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get toolActive(){return this._tool?.active??!1}get toolCreating(){return this._tool?.creating??!1}get stagedViewshed(){return this._tool?.stagedViewshed}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){const t=null!=e&&this.analysis.viewsheds.includes(e)?e:null;this._unselectOtherViewsheds(t),this._selectedViewshed=t}get selectedViewshedComputedData(){return this._tool?.selectedViewshedComputedData}get updating(){return!!this._tool?.updating}get _isDecoration(){return!this.parent}initialize(){const e=this.view;this.addHandles(y(e,this)),this._viewshedRenderNode=new O({view:e,selectedViewshed:()=>this.selectedViewshed??this.stagedViewshed,isDecoration:this._isDecoration}),this._intersector=new C(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=0,this.viewshedComputedDataHandles=r(()=>this.analysis.viewsheds,t=>{const s=new b({view:e,viewshed:t}),r=Symbol();return this.addHandles([d(()=>({valid:s.valid,canProject:m(s.observer?.spatialReference,this.view.spatialReference)||V()}),({valid:e,canProject:t},r)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):r?.valid&&r?.canProject&&this._removeViewshedsFromRenderer(s),t||_(this.analysis,s.observer.spatialReference,i.getLogger(this)))},l),D({view:e,geometry:s.observer,onElevationChanges:()=>s.onElevationChange()}),d(()=>[e.state.camera,e.slice.plane,s.elevationAlignedObserverRenderSpace,s.elevationAlignedTargetRenderSpace,s.verticalFieldOfView,s.horizontalFieldOfView,s.feature],()=>{this._updateObserverFromFeature(e,s)},l)],r),{viewshedComputedData:s,remove:()=>{this.selectedViewshed===s.viewshed&&(this.selectedViewshed=null),this.removeHandles(r),this._removeViewshedsFromRenderer(s),s.destroy()}}}),this._visualization=new R({view:e,analysisViewData:this,isDecoration:this._isDecoration}),this._tool=new j({analysis:this.analysis,analysisViewData:this,view:e}),this.addHandles([d(()=>this.visible,e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.items.values().map(e=>e.viewshedComputedData).filter(e=>e.valid).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)}),n(()=>this.interactive,()=>this._unselectOtherViewsheds(this.selectedViewshed),h)])}destroy(){this.userOperation=o(this.userOperation),this._tool=a(this._tool),this._visualization=a(this._visualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.items.map(e=>e.viewshedComputedData))}async createViewsheds(e){return this._tool.place("multiple",e)}place(e){return this._tool.place("single",e)}_addViewshedsToRenderer(e){this._viewshedRenderNode.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderNode.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.elevationAlignedObserverRenderSpace,o=i.elevationAlignedTargetRenderSpace,a=u(w(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:u(w(),o),targetFeatureId:null};s(e,this._intersector,d,e=>Math.min(e,.05*i.farDistanceRenderSpace)),i.observerRenderSpaceOverride=v(a,r)?null:a}_unselectOtherViewsheds(e){null!=e&&f(this.view,this)}get test(){}};e([p({readOnly:!0})],F.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],F.prototype,"analysis",void 0),e([p()],F.prototype,"_tool",void 0),e([p()],F.prototype,"toolActive",null),e([p()],F.prototype,"toolCreating",null),e([p()],F.prototype,"stagedViewshed",null),e([p()],F.prototype,"_selectedViewshed",void 0),e([p()],F.prototype,"selectedViewshed",null),e([p()],F.prototype,"selectedViewshedComputedData",null),e([p()],F.prototype,"viewshedComputedDataHandles",void 0),e([p()],F.prototype,"userOperation",void 0),e([p()],F.prototype,"updating",null),e([p()],F.prototype,"_visualization",void 0),e([p()],F.prototype,"_viewshedRenderNode",void 0),F=e([c("esri.views.3d.analysis.ViewshedAnalysisView3D")],F);const A=F;export{A as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i,isPromiseLike as n}from"../../../../core/promiseUtils.js";import{createVolume as s}from"../../../../core/quantity.js";import a from"../../../../core/ReactiveMap.js";import{whenOnce as l,watch as u}from"../../../../core/reactiveUtils.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{runUntracked as c}from"../../../../core/accessorSupport/tracking.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxes as f}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{sqrDist as g}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as _,scale as v,set as w,negate as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as j,fromValues as E,clone as x}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as R}from"../../../../core/support/UpdatingHandles.js";import C from"../../../../geometry/Multipoint.js";import{projectOrLoad as L}from"../../../../geometry/projectionUtils.js";import{e as O}from"../../../../chunks/containsOperator.js";import{e as T}from"../../../../chunks/convexHullOperator.js";import{e as V}from"../../../../chunks/simplifyOperator.js";import{e as G}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as M}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as D}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as H,create as I,fromExtent as P,intersects as U}from"../../../../geometry/support/aaBoundingRect.js";import{vectorCoordinates as k}from"../../../../geometry/support/coordinateSystem.js";import{isClockwise as S}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as A}from"../../../../geometry/support/DoubleArray.js";import{t as B}from"../../../../chunks/vec3.js";import F from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as W}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as z}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as q,VolumeMeasurementPerimeterTooLargeError as N,VolumeMeasurementUnsupportedCoordinateSystemError as Z,VolumeMeasurementUnsupportedLayerTransparencyError as J}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as K}from"./VolumeMeasurementRawResult.js";import Q from"./VolumeMeasurementResult.js";import{ElevationContext as X}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as Y}from"../../support/ElevationProvider.js";import{Obb as $}from"../../support/orientedBoundingBox.js";import{polygonToRenderInfoElevationAligned as ee}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as te}from"../../terrain/tileUtils.js";import{CutFillComputation as re,TargetGeometryRenderInfo as oe}from"../../webgl-engine/lib/CutFillComputation.js";import{GeometryWorkerHandle as ie}from"../../../support/GeometryWorkerHandle.js";import{isIntegratedMeshLayerView as ne}from"../../../support/layerViewUtils.js";let se=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new ie,this.depthExtremaPositions=null,this.analysisObb=null,this._updatingHandles=new R,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new te,this._intersectingObbsByLayerView=new a,this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computation.done)return;const{renderCoordsHelper:i}=this.view,n=new z({extent:t,localOrigin:r,renderCoordsHelper:i});this._computation.update(n,o),this._determineDataCoverage(n,e);const[s]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),l(()=>this._computation.done).then(()=>{this._updateDepthExtremaPositions(n,this._computation.result)})]);if(this.error)return void(this._rawResult=null);const a=this._computation.result;this._updateResult(n,a,"fulfilled"===s.status?s.value:null)}),this._determineDataCoverage=(e,t)=>{const{frustum:r}=this._computation,{cameraDimensions:o}=e;t.extent&&r&&(this._intersectingObbsByLayerView.clear(),this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbsByLayerView.size>0?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t.extent),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computation=new re({view:e}),this.addHandles([this._createElevationUpdateHandle(),u(()=>({localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({localOrigin:e,targetGeometryRenderInfo:t})=>{const r=this._projectedGeometry,o=r?.extent;if(!(r&&o&&e&&t))return this._rawResult=null,this.depthExtremaPositions=null,this.analysisObb=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(r,o,e,t))})])}destroy(){this._updatingHandles.destroy(),this._computation.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=V(e),r=L(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&W(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?E(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;return e?c(()=>{const t=e.clone();return ae(this.view.elevationProvider,t),t}):null}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._localOrigin;if(!e||!t)return null;const{elevationProvider:r,renderCoordsHelper:o}=this.view,i=ee(e,r,o,X.fromElevationInfo(new F({mode:"absolute-height"})));if(n(i))return this._updatingHandles.consumePromise(i),null;if(null==i)return null;const{positions:s,polygonIndices:a,vertexCount:l}=i,u=A(3*l),p=h(),m=h();return M(e.spatialReference,t,p,o.spatialReference),m[12]=-p[12],m[13]=-p[13],m[14]=-p[14],B(u,s,m),new oe(u,a)}get updating(){return this._computation.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e&&!this.error?new Q({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>ne(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new q}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new N:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new N:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new Z:null}get _unsupportedLayerTransparencyError(){const e=this.view.map.ground&&this.view.map.ground.opacity<1,t=this._intersectingObbsByLayerView.size>0;return this._intersectingObbsByLayerView.keys().some(e=>e.fullOpacity<1)||e&&!t?new J:null}get _perimeterForError(){const e=this._projectedGeometry;if(null==e)return null;let t=null;for(const r of e.rings){if(!S(r))continue;const e=pe(me(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(D(e.extent,e.spatialReference,he,this.view.spatialReference),P(t,fe),U(he,fe)&&this.notifyChange("elevationAlignedGeometry"))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){if(!t)return;const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:n},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(n/t.height),p=le(t.cut.totalDepth,a,l)*u,m=le(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new K({cutVolume:s(Math.abs(p*c),"cubic-meters"),fillVolume:s(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){if(!t)return;const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:h}=e,f=x(s);return 0!==h&&(_(f,f,l,r*(m/t.width-.5)),_(f,f,a,o*(c/t.height-.5))),_(f,f,u,-le(p,i,n)),f},m={cut:p(t.cut),fill:p(t.fill)};this.depthExtremaPositions=m,this.analysisObb=ue(e,m)}_findIntersectingObbs(e,t){const r=[];"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)}),r.length>0&&this._intersectingObbsByLayerView.set(e,r)}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new C({spatialReference:o});if(this._intersectingObbsByLayerView.forEach(e=>{e.forEach(e=>{if(ce(e.radius,t)&&(e.getCorners(je),n.points.length=0,je.forEach(e=>{const t=r.fromRenderCoords(e,Ee,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=T(n);"polygon"===e?.type&&i.push(e)}})}),!i.length)return!1;const s=G(i);return!!s&&O(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;this._intersectingTiles.length=0,P(e,de);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(de)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>ce(t.radius*r,e))}};function ae(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=Y(e,t,"ground")??0))}function le(e,t,r){return e*(r-t)+t}function ue(e,t){const{boundingRect:r,eastVector:o,northVector:i,upVector:n}=e;k(t.cut,o,i,n,ge),k(t.fill,o,i,n,ye);const s=.5*(r[0]+r[2]),a=.5*(r[1]+r[3]),l=Math.min(ge[2],ye[2]),u=Math.max(ge[2],ye[2]),p=.5*(l+u);return v(_e,o,s),_(_e,_e,i,a),_(_e,_e,n,p),w(ve,.5*(r[2]-r[0]),.5*(r[3]-r[1]),.5*(u-l)),b(we,n),new $(_e,ve,f(be,we,o,i))}function pe(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=g(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=g(r,t)),Math.sqrt(o)}function*me(e){const t=y();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([p()],se.prototype,"_projectedGeometry",null),e([p()],se.prototype,"_localOrigin",null),e([p()],se.prototype,"elevationAlignedGeometry",null),e([p()],se.prototype,"targetGeometry",null),e([p()],se.prototype,"_targetGeometryRenderInfo",null),e([p({constructOnly:!0})],se.prototype,"analysis",void 0),e([p({constructOnly:!0})],se.prototype,"analysisViewData",void 0),e([p({constructOnly:!0})],se.prototype,"view",void 0),e([p()],se.prototype,"updating",null),e([p()],se.prototype,"result",null),e([p()],se.prototype,"depthExtremaPositions",void 0),e([p()],se.prototype,"analysisObb",void 0),e([p()],se.prototype,"error",null),e([p()],se.prototype,"_imLayerViewsAffectingMeasurement",null),e([p()],se.prototype,"_insufficientDataError",null),e([p()],se.prototype,"_perimeterTooLargeError",null),e([p()],se.prototype,"_perimeterTooLargeLocalError",null),e([p()],se.prototype,"_perimeterTooLargeGlobalError",null),e([p()],se.prototype,"_unsupportedCoordinateSystemError",null),e([p()],se.prototype,"_unsupportedLayerTransparencyError",null),e([p()],se.prototype,"_perimeterForError",null),e([p()],se.prototype,"_computation",void 0),e([p({readOnly:!0})],se.prototype,"_updatingHandles",void 0),e([p()],se.prototype,"_rawResult",void 0),e([p()],se.prototype,"_sufficientDataCoverage",void 0),se=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],se);const ce=(e,t)=>e<(t.width+t.height)/2,he=H(),fe=H(),de=I(),ge=j(),ye=j(),_e=j(),ve=j(),we=j(),be=d(),je=new Array(8).fill(0).map(()=>j()),Ee=j();export{se as VolumeMeasurementCutFillController};
2
+ import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i,isPromiseLike as n}from"../../../../core/promiseUtils.js";import{createVolume as s}from"../../../../core/quantity.js";import a from"../../../../core/ReactiveMap.js";import{whenOnce as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{runUntracked as m}from"../../../../core/accessorSupport/tracking.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxes as h}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{sqrDist as f}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as y,scale as _,set as v,negate as w}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,fromValues as j,clone as E}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as x}from"../../../../core/support/UpdatingHandles.js";import R from"../../../../geometry/Multipoint.js";import{projectOrLoad as C}from"../../../../geometry/projectionUtils.js";import{e as L}from"../../../../chunks/containsOperator.js";import{e as O}from"../../../../chunks/convexHullOperator.js";import{e as T}from"../../../../chunks/simplifyOperator.js";import{e as V}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as G}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as H}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as M,create as D,fromExtent as I,intersects as P}from"../../../../geometry/support/aaBoundingRect.js";import{vectorCoordinates as U}from"../../../../geometry/support/coordinateSystem.js";import{isClockwise as k}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as S}from"../../../../geometry/support/DoubleArray.js";import{t as A}from"../../../../chunks/vec3.js";import B from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as F}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as W}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as z,VolumeMeasurementPerimeterTooLargeError as q,VolumeMeasurementUnsupportedCoordinateSystemError as N,VolumeMeasurementUnsupportedLayerTransparencyError as Z}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as J}from"./VolumeMeasurementRawResult.js";import K from"./VolumeMeasurementResult.js";import{ElevationContext as Q}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as X}from"../../support/ElevationProvider.js";import{Obb as Y}from"../../support/orientedBoundingBox.js";import{polygonToRenderInfoElevationAligned as $}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as ee}from"../../terrain/tileUtils.js";import{CutFillComputation as te,TargetGeometryRenderInfo as re}from"../../webgl-engine/lib/CutFillComputation.js";import{GeometryWorkerHandle as oe}from"../../../support/GeometryWorkerHandle.js";import{isIntegratedMeshLayerView as ie}from"../../../support/layerViewUtils.js";let ne=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new oe,this.depthExtremaPositions=null,this.analysisObb=null,this._updatingHandles=new x,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new ee,this._intersectingObbsByLayerView=new a,this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computation.done)return;const{renderCoordsHelper:i}=this.view,n=new W({extent:t,localOrigin:r,renderCoordsHelper:i});this._computation.update(n,o),this._determineDataCoverage(n,e);const[s]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),l(()=>this._computation.done).then(()=>{this._updateDepthExtremaPositions(n,this._computation.result)})]);if(this.error)return void(this._rawResult=null);const a=this._computation.result;this._updateResult(n,a,"fulfilled"===s.status?s.value:null)}),this._determineDataCoverage=(e,t)=>{const{frustum:r}=this._computation,{cameraDimensions:o}=e;t.extent&&r&&(this._intersectingObbsByLayerView.clear(),this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbsByLayerView.size>0?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t.extent),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computation=new te({view:e}),this.addHandles([this._createElevationUpdateHandle(),this._updatingHandles.add(()=>({localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({localOrigin:e,targetGeometryRenderInfo:t})=>{const r=this._projectedGeometry,o=r?.extent;if(!(r&&o&&e&&t))return this._rawResult=null,this.depthExtremaPositions=null,this.analysisObb=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(r,o,e,t))})])}destroy(){this._updatingHandles.destroy(),this._computation.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=T(e),r=C(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&F(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?j(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;return e?m(()=>{const t=e.clone();return se(this.view.elevationProvider,t),t}):null}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._localOrigin;if(!e||!t)return null;const{elevationProvider:r,renderCoordsHelper:o}=this.view,i=$(e,r,o,Q.fromElevationInfo(new B({mode:"absolute-height"})));if(n(i))return this._updatingHandles.consumePromise(i),null;if(null==i)return null;const{positions:s,polygonIndices:a,vertexCount:l}=i,u=S(3*l),p=c(),m=c();return G(e.spatialReference,t,p,o.spatialReference),m[12]=-p[12],m[13]=-p[13],m[14]=-p[14],A(u,s,m),new re(u,a)}get updating(){return this._computation.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e&&!this.error?new K({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>ie(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new z}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new q:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new q:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new N:null}get _unsupportedLayerTransparencyError(){const e=this.view.map.ground&&this.view.map.ground.opacity<1,t=this._intersectingObbsByLayerView.size>0;return this._intersectingObbsByLayerView.keys().some(e=>e.fullOpacity<1)||e&&!t?new Z:null}get _perimeterForError(){const e=this._projectedGeometry;if(null==e)return null;let t=null;for(const r of e.rings){if(!k(r))continue;const e=ue(pe(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(H(e.extent,e.spatialReference,ce,this.view.spatialReference),I(t,he),P(ce,he)&&this.notifyChange("elevationAlignedGeometry"))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){if(!t)return;const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:n},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(n/t.height),p=ae(t.cut.totalDepth,a,l)*u,m=ae(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new J({cutVolume:s(Math.abs(p*c),"cubic-meters"),fillVolume:s(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){if(!t)return;const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:h}=e,d=E(s);return 0!==h&&(y(d,d,l,r*(m/t.width-.5)),y(d,d,a,o*(c/t.height-.5))),y(d,d,u,-ae(p,i,n)),d},m={cut:p(t.cut),fill:p(t.fill)};this.depthExtremaPositions=m,this.analysisObb=le(e,m)}_findIntersectingObbs(e,t){const r=[];"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)}),r.length>0&&this._intersectingObbsByLayerView.set(e,r)}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new R({spatialReference:o});if(this._intersectingObbsByLayerView.forEach(e=>{e.forEach(e=>{if(me(e.radius,t)&&(e.getCorners(be),n.points.length=0,be.forEach(e=>{const t=r.fromRenderCoords(e,je,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=O(n);"polygon"===e?.type&&i.push(e)}})}),!i.length)return!1;const s=V(i);return!!s&&L(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;this._intersectingTiles.length=0,I(e,de);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(de)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>me(t.radius*r,e))}};function se(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=X(e,t,"ground")??0))}function ae(e,t,r){return e*(r-t)+t}function le(e,t){const{boundingRect:r,eastVector:o,northVector:i,upVector:n}=e;U(t.cut,o,i,n,fe),U(t.fill,o,i,n,ge);const s=.5*(r[0]+r[2]),a=.5*(r[1]+r[3]),l=Math.min(fe[2],ge[2]),u=Math.max(fe[2],ge[2]),p=.5*(l+u);return _(ye,o,s),y(ye,ye,i,a),y(ye,ye,n,p),v(_e,.5*(r[2]-r[0]),.5*(r[3]-r[1]),.5*(u-l)),w(ve,n),new Y(ye,_e,h(we,ve,o,i))}function ue(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=f(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=f(r,t)),Math.sqrt(o)}function*pe(e){const t=g();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([u()],ne.prototype,"_projectedGeometry",null),e([u()],ne.prototype,"_localOrigin",null),e([u()],ne.prototype,"elevationAlignedGeometry",null),e([u()],ne.prototype,"targetGeometry",null),e([u()],ne.prototype,"_targetGeometryRenderInfo",null),e([u({constructOnly:!0})],ne.prototype,"analysis",void 0),e([u({constructOnly:!0})],ne.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],ne.prototype,"view",void 0),e([u()],ne.prototype,"updating",null),e([u()],ne.prototype,"result",null),e([u()],ne.prototype,"depthExtremaPositions",void 0),e([u()],ne.prototype,"analysisObb",void 0),e([u()],ne.prototype,"error",null),e([u()],ne.prototype,"_imLayerViewsAffectingMeasurement",null),e([u()],ne.prototype,"_insufficientDataError",null),e([u()],ne.prototype,"_perimeterTooLargeError",null),e([u()],ne.prototype,"_perimeterTooLargeLocalError",null),e([u()],ne.prototype,"_perimeterTooLargeGlobalError",null),e([u()],ne.prototype,"_unsupportedCoordinateSystemError",null),e([u()],ne.prototype,"_unsupportedLayerTransparencyError",null),e([u()],ne.prototype,"_perimeterForError",null),e([u()],ne.prototype,"_computation",void 0),e([u({readOnly:!0})],ne.prototype,"_updatingHandles",void 0),e([u()],ne.prototype,"_rawResult",void 0),e([u()],ne.prototype,"_sufficientDataCoverage",void 0),ne=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],ne);const me=(e,t)=>e<(t.width+t.height)/2,ce=M(),he=M(),de=D(),fe=b(),ge=b(),ye=b(),_e=b(),ve=b(),we=d(),be=new Array(8).fill(0).map(()=>b()),je=b();export{ne as VolumeMeasurementCutFillController};