@arcgis/core 4.34.0-next.92 → 4.34.0-next.94

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 (348) hide show
  1. package/Color.js +1 -1
  2. package/Ground.js +1 -1
  3. package/WebScene.js +1 -1
  4. package/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +4 -0
  5. package/analysis/ElevationProfile/{ElevationProfileUnits.js → ElevationProfileDisplayUnits.js} +1 -1
  6. package/analysis/ElevationProfile/ElevationProfileUnits.d.ts +1 -1
  7. package/analysis/ElevationProfile/ElevationProfileViewOptions.js +1 -1
  8. package/analysis/ElevationProfileAnalysis.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/004b13c1db79c9e668b1.js +1 -0
  11. package/assets/esri/core/workers/chunks/{700b5a536f97233bc4af.js → 03b455e9405a8b6fec68.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{a244afea77127e54dd3a.js → 08b0fc6bfe9640ee2525.js} +1 -1
  13. package/assets/esri/core/workers/chunks/0a981061df08da19372c.js +1 -0
  14. package/assets/esri/core/workers/chunks/{db5a985ccc6b7d0ad855.js → 176f56de787bf486be9f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1fc7df018c8f802565a6.js +1 -0
  16. package/assets/esri/core/workers/chunks/20003728a679479b14dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/20f4c6d8b310ecab97be.js +1 -0
  18. package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +1 -0
  19. package/assets/esri/core/workers/chunks/26081b6486c623735657.js +1 -0
  20. package/assets/esri/core/workers/chunks/2698f656405876f4bd20.js +1 -0
  21. package/assets/esri/core/workers/chunks/{4660798b3b45dcb5cecb.js → 2b9c9a35a6e1f56920b5.js} +2 -2
  22. package/assets/esri/core/workers/chunks/352511dbc67166face40.js +1 -0
  23. package/assets/esri/core/workers/chunks/3acd79a6a0572926a799.js +1 -0
  24. package/assets/esri/core/workers/chunks/3d7923d25734d03a4d27.js +1 -0
  25. package/assets/esri/core/workers/chunks/48133effac2eacc2196e.js +1 -0
  26. package/assets/esri/core/workers/chunks/4dfcd03082be83600f3a.js +1 -0
  27. package/assets/esri/core/workers/chunks/503c81dda242e6077317.js +1 -0
  28. package/assets/esri/core/workers/chunks/{06aed0a5464965be8d52.js → 56b3bb68b61b77138186.js} +1 -1
  29. package/assets/esri/core/workers/chunks/5746c4861af83c1d57a8.js +1 -0
  30. package/assets/esri/core/workers/chunks/5aacd1c6b171c99b41f5.js +1 -0
  31. package/assets/esri/core/workers/chunks/6810ecdeccf4b7eae5e2.js +1 -0
  32. package/assets/esri/core/workers/chunks/6b208f5d423da64c8559.js +1 -0
  33. package/assets/esri/core/workers/chunks/{7a240ab31d9ff2d2c5af.js → 73db6c070b049fe05147.js} +1 -1
  34. package/assets/esri/core/workers/chunks/801451fb572bc5f1f270.js +1 -0
  35. package/assets/esri/core/workers/chunks/82e0d22619dc26920ca9.js +1 -0
  36. package/assets/esri/core/workers/chunks/8f426cb210a4250517d5.js +1 -0
  37. package/assets/esri/core/workers/chunks/94ddf029698991d853b9.js +1 -0
  38. package/assets/esri/core/workers/chunks/97eb2cfc1f036feea9a9.js +1 -0
  39. package/assets/esri/core/workers/chunks/98381404f2d99a1f9341.js +1 -0
  40. package/assets/esri/core/workers/chunks/9adecee0ed2f1df3b0d2.js +1 -0
  41. package/assets/esri/core/workers/chunks/a0fab8cd791c33d3895d.js +1 -0
  42. package/assets/esri/core/workers/chunks/{a85acb948cc7d22be592.js → a410dcf80d17a2383337.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{d9d86cf0500fa29d1d43.js → a98b284b147258629947.js} +1 -1
  44. package/assets/esri/core/workers/chunks/b1ccbc2fef7f7e5e04f7.js +1 -0
  45. package/assets/esri/core/workers/chunks/b5c829e904bc9cb5347d.js +1 -0
  46. package/assets/esri/core/workers/chunks/bec9ddd38c9ab9f2561b.js +1 -0
  47. package/assets/esri/core/workers/chunks/bf9031749d10e7d457b6.js +1 -0
  48. package/assets/esri/core/workers/chunks/bf9d09493fd849ea69fd.js +1 -0
  49. package/assets/esri/core/workers/chunks/c4641c2c130c7b8bcdee.js +1 -0
  50. package/assets/esri/core/workers/chunks/{58e2652810143f509fe1.js → c473b15d4d52f0a63d20.js} +1 -1
  51. package/assets/esri/core/workers/chunks/c8e4fe0e3b109eb80e8e.js +1 -0
  52. package/assets/esri/core/workers/chunks/c9159ebf930af3f336f3.js +1 -0
  53. package/assets/esri/core/workers/chunks/cd0c222a36caa7f80860.js +1 -0
  54. package/assets/esri/core/workers/chunks/ce2fcaa21d6efcdf4da5.js +1 -0
  55. package/assets/esri/core/workers/chunks/d2df6e685d6cffc5f486.js +1 -0
  56. package/assets/esri/core/workers/chunks/{c27783ce7ea51a5e49c5.js → e153b61560a7a869db63.js} +1 -1
  57. package/assets/esri/core/workers/chunks/e2c293331515f3bd0355.js +1 -0
  58. package/assets/esri/core/workers/chunks/{100a0041ee42b0b2fa32.js → e5d974593043d5e2b502.js} +1 -1
  59. package/assets/esri/core/workers/chunks/ec7b156425f25d231078.js +1 -0
  60. package/assets/esri/core/workers/chunks/{1194c2432c31def87db1.js → f71b76c9506178124fa3.js} +1 -1
  61. package/assets/esri/core/workers/chunks/fb456e7425e09df17d8c.js +1 -0
  62. package/assets/esri/core/workers/chunks/{f6806780ca2aa591475a.js → fe1dcf9f81da4adbb1fe.js} +1 -1
  63. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  64. package/assets/esri/themes/base/_core.scss +0 -2
  65. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationUI.scss +10 -7
  66. package/assets/esri/themes/dark/main.css +1 -1
  67. package/assets/esri/themes/light/main.css +1 -1
  68. package/assets/esri/themes/light/view.css +1 -1
  69. package/chunks/CutFillComposition.glsl.js +15 -3
  70. package/chunks/CutFillMask.glsl.js +1 -1
  71. package/chunks/WaterSurface.glsl.js +0 -1
  72. package/chunks/bundle.js +1 -1
  73. package/chunks/languageUtils.js +1 -1
  74. package/colorUtils.js +1 -1
  75. package/config.js +1 -1
  76. package/core/CollectionFlattener.js +1 -1
  77. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
  78. package/geometry/operators/json/graphicBufferOperator.js +1 -1
  79. package/geometry/support/aaBoundingRect.js +1 -1
  80. package/geometry/support/geometryUtils.js +1 -1
  81. package/geometry/support/meshUtils/elevationSampler.js +1 -1
  82. package/geometry/support/meshUtils.js +1 -1
  83. package/geometry/support/triangle.js +1 -1
  84. package/interfaces.d.ts +262 -339
  85. package/kernel.js +1 -1
  86. package/layers/BaseElevationLayer.js +1 -1
  87. package/layers/BaseTileLayer.js +1 -1
  88. package/layers/ElevationLayer.js +1 -1
  89. package/layers/FeatureLayer.js +1 -1
  90. package/layers/GaussianSplatLayer.js +1 -1
  91. package/layers/ImageryTileLayer.js +1 -1
  92. package/layers/ParquetLayer.js +1 -1
  93. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  94. package/layers/graphics/dehydratedFeatureComparison.js +1 -1
  95. package/layers/graphics/sources/ParquetSource.js +1 -1
  96. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  97. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  98. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  99. package/layers/support/ElevationQuery.js +1 -1
  100. package/layers/support/ElevationQueryContext.js +5 -0
  101. package/layers/support/ElevationSampler.js +1 -1
  102. package/layers/support/ElevationTile.js +1 -1
  103. package/layers/support/GeometryDescriptor.js +1 -1
  104. package/layers/support/ParquetEncodingLocation.js +1 -1
  105. package/layers/support/ParquetEncodingWkb.js +1 -1
  106. package/layers/support/RasterBandInfo.js +1 -1
  107. package/layers/support/TileElevationSampler.js +5 -0
  108. package/layers/support/TileInfo.js +1 -1
  109. package/layers/support/TileKey.js +1 -1
  110. package/layers/support/TilemapCache.js +1 -1
  111. package/layers/support/layerUtils.js +1 -1
  112. package/layers/support/parquetEncodingUtils.js +5 -0
  113. package/layers/support/parquetUtils.js +1 -1
  114. package/layers/support/rasterDatasets/InMemoryRaster.js +1 -1
  115. package/networks/UtilityNetwork.js +1 -1
  116. package/networks/support/NetworkSystemLayers.js +1 -1
  117. package/networks/support/typeUtils.js +1 -1
  118. package/package.json +3 -2
  119. package/popup/FieldInfo.js +1 -1
  120. package/popup/content/AttachmentsContent.js +1 -1
  121. package/portal/schemas/definitions.js +1 -1
  122. package/rest/knowledgeGraphService.js +1 -1
  123. package/rest/networks/support/Association.js +1 -1
  124. package/rest/print.js +1 -1
  125. package/support/revision.js +1 -1
  126. package/symbols/cim/CIMSymbolHelper.js +1 -1
  127. package/symbols/cim/cimAnalyzer.js +1 -1
  128. package/symbols/cim/effects/EffectOffset.js +1 -1
  129. package/views/2d/analysis/ElevationProfile/ElevationProfileInputVisualization2D.js +1 -1
  130. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  131. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  132. package/views/2d/engine/Stage.js +1 -1
  133. package/views/2d/engine/flow/BrushFlow.js +1 -1
  134. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  135. package/views/2d/engine/webgl/Overlay.js +1 -1
  136. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  137. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  138. package/views/2d/engine/webgl/TextureManager.js +1 -1
  139. package/views/2d/engine/webgl/animatedFormats/AnimatableTextureResource.js +1 -1
  140. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  147. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  148. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  149. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  150. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  151. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  152. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  153. package/views/2d/engine/webgl/shaderGraph/utils.js +1 -1
  154. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  155. package/views/2d/layers/VideoLayerView2D.js +1 -1
  156. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  157. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  158. package/views/2d/navigation/actions/Pan.js +1 -1
  159. package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization3D.js +1 -1
  160. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  161. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  162. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  163. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  164. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  165. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  166. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  167. package/views/3d/layers/FlowSubView3D.js +1 -1
  168. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  169. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  170. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  171. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  172. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  173. package/views/3d/support/hitTest.js +1 -1
  174. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  175. package/views/3d/support/popupHitTest.js +1 -1
  176. package/views/3d/terrain/ExtentHelper.js +1 -1
  177. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  178. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  179. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  180. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  181. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  182. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
  183. package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
  184. package/views/PopupView.js +1 -1
  185. package/views/SceneView.js +1 -1
  186. package/views/View.js +1 -1
  187. package/views/View2D.js +1 -1
  188. package/views/Viewport2DMixin.js +1 -1
  189. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  190. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  191. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
  192. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
  193. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
  194. package/views/analysis/ElevationProfile/ElevationProfileLineQueryComputation.js +1 -1
  195. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  196. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  197. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  198. package/views/analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js +1 -1
  199. package/views/analysis/ExclusiveOperationManager.js +5 -0
  200. package/views/interactive/snapping/LineSnapper.js +1 -1
  201. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  202. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  203. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  204. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  205. package/views/interactive/snapping/featureSources/WorkerTileTreeDebugger.js +1 -1
  206. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  207. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  208. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  209. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  210. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
  211. package/views/interactive/snapping/featureSources/featureServiceSource/PendingFeatureTile.js +1 -1
  212. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  213. package/views/interactive/snapping/snappingUtils.js +1 -1
  214. package/views/navigation/Navigation.js +1 -1
  215. package/views/popupAdapter.js +5 -0
  216. package/views/support/GroundViewElevationSampler.js +1 -1
  217. package/views/video/VideoOperationalDataView.js +1 -1
  218. package/views/webgl/ContextState.js +1 -1
  219. package/views/webgl/RenderingContext.js +1 -1
  220. package/views/webgl/enums.js +1 -1
  221. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  222. package/widgets/Attachments.js +1 -1
  223. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  224. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  225. package/widgets/Feature/FeatureExpression.js +1 -1
  226. package/widgets/Feature/FeatureMedia/chartCommon.js +1 -1
  227. package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
  228. package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
  229. package/widgets/Feature/FeatureMedia.js +1 -1
  230. package/widgets/Feature/FeatureViewModel.js +1 -1
  231. package/widgets/Feature.js +1 -1
  232. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  233. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  234. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  235. package/widgets/FeatureTable.js +1 -1
  236. package/widgets/Features/FeaturesViewModel.js +1 -1
  237. package/widgets/Legend/LegendViewModel.js +1 -1
  238. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  239. package/widgets/Legend.js +1 -1
  240. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  241. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  242. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  243. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  244. package/widgets/OrientedImageryViewer/services/DepthImageService.js +5 -0
  245. package/widgets/PanoramicViewer.js +1 -1
  246. package/widgets/Search/SearchResultRenderer.js +1 -1
  247. package/widgets/Search/SearchViewModel.js +1 -1
  248. package/widgets/Search.js +1 -1
  249. package/widgets/Sketch/SketchViewModel.js +1 -1
  250. package/widgets/support/chartUtilsAm5.js +1 -1
  251. package/assets/esri/core/workers/chunks/08374e5805fcedc1cb57.js +0 -1
  252. package/assets/esri/core/workers/chunks/0b24a6c06d1becbb6815.js +0 -1
  253. package/assets/esri/core/workers/chunks/14114be3afd6d292f89c.js +0 -1
  254. package/assets/esri/core/workers/chunks/19f1bfe815896d4983af.js +0 -1
  255. package/assets/esri/core/workers/chunks/22c3a21bc9f32c429c48.js +0 -1
  256. package/assets/esri/core/workers/chunks/2605062e44f2d4e73f14.js +0 -1
  257. package/assets/esri/core/workers/chunks/282c4f3484c605ce7d5e.js +0 -1
  258. package/assets/esri/core/workers/chunks/2e1cc11462846febb3b2.js +0 -1
  259. package/assets/esri/core/workers/chunks/37b5007660535f1c91c6.js +0 -1
  260. package/assets/esri/core/workers/chunks/393274af1804e5b6046a.js +0 -1
  261. package/assets/esri/core/workers/chunks/3b2ef975831eb75b40fb.js +0 -1
  262. package/assets/esri/core/workers/chunks/3ff3e1507220d3869c76.js +0 -1
  263. package/assets/esri/core/workers/chunks/4133ab8720e7e4afa9a6.js +0 -1
  264. package/assets/esri/core/workers/chunks/4d807bfe75108438db83.js +0 -1
  265. package/assets/esri/core/workers/chunks/5ad1985a9e66fb2232ae.js +0 -1
  266. package/assets/esri/core/workers/chunks/5b7a2ee44883b1fb2a5f.js +0 -1
  267. package/assets/esri/core/workers/chunks/614a00a3179f8fe23f45.js +0 -1
  268. package/assets/esri/core/workers/chunks/6aa349e1adf844df4b5b.js +0 -1
  269. package/assets/esri/core/workers/chunks/83065bef261314f9b2c5.js +0 -1
  270. package/assets/esri/core/workers/chunks/8bdbd94a59269e216fba.js +0 -1
  271. package/assets/esri/core/workers/chunks/8cae725e631d922853c8.js +0 -1
  272. package/assets/esri/core/workers/chunks/8f4cfef97716c3502b0f.js +0 -1
  273. package/assets/esri/core/workers/chunks/8ff2daef892881ff2019.js +0 -1
  274. package/assets/esri/core/workers/chunks/9bb6984f24cd5461a754.js +0 -1
  275. package/assets/esri/core/workers/chunks/9f2a3f37fe9b19ef1209.js +0 -1
  276. package/assets/esri/core/workers/chunks/a1196637268b89281780.js +0 -1
  277. package/assets/esri/core/workers/chunks/a6a2d4602dfeb62e0ecc.js +0 -1
  278. package/assets/esri/core/workers/chunks/b240298b8b643a323d34.js +0 -1
  279. package/assets/esri/core/workers/chunks/b47f26d6aa9a2848a677.js +0 -1
  280. package/assets/esri/core/workers/chunks/b661ea374fe38c8e29ca.js +0 -1
  281. package/assets/esri/core/workers/chunks/b8997ae5893afa0298d1.js +0 -1
  282. package/assets/esri/core/workers/chunks/baa48614d9567d5f240d.js +0 -1
  283. package/assets/esri/core/workers/chunks/c20862fe15295a294bbd.js +0 -1
  284. package/assets/esri/core/workers/chunks/c3020747f9001ca6a6e7.js +0 -1
  285. package/assets/esri/core/workers/chunks/c7c76a8a1c47eb62bef1.js +0 -1
  286. package/assets/esri/core/workers/chunks/c95e6bef8c97cf647869.js +0 -1
  287. package/assets/esri/core/workers/chunks/d71836cf70b9604832f1.js +0 -1
  288. package/assets/esri/core/workers/chunks/e99fc64b67bb0c71dc34.js +0 -1
  289. package/assets/esri/core/workers/chunks/eea9d49d55c2d1355497.js +0 -1
  290. package/assets/esri/core/workers/chunks/fb6ebb780bb59e252887.js +0 -1
  291. package/assets/esri/core/workers/chunks/ff6d189ba78980d40bb5.js +0 -1
  292. package/assets/esri/themes/base/widgets/_ButtonMenu.scss +0 -87
  293. package/chunks/Button.js +0 -5
  294. package/chunks/ColorSet.js +0 -5
  295. package/chunks/DefaultTheme.js +0 -5
  296. package/chunks/LineSeries.js +0 -5
  297. package/chunks/ResponsiveTheme.js +0 -5
  298. package/chunks/Theme.js +0 -5
  299. package/chunks/Tick.js +0 -5
  300. package/chunks/Tooltip.js +0 -5
  301. package/chunks/ar.js +0 -5
  302. package/chunks/bg_BG.js +0 -5
  303. package/chunks/bs_BA.js +0 -5
  304. package/chunks/ca_ES.js +0 -5
  305. package/chunks/chartUtilsAm5.js +0 -5
  306. package/chunks/cs_CZ.js +0 -5
  307. package/chunks/da_DK.js +0 -5
  308. package/chunks/de_CH.js +0 -5
  309. package/chunks/de_DE.js +0 -5
  310. package/chunks/el_GR.js +0 -5
  311. package/chunks/en_CA.js +0 -5
  312. package/chunks/en_US.js +0 -5
  313. package/chunks/es_ES.js +0 -5
  314. package/chunks/et_EE.js +0 -5
  315. package/chunks/fi_FI.js +0 -5
  316. package/chunks/fr_FR.js +0 -5
  317. package/chunks/he_IL.js +0 -5
  318. package/chunks/hr_HR.js +0 -5
  319. package/chunks/hu_HU.js +0 -5
  320. package/chunks/id_ID.js +0 -5
  321. package/chunks/it_IT.js +0 -5
  322. package/chunks/ja_JP.js +0 -5
  323. package/chunks/ko_KR.js +0 -5
  324. package/chunks/lt_LT.js +0 -5
  325. package/chunks/lv_LV.js +0 -5
  326. package/chunks/nb_NO.js +0 -5
  327. package/chunks/nl_NL.js +0 -5
  328. package/chunks/pl_PL.js +0 -5
  329. package/chunks/pt_BR.js +0 -5
  330. package/chunks/pt_PT.js +0 -5
  331. package/chunks/ro_RO.js +0 -5
  332. package/chunks/ru_RU.js +0 -5
  333. package/chunks/sk_SK.js +0 -5
  334. package/chunks/sl_SL.js +0 -5
  335. package/chunks/sr_RS.js +0 -5
  336. package/chunks/sv_SE.js +0 -5
  337. package/chunks/th_TH.js +0 -5
  338. package/chunks/tr_TR.js +0 -5
  339. package/chunks/uk_UA.js +0 -5
  340. package/chunks/vi_VN.js +0 -5
  341. package/chunks/zh_Hans.js +0 -5
  342. package/chunks/zh_Hant.js +0 -5
  343. package/widgets/FeatureTable/Grid/support/ButtonMenu.d.ts +0 -4
  344. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +0 -5
  345. package/widgets/FeatureTable/Grid/support/ButtonMenuItem.d.ts +0 -4
  346. package/widgets/FeatureTable/Grid/support/ButtonMenuItem.js +0 -5
  347. package/widgets/FeatureTable/Grid/support/ButtonMenuViewModel.d.ts +0 -4
  348. package/widgets/FeatureTable/Grid/support/ButtonMenuViewModel.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as o,resolveDynamicUniforms as i,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{ComplexFillShader as n}from"../shaders/ComplexFillShader.js";class u extends e{constructor(){super(...arguments),this.type=9,this.shaders={geometry:new n}}render(e,n){const{context:u,painter:m}=e,f=n.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...i(e,n.target,f.uniforms),...o(e,n.target),mosaicInfo:m.textureManager.getMosaicInfo(u,n.textureKey),localTileOffset:s(n.target)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(a(e)),m.submitDraw(e,n)}}export{u as ComplexFillTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{ComplexFillShader as n}from"../shaders/ComplexFillShader.js";class u extends e{constructor(){super(...arguments),this.type=9,this.shaders={geometry:new n}}render(e,n){const{painter:u}=e,m=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,m.uniforms),...i(e,n.target),mosaicInfo:u.textureManager.getMosaicInfo(e,n.textureKey),localTileOffset:s(n.target)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(a(e)),u.submitDraw(e,n)}}export{u as ComplexFillTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{getAntialiasingControls as n}from"../line/utils.js";import{ComplexOutlineFillShader as u}from"../shaders/ComplexOutlineFillShader.js";class l extends e{constructor(){super(...arguments),this.type=10,this.shaders={geometry:new u}}render(e,u){const{context:l,painter:m,pixelRatio:p}=e,f=u.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...o(e,u.target,f.uniforms),...i(e,u.target),antialiasingControls:n(p),mosaicInfo:m.textureManager.getMosaicInfo(l,u.textureKey),localTileOffset:s(u.target)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(a(e)),m.submitDraw(e,u)}}export{l as ComplexOutlineFillTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{getAntialiasingControls as n}from"../line/utils.js";import{ComplexOutlineFillShader as u}from"../shaders/ComplexOutlineFillShader.js";class l extends e{constructor(){super(...arguments),this.type=10,this.shaders={geometry:new u}}render(e,u){const{painter:l,pixelRatio:m}=e,p=u.instance.getInput();l.setShader({shader:this.shaders.geometry,uniforms:{...o(e,u.target,p.uniforms),...i(e,u.target),antialiasingControls:n(m),mosaicInfo:l.textureManager.getMosaicInfo(e,u.textureKey),localTileOffset:s(u.target)},defines:{...r(e)},optionalAttributes:p.optionalAttributes,useComputeBuffer:t(e)}),l.setPipelineState(a(e)),l.submitDraw(e,u)}}export{l as ComplexOutlineFillTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s,resolveDynamicUniforms as i,getFeaturePipelineState as o}from"../featureTechniqueUtils.js";import{GradientFillShader as a}from"../shaders/GradientFillShader.js";class n extends e{constructor(){super(...arguments),this.type=14,this.shaders={geometry:new a},this.symbologyPlane=0}render(e,a){const{context:n,painter:u}=e,m=a.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...i(e,a.target,m.uniforms),...s(e,a.target),mosaicInfo:u.textureManager.getMosaicInfo(n,a.textureKey)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(o(e)),u.submitDraw(e,a)}}export{n as GradientFillTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s,resolveDynamicUniforms as i,getFeaturePipelineState as o}from"../featureTechniqueUtils.js";import{GradientFillShader as a}from"../shaders/GradientFillShader.js";class n extends e{constructor(){super(...arguments),this.type=14,this.shaders={geometry:new a},this.symbologyPlane=0}render(e,a){const{painter:n}=e,u=a.instance.getInput();n.setShader({shader:this.shaders.geometry,uniforms:{...i(e,a.target,u.uniforms),...s(e,a.target),mosaicInfo:n.textureManager.getMosaicInfo(e,a.textureKey)},defines:{...r(e)},optionalAttributes:u.optionalAttributes,useComputeBuffer:t(e)}),n.setPipelineState(o(e)),n.submitDraw(e,a)}}export{n as GradientFillTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{PatternFillShader as n}from"../shaders/PatternFillShader.js";class u extends e{constructor(){super(...arguments),this.type=26,this.shaders={geometry:new n}}render(e,n){const{context:u,painter:f}=e,m=n.instance.getInput();f.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,m.uniforms),...i(e,n.target),mosaicInfo:f.textureManager.getMosaicInfo(u,n.textureKey),localTileOffset:s(n.target)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),f.setPipelineState(a(e)),f.submitDraw(e,n)}}export{u as PatternFillTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as i,resolveDynamicUniforms as a,getFeaturePipelineState as o}from"../featureTechniqueUtils.js";import{PatternFillShader as n}from"../shaders/PatternFillShader.js";class u extends e{constructor(){super(...arguments),this.type=26,this.shaders={geometry:new n}}render(e,n){const{painter:u}=e,f=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...a(e,n.target,f.uniforms),...i(e,n.target),mosaicInfo:u.textureManager.getMosaicInfo(e,n.textureKey),localTileOffset:s(n.target)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(o(e)),u.submitDraw(e,n)}}export{u as PatternFillTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{getAntialiasingControls as n}from"../line/utils.js";import{PatternOutlineFillShader as u}from"../shaders/PatternOutlineFillShader.js";class l extends e{constructor(){super(...arguments),this.type=27,this.shaders={geometry:new u}}render(e,u){const{context:l,painter:m,pixelRatio:f}=e,p=u.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...o(e,u.target,p.uniforms),...i(e,u.target),antialiasingControls:n(f),mosaicInfo:m.textureManager.getMosaicInfo(l,u.textureKey),localTileOffset:s(u.target)},defines:{...r(e)},optionalAttributes:p.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(a(e)),m.submitDraw(e,u)}}export{l as PatternOutlineFillTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getLocalTileOffset as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{getAntialiasingControls as n}from"../line/utils.js";import{PatternOutlineFillShader as u}from"../shaders/PatternOutlineFillShader.js";class l extends e{constructor(){super(...arguments),this.type=27,this.shaders={geometry:new u}}render(e,u){const{painter:l,pixelRatio:m}=e,f=u.instance.getInput();l.setShader({shader:this.shaders.geometry,uniforms:{...o(e,u.target,f.uniforms),...i(e,u.target),antialiasingControls:n(m),mosaicInfo:l.textureManager.getMosaicInfo(e,u.textureKey),localTileOffset:s(u.target)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),l.setPipelineState(a(e)),l.submitDraw(e,u)}}export{l as PatternOutlineFillTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as t,getFeaturePipelineState as s,isHittest as r,getFeatureUniforms as a,resolveDynamicUniforms as i}from"../featureTechniqueUtils.js";import{TextShader as n}from"../text/TextShader.js";class o extends e{constructor(){super(...arguments),this.type=18,this.shaders={geometry:new n},this.drawPhase=14,this.symbologyPlane=3}render(e,n){const{context:o,painter:u}=e,d=t(e),c={...s(e),stencil:{write:!1,test:{compare:516,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}},m=n.instance.getInput(),f={shader:this.shaders.geometry,uniforms:{...i(e,n.target,m.uniforms),...a(e,n.target),mosaicInfo:u.textureManager.getMosaicInfo(o,n.textureKey)},defines:{...d,textRenderPassType:0,isBackgroundPass:!0,isLabel:!0},optionalAttributes:m.optionalAttributes,useComputeBuffer:r(e)};u.setPipelineState(c),u.setShader(f),u.submitDraw(e,n,{stencilRef:255}),u.setShader({...f,defines:{...d,textRenderPassType:2,isBackgroundPass:!1,isLabel:!0}}),u.submitDraw(e,n,{stencilRef:255}),u.setShader({...f,defines:{...d,textRenderPassType:0,isBackgroundPass:!1,isLabel:!0}}),u.submitDraw(e,n,{stencilRef:255})}}export{o as LabelTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as s,getFeaturePipelineState as t,isHittest as r,getFeatureUniforms as a,resolveDynamicUniforms as i}from"../featureTechniqueUtils.js";import{TextShader as n}from"../text/TextShader.js";class o extends e{constructor(){super(...arguments),this.type=18,this.shaders={geometry:new n},this.drawPhase=14,this.symbologyPlane=3}render(e,n){const{painter:o}=e,u=s(e),d={...t(e),stencil:{write:!1,test:{compare:516,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}},m=n.instance.getInput(),c={shader:this.shaders.geometry,uniforms:{...i(e,n.target,m.uniforms),...a(e,n.target),mosaicInfo:o.textureManager.getMosaicInfo(e,n.textureKey)},defines:{...u,textRenderPassType:0,isBackgroundPass:!0,isLabel:!0},optionalAttributes:m.optionalAttributes,useComputeBuffer:r(e)};o.setPipelineState(d),o.setShader(c),o.submitDraw(e,n,{stencilRef:255}),o.setShader({...c,defines:{...u,textRenderPassType:2,isBackgroundPass:!1,isLabel:!0}}),o.submitDraw(e,n,{stencilRef:255}),o.setShader({...c,defines:{...u,textRenderPassType:0,isBackgroundPass:!1,isLabel:!0}}),o.submitDraw(e,n,{stencilRef:255})}}export{o as LabelTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as e,getSelectionDefines as s,getFeatureUniforms as r,resolveDynamicUniforms as i,isHighlight as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{getAntialiasingControls as n}from"./utils.js";import{GradientStrokeShader as p}from"../shaders/GradientStrokeShader.js";class c extends t{constructor(){super(...arguments),this.type=15,this.shaders={geometry:new p},this.symbologyPlane=1}_getShaderOptions(t,o,a){const{context:p,painter:c,pixelRatio:h}=t,l=o.instance.getInput();return{shader:this.shaders.geometry,uniforms:{...i(t,o.target,l.uniforms),...r(t,o.target),antialiasingControls:n(h),mosaicInfo:c.textureManager.getMosaicInfo(p,o.textureKey),technique:{isColorPass:a}},defines:{...s(t)},optionalAttributes:l.optionalAttributes,useComputeBuffer:e(t)}}render(t,s){const{painter:r}=t;if(e(t)||o(t)){const e=a(t);return r.setPipelineState(e),r.setShader(this._getShaderOptions(t,s,1)),void r.submitDraw(t,s)}t.context.setClearDepth(1),t.context.clear(256);const i={color:!1,depth:{write:{zNear:0,zFar:1},test:513},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(t,s,0)),r.setPipelineState(i),r.submitDraw(t,s);const n={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(t,s,1)),r.setPipelineState(n),r.submitDraw(t,s)}}export{c as GradientStrokeTechnique};
5
+ import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as e,getSelectionDefines as s,getFeatureUniforms as r,resolveDynamicUniforms as i,isHighlight as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{getAntialiasingControls as n}from"./utils.js";import{GradientStrokeShader as p}from"../shaders/GradientStrokeShader.js";class h extends t{constructor(){super(...arguments),this.type=15,this.shaders={geometry:new p},this.symbologyPlane=1}_getShaderOptions(t,o,a){const{painter:p,pixelRatio:h}=t,l=o.instance.getInput();return{shader:this.shaders.geometry,uniforms:{...i(t,o.target,l.uniforms),...r(t,o.target),antialiasingControls:n(h),mosaicInfo:p.textureManager.getMosaicInfo(t,o.textureKey),technique:{isColorPass:a}},defines:{...s(t)},optionalAttributes:l.optionalAttributes,useComputeBuffer:e(t)}}render(t,s){const{painter:r}=t;if(e(t)||o(t)){const e=a(t);return r.setPipelineState(e),r.setShader(this._getShaderOptions(t,s,1)),void r.submitDraw(t,s)}t.context.setClearDepth(1),t.context.clear(256);const i={color:!1,depth:{write:{zNear:0,zFar:1},test:513},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(t,s,0)),r.setPipelineState(i),r.submitDraw(t,s);const n={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(t,s,1)),r.setPipelineState(n),r.submitDraw(t,s)}}export{h as GradientStrokeTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s,resolveDynamicUniforms as i,getFeaturePipelineState as o}from"../featureTechniqueUtils.js";import{getAntialiasingControls as a}from"./utils.js";import{TexturedLineShader as n}from"../shaders/TexturedLineShader.js";class u extends e{constructor(){super(...arguments),this.type=31,this.shaders={geometry:new n},this.symbologyPlane=1}render(e,n){const{context:u,painter:m,pixelRatio:p}=e,f=n.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...i(e,n.target,f.uniforms),...s(e,n.target),antialiasingControls:a(p),mosaicInfo:m.textureManager.getMosaicInfo(u,n.textureKey)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(o(e)),m.submitDraw(e,n)}}export{u as TexturedLineTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s,resolveDynamicUniforms as i,getFeaturePipelineState as o}from"../featureTechniqueUtils.js";import{getAntialiasingControls as a}from"./utils.js";import{TexturedLineShader as n}from"../shaders/TexturedLineShader.js";class u extends e{constructor(){super(...arguments),this.type=31,this.shaders={geometry:new n},this.symbologyPlane=1}render(e,n){const{painter:u,pixelRatio:m}=e,p=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...i(e,n.target,p.uniforms),...s(e,n.target),antialiasingControls:a(m),mosaicInfo:u.textureManager.getMosaicInfo(e,n.textureKey)},defines:{...r(e)},optionalAttributes:p.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(o(e)),u.submitDraw(e,n)}}export{u as TexturedLineTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s,resolveDynamicUniforms as o,getFeaturePipelineState as i}from"../featureTechniqueUtils.js";import{MarkerShader as a}from"./MarkerShader.js";class n extends e{constructor(){super(...arguments),this.type=21,this.shaders={geometry:new a},this.symbologyPlane=2}render(e,a){const{context:n,painter:u}=e,m=a.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,a.target,m.uniforms),...s(e,a.target),mosaicInfo:u.textureManager.getMosaicInfo(n,a.textureKey,!0)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(i(e)),u.submitDraw(e,a)}}export{n as MarkerTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s,resolveDynamicUniforms as o,getFeaturePipelineState as i}from"../featureTechniqueUtils.js";import{MarkerShader as a}from"./MarkerShader.js";class n extends e{constructor(){super(...arguments),this.type=21,this.shaders={geometry:new a},this.symbologyPlane=2}render(e,a){const{painter:n}=e,u=a.instance.getInput();n.setShader({shader:this.shaders.geometry,uniforms:{...o(e,a.target,u.uniforms),...s(e,a.target),mosaicInfo:n.textureManager.getMosaicInfo(e,a.textureKey,!0)},defines:{...r(e)},optionalAttributes:u.optionalAttributes,useComputeBuffer:t(e)}),n.setPipelineState(i(e)),n.submitDraw(e,a)}}export{n as MarkerTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as s,isHittest as t,getFeatureUniforms as r,resolveDynamicUniforms as a,getFeaturePipelineState as i}from"../featureTechniqueUtils.js";import{TextShader as n}from"./TextShader.js";class o extends e{constructor(){super(...arguments),this.type=30,this.shaders={geometry:new n},this.symbologyPlane=3}render(e,n){const{context:o,painter:u}=e,d=s(e),m=n.instance.getInput(),p={shader:this.shaders.geometry,uniforms:{...a(e,n.target,m.uniforms),...r(e,n.target),mosaicInfo:u.textureManager.getMosaicInfo(o,n.textureKey)},defines:{...d,isBackgroundPass:!0,isLabel:!1,textRenderPassType:0},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)};u.setShader(p),u.setPipelineState(i(e)),u.submitDraw(e,n),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:2}}),u.submitDraw(e,n),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:1}}),u.submitDraw(e,n),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:0}}),u.submitDraw(e,n)}}export{o as TextTechnique};
5
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as s,isHittest as t,getFeatureUniforms as r,resolveDynamicUniforms as a,getFeaturePipelineState as i}from"../featureTechniqueUtils.js";import{TextShader as n}from"./TextShader.js";class o extends e{constructor(){super(...arguments),this.type=30,this.shaders={geometry:new n},this.symbologyPlane=3}render(e,n){const{painter:o}=e,u=s(e),d=n.instance.getInput(),m={shader:this.shaders.geometry,uniforms:{...a(e,n.target,d.uniforms),...r(e,n.target),mosaicInfo:o.textureManager.getMosaicInfo(e,n.textureKey)},defines:{...u,isBackgroundPass:!0,isLabel:!1,textRenderPassType:0},optionalAttributes:d.optionalAttributes,useComputeBuffer:t(e)};o.setShader(m),o.setPipelineState(i(e)),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:2}}),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:1}}),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:0}}),o.submitDraw(e,n)}}export{o as TextTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- function o(o){return o.locationsMap}const t={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};export{o as getLocations,t as simplePipelineState};
5
+ const e={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};export{e as simplePipelineState};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../../core/Accessor.js";import{watch as i,sync as r}from"../../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../../core/accessorSupport/decorators/property.js";import"../../../../../../core/has.js";import"../../../../../../core/Logger.js";import"../../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{TileKey as l}from"../../../../../../layers/support/TileKey.js";import{distanceToTile as n}from"../../../../../interactive/snapping/featureSources/featureServiceSource/tileUtils.js";import{scaleBoundsPredicate as a}from"../../../../../support/layerViewUtils.js";let p=class extends t{get tiles(){const e=this.tilesCoveringView,t=null!=this.pointOfInterest?this.pointOfInterest:this.view.center;return e.sort((e,i)=>n(t,e)-n(t,i)),e}_scaleEnabled(){return a(this.view.scale,this.layer.minScale||0,this.layer.maxScale||0)}get tilesCoveringView(){if(!this.view.ready||!this.view.featuresTilingScheme||!this.view.state||null==this.tileInfo)return[];if(!this._scaleEnabled)return[];const{spans:e,lodInfo:t}=this.view.featuresTilingScheme.getTileCoverage(this.view.state,0),{level:i}=t,r=[];for(const{row:o,colFrom:s,colTo:n}of e)for(let e=s;e<=n;e++){const s=t.normalizeCol(e),n=new l(null,i,o,s);this.tileInfo.updateTileInfo(n),r.push(n)}return r}get tileInfo(){return this.view.featuresTilingScheme?.tileInfo??null}get tileSize(){return null!=this.tileInfo?this.tileInfo.size[0]:256}constructor(e){super(e),this.pointOfInterest=null}initialize(){this.addHandles(i(()=>this.view?.state?.viewpoint,()=>this.notifyChange("tilesCoveringView"),r))}};e([o({readOnly:!0})],p.prototype,"tiles",null),e([o({readOnly:!0})],p.prototype,"_scaleEnabled",null),e([o({readOnly:!0})],p.prototype,"tilesCoveringView",null),e([o({readOnly:!0})],p.prototype,"tileInfo",null),e([o({readOnly:!0})],p.prototype,"tileSize",null),e([o({constructOnly:!0})],p.prototype,"view",void 0),e([o({constructOnly:!0})],p.prototype,"layer",void 0),e([o()],p.prototype,"pointOfInterest",void 0),p=e([s("esri.views.2d.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiles2D")],p);export{p as FeatureServiceTiles2D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../../core/Accessor.js";import{watch as i,sync as r}from"../../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../../core/accessorSupport/decorators/property.js";import"../../../../../../core/has.js";import"../../../../../../core/Logger.js";import"../../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{TileKey as l}from"../../../../../../layers/support/TileKey.js";import{distanceToTile as n}from"../../../../../interactive/snapping/featureSources/featureServiceSource/tileUtils.js";import{scaleBoundsPredicate as a}from"../../../../../support/layerViewUtils.js";let p=class extends t{get tiles(){const e=this.tilesCoveringView,t=null!=this.pointOfInterest?this.pointOfInterest:this.view.center;return e.sort((e,i)=>n(t,e)-n(t,i)),e}_scaleEnabled(){return a(this.view.scale,this.layer.minScale||0,this.layer.maxScale||0)}get tilesCoveringView(){if(!this.view.ready||!this.view.featuresTilingScheme||!this.view.state||null==this.tileInfo)return[];if(!this._scaleEnabled)return[];const{spans:e,lodInfo:t}=this.view.featuresTilingScheme.getTileCoverage(this.view.state,0),{level:i}=t,r=[];for(const{row:o,colFrom:s,colTo:n}of e)for(let e=s;e<=n;e++){const s=t.normalizeCol(e),n=new l(i,o,s);this.tileInfo.updateTileInfo(n),r.push(n)}return r}get tileInfo(){return this.view.featuresTilingScheme?.tileInfo??null}get tileSize(){return null!=this.tileInfo?this.tileInfo.size[0]:256}constructor(e){super(e),this.pointOfInterest=null}initialize(){this.addHandles(i(()=>this.view?.state?.viewpoint,()=>this.notifyChange("tilesCoveringView"),r))}};e([o({readOnly:!0})],p.prototype,"tiles",null),e([o({readOnly:!0})],p.prototype,"_scaleEnabled",null),e([o({readOnly:!0})],p.prototype,"tilesCoveringView",null),e([o({readOnly:!0})],p.prototype,"tileInfo",null),e([o({readOnly:!0})],p.prototype,"tileSize",null),e([o({constructOnly:!0})],p.prototype,"view",void 0),e([o({constructOnly:!0})],p.prototype,"layer",void 0),e([o()],p.prototype,"pointOfInterest",void 0),p=e([s("esri.views.2d.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiles2D")],p);export{p as FeatureServiceTiles2D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../Color.js";import i from"../../../Graphic.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,initial as l}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/GraphicsLayer.js";import m from"../../../layers/support/TelemetryDisplay.js";import{getSymbolDisplayAngle as y}from"../../../layers/video/videoUtils.js";import h from"../../../symbols/SimpleFillSymbol.js";import p from"../../../symbols/SimpleLineSymbol.js";import c from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolRotation as b}from"../../../symbols/support/cimSymbolUtils.js";import{symbolTypes as f}from"../../../symbols/support/typeUtils.js";import S from"../engine/webgl/OverlayContainer.js";import u from"../engine/webgl/OverlayMultipoint.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import g from"./graphics/GraphicContainer.js";import _ from"./graphics/GraphicsView2D.js";import L from"../../layers/LayerView.js";const v=new t([255,127,0]),T=10005,w=10018;let O=class extends(d(L)){constructor(){super(...arguments),this._graphicsLayer=new n,this._frameOutlineGraphic=new i({symbol:new h({outline:{type:"simple-line",color:v}})}),this._frameCenterGraphic=new i({symbol:new c({color:v,style:"cross"})}),this._sensorTrailGraphic=new i({symbol:new p({color:v})}),this._sensorSightlineGraphic=new i({symbol:new p({color:v})}),this._sensorLocationGraphic=new i({symbol:new c({color:v})}),this._overlayContainer=null,this._sensorLocationSymbolType=null,this.layer=null,this.sensorLocationSymbol=null,this.symbolAngle=0,this.visibleTelemetryElements=null}destroy(){this._graphicsLayer=s(this._graphicsLayer)}initialize(){this._sensorLocationSymbolType=this.layer?.sensorSymbol.type,this._graphicsLayer.graphics.addMany([this._frameCenterGraphic,this._frameOutlineGraphic,this._sensorLocationGraphic,this._sensorSightlineGraphic,this._sensorTrailGraphic]),this.visibleTelemetryElements=new m({frame:this.layer.telemetryDisplay?.frame??!1,frameCenter:this.layer.telemetryDisplay?.frameCenter??!0,frameOutline:this.layer.telemetryDisplay?.frameOutline??!0,lineOfSight:this.layer.telemetryDisplay?.lineOfSight??!0,sensorLocation:this.layer.telemetryDisplay?.sensorLocation??!0,sensorTrail:this.layer.telemetryDisplay?.sensorTrail??!0})}attach(){this._overlayContainer=new S,this.container.addChild(this._overlayContainer),this._addOverlayMultipoint(),this.graphicsView=new _({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this._graphicsLayer.graphics,container:new g(this.view.featuresTilingScheme)}),this.container.addChild(this.graphicsView.container),this.addAttachHandles(this._graphicsLayer.on("graphic-update",this.graphicsView.graphicUpdateHandler)),this.addAttachHandles([r(()=>[this.layer.telemetryDisplay?.frame,this.layer.telemetryDisplay?.frameCenter,this.layer.telemetryDisplay?.frameOutline,this.layer.telemetryDisplay?.sensorLocation,this.layer.telemetryDisplay?.sensorTrail,this.layer.telemetryDisplay?.lineOfSight],()=>this._updateVisibleTelemetryElements(),l),r(()=>[this.layer.telemetry,this.visibleTelemetryElements?.frameCenter,this.visibleTelemetryElements?.frameOutline,this.visibleTelemetryElements?.sensorLocation,this.visibleTelemetryElements?.sensorTrail,this.visibleTelemetryElements?.lineOfSight],()=>this._updateGraphicGeometries(),l),r(()=>this.layer.metadata,()=>this._updateSensorLocationSymbolAngle(),l),r(()=>this.layer?.frameCenterSymbol,()=>this._updateFrameCenterSymbol(),l),r(()=>this.layer?.frameOutlineSymbol,()=>this._updateFrameOutlineSymbol(),l),r(()=>this.layer?.sensorSightLineSymbol,()=>this._updateSensorSightlineSymbol(),l),r(()=>this.layer?.sensorSymbol,()=>this._updateSensorLocationSymbol(),l),r(()=>this.layer?.sensorTrailSymbol,()=>this._updateSensorTrailSymbol(),l),r(()=>this.symbolAngle,()=>this._updateSensorLocationSymbol(),l)])}detach(){this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this.graphicsView=s(this.graphicsView)}supportsSpatialReference(e){return!0}moveEnd(){}viewChange(){this.graphicsView.viewChange()}update(e){this.graphicsView.processUpdate(e)}isUpdating(){return!this.graphicsView||this.graphicsView.updating}_updateVisibleTelemetryElements(){this.visibleTelemetryElements&&this.layer.telemetryDisplay&&(this.visibleTelemetryElements.frame=this.layer.telemetryDisplay.frame,this.visibleTelemetryElements.frameCenter=this.layer.telemetryDisplay.frameCenter,this.visibleTelemetryElements.frameOutline=this.layer.telemetryDisplay.frameOutline,this.visibleTelemetryElements.lineOfSight=this.layer.telemetryDisplay.lineOfSight,this.visibleTelemetryElements.sensorLocation=this.layer.telemetryDisplay.sensorLocation,this.visibleTelemetryElements.sensorTrail=this.layer.telemetryDisplay.sensorTrail)}_updateGraphicGeometries(){const{telemetry:e}=this.layer,{visibleTelemetryElements:t}=this;e&&t&&(t.frameOutline&&e.frameOutline?this._frameOutlineGraphic.geometry=this.layer.telemetry.frameOutline:this._frameOutlineGraphic.geometry=null,t.sensorTrail&&e.sensorTrail?this._sensorTrailGraphic.geometry=this.layer.telemetry.sensorTrail:this._sensorTrailGraphic.geometry=null,t.lineOfSight&&e.lineOfSight?this._sensorSightlineGraphic.geometry=this.layer.telemetry.lineOfSight:this._sensorSightlineGraphic.geometry=null,t.sensorLocation&&e.sensorLocation?this._sensorLocationGraphic.geometry=this.layer.telemetry.sensorLocation:this._sensorLocationGraphic.geometry=null,t.frameCenter&&e.frameCenter?this._frameCenterGraphic.geometry=this.layer.telemetry.frameCenter:this._frameCenterGraphic.geometry=null)}_updateSensorLocationSymbolAngle(){if(!this.layer?.metadata?.size)return;const{source:e,symbolOffset:t=0}=this.layer.sensorSymbolOrientation||{};if(!e&&!t)return;const i=this.layer?.metadata?.get(T)?.value??0,s=this.layer?.metadata?.get(w)?.value??0,r=y({cameraAzimuth:s,platformHeading:i,source:this.layer.sensorSymbolOrientation?.source,symbolOffset:this.layer.sensorSymbolOrientation?.symbolOffset??0});this.symbolAngle=Math.round(Math.abs(r))}_updateSensorLocationSymbol(){switch(this._sensorLocationSymbolType){case"simple-marker":this.sensorLocationSymbol=this.layer.sensorSymbol.clone(),this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol.clone();break;case"picture-marker":this.sensorLocationSymbol=this.layer.sensorSymbol,this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol;break;case"cim":this.sensorLocationSymbol=this.layer.sensorSymbol,b(this.sensorLocationSymbol,this.symbolAngle,!0),this._sensorLocationGraphic.symbol=this.sensorLocationSymbol}}_updateFrameCenterSymbol(){this.layer?.frameCenterSymbol&&(this._frameCenterGraphic.symbol=this.layer.frameCenterSymbol.clone())}_updateFrameOutlineSymbol(){this.layer?.frameOutlineSymbol&&(this._frameOutlineGraphic.symbol=this.layer.frameOutlineSymbol.clone())}_updateSensorSightlineSymbol(){this.layer?.sensorSightLineSymbol&&(this._sensorSightlineGraphic.symbol=this.layer.sensorSightLineSymbol.clone())}_updateSensorTrailSymbol(){this.layer?.sensorTrailSymbol&&(this._sensorTrailGraphic.symbol=this.layer.sensorTrailSymbol.clone())}async _addOverlayMultipoint(){if(!this.layer.videoElement)return;const e=new u(this.layer.videoElement);this.addAttachHandles([r(()=>[this.layer.frameHorizonPoints,this.layer.groundControlPoints,this.layer.frameOpacity,this.layer.telemetryDisplay?.frame],()=>{const{visibleTelemetryElements:t}=this;e.frameHorizonPoints=this.layer.frameHorizonPoints,e.groundControlPoints=this.layer.groundControlPoints,e.opacity=this.layer.frameOpacity,e.visible=t?.frame??!1},l)]),this._overlayContainer.addChild(e),this.view.stage.requestRender()}};e([o()],O.prototype,"graphicsView",void 0),e([o()],O.prototype,"layer",void 0),e([o({types:f})],O.prototype,"sensorLocationSymbol",void 0),e([o()],O.prototype,"symbolAngle",void 0),e([o({type:m})],O.prototype,"visibleTelemetryElements",void 0),O=e([a("esri.views.2d.layers.VideoLayerView2D")],O);const C=O;export{C as default};
5
+ import{__decorate as e}from"tslib";import i from"../../../Color.js";import t from"../../../Graphic.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,initial as l}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import n from"../../../layers/GraphicsLayer.js";import m from"../../../layers/support/TelemetryDisplay.js";import{getSymbolDisplayAngle as y}from"../../../layers/video/videoUtils.js";import h from"../../../symbols/SimpleFillSymbol.js";import p from"../../../symbols/SimpleLineSymbol.js";import c from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolRotation as b}from"../../../symbols/support/cimSymbolUtils.js";import{symbolTypes as f}from"../../../symbols/support/typeUtils.js";import u from"../engine/webgl/OverlayContainer.js";import S from"../engine/webgl/OverlayMultipoint.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import g from"./graphics/GraphicContainer.js";import _ from"./graphics/GraphicsView2D.js";import v from"../../layers/LayerView.js";const L=new i([255,127,0]),w=10005,T=10018;let O=class extends(d(v)){constructor(){super(...arguments),this._graphicsLayer=new n,this._frameOutlineGraphic=new t({symbol:new h({outline:{type:"simple-line",color:L}})}),this._frameCenterGraphic=new t({symbol:new c({color:L,style:"cross"})}),this._sensorTrailGraphic=new t({symbol:new p({color:L})}),this._sensorSightlineGraphic=new t({symbol:new p({color:L})}),this._sensorLocationGraphic=new t({symbol:new c({color:L})}),this._overlayContainer=null,this._sensorLocationSymbolType=null,this.layer=null,this.sensorLocationSymbol=null,this.symbolAngle=0,this.visibleTelemetryElements=null}destroy(){this._graphicsLayer=s(this._graphicsLayer)}initialize(){this._sensorLocationSymbolType=this.layer?.sensorSymbol.type,this._graphicsLayer.graphics.addMany([this._frameCenterGraphic,this._frameOutlineGraphic,this._sensorLocationGraphic,this._sensorSightlineGraphic,this._sensorTrailGraphic]),this.visibleTelemetryElements=new m({frame:this.layer.telemetryDisplay?.frame??!1,frameCenter:this.layer.telemetryDisplay?.frameCenter??!0,frameOutline:this.layer.telemetryDisplay?.frameOutline??!0,lineOfSight:this.layer.telemetryDisplay?.lineOfSight??!0,sensorLocation:this.layer.telemetryDisplay?.sensorLocation??!0,sensorTrail:this.layer.telemetryDisplay?.sensorTrail??!0})}attach(){this._overlayContainer=new u,this.container.addChild(this._overlayContainer),this._addOverlayMultipoint(),this.graphicsView=new _({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this._graphicsLayer.graphics,container:new g(this.view.featuresTilingScheme)}),this.container.addChild(this.graphicsView.container),this.addAttachHandles(this._graphicsLayer.on("graphic-update",this.graphicsView.graphicUpdateHandler)),this.addAttachHandles([r(()=>[this.layer.telemetryDisplay?.frame,this.layer.telemetryDisplay?.frameCenter,this.layer.telemetryDisplay?.frameOutline,this.layer.telemetryDisplay?.sensorLocation,this.layer.telemetryDisplay?.sensorTrail,this.layer.telemetryDisplay?.lineOfSight],()=>this._updateVisibleTelemetryElements(),l),r(()=>[this.layer.telemetry,this.visibleTelemetryElements?.frameCenter,this.visibleTelemetryElements?.frameOutline,this.visibleTelemetryElements?.sensorLocation,this.visibleTelemetryElements?.sensorTrail,this.visibleTelemetryElements?.lineOfSight],()=>this._updateGraphicGeometries(),l),r(()=>this.layer.metadata,()=>this._updateSensorLocationSymbolAngle(),l),r(()=>this.layer?.frameCenterSymbol,()=>this._updateFrameCenterSymbol(),l),r(()=>this.layer?.frameOutlineSymbol,()=>this._updateFrameOutlineSymbol(),l),r(()=>this.layer?.sensorSightLineSymbol,()=>this._updateSensorSightlineSymbol(),l),r(()=>this.layer?.sensorSymbol,()=>this._updateSensorLocationSymbol(),l),r(()=>this.layer?.sensorTrailSymbol,()=>this._updateSensorTrailSymbol(),l),r(()=>this.symbolAngle,()=>this._updateSensorLocationSymbol(),l)])}detach(){this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this.graphicsView=s(this.graphicsView)}supportsSpatialReference(e){return!0}moveEnd(){}viewChange(){this.graphicsView.viewChange()}update(e){this.graphicsView.processUpdate(e)}isUpdating(){return!this.graphicsView||this.graphicsView.updating}_updateVisibleTelemetryElements(){this.view.animationsEnabled&&this.visibleTelemetryElements&&this.layer.telemetryDisplay&&(this.visibleTelemetryElements.frame=this.layer.telemetryDisplay.frame,this.visibleTelemetryElements.frameCenter=this.layer.telemetryDisplay.frameCenter,this.visibleTelemetryElements.frameOutline=this.layer.telemetryDisplay.frameOutline,this.visibleTelemetryElements.lineOfSight=this.layer.telemetryDisplay.lineOfSight,this.visibleTelemetryElements.sensorLocation=this.layer.telemetryDisplay.sensorLocation,this.visibleTelemetryElements.sensorTrail=this.layer.telemetryDisplay.sensorTrail)}_updateGraphicGeometries(){if(!this.view.animationsEnabled)return;const{telemetry:e}=this.layer,{visibleTelemetryElements:i}=this;e&&i&&(i.frameOutline&&e.frameOutline?this._frameOutlineGraphic.geometry=this.layer.telemetry.frameOutline:this._frameOutlineGraphic.geometry=null,i.sensorTrail&&e.sensorTrail?this._sensorTrailGraphic.geometry=this.layer.telemetry.sensorTrail:this._sensorTrailGraphic.geometry=null,i.lineOfSight&&e.lineOfSight?this._sensorSightlineGraphic.geometry=this.layer.telemetry.lineOfSight:this._sensorSightlineGraphic.geometry=null,i.sensorLocation&&e.sensorLocation?this._sensorLocationGraphic.geometry=this.layer.telemetry.sensorLocation:this._sensorLocationGraphic.geometry=null,i.frameCenter&&e.frameCenter?this._frameCenterGraphic.geometry=this.layer.telemetry.frameCenter:this._frameCenterGraphic.geometry=null)}_updateSensorLocationSymbolAngle(){if(!this.view.animationsEnabled)return;if(!this.layer?.metadata?.size)return;const{source:e,symbolOffset:i=0}=this.layer.sensorSymbolOrientation||{};if(!e&&!i)return;const t=this.layer?.metadata?.get(w)?.value??0,s=this.layer?.metadata?.get(T)?.value??0,r=y({cameraAzimuth:s,platformHeading:t,source:this.layer.sensorSymbolOrientation?.source,symbolOffset:this.layer.sensorSymbolOrientation?.symbolOffset??0});this.symbolAngle=Math.round(Math.abs(r))}_updateSensorLocationSymbol(){switch(this._sensorLocationSymbolType){case"simple-marker":this.sensorLocationSymbol=this.layer.sensorSymbol.clone(),this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol.clone();break;case"picture-marker":this.sensorLocationSymbol=this.layer.sensorSymbol,this.sensorLocationSymbol.angle=this.symbolAngle,this._sensorLocationGraphic.symbol=this.sensorLocationSymbol;break;case"cim":this.sensorLocationSymbol=this.layer.sensorSymbol,b(this.sensorLocationSymbol,this.symbolAngle,!0),this._sensorLocationGraphic.symbol=this.sensorLocationSymbol}}_updateFrameCenterSymbol(){this.layer?.frameCenterSymbol&&(this._frameCenterGraphic.symbol=this.layer.frameCenterSymbol.clone())}_updateFrameOutlineSymbol(){this.layer?.frameOutlineSymbol&&(this._frameOutlineGraphic.symbol=this.layer.frameOutlineSymbol.clone())}_updateSensorSightlineSymbol(){this.layer?.sensorSightLineSymbol&&(this._sensorSightlineGraphic.symbol=this.layer.sensorSightLineSymbol.clone())}_updateSensorTrailSymbol(){this.layer?.sensorTrailSymbol&&(this._sensorTrailGraphic.symbol=this.layer.sensorTrailSymbol.clone())}async _addOverlayMultipoint(){if(!this.layer.videoElement)return;const e=new S(this.layer.videoElement);this.addAttachHandles([r(()=>[this.layer.frameHorizonPoints,this.layer.groundControlPoints,this.layer.frameOpacity,this.layer.telemetryDisplay?.frame],()=>{if(!this.view.animationsEnabled)return;const{visibleTelemetryElements:i}=this;e.frameHorizonPoints=this.layer.frameHorizonPoints,e.groundControlPoints=this.layer.groundControlPoints,e.opacity=this.layer.frameOpacity,e.visible=i?.frame??!1},l)]),this._overlayContainer.addChild(e),this.view.stage.requestRender()}};e([o()],O.prototype,"graphicsView",void 0),e([o()],O.prototype,"layer",void 0),e([o({types:f})],O.prototype,"sensorLocationSymbol",void 0),e([o()],O.prototype,"symbolAngle",void 0),e([o({type:m})],O.prototype,"visibleTelemetryElements",void 0),O=e([a("esri.views.2d.layers.VideoLayerView2D")],O);const C=O;export{C as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{assertIsSome as s}from"../../../../core/maybe.js";import{debounce as r,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as n}from"../../../../core/support/UpdatingHandles.js";import h from"../../../../geometry/Extent.js";import c from"../../../../geometry/Point.js";import u from"../../../../layers/support/PixelBlock.js";import p from"../../../../layers/support/TileInfo.js";import{update as d,unregister as y,getRasterId as m,register as g}from"../../../../layers/support/rasterDatasets/RawBlockCache.js";import{getWorldWidth as _,computeProjectedScales as f}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import b from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import w from"../../tiling/TileQueue.js";import I from"../../tiling/TileStrategy.js";import{tileSize as P}from"../../engine/webgl/definitions.js";import{TaskPriority as S}from"../../../support/Scheduler.js";import{getWebGLCapabilities as R}from"../../../webgl/capabilities.js";const C=[0,0];let U=class extends t{constructor(){super(...arguments),this._updatingHandles=new n,this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=[],this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._maxIndexedColormapSize=0,this._rasterFunctionState="na",this._globalUpdateRequested=!1,this.attached=!1,this.timeExtent=null,this.redrawOrRefetch=r(async(e={})=>{const t=this._rasterFunctionState,i=e.reprocess||"gpu"===t&&!this.canUseWebGLForProcessing||"cpu"===t&&this.canUseWebGLForProcessing;if(i&&(await this._updatingHandles.addPromise(this.layer.updateRasterFunction()),this.updateRasterFunctionParameters()),!this.previousLOD||this.layerView.suspended)return;const s=this._rasterFunctionState,{type:r}=this;return e.refetch||"raster"!==r&&!!i||"cpu"===s||"cpu"===t?this._updatingHandles.addPromise(this.doRefresh()):this._updatingHandles.addPromise(this._redrawImage(e.signal))})}destroy(){this._updatingHandles.destroy()}get canUseWebGLForProcessing(){return!1}get canUseLocalSymbolizerParams(){return(this.canUseWebGLForProcessing||"rasterVF"===this.type)&&!this.layerView.hasTilingEffects}get useWebGLForProcessing(){return this._get("useWebGLForProcessing")??!0}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return this._get("useProgressiveUpdate")??!0}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s="toJSON"in t?t:h.fromJSON(t);d(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,this.previousLOD?.level!==r.level&&(this.previousLOD=r,null!=this._symbolizerParams&&this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){!this.layerView.hasTilingEffects&&this.useProgressiveUpdate||(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&this._redrawImage(this._abortController.signal).then(()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()}));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._globalUpdateRequested||this._updatingHandles?.updating}attach(){const e=R();this._maxIndexedColormapSize=4*(e.maxTextureSize||4096),this._initializeTileInfo(),this._tileInfoView=new b(this.layerView.tileInfo,this.layerView.fullExtent);const t=this._computeFetchConcurrency();this._fetchQueue=new w({tileInfoView:this._tileInfoView,concurrency:t,process:(e,t)=>this._fetchTile(e,t),priority:S.MAPVIEW_FETCH_QUEUE,scheduler:this.scheduler});const i=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:i,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}detach(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,y(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryUrl=this._blockCacheRegistryId=null}acquireTile(e){const t=this.container.createTile(e);return this._updatingHandles.addPromise(this._enqueueTileFetch(t)),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.layerView.hasTilingEffects||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",()=>{e.destroy(),this.layerView.requestUpdate()}),this.layerView.requestUpdate()}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.tileInfo.size.join(",");if(t&&null!=this._emptyTilePixelBlock)return this._emptyTilePixelBlock;e=e||this._tileInfoView.tileInfo.size;const[i,s]=e,r=new u({width:i,height:s,pixels:[new Uint8Array(i*s)],mask:new Uint8Array(i*s),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=r),r}_getBandIds(){if(!("rasterFunctionChain"in this.container)||!this.container.rasterFunctionChain)return this.layer.bandIds;const{bandIds:e,raster:t}=this.layer,i="rasterFunction"in t?t.rasterFunction.rawInputBandIds:null;return e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):"rasterFunction"in t?i:e}updateRasterFunctionParameters(){}_fetchTile(e,t){const i=this._getFetchOptions(e.level,t.signal);return this.fetchTile(e,i)}_getFetchOptions(e,t){const{canUseWebGLForProcessing:i}=this,{layerView:s}=this,{tileInfo:r}=s,a=!r.isWrappable&&null!=_(s.view.spatialReference),o=i&&this.layer.raster.hasUniqueSourceStorageInfo,{layer:l}=this.layerView,n=l.serviceRasterInfo?.storageInfo.isBsqTile?l.getRawDisplayBandIds():void 0;return{allowPartialFill:!0,datumTransformation:s.datumTransformation,interpolation:i?"nearest":this.layer.interpolation,registryId:this._blockCacheRegistryId,requestRawData:o,skipRasterFunction:"raster"===this.type&&null!=this.container.rasterFunctionChain,signal:t,srcResolution:this._srcResolutions[e],timeExtent:s.timeExtent,tileInfo:r,bandIds:n,disableWrapAround:a}}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const{layerView:e}=this,t=e.view.spatialReference;if(this._canUseLayerLODs()){const{origin:i,lods:s}=this.layer.tileInfo,r=s.map(({scale:e})=>e),a=p.create({spatialReference:t,size:P,scales:r,origin:i});return e.set("tileInfo",a),void(this._srcResolutions=s.map(({resolution:e})=>({x:e,y:e})))}const{scales:i,srcResolutions:r,isCustomTilingScheme:a}=f(this.layer.serviceRasterInfo,t,{tileSize:P,alignGlobalDatasetWithAGOL:!0,limitToSrcResolution:!1}),o=p.create({spatialReference:t,size:P,scales:i}),l=0===o.origin.x;s(e.fullExtent);const{xmin:n,ymax:h}=e.fullExtent;(l||a&&o.origin.x>n)&&(o.origin=new c({x:n,y:h,spatialReference:t})),this._isCustomTilingScheme=a,e.set("tileInfo",o),this._srcResolutions=r??[]}_canUseLayerLODs(){const{layer:e,layerView:t}=this;if("Map"!==e.raster.tileType)return!1;const{lods:i}=e.tileInfo,s=t.view.constraints?.effectiveLODs;return s?.length===i.length&&s.every(({scale:e},t)=>Math.abs(e-i[t].scale)<.001)}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.serviceRasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key),r=this._getBandIds();let o=!this.useProgressiveUpdate||this.layerView.hasTilingEffects&&!this._globalSymbolizerParams;if(this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length){o=!1;try{await this._redrawImage(this._abortController?.signal)}catch(s){a(s)&&i.getLogger(this).error(s)}this._globalUpdateRequested=!1}this.canUseLocalSymbolizerParams&&null==this._symbolizerParams&&this._updateSymbolizerParams();const l=this._tileInfoView.getTileCoords(C,e.key),n=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:t,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:o,bandIds:r,coords:l,resolution:n}),e.once("attach",()=>this.layerView.requestUpdate()),this.container.addChild(e)}catch(s){a(s)||i.getLogger(this).error(s)}this.layerView.requestUpdate()}}async _redrawImage(e){if(0===this.container.children.length)return;await this.layer.updateRenderer(),this.layerView.hasTilingEffects?await this._updateGlobalSymbolizerParams(e):(this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._globalSymbolizerParams=null);const t=this.container.children.map(async e=>this.updateTileSymbolizerParameters(e,{local:this._symbolizerParams,global:this._globalSymbolizerParams}));await Promise.allSettled(t),this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const t=this._getFetchOptions(this.previousLOD.level,e),i=await this.layer.fetchPixels(this.layerView.view.extent,this.layerView.view.width,this.layerView.view.height,{...t,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1});if(!i?.pixelBlock)return;const{resolution:s}=this.previousLOD,{isBsqTile:r}=this.layer.raster.rasterInfo.storageInfo,a=r?null:this._getBandIds(),o=this.layer.symbolizer.generateWebGLParameters({pixelBlock:i.pixelBlock.extractBands(a),isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:s,y:s},bandIds:a});!this.canUseWebGLForProcessing&&o&&"stretch"===o.type&&this.layer.renderer&&"raster-stretch"===this.layer.renderer.type&&(o.factor=o.factor.map(e=>255*e),o.minOutput=Math.round(255*o.minOutput),o.maxOutput=Math.round(255*o.maxOutput)),this._globalSymbolizerParams=o}_updateSymbolizerParams(){const{resolution:e}=this.previousLOD,t=this._getBandIds();this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:e,y:e},bandIds:t})}_updateBlockCacheRegistry(e=!1){const{layer:t,layerView:i}=this,{raster:s}=t,{multidimensionalDefinition:r}=t.normalizeRasterFetchOptions({multidimensionalDefinition:t.multidimensionalDefinition,timeExtent:i.timeExtent}),a=s.rasterInfo.multidimensionalInfo?s.getSliceIndex(r):null,o=s.rasterInfo.storageInfo.isBsqTile?t.getRawDisplayBandIds():null,l=m(s.rasterId,a,o);if(l!==this._blockCacheRegistryUrl){if(null!=this._blockCacheRegistryUrl&&y(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryId=g(l,s.rasterInfo),e){const{view:e}=i,t=this._tileInfoView.getClosestInfoForScale(e.scale),r=this._srcResolutions[t.level];d(l,this._blockCacheRegistryId,e.extent,e.resolution,r,s.ioConfig.sampling)}this._blockCacheRegistryUrl=l}}async doRefresh(){if(!this.attached||!this.previousLOD||this.layerView.suspended)return;await this.layer.updateRenderer(),this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset();const e=[];this._globalUpdateRequested=this.layerView.hasTilingEffects||!this.useProgressiveUpdate,this._tileStrategy.refresh(t=>e.push(this._enqueueTileFetch(t))),await this._updatingHandles.addPromise(Promise.allSettled(e))}};e([o()],U.prototype,"_globalUpdateRequested",void 0),e([o()],U.prototype,"attached",void 0),e([o()],U.prototype,"canUseWebGLForProcessing",null),e([o()],U.prototype,"canUseLocalSymbolizerParams",null),e([o()],U.prototype,"container",void 0),e([o()],U.prototype,"layer",void 0),e([o()],U.prototype,"layerView",void 0),e([o()],U.prototype,"scheduler",void 0),e([o()],U.prototype,"type",void 0),e([o()],U.prototype,"useWebGLForProcessing",null),e([o()],U.prototype,"useProgressiveUpdate",null),e([o()],U.prototype,"timeExtent",void 0),e([o()],U.prototype,"updating",null),U=e([l("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],U);export{U as BaseImageryTileSubView2D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{assertIsSome as s}from"../../../../core/maybe.js";import{debounce as r,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as n}from"../../../../core/support/UpdatingHandles.js";import h from"../../../../geometry/Extent.js";import c from"../../../../geometry/Point.js";import u from"../../../../layers/support/PixelBlock.js";import d from"../../../../layers/support/TileInfo.js";import{update as p,unregister as m,getRasterId as y,register as g}from"../../../../layers/support/rasterDatasets/RawBlockCache.js";import{getWorldWidth as _,computeProjectedScales as f}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import b from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import w from"../../tiling/TileQueue.js";import P from"../../tiling/TileStrategy.js";import{tileSize as I}from"../../engine/webgl/definitions.js";import{TaskPriority as R}from"../../../support/Scheduler.js";import{getWebGLCapabilities as U}from"../../../webgl/capabilities.js";const C=[0,0];let S=class extends t{constructor(){super(...arguments),this._updatingHandles=new n,this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=[],this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._maxIndexedColormapSize=0,this._rasterFunctionState="na",this._globalUpdateRequested=!1,this.attached=!1,this.timeExtent=null,this.redrawOrRefetch=r(async(e={})=>{const t=this._rasterFunctionState,i=e.reprocess||"gpu"===t&&!this.canUseWebGLForProcessing||"cpu"===t&&this.canUseWebGLForProcessing;if(i&&(await this._updatingHandles.addPromise(this.layer.updateRasterFunction()),this.updateRasterFunctionParameters()),!this.previousLOD||this.layerView.suspended)return;const s=this._rasterFunctionState,{type:r}=this;return e.refetch||"raster"!==r&&!!i||"cpu"===s||"cpu"===t?this._updatingHandles.addPromise(this.doRefresh()):this._updatingHandles.addPromise(this._redrawImage(e.signal))})}destroy(){this._updatingHandles.destroy()}get canUseWebGLForProcessing(){return!1}get canUseLocalSymbolizerParams(){return(this.canUseWebGLForProcessing||"rasterVF"===this.type)&&!this.layerView.hasTilingEffects}get isCPUBasedDRA(){const{renderer:e}=this.layer;return"raster-stretch"===e?.type&&e.dynamicRangeAdjustment&&(!this.canUseWebGLForProcessing||!("min-max"===e.stretchType||"standard-deviation"===e.stretchType))}get useWebGLForProcessing(){return this._get("useWebGLForProcessing")??!0}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return this._get("useProgressiveUpdate")??!0}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new P({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s="toJSON"in t?t:h.fromJSON(t);p(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,this.previousLOD?.level!==r.level&&(this.previousLOD=r,null!=this._symbolizerParams&&this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){!this.isCPUBasedDRA&&this.useProgressiveUpdate||(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&this._redrawImage(this._abortController.signal).then(()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()}));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._globalUpdateRequested||this._updatingHandles?.updating}attach(){const e=U();this._maxIndexedColormapSize=4*(e.maxTextureSize||4096),this._initializeTileInfo(),this._tileInfoView=new b(this.layerView.tileInfo,this.layerView.fullExtent);const t=this._computeFetchConcurrency();this._fetchQueue=new w({tileInfoView:this._tileInfoView,concurrency:t,process:(e,t)=>this._fetchTile(e,t),priority:R.MAPVIEW_FETCH_QUEUE,scheduler:this.scheduler});const i=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new P({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:i,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}detach(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,m(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryUrl=this._blockCacheRegistryId=null}acquireTile(e){const t=this.container.createTile(e);return this._updatingHandles.addPromise(this._enqueueTileFetch(t)),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.isCPUBasedDRA||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",()=>{e.destroy(),this.layerView.requestUpdate()}),this.layerView.requestUpdate()}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.tileInfo.size.join(",");if(t&&null!=this._emptyTilePixelBlock)return this._emptyTilePixelBlock;e=e||this._tileInfoView.tileInfo.size;const[i,s]=e,r=new u({width:i,height:s,pixels:[new Uint8Array(i*s)],mask:new Uint8Array(i*s),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=r),r}_getBandIds(){if(!("rasterFunctionChain"in this.container)||!this.container.rasterFunctionChain)return this.layer.bandIds;const{bandIds:e,raster:t}=this.layer,i="rasterFunction"in t?t.rasterFunction.rawInputBandIds:null;return e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):"rasterFunction"in t?i:e}updateRasterFunctionParameters(){}_fetchTile(e,t){const i=this._getFetchOptions(e.level,t.signal);return this.fetchTile(e,i)}_getFetchOptions(e,t){const{canUseWebGLForProcessing:i}=this,{layerView:s}=this,{tileInfo:r}=s,a=!r.isWrappable&&null!=_(s.view.spatialReference),o=i&&this.layer.raster.hasUniqueSourceStorageInfo,{layer:l}=this.layerView,n=l.serviceRasterInfo?.storageInfo.isBsqTile?l.getRawDisplayBandIds():void 0;return{allowPartialFill:!0,datumTransformation:s.datumTransformation,interpolation:i?"nearest":this.layer.interpolation,registryId:this._blockCacheRegistryId,requestRawData:o,skipRasterFunction:"raster"===this.type&&null!=this.container.rasterFunctionChain,signal:t,srcResolution:this._srcResolutions[e],timeExtent:s.timeExtent,tileInfo:r,bandIds:n,disableWrapAround:a}}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const{layerView:e}=this,t=e.view.spatialReference;if(this._canUseLayerLODs()){const{origin:i,lods:s}=this.layer.tileInfo,r=s.map(({scale:e})=>e),a=d.create({spatialReference:t,size:I,scales:r,origin:i});return e.set("tileInfo",a),void(this._srcResolutions=s.map(({resolution:e})=>({x:e,y:e})))}const{scales:i,srcResolutions:r,isCustomTilingScheme:a}=f(this.layer.serviceRasterInfo,t,{tileSize:I,alignGlobalDatasetWithAGOL:!0,limitToSrcResolution:!1}),o=d.create({spatialReference:t,size:I,scales:i}),l=0===o.origin.x;s(e.fullExtent);const{xmin:n,ymax:h}=e.fullExtent;(l||a&&o.origin.x>n)&&(o.origin=new c({x:n,y:h,spatialReference:t})),this._isCustomTilingScheme=a,e.set("tileInfo",o),this._srcResolutions=r??[]}_canUseLayerLODs(){const{layer:e,layerView:t}=this;if("Map"!==e.raster.tileType)return!1;const{lods:i}=e.tileInfo,s=t.view.constraints?.effectiveLODs;return s?.length===i.length&&s.every(({scale:e},t)=>Math.abs(e-i[t].scale)<.001)}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.serviceRasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key),r=this._getBandIds();let o=!this.useProgressiveUpdate||this.isCPUBasedDRA&&!this._globalSymbolizerParams;if(this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length){o=!1;try{await this._redrawImage(this._abortController?.signal)}catch(s){a(s)&&i.getLogger(this).error(s)}this._globalUpdateRequested=!1}this.canUseLocalSymbolizerParams&&null==this._symbolizerParams&&this._updateSymbolizerParams();const l=this._tileInfoView.getTileCoords(C,e.key),n=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:t,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:o,bandIds:r,coords:l,resolution:n}),e.once("attach",()=>this.layerView.requestUpdate()),this.container.addChild(e)}catch(s){a(s)||i.getLogger(this).error(s)}this.layerView.requestUpdate()}}async _redrawImage(e){if(0===this.container.children.length)return;await this.layer.updateRenderer(),this.isCPUBasedDRA?await this._updateGlobalSymbolizerParams(e):(this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._globalSymbolizerParams=null);const t=this.container.children.map(async e=>this.updateTileSymbolizerParameters(e,{local:this._symbolizerParams,global:this._globalSymbolizerParams}));await Promise.allSettled(t),this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const t=this._getFetchOptions(this.previousLOD.level,e),i=await this.layer.fetchPixels(this.layerView.view.extent,this.layerView.view.width,this.layerView.view.height,{...t,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1});if(!i?.pixelBlock)return;const{resolution:s}=this.previousLOD,{isBsqTile:r}=this.layer.raster.rasterInfo.storageInfo,a=r?null:this._getBandIds(),o=this.layer.symbolizer.generateWebGLParameters({pixelBlock:i.pixelBlock.extractBands(a),isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:s,y:s},bandIds:a});!this.canUseWebGLForProcessing&&o&&"stretch"===o.type&&this.layer.renderer&&"raster-stretch"===this.layer.renderer.type&&(o.factor=o.factor.map(e=>255*e),o.minOutput=Math.round(255*o.minOutput),o.maxOutput=Math.round(255*o.maxOutput)),this._globalSymbolizerParams=o}_updateSymbolizerParams(){const{resolution:e}=this.previousLOD,t=this._getBandIds();this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:e,y:e},bandIds:t})}_updateBlockCacheRegistry(e=!1){const{layer:t,layerView:i}=this,{raster:s}=t,{multidimensionalDefinition:r}=t.normalizeRasterFetchOptions({multidimensionalDefinition:t.multidimensionalDefinition,timeExtent:i.timeExtent}),a=s.rasterInfo.multidimensionalInfo?s.getSliceIndex(r):null,o=s.rasterInfo.storageInfo.isBsqTile?t.getRawDisplayBandIds():null,l=y(s.rasterId,a,o);if(l!==this._blockCacheRegistryUrl){if(null!=this._blockCacheRegistryUrl&&m(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryId=g(l,s.rasterInfo),e){const{view:e}=i,t=this._tileInfoView.getClosestInfoForScale(e.scale),r=this._srcResolutions[t.level];p(l,this._blockCacheRegistryId,e.extent,e.resolution,r,s.ioConfig.sampling)}this._blockCacheRegistryUrl=l}}async doRefresh(){if(!this.attached||!this.previousLOD||this.layerView.suspended)return;await this.layer.updateRenderer(),this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset();const e=[];this._globalUpdateRequested=this.isCPUBasedDRA||!this.useProgressiveUpdate,this._tileStrategy.refresh(t=>e.push(this._enqueueTileFetch(t))),await this._updatingHandles.addPromise(Promise.allSettled(e))}};e([o()],S.prototype,"_globalUpdateRequested",void 0),e([o()],S.prototype,"attached",void 0),e([o()],S.prototype,"canUseWebGLForProcessing",null),e([o()],S.prototype,"canUseLocalSymbolizerParams",null),e([o()],S.prototype,"isCPUBasedDRA",null),e([o()],S.prototype,"container",void 0),e([o()],S.prototype,"layer",void 0),e([o()],S.prototype,"layerView",void 0),e([o()],S.prototype,"scheduler",void 0),e([o()],S.prototype,"type",void 0),e([o()],S.prototype,"useWebGLForProcessing",null),e([o()],S.prototype,"useProgressiveUpdate",null),e([o()],S.prototype,"timeExtent",void 0),e([o()],S.prototype,"updating",null),S=e([l("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],S);export{S as BaseImageryTileSubView2D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import has from"../../../../core/has.js";import{numberMaxFloat32 as r}from"../../../../core/mathUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{isFunctionRaster as o}from"../../../../layers/support/rasterDatasets/datasetUtils.js";import{getBytesPerPixel as n}from"../../../../layers/support/rasterFormats/pixelRangeUtils.js";import{convertGeometryToMask as a}from"../../../../layers/support/rasterFunctions/clipUtils.js";import{maxMapSizeGpu as l}from"../../../../layers/support/rasterFunctions/pixelUtils.js";import{RasterTileContainer as c}from"../../engine/imagery/RasterTileContainer.js";import{BaseImageryTileSubView2D as p}from"./BaseImageryTileSubView2D.js";import{canUseMajorityInterpolationOnDataSource as u}from"../support/util.js";import{defaultColor as h}from"../../../support/HighlightDefaults.js";import{getHighlightName as d}from"../../../support/highlightOptionsUtils.js";let m=class extends p{constructor(){super(...arguments),this.type="raster"}get canUseWebGLForProcessing(){const{loaded:e,symbolizer:t}=this.layer;if(!e||!t)return!1;const r=t.lookup.colormapLut?.indexedColormap,s=r&&r.length>this._maxIndexedColormapSize,i=n(this.layer.serviceRasterInfo);return!(has("ios")&&i>4)&&this.useWebGLForProcessing&&t.canRenderInWebGL&&!s&&!("majority"===this.layer.interpolation&&u(this.layer))}attach(){super.attach(),this.container=new c(this._tileInfoView),this.container.isCustomTilingScheme=this._isCustomTilingScheme,this.updateRasterFunctionParameters()}detach(){super.detach(),this.container.removeAllChildren(),this.container=null}fetchTile(e,t){return this.layer.fetchTile(e.level,e.row,e.col,t)}updateRasterFunctionParameters(){const{raster:e,type:t}=this.layer,{container:r}=this;if("Function"!==e.datasetFormat||"wcs"===t)return r.rasterFunctionChain=null,r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!0,t.processed=!1,t.projected&&(t.invalidateTexture(),t.rasterTexture=null))}),void(this._rasterFunctionState="na");const s=this._rasterFunctionState,{rasterFunction:i,primaryRasters:o}=e,n=i.supportsGPU&&(!o||o.rasters.length<=1),a=n?i.flatWebGLFunctionChain:null,{renderer:l}=this.layer,c=!n||!a?.functions.length||"raster-stretch"===l?.type&&l.dynamicRangeAdjustment||!this.canUseWebGLForProcessing;r.rasterFunctionChain=c?null:this._addProjection(a);const p=null==i?"na":r.rasterFunctionChain?"gpu":"cpu",u=s===p||"na"===s&&"cpu"===p&&0===a?.functions?.length;r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!u,t.processed=!1,t.processedTexture=null)}),this._rasterFunctionState=p}async updateTileSource(e,t){const r=this._getBandIds(),s=this._getLayerInterpolation(),{canUseWebGLForProcessing:i}=this,{source:n,globalSymbolizerParams:l,suspended:c,coords:p,resolution:u}=t,h=this.layerView.hasTilingEffects?l:t.symbolizerParams,{bitmap:d}=e;if([d.x,d.y]=p,d.resolution=u,null!=n?.pixelBlock){const e={extent:n.extent,pixelBlock:n.pixelBlock,srcPixelSize:n.srcTilePixelSize};if(d.rawPixelData=e,i)d.source=n.pixelBlock,d.isRendereredSource=!1;else{const t=await this.layer.applyRenderer(e,"stretch"===l?.type?l:void 0);d.source=t,d.isRendereredSource=!0}d.symbolizerParameters=i?h:null,d.transformGrid=i?n.transformGrid:null}else{const e=this.createEmptyTilePixelBlock();d.source=e,d.symbolizerParameters=i?h:null,d.transformGrid=null}const{isBsqTile:m}=this.layer.raster.rasterInfo.storageInfo;d.bandIds=i&&!m?r:null,d.width=this._tileInfoView.tileInfo.size[0],d.height=this._tileInfoView.tileInfo.size[1],d.interpolation=s,d.suspended=c;const{raster:f}=this.layer;if(o(f)){const t=f.getClippingGeometry(this.layerView.view.spatialReference);if(t){const r=f.getTileExtentFromTileInfo(e.key.level,e.key.row,e.key.col,this._tileInfoView.tileInfo);d.mask=a({srcExtent:r,geometry:t,size:[d.width,d.height]})}}d.invalidateTexture()}async updateTileSymbolizerParameters(e,t){const{local:r,global:s}=t,i=this._getBandIds(),o=this._getLayerInterpolation(),{canUseWebGLForProcessing:n}=this,{bitmap:a}=e,{rawPixelData:l}=a;n||null==l?(a.isRendereredSource&&null!=l&&(a.source=l.pixelBlock),a.isRendereredSource=!1):(a.source=await this.layer.applyRenderer(l,"stretch"===s?.type?s:void 0),a.isRendereredSource=!0),a.symbolizerParameters=n?this.layerView.hasTilingEffects?s:r:null;const{isBsqTile:c}=this.layer.raster.rasterInfo.storageInfo;a.bandIds=n&&!c?i:null,a.interpolation=o,a.suspended=!1}updateHighlightOptions(e){if(!e.length)return void(this.container.pixelHighlights=void 0);const s=[],{highlights:i}=this.layerView.view;e.sort((e,t)=>i.findIndex(({name:e})=>e===d(t.options))-i.findIndex(({name:t})=>t===d(e.options)));for(const{target:o,options:n}of e){const{pixelRanges:e}=o,a=Array.from({length:2*l},()=>0);for(let t=0;t<e.length;t++)a[2*t]=e[t][0],a[2*t+1]=e[t][1];for(let t=e.length;t<l;t++)a[2*t]=r,a[2*t+1]=-r;const c=o.bandId??0,p=d(n),u=i.find(e=>e.name===p)?.color??h,m=t.toUnitRGBA(u);s.push({ranges:a,bandId:c,color:m})}this.container.pixelHighlights=s}_getLayerInterpolation(){const{interpolation:e,renderer:t}=this.layer;if(!t)return e;const r=t.type;return"raster-colormap"===r||"unique-value"===r?"nearest":"raster-stretch"===t.type&&null!=t.colorRamp?"bilinear"===e||"cubic"===e?"bilinear":"nearest":e}_addProjection(e){return e?.functions?.length&&!e.hasFocalFunction&&e.functions.unshift({name:"Reproject",parameters:{targetImageSize:this._tileInfoView.tileInfo.size,requireNNEdge:e.isSourceSingleBand},pixelType:"f32",id:0,isNoopProcess:!1}),e}};e([s()],m.prototype,"canUseWebGLForProcessing",null),e([s()],m.prototype,"container",void 0),e([s()],m.prototype,"layer",void 0),e([s()],m.prototype,"type",void 0),m=e([i("esri.views.2d.layers.imagery.ImageryTileView2D")],m);export{m as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Color.js";import has from"../../../../core/has.js";import{numberMaxFloat32 as r}from"../../../../core/mathUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{isFunctionRaster as o}from"../../../../layers/support/rasterDatasets/datasetUtils.js";import{getBytesPerPixel as n}from"../../../../layers/support/rasterFormats/pixelRangeUtils.js";import{convertGeometryToMask as a}from"../../../../layers/support/rasterFunctions/clipUtils.js";import{maxMapSizeGpu as l}from"../../../../layers/support/rasterFunctions/pixelUtils.js";import{RasterTileContainer as c}from"../../engine/imagery/RasterTileContainer.js";import{BaseImageryTileSubView2D as p}from"./BaseImageryTileSubView2D.js";import{canUseMajorityInterpolationOnDataSource as u}from"../support/util.js";import{defaultColor as h}from"../../../support/HighlightDefaults.js";import{getHighlightName as d}from"../../../support/highlightOptionsUtils.js";let m=class extends p{constructor(){super(...arguments),this.type="raster"}get canUseWebGLForProcessing(){const{loaded:e,symbolizer:t}=this.layer;if(!e||!t)return!1;const r=t.lookup.colormapLut?.indexedColormap,s=r&&r.length>this._maxIndexedColormapSize,i=n(this.layer.serviceRasterInfo);return!(has("ios")&&i>4)&&this.useWebGLForProcessing&&t.canRenderInWebGL&&!s&&!("majority"===this.layer.interpolation&&u(this.layer))}attach(){super.attach(),this.container=new c(this._tileInfoView),this.container.isCustomTilingScheme=this._isCustomTilingScheme,this.updateRasterFunctionParameters()}detach(){super.detach(),this.container.removeAllChildren(),this.container=null}fetchTile(e,t){return this.layer.fetchTile(e.level,e.row,e.col,t)}updateRasterFunctionParameters(){const{raster:e,type:t}=this.layer,{container:r}=this;if("Function"!==e.datasetFormat||"wcs"===t)return r.rasterFunctionChain=null,r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!0,t.processed=!1,t.projected&&(t.invalidateTexture(),t.rasterTexture=null))}),void(this._rasterFunctionState="na");const s=this._rasterFunctionState,{rasterFunction:i,primaryRasters:o}=e,n=i.supportsGPU&&(!o||o.rasters.length<=1),a=n?i.flatWebGLFunctionChain:null,{renderer:l}=this.layer,c=!n||!a?.functions.length||"raster-stretch"===l?.type&&l.dynamicRangeAdjustment||!this.canUseWebGLForProcessing;r.rasterFunctionChain=c?null:this._addProjection(a);const p=null==i?"na":r.rasterFunctionChain?"gpu":"cpu",u=s===p||"na"===s&&"cpu"===p&&0===a?.functions?.length;r.children.forEach(e=>{const{bitmap:t}=e;t&&(t.suspended=!u,t.processed=!1,t.processedTexture=null)}),this._rasterFunctionState=p}async updateTileSource(e,t){const r=this._getBandIds(),s=this._getLayerInterpolation(),{canUseWebGLForProcessing:i}=this,{source:n,globalSymbolizerParams:l,suspended:c,coords:p,resolution:u}=t,h=this.isCPUBasedDRA?l:t.symbolizerParams,{bitmap:d}=e;if([d.x,d.y]=p,d.resolution=u,null!=n?.pixelBlock){const e={extent:n.extent,pixelBlock:n.pixelBlock,srcPixelSize:n.srcTilePixelSize};if(d.rawPixelData=e,i)d.source=n.pixelBlock,d.isRendereredSource=!1;else{const t=await this.layer.applyRenderer(e,"stretch"===l?.type?l:void 0);d.source=t,d.isRendereredSource=!0}d.symbolizerParameters=i?h:null,d.transformGrid=i?n.transformGrid:null}else{const e=this.createEmptyTilePixelBlock();d.source=e,d.symbolizerParameters=i?h:null,d.transformGrid=null}const{isBsqTile:m}=this.layer.raster.rasterInfo.storageInfo;d.bandIds=i&&!m?r:null,d.width=this._tileInfoView.tileInfo.size[0],d.height=this._tileInfoView.tileInfo.size[1],d.interpolation=s,d.suspended=c;const{raster:f}=this.layer;if(o(f)){const t=f.getClippingGeometry(this.layerView.view.spatialReference);if(t){const r=f.getTileExtentFromTileInfo(e.key.level,e.key.row,e.key.col,this._tileInfoView.tileInfo);d.mask=a({srcExtent:r,geometry:t,size:[d.width,d.height]})}}d.invalidateTexture()}async updateTileSymbolizerParameters(e,t){const{local:r,global:s}=t,i=this._getBandIds(),o=this._getLayerInterpolation(),{canUseWebGLForProcessing:n}=this,{bitmap:a}=e,{rawPixelData:l}=a;n||null==l?(a.isRendereredSource&&null!=l&&(a.source=l.pixelBlock),a.isRendereredSource=!1):(a.source=await this.layer.applyRenderer(l,"stretch"===s?.type?s:void 0),a.isRendereredSource=!0),a.symbolizerParameters=n?this.layerView.hasTilingEffects?s:r:null;const{isBsqTile:c}=this.layer.raster.rasterInfo.storageInfo;a.bandIds=n&&!c?i:null,a.interpolation=o,a.suspended=!1}updateHighlightOptions(e){if(!e.length)return void(this.container.pixelHighlights=void 0);const s=[],{highlights:i}=this.layerView.view;e.sort((e,t)=>i.findIndex(({name:e})=>e===d(t.options))-i.findIndex(({name:t})=>t===d(e.options)));for(const{target:o,options:n}of e){const{pixelRanges:e}=o,a=Array.from({length:2*l},()=>0);for(let t=0;t<e.length;t++)a[2*t]=e[t][0],a[2*t+1]=e[t][1];for(let t=e.length;t<l;t++)a[2*t]=r,a[2*t+1]=-r;const c=o.bandId??0,p=d(n),u=i.find(e=>e.name===p)?.color??h,m=t.toUnitRGBA(u);s.push({ranges:a,bandId:c,color:m})}this.container.pixelHighlights=s}_getLayerInterpolation(){const{interpolation:e,renderer:t}=this.layer;if(!t)return e;const r=t.type;return"raster-colormap"===r||"unique-value"===r?"nearest":"raster-stretch"===t.type&&null!=t.colorRamp?"bilinear"===e||"cubic"===e?"bilinear":"nearest":e}_addProjection(e){return e?.functions?.length&&!e.hasFocalFunction&&e.functions.unshift({name:"Reproject",parameters:{targetImageSize:this._tileInfoView.tileInfo.size,requireNNEdge:e.isSourceSingleBand},pixelType:"f32",id:0,isNoopProcess:!1}),e}};e([s()],m.prototype,"canUseWebGLForProcessing",null),e([s()],m.prototype,"container",void 0),e([s()],m.prototype,"layer",void 0),e([s()],m.prototype,"type",void 0),m=e([i("esri.views.2d.layers.imagery.ImageryTileView2D")],m);export{m as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import i from"../../../../Viewpoint.js";import o from"../../../../core/Accessor.js";import{when as e}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as m}from"../../../../core/screenUtils.js";import{Seconds as s,secondsFromMilliseconds as n}from"../../../../core/time.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{g as p}from"../../../../chunks/vec32.js";import{create as c,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import u from"../../../../geometry/Point.js";import{translateBy as d}from"../../viewpointUtils.js";import{PanPlanarMomentumEstimator as v}from"../../../navigation/PanPlanarMomentumEstimator.js";let l=class extends o{constructor(t){super(t),this.animationTime=s(0),this.momentumEstimator=new v(500,6,.92),this.momentum=null,this.tmpMomentum=c(),this.momentumFinished=!1,this.viewpoint=new i({targetGeometry:new u,scale:0,rotation:0}),this._previousDrag=null,this.addHandles(e(()=>this.momentumFinished,()=>this.navigation.stop()))}begin(t,i){this.navigation.begin(),this.momentumEstimator.reset(),this.addToEstimator(i),this._previousDrag=i}update(t,i){this.addToEstimator(i);let o=i.center.x,e=i.center.y;const m=this._previousDrag;o=m?m.center.x-o:-o,e=m?e-m.center.y:e,t.viewpoint=d(this.viewpoint,t.viewpoint,[o||0,e||0]),this._previousDrag=i}end(t,i){this.addToEstimator(i);const o=t.navigation.effectiveMomentumEnabled;this.momentum=o?this.momentumEstimator.evaluateMomentum():null,this.animationTime=s(0),this.momentum&&this.onAnimationUpdate(t),this._previousDrag=null,this.navigation.end()}addToEstimator(t){const i=t.center.x,o=t.center.y,e=m(-i,o),s=h(-i,o,0);this.momentumEstimator.add(e,s,.001*t.timestamp)}onAnimationUpdate(t){this.navigation.animationManager?.animateContinuous(t.viewpoint,(i,o)=>{const{momentum:e,animationTime:m,tmpMomentum:r}=this,a=this.momentumFinished=!e||e.isFinished(m),c=n(o);if(!a){const o=e.valueDelta(m,c);p(r,e.direction,o),d(i,i,r),t.constraints.constrainByGeometry(i)}this.animationTime=s(this.animationTime+c)})}stopMomentumNavigation(){this.momentum&&(this.momentumEstimator.reset(),this.momentum=null,this.navigation.stop())}};t([r()],l.prototype,"momentumFinished",void 0),t([r()],l.prototype,"viewpoint",void 0),t([r()],l.prototype,"navigation",void 0),l=t([a("esri.views.2d.navigation.actions.Pan")],l);export{l as default};
5
+ import{__decorate as t}from"tslib";import i from"../../../../Viewpoint.js";import{prefersReducedMotion as o}from"../../../../core/a11yUtils.js";import e from"../../../../core/Accessor.js";import{when as m}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as s}from"../../../../core/screenUtils.js";import{Seconds as n,secondsFromMilliseconds as r}from"../../../../core/time.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import{g as c}from"../../../../chunks/vec32.js";import{create as h,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../../../../geometry/Point.js";import{translateBy as v}from"../../viewpointUtils.js";import{PanPlanarMomentumEstimator as l}from"../../../navigation/PanPlanarMomentumEstimator.js";let g=class extends e{constructor(t){super(t),this.animationTime=n(0),this.momentumEstimator=new l(500,6,.92),this.momentum=null,this.tmpMomentum=h(),this.momentumFinished=!1,this.viewpoint=new i({targetGeometry:new d,scale:0,rotation:0}),this._previousDrag=null,this.addHandles(m(()=>this.momentumFinished,()=>this.navigation.stop()))}begin(t,i){this.navigation.begin(),this.momentumEstimator.reset(),this.addToEstimator(i),this._previousDrag=i}update(t,i){this.addToEstimator(i);let o=i.center.x,e=i.center.y;const m=this._previousDrag;o=m?m.center.x-o:-o,e=m?e-m.center.y:e,t.viewpoint=v(this.viewpoint,t.viewpoint,[o||0,e||0]),this._previousDrag=i}end(t,i){this.addToEstimator(i);const e=t.navigation.momentumEnabled&&!o();this.momentum=e?this.momentumEstimator.evaluateMomentum():null,this.animationTime=n(0),this.momentum&&this.onAnimationUpdate(t),this._previousDrag=null,this.navigation.end()}addToEstimator(t){const i=t.center.x,o=t.center.y,e=s(-i,o),m=u(-i,o,0);this.momentumEstimator.add(e,m,.001*t.timestamp)}onAnimationUpdate(t){this.navigation.animationManager?.animateContinuous(t.viewpoint,(i,o)=>{const{momentum:e,animationTime:m,tmpMomentum:s}=this,a=this.momentumFinished=!e||e.isFinished(m),p=r(o);if(!a){const o=e.valueDelta(m,p);c(s,e.direction,o),v(i,i,s),t.constraints.constrainByGeometry(i)}this.animationTime=n(this.animationTime+p)})}stopMomentumNavigation(){this.momentum&&(this.momentumEstimator.reset(),this.momentum=null,this.navigation.stop())}};t([a()],g.prototype,"momentumFinished",void 0),t([a()],g.prototype,"viewpoint",void 0),t([a()],g.prototype,"navigation",void 0),g=t([p("esri.views.2d.navigation.actions.Pan")],g);export{g as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import t from"../../../../core/Accessor.js";import{createTask as e}from"../../../../core/asyncUtils.js";import{destroyHandle as s,handlesGroup as o}from"../../../../core/handleUtils.js";import{abortMaybe as r,removeMaybe as l}from"../../../../core/maybe.js";import{throwIfAborted as a}from"../../../../core/promiseUtils.js";import{watch as h}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{getGraphicEffectiveElevationInfo as m}from"../../../../support/elevationInfoUtils.js";import{Settings as p}from"../../interactive/editingTools/settings.js";import{OutlineVisualElement as g}from"../../interactive/visualElements/OutlineVisualElement.js";import{GraphicState as u}from"../../layers/graphics/GraphicState.js";import{getInputGeometry as d,isValidInputPath as v}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{connectVisualization as f}from"../../../analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js";import{highlightsSupported as y}from"../../../support/layerViewUtils.js";let _=class extends t{constructor(i){super(i),this._highlightTask=null,this._highlightHandle=null,this._visualElementHandle=null}initialize(){this._settings=new p({getTheme:()=>this.view.effectiveTheme}),this.addHandles(f({analysisViewData:this.analysisViewData,onRemove:()=>this._remove(),onShowSketchedGraphic:i=>this._showSketchedGraphic(i),onHighlight:(i,t)=>this._highlight(i,t)}))}destroy(){this._remove()}get updating(){return null!=this._highlightTask&&!this._highlightTask.finished}_remove(){this._highlightTask=r(this._highlightTask),this._highlightHandle=l(this._highlightHandle),this._visualElementHandle=l(this._visualElementHandle)}_highlight(i,t){this._remove(),t&&"building-component"!==t.type&&"subtype-sublayer"!==t.type&&(this._highlightTask=e(async e=>{const s=await this.view.whenLayerView(t);a(e),y(s)&&(this._highlightHandle=s.highlight(i))}))}_showSketchedGraphic(i){this._remove();const{view:t}=this,e=new g({view:t,geometry:j(i),attached:!1,elevationInfo:m(i),renderOccluded:8,isDecoration:!0}),r=new u({graphic:i}),l=[h(()=>r.isDraped,i=>{e.isDraped=i}),r.on("changed",()=>e.geometry=j(i)),t.trackGraphicState(r),t.maskOccludee(i),s(e)];this._settings.visualElements.lineObjects.outline.apply(e),e.attached=!0,this._visualElementHandle=o(l)}};function j(i){const t=d(i);return v(t)?t:null}i([n({constructOnly:!0})],_.prototype,"view",void 0),i([n({constructOnly:!0})],_.prototype,"analysisViewData",void 0),i([n()],_.prototype,"updating",null),_=i([c("esri.views.3d.analysis.ElevationProfile.ElevationProfileInputVisualization3D")],_);export{_ as ElevationProfileInputVisualization3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{destroyHandle as i,handlesGroup as o}from"../../../../core/handleUtils.js";import{removeMaybe as s}from"../../../../core/maybe.js";import{watch as r}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{getGraphicEffectiveElevationInfo as l}from"../../../../support/elevationInfoUtils.js";import{Settings as c}from"../../interactive/editingTools/settings.js";import{OutlineVisualElement as m}from"../../interactive/visualElements/OutlineVisualElement.js";import{GraphicState as p}from"../../layers/graphics/GraphicState.js";import{isValidInputPath as h}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{connectVisualization as d}from"../../../analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js";let u=class extends t{constructor(e){super(e),this._visualElementHandle=null}initialize(){this._settings=new c({getTheme:()=>this.view.effectiveTheme}),this.addHandles(d({analysisViewData:this.analysisViewData,onRemove:()=>this._remove(),onShowSketchedGraphic:e=>this._showSketchedGraphic(e)}))}destroy(){this._remove()}get updating(){return!1}_remove(){this._visualElementHandle=s(this._visualElementHandle)}_showSketchedGraphic(e){this._remove();const{view:t}=this,s=new m({view:t,geometry:v(e),attached:!1,elevationInfo:l(e),renderOccluded:8,isDecoration:!0}),a=new p({graphic:e}),n=[r(()=>a.isDraped,e=>{s.isDraped=e}),a.on("changed",()=>s.geometry=v(e)),t.trackGraphicState(a),t.maskOccludee(e),i(s)];this._settings.visualElements.lineObjects.outline.apply(s),s.attached=!0,this._visualElementHandle=o(n)}};function v({geometry:e}){return h(e)?e:null}e([a({constructOnly:!0})],u.prototype,"view",void 0),e([a({constructOnly:!0})],u.prototype,"analysisViewData",void 0),e([a()],u.prototype,"updating",null),u=e([n("esri.views.3d.analysis.ElevationProfile.ElevationProfileInputVisualization3D")],u);export{u as ElevationProfileInputVisualization3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{isIterable as t}from"../../../../core/iteratorUtils.js";import{memoize as r}from"../../../../core/memoize.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as o}from"../../../../core/unitUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as l}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as c}from"../../../../geometry/ellipsoidUtils.js";import{create as p,fromPoints as u}from"../../../../geometry/support/ray.js";import{GeometryDescriptor as m}from"../../../../layers/support/GeometryDescriptor.js";import{externalToInternalIntersectOptions as d}from"../../support/hitTest.js";import{Intersector as y}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as f}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{getInputGraphic as h}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{ElevationProfileLineComputation as v}from"../../../analysis/ElevationProfile/ElevationProfileLineComputation.js";const _=2e5;let w=class extends v{constructor(){super(...arguments),this.type="scene",this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependenciesMemoized=r((e,t,r,i,o,n,s)=>({inputGraphicUid:j(e),visibleLayers:t,maxIntersectionDistance:r,intersectOptions:i,view:o,stationary:n,spatialReference:s})),this._vecA=a(),this._vecB=a(),this._ray=p()}get minDemResolution(){const e=this._view;if(!e)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*o(e.spatialReference)}initialize(){const e=()=>this.onInvalidate(this);return this.addHandles([i(()=>this._queryElevationDependencies,e),this.controller.onElevationChange(e)])}async queryElevation(e,{noDataValue:t,signal:r}){const i=this._queryElevationDependencies;if(null==i)throw new Error(`${this.declaredClass}: no dependencies`);const o=this._intersector;if(null==o)throw new Error(`${this.declaredClass}: no view`);const{intersectOptions:n,view:s,spatialReference:a}=i,c=s.renderCoordsHelper,p=s.sceneIntersectionHelper,d=this._vecA,y=this._vecA,f=this._vecB,h=this._ray;if(!a)return{geometry:e,noDataValue:t};const v=await m.fromGeometry(e).project(a,r);if(!v)return{geometry:e,noDataValue:t};const w=v.coordinates,j=w.length;for(let m=0;m<j;++m){const e=w[m];l(f,e.x,e.y,e.z??0),c.toRenderCoords(f,a,f),c.setAltitude(d,_,f);const r=u(d,f,h);p.computeIntersection(r,o,!0,n);const s=g(i,o.results.all);s?(s.getIntersectionPoint(y),c.fromRenderCoords(y,y,a),e.z=y[2]):e.z=t}return{geometry:v.export(),noDataValue:t}}get _queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependenciesMemoized(this.controller?.analysis.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){const e=this._view;if(!e||e.destroyed)return{};const{include:r,exclude:i}=this.profileLine;return d(e,{include:r,exclude:[...this._pointCloudLayers,...t(i)?i:i?[i]:[]]})}get _pointCloudLayers(){const e=this._view;return e?e.allLayerViews.toArray().filter(e=>"point-cloud"===e.layer?.type).map(e=>e.layer):[]}get _view(){const e=this.controller.view;return"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?c(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(!e)return null;const t=new y(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=2,t}};function g({view:e,inputGraphicUid:t,maxIntersectionDistance:r},i){for(const o of i){if(!o.withinDistance(r))continue;const i=f(o,e);if(null==i||j(i)!==t)return o}return null}function j(e){const t=h(e);if(!t)return null;if(t.layer&&"objectIdField"in t.layer){const e=t.attributes[t.layer.objectIdField];if(e)return`o-${t.layer.id}-${e}`}return`u-${t.uid}`}e([n({readOnly:!0})],w.prototype,"minDemResolution",null),e([n()],w.prototype,"_queryElevationDependencies",null),e([n()],w.prototype,"_visibleLayers",null),e([n()],w.prototype,"_intersectOptions",null),e([n()],w.prototype,"_pointCloudLayers",null),e([n()],w.prototype,"_view",null),e([n()],w.prototype,"_maxIntersectionDistance",null),e([n()],w.prototype,"_intersector",null),w=e([s("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineSceneComputation")],w);export{w as ElevationProfileLineSceneComputation};
5
+ import{__decorate as e}from"tslib";import{isIterable as t}from"../../../../core/iteratorUtils.js";import{memoize as r}from"../../../../core/memoize.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as i}from"../../../../core/unitUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as l}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as c}from"../../../../geometry/ellipsoidUtils.js";import{create as p,fromPoints as u}from"../../../../geometry/support/ray.js";import{GeometryDescriptor as m}from"../../../../layers/support/GeometryDescriptor.js";import{externalToInternalIntersectOptions as y}from"../../support/hitTest.js";import{Intersector as d}from"../../webgl-engine/lib/Intersector.js";import{ElevationProfileLineComputation as f}from"../../../analysis/ElevationProfile/ElevationProfileLineComputation.js";const h=2e5;let v=class extends f{constructor(){super(...arguments),this.type="scene",this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependenciesMemoized=r((e,t,r,o,i,s,n)=>({geometry:e,visibleLayers:t,maxIntersectionDistance:r,intersectOptions:o,view:i,stationary:s,spatialReference:n})),this._vecA=a(),this._vecB=a(),this._ray=p()}get minDemResolution(){const e=this._view;if(!e)return null;const t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return null==t?null:t*i(e.spatialReference)}initialize(){const e=()=>this.onInvalidate(this);return this.addHandles([o(()=>this._queryElevationDependencies,e),this.controller.onElevationChange(e)])}async queryElevation(e,{noDataValue:t,signal:r}){const o=this._queryElevationDependencies;if(null==o)throw new Error(`${this.declaredClass}: no dependencies`);const i=this._intersector;if(null==i)throw new Error(`${this.declaredClass}: no view`);const{intersectOptions:s,view:n,spatialReference:a}=o,c=n.renderCoordsHelper,p=n.sceneIntersectionHelper,y=this._vecA,d=this._vecA,f=this._vecB,v=this._ray;if(!a)return{geometry:e,noDataValue:t};const g=await m.fromGeometry(e).project(a,r);if(!g)return{geometry:e,noDataValue:t};const w=g.coordinates,D=w.length;for(let m=0;m<D;++m){const e=w[m];l(f,e.x,e.y,e.z??0),c.toRenderCoords(f,a,f),c.setAltitude(y,h,f);const r=u(y,f,v);p.computeIntersection(r,i,!0,s);const n=_(o,i.results.all);n?(n.getIntersectionPoint(d),c.fromRenderCoords(d,d,a),e.z=d[2]):e.z=t}return{geometry:g.export(),noDataValue:t}}get _queryElevationDependencies(){const e=this._view;return e?this._getQueryElevationDependenciesMemoized(this.controller?.analysis.geometry,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){const e=this._view;if(!e||e.destroyed)return{};const{include:r,exclude:o}=this.profile;return y(e,{include:r,exclude:[...this._pointCloudLayers,...t(o)?o:o?[o]:[]]})}get _pointCloudLayers(){const e=this._view;return e?e.allLayerViews.toArray().filter(e=>"point-cloud"===e.layer?.type).map(e=>e.layer):[]}get _view(){const e=this.controller.view;return"3d"===e.type?e:null}get _maxIntersectionDistance(){const e=this._view;return e?.renderCoordsHelper?c(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY}get _intersector(){const e=this._view;if(!e)return null;const t=new d(e.state.viewingMode),r=t.options;return r.hud=!1,r.invisibleTerrain=!1,r.backfacesTerrain=!1,r.selectionMode=!1,r.store=2,t}};function _({maxIntersectionDistance:e},t){for(const r of t)if(r.withinDistance(e))return r;return null}e([s({readOnly:!0})],v.prototype,"minDemResolution",null),e([s()],v.prototype,"_queryElevationDependencies",null),e([s()],v.prototype,"_visibleLayers",null),e([s()],v.prototype,"_intersectOptions",null),e([s()],v.prototype,"_pointCloudLayers",null),e([s()],v.prototype,"_view",null),e([s()],v.prototype,"_maxIntersectionDistance",null),e([s()],v.prototype,"_intersector",null),v=e([n("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineSceneComputation")],v);export{v as ElevationProfileLineSceneComputation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import{watch as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{throttle as r}from"../../../../core/throttle.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as n,fromArray as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{OutlineVisualElement as m}from"../../interactive/visualElements/OutlineVisualElement.js";import{getConfig as u}from"../../../analysis/ElevationProfile/constants.js";import{getInputGeometry as c}from"../../../analysis/ElevationProfile/elevationProfileGeometryUtils.js";import{createLineGeometry as f}from"../../../analysis/ElevationProfile/elevationProfileVisualizationUtils.js";let v=class extends i{constructor(e){super(e),this._updateGeometryThrottled=r(e=>{e&&(this._visualElement.visible=!0,this._visualElement.geometry=f(e.samples,e.spatialReference))},u().profileLinesUpdateThrottleMillis)}initialize(){this._visualElement=new m({view:this.view,elevationInfo:{mode:"absolute-height",offset:0},innerWidth:0,innerColor:n(0,0,0,0),width:3,falloff:0,renderOccluded:16,isDecoration:!0}),this.addHandles([s(()=>({color:this.getResult()?.computation.profileLine.color,visible:this._effectiveVisible}),({color:e,visible:i})=>{e&&(this._visualElement.color=p(t.toUnitRGBA(e))),this._visualElement.visible=i,i||(this._visualElement.geometry=null)},o),s(()=>c(this.analysisViewData.analysis.input),()=>{this._visualElement.visible=!1,this._visualElement.geometry=null},o),s(()=>this._geometryUpdateParameters,e=>this._updateGeometryThrottled(e),o),this._updateGeometryThrottled])}destroy(){this._visualElement.destroy()}get updating(){return this._updateGeometryThrottled.hasPendingUpdates()}get _result(){return this.getResult()}get _effectiveVisible(){const{analysisViewData:e,_result:t}=this;return e.visible&&null!=t&&t.available&&t.computation.profileLine.viewOptions.lineVisible}get _geometryUpdateParameters(){if(!this._effectiveVisible)return null;const e=this._result;return 1!==e?.progress?null:{samples:e.samples,spatialReference:this.view.spatialReference}}};e([l()],v.prototype,"view",void 0),e([l()],v.prototype,"analysisViewData",void 0),e([l()],v.prototype,"getResult",void 0),e([l()],v.prototype,"updating",null),e([l()],v.prototype,"_result",null),e([l()],v.prototype,"_effectiveVisible",null),e([l()],v.prototype,"_geometryUpdateParameters",null),v=e([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineVisualization3D")],v);export{v as ElevationProfileLineVisualization3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import{watch as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{throttle as r}from"../../../../core/throttle.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as n,fromArray as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{OutlineVisualElement as m}from"../../interactive/visualElements/OutlineVisualElement.js";import{getConfig as u}from"../../../analysis/ElevationProfile/constants.js";import{createLineGeometry as c}from"../../../analysis/ElevationProfile/elevationProfileVisualizationUtils.js";let f=class extends i{constructor(e){super(e),this._updateGeometryThrottled=r(e=>{e&&(this._visualElement.visible=!0,this._visualElement.geometry=c(e.samples,e.spatialReference))},u().profileLinesUpdateThrottleMillis)}initialize(){this._visualElement=new m({view:this.view,elevationInfo:{mode:"absolute-height",offset:0},innerWidth:0,innerColor:n(0,0,0,0),width:3,falloff:0,renderOccluded:16,isDecoration:!0}),this.addHandles([s(()=>({color:this.getResult()?.computation.profile.color,visible:this._effectiveVisible}),({color:e,visible:i})=>{e&&(this._visualElement.color=p(t.toUnitRGBA(e))),this._visualElement.visible=i,i||(this._visualElement.geometry=null)},o),s(()=>this.analysisViewData.analysis.geometry,()=>{this._visualElement.visible=!1,this._visualElement.geometry=null},o),s(()=>this._geometryUpdateParameters,e=>this._updateGeometryThrottled(e),o),this._updateGeometryThrottled])}destroy(){this._visualElement.destroy()}get updating(){return this._updateGeometryThrottled.hasPendingUpdates()}get _result(){return this.getResult()}get _effectiveVisible(){const{analysisViewData:e,_result:t}=this;return e.visible&&null!=t&&t.available&&t.computation.profile.viewOptions.lineVisible}get _geometryUpdateParameters(){if(!this._effectiveVisible)return null;const e=this._result;return 1!==e?.progress?null:{samples:e.samples,spatialReference:this.view.spatialReference}}};e([l()],f.prototype,"view",void 0),e([l()],f.prototype,"analysisViewData",void 0),e([l()],f.prototype,"getResult",void 0),e([l()],f.prototype,"updating",null),e([l()],f.prototype,"_result",null),e([l()],f.prototype,"_effectiveVisible",null),e([l()],f.prototype,"_geometryUpdateParameters",null),f=e([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineVisualization3D")],f);export{f as ElevationProfileLineVisualization3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import o from"../../../../core/Accessor.js";import{mapCollection as t}from"../../../../core/mapCollectionUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{ElevationProfileInputVisualization3D as e}from"./ElevationProfileInputVisualization3D.js";import{ElevationProfileLineVisualization3D as r}from"./ElevationProfileLineVisualization3D.js";import{ElevationProfileHoveredPointsVisualization as n}from"../../../analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js";let l=class extends o{constructor(i){super(i)}initialize(){const{view:i,analysisViewData:o}=this;this._hoveredPointsVisualization=new n({view:i,analysisViewData:o}),this._inputVisualization=new e({view:i,analysisViewData:o}),this._lineVisualizations=t(()=>this.analysisViewData.analysis.profiles,t=>new r({view:i,analysisViewData:o,getResult:()=>o.results.find(i=>i.computation.profileLine===t)}))}destroy(){this._inputVisualization.destroy(),this._hoveredPointsVisualization.destroy(),this._lineVisualizations.destroy()}get updating(){return this._inputVisualization.updating||this._lineVisualizations.some(i=>i.updating)}};i([s()],l.prototype,"view",void 0),i([s()],l.prototype,"analysisViewData",void 0),i([s()],l.prototype,"updating",null),l=i([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileVisualization3D")],l);export{l as ElevationProfileVisualization3D};
5
+ import{__decorate as i}from"tslib";import o from"../../../../core/Accessor.js";import{mapCollection as t}from"../../../../core/mapCollectionUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{ElevationProfileInputVisualization3D as e}from"./ElevationProfileInputVisualization3D.js";import{ElevationProfileLineVisualization3D as r}from"./ElevationProfileLineVisualization3D.js";import{ElevationProfileHoveredPointsVisualization as n}from"../../../analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js";let l=class extends o{constructor(i){super(i)}initialize(){const{view:i,analysisViewData:o}=this;this._hoveredPointsVisualization=new n({view:i,analysisViewData:o}),this._inputVisualization=new e({view:i,analysisViewData:o}),this._lineVisualizations=t(()=>this.analysisViewData.analysis.profiles,t=>new r({view:i,analysisViewData:o,getResult:()=>o.results.find(i=>i.computation.profile===t)}))}destroy(){this._inputVisualization.destroy(),this._hoveredPointsVisualization.destroy(),this._lineVisualizations.destroy()}get updating(){return this._inputVisualization.updating||this._lineVisualizations.some(i=>i.updating)}};i([s()],l.prototype,"view",void 0),i([s()],l.prototype,"analysisViewData",void 0),i([s()],l.prototype,"updating",null),l=i([a("esri.views.3d.analysis.ElevationProfile.ElevationProfileVisualization3D")],l);export{l as ElevationProfileVisualization3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as r}from"./AnalysisView3D.js";import{ElevationProfileLineSceneComputation as i}from"./ElevationProfile/ElevationProfileLineSceneComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends r{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profileLine.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new i(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new c({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveUnits(){return this._controller?.effectiveUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get hoveredPoints(){return this._controller?.hoveredPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([e({readOnly:!0})],u.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([e({readOnly:!0})],u.prototype,"effectiveUnits",null),t([e({readOnly:!0})],u.prototype,"error",null),t([e()],u.prototype,"hoveredPosition",void 0),t([e()],u.prototype,"hoveredPoints",null),t([e({readOnly:!0})],u.prototype,"progress",null),t([e({readOnly:!0})],u.prototype,"results",null),t([e({readOnly:!0})],u.prototype,"statistics",null),t([e({readOnly:!0})],u.prototype,"updating",null),t([e()],u.prototype,"sketchGraphic",null),t([e()],u.prototype,"toolState",null),t([e()],u.prototype,"_controller",void 0),t([e()],u.prototype,"_visualization",void 0),t([e()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],u);const h=u;export{h as default};
5
+ import{__decorate as t}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as i}from"./AnalysisView3D.js";import{ElevationProfileLineSceneComputation as r}from"./ElevationProfile/ElevationProfileLineSceneComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends i{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new r(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new c({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get hoveredPoints(){return this._controller?.hoveredPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([e({readOnly:!0})],u.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([e({readOnly:!0})],u.prototype,"effectiveDisplayUnits",null),t([e({readOnly:!0})],u.prototype,"error",null),t([e()],u.prototype,"hoveredPosition",void 0),t([e()],u.prototype,"hoveredPoints",null),t([e({readOnly:!0})],u.prototype,"progress",null),t([e({readOnly:!0})],u.prototype,"results",null),t([e({readOnly:!0})],u.prototype,"statistics",null),t([e({readOnly:!0})],u.prototype,"updating",null),t([e()],u.prototype,"sketchGraphic",null),t([e()],u.prototype,"toolState",null),t([e()],u.prototype,"_controller",void 0),t([e()],u.prototype,"_visualization",void 0),t([e()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],u);const y=u;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Color.js";import"../../../../intl.js";import i from"../../../../core/Accessor.js";import{equals as s}from"../../../../core/arrayUtils.js";import{cyclicalPI as o}from"../../../../core/Cyclical.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{formatDecimal as l}from"../../../../core/quantityFormatUtils.js";import{watch as n,initial as a}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as c}from"../../../../core/unitUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{e as h}from"../../../../chunks/earcut.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as p,n as g,d as y,h as _,e as f}from"../../../../chunks/vec32.js";import{create as v,fromValues as j}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as L}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as b}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as C}from"../../../../geometry/support/Indices.js";import{angleAroundAxis as w}from"../../../../geometry/support/vector.js";import{t as G}from"../../../../chunks/vec3.js";import P from"../../../../symbols/support/ElevationInfo.js";import{cutFillConfiguration as V}from"./VolumeMeasurementConfiguration.js";import{LabelVisualElement as F}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as A}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as R}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as x}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as O}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as S}from"../../layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{geometryToRenderInfo as D}from"../../support/renderInfoUtils/polygon.js";import{CutFillColor as M,VolumeGeometry as U}from"../../webgl-engine/lib/CutFillColor.js";import{createStipplePatternSimple as E}from"../../webgl-engine/materials/lineStippleUtils.js";import{onLocaleChange as B}from"../../../../intl/locale.js";import{fetchMessageBundle as H}from"../../../../intl/messages.js";import{substitute as T}from"../../../../intl/substitute.js";let I=class extends i{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=O.fromElevationInfo(new P({mode:"absolute-height"})),this._extrusionHeight=1e4,this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=V,o={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new R({...o,isDraped:!0,color:t.toUnitRGBA(s.geometryOutlineColor)}),this._targetGeometry=new R(o);const r={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:!0},l={...r,stipplePattern:E(s.projectionLineStippleSize)},c=t.toUnitRGBA(s.cutProjectionLineColor),u=t.toUnitRGBA(s.fillProjectionLineColor);this._cutProjectionLines=new A({...r,color:c}),this._occludedCutProjectionLines=new A({...l,color:c}),this._fillProjectionLines=new A({...r,color:u}),this._occludedFillProjectionLines=new A({...l,color:u});const m={...i,attached:!0};this._cutVolumeLabel=new F(m),this._fillVolumeLabel=new F(m),this._cutFillRenderNode=new M({view:e,cutColor:s.cutColor,fillColor:s.fillColor}),this.addHandles([n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},a),n(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i},a),n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i)),n(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor}),({interactive:e,accentColor:t})=>{this._updateColors(e,t)},a),n(()=>this.analysisViewData.targetGeometry,()=>this._updateCutFillGeometry(),a),n(()=>this.visible,()=>this._updateCutFillVisibility()),n(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{labelAnchors:s.labelAnchors,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i}},e=>this._updateLabels(e)),n(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e)),B(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=r(this._elevationAlignedGeometry),this._targetGeometry=r(this._targetGeometry),this._cutProjectionLines=r(this._cutProjectionLines),this._occludedCutProjectionLines=r(this._occludedCutProjectionLines),this._fillProjectionLines=r(this._fillProjectionLines),this._occludedFillProjectionLines=r(this._occludedFillProjectionLines),this._cutVolumeLabel=r(this._cutVolumeLabel),this._fillVolumeLabel=r(this._fillVolumeLabel),this._cutFillRenderNode.destroy()}get _config(){return V}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:o}=this.view,r=[],l=e.spatialReference,n=e.rings[0],a=n.length>1&&s(n[0],n[n.length-1]),c=n.length-(a?1:0);for(let s=0;s<c;++s){const e=n[s],i=p(v(),e[0],e[1],e[2]);o.toRenderCoords(i,l,i);const a=t.rings[0][s],c=p(v(),a[0],a[1],a[2]);o.toRenderCoords(c,l,c);const u=new x(i,c);r.push(u)}e.isClockwise(n)||r.reverse();const u=[],m=[],h=[],d=[],g=[],y=this.view.state.camera;for(let s=0;s<r.length;++s){const i=r[s],o=r[0===s?r.length-1:s-1],l=r[s===r.length-1?0:s+1],n=e.rings[0][s],a=t.rings[0][s],c=n[2]>a[2],p=new k(i,o,l,c);u.push(p),p.updateOccluded(y);const _=p.isOccluded;c?(_?h:m).push(i):(_?g:d).push(i)}this._projectionLines=u,this._cutProjectionLines.setGeometryFromSegments(m),this._occludedCutProjectionLines.setGeometryFromSegments(h),this._fillProjectionLines.setGeometryFromSegments(d),this._occludedFillProjectionLines.setGeometryFromSegments(g)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,l=!1;for(const n of this._projectionLines){n.updateOccluded(e)&&(r||=n.isCut,l||=!n.isCut);const a=n.isOccluded;(n.isCut?a?i:t:a?o:s).push(n.segment)}l&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,i){const{geometryOutlineColor:s,cutProjectionLineColor:o,fillProjectionLineColor:r}=this._config;if(e){const e=t.toUnitRGBA(i);this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e}else{this._targetGeometry.color=t.toUnitRGBA(s);const e=t.toUnitRGBA(o);this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const i=t.toUnitRGBA(r);this._fillProjectionLines.color=i,this._occludedFillProjectionLines.color=i}}_updateLabels(e){const{labelDistance:t}=this._config,{effectiveDisplayUnits:i,labelAnchors:s,messages:o,unitsMessages:r,result:l,visible:n}=e;if(this._cutVolumeLabel.visible=n,this._fillVolumeLabel.visible=n,this._cutVolumeLabel.geometry=s.cut?{type:"point",point:s.cut,callout:{distance:t,offset:0}}:null,this._fillVolumeLabel.geometry=s.fill?{type:"point",point:s.fill,callout:{distance:-t,offset:0}}:null,null==l||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=i.volume,c=T(o.labels.cut,{volume:N(r,l.cutVolume,a)}),u=T(o.labels.fill,{volume:N(r,l.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(){this.visible?this._cutFillRenderNode.enable():this._cutFillRenderNode.disable()}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData;if(!t?.extent)return;const{center:i}=t.extent,s=j(i.x,i.y,0),o=v();e.toRenderCoords(s,t.spatialReference,o);const r=this._getExtrudedVolumes(t,this._extrusionHeight,s),l=this._getExtrudedVolumes(t,-this._extrusionHeight,s);this._cutFillRenderNode.updateGeometries(r,l,o)}_getExtrudedVolumes(e,t,i){const{renderCoordsHelper:s,spatialReference:o,elevationProvider:r}=this.view,l=v(),n=1===s.viewingMode;n||s.worldUpAtPosition([0,0,0],l);const a=D(e,r,s,this._elevationContext),{polygons:c,mapPositions:u,position:m}=a,p=c[0],g=p.count,y=h(p.mapPositions,p.holeIndices,3),_=y.length,f=6*g,j=C(f+_),w=C(_),P=b(3*f),V=b(3*f);S(m,u,y,p,P,null,V,null,j,w,t,l,n);const F=d(),A=d();return L(o,i,F,s.spatialReference),A[12]=-F[12],A[13]=-F[13],A[14]=-F[14],G(P,P,A),new U(P,w,j,V)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await H("esri/core/t9n/Units"),this.messages=await H("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function N(e,t,i){return e&&t&&l(e,t,c(t.value,t.unit,i))}e([u({constructOnly:!0})],I.prototype,"view",void 0),e([u({constructOnly:!0})],I.prototype,"analysis",void 0),e([u({constructOnly:!0})],I.prototype,"analysisViewData",void 0),e([u()],I.prototype,"unitsMessages",void 0),e([u()],I.prototype,"messages",void 0),e([u()],I.prototype,"loadingMessages",void 0),e([u({readOnly:!0})],I.prototype,"visible",null),e([u()],I.prototype,"updating",null),I=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],I);class k{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=v(),this._n2=v();const r=g(z,y(z,e.endRenderSpace,e.startRenderSpace));g(this._n1,_(this._n1,r,g(W,y(W,t.startRenderSpace,e.startRenderSpace)))),g(this._n2,_(this._n2,r,g(W,y(W,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=o.normalize(w(this._n1,this._n2,r))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){y(z,this.segment.startRenderSpace,e.eye);const t=f(this._n1,z)<0,i=f(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=v(),W=v();export{I as VolumeMeasurementCutFillVisualization};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Color.js";import"../../../../intl.js";import i from"../../../../core/Accessor.js";import{equals as s}from"../../../../core/arrayUtils.js";import{cyclicalPI as o}from"../../../../core/Cyclical.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{formatDecimal as l}from"../../../../core/quantityFormatUtils.js";import{watch as n,initial as a}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as c}from"../../../../core/unitUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{e as d}from"../../../../chunks/earcut.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as p,n as g,d as y,h as _,e as f}from"../../../../chunks/vec32.js";import{create as v,fromValues as j}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as b}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as L}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as C}from"../../../../geometry/support/Indices.js";import{angleAroundAxis as w}from"../../../../geometry/support/vector.js";import{t as G}from"../../../../chunks/vec3.js";import P from"../../../../symbols/support/ElevationInfo.js";import{cutFillConfiguration as V}from"./VolumeMeasurementConfiguration.js";import{LabelVisualElement as F}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as R}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as A}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as O}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as x}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as S}from"../../layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{geometryToRenderInfo as D}from"../../support/renderInfoUtils/polygon.js";import{CutFillColor as M,VolumeGeometry as U}from"../../webgl-engine/lib/CutFillColor.js";import{createStipplePatternSimple as E}from"../../webgl-engine/materials/lineStippleUtils.js";import{onLocaleChange as B}from"../../../../intl/locale.js";import{fetchMessageBundle as H}from"../../../../intl/messages.js";import{substitute as N}from"../../../../intl/substitute.js";let T=class extends i{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=x.fromElevationInfo(new P({mode:"absolute-height"})),this._extrusionHeight=1e4,this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=V,o={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new A({...o,isDraped:!0,color:t.toUnitRGBA(s.geometryOutlineColor)}),this._targetGeometry=new A(o);const r={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:!0},l={...r,stipplePattern:E(s.projectionLineStippleSize)},c=t.toUnitRGBA(s.cutProjectionLineColor),u=t.toUnitRGBA(s.fillProjectionLineColor);this._cutProjectionLines=new R({...r,color:c}),this._occludedCutProjectionLines=new R({...l,color:c}),this._fillProjectionLines=new R({...r,color:u}),this._occludedFillProjectionLines=new R({...l,color:u});const m={...i,attached:!0};this._cutVolumeLabel=new F(m),this._fillVolumeLabel=new F(m),this._cutFillRenderNode=new M({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},a),n(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i},a),n(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i)),n(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor}),({interactive:e,accentColor:t})=>{this._updateColors(e,t)},a),n(()=>this.analysisViewData.targetGeometry,()=>this._updateCutFillGeometry(),a),n(()=>this.visible,()=>this._updateCutFillVisibility()),n(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{labelAnchors:s.labelAnchors,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i}},e=>this._updateLabels(e)),n(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e)),B(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=r(this._elevationAlignedGeometry),this._targetGeometry=r(this._targetGeometry),this._cutProjectionLines=r(this._cutProjectionLines),this._occludedCutProjectionLines=r(this._occludedCutProjectionLines),this._fillProjectionLines=r(this._fillProjectionLines),this._occludedFillProjectionLines=r(this._occludedFillProjectionLines),this._cutVolumeLabel=r(this._cutVolumeLabel),this._fillVolumeLabel=r(this._fillVolumeLabel),this._cutFillRenderNode.destroy()}get _config(){return V}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:o}=this.view,r=[],l=e.spatialReference,n=e.rings[0],a=n.length>1&&s(n[0],n[n.length-1]),c=n.length-(a?1:0);for(let s=0;s<c;++s){const e=n[s],i=p(v(),e[0],e[1],e[2]);o.toRenderCoords(i,l,i);const a=t.rings[0][s],c=p(v(),a[0],a[1],a[2]);o.toRenderCoords(c,l,c);const u=new O(i,c);r.push(u)}e.isClockwise(n)||r.reverse();const u=[],m=[],d=[],h=[],g=[],y=this.view.state.camera;for(let s=0;s<r.length;++s){const i=r[s],o=r[0===s?r.length-1:s-1],l=r[s===r.length-1?0:s+1],n=e.rings[0][s],a=t.rings[0][s],c=n[2]>a[2],p=new k(i,o,l,c);u.push(p),p.updateOccluded(y);const _=p.isOccluded;c?(_?d:m).push(i):(_?g:h).push(i)}this._projectionLines=u,this._cutProjectionLines.setGeometryFromSegments(m),this._occludedCutProjectionLines.setGeometryFromSegments(d),this._fillProjectionLines.setGeometryFromSegments(h),this._occludedFillProjectionLines.setGeometryFromSegments(g)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,l=!1;for(const n of this._projectionLines){n.updateOccluded(e)&&(r||=n.isCut,l||=!n.isCut);const a=n.isOccluded;(n.isCut?a?i:t:a?o:s).push(n.segment)}l&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,i){const{geometryOutlineColor:s,cutProjectionLineColor:o,fillProjectionLineColor:r}=this._config;if(e){const e=t.toUnitRGBA(i);this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._cutFillRenderNode.borderColor=i}else{this._targetGeometry.color=t.toUnitRGBA(s);const e=t.toUnitRGBA(o);this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const i=t.toUnitRGBA(r);this._fillProjectionLines.color=i,this._occludedFillProjectionLines.color=i,this._cutFillRenderNode.borderColor=s}}_updateLabels(e){const{labelDistance:t}=this._config,{effectiveDisplayUnits:i,labelAnchors:s,messages:o,unitsMessages:r,result:l,visible:n}=e;if(this._cutVolumeLabel.visible=n,this._fillVolumeLabel.visible=n,this._cutVolumeLabel.geometry=s.cut?{type:"point",point:s.cut,callout:{distance:t,offset:0}}:null,this._fillVolumeLabel.geometry=s.fill?{type:"point",point:s.fill,callout:{distance:-t,offset:0}}:null,null==l||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=i.volume,c=N(o.labels.cut,{volume:I(r,l.cutVolume,a)}),u=N(o.labels.fill,{volume:I(r,l.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(){this.visible?this._cutFillRenderNode.enable():this._cutFillRenderNode.disable()}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData;if(!t?.extent)return;const{center:i}=t.extent,s=j(i.x,i.y,0),o=v();e.toRenderCoords(s,t.spatialReference,o);const r=this._getExtrudedVolumes(t,this._extrusionHeight,s),l=this._getExtrudedVolumes(t,-this._extrusionHeight,s);this._cutFillRenderNode.updateGeometries(r,l,o)}_getExtrudedVolumes(e,t,i){const{renderCoordsHelper:s,spatialReference:o,elevationProvider:r}=this.view,l=v(),n=1===s.viewingMode;n||s.worldUpAtPosition([0,0,0],l);const a=D(e,r,s,this._elevationContext),{polygons:c,mapPositions:u,position:m}=a,p=c[0],g=p.count,y=d(p.mapPositions,p.holeIndices,3),_=y.length,f=6*g,j=C(f+_),w=C(_),P=L(3*f),V=L(3*f);S(m,u,y,p,P,null,V,null,j,w,t,l,n);const F=h(),R=h();return b(o,i,F,s.spatialReference),R[12]=-F[12],R[13]=-F[13],R[14]=-F[14],G(P,P,R),new U(P,w,j,V)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await H("esri/core/t9n/Units"),this.messages=await H("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function I(e,t,i){return e&&t&&l(e,t,c(t.value,t.unit,i))}e([u({constructOnly:!0})],T.prototype,"view",void 0),e([u({constructOnly:!0})],T.prototype,"analysis",void 0),e([u({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([u()],T.prototype,"unitsMessages",void 0),e([u()],T.prototype,"messages",void 0),e([u()],T.prototype,"loadingMessages",void 0),e([u({readOnly:!0})],T.prototype,"visible",null),e([u()],T.prototype,"updating",null),T=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],T);class k{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=v(),this._n2=v();const r=g(z,y(z,e.endRenderSpace,e.startRenderSpace));g(this._n1,_(this._n1,r,g(W,y(W,t.startRenderSpace,e.startRenderSpace)))),g(this._n2,_(this._n2,r,g(W,y(W,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=o.normalize(w(this._n1,this._n2,r))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){y(z,this.segment.startRenderSpace,e.eye);const t=f(this._n1,z)<0,i=f(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=v(),W=v();export{T as VolumeMeasurementCutFillVisualization};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as o,isAborted as r,createResolver as h,createAbortError as n,onAbort as c}from"../../../../core/promiseUtils.js";import{watch as p,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import u from"../../../../layers/GraphicsLayer.js";import _ from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as g,isPolygonGraphic as k}from"./volumeMeasurementGeometryUtils.js";import{VolumeMeasurementShiftTool as G}from"./VolumeMeasurementShiftTool.js";import{makeAllLayerSnappingOptions as w}from"../../../interactive/snapping/allLayerSnapping.js";import v from"../../../../widgets/Sketch/SketchViewModel.js";const b=Symbol("interactive-operation");let f=class extends s{constructor(e){super(e),this._updatingHandles=new y,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{analysis:e,analysisViewData:t,view:s}=this;this._graphicsLayer=new u({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}});const i=w(s,{selfEnabled:!0,excludeInternal:!0});this._sketchViewModel=new v({layer:this._graphicsLayer,view:s,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"none"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol,snappingOptions:i.options}),this.addHandles([this._sketchViewModel.on(["undo","redo"],this._onUndoRedo),p(()=>({map:s.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(S(e,t),s){case"idle":case"sketching":break;case"awaiting-sketch":this.analysisViewData.interactive=!0;break;case"reshaping":this._startReshape();break;case"reshaping-disabled":this._stopOperation(),this._ensureUpdatedSketchGraphic()}},l),i]),this._shiftTool=new G({analysis:e,view:s,analysisViewData:t}),this.addHandles(this._shiftTool.on("record-undo",e=>{const t=this._sketchViewModel.activeComponent;"reshape-3d"===t?.type&&t.recordUndo(e.apply,e.undo)})),s.tools.add(this._shiftTool),this.addHandles({remove:()=>s.tools.remove(this._shiftTool)})}destroy(){this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new _({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._startPlaceOperation(e,(t,s)=>{const i=this.analysis.clone(),h=this._sketchViewModel.on("create",e=>{switch(e.state){case"complete":this._updateGeometryFromSketchGraphic(),this._stopOperation();break;case"cancel":this._stopOperation();break;case"active":this._updateGeometryFromSketchGraphic();break;case"start":this.sketchGraphic=e.graphic}});return this._ensureUpdatedSketchGraphic(),this._updatingHandles.addPromise(o(this._sketchViewModel.create("polygon"))),a(()=>(h.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?r(e)||i.equals(this.analysis)?s():void t():(this._clearGeometry(),s())))})}async _startPlaceOperation(e,t){const s=h(),i=t(()=>s.resolve({}),()=>s.reject(n()));return c(e,()=>this._stopOperation()),this._replaceHandles([i,c(e,()=>this._stopOperation())],b),await s.promise}_startReshape(){this._stopOperation();const e=this._sketchViewModel.on("update",e=>{this._updateGeometryFromSketchGraphic(),"complete"===e.state&&("reshaping"===this.state?this._startReshape():this._stopOperation())});this._replaceHandles(a(()=>{e.remove(),this._sketchViewModel.cancel()}),b);const t=this._ensureUpdatedSketchGraphic();t&&this._updatingHandles.addPromise(o(this._sketchViewModel.update(t,{tool:"reshape"})))}_stopOperation(){this.removeHandles(b)}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return g(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this._graphicsLayer.add(this.sketchGraphic),this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){const e=this.sketchGraphic;this.analysis.geometry=k(e)?e.geometry:null}_replaceHandles(e,t){this.removeHandles(t),this.addHandles((Array.isArray(e)?e:[e]).filter(i),t)}get test(){}};function S(e,t){t&&(t.removeFromParent(),e?.add(t))}e([d({constructOnly:!0})],f.prototype,"analysisViewData",void 0),e([d({constructOnly:!0})],f.prototype,"view",void 0),e([d({constructOnly:!0})],f.prototype,"analysis",void 0),e([d()],f.prototype,"sketchGraphic",null),e([d({nonNullable:!0})],f.prototype,"state",null),e([d()],f.prototype,"updating",null),e([d()],f.prototype,"_polygonSymbol",null),f=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],f);export{f as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import"../../../../core/has.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as a,isAborted as o}from"../../../../core/promiseUtils.js";import{watch as r,syncAndInitial as h}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import p from"../../../../layers/GraphicsLayer.js";import d from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as m,isPolygonGraphic as y}from"./volumeMeasurementGeometryUtils.js";import{VolumeMeasurementShiftTool as u}from"./VolumeMeasurementShiftTool.js";import{ExclusiveOperationManager as g}from"../../../analysis/ExclusiveOperationManager.js";import{makeAllLayerSnappingOptions as _}from"../../../interactive/snapping/allLayerSnapping.js";import k from"../../../../widgets/Sketch/SketchViewModel.js";let G=class extends s{constructor(e){super(e),this._updatingHandles=new l,this._operationManager=new g,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{analysis:e,analysisViewData:t,view:s}=this;this._graphicsLayer=new p({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}});const i=_(s,{selfEnabled:!0,excludeInternal:!0});this._sketchViewModel=new k({layer:this._graphicsLayer,view:s,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"none"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol,snappingOptions:i.options}),this.addHandles([this._sketchViewModel.on(["undo","redo"],this._onUndoRedo),r(()=>({map:s.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(w(e,t),s){case"idle":case"reshaping-disabled":this._operationManager.stop(),this._ensureUpdatedSketchGraphic();break;case"reshaping":a(this._startReshape());break;case"awaiting-sketch":this.analysisViewData.interactive=!0}},h),i]),this._shiftTool=new u({analysis:e,view:s,analysisViewData:t}),this.addHandles(this._shiftTool.on("record-undo",e=>{const t=this._sketchViewModel.activeComponent;"reshape-3d"===t?.type&&t.recordUndo(e.apply,e.undo)})),s.tools.add(this._shiftTool),this.addHandles({remove:()=>s.tools.remove(this._shiftTool)})}destroy(){this._operationManager.destroy(),this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new d({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._operationManager.start(async t=>{const s=this.analysis.clone();this._ensureUpdatedSketchGraphic();const a=this._sketchViewModel.on("create",e=>{switch(e.state){case"start":this.sketchGraphic=e.graphic;break;case"active":this._updateGeometryFromSketchGraphic();break;case"complete":this._updateGeometryFromSketchGraphic(),t.stop();break;case"cancel":t.stop()}});t.handles.push(a,i(()=>(a.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?o(e)||s.equals(this.analysis)?t.reject():void t.resolve():(this._clearGeometry(),t.reject())))),await this._updatingHandles.addPromise(this._sketchViewModel.create("polygon"))},e)}_startReshape(){return this._operationManager.start(async e=>{const t=()=>{const e=this._ensureUpdatedSketchGraphic();return e?(this._graphicsLayer.add(e),this._updatingHandles.addPromise(this._sketchViewModel.update(e,{tool:"reshape"}))):Promise.resolve()};if(!this._ensureUpdatedSketchGraphic())return;const s=this._sketchViewModel.on("update",s=>{this._updateGeometryFromSketchGraphic(),"complete"===s.state&&("reshaping"===this.state?a(t()):e.resolve())});e.handles.push(s,i(()=>{s.remove(),this._sketchViewModel.cancel(),e.resolve()})),await t()})}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return m(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){const e=this.sketchGraphic;this.analysis.geometry=y(e)?e.geometry:null}get test(){}};function w(e,t){t&&(t.removeFromParent(),e?.add(t))}e([n({constructOnly:!0})],G.prototype,"analysisViewData",void 0),e([n({constructOnly:!0})],G.prototype,"view",void 0),e([n({constructOnly:!0})],G.prototype,"analysis",void 0),e([n()],G.prototype,"sketchGraphic",null),e([n({nonNullable:!0})],G.prototype,"state",null),e([n()],G.prototype,"updating",null),e([n()],G.prototype,"_polygonSymbol",null),G=e([c("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],G);export{G as default};