@arcgis/core 5.1.0-next.43 → 5.1.0-next.45

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 (262) hide show
  1. package/applications/Components/featureUtils.d.ts +11 -7
  2. package/arcade/featureset/actions/Adapted.js +1 -1
  3. package/arcade/featureset/actions/AttributeFilter.js +1 -1
  4. package/arcade/featureset/actions/OrderBy.js +1 -1
  5. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  6. package/arcade/featureset/actions/Top.js +1 -1
  7. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  8. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  9. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  10. package/arcade/featureset/support/FeatureSet.js +1 -1
  11. package/arcade/featureset/support/OrderbyClause.js +1 -1
  12. package/assets/esri/core/workers/RemoteClient.js +1 -1
  13. package/assets/esri/core/workers/chunks/{eff198e0c21c9767ffaa.js → 0155e5679ded9de5c327.js} +1 -1
  14. package/assets/esri/core/workers/chunks/128799741dd3c6fc69b9.js +1 -0
  15. package/assets/esri/core/workers/chunks/13eb0162d95b4d27389c.js +1 -0
  16. package/assets/esri/core/workers/chunks/{0836964a65f76da35b5c.js → 1a3f874700f86b750390.js} +23 -23
  17. package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +1 -0
  18. package/assets/esri/core/workers/chunks/1cce2f8837ad765acf44.js +1 -0
  19. package/assets/esri/core/workers/chunks/2379c64b0ca30814a815.js +1 -0
  20. package/assets/esri/core/workers/chunks/23a9070e9362b8439770.js +1 -0
  21. package/assets/esri/core/workers/chunks/25e4568a3ff76f48ac5e.js +1 -0
  22. package/assets/esri/core/workers/chunks/{dbedd246f4b584583f95.js → 288bd32831e94e81653e.js} +1 -1
  23. package/assets/esri/core/workers/chunks/2b3a8a53cd68f666676b.js +1 -0
  24. package/assets/esri/core/workers/chunks/{4d16b6ac52e25bd7e6aa.js → 32a51ce8e1a362115c89.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{392941013107bbd96503.js → 365ad1ffd496ed86637b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/375eac59c9f88c7572db.js +2 -0
  27. package/assets/esri/core/workers/chunks/{eab74d830c2eaa9d133b.js → 4869e2f35aaf6b058281.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{10941b50f5933d168df6.js → 521a671182b0f79e3624.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{c2f3fc1b34a6782b431f.js → 5351e71ce7839636d06d.js} +1 -1
  30. package/assets/esri/core/workers/chunks/5b515b5741733bcb4645.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1669f1bf959c4e3083da.js → 5c0b3c76a7bc971c61dc.js} +1 -1
  32. package/assets/esri/core/workers/chunks/5c830cce32710d70dfa6.js +1 -0
  33. package/assets/esri/core/workers/chunks/5e9bd5ed6ecee5b15127.js +1 -0
  34. package/assets/esri/core/workers/chunks/5f2e246ffcbdedea4de5.js +1 -0
  35. package/assets/esri/core/workers/chunks/617328964d480d4a3a45.js +1 -0
  36. package/assets/esri/core/workers/chunks/64da1ad9df9094ef5c12.js +1 -0
  37. package/assets/esri/core/workers/chunks/650614a9e4871714c42e.js +1 -0
  38. package/assets/esri/core/workers/chunks/66baacbef23291eab853.js +1 -0
  39. package/assets/esri/core/workers/chunks/7278cc37e85f0242f19b.js +1 -0
  40. package/assets/esri/core/workers/chunks/{3c597d8ef898627b8f93.js → 768bbc910be6c65ac107.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{a1f36240a31057f998da.js → 79dc7045d9a2d43ba8df.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{f9da5c81535eaffc8b9c.js → 7f07f490c6fcc794c8d9.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{2b386374330d96387aec.js → 851fc5290497991ba001.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{7132420980f77b6a871b.js → 8cafdd4addd366795600.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{30cdb2d1d9f018f1642d.js → 9032c040b214b5af775b.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{ff8ec6369c8a1bee9bb4.js → 908f171b9c512d738dea.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{c7799ba861ac5af08e6a.js → 92d4e962284e13ba2fc5.js} +1 -1
  48. package/assets/esri/core/workers/chunks/970d971551e42f7ae08d.js +1 -0
  49. package/assets/esri/core/workers/chunks/9802770413ad814dab29.js +1 -0
  50. package/assets/esri/core/workers/chunks/{6e8cfe69617876ee0dac.js → a69f1879735a031f62e9.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{af804beb43d4d10c54d9.js → a9f35127c3f5bf42036b.js} +1 -1
  52. package/assets/esri/core/workers/chunks/b5ced451d331ca1ffb68.js +1 -0
  53. package/assets/esri/core/workers/chunks/beb53b372d356800f333.js +1 -0
  54. package/assets/esri/core/workers/chunks/{8f12a559dbf284c21e2f.js → bf4d2f42d31861ea1046.js} +1 -1
  55. package/assets/esri/core/workers/chunks/c2aa3b1344b42a904234.js +1 -0
  56. package/assets/esri/core/workers/chunks/{9a9b1250be3e20499d75.js → ca88a364ef911526102e.js} +1 -1
  57. package/assets/esri/core/workers/chunks/cdeb6aec578a1c07d663.js +1 -0
  58. package/assets/esri/core/workers/chunks/cf5e4cf9b1aa37eeb6b0.js +1 -0
  59. package/assets/esri/core/workers/chunks/d0adf059085ddf7151dd.js +1 -0
  60. package/assets/esri/core/workers/chunks/d2af5342fbe80e2d8c60.js +1 -0
  61. package/assets/esri/core/workers/chunks/d3d024b3d2bb8fbbf760.js +1 -0
  62. package/assets/esri/core/workers/chunks/{80bfb5e5d613d2c412bf.js → dbafe96ce37bb82d0584.js} +1 -1
  63. package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +1 -0
  64. package/assets/esri/core/workers/chunks/{093aa05fbde548bf9040.js → e5927f9d0e757ec4c22a.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{b15a02bdcd78a1a51bd6.js → e72ca52d930afb5650af.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{465cc0e00f03cdb640b2.js → e7402dfd683f82878360.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{8838ff9668b472af16a1.js → ef0eae13408cbf83a64f.js} +1 -1
  68. package/assets/esri/core/workers/chunks/f1767b8ba82fdd9bd947.js +1 -0
  69. package/assets/esri/core/workers/chunks/{f835eea9f617556c7276.js → f6e3954ddbb5993d56df.js} +1 -1
  70. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  71. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  72. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  73. package/assets/esri/themes/base/widgets/_Grid.scss +5 -0
  74. package/assets/esri/themes/dark/main.css +1 -1
  75. package/assets/esri/themes/light/main.css +1 -1
  76. package/assets/esri/themes/light/view.css +1 -1
  77. package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -1
  78. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -1
  79. package/chunks/ComponentShader.glsl.js +11 -11
  80. package/chunks/DefaultMaterial.glsl.js +1 -1
  81. package/chunks/HUDMaterial.glsl.js +28 -36
  82. package/chunks/ImageMaterial.glsl.js +1 -1
  83. package/chunks/Jpg.js +1 -1
  84. package/chunks/Path.glsl.js +7 -7
  85. package/chunks/Pattern.glsl.js +1 -1
  86. package/chunks/RibbonLine.glsl.js +2 -2
  87. package/chunks/ShadowHighlight.glsl.js +1 -1
  88. package/chunks/Terrain.glsl.js +5 -5
  89. package/chunks/Water.glsl.js +5 -5
  90. package/chunks/Zlib.js +1 -1
  91. package/chunks/lyr3DMain.js +1 -1
  92. package/chunks/lyr3DWorker.js +1 -1
  93. package/chunks/vxlLayer.js +1 -1
  94. package/config.js +1 -1
  95. package/core/arrayUtils.js +1 -1
  96. package/geometry/support/zscale.js +1 -1
  97. package/kernel.js +1 -1
  98. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  99. package/layers/SceneLayer.d.ts +16 -10
  100. package/layers/graphics/data/QueryEngineResult.js +1 -1
  101. package/layers/graphics/featureConversionUtils.js +1 -1
  102. package/layers/ogc/ogcFeatureUtils.js +1 -1
  103. package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
  104. package/layers/raster/formats/JpgPlus.js +1 -1
  105. package/layers/raster/formats/RasterCodec.js +1 -1
  106. package/layers/raster/formats/TiffDecoder.js +1 -1
  107. package/layers/save/featureLayerUtils.js +1 -1
  108. package/layers/save/groupLayerUtils.js +1 -1
  109. package/layers/save/mapImageLayerUtils.js +1 -1
  110. package/layers/support/Sublayer.d.ts +6 -0
  111. package/layers/support/Sublayer.js +1 -1
  112. package/layers/support/SubtypeSublayer.js +1 -1
  113. package/layers/support/layerUtils.js +1 -1
  114. package/package.json +3 -3
  115. package/rest/query/operations/pbfFeatureSetUtils.js +1 -1
  116. package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
  117. package/rest/query/operations/pbfOptimizedFeatureSet.js +1 -1
  118. package/support/revision.js +1 -1
  119. package/third-party-notices.txt +2 -2
  120. package/views/2d/engine/ManagedCanvas.js +1 -1
  121. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  122. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  123. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  124. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  125. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  126. package/views/2d/engine/webgl/TextureManager.js +1 -1
  127. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  129. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  130. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  131. package/views/2d/layers/TileLayerView2D.js +1 -1
  132. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  133. package/views/2d/layers/features/Processor.js +1 -1
  134. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  135. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  136. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  137. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  138. package/views/3d/environment/EnvironmentManager.js +1 -1
  139. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  140. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  141. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  142. package/views/3d/support/MemoryController.js +1 -1
  143. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  144. package/views/3d/terrain/OverlayRenderer.js +1 -1
  145. package/views/3d/terrain/TerrainRenderer.js +1 -1
  146. package/views/3d/terrain/TileCompositor.js +1 -1
  147. package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
  148. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +2 -2
  149. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  150. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  151. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  152. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  153. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  154. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  155. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  156. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
  157. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  158. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
  159. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +4 -4
  160. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +2 -2
  161. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  162. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js +1 -1
  163. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
  164. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  165. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  166. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  167. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  168. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  169. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  170. package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerIDRenderNode.js +1 -1
  171. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  172. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  173. package/views/3d/webgl-engine/lib/GLMaterial.js +1 -1
  174. package/views/3d/webgl-engine/lib/Material.js +1 -1
  175. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  176. package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
  177. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  178. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  179. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  180. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  181. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  182. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  183. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  184. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  185. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  186. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  187. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  189. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  190. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  191. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  192. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  194. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  195. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  196. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  197. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  198. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  199. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  200. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  201. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  202. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  203. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  204. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  205. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  206. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  207. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  208. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  209. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  210. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  211. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  212. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
  213. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  214. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  215. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  216. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  217. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  218. package/views/interactive/GraphicManipulator.js +1 -1
  219. package/views/interactive/tooltip/content/TooltipContentDynamic.js +1 -1
  220. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  221. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  222. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  223. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  224. package/widgets/Editor.d.ts +2 -1
  225. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  226. package/widgets/FeatureTable.js +1 -1
  227. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  228. package/widgets/Sketch/support/PluginManager.js +1 -1
  229. package/assets/esri/core/workers/chunks/02a0a58ca5916db1db19.js +0 -1
  230. package/assets/esri/core/workers/chunks/03c8453ae72a4e190252.js +0 -1
  231. package/assets/esri/core/workers/chunks/04981ae9d7728208ffce.js +0 -1
  232. package/assets/esri/core/workers/chunks/0e669a04999feb9f98c9.js +0 -1
  233. package/assets/esri/core/workers/chunks/23af269e88f9ac101ffb.js +0 -1
  234. package/assets/esri/core/workers/chunks/244dd7a948ca8a7dc6ef.js +0 -1
  235. package/assets/esri/core/workers/chunks/26cafd20c8d03c274389.js +0 -1
  236. package/assets/esri/core/workers/chunks/2fa86dacc8a12a6a6c43.js +0 -1
  237. package/assets/esri/core/workers/chunks/3e26f9af6b8c75bad97a.js +0 -1
  238. package/assets/esri/core/workers/chunks/42b556d56013350c9d80.js +0 -1
  239. package/assets/esri/core/workers/chunks/5a6a6e7151085a3cd3dd.js +0 -1
  240. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
  241. package/assets/esri/core/workers/chunks/65865c25487d23dd2e31.js +0 -1
  242. package/assets/esri/core/workers/chunks/65ea5028eb12457a3aeb.js +0 -1
  243. package/assets/esri/core/workers/chunks/73a008b48e29eb6f2064.js +0 -2
  244. package/assets/esri/core/workers/chunks/80a1ccabd4257cc61e0d.js +0 -1
  245. package/assets/esri/core/workers/chunks/8333561a938bcdf6c2e6.js +0 -1
  246. package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +0 -1
  247. package/assets/esri/core/workers/chunks/93846f8b77fc802069a7.js +0 -1
  248. package/assets/esri/core/workers/chunks/9b80569819cd1c72a9ff.js +0 -1
  249. package/assets/esri/core/workers/chunks/b056b4c79bcd542dd1d2.js +0 -1
  250. package/assets/esri/core/workers/chunks/b553264db0f10bb8c5f7.js +0 -1
  251. package/assets/esri/core/workers/chunks/b6e63d8ce3c9ac9762f4.js +0 -1
  252. package/assets/esri/core/workers/chunks/c1cae45a159a5373ac00.js +0 -1
  253. package/assets/esri/core/workers/chunks/c4f64195e44986644993.js +0 -1
  254. package/assets/esri/core/workers/chunks/ca6012135929b028ea1b.js +0 -1
  255. package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +0 -1
  256. package/assets/esri/core/workers/chunks/ea356a5b90ea44b5cbe1.js +0 -1
  257. package/assets/esri/core/workers/chunks/f0e6a26a3625068b08ab.js +0 -1
  258. package/assets/esri/core/workers/chunks/f36a234ef35faf8ca04d.js +0 -1
  259. package/views/2d/engine/vectorTiles/GlyphMosaic.js +0 -2
  260. package/views/2d/engine/vectorTiles/GlyphSource.js +0 -2
  261. package/views/2d/engine/vectorTiles/RectangleBinPack.js +0 -2
  262. /package/assets/esri/core/workers/chunks/{73a008b48e29eb6f2064.js.LICENSE.txt → 375eac59c9f88c7572db.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../../core/Logger.js";import{clamp as e}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as r,Seconds as s}from"../../../../core/time.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as n,subtract as o,dot as l,scale as h,add as p,copy as m,length as c,distance as u,transformMat4 as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as g}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ONES as b,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as S}from"../../../../geometry/support/float16.js";import{distance2 as v,fromPoints as P,closestLineSegmentPoint as w,create as j}from"../../../../geometry/support/lineSegment.js";import{fromPoints as y,signedDistance as E,getNormal as T,create as z}from"../../../../geometry/support/plane.js";import{isHighlightOrOLID as A,isColor as C,isDepth as x,isColorHighlightOLIDOrDepth as L,is2DGeometryOutput as M}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as O}from"../effects/geometry/olidUtils.js";import V from"../lib/GLMaterial.js";import{Material as R}from"../lib/Material.js";import{isTranslationMatrix as F}from"../lib/Util.js";import{isImagePattern as N}from"./lineStippleUtils.js";import{VisualVariablePassParameters as k}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as U}from"./internal/bufferWriterUtils.js";import{r as D}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as B,RibbonLineTechnique as W}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as J}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as I}from"../../../../webscene/support/AlphaCutoff.js";class Y extends R{constructor(t,e){super(t,X),this.produces=new Map([[2,t=>A(t)||C(t)&&8===this.parameters.renderOccluded],[3,t=>x(t)],[11,t=>L(t)&&8===this.parameters.renderOccluded],[12,t=>L(t)&&8===this.parameters.renderOccluded],[4,t=>C(t)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[9,t=>C(t)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[19,t=>M(t)]]),this._configuration=new J(e)}updateConfiguration(t,e){super.updateConfiguration(t,e);const i=19===e.slot,r=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&8!==t,s=r&&i&&this.parameters.isImagePattern();this._configuration.draped=i,this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&Q(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=e.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.terrainDepthTest=e.terrainDepthTest&&C(t),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!s,this._configuration.worldSizedImagePattern=s}get visible(){return this.parameters.color[3]>=I||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>I}setParameters(t,e){t.animation=this.parameters.animation,super.setParameters(t,e)}intersectDraped({attributes:t,screenToWorldRatio:i},r,s,a,n){if(!r.options.selectionMode)return;const o=t.get("size");let l=this.parameters.width;if(this.parameters.vvSize){const i=t.get("sizeFeatureAttribute").data[0];Number.isNaN(i)?l*=this.parameters.vvSize.fallback[0]:l*=e(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const h=s[0],p=s[1],m=(l/2+4)*i;let c=Number.MAX_VALUE,u=0;const f=t.get("position").data,d=K(this.parameters,t)?f.length-2:f.length-5;for(let g=0;g<d;g+=3){const t=f[g],i=f[g+1],r=(g+3)%f.length,s=h-t,a=p-i,n=f[r]-t,o=f[r+1]-i,l=e((n*s+o*a)/(n*n+o*o),0,1),m=n*l-s,d=o*l-a,b=m*m+d*d;b<c&&(c=b,u=g/3)}c<m*m&&a(n.distance,n.normal,u)}intersect(i,r,s,f,d,g){const{options:b,camera:_,rayBegin:S,rayEnd:j}=s;if(!b.selectionMode||!i.visible||!_)return;if(!F(r))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const z=i.attributes,A=z.get("position").data;let C=this.parameters.width;if(this.parameters.vvSize){const t=z.get("sizeFeatureAttribute").data[0];Number.isNaN(t)||(C*=e(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else z.has("size")&&(C*=z.get("size").data[0]);const x=it;a(x,s.point);const L=C*_.pixelRatio/2+4*_.pixelRatio;n(ut[0],x[0]-L,x[1]+L,0),n(ut[1],x[0]+L,x[1]+L,0),n(ut[2],x[0]+L,x[1]-L,0),n(ut[3],x[0]-L,x[1]-L,0);for(let t=0;t<4;t++)if(!_.unprojectFromRenderScreen(ut[t],ft[t]))return;y(_.eye,ft[0],ft[1],dt),y(_.eye,ft[1],ft[2],gt),y(_.eye,ft[2],ft[3],bt),y(_.eye,ft[3],ft[0],_t);let M=Number.MAX_VALUE,O=0;const V=K(this.parameters,z)?A.length-2:A.length-5;for(let t=0;t<V;t+=3){Z[0]=A[t]+r[12],Z[1]=A[t+1]+r[13],Z[2]=A[t+2]+r[14];const e=(t+3)%A.length;if($[0]=A[e]+r[12],$[1]=A[e+1]+r[13],$[2]=A[e+2]+r[14],E(dt,Z)<0&&E(dt,$)<0||E(gt,Z)<0&&E(gt,$)<0||E(bt,Z)<0&&E(bt,$)<0||E(_t,Z)<0&&E(_t,$)<0)continue;const i=_.projectToRenderScreen(Z,rt),s=_.projectToRenderScreen($,st);if(null==i||null==s)continue;if(i[2]<0&&s[2]>0){o(tt,Z,$);const t=_.frustum,e=-E(t[4],Z)/l(tt,T(t[4]));if(h(tt,tt,e),p(Z,Z,tt),!_.projectToRenderScreen(Z,i))continue}else if(i[2]>0&&s[2]<0){o(tt,$,Z);const t=_.frustum,e=-E(t[4],$)/l(tt,T(t[4]));if(h(tt,tt,e),p($,$,tt),!_.projectToRenderScreen($,s))continue}else if(i[2]<0&&s[2]<0)continue;i[2]=0,s[2]=0;const a=v(P(i,s,ot),x);a<M&&(M=a,m(at,Z),m(nt,$),O=t/3)}if(M<L*L){let t=Number.MAX_VALUE;if(w(P(at,nt,ot),P(S,j,lt),et)){o(et,et,S);const e=c(et);h(et,et,1/e),t=e/u(S,j)}g(t,et,O)}}get hasEmissions(){return this.parameters.emissiveStrength>0}createBufferWriter(){return new G(B(this.parameters),this.parameters)}createGLMaterial(t){return new q(t)}validateParameters(t){"miter"!==t.join&&(t.miterLimit=0),null!=t.markerParameters&&(t.markerScale=t.markerParameters.width/t.width)}update(t){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:r(t.time)},!1),0!==t.dt)}}class q extends V{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(t){const{stipplePattern:e}=this._material.parameters;return this._stipplePattern!==e&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(e,this._stipplePattern)}),this._stipplePattern=e),this.getTechnique(W,t)}}class X extends k{constructor(){super(...arguments),this._width=0,this.color=b,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=s(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=s(0),this.endTime=s(1/0),this.emissiveStrength=0}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(t){this._width=t}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}isImagePattern(){return N(this.stipplePattern)&&null!=this.stippleTexture}}class G{constructor(t,e){this.layout=t,this._parameters=e;const i=e.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=i;break;case"round":this.numJoinSubdivisions=D+i}}_isClosed(t){return K(this._parameters,t)}allocate(t){return this.layout.createBuffer(t)}elementCount(t){const e=2,i=t.get("position").indices.length/2+1,r=this._isClosed(t);let s=r?2:2*e;return s+=((r?i:i-1)-(r?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,e,i,r,s,a){const o=this.layout,l=i.get("position"),h=l.indices,p=l.data.length/3,c=i.get("distanceToStart")?.data;h&&h.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const d=o.fields.has("sizeFeatureAttribute");let b=1,_=null;if(d){const t=i.get("sizeFeatureAttribute");1===t.data.length?b=t.data[0]:_=t.data}else b=i.get("size")?.data[0]??1;let v=[1,1,1,1],P=0,w=null;const j=o.fields.has("colorFeatureAttribute");if(j){const t=i.get("colorFeatureAttribute");1===t.data.length?P=t.data[0]:w=t.data}else v=i.get("color")?.data??v;const y=i.get("timeStamps")?.data,E=y&&o.fields.has("timeStamps"),T=o.fields.has("opacityFeatureAttribute");let z=0,A=null;if(T){const t=i.get("opacityFeatureAttribute");1===t.data.length?z=t.data[0]:A=t.data}const C=new Float32Array(s.buffer),x=S(s.buffer),L=new Uint8Array(s.buffer),M=o.stride/4;let V=a*M;const R=V;let F=0;const N=c?(t,e,i)=>F=c[i]:(t,e,i)=>F+=u(t,e),k=C.BYTES_PER_ELEMENT/x.BYTES_PER_ELEMENT,D=4/k,B=O(),W=(t,e,i,s,a,n,o,l)=>{C[V++]=e[0],C[V++]=e[1],C[V++]=e[2],U(t,e,x,V*k),V+=D,U(i,e,x,V*k),V+=D,C[V++]=l;let h=V*k;if(x[h++]=a,x[h++]=n,V=Math.ceil(h/k),j)C[V]=w?.[o]??P;else{const t=Math.min(4*o,v.length-4),e=4*V;L[e]=255*v[t],L[e+1]=255*v[t+1],L[e+2]=255*v[t+2],L[e+3]=255*v[t+3]}if(V++,C[V++]=_?.[o]??b,T&&(C[V++]=A?.[o]??z),B){let t=4*V;r?(L[t++]=r[0],L[t++]=r[1],L[t++]=r[2],L[t++]=r[3]):(L[t++]=0,L[t++]=0,L[t++]=0,L[t++]=0),V=Math.ceil(.25*t)}E&&(h=V*k,x[h++]=s[0],x[h++]=s[1],x[h++]=s[2],x[h++]=s[3],V=Math.ceil(h/k))};V+=M,n(pt,l.data[0],l.data[1],l.data[2]),E&&g(ct,y[0],y[1],y[2],y[3]),t&&f(pt,pt,t);const J=this._isClosed(i);if(J){const e=l.data.length-3;n(ht,l.data[e],l.data[e+1],l.data[e+2]),t&&f(ht,ht,t)}else n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),W(pt,pt,mt,ct,1,-4,0,0),W(pt,pt,mt,ct,1,4,0,0),m(ht,pt),m(pt,mt),E&&g(ct,y[4],y[5],y[6],y[7]);const I=J?0:1,Y=J?p:p-1;for(let u=I;u<Y;u++){const e=(u+1)%p*3;n(mt,l.data[e],l.data[e+1],l.data[e+2]),t&&f(mt,mt,t),N(ht,pt,u),W(ht,pt,mt,ct,0,-1,u,F),W(ht,pt,mt,ct,0,1,u,F);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const e=(t+1)/(i+1);W(ht,pt,mt,ct,e,-1,u,F),W(ht,pt,mt,ct,e,1,u,F)}if(W(ht,pt,mt,ct,1,-2,u,F),W(ht,pt,mt,ct,1,2,u,F),m(ht,pt),m(pt,mt),E){const t=(u+1)%p*4;g(ct,y[t],y[t+1],y[t+2],y[t+3])}}J?(n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),F=N(ht,pt,Y),W(ht,pt,mt,ct,0,-1,I,F),W(ht,pt,mt,ct,0,1,I,F)):(F=N(ht,pt,Y),W(ht,pt,pt,ct,0,-5,Y,F),W(ht,pt,pt,ct,0,5,Y,F)),H(C,R+M,C,R,M);return V=H(C,V-M,C,V,M),this._parameters.wireframe&&this._addWireframeVertices(s,R,V,M),null}_addWireframeVertices(t,e,i,r){const s=new Float32Array(t.buffer,i*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(t.buffer,e*Float32Array.BYTES_PER_ELEMENT,i-e);let n=0;const o=t=>n=H(a,t,s,n,r);for(let l=0;l<a.length-1;l+=2*r)o(l),o(l+2*r),o(l+1*r),o(l+2*r),o(l+1*r),o(l+3*r)}}function H(t,e,i,r,s){for(let a=0;a<s;a++)i[r++]=t[e++];return r}function K(t,e){if(!t.isClosed)return!1;return e.get("position").indices.length>2}function Q(t){return 1===t.anchor&&t.hideOnShortSegments&&"begin-end"===t.placement&&t.worldSpace}const Z=d(),$=d(),tt=d(),et=d(),it=d(),rt=i(),st=i(),at=d(),nt=d(),ot=j(),lt=j(),ht=d(),pt=d(),mt=d(),ct=_(),ut=[i(),i(),i(),i()],ft=[d(),d(),d(),d()],dt=z(),gt=z(),bt=z(),_t=z();export{X as Parameters,Y as RibbonLineMaterial};
2
+ import t from"../../../../core/Logger.js";import{clamp as e}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as r,Seconds as s}from"../../../../core/time.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as n,subtract as o,dot as l,scale as h,add as p,copy as m,length as c,distance as u,transformMat4 as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as g}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ONES as b,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as S}from"../../../../geometry/support/float16.js";import{distance2 as v,fromPoints as P,closestLineSegmentPoint as w,create as j}from"../../../../geometry/support/lineSegment.js";import{fromPoints as y,signedDistance as E,getNormal as T,create as z}from"../../../../geometry/support/plane.js";import{isHighlightOrOLID as A,isColor as C,isDepth as x,isColorHighlightOLIDOrDepth as L,is2DGeometryOutput as M}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as O}from"../effects/geometry/olidUtils.js";import V from"../lib/GLMaterial.js";import{Material as R}from"../lib/Material.js";import{isTranslationMatrix as F}from"../lib/Util.js";import{isImagePattern as N}from"./lineStippleUtils.js";import{VisualVariablePassParameters as k}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as U}from"./internal/bufferWriterUtils.js";import{r as D}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as B,RibbonLineTechnique as W}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as J}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as I}from"../../../../webscene/support/AlphaCutoff.js";class Y extends R{constructor(t,e){super(t,X),this.produces=new Map([[2,t=>A(t)||C(t)&&8===this.parameters.renderOccluded],[3,t=>x(t)],[11,t=>L(t)&&8===this.parameters.renderOccluded],[12,t=>L(t)&&8===this.parameters.renderOccluded],[4,t=>C(t)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[9,t=>C(t)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[19,t=>M(t)]]),this._configuration=new J(e)}updateConfiguration(t){super.updateConfiguration(t);const e=19===t.slot,i=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&10!==t.output,r=i&&e&&this.parameters.isImagePattern();this._configuration.draped=e,this._configuration.stippleEnabled=i,this._configuration.stippleOffColorEnabled=i&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&Q(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.terrainDepthTest=t.terrainDepthTest&&C(t.output),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!r,this._configuration.worldSizedImagePattern=r}get visible(){return this.parameters.color[3]>=I||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>I}setParameters(t,e){t.animation=this.parameters.animation,super.setParameters(t,e)}intersectDraped({attributes:t,screenToWorldRatio:i},r,s,a,n){if(!r.options.selectionMode)return;const o=t.get("size");let l=this.parameters.width;if(this.parameters.vvSize){const i=t.get("sizeFeatureAttribute").data[0];Number.isNaN(i)?l*=this.parameters.vvSize.fallback[0]:l*=e(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const h=s[0],p=s[1],m=(l/2+4)*i;let c=Number.MAX_VALUE,u=0;const f=t.get("position").data,d=K(this.parameters,t)?f.length-2:f.length-5;for(let g=0;g<d;g+=3){const t=f[g],i=f[g+1],r=(g+3)%f.length,s=h-t,a=p-i,n=f[r]-t,o=f[r+1]-i,l=e((n*s+o*a)/(n*n+o*o),0,1),m=n*l-s,d=o*l-a,b=m*m+d*d;b<c&&(c=b,u=g/3)}c<m*m&&a(n.distance,n.normal,u)}intersect(i,r,s,f,d,g){const{options:b,camera:_,rayBegin:S,rayEnd:j}=s;if(!b.selectionMode||!i.visible||!_)return;if(!F(r))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const z=i.attributes,A=z.get("position").data;let C=this.parameters.width;if(this.parameters.vvSize){const t=z.get("sizeFeatureAttribute").data[0];Number.isNaN(t)||(C*=e(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else z.has("size")&&(C*=z.get("size").data[0]);const x=it;a(x,s.point);const L=C*_.pixelRatio/2+4*_.pixelRatio;n(ut[0],x[0]-L,x[1]+L,0),n(ut[1],x[0]+L,x[1]+L,0),n(ut[2],x[0]+L,x[1]-L,0),n(ut[3],x[0]-L,x[1]-L,0);for(let t=0;t<4;t++)if(!_.unprojectFromRenderScreen(ut[t],ft[t]))return;y(_.eye,ft[0],ft[1],dt),y(_.eye,ft[1],ft[2],gt),y(_.eye,ft[2],ft[3],bt),y(_.eye,ft[3],ft[0],_t);let M=Number.MAX_VALUE,O=0;const V=K(this.parameters,z)?A.length-2:A.length-5;for(let t=0;t<V;t+=3){Z[0]=A[t]+r[12],Z[1]=A[t+1]+r[13],Z[2]=A[t+2]+r[14];const e=(t+3)%A.length;if($[0]=A[e]+r[12],$[1]=A[e+1]+r[13],$[2]=A[e+2]+r[14],E(dt,Z)<0&&E(dt,$)<0||E(gt,Z)<0&&E(gt,$)<0||E(bt,Z)<0&&E(bt,$)<0||E(_t,Z)<0&&E(_t,$)<0)continue;const i=_.projectToRenderScreen(Z,rt),s=_.projectToRenderScreen($,st);if(null==i||null==s)continue;if(i[2]<0&&s[2]>0){o(tt,Z,$);const t=_.frustum,e=-E(t[4],Z)/l(tt,T(t[4]));if(h(tt,tt,e),p(Z,Z,tt),!_.projectToRenderScreen(Z,i))continue}else if(i[2]>0&&s[2]<0){o(tt,$,Z);const t=_.frustum,e=-E(t[4],$)/l(tt,T(t[4]));if(h(tt,tt,e),p($,$,tt),!_.projectToRenderScreen($,s))continue}else if(i[2]<0&&s[2]<0)continue;i[2]=0,s[2]=0;const a=v(P(i,s,ot),x);a<M&&(M=a,m(at,Z),m(nt,$),O=t/3)}if(M<L*L){let t=Number.MAX_VALUE;if(w(P(at,nt,ot),P(S,j,lt),et)){o(et,et,S);const e=c(et);h(et,et,1/e),t=e/u(S,j)}g(t,et,O)}}get hasEmissions(){return this.parameters.emissiveStrength>0}createBufferWriter(){return new G(B(this.parameters),this.parameters)}createGLMaterial(t){return new q(t)}validateParameters(t){"miter"!==t.join&&(t.miterLimit=0),null!=t.markerParameters&&(t.markerScale=t.markerParameters.width/t.width)}update(t){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:r(t.time)},!1),0!==t.dt)}}class q extends V{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(t){const{stipplePattern:e}=this._material.parameters;return this._stipplePattern!==e&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(e,this._stipplePattern)}),this._stipplePattern=e),this.getTechnique(W,t)}}class X extends k{constructor(){super(...arguments),this._width=0,this.color=b,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=s(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=s(0),this.endTime=s(1/0),this.emissiveStrength=0}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(t){this._width=t}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}isImagePattern(){return N(this.stipplePattern)&&null!=this.stippleTexture}}class G{constructor(t,e){this.layout=t,this._parameters=e;const i=e.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=i;break;case"round":this.numJoinSubdivisions=D+i}}_isClosed(t){return K(this._parameters,t)}allocate(t){return this.layout.createBuffer(t)}elementCount(t){const e=2,i=t.get("position").indices.length/2+1,r=this._isClosed(t);let s=r?2:2*e;return s+=((r?i:i-1)-(r?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,e,i,r,s,a){const o=this.layout,l=i.get("position"),h=l.indices,p=l.data.length/3,c=i.get("distanceToStart")?.data;h&&h.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const d=o.fields.has("sizeFeatureAttribute");let b=1,_=null;if(d){const t=i.get("sizeFeatureAttribute");1===t.data.length?b=t.data[0]:_=t.data}else b=i.get("size")?.data[0]??1;let v=[1,1,1,1],P=0,w=null;const j=o.fields.has("colorFeatureAttribute");if(j){const t=i.get("colorFeatureAttribute");1===t.data.length?P=t.data[0]:w=t.data}else v=i.get("color")?.data??v;const y=i.get("timeStamps")?.data,E=y&&o.fields.has("timeStamps"),T=o.fields.has("opacityFeatureAttribute");let z=0,A=null;if(T){const t=i.get("opacityFeatureAttribute");1===t.data.length?z=t.data[0]:A=t.data}const C=new Float32Array(s.buffer),x=S(s.buffer),L=new Uint8Array(s.buffer),M=o.stride/4;let V=a*M;const R=V;let F=0;const N=c?(t,e,i)=>F=c[i]:(t,e,i)=>F+=u(t,e),k=C.BYTES_PER_ELEMENT/x.BYTES_PER_ELEMENT,D=4/k,B=O(),W=(t,e,i,s,a,n,o,l)=>{C[V++]=e[0],C[V++]=e[1],C[V++]=e[2],U(t,e,x,V*k),V+=D,U(i,e,x,V*k),V+=D,C[V++]=l;let h=V*k;if(x[h++]=a,x[h++]=n,V=Math.ceil(h/k),j)C[V]=w?.[o]??P;else{const t=Math.min(4*o,v.length-4),e=4*V;L[e]=255*v[t],L[e+1]=255*v[t+1],L[e+2]=255*v[t+2],L[e+3]=255*v[t+3]}if(V++,C[V++]=_?.[o]??b,T&&(C[V++]=A?.[o]??z),B){let t=4*V;r?(L[t++]=r[0],L[t++]=r[1],L[t++]=r[2],L[t++]=r[3]):(L[t++]=0,L[t++]=0,L[t++]=0,L[t++]=0),V=Math.ceil(.25*t)}E&&(h=V*k,x[h++]=s[0],x[h++]=s[1],x[h++]=s[2],x[h++]=s[3],V=Math.ceil(h/k))};V+=M,n(pt,l.data[0],l.data[1],l.data[2]),E&&g(ct,y[0],y[1],y[2],y[3]),t&&f(pt,pt,t);const J=this._isClosed(i);if(J){const e=l.data.length-3;n(ht,l.data[e],l.data[e+1],l.data[e+2]),t&&f(ht,ht,t)}else n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),W(pt,pt,mt,ct,1,-4,0,0),W(pt,pt,mt,ct,1,4,0,0),m(ht,pt),m(pt,mt),E&&g(ct,y[4],y[5],y[6],y[7]);const I=J?0:1,Y=J?p:p-1;for(let u=I;u<Y;u++){const e=(u+1)%p*3;n(mt,l.data[e],l.data[e+1],l.data[e+2]),t&&f(mt,mt,t),N(ht,pt,u),W(ht,pt,mt,ct,0,-1,u,F),W(ht,pt,mt,ct,0,1,u,F);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const e=(t+1)/(i+1);W(ht,pt,mt,ct,e,-1,u,F),W(ht,pt,mt,ct,e,1,u,F)}if(W(ht,pt,mt,ct,1,-2,u,F),W(ht,pt,mt,ct,1,2,u,F),m(ht,pt),m(pt,mt),E){const t=(u+1)%p*4;g(ct,y[t],y[t+1],y[t+2],y[t+3])}}J?(n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),F=N(ht,pt,Y),W(ht,pt,mt,ct,0,-1,I,F),W(ht,pt,mt,ct,0,1,I,F)):(F=N(ht,pt,Y),W(ht,pt,pt,ct,0,-5,Y,F),W(ht,pt,pt,ct,0,5,Y,F)),H(C,R+M,C,R,M);return V=H(C,V-M,C,V,M),this._parameters.wireframe&&this._addWireframeVertices(s,R,V,M),null}_addWireframeVertices(t,e,i,r){const s=new Float32Array(t.buffer,i*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(t.buffer,e*Float32Array.BYTES_PER_ELEMENT,i-e);let n=0;const o=t=>n=H(a,t,s,n,r);for(let l=0;l<a.length-1;l+=2*r)o(l),o(l+2*r),o(l+1*r),o(l+2*r),o(l+1*r),o(l+3*r)}}function H(t,e,i,r,s){for(let a=0;a<s;a++)i[r++]=t[e++];return r}function K(t,e){if(!t.isClosed)return!1;return e.get("position").indices.length>2}function Q(t){return 1===t.anchor&&t.hideOnShortSegments&&"begin-end"===t.placement&&t.worldSpace}const Z=d(),$=d(),tt=d(),et=d(),it=d(),rt=i(),st=i(),at=d(),nt=d(),ot=j(),lt=j(),ht=d(),pt=d(),mt=d(),ct=_(),ut=[i(),i(),i(),i()],ft=[d(),d(),d(),d()],dt=z(),gt=z(),bt=z(),_t=z();export{X as Parameters,Y as RibbonLineMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{normalize as e,set as t,scale as r,add as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as i,create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as o,scale as p}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{isColorOrOLID as h,isColor as l}from"../core/shaderLibrary/ShaderOutput.js";import u from"../lib/GLMaterial.js";import{Material as m,MaterialParameters as f}from"../lib/Material.js";import{intersectTriangleGeometry as d}from"../lib/RayIntersections.js";import{assert as g}from"../lib/Util.js";import{writeAttributes as b,writePosition as S}from"./internal/bufferWriterUtils.js";import{getLayout as _,ShadedColorMaterialTechnique as j}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as w}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as T}from"../../../../webscene/support/AlphaCutoff.js";class x extends m{constructor(e){super(e,D),this._configuration=new w,this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,e=>8===e||h(e)&&!this.parameters.transparent],[4,e=>h(e)&&this.parameters.transparent&&this.parameters.writeDepth],[9,e=>h(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}updateConfiguration(e,t){super.updateConfiguration(e,t),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.terrainDepthTest=t.terrainDepthTest&&l(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain}get visible(){return this.parameters.color[3]>=T}intersect(e,t,r,s,i,a){this._intersect(e,r,s,i,a)}intersectDraped(e,t,r,s){return this._pp0[0]=this._pp1[0]=r[0],this._pp0[1]=this._pp1[1]=r[1],this._intersect(e,t,this._pp0,this._pp1,s)}_intersect(e,i,a,n,c){if(this.parameters.screenSizeEnabled){const h=e.attributes.get("offset"),l={applyToVertex:(e,a,n,o)=>{const p=t(E,h.data[3*o],h.data[3*o+1],h.data[3*o+2]),c=t(M,e,a,n);return r(p,p,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(p)??1)),s(c,c,p),[c[0],c[1],c[2]]},applyToAabb:e=>{const t=o(e,E);return p(e,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(t)??1))}};d(e,i,a,n,l,c)}else d(e,i,a,n,void 0,c)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new y(_(this.parameters))}}class z extends u{beginSlot(e){return this.getTechnique(j,e)}}class D extends f{constructor(){super(...arguments),this.color=n(1,1,1,1),this.shadingTint=n(0,0,0,.25),this.shadingDirection=e(a(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=0,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class y{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,s,i,a){const n=b(r,s,this.layout,e,t,i,a),o=i.getField("offset",c);if(o&&r.has("offset")){const e=r.get("offset");g(3===e.size),S(e,t,o,a)}return n}}const E=a(),M=a();export{D as Parameters,x as ShadedColorMaterial};
2
+ import{normalize as e,set as t,scale as r,add as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as i,create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as o,scale as p}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{isColorOrOLID as h,isColor as l}from"../core/shaderLibrary/ShaderOutput.js";import u from"../lib/GLMaterial.js";import{Material as m,MaterialParameters as f}from"../lib/Material.js";import{intersectTriangleGeometry as d}from"../lib/RayIntersections.js";import{assert as g}from"../lib/Util.js";import{writeAttributes as b,writePosition as S}from"./internal/bufferWriterUtils.js";import{getLayout as _,ShadedColorMaterialTechnique as j}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as w}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as T}from"../../../../webscene/support/AlphaCutoff.js";class x extends m{constructor(e){super(e,D),this._configuration=new w,this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,e=>10===e||h(e)&&!this.parameters.transparent],[4,e=>h(e)&&this.parameters.transparent&&this.parameters.writeDepth],[9,e=>h(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.terrainDepthTest=e.terrainDepthTest&&l(e.output),this._configuration.cullAboveTerrain=e.cullAboveTerrain}get visible(){return this.parameters.color[3]>=T}intersect(e,t,r,s,i,a){this._intersect(e,r,s,i,a)}intersectDraped(e,t,r,s){return this._pp0[0]=this._pp1[0]=r[0],this._pp0[1]=this._pp1[1]=r[1],this._intersect(e,t,this._pp0,this._pp1,s)}_intersect(e,i,a,n,c){if(this.parameters.screenSizeEnabled){const h=e.attributes.get("offset"),l={applyToVertex:(e,a,n,o)=>{const p=t(E,h.data[3*o],h.data[3*o+1],h.data[3*o+2]),c=t(M,e,a,n);return r(p,p,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(p)??1)),s(c,c,p),[c[0],c[1],c[2]]},applyToAabb:e=>{const t=o(e,E);return p(e,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(t)??1))}};d(e,i,a,n,l,c)}else d(e,i,a,n,void 0,c)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new y(_(this.parameters))}}class z extends u{beginSlot(e){return this.getTechnique(j,e)}}class D extends f{constructor(){super(...arguments),this.color=n(1,1,1,1),this.shadingTint=n(0,0,0,.25),this.shadingDirection=e(a(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=0,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class y{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,s,i,a){const n=b(r,s,this.layout,e,t,i,a),o=i.getField("offset",c);if(o&&r.has("offset")){const e=r.get("offset");g(3===e.size),S(e,t,o,a)}return n}}const E=a(),M=a();export{D as Parameters,x as ShadedColorMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{Material as t,MaterialParameters as e}from"../lib/Material.js";import{intersectTriangleGeometry as r,intersectTriangleGeometry2D as s}from"../lib/RayIntersections.js";class n extends t{updateConfiguration(t,e){super.updateConfiguration(t,e),this._configuration.transparent=this.transparent,this._configuration.enableOffset=e.enableOffset,this._configuration.polygonOffset=this.parameters.polygonOffset}intersect(t,e,s,n,i,o){return r(t,s,n,i,void 0,o)}intersectDraped(t,e,r,n){return s(r[0],r[1],t,n)}}class i extends e{constructor(){super(...arguments),this.polygonOffset=!1}}export{n as TriangleMaterial,i as TriangleMaterialParameters};
2
+ import{Material as t,MaterialParameters as e}from"../lib/Material.js";import{intersectTriangleGeometry as r,intersectTriangleGeometry2D as s}from"../lib/RayIntersections.js";class n extends t{updateConfiguration(t){super.updateConfiguration(t),this._configuration.transparent=this.transparent,this._configuration.enableOffset=t.enableOffset,this._configuration.polygonOffset=this.parameters.polygonOffset}intersect(t,e,s,n,i,o){return r(t,s,n,i,void 0,o)}intersectDraped(t,e,r,n){return s(r[0],r[1],t,n)}}class i extends e{constructor(){super(...arguments),this.polygonOffset=!1}}export{n as TriangleMaterial,i as TriangleMaterialParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../core/has.js";import{secondsFromMilliseconds as t}from"../../../../core/time.js";import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColor as a,isHighlightOrOLID as s}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as o}from"../effects/geometry/olidUtils.js";import{DefaultBufferWriter as n}from"./DefaultBufferWriter.js";import{PositionUvf32OlidLayout as h,PositionUvf32Layout as l}from"./DefaultLayouts.js";import{TriangleMaterialParameters as c,TriangleMaterial as p}from"./TriangleMaterial.js";import{WaterGLMaterial as m}from"./WaterGLMaterial.js";import{WaterTechniqueConfiguration as f}from"./WaterTechniqueConfiguration.js";class u extends p{constructor(t,e){super(t,d),this.visible=!0,this.produces=new Map([[2,t=>a(t)&&!this.transparent||s(t)],[4,t=>a(t)&&this.transparent||s(t)],[19,t=>this.parameters.draped&&a(t)||2===t||s(t)],[20,t=>2===t]]),this._configuration=new f(e.spherical)}updateConfiguration(t,e){super.updateConfiguration(t,e),this._configuration.writeDepth=!0,this._configuration.receiveShadows=a(t)&&e.shadowMap.enabled,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.screenSpaceReflections=null!=e.ssr.lastFrameColor,this._configuration.cloudReflections=null!=e.clouds.data,this._configuration.draped=this.parameters.draped,this._configuration.terrainDepthTest=e.terrainDepthTest&&a(t),this._configuration.cullAboveTerrain=e.cullAboveTerrain}update(e){return this.setParameters({timeElapsed:t(e.time)*this.parameters.animationSpeed},!1),this._animationEnabled(e.camera)&&e.dt>0}_animationEnabled(t){const e=Math.min(t.relativeElevation,t.distance);return Math.sqrt(this.parameters.waveTextureRepeat/this.parameters.waveStrength)*e<g}get transparent(){return this.parameters.transparent}createGLMaterial(t){return new m(t)}createBufferWriter(){return new n(o()?h:l)}get test(){}}class d extends c{constructor(){super(...arguments),this.waveStrength=.06,this.waveTextureRepeat=32,this.waveDirection=e(1,0),this.waveVelocity=.05,this.flowStrength=.015,this.flowOffset=-.5,this.animationSpeed=.35,this.timeElapsed=0,this.color=i(0,0,0,0),this.transparent=!0,this.hasSlicePlane=!1,this.draped=!1,this.origin=r(),this.modelTransformation=null}}const g=35e3;export{d as Parameters,u as WaterMaterial};
2
+ import"../../../../core/has.js";import{secondsFromMilliseconds as t}from"../../../../core/time.js";import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColor as a,isHighlightOrOLID as s}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as o}from"../effects/geometry/olidUtils.js";import{DefaultBufferWriter as n}from"./DefaultBufferWriter.js";import{PositionUvf32OlidLayout as h,PositionUvf32Layout as l}from"./DefaultLayouts.js";import{TriangleMaterialParameters as c,TriangleMaterial as p}from"./TriangleMaterial.js";import{WaterGLMaterial as m}from"./WaterGLMaterial.js";import{WaterTechniqueConfiguration as u}from"./WaterTechniqueConfiguration.js";class f extends p{constructor(t,e){super(t,d),this.visible=!0,this.produces=new Map([[2,t=>a(t)&&!this.transparent||s(t)],[4,t=>a(t)&&this.transparent||s(t)],[19,t=>this.parameters.draped&&a(t)||4===t||s(t)],[20,t=>4===t]]),this._configuration=new u(e.spherical)}updateConfiguration(t){super.updateConfiguration(t),this._configuration.writeDepth=!0,this._configuration.receiveShadows=a(t.output)&&t.shadowMap.enabled,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.screenSpaceReflections=null!=t.ssr.lastFrameColor,this._configuration.cloudReflections=null!=t.clouds.data,this._configuration.draped=this.parameters.draped,this._configuration.terrainDepthTest=t.terrainDepthTest&&a(t.output),this._configuration.cullAboveTerrain=t.cullAboveTerrain}update(e){return this.setParameters({timeElapsed:t(e.time)*this.parameters.animationSpeed},!1),this._animationEnabled(e.camera)&&e.dt>0}_animationEnabled(t){const e=Math.min(t.relativeElevation,t.distance);return Math.sqrt(this.parameters.waveTextureRepeat/this.parameters.waveStrength)*e<g}get transparent(){return this.parameters.transparent}createGLMaterial(t){return new m(t)}createBufferWriter(){return new n(o()?h:l)}get test(){}}class d extends c{constructor(){super(...arguments),this.waveStrength=.06,this.waveTextureRepeat=32,this.waveDirection=e(1,0),this.waveVelocity=.05,this.flowStrength=.015,this.flowOffset=-.5,this.animationSpeed=.35,this.timeElapsed=0,this.color=i(0,0,0,0),this.transparent=!0,this.hasSlicePlane=!1,this.draped=!1,this.origin=r(),this.modelTransformation=null}}const g=35e3;export{d as Parameters,f as WaterMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{WaterDistortionPassParameters as t}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as i}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as a,depthWrite as n,depthTest as l,blending as p}from"../lib/OrderIndependentTransparency.js";import{PositionUvf32OlidGLLayout as m,PositionUvf32GLLayout as d}from"./DefaultLayouts.js";import{W as c}from"../../../../chunks/Water.glsl.js";import{makePipelineState as f,defaultColorWrite as h}from"../../../webgl/renderState.js";class u extends t{}let g=class extends o{constructor(e,r){super(e,r,i()?m:d),this.shader=new s(c,()=>import("./Water.glsl.js"))}initializePipeline(e){const{oitPass:r,output:t,transparent:s,draped:o}=e;return f({blending:2!==t&&8!==t&&9!==t&&s?p(r):null,depthTest:o?null:l(r),depthWrite:n(e),colorWrite:h,polygonOffset:a(e)})}};g=e([r("esri.views.3d.webgl-engine.materials.WaterTechnique")],g);export{u as WaterMaterialPassParameters,g as WaterTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{WaterDistortionPassParameters as t}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as i}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as a,depthWrite as n,depthTest as l,blending as p}from"../lib/OrderIndependentTransparency.js";import{PositionUvf32OlidGLLayout as m,PositionUvf32GLLayout as d}from"./DefaultLayouts.js";import{W as c}from"../../../../chunks/Water.glsl.js";import{makePipelineState as f,defaultColorWrite as h}from"../../../webgl/renderState.js";class u extends t{}let g=class extends o{constructor(e,r){super(e,r,i()?m:d),this.shader=new s(c,()=>import("./Water.glsl.js"))}initializePipeline(e){const{output:r,transparent:t,draped:s}=e;return f({blending:t?p(r):null,depthTest:s?null:l(r),depthWrite:n(e),colorWrite:h,polygonOffset:a(e)})}};g=e([r("esri.views.3d.webgl-engine.materials.WaterTechnique")],g);export{u as WaterMaterialPassParameters,g as WaterTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{disposeMaybe as i}from"../../../../../core/maybe.js";import{property as s,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{GLMaterials as a}from"../../lib/GLMaterials.js";import{assert as n}from"../../lib/Util.js";import{DrawParameters as o}from"../DrawParameters.js";import{getStrideForDataType as l}from"./IndexLayout.js";import{defaultHighlightName as h}from"../../../../support/HighlightDefaults.js";let d=class extends e{constructor(t){super(t),this._glMaterials=null,this._drawParameters=new o,this._highlightNames=new Set,this._produces=new Map}initialize(){this._updateProduces()}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(t){return this._highlightNames.has(t)}get produces(){return this._produces}_updateProduces(){this.material.produces.forEach((t,e)=>{this._produces.set(e,e=>!(0===this.dataByBaseInstance.size||!(8!==e&&4!==e||this._hasHighlights))&&t(e))})}initializeRenderContext(t){this._glMaterials=new a(this.material,t.materials)}uninitializeRenderContext(){this._glMaterials=i(this._glMaterials)}acquireTechniques(t){if(!this.material.shouldRender(t))return null;const{output:e,bind:i}=t,s=this.material.produces.get(i.slot);if(!s?.(e))return null;const{highlight:r,slot:a}=i,n=4===e,o=8===e,l=o||n,d=r?.name;if(l&&(0===this._highlightNames.size||o&&d&&!this._highlightNames.has(d)))return null;const u=t=>o&&!!d&&!t.has(d),c=5===e,g=!(l||c);for(const m of this.dataByBaseInstance.values())for(const s of m.dataByOrigin.values())for(const r of s.buffers){if(u(r.highlightNames))continue;const s=n?r.drawCommandsHighlights.get(h):l?d?r.drawCommandsHighlights.get(d):r.drawCommandsHighlights.size>0:((c&&r.needsMultipleCommands?r.drawCommandsShadowHighlightRest:r.drawCommandsDefault)||null)?.length??!1,o=g&&r.drawCommandsOccludees||null;if(s||o?.length){const s=this._glMaterials.load(t.rctx,a,e),r=s?.beginSlot(i);if(r)return r}}return null}render(t,e){const{output:i,bind:s}=t,{highlight:r}=s,a=8===i,o=r?.name??"";if(a&&!r)return;const l=4===i,d=a||l,p=5===i,w=!(d||p),{rctx:_}=t,C=_.bindTechnique(e,s,this.material.parameters),x=this.material.useIndexing;for(const B of this.dataByBaseInstance.values()){const{baseInstanceData:t}=B,i=null!=t;n(!(i&&x),"Instanced indexed rendering is not supported");const r=i?f:x?m:g,H=i?c:u;for(const n of B.dataByOrigin.values()){this._drawParameters.origin=n.origin;for(const i of n.buffers){if(a&&(!i.hasHighlights||!i.drawCommandsHighlights.has(o)))continue;if(l&&(!i.hasHighlights||!i.drawCommandsHighlights.has(h)))continue;this._drawParameters.textureBuffer=i.textureBuffer?.texture;const n=H(i),u=y(n,i.needsMultipleCommands,o,l,d,p),c=b(n,w);(u?.length||c?.length)&&(C.bindDraw(s,this.material.parameters,this._drawParameters),r(_,i,t,e,u,c,s)),this._drawParameters.textureBuffer=null}}}}updateHighlights(){const{_highlightNames:t}=this;t.clear();for(const e of this.dataByBaseInstance.values())for(const i of e.dataByOrigin.values())for(const e of i.buffers)for(const i of e.highlightNames)t.add(i);this._updateProduces()}get test(){}};t([s({constructOnly:!0})],d.prototype,"material",void 0),t([s({constructOnly:!0})],d.prototype,"dataByBaseInstance",void 0),d=t([r("esri.views.3d.webgl-engine.materials.renderers.VaoRenderer")],d);const u=t=>t,c=t=>t.instancedCommandVAOs,g=(t,{vao:e},i,s,r,a,n)=>{s.ensureAttributeLocations(e),t.bindVAO(e),p(t,s,r,n,!1),p(t,s,a,n,!0)},m=(t,{vao:e},i,s,r,a,o)=>{s.ensureAttributeLocations(e),t.bindVAO(e);const l=e.indexBuffer?.indexType;n(null!=l,"Missing index array"),w(t,s,r,o,!1,l),w(t,s,a,o,!0,l)},f=(t,e,{baseCommand:i},s,r,a,n)=>{_(t,s,i,r,n,!1),_(t,s,i,a,n,!0)};function p(t,e,i,s,r){if(i?.length){t.setPipelineState(e.getPipeline(s,r));for(const s of i)t.drawArrays(e.primitiveType,s.first,s.count)}}function w(t,e,i,s,r,a){if(!i?.length)return;const n=l(a);t.setPipelineState(e.getPipeline(s,r));for(const o of i)t.drawElements(e.primitiveType,o.count,a,o.first*n)}function _(t,e,{first:i,count:s},r,a,n){if(r?.length){t.setPipelineState(e.getPipeline(a,n));for(const{vao:a,instanceCount:n}of r)e.ensureAttributeLocations(a),t.bindVAO(a),t.drawArraysInstanced(e.primitiveType,i,s,n)}}function y(t,e,i,s,r,a){const n=r&&!s?t.drawCommandsHighlights.get(i)??null:null;return s?t.drawCommandsHighlights.get(h):r?n:a&&e?t.drawCommandsShadowHighlightRest:t.drawCommandsDefault}function b(t,e){return e&&t.drawCommandsOccludees||null}export{d as VaoRenderer};
2
+ import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{disposeMaybe as i}from"../../../../../core/maybe.js";import{property as s,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{GLMaterials as a}from"../../lib/GLMaterials.js";import{assert as n}from"../../lib/Util.js";import{DrawParameters as o}from"../DrawParameters.js";import{getStrideForDataType as l}from"./IndexLayout.js";import{defaultHighlightName as h}from"../../../../support/HighlightDefaults.js";let d=class extends e{constructor(t){super(t),this._glMaterials=null,this._drawParameters=new o,this._highlightNames=new Set,this._produces=new Map}initialize(){this._updateProduces()}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(t){return this._highlightNames.has(t)}get produces(){return this._produces}_updateProduces(){this.material.produces.forEach((t,e)=>{this._produces.set(e,e=>!(0===this.dataByBaseInstance.size||!(10!==e&&6!==e||this._hasHighlights))&&t(e))})}initializeRenderContext(t){this._glMaterials=new a(this.material,t.materials)}uninitializeRenderContext(){this._glMaterials=i(this._glMaterials)}acquireTechniques(t){if(!this.material.shouldRender(t))return null;const{output:e,bind:i}=t,s=this.material.produces.get(i.slot);if(!s?.(e))return null;const{highlight:r,slot:a}=i,n=6===e,o=10===e,l=o||n,d=r?.name;if(l&&(0===this._highlightNames.size||o&&d&&!this._highlightNames.has(d)))return null;const u=t=>o&&!!d&&!t.has(d),c=7===e,g=!(l||c);for(const m of this.dataByBaseInstance.values())for(const s of m.dataByOrigin.values())for(const r of s.buffers){if(u(r.highlightNames))continue;const s=n?r.drawCommandsHighlights.get(h):l?d?r.drawCommandsHighlights.get(d):r.drawCommandsHighlights.size>0:((c&&r.needsMultipleCommands?r.drawCommandsShadowHighlightRest:r.drawCommandsDefault)||null)?.length??!1,o=g&&r.drawCommandsOccludees||null;if(s||o?.length){const s=this._glMaterials.load(t.rctx,a,e),r=s?.beginSlot(i);if(r)return r}}return null}render(t,e){const{output:i,bind:s}=t,{highlight:r}=s,a=10===i,o=r?.name??"";if(a&&!r)return;const l=6===i,d=a||l,p=7===i,w=!(d||p),{rctx:_}=t,C=_.bindTechnique(e,s,this.material.parameters),x=this.material.useIndexing;for(const B of this.dataByBaseInstance.values()){const{baseInstanceData:t}=B,i=null!=t;n(!(i&&x),"Instanced indexed rendering is not supported");const r=i?f:x?m:g,H=i?c:u;for(const n of B.dataByOrigin.values()){this._drawParameters.origin=n.origin;for(const i of n.buffers){if(a&&(!i.hasHighlights||!i.drawCommandsHighlights.has(o)))continue;if(l&&(!i.hasHighlights||!i.drawCommandsHighlights.has(h)))continue;this._drawParameters.textureBuffer=i.textureBuffer?.texture;const n=H(i),u=y(n,i.needsMultipleCommands,o,l,d,p),c=b(n,w);(u?.length||c?.length)&&(C.bindDraw(s,this.material.parameters,this._drawParameters),r(_,i,t,e,u,c,s)),this._drawParameters.textureBuffer=null}}}}updateHighlights(){const{_highlightNames:t}=this;t.clear();for(const e of this.dataByBaseInstance.values())for(const i of e.dataByOrigin.values())for(const e of i.buffers)for(const i of e.highlightNames)t.add(i);this._updateProduces()}get test(){}};t([s({constructOnly:!0})],d.prototype,"material",void 0),t([s({constructOnly:!0})],d.prototype,"dataByBaseInstance",void 0),d=t([r("esri.views.3d.webgl-engine.materials.renderers.VaoRenderer")],d);const u=t=>t,c=t=>t.instancedCommandVAOs,g=(t,{vao:e},i,s,r,a,n)=>{s.ensureAttributeLocations(e),t.bindVAO(e),p(t,s,r,n,!1),p(t,s,a,n,!0)},m=(t,{vao:e},i,s,r,a,o)=>{s.ensureAttributeLocations(e),t.bindVAO(e);const l=e.indexBuffer?.indexType;n(null!=l,"Missing index array"),w(t,s,r,o,!1,l),w(t,s,a,o,!0,l)},f=(t,e,{baseCommand:i},s,r,a,n)=>{_(t,s,i,r,n,!1),_(t,s,i,a,n,!0)};function p(t,e,i,s,r){if(i?.length){t.setPipelineState(e.getPipeline(s,r));for(const s of i)t.drawArrays(e.primitiveType,s.first,s.count)}}function w(t,e,i,s,r,a){if(!i?.length)return;const n=l(a);t.setPipelineState(e.getPipeline(s,r));for(const o of i)t.drawElements(e.primitiveType,o.count,a,o.first*n)}function _(t,e,{first:i,count:s},r,a,n){if(r?.length){t.setPipelineState(e.getPipeline(a,n));for(const{vao:a,instanceCount:n}of r)e.ensureAttributeLocations(a),t.bindVAO(a),t.drawArraysInstanced(e.primitiveType,i,s,n)}}function y(t,e,i,s,r,a){const n=r&&!s?t.drawCommandsHighlights.get(i)??null:null;return s?t.drawCommandsHighlights.get(h):r?n:a&&e?t.drawCommandsShadowHighlightRest:t.drawCommandsDefault}function b(t,e){return e&&t.drawCommandsOccludees||null}export{d as VaoRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as t,depthTest as i,blending as n}from"../lib/OrderIndependentTransparency.js";import{PositionUvGLLayout as a}from"../materials/DefaultLayouts.js";import{C as l}from"../../../../chunks/CheckerBoard.glsl.js";import{makePipelineState as c,defaultColorWrite as p}from"../../../webgl/renderState.js";let d=class extends s{constructor(e,r){super(e,r,a),this.shader=new o(l,()=>import("./CheckerBoard.glsl.js"))}initializePipeline(e){const{oitPass:r,transparent:o,polygonOffset:s}=e,a=0===r,l=2===r;return c({blending:o?n(r):null,depthTest:i(r),depthWrite:t(e),colorWrite:p,polygonOffset:a||l?s?m:null:{factor:-1,units:-25}})}};d=e([r("esri.views.3d.webgl-engine.shaders.CheckerBoardTechnique")],d);const m={factor:0,units:-25};export{d as CheckerBoardTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{isOITColor as o}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as i,depthTest as n,blending as a}from"../lib/OrderIndependentTransparency.js";import{PositionUvGLLayout as c}from"../materials/DefaultLayouts.js";import{C as l}from"../../../../chunks/CheckerBoard.glsl.js";import{makePipelineState as p,defaultColorWrite as d}from"../../../webgl/renderState.js";let m=class extends s{constructor(e,r){super(e,r,c),this.shader=new t(l,()=>import("./CheckerBoard.glsl.js"))}initializePipeline(e){const{output:r,transparent:t,polygonOffset:s}=e,c=!o(r);return p({blending:t?a(r):null,depthTest:n(r),depthWrite:i(e),colorWrite:d,polygonOffset:c?s?h:null:{factor:-1,units:-25}})}};m=e([r("esri.views.3d.webgl-engine.shaders.CheckerBoardTechnique")],m);const h={factor:0,units:-25};export{m as CheckerBoardTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as a}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as c,depthWrite as p,depthTest as u,blending as m}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as f,stencilBaseAllZerosParams as d,stencilWriteMaskOn as h}from"../lib/StencilUtils.js";import{VisualVariablePassParameters as g}from"../materials/VisualVariablePassParameters.js";import{C as j}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as b,defaultColorWrite as P,cullingParams as S}from"../../../webgl/renderState.js";class C extends g{constructor(){super(...arguments),this.color=t}}let T=class extends n{constructor(e,r){super(e,r,o(y(r))),this.shader=new l(j,()=>import("./ColorMaterial.glsl.js")),this.ignoreUnused=!0}_createPipeline(e,r){const{oitPass:t,output:o,transparent:i,cullFace:l,draped:n,hasOccludees:a,polygonOffset:g}=e,j=0===t;return b({blending:s(o)&&i?m(t):null,culling:S(l),depthTest:n?null:u(t),depthWrite:p(e),colorWrite:P,stencilWrite:a?h:null,stencilTest:a?r?f:d:null,polygonOffset:j?g?v:null:c(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e,r){return r?this._occludeePipelineState:super.getPipeline(e)}};T=e([r("esri.views.3d.webgl-engine.shaders.ColorMaterialTechnique")],T);const v={factor:1,units:1};function y(e){const r=i().vec3f("position");return a()&&r.vec4u8("olidColor"),e.hasVVColor?r.f32("colorFeatureAttribute"):e.hasVertexColors&&r.vec4u8("color",{glNormalized:!0}),r.freeze()}export{C as ColorMaterialPassParameters,T as ColorMaterialTechnique,y as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isOITColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as a}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as c,depthWrite as p,depthTest as u,blending as m}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as f,stencilBaseAllZerosParams as d,stencilWriteMaskOn as h}from"../lib/StencilUtils.js";import{VisualVariablePassParameters as g}from"../materials/VisualVariablePassParameters.js";import{C as j}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as b,defaultColorWrite as P,cullingParams as S}from"../../../webgl/renderState.js";class C extends g{constructor(){super(...arguments),this.color=t}}let T=class extends n{constructor(e,r){super(e,r,o(y(r))),this.shader=new l(j,()=>import("./ColorMaterial.glsl.js")),this.ignoreUnused=!0}_createPipeline(e,r){const{output:t,transparent:o,cullFace:i,draped:l,hasOccludees:n,polygonOffset:a}=e,g=!s(t);return b({blending:o?m(t):null,culling:S(i),depthTest:l?null:u(t),depthWrite:p(e),colorWrite:P,stencilWrite:n?h:null,stencilTest:n?r?f:d:null,polygonOffset:g?a?v:null:c(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e,r){return r?this._occludeePipelineState:super.getPipeline(e)}};T=e([r("esri.views.3d.webgl-engine.shaders.ColorMaterialTechnique")],T);const v={factor:1,units:1};function y(e){const r=i().vec3f("position");return a()&&r.vec4u8("olidColor"),e.hasVVColor?r.f32("colorFeatureAttribute"):e.hasVertexColors&&r.vec4u8("color",{glNormalized:!0}),r.freeze()}export{C as ColorMaterialPassParameters,T as ColorMaterialTechnique,y as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{isColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as h}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as m}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as d,depthWrite as f,depthTest as v,blending as b}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as g,stencilBaseAllZerosParams as S,stencilWriteMaskOn as y}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as j}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as x}from"../materials/pbrUtils.js";import{D as T}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as C,cullingParams as P,defaultColorWrite as O}from"../../../webgl/renderState.js";import{alphaCutoff as D}from"../../../../webscene/support/AlphaCutoff.js";class V extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=x,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=D,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class w extends h{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let A=class extends m{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(j(t)))),super(e,t,i),this.shader=new u(T,()=>import("./DefaultMaterial.glsl.js")),this.ignoreUnused=!0}_makePipeline(e,t){const{oitPass:i,output:s,transparent:r,cullFace:o,customDepthTest:l,hasOccludees:n}=e;return C({blending:a(s)&&r?b(i):null,culling:R(e)?P(o):null,depthTest:v(i,M(l)),depthWrite:f(e),colorWrite:O,stencilWrite:n?y:null,stencilTest:n?t?g:S:null,polygonOffset:d(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function M(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function R(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function z(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&p()&&t.vec4u8("olidColor"),t}A=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],A);export{w as DefaultMaterialDrawParameters,V as DefaultMaterialPassParameters,A as DefaultMaterialTechnique,z as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as c}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as h}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as u}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as m,depthWrite as d,depthTest as f,blending as v}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as g,stencilBaseAllZerosParams as b,stencilWriteMaskOn as S}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as y}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as j}from"../materials/pbrUtils.js";import{D as T}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as x,cullingParams as C,defaultColorWrite as P}from"../../../webgl/renderState.js";import{alphaCutoff as O}from"../../../../webscene/support/AlphaCutoff.js";class D extends a{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=j,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=O,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class V extends c{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let w=class extends u{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(y(t)))),super(e,t,i),this.shader=new h(T,()=>import("./DefaultMaterial.glsl.js")),this.ignoreUnused=!0}_makePipeline(e,t){const{output:i,transparent:s,cullFace:r,customDepthTest:o,hasOccludees:l}=e;return x({blending:s?v(i):null,culling:M(e)?C(r):null,depthTest:f(i,A(o)),depthWrite:d(e),colorWrite:P,stencilWrite:l?S:null,stencilTest:l?t?g:b:null,polygonOffset:m(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function A(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function M(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function z(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&p()&&t.vec4u8("olidColor"),t}w=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],w);export{V as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,w as DefaultMaterialTechnique,z as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerPassUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../effects/focusArea/FocusAreaColorNode.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build,c as calculateAnchorPosition}from"../../../../chunks/HUDMaterial.glsl.js";
2
+ import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerPassUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../effects/focusArea/FocusAreaColorNode.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{a as anchorPosition,b as build}from"../../../../chunks/HUDMaterial.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as a}from"../effects/geometry/olidUtils.js";import{blending as l}from"../lib/OrderIndependentTransparency.js";import{H as c}from"../../../../chunks/HUDMaterial.glsl.js";import{PrimitiveType as f}from"../../../webgl/enums.js";import{makePipelineState as u,defaultColorWrite as p,defaultDepthWrite as m}from"../../../webgl/renderState.js";let d=class extends n{constructor(e,r){super(e,r,t(g).concat(t(v(r)))),this.shader=new i(c,()=>import("./HUDMaterial.glsl.js")),this.ignoreUnused=!0,this.primitiveType=f.TRIANGLE_STRIP}initializePipeline(e){const{oitPass:r,hasPolygonOffset:t,draped:o,output:i,depthTestEnabled:n}=e,a=n&&!o&&!(1===r)&&!(8===i);return u({blending:s(i)?l(r,!0):null,depthTest:n&&!o?{func:515}:null,depthWrite:a?m:null,colorWrite:p,polygonOffset:t?h:null})}};d=e([r("esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique")],d);const h={factor:0,units:-4},g=o().vec2u8("uv0",{glNormalized:!0});function v(e){let r=o().vec3f("position").vec3f("normal").f32("groundDistance");return e.hasVertexCenterOffset&&(r=r.vec3f("centerOffset")),e.hasVertexColor&&(r=r.vec4u8("color",{glNormalized:!0})),e.hasVertexSize&&(r=r.vec2f("size")),e.hasVertexRotation&&(r=r.f32("rotation")),(e.hasVVColor||e.hasVVSize)&&(r=r.vec4f("featureAttribute")),e.hasVertexUVi&&(r=r.vec4i16("uvi")),a()?r.vec4u8("olidColor"):r}export{d as HUDMaterialTechnique,g as baseLayout,v as getInstanceLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isOITColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as a}from"../effects/geometry/olidUtils.js";import{blending as l}from"../lib/OrderIndependentTransparency.js";import{H as c}from"../../../../chunks/HUDMaterial.glsl.js";import{PrimitiveType as f}from"../../../webgl/enums.js";import{makePipelineState as u,defaultColorWrite as p,defaultDepthWrite as m}from"../../../webgl/renderState.js";let d=class extends n{constructor(e,r){super(e,r,t(g).concat(t(v(r)))),this.shader=new i(c,()=>import("./HUDMaterial.glsl.js")),this.ignoreUnused=!0,this.primitiveType=f.TRIANGLE_STRIP}initializePipeline(e){const{hasPolygonOffset:r,draped:t,output:o,depthTestEnabled:i}=e,n=s(o),a=i&&!t&&!n&&!(10===o);return u({blending:l(o,!0),depthTest:i&&!t?{func:515}:null,depthWrite:a?m:null,colorWrite:p,polygonOffset:r?h:null})}};d=e([r("esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique")],d);const h={factor:0,units:-4},g=o().vec2u8("uv0",{glNormalized:!0});function v(e){let r=o().vec3f("position").vec3f("normal").f32("groundDistance");return e.hasVertexCenterOffset&&(r=r.vec3f("centerOffset")),e.hasVertexColor&&(r=r.vec4u8("color",{glNormalized:!0})),e.hasVertexSize&&(r=r.vec2f("size")),e.hasVertexRotation&&(r=r.f32("rotation")),(e.hasVVColor||e.hasVVSize)&&(r=r.vec4f("featureAttribute")),e.hasVertexUVi&&(r=r.vec4i16("uvi")),a()?r.vec4u8("olidColor"):r}export{d as HUDMaterialTechnique,g as baseLayout,v as getInstanceLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{oitPolygonOffset as o,depthWrite as n,depthTest as a,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as c,stencilBaseAllZerosParams as u,stencilWriteMaskOn as m}from"../lib/StencilUtils.js";import{PositionUvLayout as d}from"../materials/DefaultLayouts.js";import{I as h}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as j}from"../../../webgl/renderState.js";let b=class extends l{constructor(e,t){super(e,t,r(P(t))),this.shader=new s(h,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{oitPass:r,output:s,hasOccludees:l,cullFace:d}=e;return f({blending:i(s)?p(r,!0):null,culling:j(d),depthTest:a(r),depthWrite:n(e),colorWrite:g,stencilWrite:l?m:null,stencilTest:l?t?c:u:null,polygonOffset:o(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipeline:super.getPipeline(e)}};function P(e){let t=d;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}b=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],b);export{b as ImageMaterialTechnique,P as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{oitPolygonOffset as l,depthWrite as o,depthTest as n,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as a,stencilBaseAllZerosParams as c,stencilWriteMaskOn as u}from"../lib/StencilUtils.js";import{PositionUvLayout as m}from"../materials/DefaultLayouts.js";import{I as d}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as h,defaultColorWrite as g,cullingParams as f}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,i(b(t))),this.shader=new r(d,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{output:i,hasOccludees:r,cullFace:s}=e;return h({blending:p(i,!0),culling:f(s),depthTest:n(i),depthWrite:o(e),colorWrite:g,stencilWrite:r?u:null,stencilTest:r?t?a:c:null,polygonOffset:l(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipeline:super.getPipeline(e)}};function b(e){let t=m;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}j=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],j);export{j as ImageMaterialTechnique,b as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as p,blending as l}from"../lib/OrderIndependentTransparency.js";import{L as a}from"../../../../chunks/LineCallout.glsl.js";import{PrimitiveType as c}from"../../../webgl/enums.js";import{makePipelineState as m,defaultDepthWrite as d,defaultColorWrite as u}from"../../../webgl/renderState.js";let f=class extends i{constructor(e,r){super(e,r,t(h).concat(t(T))),this.shader=new s(a,()=>import("./LineCallout.glsl.js")),this.primitiveType=c.TRIANGLE_STRIP}initializePipeline(e){const{hudDepth:r,terrainDepthTest:t,oitPass:o}=e,s=t?519:513;return m(r?{depthTest:{func:s},depthWrite:d}:{blending:l(o,!0),depthTest:p(o,s),colorWrite:u,depthWrite:n(e)})}};f=e([r("esri.views.3d.webgl-engine.shaders.LineCalloutTechnique")],f);const h=o().vec2u8("uv0",{glNormalized:!0}),T=o().vec3f("position").vec3f("normal").vec3f("centerOffset").f32("groundDistance");export{f as LineCalloutTechnique,h as baseLayout,T as layout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as p,blending as l}from"../lib/OrderIndependentTransparency.js";import{L as c}from"../../../../chunks/LineCallout.glsl.js";import{PrimitiveType as a}from"../../../webgl/enums.js";import{makePipelineState as m,defaultDepthWrite as u,defaultColorWrite as d}from"../../../webgl/renderState.js";let f=class extends s{constructor(e,r){super(e,r,t(h).concat(t(T))),this.shader=new i(c,()=>import("./LineCallout.glsl.js")),this.primitiveType=a.TRIANGLE_STRIP}initializePipeline(e){const{output:r,hudDepth:t,terrainDepthTest:o}=e,i=o?519:513;return m(t?{depthTest:{func:i},depthWrite:u}:{blending:l(r,!0),depthTest:p(r,i),colorWrite:d,depthWrite:n(e)})}};f=e([r("esri.views.3d.webgl-engine.shaders.LineCalloutTechnique")],f);const h=o().vec2u8("uv0",{glNormalized:!0}),T=o().vec3f("position").vec3f("normal").vec3f("centerOffset").f32("groundDistance");export{f as LineCalloutTechnique,h as baseLayout,T as layout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isColor as l}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as c,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as u,stencilBaseAllZerosParams as a,stencilWriteMaskOn as d,stencilToolTransparentOccluderParams as h,depthCompareAlways as f,stencilToolMaskOccluderParams as m,stencilWriteMaskOff as P,depthCompareLess as b}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as T,defaultColorWrite as W,unpremultipliedAlphaToPremultipliedAlpha as _}from"../../../webgl/renderState.js";let S=class extends n{constructor(e,t){super(e,t,i(j(t))),this.shader=new s(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,t){const{output:i,oitPass:r,space:s,hasOccludees:n}=e;return T({blending:l(i)?p(r):null,depthTest:0===s?null:c(r),depthWrite:o(e),colorWrite:W,stencilWrite:n?d:null,stencilTest:n?t?u:a:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=T({blending:_,depthTest:f,depthWrite:null,colorWrite:W,stencilWrite:null,stencilTest:h}),this._occluderPipelineOpaque=T({blending:_,depthTest:f,depthWrite:null,colorWrite:W,stencilWrite:P,stencilTest:m}),this._occluderPipelineMaskWrite=T({blending:null,depthTest:b,depthWrite:null,colorWrite:null,stencilWrite:d,stencilTest:u})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:12===e.occluder?this._occluderPipelineTransparent??super.getPipeline(e):11===e.occluder?this._occluderPipelineOpaque??super.getPipeline(e):this._occluderPipelineMaskWrite??super.getPipeline(e)}};function j(e){const t=r().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f16("size"),e.worldSpace&&t.vec3f16("normal"),t.freeze()}S=e([t("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],S);export{S as LineMarkerTechnique,j as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as o,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as p,stencilBaseAllZerosParams as u,stencilWriteMaskOn as a,stencilToolTransparentOccluderParams as d,depthCompareAlways as h,stencilToolMaskOccluderParams as f,stencilWriteMaskOff as m,depthCompareLess as P}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as T,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as W}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,t){super(e,t,i(S(t))),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,t){const{output:i,space:r,hasOccludees:l}=e;return T({blending:c(i),depthTest:0===r?null:o(i),depthWrite:n(e),colorWrite:b,stencilWrite:l?a:null,stencilTest:l?t?p:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:m,stencilTest:f}),this._occluderPipelineMaskWrite=T({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:p})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:12===e.occluder?this._occluderPipelineTransparent??super.getPipeline(e):11===e.occluder?this._occluderPipelineOpaque??super.getPipeline(e):this._occluderPipelineMaskWrite??super.getPipeline(e)}};function S(e){const t=r().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f16("size"),e.worldSpace&&t.vec3f16("normal"),t.freeze()}_=e([t("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],_);export{_ as LineMarkerTechnique,S as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as t}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as i}from"../lib/OrderIndependentTransparency.js";import{M as p}from"../../../../chunks/MeasurementArrow.glsl.js";import{PrimitiveType as l}from"../../../webgl/enums.js";import{makePipelineState as a,defaultColorWrite as m,defaultDepthWrite as f}from"../../../webgl/renderState.js";let c=class extends n{constructor(e,r){super(e,r,o(u)),this.shader=new s(p,()=>import("./MeasurementArrow.glsl.js")),this.primitiveType=l.TRIANGLE_STRIP}initializePipeline(e){const{transparent:r,oitPass:o,polygonOffsetEnabled:t}=e;return a({blending:r?i(o):null,polygonOffset:t?{factor:0,units:-4}:null,depthTest:{func:513},depthWrite:f,colorWrite:m})}};c=e([r("esri.views.3d.webgl-engine.shaders.MeasurementArrowTechnique")],c);const u=t().vec3f("position").vec3f("normal").vec2f("uv0").f32("length");export{c as MeasurementArrowTechnique,u as layout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as i}from"../lib/OrderIndependentTransparency.js";import{M as p}from"../../../../chunks/MeasurementArrow.glsl.js";import{PrimitiveType as l}from"../../../webgl/enums.js";import{makePipelineState as m,defaultColorWrite as a,defaultDepthWrite as u}from"../../../webgl/renderState.js";let f=class extends n{constructor(e,r){super(e,r,t(c)),this.shader=new s(p,()=>import("./MeasurementArrow.glsl.js")),this.primitiveType=l.TRIANGLE_STRIP}initializePipeline(e){const{output:r,transparent:t,polygonOffsetEnabled:o}=e;return m({blending:t?i(r):null,polygonOffset:o?{factor:0,units:-4}:null,depthTest:{func:513},depthWrite:u,colorWrite:a})}};f=e([r("esri.views.3d.webgl-engine.shaders.MeasurementArrowTechnique")],f);const c=o().vec3f("position").vec3f("normal").vec2f("uv0").f32("length");export{f as MeasurementArrowTechnique,c as layout};
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{isColor as o}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as l}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{If as a,glsl as t}from"../core/shaderModules/glsl.js";import{alphaCutoff as s}from"./alphaCutoff.glsl.js";import{oitResolution as e}from"./oitResolution.glsl.js";function n(n,f){n.include(i,f),n.include(r,f);const{fragment:u,outputs:d}=n;u.include(l);const{output:g,oitPass:c,hasEmission:m,discardInvisibleFragments:C,oitPremultipliedAlpha:p,snowCover:h,hasFloatOit:v}=f,b=9===g,y=o(g)&&1===c,O=o(g)&&2===c,$=o(g)&&1!==c;let E=0;($||y)&&d.add("fragColor","vec4",E++),m&&d.add("fragEmission","vec4",E++),y&&d.add("fragAlpha","float",E++),u.include(s),u.include(e,f),u.code.add(v?"float ditherNoise() { return 0.0; }":"\n float ditherNoise() {\n return (1.0 / 255.0) *\n (fract(52.9829189 * fract(dot(gl_FragCoord.xy + gl_FragCoord.z, vec2(0.06711056, 0.00583715)))) - 0.5);\n }\n "),u.code.add(t`
3
- void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${a(h,", float snow")}) {
4
- ${a(b,"finalColor.a = 1.0;")}
5
- ${a(C,"if (finalColor.a < alphaCutoff) { discard; }")}
2
+ import{isColor as o,isOITColor as r,isOITFrontFace as i}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as l}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as a}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as t}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{If as s,glsl as e}from"../core/shaderModules/glsl.js";import{alphaCutoff as n}from"./alphaCutoff.glsl.js";import{oitResolution as f}from"./oitResolution.glsl.js";function u(u,d){u.include(a,d),u.include(l,d);const{fragment:g,outputs:c}=u;g.include(t);const{output:m,hasEmission:C,discardInvisibleFragments:p,oitPremultipliedAlpha:h,snowCover:v,hasFloatOit:b}=d,y=11===m,O=r(m),$=i(m),E=o(m)&&!O;let j=0;(E||O)&&c.add("fragColor","vec4",j++),C&&c.add("fragEmission","vec4",j++),O&&c.add("fragAlpha","float",j++),g.include(n),g.include(f,d),g.code.add(b?"float ditherNoise() { return 0.0; }":"\n float ditherNoise() {\n return (1.0 / 255.0) *\n (fract(52.9829189 * fract(dot(gl_FragCoord.xy + gl_FragCoord.z, vec2(0.06711056, 0.00583715)))) - 0.5);\n }\n "),g.code.add(e`
3
+ void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${s(v,", float snow")}) {
4
+ ${s(y,"finalColor.a = 1.0;")}
5
+ ${s(p,"if (finalColor.a < alphaCutoff) { discard; }")}
6
6
 
7
- ${a(y,`${a(p,"fragColor = finalColor;","fragColor = premultiplyAlpha(finalColor);")}\n float noise = ditherNoise();\n fragColor = vec4(fragColor.rgb * oitOutputScale + noise, fragColor.a);\n fragAlpha = finalColor.a * oitOutputScale + noise;`)}
8
- ${a(O&&p&&C,"finalColor.rgb /= finalColor.a;")}
9
- ${a($,"fragColor = finalColor;")}
10
- ${a(m,`fragEmission = ${a(h,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}\n fragEmission = vec4(fragEmission.rgb * oitOutputScale, fragEmission.a);`)}
7
+ ${s(O,`${s(h,"fragColor = finalColor;","fragColor = premultiplyAlpha(finalColor);")}\n float noise = ditherNoise();\n fragColor = vec4(fragColor.rgb * oitOutputScale + noise, fragColor.a);\n fragAlpha = finalColor.a * oitOutputScale + noise;`)}
8
+ ${s($&&h&&p,"finalColor.rgb /= finalColor.a;")}
9
+ ${s(E,"fragColor = finalColor;")}
10
+ ${s(C,`fragEmission = ${s(v,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}\n fragEmission = vec4(fragEmission.rgb * oitOutputScale, fragEmission.a);`)}
11
11
  calculateOcclusionAndOutputHighlight();
12
- ${a(b,"outputObjectAndLayerIdColor();")}
12
+ ${s(y,"outputObjectAndLayerIdColor();")}
13
13
  }
14
- `)}export{n as outputColorHighlightOLID};
14
+ `)}export{u as outputColorHighlightOLID};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{oitPolygonOffset as n,depthWrite as l,depthTest as p,blending as a}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as c,stencilBaseAllZerosParams as u,stencilWriteMaskOn as d}from"../lib/StencilUtils.js";import{P as m}from"../../../../chunks/Pattern.glsl.js";import{getLayout as h}from"./PatternLayouts.js";import{makePipelineState as f,defaultColorWrite as P,cullingParams as g}from"../../../webgl/renderState.js";let j=class extends o{constructor(e,t){super(e,t,r(h(t))),this.shader=new s(m,()=>import("./Pattern.glsl.js")),this.ignoreUnused=!0}_setPipelineState(e,t){const{oitPass:r,output:s,cullFace:o,draped:m,hasOccludees:h,polygonOffset:j}=e,b=0===r;return f({blending:i(s)?a(r):null,culling:g(o),depthTest:m?null:p(r),depthWrite:l(e),colorWrite:P,stencilWrite:h?d:null,stencilTest:h?t?c:u:null,polygonOffset:b?j?S:null:n(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};j=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],j);const S={factor:1,units:1};export{j as PatternTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{isOITColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{oitPolygonOffset as n,depthWrite as l,depthTest as p,blending as a}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as c,stencilBaseAllZerosParams as u,stencilWriteMaskOn as d}from"../lib/StencilUtils.js";import{P as m}from"../../../../chunks/Pattern.glsl.js";import{getLayout as h}from"./PatternLayouts.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as P}from"../../../webgl/renderState.js";let j=class extends o{constructor(e,t){super(e,t,r(h(t))),this.shader=new s(m,()=>import("./Pattern.glsl.js")),this.ignoreUnused=!0}_setPipelineState(e,t){const{output:r,cullFace:s,draped:o,hasOccludees:m,polygonOffset:h}=e,j=!i(r);return f({blending:a(r),culling:P(s),depthTest:o?null:p(r),depthWrite:l(e),colorWrite:g,stencilWrite:m?d:null,stencilTest:m?t?c:u:null,polygonOffset:j?h?S:null:n(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};j=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],j);const S={factor:1,units:1};export{j as PatternTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isColor as l}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as o}from"../effects/geometry/olidUtils.js";import{OITPolygonOffset as c,depthWrite as u,depthTest as p,blending as a}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as d,stencilBaseAllZerosParams as f,stencilWriteMaskOn as h,stencilToolTransparentOccluderParams as m,depthCompareAlways as g,stencilToolMaskOccluderParams as b,stencilWriteMaskOff as P,depthCompareLess as T}from"../lib/StencilUtils.js";import{R as W}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as j}from"../../../webgl/enums.js";import{makePipelineState as y,defaultColorWrite as O,unpremultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";let v=class extends n{constructor(e,t){super(e,t,i(w(t))),this.shader=new s(W,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=t.wireframe?j.LINES:j.TRIANGLE_STRIP}_makePipelineState(e,t){const{oitPass:i,output:r,hasOccludees:s,hasPolygonOffset:n}=e,o=0===i,m=2===i;return y({blending:l(r)?a(i):null,depthTest:p(i),depthWrite:u(e),colorWrite:O,stencilWrite:s?h:null,stencilTest:s?t?d:f:null,polygonOffset:o||m?n?_:null:c})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?_:null,{hasOccludees:i}=e;this._occluderPipelineTransparent=y({blending:S,polygonOffset:t,depthTest:g,depthWrite:null,colorWrite:O,stencilWrite:null,stencilTest:i?m:null}),this._occluderPipelineOpaque=y({blending:S,polygonOffset:t,depthTest:i?g:T,depthWrite:null,colorWrite:O,stencilWrite:i?P:null,stencilTest:i?b:null}),this._occluderPipelineMaskWrite=y({blending:null,polygonOffset:t,depthTest:T,depthWrite:null,colorWrite:null,stencilWrite:i?h:null,stencilTest:i?d:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(t)return this._occludeePipeline;switch(e.occluder){case 12:return this._occluderPipelineTransparent??super.getPipeline(e);case 11:return this._occluderPipelineOpaque??super.getPipeline(e);default:e.occluder;case void 0:case null:return this._occluderPipelineMaskWrite??super.getPipeline(e)}}};v=e([t("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],v);const _={factor:0,units:-4};function w(e){const t=r().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f32("size"),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),o()&&t.vec4u8("olidColor"),e.hasAnimation&&t.vec4f16("timeStamps"),t}export{v as RibbonLineTechnique,w as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isOITColor as l}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as o}from"../effects/geometry/olidUtils.js";import{OITPolygonOffset as c,depthWrite as u,depthTest as p,blending as a}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as d,stencilBaseAllZerosParams as f,stencilWriteMaskOn as h,stencilToolTransparentOccluderParams as m,depthCompareAlways as g,stencilToolMaskOccluderParams as b,stencilWriteMaskOff as P,depthCompareLess as T}from"../lib/StencilUtils.js";import{R as W}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as j}from"../../../webgl/enums.js";import{makePipelineState as y,defaultColorWrite as O,unpremultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";let v=class extends n{constructor(e,t){super(e,t,i(w(t))),this.shader=new s(W,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=t.wireframe?j.LINES:j.TRIANGLE_STRIP}_makePipelineState(e,t){const{output:i,hasOccludees:r,hasPolygonOffset:s}=e,n=!l(i);return y({blending:a(i),depthTest:p(i),depthWrite:u(e),colorWrite:O,stencilWrite:r?h:null,stencilTest:r?t?d:f:null,polygonOffset:n?s?_:null:c})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?_:null,{hasOccludees:i}=e;this._occluderPipelineTransparent=y({blending:S,polygonOffset:t,depthTest:g,depthWrite:null,colorWrite:O,stencilWrite:null,stencilTest:i?m:null}),this._occluderPipelineOpaque=y({blending:S,polygonOffset:t,depthTest:i?g:T,depthWrite:null,colorWrite:O,stencilWrite:i?P:null,stencilTest:i?b:null}),this._occluderPipelineMaskWrite=y({blending:null,polygonOffset:t,depthTest:T,depthWrite:null,colorWrite:null,stencilWrite:i?h:null,stencilTest:i?d:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(t)return this._occludeePipeline;switch(e.occluder){case 12:return this._occluderPipelineTransparent??super.getPipeline(e);case 11:return this._occluderPipelineOpaque??super.getPipeline(e);default:e.occluder;case void 0:case null:return this._occluderPipelineMaskWrite??super.getPipeline(e)}}};v=e([t("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],v);const _={factor:0,units:-4};function w(e){const t=r().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f32("size"),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),o()&&t.vec4u8("olidColor"),e.hasAnimation&&t.vec4f16("timeStamps"),t}export{v as RibbonLineTechnique,w as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as t}from"../../support/buffer/InterleavedLayout.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPolygonOffset as a,depthWrite as l,blending as d}from"../lib/OrderIndependentTransparency.js";import{S as p}from"../../../../chunks/ShadedColorMaterial.glsl.js";import{makePipelineState as c,defaultColorWrite as u,cullingParams as f}from"../../../webgl/renderState.js";let m=class extends n{constructor(e,r){super(e,r,o(h(r))),this.shader=new i(p,()=>import("./ShadedColorMaterial.glsl.js"))}initializePipeline(e){const{oitPass:r,output:o,transparent:t,cullFace:i,shadingEnabled:n}=e,p=0===r,m=2===r;return c({blending:s(o)&&t?d(r):null,culling:f(i),depthTest:{func:m?513:n?515:513},depthWrite:l(e),colorWrite:u,polygonOffset:p||m?null:a})}};function h(e){const r=t().vec3f("position").vec3f("normal");return e.screenSizeEnabled&&r.vec3f("offset"),r}m=e([r("esri.views.3d.webgl-engine.shaders.ShadedColorMaterialTechnique")],m);export{m as ShadedColorMaterialTechnique,h as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as t}from"../../support/buffer/InterleavedLayout.js";import{isOITColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPolygonOffset as a,depthWrite as l,blending as d}from"../lib/OrderIndependentTransparency.js";import{S as p}from"../../../../chunks/ShadedColorMaterial.glsl.js";import{makePipelineState as c,defaultColorWrite as u,cullingParams as f}from"../../../webgl/renderState.js";let m=class extends n{constructor(e,r){super(e,r,o(h(r))),this.shader=new i(p,()=>import("./ShadedColorMaterial.glsl.js"))}initializePipeline(e){const{output:r,transparent:o,cullFace:t,shadingEnabled:i}=e,n=!s(r),p=2===r;return c({blending:o?d(r):null,culling:f(t),depthTest:{func:p?513:i?515:513},depthWrite:l(e),colorWrite:u,polygonOffset:n?null:a})}};function h(e){const r=t().vec3f("position").vec3f("normal");return e.screenSizeEnabled&&r.vec3f("offset"),r}m=e([r("esri.views.3d.webgl-engine.shaders.ShadedColorMaterialTechnique")],m);export{m as ShadedColorMaterialTechnique,h as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{layout as i}from"../../terrain/TerrainAttributes.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as n}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as p,blending as c}from"../lib/OrderIndependentTransparency.js";import{renderWhenBitIsNotSet as a}from"../lib/StencilUtils.js";import{a as u}from"../../../../chunks/Terrain.glsl.js";import{makePipelineState as d,defaultColorWrite as h,defaultDepthWrite as m,premultipliedAlpha as f}from"../../../webgl/renderState.js";let T=class extends l{constructor(e,r){super(e,r,t(i)),this.shader=new n(u,()=>import("./Terrain.glsl.js")),this.ignoreUnused=!0,this.useStencil=!1}initializePipeline(e){return this._stencilPipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}_createPipeline(e,r){const{renderOccluded:t,output:i,oitPass:n}=e;return d(0===n?{blending:t?f:null,depthTest:t?null:{func:513},depthWrite:t?null:m,colorWrite:h,stencilTest:r?a(1):null}:{blending:s(i)?c(n,t):null,depthTest:p(n,t?519:513),depthWrite:t?null:o(e),colorWrite:h,stencilTest:r?a(1):null})}getPipeline(e){return this.useStencil?this._stencilPipelineState:super.getPipeline(e)}};T=e([r("esri.views.3d.webgl-engine.shaders.TerrainTechnique")],T);export{T as TerrainTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{layout as i}from"../../terrain/TerrainAttributes.js";import{isOIT as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as n}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as p,blending as c}from"../lib/OrderIndependentTransparency.js";import{renderWhenBitIsNotSet as a}from"../lib/StencilUtils.js";import{a as u}from"../../../../chunks/Terrain.glsl.js";import{makePipelineState as d,defaultColorWrite as h,defaultDepthWrite as m,premultipliedAlpha as f}from"../../../webgl/renderState.js";let T=class extends l{constructor(e,r){super(e,r,t(i)),this.shader=new n(u,()=>import("./Terrain.glsl.js")),this.ignoreUnused=!0,this.useStencil=!1}initializePipeline(e){return this._stencilPipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}_createPipeline(e,r){const{renderOccluded:t,output:i}=e;return d(s(i)?{blending:c(i,t),depthTest:p(i,t?519:513),depthWrite:t?null:o(e),colorWrite:h,stencilTest:r?a(1):null}:{blending:t?f:null,depthTest:t?null:{func:513},depthWrite:t?null:m,colorWrite:h,stencilTest:r?a(1):null})}getPipeline(e){return this.useStencil?this._stencilPipelineState:super.getPipeline(e)}};T=e([r("esri.views.3d.webgl-engine.shaders.TerrainTechnique")],T);export{T as TerrainTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.highStepCount=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.discardInvisibleFragments=!0,this.oitPremultipliedAlpha=!0,this.snowCover=!1}get overlayEnabled(){return 0!==this.overlayMode}get hasWater(){return 9!==this.output}}e([t({count:3})],i.prototype,"overlayMode",void 0),e([t({count:3})],i.prototype,"tileBlendInput",void 0),e([t({count:4})],i.prototype,"transparencyMode",void 0),e([t({count:7})],i.prototype,"pbrMode",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"textureFadingEnabled",void 0),e([t()],i.prototype,"renderOccluded",void 0),e([t()],i.prototype,"screenSpaceReflections",void 0),e([t()],i.prototype,"cloudReflections",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"tileBorders",void 0);export{i as TerrainTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.highStepCount=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.discardInvisibleFragments=!0,this.oitPremultipliedAlpha=!0,this.snowCover=!1}get overlayEnabled(){return 0!==this.overlayMode}get hasWater(){return 11!==this.output}}e([t({count:3})],i.prototype,"overlayMode",void 0),e([t({count:3})],i.prototype,"tileBlendInput",void 0),e([t({count:4})],i.prototype,"transparencyMode",void 0),e([t({count:7})],i.prototype,"pbrMode",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"textureFadingEnabled",void 0),e([t()],i.prototype,"renderOccluded",void 0),e([t()],i.prototype,"screenSpaceReflections",void 0),e([t()],i.prototype,"cloudReflections",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"tileBorders",void 0);export{i as TerrainTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{EventEmitter as i}from"../../core/Evented.js";import{watch as o,sync as s}from"../../core/reactiveUtils.js";import{property as l,subclass as r}from"../../core/accessorSupport/decorators.js";import{distance as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectPointToVector as h}from"../../geometry/projection/projectPointToVector.js";import{getGraphicEffectiveElevationMode as c}from"../../support/elevationInfoUtils.js";import p from"../../symbols/support/ElevationInfo.js";import{intersectionDistance2D as m}from"./support/utils.js";let u=class extends e{set graphic(t){this._circleCollisionCache=null,this._originalSymbol=t.symbol,this._set("graphic",t),this.attachSymbolChanged()}get elevationInfo(){const{layer:t}=this.graphic,e=t&&"elevationInfo"in t?t.elevationInfo:null,i=c(this.graphic),o=e?e.offset:0;return new p({mode:i,offset:o})}set focusedSymbol(t){t!==this._get("focusedSymbol")&&(this._set("focusedSymbol",t),this._updateGraphicSymbol(),this._circleCollisionCache=null)}grabbableForEvent(){return!0}set grabbing(t){t!==this._get("grabbing")&&(this._set("grabbing",t),this._updateGraphicSymbol())}set hovering(t){t!==this._get("hovering")&&(this._set("hovering",t),this._updateGraphicSymbol())}set selected(t){t!==this._get("selected")&&(this._set("selected",t),this._updateGraphicSymbol(),this.events.emit("select-changed",{action:t?"select":"deselect"}))}get _focused(){return this._get("hovering")||this._get("grabbing")}constructor(t){super(t),this.layer=null,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.dragging=!1,this.cursor=null,this.consumesClicks=!0,this.events=new i,this._circleCollisionCache=null,this._graphicSymbolChangedHandle=null,this._originalSymbol=null}destroy(){this.detachSymbolChanged(),this._resetGraphicSymbol(),this._set("view",null)}intersectionDistance(t){const e=this.graphic;if(!1===e.visible)return null;const i=e.geometry;if(null==i)return null;const o=this._get("focusedSymbol"),s=null!=o?o:e.symbol;return"2d"===this.view.type?this._intersectDistance2D(this.view,t,i,s):this._intersectDistance3D(this.view,t,e)}attach(){this.attachSymbolChanged(),null!=this.layer&&this.layer.add(this.graphic)}detach(){this.detachSymbolChanged(),this._resetGraphicSymbol(),null!=this.layer&&this.layer.remove(this.graphic)}attachSymbolChanged(){this.detachSymbolChanged(),this._graphicSymbolChangedHandle=o(()=>this.graphic?.symbol,t=>{null!=t&&t!==this.focusedSymbol&&t!==this._originalSymbol&&(this._originalSymbol=t,this._focused&&null!=this.focusedSymbol&&(this.graphic.symbol=this.focusedSymbol))},s)}detachSymbolChanged(){null!=this._graphicSymbolChangedHandle&&(this._graphicSymbolChangedHandle.remove(),this._graphicSymbolChangedHandle=null)}onElevationChange(){}onViewChange(){}_updateGraphicSymbol(){this.graphic.symbol=this._focused&&null!=this.focusedSymbol?this.focusedSymbol:this._originalSymbol}_resetGraphicSymbol(){this.graphic.symbol=this._originalSymbol}_intersectDistance2D(t,e,i,o){const{cache:s,result:l}=m(t,e,i,o,this._circleCollisionCache)??{};return this._circleCollisionCache=s,l??null}_intersectDistance3D(t,e,i){const o=t.toMap(e,{include:[i]});return o&&h(o,g,t.renderSpatialReference)?n(g,t.state.camera.eye):null}};t([l({constructOnly:!0,nonNullable:!0})],u.prototype,"graphic",null),t([l()],u.prototype,"elevationInfo",null),t([l({constructOnly:!0,nonNullable:!0})],u.prototype,"view",void 0),t([l({value:null})],u.prototype,"focusedSymbol",null),t([l({constructOnly:!0})],u.prototype,"layer",void 0),t([l()],u.prototype,"interactive",void 0),t([l()],u.prototype,"selectable",void 0),t([l()],u.prototype,"grabbable",void 0),t([l({value:!1})],u.prototype,"grabbing",null),t([l()],u.prototype,"dragging",void 0),t([l()],u.prototype,"hovering",null),t([l({value:!1})],u.prototype,"selected",null),t([l()],u.prototype,"cursor",void 0),u=t([r("esri.views.interactive.GraphicManipulator")],u);const g=a();export{u as GraphicManipulator};
2
+ import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{EventEmitter as i}from"../../core/Evented.js";import{watch as o,sync as s}from"../../core/reactiveUtils.js";import{property as l,subclass as r}from"../../core/accessorSupport/decorators.js";import{distance as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectPointToVector as h}from"../../geometry/projection/projectPointToVector.js";import{getGraphicEffectiveElevationMode as c}from"../../support/elevationInfoUtils.js";import p from"../../symbols/support/ElevationInfo.js";import{intersectionDistance2D as u}from"./support/utils.js";let m=class extends e{set graphic(t){this._circleCollisionCache=null,this._originalSymbol=t.symbol,this._set("graphic",t),this.attachSymbolChanged()}get elevationInfo(){const{layer:t}=this.graphic,e=t&&"elevationInfo"in t?t.elevationInfo:null,i=c(this.graphic),o=e?e.offset:0;return new p({mode:i,offset:o})}set focusedSymbol(t){t!==this._get("focusedSymbol")&&(this._set("focusedSymbol",t),this._updateGraphicSymbol(),this._circleCollisionCache=null)}grabbableForEvent(){return!0}set grabbing(t){t!==this._get("grabbing")&&(this._set("grabbing",t),this._updateGraphicSymbol())}set hovering(t){t!==this._get("hovering")&&(this._set("hovering",t),this._updateGraphicSymbol())}set selected(t){t!==this._get("selected")&&(this._set("selected",t),this._updateGraphicSymbol(),this.events.emit("select-changed",{action:t?"select":"deselect"}))}get _focused(){return this._get("hovering")||this._get("grabbing")}constructor(t){super(t),this.layer=null,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.dragging=!1,this.cursor=null,this.consumesClicks=!0,this.events=new i,this._circleCollisionCache=null,this._graphicSymbolChangedHandle=null,this._originalSymbol=null}destroy(){this.detachSymbolChanged(),this._resetGraphicSymbol(),this._set("view",null)}intersectionDistance(t){const e=this.graphic;if(!1===e.visible)return null;const i=e.geometry;if(null==i)return null;const o=this._get("focusedSymbol"),s=null!=o?o:e.symbol;return"2d"===this.view.type?this._intersectDistance2D(this.view,t,i,s):this._intersectDistance3D(this.view,t,e)}attach(){this.attachSymbolChanged(),null!=this.layer&&this.layer.add(this.graphic)}detach(){this.detachSymbolChanged(),this._resetGraphicSymbol(),null!=this.layer&&this.layer.remove(this.graphic)}attachSymbolChanged(){this.detachSymbolChanged(),this._graphicSymbolChangedHandle=o(()=>this.graphic?.symbol,t=>{null!=t&&t!==this.focusedSymbol&&t!==this._originalSymbol&&(this._originalSymbol=t,this._focused&&null!=this.focusedSymbol&&(this.graphic.symbol=this.focusedSymbol))},s)}detachSymbolChanged(){null!=this._graphicSymbolChangedHandle&&(this._graphicSymbolChangedHandle.remove(),this._graphicSymbolChangedHandle=null)}onElevationChange(){}onViewChange(){}_updateGraphicSymbol(){this.graphic.symbol=this._focused&&null!=this.focusedSymbol?this.focusedSymbol:this._originalSymbol}_resetGraphicSymbol(){this.graphic.symbol=this._originalSymbol}_intersectDistance2D(t,e,i,o){const{cache:s,result:l}=u(t,e,i,o,this._circleCollisionCache)??{};return this._circleCollisionCache=s,l??null}_intersectDistance3D(t,e,i){const o=t.toMap(e,{include:[i]});return o&&h(o,g,t.renderSpatialReference)?n(g,t.state.camera.eye):null}};t([l({constructOnly:!0,nonNullable:!0})],m.prototype,"graphic",null),t([l()],m.prototype,"elevationInfo",null),t([l({constructOnly:!0,nonNullable:!0})],m.prototype,"view",void 0),t([l({value:null})],m.prototype,"focusedSymbol",null),t([l({constructOnly:!0})],m.prototype,"layer",void 0),t([l()],m.prototype,"interactive",void 0),t([l()],m.prototype,"selectable",void 0),t([l()],m.prototype,"grabbable",void 0),t([l({value:!1})],m.prototype,"grabbing",null),t([l()],m.prototype,"dragging",void 0),t([l()],m.prototype,"hovering",null),t([l({value:!1})],m.prototype,"selected",null),t([l()],m.prototype,"cursor",void 0),t([l({constructOnly:!0})],m.prototype,"consumesClicks",void 0),m=t([r("esri.views.interactive.GraphicManipulator")],m);const g=a();export{m as GraphicManipulator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{when as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{notAvailableString as s}from"../constants.js";import{DrawHeaderActions as n}from"../components/DrawHeaderActions.js";import{TooltipEditableField as r}from"../components/TooltipEditableField.js";import{TooltipField as l}from"../components/TooltipField.js";import{ValueByValue as d}from"../components/ValueByValue.js";import{TooltipContent as f}from"./TooltipContent.js";import{messageBundle as p,tsx as a,tsxFragment as m}from"../../../../widgets/support/widget.js";let c=class extends f{initialize(){this.addHandles(t(()=>this.info&&this._messagesUnits&&this._messagesTooltip&&this.fieldContext,()=>this.info.renderContext=this.fieldContext),{once:!0})}destroy(){this.info&&(this.info.renderContext=null)}_renderContent(){const{fieldContext:e,info:t,mode:i}=this,o=t.fieldsGroupedForDisplay;return o.length?a(m,null,o.map(t=>{if("left"in t&&(t.left.readOnly&&t.right.readOnly||"feedback"===i)){const i="string"==typeof t.left.title?t.left.title:t.left.title(e);return a(l,{title:i,value:a(d,{left:t.left.getFormattedValue(e)??s,right:t.right.getFormattedValue(e)??s})})}return"left"in t?a(m,null,a(r,{context:e,field:t.left,key:t.left.id,mode:i}),a(r,{context:e,field:t.right,key:t.right.id,mode:i})):a(r,{context:e,field:t,key:t.id,mode:i})})):null}get _defaultHelpMessage(){const{helpMessageExtended:e,viewType:t}=this.info;if(null==e)return null;const i="3d"===t?"helpMessages3d":"helpMessages2d";return this._messagesEditor?.[i]?.[e]}_renderActions(){const{xyMode:e,sketchOptions:t}=this.info,i=this.info.allFields.some(e=>"direction"===e.name);return a(n,{sketchOptions:t,visibleElements:{direction:"direction-distance"===e&&i}})}};e([p("esri/widgets/Editor/t9n/Editor"),i()],c.prototype,"_messagesEditor",void 0),e([i()],c.prototype,"_defaultHelpMessage",null),c=e([o("esri.views.interactive.tooltip.content.TooltipContentDynamic")],c);export{c as TooltipContentDynamic};
2
+ import{__decorate as t}from"tslib";import{when as e}from"../../../../core/reactiveUtils.js";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{notAvailableString as o}from"../constants.js";import{DrawHeaderActions as n}from"../components/DrawHeaderActions.js";import{TooltipEditableField as r}from"../components/TooltipEditableField.js";import{TooltipField as s}from"../components/TooltipField.js";import{ValueByValue as l}from"../components/ValueByValue.js";import{TooltipContent as d}from"./TooltipContent.js";import{tsx as f,tsxFragment as m}from"../../../../widgets/support/widget.js";let c=class extends d{initialize(){this.addHandles(e(()=>this.info&&this._messagesUnits&&this._messagesTooltip&&this.fieldContext,()=>this.info.renderContext=this.fieldContext),{once:!0})}destroy(){this.info&&(this.info.renderContext=null)}_renderContent(){const{fieldContext:t,info:e,mode:i}=this,n=e.fieldsGroupedForDisplay;return n.length?f(m,null,n.map(e=>{if("left"in e&&(e.left.readOnly&&e.right.readOnly||"feedback"===i)){const i="string"==typeof e.left.title?e.left.title:e.left.title(t);return f(s,{title:i,value:f(l,{left:e.left.getFormattedValue(t)??o,right:e.right.getFormattedValue(t)??o})})}return"left"in e?f(m,null,f(r,{context:t,field:e.left,key:e.left.id,mode:i}),f(r,{context:t,field:e.right,key:e.right.id,mode:i})):f(r,{context:t,field:e,key:e.id,mode:i})})):null}_renderActions(){const{xyMode:t,sketchOptions:e}=this.info,i=this.info.allFields.some(t=>"direction"===t.name);return f(n,{sketchOptions:e,visibleElements:{direction:"direction-distance"===t&&i}})}};c=t([i("esri.views.interactive.tooltip.content.TooltipContentDynamic")],c);export{c as TooltipContentDynamic};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let s=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return a(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>n(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>r(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>o(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const l of e){const e=l.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(l)}for(const[l,s]of t.entries())if(2===s.length&&l){const e=s.toSorted((e,t)=>o(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...s.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}get helpMessageExtended(){return this.getHelpMessageKey?.()}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),l=a(t??[],e).map(e=>e.field).filter(d);return(this._useCoordinateDisplay(e,i)?l.filter(n):this._useDirectionDistanceDisplay(e,i)?l.filter(r):l).filter(this._isVisibleField)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.sketchOptions.tooltips.xyMode,i=e?.editSession?.endVertex?.leftSegment?.leftVertex;return"auto"===t?i&&"primary"===e?.role?"direction-distance":"coordinates":t}_useCoordinateDisplay(e,t){const{availableFields:i}=this;return("coordinates"===t||"secondary"===e?.role)&&i.some(e=>"x"===e.name)&&i.some(e=>"y"===e.name)}_useDirectionDistanceDisplay(e,t){const{availableFields:i}=this;return"direction-distance"===t&&"primary"===e?.role&&i.some(e=>"distance"===e.name)&&i.some(e=>"direction"===e.name)}};function o(e,t){return e.displayOrder-t.displayOrder}function n(e){return"direction"!==e.name&&"distance"!==e.name}function r(e){return"x"!==e.name&&"y"!==e.name}function a(e,t){const{name:i,role:l}=t??{};return e?.filter(e=>!(null!=e.appliesToHandlesWithName&&e.appliesToHandlesWithName!==i||null!=e.appliesToHandlesWithRole&&e.appliesToHandlesWithRole!==l))??[]}function d(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([t()],s.prototype,"type",void 0),e([t()],s.prototype,"getAllFields",void 0),e([t()],s.prototype,"getActiveHandle",void 0),e([t()],s.prototype,"getHelpMessageKey",void 0),e([t()],s.prototype,"availableFields",null),e([t()],s.prototype,"availableFieldsForCurrentHandle",null),e([t()],s.prototype,"allManagedFields",null),e([t()],s.prototype,"fieldsGroupedForDisplay",null),e([t()],s.prototype,"xyMode",null),e([t()],s.prototype,"allFields",null),e([t()],s.prototype,"renderContext",void 0),e([t()],s.prototype,"helpMessageExtended",null),s=e([i("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],s);export{s as DynamicTooltipInfo,d as isKnownConstraintField};
2
+ import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let o=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this.helpMessage=void 0,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}initialize(){this.addHandles(t(()=>this.getHelpMessageKey?.(),e=>this.helpMessage=e??void 0))}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return d(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>n(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>a(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>r(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const s of e){const e=s.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(s)}for(const[s,l]of t.entries())if(2===l.length&&s){const e=l.toSorted((e,t)=>r(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...l.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),s=d(t??[],e).map(e=>e.field).filter(p);return(this._useCoordinateDisplay(e,i)?s.filter(n):this._useDirectionDistanceDisplay(e,i)?s.filter(a):s).filter(this._isVisibleField)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.sketchOptions.tooltips.xyMode,i=e?.editSession?.endVertex?.leftSegment?.leftVertex;return"auto"===t?i&&"primary"===e?.role?"direction-distance":"coordinates":t}_useCoordinateDisplay(e,t){const{availableFields:i}=this;return("coordinates"===t||"secondary"===e?.role)&&i.some(e=>"x"===e.name)&&i.some(e=>"y"===e.name)}_useDirectionDistanceDisplay(e,t){const{availableFields:i}=this;return"direction-distance"===t&&"primary"===e?.role&&i.some(e=>"distance"===e.name)&&i.some(e=>"direction"===e.name)}};function r(e,t){return e.displayOrder-t.displayOrder}function n(e){return"direction"!==e.name&&"distance"!==e.name}function a(e){return"x"!==e.name&&"y"!==e.name}function d(e,t){const{name:i,role:s}=t??{};return e?.filter(e=>!(null!=e.appliesToHandlesWithName&&e.appliesToHandlesWithName!==i||null!=e.appliesToHandlesWithRole&&e.appliesToHandlesWithRole!==s))??[]}function p(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([i()],o.prototype,"type",void 0),e([i()],o.prototype,"getAllFields",void 0),e([i()],o.prototype,"getActiveHandle",void 0),e([i()],o.prototype,"getHelpMessageKey",void 0),e([i()],o.prototype,"availableFields",null),e([i()],o.prototype,"availableFieldsForCurrentHandle",null),e([i()],o.prototype,"allManagedFields",null),e([i()],o.prototype,"fieldsGroupedForDisplay",null),e([i()],o.prototype,"xyMode",null),e([i()],o.prototype,"allFields",null),e([i()],o.prototype,"renderContext",void 0),e([i()],o.prototype,"helpMessage",void 0),o=e([s("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],o);export{o as DynamicTooltipInfo,p as isKnownConstraintField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{fetchMessageBundle as r,onLocaleChange as i}from"../../intl.js";import{multiplyOpacity as s,getContrast as a}from"../../core/colorUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as o,initial as m}from"../../core/reactiveUtils.js";import{formatDecimal as l,formatImperialArea as p,formatMetricArea as c,formatImperialLength as h,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as d,deriveLengthUnitFromAreaUnit as v}from"../../core/units.js";import{property as y,subclass as g}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import{isSupported as _,geodesicDensify as w,geodesicLengths as b,geodesicAreas as L}from"../../geometry/geodesicUtils.js";import j from"../../geometry/Point.js";import S from"../../geometry/Polygon.js";import A from"../../geometry/Polyline.js";import{e as G}from"../../chunks/areaOperator.js";import{e as k,l as x}from"../../chunks/geodeticAreaOperator.js";import{e as M,l as O}from"../../chunks/geodeticDensifyOperator.js";import{e as C,l as H}from"../../chunks/geodeticLengthOperator.js";import{e as R}from"../../chunks/lengthOperator.js";import{e as T}from"../../chunks/simplifyOperator.js";import{polygonCentroidPoint as U}from"../../geometry/support/centroid.js";import q from"../../layers/GraphicsLayer.js";import z from"../../symbols/Font.js";import D from"../../symbols/SimpleFillSymbol.js";import P from"../../symbols/SimpleLineSymbol.js";import E from"../../symbols/SimpleMarkerSymbol.js";import V from"../../symbols/TextSymbol.js";import{SnappingVisualizer2D as F}from"../../views/2d/interactive/SnappingVisualizer2D.js";import W from"../../views/draw/Draw.js";import{createCoordinateHelper as I}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as B,screenToMap as J,dragManipulatedObject as N}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as K}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as Q}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as X}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as Y}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as Z}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as $}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as ee}from"../../views/interactive/snapping/snappingUtils.js";const te=1e5;let re=class extends Q{constructor(e){super(e),this._measurementLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement layer"}),this._manipulatorLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement manipulator layer"}),this._snappingLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement snapping layer"}),this._updatingHandles=new f,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){r("esri/core/t9n/Units").then(e=>{this.messages=e});const e=this.view;this._draw=new W({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([i(async()=>{this.messages=await r("esri/core/t9n/Units")}),o(()=>[this.unit,this.messages],()=>{this._updateGraphics()},m),o(()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor],()=>{if(!this._vertices.length)return;const e=this._vertices.map(({coord:e})=>e);for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)})]),ee(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=n(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=n(this._measurementLayer),this._manipulatorLayer=n(this._manipulatorLayer),this._snappingLayer=n(this._snappingLayer),this._updatingHandles=n(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new Z({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new Y(new X("point",I(!1,!1,this.view.spatialReference)),2),visualizer:new F(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this;this._draw.create("polyline",{mode:"click",snappingManager:e}).on(["draw-complete","vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],e=>{this._updateSketch(e.vertices),"draw-complete"===e.type&&this._stopSketch()})}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach(({manipulator:e})=>{e.interactive=!0}),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[i,s]=e[r],a=new j({x:i,y:s,spatialReference:t}),n=ie(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=Y.fromGeometry(a,2);o.on("vertex-update",e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())});const m=B(n,(e,t,r,i)=>{const s=this._getSnappingContext(i),{snappingManager:a}=this,n=this._updatingHandles,{snappingStep:m}=$({snappingContext:s,snappingManager:a,updatingHandles:n});t.next(J(this.view)).next(t=>{if("start"===t.action){const r=new j(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t}).next(...m).next(N({operations:o})).next(()=>{e.graphic.geometry=o.data.geometry})});this._vertices.push({manipulator:n,coord:[i,s],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,i=this._vertices[r],[s,a]=e[r];i.coord[0]===s&&i.coord[1]===a||(i.coord=[s,a],i.manipulator.graphic.geometry=new j({x:s,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach(({manipulator:e})=>{e.interactive=null==n||e!==n})}this._updateGraphics()}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=se(this._vertices.map(({coord:e})=>e),this.view.spatialReference);if(!e)return;const{measurement:r,fillGeometry:i,outlineGeometry:n}=e;this._set("measurement",r);const o=r?oe(this.messages,r,this.unit):null;if(this._set("measurementLabel",o),!i&&!n)return;let m,l,p;const{graphics:c}=this._measurementLayer,h=3===c.length,{effectiveTheme:u}=this.view;h?(m=c.at(0),l=c.at(1),p=c.at(2)):(m=new t({symbol:new D({color:s(u.accentColor,.3),outline:null})}),l=new t({symbol:new P({color:u.accentColor,width:2})}),p=new t({symbol:new V({color:u.textColor,font:new z({size:14,family:"sans-serif"}),haloColor:s(a(u.textColor,160),.5),haloSize:2})}),c.removeAll(),c.addMany([m,l,p])),m.geometry=i,l.geometry=n;const d=i?U(i):null,v=d?j.fromJSON(d):null;p.geometry=v,p.symbol.text=o?.area??""}};function ie(e,r,i){const a=8,n={style:"circle",color:s(r.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new E({...n,size:a}),m=new E({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new K({view:r,layer:i,graphic:l,focusedSymbol:m})}function se(e,t){if(2===e.length){const r=new A({paths:[e],spatialReference:t});let i;return i=t.isGeographic?_(t)?w(r,te):M(r,te,{unit:"meters"}):t.isWebMercator?M(r,te,{unit:"meters"}):r,{measurement:null,fillGeometry:null,outlineGeometry:i}}e.push(e[0]);const r=new A({paths:[e],spatialReference:t}),i=new S({rings:[e],spatialReference:t});let s,a,n=null,o=null;if(t.isGeographic)if(_(t)){if(n=w(r,te),o=w(i,te),o=T(o),!o)return null;s=b([r],"meters")[0],a=L([o],"square-meters")[0]}else{if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=k(o,{unit:"square-meters"})}else if(t.isWebMercator){if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=k(o,{unit:"square-meters"})}else{if(n=r,o=T(i),!o)return null;s=R(r,{unit:"meters"}),a=G(o,{unit:"square-meters"})}return{measurement:{geometry:o,area:a,perimeter:s},fillGeometry:o,outlineGeometry:n}}function ae(e){return null!=e}async function ne(e){(e?.isGeographic&&!_(e)||e?.isWebMercator)&&await Promise.all([x(),O(),H()])}function oe(e,t,r){if(!t||!e)return null;const i={area:null,perimeter:null},{area:s,perimeter:a}=t;switch(r){case"metric":i.area=c(e,s,"square-meters");break;case"imperial":i.area=p(e,s,"square-meters");break;default:{const t=d(s,"square-meters",r);i.area=l(e,t,r);break}}const n=v(r);if(n)switch(n){case"metric":i.perimeter=u(e,a,"meters");break;case"imperial":i.perimeter=h(e,a,"meters");break;default:{const t=d(a,"meters",n);i.perimeter=l(e,t,n);break}}else i.perimeter="";return i}e([y()],re.prototype,"_drawActive",void 0),e([y({readOnly:!0})],re.prototype,"cursor",null),e([y({value:!0})],re.prototype,"editable",null),e([y({readOnly:!0})],re.prototype,"measurement",void 0),e([y({readOnly:!0})],re.prototype,"measurementLabel",void 0),e([y()],re.prototype,"messages",void 0),e([y({constructOnly:!0})],re.prototype,"snappingManager",void 0),e([y()],re.prototype,"unit",void 0),e([y()],re.prototype,"updating",null),e([y({constructOnly:!0})],re.prototype,"view",void 0),re=e([g("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],re);export{re as AreaMeasurement2DTool,se as createAreaMeasurementInfo2D,oe as createAreaMeasurementLabel,ae as isSupported,ne as loadGeometryOperators};
2
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{fetchMessageBundle as r,onLocaleChange as i}from"../../intl.js";import{multiplyOpacity as s,getContrast as a}from"../../core/colorUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as o,initial as m}from"../../core/reactiveUtils.js";import{formatDecimal as l,formatImperialArea as p,formatMetricArea as c,formatImperialLength as h,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as d,deriveLengthUnitFromAreaUnit as v}from"../../core/units.js";import{property as y,subclass as g}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import{isSupported as _,geodesicDensify as w,geodesicLengths as b,geodesicAreas as L}from"../../geometry/geodesicUtils.js";import j from"../../geometry/Point.js";import S from"../../geometry/Polygon.js";import A from"../../geometry/Polyline.js";import{e as k}from"../../chunks/areaOperator.js";import{e as G,l as x}from"../../chunks/geodeticAreaOperator.js";import{e as M,l as O}from"../../chunks/geodeticDensifyOperator.js";import{e as C,l as H}from"../../chunks/geodeticLengthOperator.js";import{e as R}from"../../chunks/lengthOperator.js";import{e as T}from"../../chunks/simplifyOperator.js";import{polygonCentroidPoint as U}from"../../geometry/support/centroid.js";import q from"../../layers/GraphicsLayer.js";import z from"../../symbols/Font.js";import D from"../../symbols/SimpleFillSymbol.js";import P from"../../symbols/SimpleLineSymbol.js";import E from"../../symbols/SimpleMarkerSymbol.js";import V from"../../symbols/TextSymbol.js";import{SnappingVisualizer2D as F}from"../../views/2d/interactive/SnappingVisualizer2D.js";import W from"../../views/draw/Draw.js";import{createCoordinateHelper as I}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as B,screenToMap as J,dragManipulatedObject as N}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as K}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as Q}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as X}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as Y}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as Z}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as $}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{setupSnappingToggleHandles as ee}from"../../views/interactive/snapping/snappingUtils.js";const te=1e5;let re=class extends Q{constructor(e){super(e),this._measurementLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement layer"}),this._manipulatorLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement manipulator layer"}),this._snappingLayer=new q({internal:!0,listMode:"hide",visible:!1,title:"Area measurement snapping layer"}),this._updatingHandles=new f,this._vertices=[],this._drawActive=!1,this.measurement=null,this.measurementLabel=null}initialize(){r("esri/core/t9n/Units").then(e=>{this.messages=e});const e=this.view;this._draw=new W({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this.addHandles([i(async()=>{this.messages=await r("esri/core/t9n/Units")}),o(()=>[this.unit,this.messages],()=>{this._updateGraphics()},m),o(()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor],()=>{if(!this._vertices.length)return;const e=this._vertices.map(({coord:e})=>e);for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)})]),ee(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=n(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=n(this._measurementLayer),this._manipulatorLayer=n(this._manipulatorLayer),this._snappingLayer=n(this._snappingLayer),this._updatingHandles=n(this._updatingHandles),this._resetVertices()}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this.snappingManager.options}get updating(){return this._updatingHandles.updating||this.snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new Z({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new Y(new X("point",I(!1,!1,this.view.spatialReference)),2),visualizer:new F(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const{snappingManager:e}=this;this._draw.create("polyline",{mode:"click",snappingManager:e}).on(["draw-complete","vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],e=>{this._updateSketch(e.vertices),"draw-complete"===e.type&&this._stopSketch()})}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach(({manipulator:e})=>{e.interactive=!0}),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const{spatialReference:t}=this.view;for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[i,s]=e[r],a=new j({x:i,y:s,spatialReference:t}),n=ie(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=Y.fromGeometry(a,2);o.on("vertex-update",e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())});const m=B(n,(e,t,r,i)=>{const s=this._getSnappingContext(i),{snappingManager:a}=this,n=this._updatingHandles,{snappingStep:m}=$({snappingContext:s,snappingManager:a,updatingHandles:n});t.next(J(this.view)).next(t=>{if("start"===t.action){const r=new j(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t}).next(...m).next(N({operations:o})).next(()=>{e.graphic.geometry=o.data.geometry})});this._vertices.push({manipulator:n,coord:[i,s],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,i=this._vertices[r],[s,a]=e[r];i.coord[0]===s&&i.coord[1]===a||(i.coord=[s,a],i.manipulator.graphic.geometry=new j({x:s,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach(({manipulator:e})=>{e.interactive=null==n||e!==n})}this._updateGraphics()}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=se(this._vertices.map(({coord:e})=>e),this.view.spatialReference);if(!e)return;const{measurement:r,fillGeometry:i,outlineGeometry:n}=e;this._set("measurement",r);const o=r?oe(this.messages,r,this.unit):null;if(this._set("measurementLabel",o),!i&&!n)return;let m,l,p;const{graphics:c}=this._measurementLayer,h=3===c.length,{effectiveTheme:u}=this.view;h?(m=c.at(0),l=c.at(1),p=c.at(2)):(m=new t({symbol:new D({color:s(u.accentColor,.3),outline:null})}),l=new t({symbol:new P({color:u.accentColor,width:2})}),p=new t({symbol:new V({color:u.textColor,font:new z({size:14,family:"sans-serif"}),haloColor:s(a(u.textColor,160),.5),haloSize:2})}),c.removeAll(),c.addMany([m,l,p])),m.geometry=i,l.geometry=n;const d=i?U(i):null,v=d?j.fromJSON(d):null;p.geometry=v,p.symbol.text=o?.area??""}};function ie(e,r,i){const a=8,n={style:"circle",color:s(r.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new E({...n,size:a}),m=new E({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new K({view:r,layer:i,graphic:l,focusedSymbol:m,consumesClicks:!1})}function se(e,t){if(2===e.length){const r=new A({paths:[e],spatialReference:t});let i;return i=t.isGeographic?_(t)?w(r,te):M(r,te,{unit:"meters"}):t.isWebMercator?M(r,te,{unit:"meters"}):r,{measurement:null,fillGeometry:null,outlineGeometry:i}}e.push(e[0]);const r=new A({paths:[e],spatialReference:t}),i=new S({rings:[e],spatialReference:t});let s,a,n=null,o=null;if(t.isGeographic)if(_(t)){if(n=w(r,te),o=w(i,te),o=T(o),!o)return null;s=b([r],"meters")[0],a=L([o],"square-meters")[0]}else{if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=G(o,{unit:"square-meters"})}else if(t.isWebMercator){if(n=M(r,te,{unit:"meters"}),o=M(i,te,{unit:"meters"}),o=T(o),!o)return null;s=C(r,{unit:"meters"}),a=G(o,{unit:"square-meters"})}else{if(n=r,o=T(i),!o)return null;s=R(r,{unit:"meters"}),a=k(o,{unit:"square-meters"})}return{measurement:{geometry:o,area:a,perimeter:s},fillGeometry:o,outlineGeometry:n}}function ae(e){return null!=e}async function ne(e){(e?.isGeographic&&!_(e)||e?.isWebMercator)&&await Promise.all([x(),O(),H()])}function oe(e,t,r){if(!t||!e)return null;const i={area:null,perimeter:null},{area:s,perimeter:a}=t;switch(r){case"metric":i.area=c(e,s,"square-meters");break;case"imperial":i.area=p(e,s,"square-meters");break;default:{const t=d(s,"square-meters",r);i.area=l(e,t,r);break}}const n=v(r);if(n)switch(n){case"metric":i.perimeter=u(e,a,"meters");break;case"imperial":i.perimeter=h(e,a,"meters");break;default:{const t=d(a,"meters",n);i.perimeter=l(e,t,n);break}}else i.perimeter="";return i}e([y()],re.prototype,"_drawActive",void 0),e([y({readOnly:!0})],re.prototype,"cursor",null),e([y({value:!0})],re.prototype,"editable",null),e([y({readOnly:!0})],re.prototype,"measurement",void 0),e([y({readOnly:!0})],re.prototype,"measurementLabel",void 0),e([y()],re.prototype,"messages",void 0),e([y({constructOnly:!0})],re.prototype,"snappingManager",void 0),e([y()],re.prototype,"unit",void 0),e([y()],re.prototype,"updating",null),e([y({constructOnly:!0})],re.prototype,"view",void 0),re=e([g("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],re);export{re as AreaMeasurement2DTool,se as createAreaMeasurementInfo2D,oe as createAreaMeasurementLabel,ae as isSupported,ne as loadGeometryOperators};