@arcgis/core 4.33.0-next.20250131 → 4.33.0-next.20250201

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 (317) hide show
  1. package/WebScene.js +1 -1
  2. package/arcade/featureset/support/shared.js +1 -1
  3. package/arcade/geometry/unitConversion.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{b68bddd0c4ca91493543.js → 06d489a44d88e38fb140.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{4696278d033907a067c7.js → 085462ba3da7849fc296.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0a19e1aec6a5502e391a.js +1 -0
  8. package/assets/esri/core/workers/chunks/{7a273e6e411f6cc31b3f.js → 326a3f50e585e492b673.js} +1 -1
  9. package/assets/esri/core/workers/chunks/4decfae8bc5e80878bdd.js +1 -0
  10. package/assets/esri/core/workers/chunks/{e0de91eacf3a3b7eda55.js → 5b20ee64248f2d5c937f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{bef27448b341e429eb31.js → 692b3d03346f030aa649.js} +7 -7
  12. package/assets/esri/core/workers/chunks/6ec108bd955e064256b5.js +1 -0
  13. package/assets/esri/core/workers/chunks/c94ec324ecad77c53a87.js +1 -0
  14. package/assets/esri/core/workers/chunks/{ef6afba80fa2086ec104.js → e9f7953938b9bc8e8abe.js} +1 -1
  15. package/assets/esri/core/workers/chunks/fb1a89f753057f889971.js +314 -0
  16. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +4 -1
  17. package/assets/esri/themes/dark/main.css +1 -1
  18. package/assets/esri/themes/light/main.css +1 -1
  19. package/assets/esri/themes/light/view.css +1 -1
  20. package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
  21. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  22. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  23. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  24. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  25. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  26. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  27. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  28. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  29. package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
  30. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  31. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  32. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  33. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  34. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  35. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  36. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  37. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  38. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  39. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  40. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  41. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  42. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  43. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  44. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  45. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  46. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  47. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  48. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  49. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  50. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  51. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  52. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  53. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  54. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  55. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  56. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  57. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  58. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  59. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  60. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  61. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  62. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  63. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  64. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  65. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  66. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  67. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  68. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  69. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  70. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  71. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  72. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  73. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  74. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  75. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  76. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  77. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  78. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  79. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  80. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  81. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  82. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  83. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  84. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  85. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  86. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  87. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  88. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  89. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  90. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  91. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  92. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  93. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  94. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  95. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  96. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  97. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  98. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  99. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  100. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  101. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  102. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  103. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  104. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  105. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  106. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  107. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  108. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  109. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  110. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  111. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  112. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  113. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  114. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  115. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  116. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  117. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  118. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  119. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  120. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  121. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  122. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
  123. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  124. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  125. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  126. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  127. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  128. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  129. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  130. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  131. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  132. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  133. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  134. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  135. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  136. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  137. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  138. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  139. package/geometry/support/typeUtils.js +1 -1
  140. package/interfaces.d.ts +154 -7
  141. package/layers/FeatureLayer.js +1 -1
  142. package/layers/support/rasterFieldUtils.js +1 -1
  143. package/package.json +1 -1
  144. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  145. package/support/revision.js +1 -1
  146. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  147. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  148. package/views/2d/layers/features/layerAdapters/geometryUtils.js +1 -1
  149. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  150. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  151. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  152. package/views/3d/environment/CloudsComposition.js +1 -1
  153. package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
  154. package/views/3d/environment/CloudsRenderer.js +1 -1
  155. package/views/3d/environment/CloudsTechnique.js +1 -1
  156. package/views/3d/environment/Fog.js +1 -1
  157. package/views/3d/environment/FogTechnique.js +1 -1
  158. package/views/3d/environment/LocalAtmosphere.js +1 -1
  159. package/views/3d/environment/MarsAtmosphere.js +1 -1
  160. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  161. package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
  162. package/views/3d/environment/Precipitation.js +1 -1
  163. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  164. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  165. package/views/3d/interactive/editingTools/media/ControlPointOperations.js +1 -1
  166. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  167. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  168. package/views/3d/layers/GraphicsView3D.js +1 -1
  169. package/views/3d/layers/RouteLayerView3D.js +1 -1
  170. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  171. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  172. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  173. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  174. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  175. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  176. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandEncoder.js +1 -1
  177. package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +1 -1
  178. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  179. package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
  180. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  181. package/views/3d/support/hitTest.js +1 -1
  182. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  183. package/views/3d/terrain/OverlayRenderer.js +1 -1
  184. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  185. package/views/3d/terrain/TerrainRenderer.js +1 -1
  186. package/views/3d/terrain/TileCompositor.js +1 -1
  187. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  188. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  189. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  190. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  191. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  192. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  193. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  194. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  195. package/views/3d/webgl-engine/effects/bloom/BloomBlurTechnique.js +1 -1
  196. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +1 -1
  197. package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjustTechnique.js +1 -1
  198. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  199. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  200. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  201. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  202. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  203. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  204. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  205. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  206. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  207. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  208. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  209. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  210. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  211. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  212. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  213. package/views/3d/webgl-engine/effects/highlight/SingleHighlightApplyTechnique.js +1 -1
  214. package/views/3d/webgl-engine/effects/highlight/SingleHighlightBlurTechnique.js +1 -1
  215. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  216. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  217. package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
  218. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  219. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  220. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  221. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  222. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  223. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  224. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  225. package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
  226. package/views/3d/webgl-engine/effects/ssao/SSAOTechnique.js +1 -1
  227. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  228. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  229. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  230. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  231. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  232. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  233. package/views/3d/webgl-engine/lib/GLMaterial.js +1 -1
  234. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  235. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  236. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  237. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  238. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  239. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  240. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  241. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  242. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  243. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  244. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  245. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  246. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  247. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  248. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  249. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  250. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  251. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  252. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  253. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  254. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  255. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  256. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  257. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  258. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  259. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  260. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  261. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  262. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  263. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  264. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  265. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  266. package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
  267. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  268. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  269. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  270. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  271. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  272. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  273. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +1 -1
  274. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  275. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  276. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  277. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  278. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  279. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  280. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  281. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  282. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  283. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  284. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  285. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  286. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  287. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  288. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  289. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  290. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  291. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  292. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  293. package/views/draw/DrawOperation.js +1 -1
  294. package/views/draw/support/helpMessageUtils.js +1 -1
  295. package/views/draw/support/tooltipUtils.js +1 -1
  296. package/views/interactive/keybindings.js +1 -1
  297. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  298. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  299. package/views/interactive/snapping/snappingUtils.js +1 -1
  300. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  301. package/views/interactive/tooltip/infos/DrawCircleTooltipInfo.js +1 -1
  302. package/views/interactive/tooltip/infos/DrawMultipointTooltipInfo.js +5 -0
  303. package/views/interactive/tooltip/infos/DrawRectangleTooltipInfo.js +1 -1
  304. package/views/layers/FeatureLayerView.js +1 -1
  305. package/views/layers/MediaLayerView.js +1 -1
  306. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  307. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  308. package/widgets/BatchAttributeForm.js +1 -1
  309. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  310. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.d.ts +4 -0
  311. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
  312. package/widgets/support/widget.d.ts +9 -0
  313. package/assets/esri/core/workers/chunks/0bafa546602b776caf2f.js +0 -1
  314. package/assets/esri/core/workers/chunks/258b46b58a4860942f7c.js +0 -1
  315. package/assets/esri/core/workers/chunks/69ab4b780f7223cfd7dd.js +0 -1
  316. package/assets/esri/core/workers/chunks/83edac97a52b26ead1ea.js +0 -314
  317. package/assets/esri/core/workers/chunks/9ffa27d0517bad84572e.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as t}from"../../../core/reactiveUtils.js";import{property as i}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{LayerView3D as a}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as n}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{toViewIfLocal as h}from"./support/projectExtentUtils.js";import{UpdatePolicy as d}from"../webgl-engine/lib/UpdatePolicy.js";import u from"../../layers/LayerView.js";import{defaultHighlightName as g}from"../../support/HighlightDefaults.js";let m=class extends(a(u)){constructor(){super(...arguments),this.type="graphics-3d",this.symbologySnappingSupported=!0,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.ignoresMemoryFactor=!0}get highlightOptions(){return null}initialize(){this._set("processor",new p({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on("graphic-update",(e=>this.processor.graphicsCore.graphicUpdateHandler(e)))),this.addResolvingPromise(h(this).then((e=>this.fullExtentInLocalViewSpatialReference=e))),this.layer.internal?this.notifyChange("updating"):this.addHandles(t((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0}))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor))}get loadedGraphics(){return this.layer.graphics}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return!this.processor?.scaleVisibilitySuspended}get slicePlaneEnabled(){const e=this.layer.internal;return this._slicePlaneEnabled&&!e}set slicePlaneEnabled(e){this._slicePlaneEnabled=e}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return this.processor.highlight(e,r?.name??g)}async elevationAlignPointsInFeatures(e,s){const{processor:t}=this;if(null==t?.graphics3DGraphics)throw new r("graphicslayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");const{graphics3DGraphics:i}=t,o=e=>"number"==typeof e?i.get(e):void 0;return n(this.view,this.layer,o,e,s)}async queryForSymbologySnapping(e,r){return l(this.processor,e,r)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||d.SYNC}isUpdating(){return this.view&&this.layer&&!(!this.processor?.updating&&(this.layer.internal||this.view.basemapTerrain?.ready))}get performanceInfo(){return new c(this.usedMemory,this.loadedGraphics.length,-1,-1)}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return this.processor?.graphicsCore?.unprocessedMemoryEstimate}get test(){return{graphics3DProcessor:this.processor,loadedGraphics:this.loadedGraphics}}};e([i()],m.prototype,"highlightOptions",null),e([i()],m.prototype,"loadedGraphics",null),e([i({readOnly:!0})],m.prototype,"legendEnabled",null),e([i()],m.prototype,"layer",void 0),e([i({readOnly:!0})],m.prototype,"processor",void 0),e([i({readOnly:!0})],m.prototype,"visibleAtCurrentScale",null),e([i()],m.prototype,"_slicePlaneEnabled",void 0),e([i({type:Boolean})],m.prototype,"slicePlaneEnabled",null),m=e([o("esri.views.3d.layers.GraphicsLayerView3D")],m);const y=m;export{y as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as t}from"../../../core/reactiveUtils.js";import{property as i}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{LayerView3D as n}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as a}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{toViewIfLocal as h}from"./support/projectExtentUtils.js";import{UpdatePolicy as d}from"../webgl-engine/lib/UpdatePolicy.js";import u from"../../layers/LayerView.js";import{defaultHighlightName as g}from"../../support/HighlightDefaults.js";let m=class extends(n(u)){constructor(){super(...arguments),this.type="graphics-3d",this.symbologySnappingSupported=!0,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.ignoresMemoryFactor=!0}get highlightOptions(){return null}initialize(){this._set("processor",new p({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on("graphic-update",(e=>this.processor.graphicsCore.graphicUpdateHandler(e)))),this.addResolvingPromise(h(this).then((e=>this.fullExtentInLocalViewSpatialReference=e))),this.layer.internal?this.notifyChange("updating"):this.addHandles(t((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0}))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor))}get loadedGraphics(){return this.layer.graphics}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return!this.processor?.scaleVisibilitySuspended}get slicePlaneEnabled(){const e=this.layer.internal;return this._slicePlaneEnabled&&!e}set slicePlaneEnabled(e){this._slicePlaneEnabled=e}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}async getHitAsync(e){return this.processor.getHitAsync(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return this.processor.highlight(e,r?.name??g)}async elevationAlignPointsInFeatures(e,s){const{processor:t}=this;if(null==t?.graphics3DGraphics)throw new r("graphicslayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");const{graphics3DGraphics:i}=t,o=e=>"number"==typeof e?i.get(e):void 0;return a(this.view,this.layer,o,e,s)}async queryForSymbologySnapping(e,r){return l(this.processor,e,r)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||d.SYNC}isUpdating(){return this.view&&this.layer&&!(!this.processor?.updating&&(this.layer.internal||this.view.basemapTerrain?.ready))}get performanceInfo(){return new c(this.usedMemory,this.loadedGraphics.length,-1,-1)}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return this.processor?.graphicsCore?.unprocessedMemoryEstimate}get test(){return{graphics3DProcessor:this.processor,loadedGraphics:this.loadedGraphics}}};e([i()],m.prototype,"highlightOptions",null),e([i()],m.prototype,"loadedGraphics",null),e([i({readOnly:!0})],m.prototype,"legendEnabled",null),e([i()],m.prototype,"layer",void 0),e([i({readOnly:!0})],m.prototype,"processor",void 0),e([i({readOnly:!0})],m.prototype,"visibleAtCurrentScale",null),e([i()],m.prototype,"_slicePlaneEnabled",void 0),e([i({type:Boolean})],m.prototype,"slicePlaneEnabled",null),m=e([o("esri.views.3d.layers.GraphicsLayerView3D")],m);const y=m;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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../../chunks/tslib.es6.js";import s from"../../../core/Accessor.js";import e from"../../../core/Identifiable.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{defaultHighlightName as c}from"../../support/HighlightDefaults.js";let a=class extends(e.IdentifiableMixin(s)){constructor(r){super(r),this.processor=null,this.slicePlaneEnabled=!1,this.layer=new h,this.suspended=!1}initialize(){this._set("processor",new p({owner:this}))}destroy(){this._set("processor",o(this.processor))}get graphics(){return this.view?.graphics}get loadedGraphics(){return this.graphics}get updating(){return!!this.processor?.updating}get symbolUpdateType(){return this.processor.graphicsCore.symbolUpdateType}getHit(r){return this.processor.getHit(r)}whenGraphicBounds(r,s){return this.processor.whenGraphicBounds(r,s)}graphicChanged(r){this.processor.graphicsCore.graphicUpdateHandler(r)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}async queryGraphics(){return this.loadedGraphics}highlight(r,s){return this.processor.highlight(r,s?.name??c)}maskOccludee(r){return this.processor.maskOccludee(r)}get test(){return{graphics3DProcessor:this.processor}}};r([t({readOnly:!0})],a.prototype,"graphics",null),r([t()],a.prototype,"loadedGraphics",null),r([t({readOnly:!0})],a.prototype,"updating",null),r([t({constructOnly:!0})],a.prototype,"view",void 0),r([t()],a.prototype,"processor",void 0),r([t({type:Boolean})],a.prototype,"slicePlaneEnabled",void 0),r([t()],a.prototype,"layer",void 0),r([t()],a.prototype,"suspended",void 0),a=r([i("esri.views.3d.layers.GraphicsView3D")],a);class h extends e{constructor(){super(),this.type="graphics-view-3d-dummy",this.id=this.uid}}const n=a;export{n as default};
5
+ import{_ as r}from"../../../chunks/tslib.es6.js";import s from"../../../core/Accessor.js";import e from"../../../core/Identifiable.js";import{destroyMaybe as t}from"../../../core/maybe.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 i}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{defaultHighlightName as c}from"../../support/HighlightDefaults.js";let a=class extends(e.IdentifiableMixin(s)){constructor(r){super(r),this.processor=null,this.slicePlaneEnabled=!1,this.layer=new h,this.suspended=!1}initialize(){this._set("processor",new p({owner:this}))}destroy(){this._set("processor",t(this.processor))}get graphics(){return this.view?.graphics}get loadedGraphics(){return this.graphics}get updating(){return!!this.processor?.updating}get symbolUpdateType(){return this.processor.graphicsCore.symbolUpdateType}getHit(r){return this.processor.getHit(r)}async getHitAsync(r){return this.processor.getHitAsync(r)}whenGraphicBounds(r,s){return this.processor.whenGraphicBounds(r,s)}graphicChanged(r){this.processor.graphicsCore.graphicUpdateHandler(r)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}async queryGraphics(){return this.loadedGraphics}highlight(r,s){return this.processor.highlight(r,s?.name??c)}maskOccludee(r){return this.processor.maskOccludee(r)}get test(){return{graphics3DProcessor:this.processor}}};r([o({readOnly:!0})],a.prototype,"graphics",null),r([o()],a.prototype,"loadedGraphics",null),r([o({readOnly:!0})],a.prototype,"updating",null),r([o({constructOnly:!0})],a.prototype,"view",void 0),r([o()],a.prototype,"processor",void 0),r([o({type:Boolean})],a.prototype,"slicePlaneEnabled",void 0),r([o()],a.prototype,"layer",void 0),r([o()],a.prototype,"suspended",void 0),a=r([i("esri.views.3d.layers.GraphicsView3D")],a);class h extends e{constructor(){super(),this.type="graphics-view-3d-dummy",this.id=this.uid}}const n=a;export{n 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Collection.js";import t from"../../../core/CollectionFlattener.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{initial as o,when as i,watch as n}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 p}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../../../rest/support/DirectionLine.js";import c from"../../../rest/support/DirectionPoint.js";import h from"../../../rest/support/PointBarrier.js";import d from"../../../rest/support/PolygonBarrier.js";import u from"../../../rest/support/PolylineBarrier.js";import m from"../../../rest/support/RouteInfo.js";import y from"../../../rest/support/Stop.js";import{LayerView3D as f}from"./LayerView3D.js";import{GraphicsProcessor as g}from"./graphics/GraphicsProcessor.js";import{LayerViewPerformanceInfo as b}from"./support/LayerViewPerformanceInfo.js";import{toViewIfLocal as j}from"./support/projectExtentUtils.js";import{EventedSet as w}from"../support/EventedSet.js";import{UpdatePolicy as I}from"../webgl-engine/lib/UpdatePolicy.js";import _ from"../../layers/LayerView.js";import{defaultHighlightName as v}from"../../support/HighlightDefaults.js";function S(e){return e instanceof l||e instanceof c||e instanceof h||e instanceof d||e instanceof u||e instanceof m||e instanceof y}let C=class extends(f(_)){constructor(){super(...arguments),this.type="route-3d",this.loadedGraphics=new w,this._byObjectID=new Map,this.slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null}initialize(){this._set("processor",new g({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this._updatingHandles.addOnCollectionChange((()=>this._routeItems),(e=>this._routeItemsChanged(e)),o),this.addResolvingPromise(j(this).then((e=>this.fullExtentInLocalViewSpatialReference=e))),this.addHandles(i((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0}))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor)),this._get("_routeItems")?.destroy()}get _routeItems(){return new t({getCollections:()=>[this.layer.pointBarriers,this.layer.polygonBarriers,this.layer.polylineBarriers,this.layer.stops,this.layer.directionLines,this.layer.directionPoints,null!=this.layer.routeInfo?new r([this.layer.routeInfo]):null]})}_routeItemsChanged(e){if(e.removed.length){this.loadedGraphics.removeMany(e.removed.map((e=>{const r=this._byObjectID.get(e);return this._byObjectID.delete(e),r})));for(const r of e.removed)this.removeHandles(r)}if(e.added.length){this.loadedGraphics.addMany(e.added.map((e=>{const r=e.toGraphic();return this._byObjectID.set(e,r),r})));for(const r of e.added)this.addHandles([n((()=>r.geometry),((e,t)=>{this._updateGraphic(r,"geometry",e,t)})),n((()=>r.symbol),((e,t)=>{this._updateGraphic(r,"symbol",e,t)}))],r)}}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return!this.processor?.scaleVisibilitySuspended}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}async queryGraphics(){return new r(this.loadedGraphics.toArray())}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return S(e)&&(e=this._byObjectID.get(e)),this.processor.highlight(e,r?.name??v)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||I.SYNC}isUpdating(){return!(!this.processor?.updating&&this.view?.basemapTerrain?.ready)}get performanceInfo(){return new b(this.processor?.graphicsCore.usedMemory??0,this.loadedGraphics.length,-1,-1,0,this.processor?.graphicsCore.performanceInfo??null)}_updateGraphic(e,r,t,s){const o=this._byObjectID.get(e);o[r]=t,V.graphic=o,V.property=r,V.oldValue=s,V.newValue=t,this.processor?.graphicsCore.graphicUpdateHandler(V)}};e([a()],C.prototype,"_routeItems",null),e([a()],C.prototype,"loadedGraphics",void 0),e([a({readOnly:!0})],C.prototype,"legendEnabled",null),e([a({readOnly:!0})],C.prototype,"visibleAtCurrentScale",null),e([a()],C.prototype,"layer",void 0),e([a({readOnly:!0})],C.prototype,"processor",void 0),e([a({type:Boolean})],C.prototype,"slicePlaneEnabled",void 0),C=e([p("esri.views.3d.layers.RouteLayerView3D")],C);const V={graphic:null,property:null,oldValue:null,newValue:null},G=C;export{G as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Collection.js";import t from"../../../core/CollectionFlattener.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{initial as o,when as i,watch as n}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 p}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../../../rest/support/DirectionLine.js";import c from"../../../rest/support/DirectionPoint.js";import h from"../../../rest/support/PointBarrier.js";import d from"../../../rest/support/PolygonBarrier.js";import u from"../../../rest/support/PolylineBarrier.js";import m from"../../../rest/support/RouteInfo.js";import y from"../../../rest/support/Stop.js";import{LayerView3D as f}from"./LayerView3D.js";import{GraphicsProcessor as g}from"./graphics/GraphicsProcessor.js";import{LayerViewPerformanceInfo as b}from"./support/LayerViewPerformanceInfo.js";import{toViewIfLocal as j}from"./support/projectExtentUtils.js";import{EventedSet as w}from"../support/EventedSet.js";import{UpdatePolicy as I}from"../webgl-engine/lib/UpdatePolicy.js";import _ from"../../layers/LayerView.js";import{defaultHighlightName as v}from"../../support/HighlightDefaults.js";function S(e){return e instanceof l||e instanceof c||e instanceof h||e instanceof d||e instanceof u||e instanceof m||e instanceof y}let C=class extends(f(_)){constructor(){super(...arguments),this.type="route-3d",this.loadedGraphics=new w,this._byObjectID=new Map,this.slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null}initialize(){this._set("processor",new g({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this._updatingHandles.addOnCollectionChange((()=>this._routeItems),(e=>this._routeItemsChanged(e)),o),this.addResolvingPromise(j(this).then((e=>this.fullExtentInLocalViewSpatialReference=e))),this.addHandles(i((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0}))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor)),this._get("_routeItems")?.destroy()}get _routeItems(){return new t({getCollections:()=>[this.layer.pointBarriers,this.layer.polygonBarriers,this.layer.polylineBarriers,this.layer.stops,this.layer.directionLines,this.layer.directionPoints,null!=this.layer.routeInfo?new r([this.layer.routeInfo]):null]})}_routeItemsChanged(e){if(e.removed.length){this.loadedGraphics.removeMany(e.removed.map((e=>{const r=this._byObjectID.get(e);return this._byObjectID.delete(e),r})));for(const r of e.removed)this.removeHandles(r)}if(e.added.length){this.loadedGraphics.addMany(e.added.map((e=>{const r=e.toGraphic();return this._byObjectID.set(e,r),r})));for(const r of e.added)this.addHandles([n((()=>r.geometry),((e,t)=>{this._updateGraphic(r,"geometry",e,t)})),n((()=>r.symbol),((e,t)=>{this._updateGraphic(r,"symbol",e,t)}))],r)}}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return!this.processor?.scaleVisibilitySuspended}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}async getHitAsync(e){return this.processor.getHitAsync(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}async queryGraphics(){return new r(this.loadedGraphics.toArray())}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return S(e)&&(e=this._byObjectID.get(e)),this.processor.highlight(e,r?.name??v)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||I.SYNC}isUpdating(){return!(!this.processor?.updating&&this.view?.basemapTerrain?.ready)}get performanceInfo(){return new b(this.processor?.graphicsCore.usedMemory??0,this.loadedGraphics.length,-1,-1,0,this.processor?.graphicsCore.performanceInfo??null)}_updateGraphic(e,r,t,s){const o=this._byObjectID.get(e);o[r]=t,V.graphic=o,V.property=r,V.oldValue=s,V.newValue=t,this.processor?.graphicsCore.graphicUpdateHandler(V)}};e([a()],C.prototype,"_routeItems",null),e([a()],C.prototype,"loadedGraphics",void 0),e([a({readOnly:!0})],C.prototype,"legendEnabled",null),e([a({readOnly:!0})],C.prototype,"visibleAtCurrentScale",null),e([a()],C.prototype,"layer",void 0),e([a({readOnly:!0})],C.prototype,"processor",void 0),e([a({type:Boolean})],C.prototype,"slicePlaneEnabled",void 0),C=e([p("esri.views.3d.layers.RouteLayerView3D")],C);const V={graphic:null,property:null,oldValue:null,newValue:null},G=C;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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{binaryIndexOf as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{estimateNumberArrayMemory as s}from"../../../core/memoryEstimations.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{generateUID as n}from"../../../core/uid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{i as u}from"../../../chunks/vec32.js";import{ZEROS as h,create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as m}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as g,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as I}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import N from"../../../layers/support/FeatureFilter.js";import j from"../../../rest/support/Query.js";import{isBasemapLayer as O}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as C}from"./I3SPointsWorkerHandle.js";import{LayerView3D as D}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as F}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as S}from"./graphics/QueryEngine.js";import{QueryEngineContext as G}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as A,normalizeEditResultsEvent as P,processAttributeEdits as L}from"./i3s/featureEditing.js";import{I3SGraphicsMap as V}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as R}from"./i3s/I3SOverrides.js";import{checkRecyclable as M,checkSpatialReferences as H,containsDraco as Q,whenGraphicAttributes as q,getCachedAttributeValue as T}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as U}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as B}from"./support/fieldProperties.js";import{LayerViewPerformanceInfo as k}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as z}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as W}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as K}from"./support/TemporalSceneLayerView.js";import{debugFlags as Z}from"../support/debugFlags.js";import{compute as Y}from"../support/orientedBoundingBox.js";import{updatingProgress as $}from"../support/updatingProperties.js";import{Vertices as J}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as X}from"../webgl-engine/lib/UpdatePolicy.js";import ee from"../../layers/SceneLayerView.js";import{hasPopupTemplate as te}from"../../layers/support/popupUtils.js";import{defaultHighlightName as re}from"../../support/HighlightDefaults.js";import{TaskPriority as ie}from"../../support/Scheduler.js";const se=B();class oe{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get cachedMemory(){return this.graphics.reduce(((e,t)=>x(t)+e),s(this.featureIds)+1024)}}let ae=class extends(K(U(z(D(ee))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new V(((e,t,r)=>ue(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{M(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this._i3sOverrides=new R({view:this.view,layer:e,memoryController:t}),i(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new R({view:this.view,layer:this.layer,memoryController:e}),H(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new W({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),o),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.addHandles(a((()=>Z.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&Z.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||Z.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),o)),this._set("processor",new F({owner:this,preferredUpdatePolicy:X.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t))),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),Q(this.layer.geometryDefinitions)&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)}))),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),o),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=i(this._treeDebugger),this._i3sOverrides=i(this._i3sOverrides),this._set("processor",i(this.processor)),this._controller=i(this._controller),this._queryEngine=i(this._queryEngine),this._worker=i(this._worker),this._memCache=i(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=i(this._fieldsHelper)}get i3slayer(){return this.layer}get updatingProgressValue(){return this._controller?.updatingProgress??1}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return q(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t?.attributes?.[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){return this.processor.highlight(e,this.layer.objectIdField,t?.name??re)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return A(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,t,i){if(!de(t)&&!le(t))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void r.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?pe(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=de(t)?await this._extractBinaryPointPositions(e,t,i):this._extractLegacyPointPositions(t),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=de(t)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new oe(h,o,t.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,t.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),he(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const r of p.graphics)this._verticalScale(r.geometry);const m=this.view._stage.renderView.olidRenderHelper;if(m){const e=O(this.view.map,this.layer.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];m.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.layer.uid,this.layer.popupEnabled&&!e&&te(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0),e.serviceObbInIndexSR=Y(new J(t,3)),i.isGeographic&&(m(e.serviceObbInIndexSR.center,s,me,i),e.serviceObbInIndexSR.center=me)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:h,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??ce[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,t,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=t.length,n=3;for(let l=0;l<a;l++){const t=l*n;u(me,i[t],i[t+1],i[t+2]);const a=!Number.isNaN(i[2]);null==s||(a?g(s,me):y(s,me))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(me[0],me[1],me[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),m=h*o,g=isNaN(t[m+2])?void 0:t[m+2],y=I(t[m],t[m+1],g,u),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(ge.property="geometry",ge.graphic=f,ge.oldValue=f.geometry,ge.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(ge)),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(null!=e.numFeatures?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,i,s){this.loadedGraphics.hasNode(e.index)?r.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(t.featureIds,i,s),t.attributeInfo=i,this.loadedGraphics.addNode(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),he(t),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){he(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach((e=>e.nodeIndex===t&&i.push(e.uid))),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&r.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const r=this.parsedDefinitionExpression,i=this._excludeObjectIdsSorted,s=this._getObjectIdField();for(const o of e.graphics){const e=o.visible,a=!r||this._evaluateClause(r,o),n=null==i||t(i,o.attributes[s])<0;o.visible=a&&n,e!==o.visible&&(ge.graphic=o,ge.property="visible",ge.oldValue=e,ge.newValue=o.visible,this.processor.graphicsCore.graphicUpdateHandler(ge))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new j(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():j.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new G(s,e,o,(()=>this.processor.featureStore),i,r);this._queryEngine=new S({context:a,priority:ie.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await P(t,e);L(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new k(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],ae.prototype,"processor",void 0),e([l({type:N})],ae.prototype,"filter",void 0),e([l()],ae.prototype,"loadedGraphics",void 0),e([l()],ae.prototype,"i3slayer",null),e([l()],ae.prototype,"_controller",void 0),e([l()],ae.prototype,"updating",void 0),e([l()],ae.prototype,"suspended",void 0),e([l()],ae.prototype,"holeFilling",void 0),e([l($)],ae.prototype,"updatingProgress",void 0),e([l()],ae.prototype,"updatingProgressValue",null),e([l(se.requiredFields)],ae.prototype,"requiredFields",null),e([l(se.availableFields)],ae.prototype,"availableFields",void 0),e([l()],ae.prototype,"_fieldsHelper",void 0),e([l({type:Number})],ae.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],ae.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],ae.prototype,"_excludeObjectIdsSorted",null),e([l({readOnly:!0})],ae.prototype,"lodFactor",null),e([l({readOnly:!0})],ae.prototype,"hasM",null),e([l({readOnly:!0})],ae.prototype,"hasZ",null),e([l()],ae.prototype,"contentVisible",null),e([l({readOnly:!0})],ae.prototype,"legendEnabled",null),ae=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],ae);const ne=ae;function le(e){return"pointData"in e}function de(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ue(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=T(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function he(e){const t=e.attributeInfo,r=e.node.index;if(null!=t?.loadedAttributes&&null!=t.attributeData)for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=T(t.attributeData[e],i))}}}function pe(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const ce={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},me=p(),ge={graphic:null,property:null,oldValue:null,newValue:null};export{ne as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{binaryIndexOf as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{estimateNumberArrayMemory as s}from"../../../core/memoryEstimations.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{generateUID as n}from"../../../core/uid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{i as u}from"../../../chunks/vec32.js";import{ZEROS as h,create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as m}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as g,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as I}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import N from"../../../layers/support/FeatureFilter.js";import j from"../../../rest/support/Query.js";import{isBasemapLayer as O}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as C}from"./I3SPointsWorkerHandle.js";import{LayerView3D as D}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as F}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as S}from"./graphics/QueryEngine.js";import{QueryEngineContext as G}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as A,normalizeEditResultsEvent as P,processAttributeEdits as L}from"./i3s/featureEditing.js";import{I3SGraphicsMap as V}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as R}from"./i3s/I3SOverrides.js";import{checkRecyclable as H,checkSpatialReferences as M,containsDraco as Q,whenGraphicAttributes as q,getCachedAttributeValue as T}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as U}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as B}from"./support/fieldProperties.js";import{LayerViewPerformanceInfo as k}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as z}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as W}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as K}from"./support/TemporalSceneLayerView.js";import{debugFlags as Z}from"../support/debugFlags.js";import{compute as Y}from"../support/orientedBoundingBox.js";import{updatingProgress as $}from"../support/updatingProperties.js";import{Vertices as J}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as X}from"../webgl-engine/lib/UpdatePolicy.js";import ee from"../../layers/SceneLayerView.js";import{hasPopupTemplate as te}from"../../layers/support/popupUtils.js";import{defaultHighlightName as re}from"../../support/HighlightDefaults.js";import{TaskPriority as ie}from"../../support/Scheduler.js";const se=B();class oe{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get cachedMemory(){return this.graphics.reduce(((e,t)=>x(t)+e),s(this.featureIds)+1024)}}let ae=class extends(K(U(z(D(ee))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new V(((e,t,r)=>ue(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{H(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this._i3sOverrides=new R({view:this.view,layer:e,memoryController:t}),i(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new R({view:this.view,layer:this.layer,memoryController:e}),M(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new W({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),o),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.addHandles(a((()=>Z.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&Z.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||Z.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),o)),this._set("processor",new F({owner:this,preferredUpdatePolicy:X.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t))),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),Q(this.layer.geometryDefinitions)&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)}))),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),o),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=i(this._treeDebugger),this._i3sOverrides=i(this._i3sOverrides),this._set("processor",i(this.processor)),this._controller=i(this._controller),this._queryEngine=i(this._queryEngine),this._worker=i(this._worker),this._memCache=i(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=i(this._fieldsHelper)}get i3slayer(){return this.layer}get updatingProgressValue(){return this._controller?.updatingProgress??1}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return q(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t?.attributes?.[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}async getHitAsync(e){return this.getHit(e)}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){return this.processor.highlight(e,this.layer.objectIdField,t?.name??re)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return A(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,t,i){if(!de(t)&&!le(t))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void r.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?pe(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=de(t)?await this._extractBinaryPointPositions(e,t,i):this._extractLegacyPointPositions(t),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=de(t)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new oe(h,o,t.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,t.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),he(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const r of p.graphics)this._verticalScale(r.geometry);const m=this.view._stage.renderView.olidRenderHelper;if(m){const e=O(this.view.map,this.layer.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];m.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.layer.uid,this.layer.popupEnabled&&!e&&te(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0),e.serviceObbInIndexSR=Y(new J(t,3)),i.isGeographic&&(m(e.serviceObbInIndexSR.center,s,me,i),e.serviceObbInIndexSR.center=me)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:h,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??ce[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,t,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=t.length,n=3;for(let l=0;l<a;l++){const t=l*n;u(me,i[t],i[t+1],i[t+2]);const a=!Number.isNaN(i[2]);null==s||(a?g(s,me):y(s,me))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&r.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(me[0],me[1],me[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),m=h*o,g=isNaN(t[m+2])?void 0:t[m+2],y=I(t[m],t[m+1],g,u),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(ge.property="geometry",ge.graphic=f,ge.oldValue=f.geometry,ge.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(ge)),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(null!=e.numFeatures?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,i,s){this.loadedGraphics.hasNode(e.index)?r.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(t.featureIds,i,s),t.attributeInfo=i,this.loadedGraphics.addNode(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),he(t),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){he(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach((e=>e.nodeIndex===t&&i.push(e.uid))),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&r.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const r=this.parsedDefinitionExpression,i=this._excludeObjectIdsSorted,s=this._getObjectIdField();for(const o of e.graphics){const e=o.visible,a=!r||this._evaluateClause(r,o),n=null==i||t(i,o.attributes[s])<0;o.visible=a&&n,e!==o.visible&&(ge.graphic=o,ge.property="visible",ge.oldValue=e,ge.newValue=o.visible,this.processor.graphicsCore.graphicUpdateHandler(ge))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new j(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():j.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new G(s,e,o,(()=>this.processor.featureStore),i,r);this._queryEngine=new S({context:a,priority:ie.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await P(t,e);L(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new k(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],ae.prototype,"processor",void 0),e([l({type:N})],ae.prototype,"filter",void 0),e([l()],ae.prototype,"loadedGraphics",void 0),e([l()],ae.prototype,"i3slayer",null),e([l()],ae.prototype,"_controller",void 0),e([l()],ae.prototype,"updating",void 0),e([l()],ae.prototype,"suspended",void 0),e([l()],ae.prototype,"holeFilling",void 0),e([l($)],ae.prototype,"updatingProgress",void 0),e([l()],ae.prototype,"updatingProgressValue",null),e([l(se.requiredFields)],ae.prototype,"requiredFields",null),e([l(se.availableFields)],ae.prototype,"availableFields",void 0),e([l()],ae.prototype,"_fieldsHelper",void 0),e([l({type:Number})],ae.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],ae.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],ae.prototype,"_excludeObjectIdsSorted",null),e([l({readOnly:!0})],ae.prototype,"lodFactor",null),e([l({readOnly:!0})],ae.prototype,"hasM",null),e([l({readOnly:!0})],ae.prototype,"hasZ",null),e([l()],ae.prototype,"contentVisible",null),e([l({readOnly:!0})],ae.prototype,"legendEnabled",null),ae=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],ae);const ne=ae;function le(e){return"pointData"in e}function de(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ue(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=T(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function he(e){const t=e.attributeInfo,r=e.node.index;if(null!=t?.loadedAttributes&&null!=t.attributeData)for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=T(t.attributeData[e],i))}}}function pe(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const ce={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},me=p(),ge={graphic:null,property:null,oldValue:null,newValue:null};export{ne 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import e from"../../../../core/Accessor.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{isAbortError as n}from"../../../../core/promiseUtils.js";import{watch as o,sync as a,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as p}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{diff as h}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../layers/Layer.js";import{hydrateGraphic as y}from"../../../../layers/graphics/hydratedFeatures.js";import{getRenderingInfo as g,getRenderingInfoAsync as m}from"../../../../renderers/support/renderingInfoUtils.js";import f from"../../../../rest/support/Query.js";import{DrapeSourceType as b}from"../interfaces.js";import{suspendResumeExtentOptimism as C}from"./constants.js";import{Graphics3DCore as w}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as j}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as V}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as v}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as G}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as E}from"./graphicUtils.js";import{normalizeHighlightTargetExceptQuery as S}from"../support/highlightUtils.js";import{UpdatePolicy as _}from"../../webgl-engine/lib/UpdatePolicy.js";let x=class extends e{constructor(i){super(i),this.type="graphics-3d",this.graphicsCore=null,this.drapeSourceType=b.Features,this.scaleVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this._suspendResumeExtent=null,this._updatingHandles=new u}initialize(){const{layer:i}=this,t="effectiveScaleRange"in i?i:null,e=this.scaleVisibilityEnabled&&null!=t,r=new w({owner:this,layer:this.owner.layer,preferredUpdatePolicy:_.SYNC,graphicSymbolSupported:!0,componentFactories:{elevationAlignment:(i,t)=>new j({graphicsCoreOwner:this,graphicsCore:i,queryGraphicUIDsInExtent:t,elevationProvider:this.view.elevationProvider}),scaleVisibility:e?(i,e)=>new G({graphicsCoreOwner:this,layer:t,queryGraphicUIDsInExtent:e,graphicsCore:i,basemapTerrain:this.owner.view.basemapTerrain}):null,objectStates:i=>new v(i)}});if(this._set("graphicsCore",r),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new V({graphicsCoreOwner:this})),"fullOpacity"in this.owner){const i=this.owner;this._updatingHandles.add((()=>i.fullOpacity),(()=>this.graphicsCore.opacityChange()))}if("elevationInfo"in i){const t=i;this._updatingHandles.add((()=>t.elevationInfo),((i,t)=>{h(i,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())}))}this._set("initializePromise",this._initializeAsync()),this._updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){try{await this.graphicsCore.initializePromise}catch(i){if(n(i))return;throw i}this.destroyed||(this.addHandles(o((()=>this.view.clippingArea),(()=>this._updateClippingExtent()),a)),this._updateClippingExtent(),this._setupSuspendResumeExtent(),this.graphicsCore.startCreateGraphics())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",s(this.frustumVisibility)),this._set("graphicsCore",s(this.graphicsCore))}get layer(){return this.owner.layer}get view(){return this.owner.view}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get scaleVisibilitySuspended(){return!(null==this.scaleVisibility||!this.scaleVisibility.suspended)}get frustumVisibilitySuspended(){return null!=this.frustumVisibility&&this.frustumVisibility.suspended}get suspended(){return this.owner.suspended??!1}get updating(){return!!(this.graphicsCore?.updating||null!=this.scaleVisibility&&this.scaleVisibility.updating||null!=this.frustumVisibility&&this.frustumVisibility.updating||this._updatingHandles.updating)}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner.fullOpacity??1}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}notifyGraphicGeometryChanged(i){this.graphicsCore.notifyGraphicGeometryChanged(i)}notifyGraphicVisibilityChanged(i){this.graphicsCore.notifyGraphicVisibilityChanged(i)}getRenderingInfo(i,t,e){const r=g(i,{renderer:t,arcade:e});if(r?.color){const i=r.color;i[0]=i[0]/255,i[1]=i[1]/255,i[2]=i[2]/255}return r}getRenderingInfoAsync(i,t,e,r){return m(i,{renderer:t,arcade:e,...r})}getHit(i){if(this.owner.loadedGraphics){const t=this.owner.loadedGraphics.find((t=>t.uid===i));if(t){const i=this.layer instanceof d?this.layer:null,e=y(t,i);return{type:"graphic",graphic:e,layer:e.layer}}}return null}whenGraphicBounds(i,t){return this.graphicsCore?this.graphicsCore.whenGraphicBounds(i,t):Promise.reject()}computeAttachmentOrigin(i,t){return this.graphicsCore?this.graphicsCore.computeAttachmentOrigin(i,t):null}getSymbolLayerSize(i,t){return this.graphicsCore?this.graphicsCore.getSymbolLayerSize(i,t):null}maskOccludee(i){const t=this.graphicsCore?.objectStates;if(!t)return r();const{set:e,handle:s}=t.acquireOccludeeSet(null);return t.setUid(e,i.uid),s}highlight(i,e){const r=this.graphicsCore?.objectStates;if(!r)return O;if(i instanceof f)return O;const s=S(i);if(0===s.length)return O;if(s[0]instanceof t){const i=s.map((i=>i.uid)),{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setUids(t,i),n}if("number"==typeof s[0]){const i=s,{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setObjectIds(t,i),n}return O}_setupSuspendResumeExtent(){const{scaleVisibility:i,frustumVisibility:t}=this;if(null==i&&null==t)return;const e=({computedExtent:e,extentPadding:r})=>{this._suspendResumeExtent=E(e,this._suspendResumeExtent,C,r),null!=i&&i.setExtent(this._suspendResumeExtent),null!=t&&t.setExtent(this._suspendResumeExtent)};this.addHandles(o((()=>({computedExtent:this.graphicsCore?.computedExtent,extentPadding:this.graphicsCore?.extentPadding})),(i=>e(i)),l))}_updateClippingExtent(){const i=this.view.clippingArea;this.graphicsCore.setClippingExtent(i,this.view.spatialReference)&&this.graphicsCore.recreateAllGraphics()}};i([p()],x.prototype,"type",void 0),i([p({constructOnly:!0})],x.prototype,"owner",void 0),i([p()],x.prototype,"layer",null),i([p()],x.prototype,"view",null),i([p({constructOnly:!0})],x.prototype,"graphicsCore",void 0),i([p()],x.prototype,"scaleVisibility",null),i([p({constructOnly:!0})],x.prototype,"frustumVisibility",void 0),i([p()],x.prototype,"elevationAlignment",null),i([p()],x.prototype,"scaleVisibilitySuspended",null),i([p({readOnly:!0})],x.prototype,"frustumVisibilitySuspended",null),i([p()],x.prototype,"suspended",null),i([p({readOnly:!0})],x.prototype,"updating",null),i([p()],x.prototype,"loadedGraphics",null),i([p()],x.prototype,"fullOpacity",null),i([p()],x.prototype,"slicePlaneEnabled",null),i([p()],x.prototype,"drapeSourceType",void 0),i([p()],x.prototype,"updatePolicy",null),i([p({constructOnly:!0})],x.prototype,"scaleVisibilityEnabled",void 0),i([p({constructOnly:!0})],x.prototype,"frustumVisibilityEnabled",void 0),i([p()],x.prototype,"initializePromise",void 0),x=i([c("esri.views.3d.layers.graphics.GraphicsProcessor")],x);const O=r();export{x as GraphicsProcessor};
5
+ import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import e from"../../../../core/Accessor.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{isAbortError as n}from"../../../../core/promiseUtils.js";import{watch as o,sync as a,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as p}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{diff as h}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../layers/Layer.js";import{hydrateGraphic as y}from"../../../../layers/graphics/hydratedFeatures.js";import{getRenderingInfo as g,getRenderingInfoAsync as m}from"../../../../renderers/support/renderingInfoUtils.js";import f from"../../../../rest/support/Query.js";import{DrapeSourceType as b}from"../interfaces.js";import{suspendResumeExtentOptimism as C}from"./constants.js";import{Graphics3DCore as w}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as j}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as V}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as v}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as G}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as E}from"./graphicUtils.js";import{normalizeHighlightTargetExceptQuery as S}from"../support/highlightUtils.js";import{UpdatePolicy as _}from"../../webgl-engine/lib/UpdatePolicy.js";let x=class extends e{constructor(i){super(i),this.type="graphics-3d",this.graphicsCore=null,this.drapeSourceType=b.Features,this.scaleVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this._suspendResumeExtent=null,this._updatingHandles=new u}initialize(){const{layer:i}=this,t="effectiveScaleRange"in i?i:null,e=this.scaleVisibilityEnabled&&null!=t,r=new w({owner:this,layer:this.owner.layer,preferredUpdatePolicy:_.SYNC,graphicSymbolSupported:!0,componentFactories:{elevationAlignment:(i,t)=>new j({graphicsCoreOwner:this,graphicsCore:i,queryGraphicUIDsInExtent:t,elevationProvider:this.view.elevationProvider}),scaleVisibility:e?(i,e)=>new G({graphicsCoreOwner:this,layer:t,queryGraphicUIDsInExtent:e,graphicsCore:i,basemapTerrain:this.owner.view.basemapTerrain}):null,objectStates:i=>new v(i)}});if(this._set("graphicsCore",r),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new V({graphicsCoreOwner:this})),"fullOpacity"in this.owner){const i=this.owner;this._updatingHandles.add((()=>i.fullOpacity),(()=>this.graphicsCore.opacityChange()))}if("elevationInfo"in i){const t=i;this._updatingHandles.add((()=>t.elevationInfo),((i,t)=>{h(i,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())}))}this._set("initializePromise",this._initializeAsync()),this._updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){try{await this.graphicsCore.initializePromise}catch(i){if(n(i))return;throw i}this.destroyed||(this.addHandles(o((()=>this.view.clippingArea),(()=>this._updateClippingExtent()),a)),this._updateClippingExtent(),this._setupSuspendResumeExtent(),this.graphicsCore.startCreateGraphics())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",s(this.frustumVisibility)),this._set("graphicsCore",s(this.graphicsCore))}get layer(){return this.owner.layer}get view(){return this.owner.view}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get scaleVisibilitySuspended(){return!(null==this.scaleVisibility||!this.scaleVisibility.suspended)}get frustumVisibilitySuspended(){return null!=this.frustumVisibility&&this.frustumVisibility.suspended}get suspended(){return this.owner.suspended??!1}get updating(){return!!(this.graphicsCore?.updating||null!=this.scaleVisibility&&this.scaleVisibility.updating||null!=this.frustumVisibility&&this.frustumVisibility.updating||this._updatingHandles.updating)}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner.fullOpacity??1}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}notifyGraphicGeometryChanged(i){this.graphicsCore.notifyGraphicGeometryChanged(i)}notifyGraphicVisibilityChanged(i){this.graphicsCore.notifyGraphicVisibilityChanged(i)}getRenderingInfo(i,t,e){const r=g(i,{renderer:t,arcade:e});if(r?.color){const i=r.color;i[0]=i[0]/255,i[1]=i[1]/255,i[2]=i[2]/255}return r}getRenderingInfoAsync(i,t,e,r){return m(i,{renderer:t,arcade:e,...r})}getHit(i){if(this.owner.loadedGraphics){const t=this.owner.loadedGraphics.find((t=>t.uid===i));if(t){const i=this.layer instanceof d?this.layer:null,e=y(t,i);return{type:"graphic",graphic:e,layer:e.layer}}}return null}async getHitAsync(i){return this.getHit(i)}whenGraphicBounds(i,t){return this.graphicsCore?this.graphicsCore.whenGraphicBounds(i,t):Promise.reject()}computeAttachmentOrigin(i,t){return this.graphicsCore?this.graphicsCore.computeAttachmentOrigin(i,t):null}getSymbolLayerSize(i,t){return this.graphicsCore?this.graphicsCore.getSymbolLayerSize(i,t):null}maskOccludee(i){const t=this.graphicsCore?.objectStates;if(!t)return r();const{set:e,handle:s}=t.acquireOccludeeSet(null);return t.setUid(e,i.uid),s}highlight(i,e){const r=this.graphicsCore?.objectStates;if(!r)return O;if(i instanceof f)return O;const s=S(i);if(0===s.length)return O;if(s[0]instanceof t){const i=s.map((i=>i.uid)),{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setUids(t,i),n}if("number"==typeof s[0]){const i=s,{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setObjectIds(t,i),n}return O}_setupSuspendResumeExtent(){const{scaleVisibility:i,frustumVisibility:t}=this;if(null==i&&null==t)return;const e=({computedExtent:e,extentPadding:r})=>{this._suspendResumeExtent=E(e,this._suspendResumeExtent,C,r),null!=i&&i.setExtent(this._suspendResumeExtent),null!=t&&t.setExtent(this._suspendResumeExtent)};this.addHandles(o((()=>({computedExtent:this.graphicsCore?.computedExtent,extentPadding:this.graphicsCore?.extentPadding})),(i=>e(i)),l))}_updateClippingExtent(){const i=this.view.clippingArea;this.graphicsCore.setClippingExtent(i,this.view.spatialReference)&&this.graphicsCore.recreateAllGraphics()}};i([p()],x.prototype,"type",void 0),i([p({constructOnly:!0})],x.prototype,"owner",void 0),i([p()],x.prototype,"layer",null),i([p()],x.prototype,"view",null),i([p({constructOnly:!0})],x.prototype,"graphicsCore",void 0),i([p()],x.prototype,"scaleVisibility",null),i([p({constructOnly:!0})],x.prototype,"frustumVisibility",void 0),i([p()],x.prototype,"elevationAlignment",null),i([p()],x.prototype,"scaleVisibilitySuspended",null),i([p({readOnly:!0})],x.prototype,"frustumVisibilitySuspended",null),i([p()],x.prototype,"suspended",null),i([p({readOnly:!0})],x.prototype,"updating",null),i([p()],x.prototype,"loadedGraphics",null),i([p()],x.prototype,"fullOpacity",null),i([p()],x.prototype,"slicePlaneEnabled",null),i([p()],x.prototype,"drapeSourceType",void 0),i([p()],x.prototype,"updatePolicy",null),i([p({constructOnly:!0})],x.prototype,"scaleVisibilityEnabled",void 0),i([p({constructOnly:!0})],x.prototype,"frustumVisibilityEnabled",void 0),i([p()],x.prototype,"initializePromise",void 0),x=i([c("esri.views.3d.layers.graphics.GraphicsProcessor")],x);const O=r();export{x as GraphicsProcessor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.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 t}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{glLayout as i}from"../../../../support/buffer/glUtil.js";import{ShaderOutput as s}from"../../../../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SyncRenderPlugin as o}from"../../../../webgl-engine/effects/RenderPlugin.js";import{GLMaterials as n}from"../../../../webgl-engine/lib/GLMaterials.js";import{RenderSlot as a}from"../../../../webgl-engine/lib/RenderSlot.js";import{DrawParameters as l}from"../../../../webgl-engine/materials/DrawParameters.js";let m=class extends o{constructor(e){super(e),this._glMaterials=null,this._produces=new Map,this._renderGeometries=new Map,this._vaoCache=null,this._drawParameters=new l,this._bufferWriter=null}get produces(){return this._produces}get numFeatures(){const e=6;let r=0;return this._renderGeometries.forEach((t=>r+=t.numElements/e)),r}get usedMemory(){let e=0;return this._renderGeometries.forEach((r=>{e+=r.vao.usedMemory})),e}initialize(){this._bufferWriter=this.material.createBufferWriter(),this.material.produces.forEach(((e,r)=>{this._produces.set(r,(r=>r!==s.Highlight&&r!==s.ShadowHighlight&&e(r)))}))}destroy(){this._glMaterials.dispose();const e=this._renderGeometries.keys();for(const r of e)this.removeRenderGeometry(r)}acquireTechniques(e){const r=this.material;if(!r.shouldRender(e))return null;const{output:t,bind:i}=e,o=r.produces.get(i.slot);if(!o?.(t))return null;if(t===s.Highlight||t===s.ShadowHighlight)return null;const n=this._glMaterials.load(e.rctx,i.slot,t);return n?.beginSlot(i)}render(e,r){const t=this._renderGeometries;if(0===t.size)return;const{bind:i}=e,s=i.slot===a.OCCLUDER_MATERIAL||i.slot===a.TRANSPARENT_OCCLUDER_MATERIAL?i.slot:null,o=e.rctx;o.runAppleAmdDriverHelper(),o.bindTechnique(r,i,this.material.parameters);const n=r.program;for(const[a,l]of t)this._drawParameters.origin=l.localOrigin,n.bindDraw(i,this.material.parameters,this._drawParameters),r.ensureAttributeLocations(l.vao),o.bindVAO(l.vao),o.setPipelineState(r.getPipeline(!1,s)),o.drawArrays(r.primitiveType,0,l.numElements)}initializeRenderContext(e,r){this._glMaterials=new n(this.material,e.materials),this._vaoCache=e.renderContext.rctx.getVaoCache(this.material.vertexAttributeLocations,i(this._bufferWriter.vertexBufferLayout))}uninitializeRenderContext(){}addRenderGeometry(e,r,t){this.removeRenderGeometry(e);const i=this._vaoCache.newVao(r.data.byteLength);i.vertexBuffers.get("geometry").setSubData(new Uint8Array(r.data),0,0,r.data.byteLength);const s={localOrigin:t,vao:i,numElements:r.elementCount};return this._renderGeometries.set(e,s),s}removeRenderGeometry(e){const r=this._renderGeometries.get(e);null!=r&&(this._vaoCache.deleteVao(r.vao),this._renderGeometries.delete(e))}hasHighlightOptions(e){return!1}};e([r({constructOnly:!0})],m.prototype,"material",void 0),m=e([t("esri.views.3d.layers.graphics.pipeline.rendering.DirectRenderer")],m);export{m as DirectRenderer};
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{nullUid as r}from"../../../../../../core/uid.js";import{property as t}from"../../../../../../core/accessorSupport/decorators/property.js";import"../../../../../../core/has.js";import"../../../../../../core/Logger.js";import"../../../../../../core/RandomLCG.js";import{subclass as i}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{glLayout as s}from"../../../../support/buffer/glUtil.js";import{ShaderOutput as o}from"../../../../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SyncRenderPlugin as n}from"../../../../webgl-engine/effects/RenderPlugin.js";import{GLMaterials as a}from"../../../../webgl-engine/lib/GLMaterials.js";import{IntersectorType as l}from"../../../../webgl-engine/lib/IntersectorInterfaces.js";import{BoundingVolume as m}from"../../../../webgl-engine/lib/Object3D.js";import{RenderSlot as c}from"../../../../webgl-engine/lib/RenderSlot.js";import{DrawParameters as d}from"../../../../webgl-engine/materials/DrawParameters.js";import{HUDMaterial as u}from"../../../../webgl-engine/materials/HUDMaterial.js";let h=class extends n{constructor(e){super(e),this._glMaterials=null,this._produces=new Map,this._renderGeometries=new Map,this._vaoCache=null,this._drawParameters=new d,this._bufferWriter=null,this.slicePlaneEnabled=!1,this.isGround=!1,this.type=e.material instanceof u?l.HUD:l.OBJECT,this.layerUid=e.layerUid}get produces(){return this._produces}get numFeatures(){const e=6;let r=0;return this._renderGeometries.forEach((t=>r+=t.numElements/e)),r}get usedMemory(){let e=0;return this._renderGeometries.forEach((r=>{e+=r.vao.usedMemory})),e}intersect(e,t,i,s,o,n){const{material:a,_bufferWriter:l,layerUid:c}=this,d=this._renderGeometries;if(0!==d.size&&null!=l.intersect)for(const[u,h]of d){const{buffer:t,localOrigin:o,objectIds:n}=h;if(null==n)return;l.intersect(t.data,a.parameters,o,e,i,s,((t,i,s,o,l,d)=>{const u=n[s];e.handleObjectIntersection({object:{id:r,graphicUid:u,layerUid:c,boundingVolumeWorldSpace:new m,geometries:[{material:a}]},geometryId:0,primIndex:s},t,i,o,null,l,d)}))}}initialize(){this._bufferWriter=this.material.createBufferWriter(),this.material.produces.forEach(((e,r)=>{this._produces.set(r,(r=>r!==o.Highlight&&r!==o.ShadowHighlight&&e(r)))}))}destroy(){this._glMaterials.dispose();const e=this._renderGeometries.keys();for(const r of e)this.removeRenderGeometry(r)}acquireTechniques(e){const r=this.material;if(!r.shouldRender(e))return null;const{output:t,bind:i}=e,s=r.produces.get(i.slot);if(!s?.(t))return null;if(t===o.Highlight||t===o.ShadowHighlight)return null;const n=this._glMaterials.load(e.rctx,i.slot,t);return n?.beginSlot(i)}render(e,r){const t=this._renderGeometries;if(0===t.size)return;const{bind:i}=e,s=i.slot===c.OCCLUDER_MATERIAL||i.slot===c.TRANSPARENT_OCCLUDER_MATERIAL?i.slot:null,o=e.rctx;o.runAppleAmdDriverHelper(),o.bindTechnique(r,i,this.material.parameters);const n=r.program;for(const[a,l]of t)this._drawParameters.origin=l.localOrigin,n.bindDraw(i,this.material.parameters,this._drawParameters),r.ensureAttributeLocations(l.vao),o.bindVAO(l.vao),o.setPipelineState(r.getPipeline(!1,s)),o.drawArrays(r.primitiveType,0,l.numElements)}initializeRenderContext(e,r){this._glMaterials=new a(this.material,e.materials),this._vaoCache=e.renderContext.rctx.getVaoCache(this.material.vertexAttributeLocations,s(this._bufferWriter.vertexBufferLayout))}uninitializeRenderContext(){}addRenderGeometry(e,r,t,i){this.removeRenderGeometry(e);const s=this._vaoCache.newVao(t.data.byteLength);s.vertexBuffers.get("geometry").setSubData(new Uint8Array(t.data),0,0,t.data.byteLength);const o={buffer:t,localOrigin:i,vao:s,numElements:t.elementCount,objectIds:r};return this._renderGeometries.set(e,o),o}removeRenderGeometry(e){const r=this._renderGeometries.get(e);null!=r&&(this._vaoCache.deleteVao(r.vao),this._renderGeometries.delete(e))}hasHighlightOptions(e){return!1}};e([t({constructOnly:!0})],h.prototype,"material",void 0),h=e([i("esri.views.3d.layers.graphics.pipeline.rendering.DirectRenderer")],h);export{h as DirectRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.js";import r from"../../../../../../core/Accessor.js";import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{releaseMaybe as s}from"../../../../../../core/maybe.js";import{property as i}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{ONES as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ViewingMode as d}from"../../../../../ViewingMode.js";import{namedAnchorToHUDMaterialAnchorPos as c}from"../../placementUtils.js";import{DirectRenderer as l}from"./DirectRenderer.js";import{LodRenderer as m}from"./LodRenderer.js";import{defaultBoundingBox as u,createTexture as h,requiresHalfTexelOffset as p}from"../../../../support/engineContent/sdfPrimitives.js";import{CullFaceOptions as f}from"../../../../webgl-engine/lib/basicInterfaces.js";import{DefaultMaterial as w}from"../../../../webgl-engine/materials/DefaultMaterial.js";import{HUDMaterial as g}from"../../../../webgl-engine/materials/HUDMaterial.js";import{schematicMRRFactors as y}from"../../../../webgl-engine/materials/pbrUtils.js";let _=class extends r{constructor(e){super(),this.view=null,this.layerUid=null,this._renderGeometries=new Map,this._materials=new Map,this._directRenderers=new Map,this._lodRenderers=new Map,this.totalFeatures=0,this.view=e.view,this.layerUid=e.layerUid}initialize(){}destroy(){this.removeAllHandles(),this._lodRenderers.forEach((e=>e.destroy()))}async executeRenderCommands(e){for(const r of e)switch(r.id){case"create-material":await this._createMaterial(r);break;case"create-direct-renderer":await this._createDirectRenderer(r);break;case"add-direct-renderer-geometry":await this._addDirectRendererGeometry(r),this._updateFeatureCount();break;case"remove-direct-renderer-geometry":await this._removeDirectRendererGeometry(r),this._updateFeatureCount();break;case"create-lod-renderer":await this._createLodRenderer(r);break;case"add-lod-instances":await this._addLodInstances(r),this._updateFeatureCount();break;case"remove-lod-instances":await this._removeLodInstances(r),this._updateFeatureCount()}}_updateFeatureCount(){let e=0;for(const r of this._directRenderers.values())e+=r.numFeatures;for(const r of this._lodRenderers.values())e+=r.numFeatures;this._set("totalFeatures",e)}get usedMemory(){let e=0;for(const r of this._directRenderers.values())e+=r.usedMemory;for(const r of this._lodRenderers.values())e+=r.usedMemory;return e}async _createMaterial(e){const{view:r}=this,{sharedSymbolResources:i}=r;if(null==i)throw new Error("No shared symbol resources found!");const{textures:o}=i,a=r.state.viewingMode===d.Global;let n=null;switch(e.type){case"default":n=v(i,{physicalBasedRenderingEnabled:!0,slicePlaneEnabled:!1,castShadows:!0,isPrimitive:!0,screenSizePerspectiveEnabled:!0,doublePrecisionRequiresObfuscation:r._stage.renderView.renderingContext.driverTest.doublePrecisionRequiresObfuscation.result},a);break;case"hud":{const[e,r]=R(o,a);this.addHandles([t((()=>s(r)))]),n=e}break;default:throw new Error(`unable to create unknown material type ${e.type}`)}this._materials.set(e.materialId,n)}_getMaterial(e){return this._materials.get(e)}async _createDirectRenderer(e){const r=e.materialId,t=this._getMaterial(r);if(null==t)throw new Error(`material not found ${r}`);const{view:s}=this,i=new l({material:t});this._directRenderers.set(r,i),s._stage.addRenderPlugin(i),s._stage.renderView.renderer.updateHasFlags()}async _addDirectRendererGeometry(e){const r=e.renderGeometryId,t=e.materialId;await this._removeDirectRendererGeometry({renderGeometryId:r});const s=this._directRenderers.get(t);if(null==s)return void console.error("no renderer assigned to provided material");const i=s.addRenderGeometry(r,e.renderGeometryBuffer,e.localOrigin);this._renderGeometries.set(r,{renderGeometry:i,materialId:t}),this.view._stage.renderView.requestRender()}async _removeDirectRendererGeometry(e){const r=e.renderGeometryId,t=this._renderGeometries.get(r);if(null==t)return;const s=t.materialId,i=this._directRenderers.get(s);null!=i?i.removeRenderGeometry(e.renderGeometryId):console.error("no renderer assigned to provided material")}async _createLodRenderer(e){const r=new m({view:this.view,layerUid:this.layerUid}),t=new AbortController,s=e=>this._getMaterial(e);await r.doLoad(e.lodRenderGeometry,s,t.signal),this._lodRenderers.set(e.lodRendererId,r)}async _addLodInstances(e){const r=this._lodRenderers.get(e.lodRendererId);if(null==r)throw new Error("no lod renderer assigned to provided lod renderer Id");r.addInstances(e.data)}async _removeLodInstances(e){const r=this._lodRenderers.get(e.lodRendererId);if(null==r)throw new Error("no lod renderer assigned to provided lod renderer Id");r.removeInstances(e.featureIds)}};function R(e,r){const t={anchorPosition:c.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:u},s=null;if(null!=e){const r=e.fromData("circle-icon",(()=>h("circle")));t.textureId=r.texture.id,t.textureIsSignedDistanceField=!0,t.sampleSignedDistanceFieldTexelCenter=p("circle")}return[new g(t,r),s]}function v(e,r,t){const s={usePBR:r.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:y,ambient:a,diffuse:a,hasSlicePlane:r.slicePlaneEnabled,castShadows:r.castShadows,offsetTransparentBackfaces:!r.isPrimitive};return b(s),r.screenSizePerspectiveEnabled&&(s.screenSizePerspective=e.screenSizePerspectiveSettings),s.externalColor=n,s.isInstanced=!0,new w(s,{spherical:t,doublePrecisionRequiresObfuscation:!0})}function b(e){const r=e.opacity??1,t=r<1;return e.transparent=t,e.opacity=r,e.cullFace=t?f.None:f.Back,e}e([i({readOnly:!0})],_.prototype,"totalFeatures",void 0),_=e([o("esri.views.3d.layers.graphics.pipeline.rendering.FeaturePipelineRenderManager")],_);export{_ as FeaturePipelineRenderManager,v as createDefaultMaterial,R as createHudMaterial};
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import r from"../../../../../../core/Accessor.js";import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{releaseMaybe as s}from"../../../../../../core/maybe.js";import{property as i}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{ONES as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ViewingMode as d}from"../../../../../ViewingMode.js";import{namedAnchorToHUDMaterialAnchorPos as c}from"../../placementUtils.js";import{DirectRenderer as l}from"./DirectRenderer.js";import{LodRenderer as m}from"./LodRenderer.js";import{defaultBoundingBox as u,createTexture as h,requiresHalfTexelOffset as p}from"../../../../support/engineContent/sdfPrimitives.js";import{CullFaceOptions as f}from"../../../../webgl-engine/lib/basicInterfaces.js";import{DefaultMaterial as w}from"../../../../webgl-engine/materials/DefaultMaterial.js";import{HUDMaterial as y}from"../../../../webgl-engine/materials/HUDMaterial.js";import{schematicMRRFactors as g}from"../../../../webgl-engine/materials/pbrUtils.js";let _=class extends r{constructor(e){super(),this.view=null,this.layerUid=null,this._renderGeometries=new Map,this._materials=new Map,this._directRenderers=new Map,this._lodRenderers=new Map,this.totalFeatures=0,this.view=e.view,this.layerUid=e.layerUid}initialize(){}destroy(){this.removeAllHandles(),this._lodRenderers.forEach((e=>e.destroy()))}async executeRenderCommands(e){for(const r of e)switch(r.id){case"create-material":await this._createMaterial(r);break;case"create-direct-renderer":await this._createDirectRenderer(r);break;case"add-direct-renderer-geometry":await this._addDirectRendererGeometry(r),this._updateFeatureCount();break;case"remove-direct-renderer-geometry":await this._removeDirectRendererGeometry(r),this._updateFeatureCount();break;case"create-lod-renderer":await this._createLodRenderer(r);break;case"add-lod-instances":await this._addLodInstances(r),this._updateFeatureCount();break;case"remove-lod-instances":await this._removeLodInstances(r),this._updateFeatureCount()}}_updateFeatureCount(){let e=0;for(const r of this._directRenderers.values())e+=r.numFeatures;for(const r of this._lodRenderers.values())e+=r.numFeatures;this._set("totalFeatures",e)}get usedMemory(){let e=0;for(const r of this._directRenderers.values())e+=r.usedMemory;for(const r of this._lodRenderers.values())e+=r.usedMemory;return e}async _createMaterial(e){const{view:r}=this,{sharedSymbolResources:i}=r;if(null==i)throw new Error("No shared symbol resources found!");const{textures:o}=i,a=r.state.viewingMode===d.Global;let n=null;switch(e.type){case"default":n=v(i,{physicalBasedRenderingEnabled:!0,slicePlaneEnabled:!1,castShadows:!0,isPrimitive:!0,screenSizePerspectiveEnabled:!0,doublePrecisionRequiresObfuscation:r._stage.renderView.renderingContext.driverTest.doublePrecisionRequiresObfuscation.result},a);break;case"hud":{const[e,r]=R(o,a);this.addHandles([t((()=>s(r)))]),n=e}break;default:throw new Error(`unable to create unknown material type ${e.type}`)}this._materials.set(e.materialId,n)}_getMaterial(e){return this._materials.get(e)}async _createDirectRenderer(e){const r=e.materialId,t=this._getMaterial(r);if(null==t)throw new Error(`material not found ${r}`);const{view:s}=this,i=new l({material:t,layerUid:this.layerUid});this._directRenderers.set(r,i),s._stage.addRenderPlugin(i),s._stage.renderView.renderer.updateHasFlags()}async _addDirectRendererGeometry(e){const r=e.renderGeometryId,t=e.objectIds,s=e.materialId;await this._removeDirectRendererGeometry({renderGeometryId:r});const i=this._directRenderers.get(s);if(null==i)return void console.error("no renderer assigned to provided material");const o=i.addRenderGeometry(r,t,e.renderGeometryBuffer,e.localOrigin);this._renderGeometries.set(r,{renderGeometry:o,materialId:s}),this.view._stage.renderView.requestRender()}async _removeDirectRendererGeometry(e){const r=e.renderGeometryId,t=this._renderGeometries.get(r);if(null==t)return;const s=t.materialId,i=this._directRenderers.get(s);null!=i?i.removeRenderGeometry(e.renderGeometryId):console.error("no renderer assigned to provided material")}async _createLodRenderer(e){const r=new m({view:this.view,layerUid:this.layerUid}),t=new AbortController,s=e=>this._getMaterial(e);await r.doLoad(e.lodRenderGeometry,s,t.signal),this._lodRenderers.set(e.lodRendererId,r)}async _addLodInstances(e){const r=this._lodRenderers.get(e.lodRendererId);if(null==r)throw new Error("no lod renderer assigned to provided lod renderer Id");r.addInstances(e.data)}async _removeLodInstances(e){const r=this._lodRenderers.get(e.lodRendererId);if(null==r)throw new Error("no lod renderer assigned to provided lod renderer Id");r.removeInstances(e.featureIds)}};function R(e,r){const t={anchorPosition:c.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:u},s=null;if(null!=e){const r=e.fromData("circle-icon",(()=>h("circle")));t.textureId=r.texture.id,t.textureIsSignedDistanceField=!0,t.sampleSignedDistanceFieldTexelCenter=p("circle")}return[new y(t,r),s]}function v(e,r,t){const s={usePBR:r.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:g,ambient:a,diffuse:a,hasSlicePlane:r.slicePlaneEnabled,castShadows:r.castShadows,offsetTransparentBackfaces:!r.isPrimitive};return b(s),r.screenSizePerspectiveEnabled&&(s.screenSizePerspective=e.screenSizePerspectiveSettings),s.externalColor=n,s.isInstanced=!0,new w(s,{spherical:t,doublePrecisionRequiresObfuscation:!0})}function b(e){const r=e.opacity??1,t=r<1;return e.transparent=t,e.opacity=r,e.cullFace=t?f.None:f.Back,e}e([i({readOnly:!0})],_.prototype,"totalFeatures",void 0),_=e([o("esri.views.3d.layers.graphics.pipeline.rendering.FeaturePipelineRenderManager")],_);export{_ as FeaturePipelineRenderManager,v as createDefaultMaterial,R as createHudMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.js";import has from"../../../../../../core/has.js";import{throwIfAborted as r}from"../../../../../../core/promiseUtils.js";import"../../../../../../core/Logger.js";import"../../../../../../core/RandomLCG.js";import"../../../../../../core/Error.js";import{subclass as s}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{VertexAttribute as o}from"../../../../webgl-engine/lib/VertexAttribute.js";import{LodRenderer as n}from"../../../../webgl-engine/lib/lodRendering/LodRenderer.js";import{LodComponentRenderGeometry as t,LodComponentResources as i,LodLevelResources as a,LodResources as d}from"../../../../webgl-engine/lib/lodRendering/LodResources.js";let l=class{constructor(e){this._optionalFields=new Array,this._featureIdToInstanceIndex=new Map,this._disposeResourceHandles=new Array,this._lodRendererResources=null,this.layerUid=e.layerUid,this.view=e.view,this.sharedResources=this.view.sharedSymbolResources,this.scheduler=this.view.resourceController.scheduler}get numFeatures(){return this._featureIdToInstanceIndex.size}get usedMemory(){const e=this._lodRendererResources?.lodRenderer,r=e?.symbol;return(r?.computeUsedMemory()??0)+16*this._featureIdToInstanceIndex.size}destroy(){this._disposeResourceHandles.forEach((e=>e()))}async doLoad(e,s,n){has("enable-feature:objectAndLayerId-rendering")&&this._optionalFields.push(o.OBJECTANDLAYERIDCOLOR);const t=c((e=>s(e)),e),i=this.view._stage,a=t.getMaterials();i.addMany(a),this._addDisposeResource((()=>i.removeMany(a)));const d=t.getTextures();i.addMany(d),this._addDisposeResource((()=>{d.forEach((e=>e.unload())),i.removeMany(d)})),await Promise.all(d.map((e=>this.view._stage.schedule((()=>e.load(i.renderView.renderingContext)),n)))),r(n);const l=await this._createLodRenderer(t,n);this._lodRendererResources={lodRenderer:l,materials:a,textures:d}}addInstances(e){const r=this._lodRendererResources;if(null==r)return;const{featureIds:s,localTransforms:o,globalTransforms:n}=e,t=r.lodRenderer;if(null==t)return;const i=t.instanceData,a=s.length;for(let d=0;d<a;++d){const e=s[d],r=i.addInstance(),t=i.view,a=16*d;t.localTransform.copyFromTypedBuffer(r,o,a),t.globalTransform.copyFromTypedBuffer(r,n,a),i.updateModelTransform(r),i.setVisible(r,!0),this._featureIdToInstanceIndex.set(e,r)}}removeInstances(e){const r=this._lodRendererResources;if(null==r)return;const s=r.lodRenderer.instanceData,o=this._featureIdToInstanceIndex,n=e.length;for(let t=0;t<n;++t){const r=e[t],n=o.get(r);null!=n&&(s.removeInstance(n),o.delete(r))}}_addDisposeResource(e){this._disposeResourceHandles.push(e)}async _createLodRenderer(e,r){const s=this.view._stage,o={layerUid:this.layerUid,graphicUid:e=>1,notifyGraphicGeometryChanged:e=>1,notifyGraphicVisibilityChanged:e=>1},t=new n({symbol:e,optionalFields:this._optionalFields,metadata:o,shaderTransformation:null},this.scheduler);return t.slicePlaneEnabled=!1,this._addDisposeResource((()=>{s.removeRenderPlugin(t),t.destroy()})),await s.addRenderPlugin(t,r),t}};function c(e,r){const s=r.levels.map((r=>{const s=r.components.map((r=>{const s=e(r.materialId);if(!u(s))throw new Error("LodRenderer only supports DefaultMaterial");const o=new t(s,r.renderGeometryBuffer.data,r.renderGeometryBuffer.elementCount,r.boundingInfo);return new i(o)}));return new a(s,r.minScreenSpaceRadius)}));return new d(s)}function u(e){return null!=e&&"materialType"in e&&"default"===e.materialType}l=e([s("esri.views.3d.layers.graphics.pipeline.rendering.LodRenderer")],l);export{l as LodRenderer,u as isDefaultMaterial};
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import has from"../../../../../../core/has.js";import{throwIfAborted as r}from"../../../../../../core/promiseUtils.js";import"../../../../../../core/Logger.js";import"../../../../../../core/RandomLCG.js";import"../../../../../../core/Error.js";import{subclass as s}from"../../../../../../core/accessorSupport/decorators/subclass.js";import{VertexAttribute as t}from"../../../../webgl-engine/lib/VertexAttribute.js";import{LodRenderer as n}from"../../../../webgl-engine/lib/lodRendering/LodRenderer.js";import{LodComponentRenderGeometry as o,LodComponentResources as i,LodLevelResources as a,LodResources as d}from"../../../../webgl-engine/lib/lodRendering/LodResources.js";let l=class{constructor(e){this._optionalFields=new Array,this._featureIdToInstanceIndex=new Map,this._instanceIndexToFeatureId=new Map,this._disposeResourceHandles=new Array,this._lodRendererResources=null,this.layerUid=e.layerUid,this.view=e.view,this.sharedResources=this.view.sharedSymbolResources,this.scheduler=this.view.resourceController.scheduler}get numFeatures(){return this._featureIdToInstanceIndex.size}get usedMemory(){const e=this._lodRendererResources?.lodRenderer,r=e?.symbol;return(r?.computeUsedMemory()??0)+16*this._featureIdToInstanceIndex.size}destroy(){this._disposeResourceHandles.forEach((e=>e()))}async doLoad(e,s,n){has("enable-feature:objectAndLayerId-rendering")&&this._optionalFields.push(t.OBJECTANDLAYERIDCOLOR);const o=c((e=>s(e)),e),i=this.view._stage,a=o.getMaterials();i.addMany(a),this._addDisposeResource((()=>i.removeMany(a)));const d=o.getTextures();i.addMany(d),this._addDisposeResource((()=>{d.forEach((e=>e.unload())),i.removeMany(d)})),await Promise.all(d.map((e=>this.view._stage.schedule((()=>e.load(i.renderView.renderingContext)),n)))),r(n);const l=await this._createLodRenderer(o,n);this._lodRendererResources={lodRenderer:l,materials:a,textures:d}}addInstances(e){const r=this._lodRendererResources;if(null==r)return;const{featureIds:s,localTransforms:t,globalTransforms:n}=e,o=r.lodRenderer;if(null==o)return;const i=o.instanceData,a=s.length;for(let d=0;d<a;++d){const e=s[d],r=i.addInstance(),o=i.view,a=16*d;o.localTransform.copyFromTypedBuffer(r,t,a),o.globalTransform.copyFromTypedBuffer(r,n,a),i.updateModelTransform(r),i.setVisible(r,!0),this._featureIdToInstanceIndex.set(e,r),this._instanceIndexToFeatureId.set(r,e)}}removeInstances(e){const r=this._lodRendererResources;if(null==r)return;const s=r.lodRenderer.instanceData,t=this._featureIdToInstanceIndex,n=e.length;for(let o=0;o<n;++o){const r=e[o],n=t.get(r);null!=n&&(s.removeInstance(n),t.delete(r),this._instanceIndexToFeatureId.delete(n))}}_addDisposeResource(e){this._disposeResourceHandles.push(e)}async _createLodRenderer(e,r){const s=this.view._stage,t={layerUid:this.layerUid,graphicUid:e=>this._instanceIndexToFeatureId.get(e)??-1,notifyGraphicGeometryChanged:e=>1,notifyGraphicVisibilityChanged:e=>1},o=new n({symbol:e,optionalFields:this._optionalFields,metadata:t,shaderTransformation:null},this.scheduler);return o.slicePlaneEnabled=!1,this._addDisposeResource((()=>{s.removeRenderPlugin(o),o.destroy()})),await s.addRenderPlugin(o,r),o}};function c(e,r){const s=r.levels.map((r=>{const s=r.components.map((r=>{const s=e(r.materialId);if(!u(s))throw new Error("LodRenderer only supports DefaultMaterial");const t=new o(s,r.renderGeometryBuffer.data,r.renderGeometryBuffer.elementCount,r.boundingInfo);return new i(t)}));return new a(s,r.minScreenSpaceRadius)}));return new d(s)}function u(e){return null!=e&&"materialType"in e&&"default"===e.materialType}l=e([s("esri.views.3d.layers.graphics.pipeline.rendering.LodRenderer")],l);export{l as LodRenderer,u as isDefaultMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ViewingMode as e}from"../../../../../ViewingMode.js";import{RenderCommandEncoder as r}from"./RenderCommandEncoder.js";class t{constructor(r){this._idCounter=0,this._bufferWriters=new Map,this._dispatchRenderCommandsCallback=async()=>{},this.globalViewingMode=!1,this.globalViewingMode=r.viewingMode===e.Global,this._dispatchRenderCommandsCallback=r.dispatchRenderCommandsCallback}generateId(e=""){return`${e}${this._idCounter++}`}createEncoder(){return new r(this)}async dispatchRenderCommands(e,r){0!==e.length&&await this._dispatchRenderCommandsCallback(e,r)}registerRenderGeometryBufferWriter(e,r){this._bufferWriters.set(e,r)}getRenderGeometryBufferWriter(e){return this._bufferWriters.get(e)}}export{t as RenderCommandContext};
5
+ import{ViewingMode as e}from"../../../../../ViewingMode.js";import{RenderCommandEncoder as r}from"./RenderCommandEncoder.js";class t{constructor(r){this._idCounter=0,this._bufferWriters=new Map,this._dispatchRenderCommandsCallback=async()=>{},this.globalViewingMode=!1,this.globalViewingMode=r.viewingMode===e.Global,this._dispatchRenderCommandsCallback=r.dispatchRenderCommandsCallback}generateUID(){return this._idCounter++,this._idCounter}generateId(e=""){return`${e}${this.generateUID()}`}createEncoder(){return new r(this)}async dispatchRenderCommands(e,r){0!==e.length&&await this._dispatchRenderCommandsCallback(e,r)}registerRenderGeometryBufferWriter(e,r){this._bufferWriters.set(e,r)}getRenderGeometryBufferWriter(e){return this._bufferWriters.get(e)}}export{t as RenderCommandContext};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{getContinuousIndexArray as e}from"../../../../../../geometry/support/Indices.js";import{createHudMaterial as r}from"./FeaturePipelineRenderManager.js";import{RenderGeometryBufferWriter as t}from"./RenderGeometryBufferWriter.js";import{BoundingInfo as n}from"../../../../webgl-engine/lib/BoundingInfo.js";import{VertexAttribute as a}from"../../../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as s}from"../../../../webgl-engine/materials/DefaultMaterial.js";class o{constructor(e){this._context=e,this._commands=[],this._transferables=new Set}createMaterial(e){const n=this._context,a=n.generateId("material");switch(e){case"default":{const e=new s({},{spherical:this._context.globalViewingMode,doublePrecisionRequiresObfuscation:!0}),r=new t(e);n.registerRenderGeometryBufferWriter(a,r)}break;case"hud":{const e=r(null,this._context.globalViewingMode)[0],s=new t(e);n.registerRenderGeometryBufferWriter(a,s)}}return this._commands.push({id:"create-material",type:e,materialId:a}),a}createDirectRenderer(e){const r=this._context.generateId("material-renderer");return this._commands.push({id:"create-direct-renderer",materialRendererId:r,materialId:e}),r}addDirectRendererGeometry(e,r,t){const n=r.materialId,a=this._context.getRenderGeometryBufferWriter(n);if(null==a)throw new Error(`no bufferwriter found for material ${n}`);const s=a.createBuffer(r,t);this._transferables.add(s.data),this._commands.push({id:"add-direct-renderer-geometry",renderGeometryId:e,materialId:n,renderGeometryBuffer:s,localOrigin:t})}removeDirectRendererGeometry(e){this._commands.push({id:"remove-direct-renderer-geometry",renderGeometryId:e})}createLodRenderer(r){const t=this._context.generateId("lod-renderer"),s={levels:r.levels.map((r=>({components:r.components.map((r=>{const t=r.attributes.get(a.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const s=3,o=e(t.indices.length/s),d=new n(o,s,t),i=this._context.getRenderGeometryBufferWriter(r.materialId);if(null==i)throw new Error("writer not found");const c=i.createBuffer(r,null);this._transferables.add(c.data);return{materialId:r.materialId,renderGeometryBuffer:c,boundingInfo:{bbMax:d.bbMax,bbMin:d.bbMin}}})),minScreenSpaceRadius:r.minScreenSpaceRadius})))};return this._commands.push({id:"create-lod-renderer",lodRendererId:t,lodRenderGeometry:s}),t}addLodInstances(e,r){this._commands.push({id:"add-lod-instances",lodRendererId:e,data:r}),this._transferables.add(r.featureIds.buffer),this._transferables.add(r.globalTransforms.buffer),this._transferables.add(r.localTransforms.buffer)}removeLodInstances(e,r){this._commands.push({id:"remove-lod-instances",lodRendererId:e,featureIds:r}),this._transferables.add(r.buffer)}append(e){if(e._context!==this._context)throw new Error("Cannot append encoders from different contexts");const{_commands:r,_transferables:t}=this;for(const n of e._commands)r.push(n);for(const n of e._transferables)t.add(n)}async dispatch(){const e=this._commands,r=Array.from(this._transferables);this._clearCommandBuffer(),await this._context.dispatchRenderCommands(e,r)}_clearCommandBuffer(){this._commands=[],this._transferables.clear()}}export{o as RenderCommandEncoder,a as VertexAttribute};
5
+ import{getContinuousIndexArray as e}from"../../../../../../geometry/support/Indices.js";import{createHudMaterial as r}from"./FeaturePipelineRenderManager.js";import{RenderGeometryBufferWriter as t}from"./RenderGeometryBufferWriter.js";import{BoundingInfo as n}from"../../../../webgl-engine/lib/BoundingInfo.js";import{VertexAttribute as s}from"../../../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as a}from"../../../../webgl-engine/materials/DefaultMaterial.js";class o{constructor(e){this._context=e,this._commands=[],this._transferables=new Set}createMaterial(e){const n=this._context,s=n.generateId("material");switch(e){case"default":{const e=new a({},{spherical:this._context.globalViewingMode,doublePrecisionRequiresObfuscation:!0}),r=new t(e);n.registerRenderGeometryBufferWriter(s,r)}break;case"hud":{const e=r(null,this._context.globalViewingMode)[0],a=new t(e);n.registerRenderGeometryBufferWriter(s,a)}}return this._commands.push({id:"create-material",type:e,materialId:s}),s}createDirectRenderer(e){const r=this._context.generateId("material-renderer");return this._commands.push({id:"create-direct-renderer",materialRendererId:r,materialId:e}),r}addDirectRendererGeometry(e,r,t){const n=r.materialId,s=this._context.getRenderGeometryBufferWriter(n);if(null==s)throw new Error(`no bufferwriter found for material ${n}`);const a=s.createBuffer(r,t);this._transferables.add(a.data),null!=r.objectIds&&this._transferables.add(r.objectIds.buffer),this._commands.push({id:"add-direct-renderer-geometry",renderGeometryId:e,materialId:n,localOrigin:t,renderGeometryBuffer:a,objectIds:r.objectIds})}removeDirectRendererGeometry(e){this._commands.push({id:"remove-direct-renderer-geometry",renderGeometryId:e})}createLodRenderer(r){const t=this._context.generateId("lod-renderer"),a={levels:r.levels.map((r=>({components:r.components.map((r=>{const t=r.attributes.get(s.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const a=3,o=e(t.indices.length/a),d=new n(o,a,t),i=this._context.getRenderGeometryBufferWriter(r.materialId);if(null==i)throw new Error("writer not found");const c=i.createBuffer(r,null);this._transferables.add(c.data);return{materialId:r.materialId,renderGeometryBuffer:c,boundingInfo:{bbMax:d.bbMax,bbMin:d.bbMin}}})),minScreenSpaceRadius:r.minScreenSpaceRadius})))};return this._commands.push({id:"create-lod-renderer",lodRendererId:t,lodRenderGeometry:a}),t}addLodInstances(e,r){this._commands.push({id:"add-lod-instances",lodRendererId:e,data:r}),this._transferables.add(r.featureIds.buffer),this._transferables.add(r.globalTransforms.buffer),this._transferables.add(r.localTransforms.buffer)}removeLodInstances(e,r){this._commands.push({id:"remove-lod-instances",lodRendererId:e,featureIds:r}),this._transferables.add(r.buffer)}append(e){if(e._context!==this._context)throw new Error("Cannot append encoders from different contexts");const{_commands:r,_transferables:t}=this;for(const n of e._commands)r.push(n);for(const n of e._transferables)t.add(n)}async dispatch(){const e=this._commands,r=Array.from(this._transferables);this._clearCommandBuffer(),await this._context.dispatchRenderCommands(e,r)}_clearCommandBuffer(){this._commands=[],this._transferables.clear()}}export{o as RenderCommandEncoder,s as VertexAttribute};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{computeRenderCoordinates as t,computeTileCenterRenderCoordinates as r}from"../featureData/processingUtils.js";import{inputAttributesToAttributesMap as o}from"./symbolizationUtils.js";import{Attribute as n}from"../../../../webgl-engine/lib/Attribute.js";import{VertexAttribute as a}from"../../../../webgl-engine/lib/VertexAttribute.js";class i{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext.createEncoder();this.materialId=e.createMaterial("hud"),e.createDirectRenderer(this.materialId),await e.dispatch(),this._loaded=!0}async createAddCommand(i){const s=this._context.renderCommandContext.createEncoder();if(null==this.materialId)throw new Error("expected material not to be null");const{featureCount:l,id:d}=i;if(0===l)return s;const m=t(i,this._context),c=r(i,this._context),h=new Float64Array([0,0,1]),w=new Float64Array([255,255,255,255]),u=new Float64Array([24,24]),A=new Float64Array([0,0,0,1]),y=new Float64Array([0,0]),_=new Float64Array([0]),f=new Uint32Array(l);for(let e=0;e<l;++e)f[e]=e;const x=new Uint32Array(l);for(let e=0;e<l;++e)x[e]=0;const C=new n(m,f,3,!0),I=new n(h,x,3,!0),b=new n(y,x,2,!0),g=new n(w,x,4,!0),p=new n(_,x,1,!0),E=new n(u,x,2,!0),F=new n(A,x,4,!0),O=[[a.POSITION,C],[a.NORMAL,I],[a.UV0,b],[a.COLOR,g],[a.ROTATION,p],[a.SIZE,E],[a.CENTEROFFSETANDDISTANCE,F]],R={attributes:o(O),objectAndLayerIdColor:void 0,transformation:e(),materialId:this.materialId};return s.addDirectRendererGeometry(d,R,c),s}async createRemoveCommand(e){const t=this._context.renderCommandContext.createEncoder();return t.removeDirectRendererGeometry(e.id),t}}export{i as TestSymbol};
5
+ import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{readObjectIds as t,computeRenderCoordinates as r,computeTileCenterRenderCoordinates as o}from"../featureData/processingUtils.js";import{inputAttributesToAttributesMap as n}from"./symbolizationUtils.js";import{Attribute as a}from"../../../../webgl-engine/lib/Attribute.js";import{VertexAttribute as i}from"../../../../webgl-engine/lib/VertexAttribute.js";class s{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext.createEncoder();this.materialId=e.createMaterial("hud"),e.createDirectRenderer(this.materialId),await e.dispatch(),this._loaded=!0}async createAddCommand(s){if(null==this.materialId)throw new Error("expected material not to be null");const d=this._context,l=d.renderCommandContext.createEncoder(),{featureCount:m,id:c}=s;if(0===m)return l;const h=t(s),w=r(s,d),u=o(s,d),A=new Float64Array([0,0,1]),y=new Float64Array([255,255,255,255]),f=new Float64Array([24,24]),C=new Float64Array([0,0,0,1]),I=new Float64Array([0,0]),_=new Float64Array([0]),b=new Uint32Array(m);for(let e=0;e<m;++e)b[e]=e;const g=new Uint32Array(m);for(let e=0;e<m;++e)g[e]=0;const x=new a(w,b,3,!0),p=new a(A,g,3,!0),E=new a(I,g,2,!0),F=new a(y,g,4,!0),O=new a(_,g,1,!0),R=new a(f,g,2,!0),j=new a(C,g,4,!0),D=[[i.POSITION,x],[i.NORMAL,p],[i.UV0,E],[i.COLOR,F],[i.ROTATION,O],[i.SIZE,R],[i.CENTEROFFSETANDDISTANCE,j]],N={attributes:n(D),objectAndLayerIdColor:void 0,transformation:e(),materialId:this.materialId,objectIds:h};return l.addDirectRendererGeometry(c,N,u),l}async createRemoveCommand(e){const t=this._context.renderCommandContext.createEncoder();return t.removeDirectRendererGeometry(e.id),t}}export{s as TestSymbol};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{disposeMaybe as t}from"../../../../core/maybe.js";import s from"../../../../core/PooledArray.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as n,l as o,h as a,v as l,f as h,k as c}from"../../../../chunks/vec32.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as u}from"../../../../chunks/vec42.js";import{create as m,offset as p,contains as g,containsPoint as _,set as f,positiveInfinity as P,equals as b}from"../../../../geometry/support/aaBoundingBox.js";import{create as x}from"../../../../geometry/support/plane.js";import{fromPoints as S}from"../../../../geometry/support/ray.js";import{PclTarget as R}from"./Intersector.js";import{PointCloudHighlights as w}from"./PointCloudHighlights.js";import{isDepth as z,ShaderOutput as A,isColorOrColorEmission as j}from"../../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SyncRenderPlugin as y}from"../../webgl-engine/effects/RenderPlugin.js";import{Default3D as I}from"../../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{newIntersectorResult as O}from"../../webgl-engine/lib/Intersector.js";import{IntersectorType as q,StoreResults as v}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{RenderSlot as E}from"../../webgl-engine/lib/RenderSlot.js";import{VertexArrayObject as L}from"../../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as T}from"../../webgl-engine/lib/VertexAttribute.js";import{P as M,g as H}from"../../../../chunks/PointRenderer.glsl.js";import{PointRendererTechnique as N}from"../../webgl-engine/shaders/PointRendererTechnique.js";import{PointRendererTechniqueConfiguration as F}from"../../webgl-engine/shaders/PointRendererTechniqueConfiguration.js";import{BufferObject as U}from"../../../webgl/BufferObject.js";import{DataType as B,PrimitiveType as C,Usage as W}from"../../../webgl/enums.js";import{VertexElementDescriptor as D}from"../../../webgl/VertexElementDescriptor.js";const V=new Map([["positions",[new D(T.POSITION,3,B.FLOAT,0,12)]],["colors",[new D(T.COLOR,3,B.UNSIGNED_BYTE,0,3,!0)]]]);let k=class extends y{constructor(e){super(e),this.type=q.PCL,this.isGround=!1,this._passParameters=new M,this._highlights=new w({forEachNode:e=>this.forEachNode(e),addHighlight:(e,t,s)=>this._addHighlight(e,t,s),removeHighlight:(e,t)=>this._removeHighlight(e,t)}),this.produces=new Map([[E.OPAQUE_MATERIAL,e=>!(z(e)||e===A.Highlight&&this._highlights.empty)],[E.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>z(e)]]),this.layerUid="",this._slicePlaneEnabled=!1,this._configuration=new F,this._nodes=new s}hasHighlightOptions(e){return this._highlights.hasHighlightOptions(e)}initializeRenderContext(e){this._context=e,e.requestRender()}uninitializeRenderContext(){}intersect(e,t,s,i){const r=d(),f=d(),P=d(),b=d(),w=x(),z=e.camera.perScreenPixelRatio/2,A=e.camera.near;n(f,i,s);const j=1/o(f);a(f,f,j),l(P,f),u(w,f[0],f[1],f[2],-h(f,s));const y=new J,I=new J,q=new Array,E=m(),L=m(this._passParameters.clipBox);p(L,-s[0],-s[1],-s[2],L),this._nodes.forAll((o=>{const a=o.splatSize*this._passParameters.scaleFactor;let l=o.obb.minimumDistancePlane(w),d=o.obb.maximumDistancePlane(w);l-=Q(a,l+A,this._passParameters,z,o.isLeaf),d-=Q(a,d+A,this._passParameters,z,o.isLeaf);const u=d<0,m=null!=y.dist&&null!=I.dist&&y.dist<l*j&&I.dist>d*j;if(u||m)return;const x=G(a,d+A,this._passParameters,z,o.isLeaf);if(!o.obb.intersectRay(s,f,x))return;const S=x*x;o.obb.toAaBoundingBox(E),p(E,-s[0],-s[1],-s[2],E);const R=!g(L,E);n(b,o.origin,s);const O=o.coordinates.length/3;for(let n=0;n<O;n++){if(r[0]=b[0]+o.coordinates[3*n],r[1]=b[1]+o.coordinates[3*n+1],r[2]=b[2]+o.coordinates[3*n+2],R&&!_(L,r))continue;const l=h(r,f),d=c(r)-l*l;if(d>S)continue;let u=l+A;const m=Q(a,u,this._passParameters,z,o.isLeaf);if(l-m<0)continue;u-=m;const p=G(a,u,this._passParameters,z,o.isLeaf);if(d>p*p)continue;const g=(l-m)*j,x=e=>(e.point=Y(o,n,e.point),e.dist=g,e.normal=P,e.node=o,e.pointId=n,e.layerUid=this.layerUid,e);if((null==y.dist||g<y.dist)&&(null==t||t(s,i,g))&&x(y),e.options.store!==v.MIN&&(null==I.dist||g>I.dist)&&(null==t||t(s,i,g))&&x(I),e.options.store===v.ALL&&(null==t||t(s,i,g))){const e=new J;q.push(x(e))}}}));const T=e=>{const{layerUid:t,node:s,pointId:i}=e;return new R(e.point,t,i,(()=>this.createGraphic(s,i,e.point)))},M=(e,t)=>{const s=T(t);e.set(this.type,s,t.dist,t.normal)};if(K(y)){const t=e.results.min;(null==t.dist||y.dist<t.dist)&&M(t,y)}if(K(I)&&e.options.store!==v.MIN){const t=e.results.max;(null==t.dist||I.dist>t.dist)&&M(t,I)}if(e.options.store===v.ALL){const t=S(s,i);for(const s of q){const i=O(t);M(i,s),e.results.all.push(i)}}}acquireTechniques(e){return 0!==this._nodes.length&&(j(e.output)||z(e.output)&&e.bind.slot===E.OPAQUE_MATERIAL_WITHOUT_NORMALS||e.output===A.Highlight)?(this._nodes.forAll((t=>this._initNode(e,t))),this._configuration.drawScreenSize=this._passParameters.drawScreenSpace,this._configuration.useFixedSizes=this._passParameters.useFixedSizes,this._configuration.hasSlicePlane=this._slicePlaneEnabled,this._configuration.hasOccludees=e.bind.hasOccludees,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.output=e.output,this._context.techniques.acquire(N,this._configuration)):null}render(e,t){const{rctx:s,bind:i,output:r}=e,n=s.bindTechnique(t,i,this._passParameters),o=r===A.Highlight,a=i.highlight?.name??null;o&&!a||this._nodes.forAll((t=>{0===t.coordinates.length||o&&!t.highlightMap.has(a)||(n.bindDraw(i,this._passParameters,t),s.bindVAO(t.vao),o?this._renderHighlightFragments(e,t):s.drawArrays(C.POINTS,0,t.coordinates.length/3))}))}_renderHighlightFragments(e,t){const{highlightMap:s}=t,{rctx:i,bind:r}=e,{highlight:n}=r;if(!n)return;const o=n.name,a=s.get(o);if(!a||0===a.length)return;const{highlightOrderMap:l,highlightLevel:h}=r;if(null==h)return;for(const g of s.keys())if(g!==o){const e=l.get(g);if(void 0!==e&&e>h)return}let c=0,d=a[0].componentIndex,u=d+1;const m=()=>{for(;c<a.length&&a[c].id.highlightName!==o;)d=a[c].componentIndex,++c;u=d+1};m();const p=(e,t)=>{const s=t-e;s>0&&i.drawArrays(C.POINTS,e,s)};for(;c<a.length;){const e=a[c];if(e.id.highlightName!==o){p(d,u),++c,m();continue}const t=e.componentIndex;t!==u&&(p(d,u),d=t),u=t+1,++c}p(d,u)}set useFixedSizes(e){this._passParameters.useFixedSizes!==e&&(this._passParameters.useFixedSizes=e,this._requestRender())}get useFixedSizes(){return this._passParameters.useFixedSizes}set scaleFactor(e){this._passParameters.scaleFactor!==e&&(this._passParameters.scaleFactor=e,this._requestRender())}get scaleFactor(){return this._passParameters.scaleFactor}set minSizePx(e){this._passParameters.minSizePx!==e&&(this._passParameters.minSizePx=e,this._requestRender())}get minSizePx(){return this._passParameters.minSizePx}set useRealWorldSymbolSizes(e){this._passParameters.useRealWorldSymbolSizes!==e&&(this._passParameters.useRealWorldSymbolSizes=e,this._requestRender())}get useRealWorldSymbolSizes(){return this._passParameters.useRealWorldSymbolSizes}set size(e){this._passParameters.size!==e&&(this._passParameters.size=e,this._requestRender())}get size(){return this._passParameters.size}set sizePx(e){this._passParameters.sizePx!==e&&(this._passParameters.sizePx=e,this._requestRender())}get sizePx(){return this._passParameters.sizePx}set clippingBox(e){f(this._passParameters.clipBox,e||P)}get _clippingEnabled(){return!b(this._passParameters.clipBox,P,((e,t)=>e===t))}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this._requestRender())}addNode(e){this._nodes.push(e),this._highlights.nodeAdded(e),this._requestRender()}removeNode(e){let s=null;return this._nodes.filterInPlace((i=>i.id!==e||(s=i,i.vao=t(i.vao),this._highlights.nodeRemoved(i),!1))),this._requestRender(),s}forEachNode(e){this._nodes.forAll(e)}removeAll(){this._nodes.forAll((e=>e.vao=t(e.vao))),this._highlights.removeAll(),this._nodes.clear(),this._requestRender()}highlight(e,t){return this._highlights.add(e,t)}_addHighlight(e,t,s){e.addHighlight(t,s),this._requestRender()}_removeHighlight(e,t){e.removeHighlight(t),this._requestRender()}_initNode(e,t){t.vao??=new L(e.rctx,I,V,new Map([["positions",U.createVertex(e.rctx,W.STATIC_DRAW,t.coordinates)],["colors",U.createVertex(e.rctx,W.STATIC_DRAW,t.rgb)]]))}_requestRender(){this._context&&this._context.requestRender()}};function G(e,t,s,i,r){if(s.drawScreenSpace)return s.fixedSize*t*i;const n=H(r)*t*i;return s.useFixedSizes?Math.min(s.fixedSize/2,n):s.screenMinSize>0?Math.min(Math.max(s.screenMinSize*t*i,e/2),n):Math.min(e/2,n)}function Q(e,t,s,i,r){return s.drawScreenSpace?0:G(e,t,s,i,r)}function Y(e,t,s){return null==s&&(s=d()),s[0]=e.origin[0]+e.coordinates[3*t],s[1]=e.origin[1]+e.coordinates[3*t+1],s[2]=e.origin[2]+e.coordinates[3*t+2],s}e([i({constructOnly:!0})],k.prototype,"createGraphic",void 0),k=e([r("esri.views.3d.layers.i3s.PointCloudRenderer")],k);class J{constructor(){this.node=null,this.pointId=null,this.point=null,this.dist=null,this.normal=null,this.layerUid=""}}function K(e){return null!=e.dist&&null!=e.point&&null!=e.pointId&&null!=e.node}export{k as PointCloudRenderer};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{disposeMaybe as t}from"../../../../core/maybe.js";import s from"../../../../core/PooledArray.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as n,l as o,h as a,v as l,f as h,k as c}from"../../../../chunks/vec32.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as u}from"../../../../chunks/vec42.js";import{create as m,offset as p,contains as g,containsPoint as _,set as f,positiveInfinity as P,equals as b}from"../../../../geometry/support/aaBoundingBox.js";import{create as x}from"../../../../geometry/support/plane.js";import{fromPoints as S}from"../../../../geometry/support/ray.js";import{PclTarget as R}from"./Intersector.js";import{PointCloudHighlights as w}from"./PointCloudHighlights.js";import{isDepth as z,ShaderOutput as A,isColorOrColorEmission as j}from"../../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SyncRenderPlugin as y}from"../../webgl-engine/effects/RenderPlugin.js";import{Default3D as I}from"../../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{newIntersectorResult as O}from"../../webgl-engine/lib/Intersector.js";import{IntersectorType as v,StoreResults as E}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{RenderSlot as L}from"../../webgl-engine/lib/RenderSlot.js";import{VertexArrayObject as q}from"../../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as T}from"../../webgl-engine/lib/VertexAttribute.js";import{P as M,g as H}from"../../../../chunks/PointRenderer.glsl.js";import{PointRendererTechnique as N}from"../../webgl-engine/shaders/PointRendererTechnique.js";import{PointRendererTechniqueConfiguration as F}from"../../webgl-engine/shaders/PointRendererTechniqueConfiguration.js";import{BufferObject as U}from"../../../webgl/BufferObject.js";import{DataType as B,PrimitiveType as C,Usage as W}from"../../../webgl/enums.js";import{VertexElementDescriptor as D}from"../../../webgl/VertexElementDescriptor.js";const V=new Map([["positions",[new D(T.POSITION,3,B.FLOAT,0,12)]],["colors",[new D(T.COLOR,3,B.UNSIGNED_BYTE,0,3,!0)]]]);let k=class extends y{constructor(e){super(e),this.type=v.PCL,this.isGround=!1,this._passParameters=new M,this._highlights=new w({forEachNode:e=>this.forEachNode(e),addHighlight:(e,t,s)=>this._addHighlight(e,t,s),removeHighlight:(e,t)=>this._removeHighlight(e,t)}),this.produces=new Map([[L.OPAQUE_MATERIAL,e=>!(z(e)||e===A.Highlight&&this._highlights.empty)],[L.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>z(e)]]),this.layerUid="",this._slicePlaneEnabled=!1,this._configuration=new F,this._nodes=new s}hasHighlightOptions(e){return this._highlights.hasHighlightOptions(e)}initializeRenderContext(e){this._context=e,e.requestRender()}uninitializeRenderContext(){}intersect(e,t,s,i){const r=d(),f=d(),P=d(),b=d(),w=x(),z=e.camera.perScreenPixelRatio/2,A=e.camera.near;n(f,i,s);const j=1/o(f);a(f,f,j),l(P,f),u(w,f[0],f[1],f[2],-h(f,s));const y=new J,I=new J,v=new Array,L=m(),q=m(this._passParameters.clipBox);p(q,-s[0],-s[1],-s[2],q),this._nodes.forAll((o=>{const a=o.splatSize*this._passParameters.scaleFactor;let l=o.obb.minimumDistancePlane(w),d=o.obb.maximumDistancePlane(w);l-=Q(a,l+A,this._passParameters,z,o.isLeaf),d-=Q(a,d+A,this._passParameters,z,o.isLeaf);const u=d<0,m=null!=y.dist&&null!=I.dist&&y.dist<l*j&&I.dist>d*j;if(u||m)return;const x=G(a,d+A,this._passParameters,z,o.isLeaf);if(!o.obb.intersectRay(s,f,x))return;const S=x*x;o.obb.toAaBoundingBox(L),p(L,-s[0],-s[1],-s[2],L);const R=!g(q,L);n(b,o.origin,s);const O=o.coordinates.length/3;for(let n=0;n<O;n++){if(r[0]=b[0]+o.coordinates[3*n],r[1]=b[1]+o.coordinates[3*n+1],r[2]=b[2]+o.coordinates[3*n+2],R&&!_(q,r))continue;const l=h(r,f),d=c(r)-l*l;if(d>S)continue;let u=l+A;const m=Q(a,u,this._passParameters,z,o.isLeaf);if(l-m<0)continue;u-=m;const p=G(a,u,this._passParameters,z,o.isLeaf);if(d>p*p)continue;const g=(l-m)*j,x=e=>(e.point=Y(o,n,e.point),e.dist=g,e.normal=P,e.node=o,e.pointId=n,e.layerUid=this.layerUid,e);if((null==y.dist||g<y.dist)&&(null==t||t(s,i,g))&&x(y),e.options.store!==E.MIN&&(null==I.dist||g>I.dist)&&(null==t||t(s,i,g))&&x(I),e.options.store===E.ALL&&(null==t||t(s,i,g))){const e=new J;v.push(x(e))}}}));const T=e=>{const{layerUid:t,node:s,pointId:i}=e;return new R(e.point,t,i,(()=>this.createGraphic(s,i,e.point)))},M=(e,t)=>{const s=T(t);e.set(this.type,s,t.dist,t.normal)};if(K(y)){const t=e.results.min;(null==t.dist||y.dist<t.dist)&&M(t,y)}if(K(I)&&e.options.store!==E.MIN){const t=e.results.max;(null==t.dist||I.dist>t.dist)&&M(t,I)}if(e.options.store===E.ALL){const t=S(s,i);for(const s of v){const i=O(t);M(i,s),e.results.all.push(i)}}}acquireTechniques(e){return 0!==this._nodes.length&&(j(e.output)||z(e.output)&&e.bind.slot===L.OPAQUE_MATERIAL_WITHOUT_NORMALS||e.output===A.Highlight)?(this._nodes.forAll((t=>this._initNode(e,t))),this._configuration.drawScreenSize=this._passParameters.drawScreenSpace,this._configuration.useFixedSizes=this._passParameters.useFixedSizes,this._configuration.hasSlicePlane=this._slicePlaneEnabled,this._configuration.hasOccludees=e.bind.hasOccludees,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.output=e.output,this._context.techniques.get(N,this._configuration)):null}render(e,t){const{rctx:s,bind:i,output:r}=e,n=s.bindTechnique(t,i,this._passParameters),o=r===A.Highlight,a=i.highlight?.name??null;o&&!a||this._nodes.forAll((t=>{0===t.coordinates.length||o&&!t.highlightMap.has(a)||(n.bindDraw(i,this._passParameters,t),s.bindVAO(t.vao),o?this._renderHighlightFragments(e,t):s.drawArrays(C.POINTS,0,t.coordinates.length/3))}))}_renderHighlightFragments(e,t){const{highlightMap:s}=t,{rctx:i,bind:r}=e,{highlight:n}=r;if(!n)return;const o=n.name,a=s.get(o);if(!a||0===a.length)return;const{highlightOrderMap:l,highlightLevel:h}=r;if(null==h)return;for(const g of s.keys())if(g!==o){const e=l.get(g);if(void 0!==e&&e>h)return}let c=0,d=a[0].componentIndex,u=d+1;const m=()=>{for(;c<a.length&&a[c].id.highlightName!==o;)d=a[c].componentIndex,++c;u=d+1};m();const p=(e,t)=>{const s=t-e;s>0&&i.drawArrays(C.POINTS,e,s)};for(;c<a.length;){const e=a[c];if(e.id.highlightName!==o){p(d,u),++c,m();continue}const t=e.componentIndex;t!==u&&(p(d,u),d=t),u=t+1,++c}p(d,u)}set useFixedSizes(e){this._passParameters.useFixedSizes!==e&&(this._passParameters.useFixedSizes=e,this._requestRender())}get useFixedSizes(){return this._passParameters.useFixedSizes}set scaleFactor(e){this._passParameters.scaleFactor!==e&&(this._passParameters.scaleFactor=e,this._requestRender())}get scaleFactor(){return this._passParameters.scaleFactor}set minSizePx(e){this._passParameters.minSizePx!==e&&(this._passParameters.minSizePx=e,this._requestRender())}get minSizePx(){return this._passParameters.minSizePx}set useRealWorldSymbolSizes(e){this._passParameters.useRealWorldSymbolSizes!==e&&(this._passParameters.useRealWorldSymbolSizes=e,this._requestRender())}get useRealWorldSymbolSizes(){return this._passParameters.useRealWorldSymbolSizes}set size(e){this._passParameters.size!==e&&(this._passParameters.size=e,this._requestRender())}get size(){return this._passParameters.size}set sizePx(e){this._passParameters.sizePx!==e&&(this._passParameters.sizePx=e,this._requestRender())}get sizePx(){return this._passParameters.sizePx}set clippingBox(e){f(this._passParameters.clipBox,e||P)}get _clippingEnabled(){return!b(this._passParameters.clipBox,P,((e,t)=>e===t))}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this._requestRender())}addNode(e){this._nodes.push(e),this._highlights.nodeAdded(e),this._requestRender()}removeNode(e){let s=null;return this._nodes.filterInPlace((i=>i.id!==e||(s=i,i.vao=t(i.vao),this._highlights.nodeRemoved(i),!1))),this._requestRender(),s}forEachNode(e){this._nodes.forAll(e)}removeAll(){this._nodes.forAll((e=>e.vao=t(e.vao))),this._highlights.removeAll(),this._nodes.clear(),this._requestRender()}highlight(e,t){return this._highlights.add(e,t)}_addHighlight(e,t,s){e.addHighlight(t,s),this._requestRender()}_removeHighlight(e,t){e.removeHighlight(t),this._requestRender()}_initNode(e,t){t.vao??=new q(e.rctx,I,V,new Map([["positions",U.createVertex(e.rctx,W.STATIC_DRAW,t.coordinates)],["colors",U.createVertex(e.rctx,W.STATIC_DRAW,t.rgb)]]))}_requestRender(){this._context&&this._context.requestRender()}};function G(e,t,s,i,r){if(s.drawScreenSpace)return s.fixedSize*t*i;const n=H(r)*t*i;return s.useFixedSizes?Math.min(s.fixedSize/2,n):s.screenMinSize>0?Math.min(Math.max(s.screenMinSize*t*i,e/2),n):Math.min(e/2,n)}function Q(e,t,s,i,r){return s.drawScreenSpace?0:G(e,t,s,i,r)}function Y(e,t,s){return null==s&&(s=d()),s[0]=e.origin[0]+e.coordinates[3*t],s[1]=e.origin[1]+e.coordinates[3*t+1],s[2]=e.origin[2]+e.coordinates[3*t+2],s}e([i({constructOnly:!0})],k.prototype,"createGraphic",void 0),k=e([r("esri.views.3d.layers.i3s.PointCloudRenderer")],k);class J{constructor(){this.node=null,this.pointId=null,this.point=null,this.dist=null,this.normal=null,this.layerUid=""}}function K(e){return null!=e.dist&&null!=e.point&&null!=e.pointId&&null!=e.node}export{k as PointCloudRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{destroyHandle as o,makeHandle as i}from"../../../../core/handleUtils.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as r,destroyMaybe as n}from"../../../../core/maybe.js";import{debounce as a}from"../../../../core/promiseUtils.js";import{initial as l}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as d}from"../../../../core/unitUtils.js";import{property as c}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{fromRotation as h}from"../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{set as _,transformMat2d as u}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{UpdatingHandles as g}from"../../../../core/support/UpdatingHandles.js";import{ViewEventPriorities as f}from"../../../input/InputManager.js";import{mediaKeys as v,KeyBindings as b}from"../../../interactive/keybindings.js";import{acquire as T}from"../../../interactive/snapping/SnappingManagerPool.js";const j=Symbol(),w=Symbol(),E=1,M=10;let O=class extends t{get updating(){return this._updatingHandles.updating}get _preferredInteractionTool(){return this.options?.tool??"transform"}get _toolType(){switch(this._preferredInteractionTool){case"transform":return"transform-3d";case"reshape":return"reshape-3d"}}get _validatedSelectedElement(){const e=this.selectedElement;if(!e)return null;const{layer:{source:t}}=this;return t?"hasElement"in t?t.hasElement(e)?e:null:t===e?e:null:null}constructor(e){super(e),this.enabled=!1,this._updatingHandles=new g,this._isOpacityToggled=!1,this._factor=E,this._tool=null,this._object=null,this._createToolAbortController=null,this._onPointerMove=a((async e=>{const t=await this._updatingHandles.addPromise(this._findElementAtScreenPoint(e));this.destroyed||(this.removeHandles(w),t&&t!==this.selectedElement&&(this.view.cursor="pointer",this.addHandles(i((()=>this.view.cursor=null)),w)))})),this._tmpMat2=m(),this._tmpVec2=y()}destroy(){this._createToolAbortController=r(this._createToolAbortController)}initialize(){this.addHandles([o(this._updatingHandles),this._updatingHandles.add((()=>this.enabled),(e=>this._enableDisable(e)),l),this._updatingHandles.add((()=>this._preferredInteractionTool),(e=>this._preferredInteractionToolChanged(e)))])}_enableDisable(e){if(!e)return void this.removeHandles(j);this._dynamicImports();const{view:t}=this,o=new b;o.add(v.undo,(()=>{this._object?.operations?.undo(),this._object?.emit("modified-externally")})),o.add(v.redo,(()=>{this._object?.operations?.redo(),this._object?.emit("modified-externally")})),o.addToggle(v.preserveAspectRatio,(e=>{"transform-3d"===this._tool?.type&&(this._tool.preserveAspectRatio="key-down"===e.type)})),o.addToggle(v.modifySourcePoints,(e=>{const t=this._object?.operations;t&&"modifySource"in t&&(t.modifySource="key-down"===e.type)})),o.addToggle(v.rotateIncrements,(e=>{"transform-3d"===this._tool?.type&&(this._tool.snapRotation="key-down"===e.type)})),o.add(v.toggleOpacity,(()=>{const e=this._object?.element;e&&(e.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)})),o.add(v.moveUp,(()=>this._move(0,this._factor))),o.add(v.moveDown,(()=>this._move(0,-this._factor))),o.add(v.moveRight,(()=>this._move(this._factor,0))),o.add(v.moveLeft,(()=>this._move(-this._factor,0))),o.addToggle(v.factorModifier,(e=>this._factor="key-down"===e.type?M:E)),this._isOpacityToggled=!1,this.addHandles([o.register(t,f.TOOL),i((()=>{this._isOpacityToggled&&this.selectedElement&&(this.selectedElement.opacity*=2,this._isOpacityToggled=!1)})),t.on("immediate-click",(e=>this._onClick(e)),f.TOOL),t.on("pointer-move",(e=>this._onPointerMove(e).catch((()=>{}))),f.TOOL),this._updatingHandles.add((()=>this._validatedSelectedElement),((e,t)=>{t&&e!==t&&this._isOpacityToggled&&(t.opacity*=2,this._isOpacityToggled=!1),this._selectedElementChanged(e)}),l),i((()=>{t.cursor=null,this._removeTool()}))],j)}async _onClick(e){await this._updatingHandles.addPromise(e.async((async()=>{const t=await this._findElementAtScreenPoint(e);this.destroyed||(t&&e.stopPropagation(),this.selectedElement=t,this.selectedElement&&(this.view.cursor=null))})))}async _selectedElementChanged(e){e?.georeference?this._object?.element!==e&&await this._updatingHandles.addPromise(this._recreateTool()):this._removeTool()}async _recreateTool(){this._createToolAbortController=r(this._createToolAbortController),this._removeTool();const e=this._validatedSelectedElement;if(!e)return;const t=new AbortController;this._createToolAbortController=t;const{ManipulatedObject3DMediaElement:o,ExtentTransformTool:s,ReshapeTool3D:a}=await this._dynamicImports();if(t.signal.aborted)return;const{view:l,layer:d,_toolType:c}=this;switch(this._object=new o({view:l,layer:d,element:e,tool:this._preferredInteractionTool}),c){case"transform-3d":{this._tool=new s({view:l,object:this._object});const e=l.inputManager;e.isModifierKeyDown(v.rotateIncrements.key)&&(this._tool.snapRotation=!0),e.isModifierKeyDown(v.preserveAspectRatio.key)&&(this._tool.preserveAspectRatio=!0)}break;case"reshape-3d":{const e=T(l);this.addHandles(e,this._tool);const{snappingManager:t}=e;this._tool=new a({view:l,object:this._object,enableMidpoints:!1,enableZShape:!1,snappingManager:t,enableMoveObject:!1,autoHideManipulators:!0,enableDeleteVertices:!1,sketchOptions:{tooltips:{enabled:!0,inputEnabled:!0,visibleElements:{area:!1}}}})}}this.addHandles([i((()=>{this._object=n(this._object),this._tool&&(l.tools.remove(this._tool),this._tool=null)}))],this._tool),l.addAndActivateTool(this._tool)}_preferredInteractionToolChanged(e){const{_tool:t}=this;if(!t)return;if(this._toolType!==t.type)return void this._updatingHandles.addPromise(this._recreateTool());const{_object:o}=this;o&&(o.tool=e)}async _dynamicImports(){const[{ManipulatedObject3DMediaElement:e},{ExtentTransformTool:t,ReshapeTool3D:o}]=await Promise.all([import("../../interactive/editingTools/ManipulatedObject3DMediaElement.js"),import("../../interactive/editingTools.js")]);return{ManipulatedObject3DMediaElement:e,ExtentTransformTool:t,ReshapeTool3D:o}}async _findElementAtScreenPoint(e){const t=(await this.view.hitTest(e,{include:[this.layer]})).results[0];return"media"===t?.type?t.element:null}_removeTool(){this._tool&&this.removeHandles(this._tool)}_move(e,t){const{view:o,_object:i}=this,r=i?.operations;if(!r)return;const n=o.overlayPixelSizeInMapUnits(o.pointsOfInterest.focus.location)*d(o.spatialReference)/d(r.data.spatialReference),{_tmpMat2:a,_tmpVec2:l}=this,c=h(a,s(360-this.view.camera.heading)),p=_(l,n*e,n*t);u(p,p,c),r.move(p[0],p[1],0),i.emit("modified-externally")}};e([c({constructOnly:!0})],O.prototype,"view",void 0),e([c({constructOnly:!0})],O.prototype,"layer",void 0),e([c()],O.prototype,"selectedElement",void 0),e([c()],O.prototype,"enabled",void 0),e([c()],O.prototype,"options",void 0),e([c()],O.prototype,"updating",null),e([c()],O.prototype,"_preferredInteractionTool",null),e([c()],O.prototype,"_validatedSelectedElement",null),O=e([p("esri.views.3d.layers.support.MediaLayerInteraction")],O);export{O as MediaLayerInteraction};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{destroyHandle as o,makeHandle as i}from"../../../../core/handleUtils.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as r,destroyMaybe as n}from"../../../../core/maybe.js";import{debounce as a}from"../../../../core/promiseUtils.js";import{initial as l,watch as d,syncAndInitial as c}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as p}from"../../../../core/unitUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as _}from"../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{set as g,transformMat2d as y}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{ControlPointOperations as T}from"../../interactive/editingTools/media/ControlPointOperations.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{mediaKeys as j,KeyBindings as w}from"../../../interactive/keybindings.js";import{acquire as E}from"../../../interactive/snapping/SnappingManagerPool.js";const O=Symbol(),P=Symbol(),S=1,M=10;let H=class extends t{get editSourcePoints(){return!!this.options?.reshapeOptions.editSourcePoints!==this._isEditSourcePointsToggled}get updating(){return this._updatingHandles.updating}get _preferredInteractionTool(){return this.options?.tool??"transform"}get _toolType(){switch(this._preferredInteractionTool){case"transform":return"transform-3d";case"reshape":return"reshape-3d"}}get _validatedSelectedElement(){const e=this.selectedElement;if(!e)return null;const{layer:{source:t}}=this;return t?"hasElement"in t?t.hasElement(e)?e:null:t===e?e:null:null}constructor(e){super(e),this.enabled=!1,this._isEditSourcePointsToggled=!1,this._updatingHandles=new v,this._isOpacityToggled=!1,this._factor=S,this._tool=null,this._object=null,this._createToolAbortController=null,this._onPointerMove=a((async e=>{const t=await this._updatingHandles.addPromise(this._findElementAtScreenPoint(e));this.destroyed||(this.removeHandles(P),t&&t!==this.selectedElement&&(this.view.cursor="pointer",this.addHandles(i((()=>this.view.cursor=null)),P)))})),this._tmpMat2=u(),this._tmpVec2=f()}destroy(){this._createToolAbortController=r(this._createToolAbortController)}initialize(){this.addHandles([o(this._updatingHandles),this._updatingHandles.add((()=>this.enabled),(e=>this._enableDisable(e)),l),this._updatingHandles.add((()=>this._preferredInteractionTool),(e=>this._preferredInteractionToolChanged(e)))])}_enableDisable(e){if(!e)return void this.removeHandles(O);this._dynamicImports();const{view:t}=this,o=new w;o.add(j.undo,(()=>{this._object?.operations?.undo(),this._object?.emit("modified-externally")})),o.add(j.redo,(()=>{this._object?.operations?.redo(),this._object?.emit("modified-externally")})),o.addToggle(j.preserveAspectRatio,(e=>{"transform-3d"===this._tool?.type&&(this._tool.preserveAspectRatio="key-down"===e.type)})),o.addToggle(j.editSourcePoints,(e=>{"reshape-3d"===this._tool?.type&&(this._isEditSourcePointsToggled="key-down"===e.type)})),o.addToggle(j.rotateIncrements,(e=>{"transform-3d"===this._tool?.type&&(this._tool.snapRotation="key-down"===e.type)})),o.add(j.toggleOpacity,(()=>{const e=this._object?.element;e&&(e.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)})),o.add(j.moveUp,(()=>this._move(0,this._factor))),o.add(j.moveDown,(()=>this._move(0,-this._factor))),o.add(j.moveRight,(()=>this._move(this._factor,0))),o.add(j.moveLeft,(()=>this._move(-this._factor,0))),o.addToggle(j.factorModifier,(e=>this._factor="key-down"===e.type?M:S)),this._isOpacityToggled=!1,this.addHandles([o.register(t,b.TOOL),i((()=>{this._isOpacityToggled&&this.selectedElement&&(this.selectedElement.opacity*=2,this._isOpacityToggled=!1)})),t.on("immediate-click",(e=>this._onClick(e)),b.TOOL),t.on("pointer-move",(e=>this._onPointerMove(e).catch((()=>{}))),b.TOOL),this._updatingHandles.add((()=>this._validatedSelectedElement),((e,t)=>{t&&e!==t&&this._isOpacityToggled&&(t.opacity*=2,this._isOpacityToggled=!1),this._selectedElementChanged(e)}),l),i((()=>{t.cursor=null,this._removeTool()}))],O)}async _onClick(e){await this._updatingHandles.addPromise(e.async((async()=>{const t=await this._findElementAtScreenPoint(e);this.destroyed||(t&&e.stopPropagation(),this.selectedElement=t,this.selectedElement&&(this.view.cursor=null))})))}async _selectedElementChanged(e){e?.georeference?this._object?.element!==e&&await this._updatingHandles.addPromise(this._recreateTool()):this._removeTool()}async _recreateTool(){this._createToolAbortController=r(this._createToolAbortController),this._removeTool();const e=this._validatedSelectedElement;if(!e)return;const t=new AbortController;this._createToolAbortController=t;const{ManipulatedObject3DMediaElement:o,ExtentTransformTool:s,ReshapeTool3D:a}=await this._dynamicImports();if(t.signal.aborted)return;const{view:l,layer:p,_toolType:h}=this;switch(this._object=new o({view:l,layer:p,element:e,tool:this._preferredInteractionTool}),h){case"transform-3d":{this._tool=new s({view:l,object:this._object});const e=l.inputManager;e.isModifierKeyDown(j.rotateIncrements.key)&&(this._tool.snapRotation=!0),e.isModifierKeyDown(j.preserveAspectRatio.key)&&(this._tool.preserveAspectRatio=!0)}break;case"reshape-3d":{const e=E(l),{snappingManager:t}=e;this._tool=new a({view:l,object:this._object,enableMidpoints:!1,enableZShape:!1,snappingManager:t,enableMoveObject:!1,autoHideManipulators:!0,enableDeleteVertices:!1,sketchOptions:{tooltips:{enabled:!0,inputEnabled:!0,visibleElements:{area:!1}}}}),this.addHandles([e,d((()=>({editSourcePoints:this.editSourcePoints,operations:this._object?.operations})),(e=>{e.operations instanceof T&&(e.operations.editSourcePoints=e.editSourcePoints)}),c)],this._tool)}}this.addHandles([i((()=>{this._object=n(this._object),this._tool&&(l.tools.remove(this._tool),this._tool=null)}))],this._tool),l.addAndActivateTool(this._tool)}_preferredInteractionToolChanged(e){const{_tool:t}=this;if(!t)return;if(this._toolType!==t.type)return void this._updatingHandles.addPromise(this._recreateTool());const{_object:o}=this;o&&(o.tool=e)}async _dynamicImports(){const[{ManipulatedObject3DMediaElement:e},{ExtentTransformTool:t,ReshapeTool3D:o}]=await Promise.all([import("../../interactive/editingTools/ManipulatedObject3DMediaElement.js"),import("../../interactive/editingTools.js")]);return{ManipulatedObject3DMediaElement:e,ExtentTransformTool:t,ReshapeTool3D:o}}async _findElementAtScreenPoint(e){const t=(await this.view.hitTest(e,{include:[this.layer]})).results[0];return"media"===t?.type?t.element:null}_removeTool(){this._tool&&this.removeHandles(this._tool)}_move(e,t){const{view:o,_object:i}=this,r=i?.operations;if(!r)return;const n=o.overlayPixelSizeInMapUnits(o.pointsOfInterest.focus.location)*p(o.spatialReference)/p(r.data.spatialReference),{_tmpMat2:a,_tmpVec2:l}=this,d=_(a,s(360-this.view.camera.heading)),c=g(l,n*e,n*t);y(c,c,d),r.move(c[0],c[1],0),i.emit("modified-externally")}};e([h({constructOnly:!0})],H.prototype,"view",void 0),e([h({constructOnly:!0})],H.prototype,"layer",void 0),e([h()],H.prototype,"selectedElement",void 0),e([h()],H.prototype,"enabled",void 0),e([h()],H.prototype,"options",void 0),e([h()],H.prototype,"editSourcePoints",null),e([h()],H.prototype,"_isEditSourcePointsToggled",void 0),e([h()],H.prototype,"updating",null),e([h()],H.prototype,"_preferredInteractionTool",null),e([h()],H.prototype,"_validatedSelectedElement",null),H=e([m("esri.views.3d.layers.support.MediaLayerInteraction")],H);export{H as MediaLayerInteraction};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.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 t}from"../../../../core/accessorSupport/decorators/subclass.js";let e=class extends r{constructor(){super(...arguments),this.tool="transform"}};o([s()],e.prototype,"tool",void 0),e=o([t("esri.views.3d.layers.support.MediaLayerInteractionOptions")],e);export{e as MediaLayerInteractionOptions};
5
+ import{_ as o}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.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 e}from"../../../../core/accessorSupport/decorators/subclass.js";let t=class extends r{constructor(o){super(o),this.editSourcePoints=!1}};o([s()],t.prototype,"editSourcePoints",void 0),t=o([e("esri.views.3d.layers.support.MediaLayerInteractionOptions.ReshapeOptions")],t);let p=class extends r{constructor(o){super(o),this.tool="transform",this.reshapeOptions=new t}};o([s()],p.prototype,"tool",void 0),o([s({type:t})],p.prototype,"reshapeOptions",void 0),p=o([e("esri.views.3d.layers.support.MediaLayerInteractionOptions")],p);export{p as MediaLayerInteractionOptions};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Graphic.js";import{isIterable as n}from"../../../core/iteratorUtils.js";import{createScreenPointArray as r,screenPointObjectToArray as i}from"../../../core/screenUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import s from"../../../geometry/Point.js";import o from"../../../geometry/SpatialReference.js";import{projectVectorToVector as l}from"../../../geometry/projection/projectVectorToVector.js";import{fallbackObjectIDAttribute as c}from"../../../layers/LayerConstants.js";import{isIntegratedMeshLayer as a}from"../../../layers/support/layerUtils.js";import{debugFlags as u}from"./debugFlags.js";import{getElevationAtPoint as d}from"./ElevationProvider.js";import{newIntersector as p}from"../webgl-engine/lib/Intersector.js";import{StoreResults as m,IntersectorType as f}from"../webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as g}from"../webgl-engine/lib/intersectorUtils.js";import{toOwner as y,toHit as h}from"../webgl-engine/lib/intersectorUtilsConversions.js";import{terrainId as E}from"../webgl-engine/lib/verticalOffsetUtils.js";async function U(e,n,i,t){const s=i?R(e,i):t,o=r(n.x,n.y);s.requiresGroundFeedback=!0,s.enableDraped=!0;const l=p(e.state.viewingMode);l.options.selectionMode=!0,l.options.store=m.ALL,e.sceneIntersectionHelper.intersectIntersectorScreen(o,l,s);const c=I(e,l.results.all,s.graphics),d=l.results.ground,f=y(d,e),h=null!=f&&"type"in f&&a(f.type)?f:null,E={screenPoint:n,results:c,ground:{mapPoint:j(e,d),distance:g(d)?d.distanceInRenderSpace:0,layer:h}};return u.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(E.intersector=l),E}function b(e,n,r,t){const s=r?R(e,r):t,o=!(!s.graphics?.include&&!s.graphics?.exclude),l=!(!s.mediaElements?.include&&!s.mediaElements?.exclude),c=i(n);s.enableDraped=s.include&&!s.include.has(E)||s.exclude?.has(E);const a=e.sceneIntersectionHelper,u=p(e.state.viewingMode);if(u.options.selectionMode=!0,u.options.store=o||l?m.ALL:m.MIN,u.options.excludeLabels=r?.excludeLabels??!1,a.intersectIntersectorScreen(c,u,s),o||l){for(const n of u.results.all){const r=h(n,e);if(null==r)return j(e,n);if(o&&("graphic"!==r.type||S(s.graphics,r.graphic)))return j(e,n);if(l&&("media"!==r.type||L(s.mediaElements,r.element)))return j(e,n)}return null}return j(e,u.results.min)}function I(e,n,r){const i=new Array;let t=null;for(let s=0;s<n.length;s++){const o=n[s],l=y(o,e);if(null!=l&&(l===e.map.ground||"type"in l&&a(l.type)))break;const c=h(o,e);if(null==c)continue;if("graphic"===c.type){if(null==t&&s!==n.length-1&&(t=new Set),null!=t){const e=w(c.graphic);if(t.has(e))continue;t.add(e)}if(!S(r,c.graphic))continue}const u=j(e,o),d=o.distanceInRenderSpace;if("media"===c.type){const e=c.element.toSource(u);i.push({...c,mapPoint:u,distance:d,sourcePoint:e})}else i.push({...c,mapPoint:u,distance:d})}return i}function j(e,n,r){return n.getIntersectionPoint(T)?(r=x(e,T,r),n.intersector===f.TERRAIN&&e.basemapTerrain&&(r.z=d(e.basemapTerrain,r)??0),r):null}function w(e){const n=e.sourceLayer,r=e.layer,i=n&&"objectIdField"in n?n:r&&"objectIdField"in r?r:n;if(i){const n=i.objectIdField??c,r=e.attributes?.[n];if(r)return`o-${i.id}-${r}`}return`u-${e.uid}`}function S(e,n){return L(e,w(n))}function L(e,n){return null==e||(null==e.include||e.include.has(n))&&(null==e.exclude||!e.exclude.has(n))}function x(e,n,r){let i=e.spatialReference||o.WGS84;return l(n,e.renderSpatialReference,T,i)?n=T:(i=o.WGS84,l(n,e.renderSpatialReference,T,i)&&(n=T)),r?(r.x=n[0],r.y=n[1],r.z=n[2],r.spatialReference=i):r=new s(n,i),r}function R(e,n){const r=C(e,n.include,P.INCLUDE),i=C(e,n.exclude,P.EXCLUDE);return{include:r.layerUids,exclude:i.layerUids,graphics:{include:r.graphicUids,exclude:i.graphicUids},mediaElements:{include:r.mediaElements,exclude:i.mediaElements}}}function C(r,i,t,s={layerUids:void 0,graphicUids:void 0,mediaElements:void 0}){if(!i)return s;if(i instanceof e)D(s,w(i)),t===P.INCLUDE&&(null!=r.graphicsView&&i.layer===r?v(s,r.graphicsView.processor.layer.id):i.layer&&v(s,i.layer.uid));else if("layer"in i&&"element"in i)N(s,i.element),t===P.INCLUDE&&v(s,i.layer.uid);else if(n(i))for(const e of i)e===r.graphics&&null!=r.graphicsView?v(s,r.graphicsView.processor.layer.id):e===r.map.ground?v(s,E):C(r,e,t,s);else"uid"in i&&v(s,i.uid);return s}function v(e,n){e.layerUids||(e.layerUids=new Set),e.layerUids.add(n)}function D(e,n){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(n)}function N(e,n){e.mediaElements||(e.mediaElements=new Set),e.mediaElements.add(n)}const T=t();var P;!function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(P||(P={}));export{x as computeMapPointFromVec3d,R as externalToInternalIntersectOptions,w as getGraphicFilterUid,U as hitTest,j as intersectResultToMapPoint,b as toMap};
5
+ import e from"../../../Graphic.js";import has from"../../../core/has.js";import{isIterable as n}from"../../../core/iteratorUtils.js";import{createScreenPointArray as t,screenPointObjectToArray as i}from"../../../core/screenUtils.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import s from"../../../geometry/Point.js";import o from"../../../geometry/SpatialReference.js";import{projectVectorToVector as l}from"../../../geometry/projection/projectVectorToVector.js";import{fallbackObjectIDAttribute as c}from"../../../layers/LayerConstants.js";import{isIntegratedMeshLayer as a}from"../../../layers/support/layerUtils.js";import{debugFlags as u}from"./debugFlags.js";import{getElevationAtPoint as d}from"./ElevationProvider.js";import{newIntersector as p}from"../webgl-engine/lib/Intersector.js";import{StoreResults as m,IntersectorType as f}from"../webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as g}from"../webgl-engine/lib/intersectorUtils.js";import{toOwner as h,toHit as y,toHitAsync as E}from"../webgl-engine/lib/intersectorUtilsConversions.js";import{terrainId as U}from"../webgl-engine/lib/verticalOffsetUtils.js";async function b(e,n,i,r){const s=i?v(e,i):r,o=t(n.x,n.y);s.requiresGroundFeedback=!0,s.enableDraped=!0;const l=p(e.state.viewingMode);l.options.selectionMode=!0,l.options.store=m.ALL,e.sceneIntersectionHelper.intersectIntersectorScreen(o,l,s);let c=[];c=has("feature-pipeline-3d-test")?await w(e,l.results.all,s.graphics):j(e,l.results.all,s.graphics);const d=l.results.ground,f=h(d,e),y=null!=f&&"type"in f&&a(f.type)?f:null,E={screenPoint:n,results:c,ground:{mapPoint:S(e,d),distance:g(d)?d.distanceInRenderSpace:0,layer:y}};return u.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(E.intersector=l),E}function I(e,n,t,r){const s=t?v(e,t):r,o=!(!s.graphics?.include&&!s.graphics?.exclude),l=!(!s.mediaElements?.include&&!s.mediaElements?.exclude),c=i(n);s.enableDraped=s.include&&!s.include.has(U)||s.exclude?.has(U);const a=e.sceneIntersectionHelper,u=p(e.state.viewingMode);if(u.options.selectionMode=!0,u.options.store=o||l?m.ALL:m.MIN,u.options.excludeLabels=t?.excludeLabels??!1,a.intersectIntersectorScreen(c,u,s),o||l){for(const n of u.results.all){const t=y(n,e);if(null==t)return S(e,n);if(o&&("graphic"!==t.type||x(s.graphics,t.graphic)))return S(e,n);if(l&&("media"!==t.type||R(s.mediaElements,t.element)))return S(e,n)}return null}return S(e,u.results.min)}function j(e,n,t){const i=new Array;let r=null;for(let s=0;s<n.length;s++){const o=n[s],l=h(o,e);if(null!=l&&(l===e.map.ground||"type"in l&&a(l.type)))break;const c=y(o,e);if(null==c)continue;if("graphic"===c.type){if(null==r&&s!==n.length-1&&(r=new Set),null!=r){const e=L(c.graphic);if(r.has(e))continue;r.add(e)}if(!x(t,c.graphic))continue}const u=S(e,o),d=o.distanceInRenderSpace;if("media"===c.type){const e=c.element.toSource(u);i.push({...c,mapPoint:u,distance:d,sourcePoint:e})}else i.push({...c,mapPoint:u,distance:d})}return i}async function w(e,n,t){const i=new Array;let r=null;for(let s=0;s<n.length;s++){const o=n[s],l=h(o,e);if(null!=l&&(l===e.map.ground||"type"in l&&a(l.type)))break;const c=await E(o,e);if(null==c)continue;if("graphic"===c.type){if(null==r&&s!==n.length-1&&(r=new Set),null!=r){const e=L(c.graphic);if(r.has(e))continue;r.add(e)}if(!x(t,c.graphic))continue}const u=S(e,o),d=o.distanceInRenderSpace;if("media"===c.type){const e=c.element.toSource(u);i.push({...c,mapPoint:u,distance:d,sourcePoint:e})}else i.push({...c,mapPoint:u,distance:d})}return i}function S(e,n,t){return n.getIntersectionPoint(V)?(t=C(e,V,t),n.intersector===f.TERRAIN&&e.basemapTerrain&&(t.z=d(e.basemapTerrain,t)??0),t):null}function L(e){const n=e.sourceLayer,t=e.layer,i=n&&"objectIdField"in n?n:t&&"objectIdField"in t?t:n;if(i){const n=i.objectIdField??c,t=e.attributes?.[n];if(t)return`o-${i.id}-${t}`}return`u-${e.uid}`}function x(e,n){return R(e,L(n))}function R(e,n){return null==e||(null==e.include||e.include.has(n))&&(null==e.exclude||!e.exclude.has(n))}function C(e,n,t){let i=e.spatialReference||o.WGS84;return l(n,e.renderSpatialReference,V,i)?n=V:(i=o.WGS84,l(n,e.renderSpatialReference,V,i)&&(n=V)),t?(t.x=n[0],t.y=n[1],t.z=n[2],t.spatialReference=i):t=new s(n,i),t}function v(e,n){const t=P(e,n.include,A.INCLUDE),i=P(e,n.exclude,A.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids},mediaElements:{include:t.mediaElements,exclude:i.mediaElements}}}function P(t,i,r,s={layerUids:void 0,graphicUids:void 0,mediaElements:void 0}){if(!i)return s;if(i instanceof e)N(s,L(i)),r===A.INCLUDE&&(null!=t.graphicsView&&i.layer===t?D(s,t.graphicsView.processor.layer.id):i.layer&&D(s,i.layer.uid));else if("layer"in i&&"element"in i)T(s,i.element),r===A.INCLUDE&&D(s,i.layer.uid);else if(n(i))for(const e of i)e===t.graphics&&null!=t.graphicsView?D(s,t.graphicsView.processor.layer.id):e===t.map.ground?D(s,U):P(t,e,r,s);else"uid"in i&&D(s,i.uid);return s}function D(e,n){e.layerUids||(e.layerUids=new Set),e.layerUids.add(n)}function N(e,n){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(n)}function T(e,n){e.mediaElements||(e.mediaElements=new Set),e.mediaElements.add(n)}const V=r();var A;!function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(A||(A={}));export{C as computeMapPointFromVec3d,v as externalToInternalIntersectOptions,L as getGraphicFilterUid,b as hitTest,S as intersectResultToMapPoint,I as toMap};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ZEROS as e}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{TileCompositePassParameters as r}from"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{B as s}from"../../../chunks/BlendLayers.glsl.js";import{ReloadableShaderModule as o}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";class t extends r{constructor(){super(...arguments),this.opacity=1,this.baseOpacity=1,this.texture=null,this.fboTexture=null,this.backgroundColor=e}}class l extends i{constructor(e,r,i){super(e,r,new o(s,(()=>import("../webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js"))),i)}}export{t as BlendLayersPassParameters,l as BlendLayersTechnique};
5
+ import{ZEROS as e}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{TileCompositePassParameters as r}from"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{B as s}from"../../../chunks/BlendLayers.glsl.js";import{ReloadableShaderModule as o}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";class t extends r{constructor(){super(...arguments),this.opacity=1,this.baseOpacity=1,this.texture=null,this.fboTexture=null,this.backgroundColor=e}}class l extends i{constructor(e,r){super(e,r,new o(s,(()=>import("../webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js"))))}}export{t as BlendLayersPassParameters,l as BlendLayersTechnique};