@arcgis/core 5.0.0-next.66 → 5.0.0-next.68

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 (595) hide show
  1. package/Ground.d.ts +4 -4
  2. package/Map.d.ts +1 -1
  3. package/WebDocument2D.d.ts +2 -3
  4. package/WebScene.d.ts +2 -3
  5. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
  6. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
  7. package/applications/Components/QuantityFormatter.d.ts +14 -1
  8. package/applications/Components/SelectionOperation.d.ts +45 -9
  9. package/applications/Components/SketchTooltipControls.d.ts +31 -6
  10. package/applications/Components/actionUtils.d.ts +1 -0
  11. package/applications/Components/analysisUtils.d.ts +98 -26
  12. package/applications/Components/arcadeEditorUtils.d.ts +3 -0
  13. package/applications/Components/arcadeFeatureUtils.d.ts +34 -6
  14. package/applications/Components/baUtils.d.ts +8 -8
  15. package/applications/Components/basemapUtils.d.ts +2 -0
  16. package/applications/Components/drawUtils.d.ts +6 -1
  17. package/applications/Components/featureUtils.d.ts +9 -0
  18. package/applications/Components/fontUtils.d.ts +2 -0
  19. package/applications/Components/formatUtils.d.ts +2 -0
  20. package/applications/Components/getDefaultUnits.d.ts +2 -0
  21. package/applications/Components/imageryUtils.d.ts +135 -27
  22. package/applications/Components/layerOriginUtils.d.ts +5 -0
  23. package/applications/Components/layersEffectsJsonUtils.d.ts +2 -0
  24. package/applications/Components/previewSymbol2D.d.ts +2 -0
  25. package/applications/Components/reactiveUtils.d.ts +13 -9
  26. package/applications/Components/sanitizerUtils.d.ts +2 -0
  27. package/applications/Components/stringUtils.d.ts +5 -0
  28. package/applications/Components/styleUtils.d.ts +2 -0
  29. package/applications/Components/svgUtils.d.ts +4 -0
  30. package/applications/Components/testUtils.d.ts +3 -0
  31. package/applications/Components/viewUtils.d.ts +2 -0
  32. package/applications/Components/webStyleSymbolUtils.d.ts +2 -0
  33. package/applications/Excalibur/videoViewUtils.d.ts +19 -3
  34. package/applications/ExperienceBuilder/sketchUtils.d.ts +10 -1
  35. package/applications/KnowledgeStudio/dataModelVisualization.d.ts +2 -0
  36. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +33 -4
  37. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +73 -10
  38. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +12 -1
  39. package/applications/KnowledgeStudio/reshape.d.ts +144 -28
  40. package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +17 -3
  41. package/applications/MapViewer/layerUtils.d.ts +2 -0
  42. package/applications/MapViewer/mediaUtils.d.ts +42 -8
  43. package/applications/MapViewer/templateUtils.d.ts +78 -16
  44. package/applications/PortalApp/layerUtils.d.ts +2 -0
  45. package/applications/SceneViewer/colorUtils.d.ts +2 -0
  46. package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -0
  47. package/applications/SceneViewer/layerUtils.d.ts +5 -3
  48. package/applications/SceneViewer/sceneViewerUtils.d.ts +52 -5
  49. package/applications/SceneViewer/symbolUtils.d.ts +2 -0
  50. package/applications/Urban/LineImagePattern3D.d.ts +8 -2
  51. package/applications/Urban/imagePatternUtils.d.ts +10 -2
  52. package/applications/Urban/meshUtils.d.ts +2 -0
  53. package/applications/WebEditor/sketchUtils.d.ts +24 -4
  54. package/arcade/arcadeAsyncRuntime.js +1 -1
  55. package/arcade/arcadeCompiler.js +1 -1
  56. package/arcade/arcadeRuntime.js +1 -1
  57. package/arcade/batchExec.js +1 -1
  58. package/arcade/compilerUtils.js +1 -1
  59. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  60. package/arcade/geometry/unitConversion.js +1 -1
  61. package/arcade/treeAnalysis.js +1 -1
  62. package/arcade.js +1 -1
  63. package/assets/components/assets/icon/fileEsl16.json +1 -0
  64. package/assets/components/assets/icon/fileEsl24.json +1 -0
  65. package/assets/components/assets/icon/fileEsl32.json +1 -0
  66. package/assets/esri/core/workers/RemoteClient.js +1 -1
  67. package/assets/esri/core/workers/chunks/{251eb6e00f99a816d55c.js → 0326314947734b8e640a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +1 -0
  69. package/assets/esri/core/workers/chunks/04958494022f82dca473.js +1 -0
  70. package/assets/esri/core/workers/chunks/0b7bbdc0d71ee6721751.js +2 -0
  71. package/assets/esri/core/workers/chunks/{5909a0e763fddc3542e7.js.LICENSE.txt → 0b7bbdc0d71ee6721751.js.LICENSE.txt} +1 -1
  72. package/assets/esri/core/workers/chunks/0f8149fdcf0adeca268e.js +1 -0
  73. package/assets/esri/core/workers/chunks/{aa7a1705266eec353cb6.js → 0fc22ad791d3ec0a9c5e.js} +1 -1
  74. package/assets/esri/core/workers/chunks/10e474d664b20adcd917.js +1 -0
  75. package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
  76. package/assets/esri/core/workers/chunks/14dedd80fb797303f91f.js +1 -0
  77. package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +1 -0
  78. package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
  80. package/assets/esri/core/workers/chunks/204d738c8b651314ae64.js +1 -0
  81. package/assets/esri/core/workers/chunks/2085084324cd5a81783f.js +1 -0
  82. package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js → 25f3ee666f545a7a7993.js} +2 -2
  83. package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js.LICENSE.txt → 25f3ee666f545a7a7993.js.LICENSE.txt} +1 -1
  84. package/assets/esri/core/workers/chunks/2c2c0f66cffc521df736.js +1 -0
  85. package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +1 -0
  86. package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +1 -0
  87. package/assets/esri/core/workers/chunks/322085d63719da6e443c.js +1 -0
  88. package/assets/esri/core/workers/chunks/{76086517591d0eb35156.js → 34a2e0462eb05986cdd1.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{a6dcd13c792b6538ac50.js → 35593a9790818b689455.js} +1 -1
  90. package/assets/esri/core/workers/chunks/36ecf951c0c7dad84b69.js +1 -0
  91. package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js.LICENSE.txt +1 -1
  92. package/assets/esri/core/workers/chunks/3a04153ca9d8e4f01185.js +1 -0
  93. package/assets/esri/core/workers/chunks/{4e9a8fce55cad841c731.js → 3b25f5d9c8f78bb6e011.js} +1 -1
  94. package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +1 -0
  95. package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +1 -0
  96. package/assets/esri/core/workers/chunks/401ce5cb98fa14c1a725.js +1 -0
  97. package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +1 -0
  98. package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js.LICENSE.txt +1 -1
  99. package/assets/esri/core/workers/chunks/45a9cd722e98dd1548ae.js +1 -0
  100. package/assets/esri/core/workers/chunks/4a060147d25929680ec8.js +1 -0
  101. package/assets/esri/core/workers/chunks/4bcd74951477e8977ba1.js +1 -0
  102. package/assets/esri/core/workers/chunks/4d0eaeb4cd6cd55e25fd.js +1 -0
  103. package/assets/esri/core/workers/chunks/{687d2b761dc5b5cf0c31.js → 4d4d71d24c1a9cb342b8.js} +1 -1
  104. package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
  105. package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +1 -0
  106. package/assets/esri/core/workers/chunks/{abc236e99b52be1c83b9.js → 52a14266fe239b95c5ce.js} +1 -1
  107. package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +1 -0
  108. package/assets/esri/core/workers/chunks/{34178ace79e8dea3567d.js → 562cddaf63985e53ee6e.js} +1 -1
  109. package/assets/esri/core/workers/chunks/59a45533e96cedf1c480.js +1 -0
  110. package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js → 5b9f2aa3ba1bf12c3240.js} +2 -2
  111. package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js.LICENSE.txt → 5b9f2aa3ba1bf12c3240.js.LICENSE.txt} +1 -1
  112. package/assets/esri/core/workers/chunks/{6599cc702a46f81a5634.js → 5dd5be91038df8902dc4.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{49a1b7f700b8a42de817.js → 60c7f896f2246a8aa6d7.js} +19 -19
  114. package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +1 -0
  115. package/assets/esri/core/workers/chunks/61801bb8c7be8fe77086.js +1 -0
  116. package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.js +1 -0
  117. package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +1 -0
  118. package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +1 -0
  119. package/assets/esri/core/workers/chunks/{3fe7be535affae31de7e.js → 6b85a8776ec2beff63cb.js} +1 -1
  120. package/assets/esri/core/workers/chunks/6be530ab81291745485b.js.LICENSE.txt +1 -1
  121. package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +1 -0
  122. package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +1 -0
  123. package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +1 -0
  124. package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js.LICENSE.txt +1 -1
  125. package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +1 -0
  126. package/assets/esri/core/workers/chunks/{23b623637126f8411a30.js → 7aec07f2482934259d12.js} +1 -1
  127. package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
  128. package/assets/esri/core/workers/chunks/{741d170187e58e81584d.js → 7d744554d14057d9b2b1.js} +1 -1
  129. package/assets/esri/core/workers/chunks/7ea48661f1087d06aa41.js +1 -0
  130. package/assets/esri/core/workers/chunks/{47e5149765beee46f208.js → 7ee68f67f9cc48a328f0.js} +1 -1
  131. package/assets/esri/core/workers/chunks/866477acdf03b8a40bc9.js +1 -0
  132. package/assets/esri/core/workers/chunks/8e83c133b201b9b61e70.js +1 -0
  133. package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +1 -0
  134. package/assets/esri/core/workers/chunks/94174d40de39dbe7d0bf.js +1 -0
  135. package/assets/esri/core/workers/chunks/98f4b44eca91c42ca08e.js +1 -0
  136. package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js.LICENSE.txt +1 -1
  137. package/assets/esri/core/workers/chunks/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
  138. package/assets/esri/core/workers/chunks/a808be466812db51813d.js +1 -0
  139. package/assets/esri/core/workers/chunks/{6b4a24248182245167ca.js → a931515a2569713e743b.js} +1 -1
  140. package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +1 -0
  141. package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.js +1 -0
  142. package/assets/esri/core/workers/chunks/aeb524eded012217a865.js +1 -0
  143. package/assets/esri/core/workers/chunks/b2a1e5e9182b643909eb.js +316 -0
  144. package/assets/esri/core/workers/chunks/{ac6f002cfad42e60de8f.js → b48033645091c91e0d88.js} +1 -1
  145. package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +1 -0
  146. package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +1 -0
  147. package/assets/esri/core/workers/chunks/{07639f406b71bb49ffd6.js → bdbb5b33f0f49661bf6d.js} +1 -1
  148. package/assets/esri/core/workers/chunks/c042269586921e337be9.js +1 -0
  149. package/assets/esri/core/workers/chunks/c623918e289a09905cd1.js +1 -0
  150. package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.js +1 -0
  151. package/assets/esri/core/workers/chunks/{ac83c2999a3d2ffb4356.js → c7838ac0db8570a2d2c1.js} +1 -1
  152. package/assets/esri/core/workers/chunks/c91ef3814e7f024043cf.js +1 -0
  153. package/assets/esri/core/workers/chunks/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
  154. package/assets/esri/core/workers/chunks/cd2708fb7636b3ace229.js +1 -0
  155. package/assets/esri/core/workers/chunks/{310f3268582e61cd86da.js → d21480925a8bc9c7de96.js} +1 -1
  156. package/assets/esri/core/workers/chunks/d445e9399fe4ca3d2a50.js +1 -0
  157. package/assets/esri/core/workers/chunks/d7683a95775c9f401a7e.js +1 -0
  158. package/assets/esri/core/workers/chunks/{9d6945cda99d14af83ac.js → d7d9656b990ce8be2152.js} +1 -1
  159. package/assets/esri/core/workers/chunks/d9ca754f51b9812bb179.js +1 -0
  160. package/assets/esri/core/workers/chunks/d9ef0b3341e2744d8f2f.js +1 -0
  161. package/assets/esri/core/workers/chunks/df4a0af329ce94a47a7b.js +1 -0
  162. package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +1 -0
  163. package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +1 -0
  164. package/assets/esri/core/workers/chunks/e5aac523c37d906eece6.js +1 -0
  165. package/assets/esri/core/workers/chunks/e6ca02f98f855024f74b.js +1 -0
  166. package/assets/esri/core/workers/chunks/{892157696e8f9e38c472.js → e6e837e43b9348050832.js} +1 -1
  167. package/assets/esri/core/workers/chunks/{d3325ed8d224e2350db7.js → e8a3ad00936f2ccaf362.js} +1 -1
  168. package/assets/esri/core/workers/chunks/{f351007cdcd0938d3b6c.js → eeb24a4ab4993f1f4e8e.js} +1 -1
  169. package/assets/esri/core/workers/chunks/ef7063ee790d2d64d4b2.js +1 -0
  170. package/assets/esri/core/workers/chunks/{b65fcfde62d49de1fa54.js → ef977be20a647aeded0a.js} +1 -1
  171. package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +1 -0
  172. package/assets/esri/core/workers/chunks/{0f5693541111fcae0c2f.js → f0914715e90e43466f8c.js} +1 -1
  173. package/assets/esri/core/workers/chunks/f25bebd2b6eb0d0f6626.js.LICENSE.txt +1 -1
  174. package/assets/esri/core/workers/chunks/f95e488d2b86e320624f.js +1 -0
  175. package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.js} +1 -1
  176. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  177. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  178. package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
  179. package/chunks/boundedPlane.js +1 -1
  180. package/chunks/bundle2.js +5 -0
  181. package/config.js +1 -1
  182. package/copyright.txt +70 -1
  183. package/core/BidiText.js +1 -1
  184. package/core/accessorSupport/ensureType.js +1 -1
  185. package/core/compilerUtils.js +1 -1
  186. package/core/typedArrayUtil.js +1 -1
  187. package/core/units.js +1 -1
  188. package/core/workers/loaderConfig.js +1 -1
  189. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  190. package/geometry/support/FloatArray.js +1 -1
  191. package/geometry/support/Indices.js +1 -1
  192. package/geometry/support/MeshTexture.js +1 -1
  193. package/geometry/support/aaBoundingRect.js +1 -1
  194. package/geometry/support/boundedPlane.js +1 -1
  195. package/geometry/support/heightModelInfoUtils.js +1 -1
  196. package/geometry/support/meshUtils/External.js +1 -1
  197. package/geometry/support/meshUtils/exporters/gltf/imageutils.js +1 -1
  198. package/geometry/support/meshUtils/loadExternal.js +1 -1
  199. package/geometry/support/rotate.js +1 -1
  200. package/interfaces.d.ts +23 -24
  201. package/kernel.js +1 -1
  202. package/layers/BingMapsLayer.d.ts +2 -3
  203. package/layers/BuildingSceneLayer.d.ts +3 -5
  204. package/layers/CatalogLayer.d.ts +2 -4
  205. package/layers/DimensionLayer.d.ts +2 -3
  206. package/layers/ElevationLayer.d.ts +2 -4
  207. package/layers/FeatureLayer.d.ts +2 -4
  208. package/layers/GaussianSplatLayer.d.ts +1 -3
  209. package/layers/GeoJSONLayer.d.ts +2 -3
  210. package/layers/GeoRSSLayer.d.ts +2 -3
  211. package/layers/GroupLayer.d.ts +2 -3
  212. package/layers/ImageryLayer.d.ts +2 -5
  213. package/layers/ImageryTileLayer.d.ts +3 -7
  214. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -4
  215. package/layers/IntegratedMeshLayer.d.ts +2 -4
  216. package/layers/KMLLayer.d.ts +2 -3
  217. package/layers/KnowledgeGraphLayer.d.ts +2 -4
  218. package/layers/LineOfSightLayer.d.ts +2 -3
  219. package/layers/LinkChartLayer.d.ts +2 -3
  220. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  221. package/layers/MapImageLayer.d.ts +2 -4
  222. package/layers/MapNotesLayer.d.ts +2 -3
  223. package/layers/MediaLayer.d.ts +3 -4
  224. package/layers/OGCFeatureLayer.d.ts +2 -3
  225. package/layers/ParquetLayer.d.ts +2 -3
  226. package/layers/PointCloudLayer.d.ts +2 -4
  227. package/layers/RouteLayer.d.ts +2 -3
  228. package/layers/SceneLayer.d.ts +2 -4
  229. package/layers/StreamLayer.d.ts +2 -4
  230. package/layers/SubtypeGroupLayer.d.ts +2 -4
  231. package/layers/TileLayer.d.ts +2 -4
  232. package/layers/UnknownLayer.d.ts +2 -3
  233. package/layers/UnsupportedLayer.d.ts +2 -3
  234. package/layers/VectorTileLayer.d.ts +2 -4
  235. package/layers/VideoLayer.d.ts +8 -9
  236. package/layers/ViewshedLayer.d.ts +2 -3
  237. package/layers/VoxelLayer.d.ts +2 -4
  238. package/layers/WCSLayer.d.ts +2 -4
  239. package/layers/WFSLayer.d.ts +2 -3
  240. package/layers/WMSLayer.d.ts +5 -6
  241. package/layers/WMTSLayer.d.ts +4 -5
  242. package/layers/WebTileLayer.d.ts +2 -3
  243. package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
  244. package/layers/buildingSublayers/BuildingSublayer.d.ts +3 -3
  245. package/layers/buildingSublayers/BuildingSublayer.js +1 -1
  246. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -3
  247. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -3
  248. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  249. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  250. package/layers/graphics/data/QueryEngineResult.js +1 -1
  251. package/layers/graphics/dehydratedFeatureComparison.js +1 -1
  252. package/layers/graphics/dehydratedFeatures.js +1 -1
  253. package/layers/graphics/hydratedFeatures.js +1 -1
  254. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +4 -6
  255. package/layers/{support/media.d.ts → media/types.d.ts} +9 -9
  256. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  257. package/layers/mixins/ImageryTileMixin.d.ts +1 -1
  258. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  259. package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
  260. package/layers/raster/functions/changeDetectionUtils.js +1 -1
  261. package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
  262. package/layers/raster/functions/customBandIndexUtils.js +1 -1
  263. package/layers/raster/functions/focalStatUtils.js +1 -1
  264. package/layers/raster/functions/pixelTransformUtils.js +1 -1
  265. package/layers/raster/functions/types.d.ts +1 -1
  266. package/layers/{support/RasterTypes.d.ts → raster/types.d.ts} +2 -2
  267. package/layers/save/featureLayerUtils.js +1 -1
  268. package/layers/support/ElevationQuery.d.ts +2 -2
  269. package/layers/support/ElevationSampler.js +1 -1
  270. package/layers/support/FeatureType.d.ts +2 -2
  271. package/layers/support/Field.d.ts +2 -3
  272. package/layers/support/FieldConfiguration.d.ts +1 -1
  273. package/layers/support/ImageElement.d.ts +3 -3
  274. package/layers/support/LocalMediaElementSource.d.ts +1 -1
  275. package/layers/support/MediaElementBase.d.ts +4 -7
  276. package/layers/support/PixelBlock.d.ts +1 -1
  277. package/layers/support/RasterFunction.d.ts +1 -1
  278. package/layers/support/RasterInfo.d.ts +1 -1
  279. package/layers/support/Sublayer.d.ts +2 -3
  280. package/layers/support/Subtype.d.ts +2 -2
  281. package/layers/support/SubtypeSublayer.d.ts +2 -3
  282. package/layers/support/SubtypeSublayer.js +1 -1
  283. package/layers/support/VideoElement.d.ts +2 -2
  284. package/layers/support/WMSSublayer.d.ts +6 -6
  285. package/layers/support/WMSSublayer.js +1 -1
  286. package/layers/support/domains.js +1 -1
  287. package/layers/support/rasterFunctionUtils.d.ts +1 -1
  288. package/layers/support/tiles3DUtils.js +1 -1
  289. package/layers/support/types.d.ts +33 -1
  290. package/layers/types.d.ts +17 -2
  291. package/layers/wmts/types.d.ts +2 -0
  292. package/libs/text/loadTextModule.js +5 -0
  293. package/linkChart/LinkChartProperties.d.ts +4 -6
  294. package/linkChart/LinkChartProperties.js +1 -1
  295. package/networks/Network.d.ts +2 -4
  296. package/networks/support/NamedTraceConfiguration.d.ts +3 -3
  297. package/networks/support/NamedTraceConfiguration.js +1 -1
  298. package/networks/support/TopologyValidationJobInfo.js +1 -1
  299. package/networks/support/TraceJobInfo.js +1 -1
  300. package/package.json +3 -3
  301. package/popup/FieldInfo.d.ts +1 -1
  302. package/renderers/support/RasterSymbolizer.js +1 -1
  303. package/renderers/support/rendererConversion.js +1 -1
  304. package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
  305. package/request/process.js +1 -1
  306. package/rest/geometryService/types.d.ts +59 -0
  307. package/rest/geometryService.d.ts +3 -5
  308. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  309. package/rest/query/operations/query.js +1 -1
  310. package/rest/query/support/AttachmentInfo.d.ts +2 -2
  311. package/rest/support/AlgorithmicColorRamp.d.ts +2 -2
  312. package/rest/support/BinParametersBase.d.ts +2 -2
  313. package/rest/support/BinParametersBase.js +1 -1
  314. package/rest/support/DateBinTimeInterval.d.ts +1 -1
  315. package/rest/support/GeneralizeParameters.d.ts +1 -1
  316. package/rest/support/ImageSampleParameters.d.ts +1 -1
  317. package/rest/support/JobInfo.js +1 -1
  318. package/rest/support/PrintTemplate.d.ts +4 -6
  319. package/rest/support/ServiceAreaParameters.js +1 -1
  320. package/rest/support/types.d.ts +17 -1
  321. package/smartMapping/heuristics/sizeRange.js +1 -1
  322. package/smartMapping/renderers/support/utils.js +1 -1
  323. package/smartMapping/statistics/support/statsWorker.js +1 -1
  324. package/smartMapping/statistics/support/utils.js +1 -1
  325. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  326. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  327. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  328. package/smartMapping/support/adapters/support/utils.js +1 -1
  329. package/smartMapping/support/utils.js +1 -1
  330. package/support/revision.js +1 -1
  331. package/symbols/WebStyleSymbol.d.ts +0 -24
  332. package/symbols/WebStyleSymbol.js +1 -1
  333. package/symbols/support/ElevationInfo.d.ts +2 -2
  334. package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
  335. package/symbols/support/defaults.js +1 -1
  336. package/symbols/support/defaults3D.js +1 -1
  337. package/symbols/support/previewSymbol3D.js +1 -1
  338. package/symbols/support/symbolLayerUtils3D.js +1 -1
  339. package/symbols/support/symbolUtils.js +1 -1
  340. package/symbols/support/utils.js +1 -1
  341. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  342. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +16 -11
  343. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  344. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  345. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  346. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  347. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  348. package/views/2d/engine/webgl/GlyphSDFCreator.js +5 -0
  349. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  350. package/views/2d/engine/webgl/TextureManager.js +1 -1
  351. package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
  352. package/views/2d/engine/webgl/definitions.js +1 -1
  353. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  354. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  355. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  356. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  357. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  358. package/views/2d/input/handlers/DoubleTapDragZoom.js +1 -1
  359. package/views/2d/input/handlers/KeyZoom.js +1 -1
  360. package/views/2d/layers/BaseLayerView2D.d.ts +3 -6
  361. package/views/2d/layers/BaseLayerViewGL2D.d.ts +3 -6
  362. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  363. package/views/2d/layers/TileLayerView2D.js +1 -1
  364. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  365. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  366. package/views/3d/analysis/AreaMeasurement/support/utils.js +1 -1
  367. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  368. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  369. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +16 -11
  370. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  371. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  372. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  373. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  374. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  375. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  376. package/views/3d/environment/CloudsParameters.js +1 -1
  377. package/views/3d/environment/CloudsRenderer.js +1 -1
  378. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  379. package/views/3d/glTF/internal/Resource.js +1 -1
  380. package/views/3d/glTF/internal/fillDefaults.js +1 -1
  381. package/views/3d/interactive/Manipulator3D.js +1 -1
  382. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  383. package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
  384. package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
  385. package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
  386. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  387. package/views/3d/layers/I3SMeshView3D.js +1 -1
  388. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  389. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  390. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  391. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  392. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  393. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  394. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  395. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  396. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  397. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  398. package/views/3d/layers/graphics/lineUtils.js +1 -1
  399. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  400. package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
  401. package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
  402. package/views/3d/layers/i3s/BuildingFilterUtil.js +1 -1
  403. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  404. package/views/3d/layers/i3s/I3SNode.js +1 -1
  405. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  406. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  407. package/views/3d/layers/i3s/SphereCone.js +5 -0
  408. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  409. package/views/3d/layers/support/edgeUtils.js +1 -1
  410. package/views/3d/layers/support/featureReference.js +1 -1
  411. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  412. package/views/3d/layers/support/patternUtils.js +1 -1
  413. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  414. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  415. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  416. package/views/3d/support/buffer/glUtil.js +1 -1
  417. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  418. package/views/3d/support/viewpointUtils.js +1 -1
  419. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  420. package/views/3d/webgl/RenderNode.js +1 -1
  421. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  422. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  423. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +8 -8
  424. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  425. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
  426. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
  427. package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +2 -2
  428. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
  429. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +6 -6
  430. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
  431. package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -5
  432. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +3 -3
  433. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
  434. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  435. package/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js +1 -1
  436. package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
  437. package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
  438. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  439. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  440. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +4 -4
  441. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
  442. package/views/VideoView.d.ts +2 -3
  443. package/views/VideoView.js +1 -1
  444. package/views/View2D.d.ts +2 -3
  445. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  446. package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +5 -0
  447. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
  448. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  449. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  450. package/views/analysis/ElevationProfile/constants.js +1 -1
  451. package/views/draw/Draw.js +1 -1
  452. package/views/input/ViewEvents.js +1 -1
  453. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  454. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  455. package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
  456. package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
  457. package/views/layers/MediaLayerViewMixin.d.ts +1 -1
  458. package/views/support/PromiseQueue.js +1 -1
  459. package/views/support/screenUtils.js +1 -1
  460. package/views/support/screenshotUtils.js +1 -1
  461. package/views/types.d.ts +1 -1
  462. package/views/webgl/FramebufferObject.js +1 -1
  463. package/views/webgl/Uniform.js +1 -1
  464. package/views/webgl/Util.js +1 -1
  465. package/webdoc/applicationProperties/SearchLayerField.d.ts +1 -1
  466. package/webdoc/applicationProperties/SearchTableField.d.ts +1 -1
  467. package/webscene/Slide.d.ts +2 -2
  468. package/webscene/spec-certification/api.js +1 -1
  469. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  470. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
  471. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  472. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  473. package/widgets/BatchAttributeForm.js +1 -1
  474. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  475. package/widgets/Editor/components/workflowAdapters/pendingFeatureList/{CreateFeaturesWorkflowPendingFeatureListAdapter.ts.js → CreateFeaturesWorkflowPendingFeatureListAdapter.js} +1 -1
  476. package/widgets/Editor/types.d.ts +1 -1
  477. package/widgets/Editor/workflowUtils.js +1 -1
  478. package/widgets/Feature.d.ts +3 -5
  479. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  480. package/widgets/FeatureForm/FieldInput.d.ts +2 -2
  481. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  482. package/widgets/FeatureForm.js +1 -1
  483. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +1 -1
  484. package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
  485. package/widgets/FeatureTemplates/types.d.ts +1 -1
  486. package/widgets/Features.d.ts +3 -5
  487. package/widgets/Print/CustomTemplate.d.ts +3 -4
  488. package/widgets/Print/TemplateOptions.d.ts +3 -4
  489. package/widgets/Print/types.d.ts +3 -4
  490. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  491. package/widgets/Sketch/support/OperationHandle.js +1 -1
  492. package/widgets/TimeSlider.js +1 -1
  493. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +1 -1
  494. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  495. package/widgets/support/dateUtils.js +1 -1
  496. package/assets/esri/core/workers/chunks/0099f4729c94c779ba35.js +0 -1
  497. package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
  498. package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
  499. package/assets/esri/core/workers/chunks/0dc3a04ce717b7ddd957.js +0 -1
  500. package/assets/esri/core/workers/chunks/0e5cd0cf6ab7cb37d723.js +0 -1
  501. package/assets/esri/core/workers/chunks/0ee407b8db5c07a00d82.js +0 -1
  502. package/assets/esri/core/workers/chunks/10373885604655f673df.js +0 -1
  503. package/assets/esri/core/workers/chunks/13d61d34e55c80e4ecdf.js +0 -1
  504. package/assets/esri/core/workers/chunks/17dea03fc4eb414f0022.js +0 -1
  505. package/assets/esri/core/workers/chunks/1967239713b58dccfd81.js +0 -1
  506. package/assets/esri/core/workers/chunks/1ab98591d2f2bc604505.js +0 -1
  507. package/assets/esri/core/workers/chunks/1b838638e66e82d76cf3.js +0 -1
  508. package/assets/esri/core/workers/chunks/1c350a2c4014146dbcd9.js +0 -1
  509. package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
  510. package/assets/esri/core/workers/chunks/226acd251ad7d7ee3b57.js +0 -1
  511. package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +0 -1
  512. package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +0 -1
  513. package/assets/esri/core/workers/chunks/22dd5cecc7e2d4d0baf8.js +0 -316
  514. package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +0 -1
  515. package/assets/esri/core/workers/chunks/27f096c434f049b8df01.js +0 -1
  516. package/assets/esri/core/workers/chunks/2a6231db5ee6cbfd59a5.js +0 -1
  517. package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.js +0 -1
  518. package/assets/esri/core/workers/chunks/3c4f8597f602779174f1.js +0 -1
  519. package/assets/esri/core/workers/chunks/3da53c017f9c5d2d778a.js +0 -1
  520. package/assets/esri/core/workers/chunks/45b898367b6224dda46f.js +0 -1
  521. package/assets/esri/core/workers/chunks/4785cd108e2dec6e1697.js +0 -1
  522. package/assets/esri/core/workers/chunks/4d6d962d25aa836f53ee.js +0 -1
  523. package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +0 -1
  524. package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +0 -1
  525. package/assets/esri/core/workers/chunks/536c492fdda30f2f1288.js +0 -1
  526. package/assets/esri/core/workers/chunks/5909a0e763fddc3542e7.js +0 -2
  527. package/assets/esri/core/workers/chunks/5cee6c3ff23fb93f857a.js +0 -1
  528. package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +0 -1
  529. package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +0 -1
  530. package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
  531. package/assets/esri/core/workers/chunks/6cb44cd319cb6c2539c8.js +0 -1
  532. package/assets/esri/core/workers/chunks/7033fa18b7dd7bd3e49c.js +0 -1
  533. package/assets/esri/core/workers/chunks/7306b5b66e738a281d83.js +0 -1
  534. package/assets/esri/core/workers/chunks/7694abe44d55dae8872d.js +0 -1
  535. package/assets/esri/core/workers/chunks/7f4fa2f2e85863d3cfb9.js +0 -1
  536. package/assets/esri/core/workers/chunks/8f4c480c418eba299c2b.js +0 -1
  537. package/assets/esri/core/workers/chunks/964de713042f52d71e42.js +0 -1
  538. package/assets/esri/core/workers/chunks/a3836f6a93924ee4816e.js +0 -1
  539. package/assets/esri/core/workers/chunks/ab520fd1ae917daf07d8.js +0 -1
  540. package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +0 -1
  541. package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +0 -1
  542. package/assets/esri/core/workers/chunks/b25a131c04092c3ab75d.js +0 -1
  543. package/assets/esri/core/workers/chunks/b285de471ca90f38ec25.js +0 -1
  544. package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +0 -1
  545. package/assets/esri/core/workers/chunks/b9909264cfea68d5f2a1.js +0 -1
  546. package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
  547. package/assets/esri/core/workers/chunks/bcf612eabe7577540953.js +0 -1
  548. package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.js +0 -1
  549. package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +0 -1
  550. package/assets/esri/core/workers/chunks/c3007b916ba933137709.js +0 -1
  551. package/assets/esri/core/workers/chunks/cc5c1887e6d7079e5fe3.js +0 -1
  552. package/assets/esri/core/workers/chunks/ce8f075c814a8378c00c.js +0 -1
  553. package/assets/esri/core/workers/chunks/cfe1506a443fc84a0b91.js +0 -1
  554. package/assets/esri/core/workers/chunks/d30cfc5fa302cc08d862.js +0 -1
  555. package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +0 -1
  556. package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +0 -1
  557. package/assets/esri/core/workers/chunks/de71db3b0fb947b13c97.js +0 -1
  558. package/assets/esri/core/workers/chunks/dfbbead4c24d13682891.js +0 -1
  559. package/assets/esri/core/workers/chunks/e69255e38ff200dda14b.js +0 -1
  560. package/assets/esri/core/workers/chunks/e705d041f6c1632bfbcc.js +0 -1
  561. package/assets/esri/core/workers/chunks/e85da52d9cc7d9396872.js +0 -1
  562. package/assets/esri/core/workers/chunks/ee186ddbb1eb5144a790.js +0 -1
  563. package/assets/esri/core/workers/chunks/f9370830051865a3435b.js +0 -1
  564. package/core/MultiOriginJSONSupport.d.ts +0 -13
  565. package/core/NumericIdentifiable.d.ts +0 -6
  566. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +0 -6
  567. package/core/WriteableMultiOriginJSONMixin.d.ts +0 -6
  568. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.d.ts +0 -6
  569. package/layers/mixins/ArcGISService.d.ts +0 -6
  570. package/layers/mixins/RasterJobHandlerMixin.d.ts +0 -6
  571. package/layers/support/RasterFunctionProperties.d.ts +0 -2
  572. package/layers/support/domains.d.ts +0 -5
  573. package/layers/support/editableLayers.d.ts +0 -11
  574. package/layers/support/exifUtils.d.ts +0 -21
  575. package/layers/support/fieldFormatUtils.d.ts +0 -4
  576. package/layers/support/fieldType.d.ts +0 -2
  577. package/layers/support/layerUtils.d.ts +0 -4
  578. package/layers/support/wmtsUtils.d.ts +0 -2
  579. package/layers/video/videoUtils.d.ts +0 -5
  580. package/rest/geometryService/cut.d.ts +0 -7
  581. package/rest/geometryService/fromGeoCoordinateString.d.ts +0 -28
  582. package/rest/geometryService/toGeoCoordinateString.d.ts +0 -25
  583. package/rest/operations/generalize.d.ts +0 -3
  584. package/rest/support/DateBinUtils.d.ts +0 -2
  585. package/rest/support/colorRamps.d.ts +0 -6
  586. package/rest/support/fileFormat.d.ts +0 -4
  587. package/rest/support/layoutTemplate.d.ts +0 -2
  588. package/rest/support/reportTemplate.d.ts +0 -2
  589. package/views/2d/layers/LayerView2D.d.ts +0 -6
  590. package/views/Viewport2DBaseMixin.d.ts +0 -6
  591. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
  592. package/views/layers/RefreshableLayerView.d.ts +0 -6
  593. package/widgets/Feature/support/FeatureContentMixin.d.ts +0 -6
  594. /package/layers/video/{IVideoController.d.ts → types.d.ts} +0 -0
  595. /package/layers/{support/wmsUtils.d.ts → wms/types.d.ts} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o,subclass as l}from"../../../core/accessorSupport/decorators.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtMeasuredUnits.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../geometry/Polygon.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/Program.js";import"../../webgl/Util.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polyline.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/checkWebGLError.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as G,MapServiceLayerViewHelper as T}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";import{TaskPriority as S}from"../../support/Scheduler.js";const P=[0,0];let I=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:S.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),G(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new T({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=V(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(P,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],I.prototype,"resampling",null),e([o()],I.prototype,"tilemapCache",null),I=e([l("esri.views.2d.layers.TileLayerView2D")],I);const v=I;export{v as default};
5
+ import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o,subclass as l}from"../../../core/accessorSupport/decorators.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/RandomLCG.js";import"../../../core/has.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtMeasuredUnits.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../geometry/Polygon.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/Program.js";import"../../webgl/Util.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polyline.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/checkWebGLError.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as G,MapServiceLayerViewHelper as T}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";import{TaskPriority as S}from"../../support/Scheduler.js";const P=[0,0];let I=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:S.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),G(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new T({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=V(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(P,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],I.prototype,"resampling",null),e([o()],I.prototype,"tilemapCache",null),I=e([l("esri.views.2d.layers.TileLayerView2D")],I);const v=I;export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../../../../core/has.js";import t from"../../../../../../../core/workers/Connection.js";import{toQuantizationTransform as e}from"../../../../../../../geometry/support/quantizationUtils.js";import{convertFromFeatureSet as a,quantizeOptimizedFeatureSet as r}from"../../../../../../../layers/graphics/featureConversionUtils.js";import{queryOptimizedFeatureSet as s}from"../../../../../../../layers/ogc/ogcFeatureUtils.js";import{executeQueryPBFBuffer as i,executeQuery as o}from"../../../../../../../rest/query/operations/query.js";import{FeatureSetReaderJSON as n}from"../../../support/FeatureSetReaderJSON.js";import{FeatureSetReaderPBF as u}from"../../../support/FeatureSetReaderPBF.js";class c{constructor(t,e){this.service=t,this._metadata=e}destroy(){}}function m(t,e,a){switch(t.type){case"memory":return new p(t,e,a);case"ogc":return new h(t,e);case"feature-service":return t.queryMetadata.supportsFormatPBF&&has("featurelayer-pbf")?new f(t,e):new d(t,e)}}async function l(e){const a=new t;return await a.open(e,{}),a}class p extends c{constructor(t,e,a){super(t,e),this._ports=[],this._loaded=this._load(a)}destroy(){this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}async _load(t){this._ports=await t.layerView.openMemoryPorts(),this._client=await l(this._ports)}async executeQuery(t,e){await this._loaded;const a=await this._client.invoke("queryFeatures",t.toJSON(),e);return n.fromFeatureSet(a,this._metadata)}}class f extends c{async executeQuery(t,e){const a=await i(this.service.source,t,e),r=!t.quantizationParameters;return u.fromBuffer(a,this._metadata,r)}}class d extends c{async executeQuery(t,s){const{source:i,queryMetadata:u}=this.service;if(null!=t.quantizationParameters&&!u.supportsQuantization){const u=t.clone(),c=e(u.quantizationParameters);u.quantizationParameters=null;const m=await o(i,u,this._metadata.spatialReference,s),l=a(m,this._metadata.featureIdInfo);return r(c,l),n.fromOptimizedFeatureSet(l,this._metadata)}const c=await o(i,t,this._metadata.spatialReference,s);return"esriGeometryPoint"===this._metadata.geometryType&&(c.features=c.features?.filter(t=>{if(null!=t.geometry){const e=t.geometry;return Number.isFinite(e.x)&&Number.isFinite(e.y)}return!0})),n.fromFeatureSet(c,this._metadata)}}class h extends c{async executeQuery(t,a){if(t.quantizationParameters&&!this.service.queryMetadata.supportsQuantization){const i=t.clone(),o=e(i.quantizationParameters);i.quantizationParameters=null;const u=await s(this.service.source,t,a);return r(o,u),n.fromOptimizedFeatureSet(u,this._metadata)}const i=await s(this.service.source,t,a);return n.fromOptimizedFeatureSet(i,this._metadata)}}export{c as SourceAdapter,m as createQueryAdapter};
5
+ import t from"../../../../../../../request.js";import e from"../../../../../../../core/Error.js";import has from"../../../../../../../core/has.js";import r from"../../../../../../../core/workers/Connection.js";import{toQuantizationTransform as a}from"../../../../../../../geometry/support/quantizationUtils.js";import{convertFromFeatureSet as s,quantizeOptimizedFeatureSet as i}from"../../../../../../../layers/graphics/featureConversionUtils.js";import{queryOptimizedFeatureSet as o}from"../../../../../../../layers/ogc/ogcFeatureUtils.js";import{executeQueryPBFBuffer as n,getQueryParameters as u,executeQuery as c}from"../../../../../../../rest/query/operations/query.js";import{FeatureSetReaderJSON as m}from"../../../support/FeatureSetReaderJSON.js";import{FeatureSetReaderPBF as p}from"../../../support/FeatureSetReaderPBF.js";class l{constructor(t,e){this.service=t,this._metadata=e}destroy(){}}function f(t,e,r){switch(t.type){case"memory":return new d(t,e,r);case"ogc":return new w(t,e);case"feature-service":return t.queryMetadata.supportsFormatPBF&&has("featurelayer-pbf")?new h(t,e):new _(t,e)}}async function y(t){const e=new r;return await e.open(t,{}),e}class d extends l{constructor(t,e,r){super(t,e),this._ports=[],this._loaded=this._load(r)}destroy(){this._loaded.finally(()=>{this._client.close(),this._client=null;for(const t of this._ports)t.close()}).catch(()=>{})}async _load(t){this._ports=await t.layerView.openMemoryPorts(),this._client=await y(this._ports)}async executeQuery(t,e){await this._loaded;const r=await this._client.invoke("queryFeatures",t.toJSON(),e);return m.fromFeatureSet(r,this._metadata)}}class h extends l{async executeQuery(r,a){const s=await n(this.service.source,r,a),i=!r.quantizationParameters;try{return p.fromBuffer(s,this._metadata,i)}catch(o){const s=await u(this.service.source,r,"pbf",a??{}),{data:{url:i}}=await t(s.url,{responseType:"native-request-init",...s.options});throw new e("featurelayer:query","Failed to parse response",{url:i,error:o,query:r.toJSON()})}}}class _ extends l{async executeQuery(t,e){const{source:r,queryMetadata:o}=this.service;if(null!=t.quantizationParameters&&!o.supportsQuantization){const o=t.clone(),n=a(o.quantizationParameters);o.quantizationParameters=null;const u=await c(r,o,this._metadata.spatialReference,e),p=s(u,this._metadata.featureIdInfo);return i(n,p),m.fromOptimizedFeatureSet(p,this._metadata)}const n=await c(r,t,this._metadata.spatialReference,e);return"esriGeometryPoint"===this._metadata.geometryType&&(n.features=n.features?.filter(t=>{if(null!=t.geometry){const e=t.geometry;return Number.isFinite(e.x)&&Number.isFinite(e.y)}return!0})),m.fromFeatureSet(n,this._metadata)}}class w extends l{async executeQuery(t,e){if(t.quantizationParameters&&!this.service.queryMetadata.supportsQuantization){const r=t.clone(),s=a(r.quantizationParameters);r.quantizationParameters=null;const n=await o(this.service.source,t,e);return i(s,n),m.fromOptimizedFeatureSet(n,this._metadata)}const r=await o(this.service.source,t,e);return m.fromOptimizedFeatureSet(r,this._metadata)}}export{l as SourceAdapter,f as createQueryAdapter};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import t from"../../../../../core/Logger.js";import{assertIsSome as r}from"../../../../../core/maybe.js";import{baseObjectMemory as s}from"../../../../../core/memoryEstimations.js";import n from"../../../../../core/pbf.js";import a from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as i}from"./FeatureSetCache.js";import{FeatureSetReader as h}from"./FeatureSetReader.js";import{parseHeader as o}from"./FeatureSetReaderPBFHeader.js";const d=268435455,u=128,c=128e3,l={small:{delta:new Int32Array(u),decoded:new Int32Array(u)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(c),decoded:new Int32Array(c)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function g(e,t){return t?e<=l.small64.delta.length?l.small64:(e<=l.large64.delta.length||(l.large64.delta=new Float64Array(Math.round(1.25*e)),l.large64.decoded=new Float64Array(Math.round(1.25*e))),l.large64):e<=l.small.delta.length?l.small:(e<=l.large.delta.length||(l.large.delta=new Int32Array(Math.round(1.25*e)),l.large.decoded=new Int32Array(Math.round(1.25*e))),l.large)}function _(r){try{const e=2,t=new n(new Uint8Array(r),new DataView(r));for(;t.next();){if(t.tag()===e)return f(t.getMessage());t.skip()}}catch(s){const r=new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:s});t.getLogger("esri.view.2d.layers.features.support.FeatureSetReaderPBF").error(r)}return null}function f(e){const t=1;for(;e.next();){if(e.tag()===t)return e.getMessage();e.skip()}return null}function y(e){const t=1,r=2,s=3,n=4,a=5,i=6,h=7,o=8,d=9,u=e.getLength(),c=e.pos()+u;for(;e.pos()<c&&e.next();)switch(e.tag()){case t:return e.getString();case r:return e.getFloat();case s:return e.getDouble();case n:return e.getSInt32();case a:return e.getUInt32();case i:return e.getInt64();case h:return e.getUInt64();case o:return e.getSInt64();case d:return e.getBool();default:return e.skip(),null}return null}function m(e,t,r,s,n){if(!e)return!1;return 0===t*n-s*r&&t*s+r*n>0}class I extends h{static fromBuffer(e,t,r=!1){const s=t.geometryType,n=_(e),a=o(n,"esriGeometryPoint"===s,t.featureIdInfo,r);return new I(n,a,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return!1}get hasM(){return!1}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){if(1===this._header.idFieldIndices.length)return this._readAttributeAtIndex(this._header.idFieldIndices[0]);const e=this._header.idFieldIndices.map(e=>this._readAttributeAtIndex(e));return JSON.stringify(e)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(e){this._header.displayIds[this._featureIndex]=e}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const e=this._reader.clone(),t=new I(e,this._header,this.metadata,this._use64Bit);return this.copyInto(t),t}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0;++this._featureIndex<this._size&&!this._getExists(););return this._featureIndex<this._size}get usedMemory(){return s+(this._cache.geometry?.usedMemory??0)}get underlyingMemory(){return super.underlyingMemory+this._reader.usedMemory+this._header.usedMemory}_readX(){return this._header.centroid[2*this._featureIndex]}_readY(){return this._header.centroid[2*this._featureIndex+1]}_readServerCentroid(){const e=this._header.centroid[2*this._featureIndex],t=this._header.centroid[2*this._featureIndex+1];return e===d?null:new a([],[e,t])}_readGeometry(e=!1){if(void 0===this._cache.geometry){let r=null;if(this._isPoints){if(this._header.centroid[2*this._featureIndex]===d)return null;const e=this._header.centroid[2*this._featureIndex],t=this._header.centroid[2*this._featureIndex+1];r=new a([],[e,t])}else{const s=this._header.offsets.geometry[this._featureIndex],n=this._reader;if(0===s)return null;n.move(s);try{r=e?this._parseGeometryForDisplay(n):this._parseGeometry(n)}catch(t){return null}}return 0===r?.coords.length&&(r=null),this._cache.geometry=r,r}return this._cache.geometry}_readAttribute(e,t){const r=this._header.fields.get(e);if(null==r)return;const s=this._readAttributeAtIndex(r.index),n=this._header.fields.isDateField(r.name);return t?null==s?s:n?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._header.fields.fields)e[t.name]=this._readAttributeAtIndex(t.index);return e}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._featureOffset=this._featureOffset,e._hasNext=this._hasNext,e._parseCaches=this._parseCaches}_readAttributeAtIndex(e){let t=this._parseCaches[e];if(t||(t=new i(this.getSize()),this._parseCaches[e]=t),t.has(this._featureIndex))return t.get(this._featureIndex);const r=this._header.offsets.attributes[this._featureIndex*this._header.fieldCount+e],s=this._reader;s.move(r);const n=y(s);return t.set(this._featureIndex,n),n}_readGeometryDeltaDecoded(e=!1){if(void 0===this._cache.unquantGeometry){const t=this._readGeometry(e);if(!t)return this._cache.unquantGeometry=void 0,null;if(!this.getInTransform())return this._cache.unquantGeometry=t,t;const r=g(t.coords.length,this._use64Bit).decoded,s=t.clone(r),n=s.coords;let a=0;for(const e of s.lengths){for(let t=1;t<e;t++){const e=2*(a+t),r=2*(a+t-1);n[e]+=n[r],n[e+1]+=n[r+1]}a+=e}return this._cache.unquantGeometry=s,s}return this._cache.unquantGeometry}_parseGeometry(e){const t=2,r=3,s=e.asUnsafe(),n=s.getLength(),i=s.pos()+n,h=[],o=[];for(;s.pos()<i&&s.next();)switch(s.tag()){case t:{const e=s.getUInt32(),t=s.pos()+e;for(;s.pos()<t;)o.push(s.getUInt32());break}case r:{const e=s.getUInt32(),t=s.pos()+e;for(h.push(s.getSInt64()),h.push(s.getSInt64()),this.hasZ&&s.getSInt64(),this.hasM&&s.getSInt64();s.pos()<t;)h.push(s.getSInt64()),h.push(s.getSInt64()),this.hasZ&&s.getSInt64(),this.hasM&&s.getSInt64();break}default:s.skip()}return new a(o,h,this.hasZ,this.hasM)}_parseGeometryForDisplay(e){const t=2,s=3,n=e.asUnsafe(),i=n.getLength(),h=n.pos()+i,o=[],d=[];let u=0,c=0,l=null,_=0;const f="esriGeometryPolygon"===this.geometryType,y="esriGeometryPolyline"===this.geometryType,I=f?3:y?2:1,p=f||y;for(;n.pos()<h&&n.next();)switch(n.tag()){case t:{const e=n.getUInt32(),t=n.pos()+e;for(;n.pos()<t;){const e=n.getUInt32();o.push(e),u+=e}l=g(2*u,this._use64Bit).delta;break}case s:{n.getUInt32();const e=2+(this.hasZ?1:0)+(this.hasM?1:0);r(l);for(const t of o){if(c+e*t>l.length){for(let e=0;e<t;e++)n.getSInt64(),n.getSInt64(),this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64();continue}let r=0,s=n.getSInt64(),a=n.getSInt64();this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64(),l[c++]=s,l[c++]=a,r+=1;for(let e=1;e<t;e++){const e=n.getSInt64(),t=n.getSInt64(),i=s+e,h=a+t;_+=-.5*(i-s)*(h+a),this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64(),0===e&&0===t||m(p,l[c-2],l[c-1],e,t)?(l[c-2]+=e,l[c-1]+=t):(l[c++]=e,l[c++]=t,r+=1),s=i,a=h}r>=I?d.push(r):c-=r*e}break}default:n.skip()}return this._cache.area=_,d.length?new a(d,l,this.hasZ,this.hasM):null!=l?this._createDeltaQuantizedExtrudedGeometry(l[0],l[1]):null}}export{I as FeatureSetReaderPBF};
5
+ import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{baseObjectMemory as r}from"../../../../../core/memoryEstimations.js";import s from"../../../../../core/pbf.js";import n from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as a}from"./FeatureSetCache.js";import{FeatureSetReader as i}from"./FeatureSetReader.js";import{parseHeader as h}from"./FeatureSetReaderPBFHeader.js";const o=268435455,d=128,u=128e3,c={small:{delta:new Int32Array(d),decoded:new Int32Array(d)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(u),decoded:new Int32Array(u)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function l(e,t){return t?e<=c.small64.delta.length?c.small64:(e<=c.large64.delta.length||(c.large64.delta=new Float64Array(Math.round(1.25*e)),c.large64.decoded=new Float64Array(Math.round(1.25*e))),c.large64):e<=c.small.delta.length?c.small:(e<=c.large.delta.length||(c.large.delta=new Int32Array(Math.round(1.25*e)),c.large.decoded=new Int32Array(Math.round(1.25*e))),c.large)}function _(t){try{const e=2,r=new s(new Uint8Array(t),new DataView(t));for(;r.next();){if(r.tag()===e)return g(r.getMessage());r.skip()}}catch(r){throw new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:r})}return null}function g(e){const t=1;for(;e.next();){if(e.tag()===t)return e.getMessage();e.skip()}return null}function f(e){const t=1,r=2,s=3,n=4,a=5,i=6,h=7,o=8,d=9,u=e.getLength(),c=e.pos()+u;for(;e.pos()<c&&e.next();)switch(e.tag()){case t:return e.getString();case r:return e.getFloat();case s:return e.getDouble();case n:return e.getSInt32();case a:return e.getUInt32();case i:return e.getInt64();case h:return e.getUInt64();case o:return e.getSInt64();case d:return e.getBool();default:return e.skip(),null}return null}function y(e,t,r,s,n){if(!e)return!1;return 0===t*n-s*r&&t*s+r*n>0}class m extends i{static fromBuffer(e,t,r=!1){const s=t.geometryType,n=_(e),a=h(n,"esriGeometryPoint"===s,t.featureIdInfo,r);return new m(n,a,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return!1}get hasM(){return!1}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){if(1===this._header.idFieldIndices.length)return this._readAttributeAtIndex(this._header.idFieldIndices[0]);const e=this._header.idFieldIndices.map(e=>this._readAttributeAtIndex(e));return JSON.stringify(e)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(e){this._header.displayIds[this._featureIndex]=e}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const e=this._reader.clone(),t=new m(e,this._header,this.metadata,this._use64Bit);return this.copyInto(t),t}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0;++this._featureIndex<this._size&&!this._getExists(););return this._featureIndex<this._size}get usedMemory(){return r+(this._cache.geometry?.usedMemory??0)}get underlyingMemory(){return super.underlyingMemory+this._reader.usedMemory+this._header.usedMemory}_readX(){return this._header.centroid[2*this._featureIndex]}_readY(){return this._header.centroid[2*this._featureIndex+1]}_readServerCentroid(){const e=this._header.centroid[2*this._featureIndex],t=this._header.centroid[2*this._featureIndex+1];return e===o?null:new n([],[e,t])}_readGeometry(e=!1){if(void 0===this._cache.geometry){let r=null;if(this._isPoints){if(this._header.centroid[2*this._featureIndex]===o)return null;const e=this._header.centroid[2*this._featureIndex],t=this._header.centroid[2*this._featureIndex+1];r=new n([],[e,t])}else{const s=this._header.offsets.geometry[this._featureIndex],n=this._reader;if(0===s)return null;n.move(s);try{r=e?this._parseGeometryForDisplay(n):this._parseGeometry(n)}catch(t){return null}}return 0===r?.coords.length&&(r=null),this._cache.geometry=r,r}return this._cache.geometry}_readAttribute(e,t){const r=this._header.fields.get(e);if(null==r)return;const s=this._readAttributeAtIndex(r.index),n=this._header.fields.isDateField(r.name);return t?null==s?s:n?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._header.fields.fields)e[t.name]=this._readAttributeAtIndex(t.index);return e}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._featureOffset=this._featureOffset,e._hasNext=this._hasNext,e._parseCaches=this._parseCaches}_readAttributeAtIndex(e){let t=this._parseCaches[e];if(t||(t=new a(this.getSize()),this._parseCaches[e]=t),t.has(this._featureIndex))return t.get(this._featureIndex);const r=this._header.offsets.attributes[this._featureIndex*this._header.fieldCount+e],s=this._reader;s.move(r);const n=f(s);return t.set(this._featureIndex,n),n}_readGeometryDeltaDecoded(e=!1){if(void 0===this._cache.unquantGeometry){const t=this._readGeometry(e);if(!t)return this._cache.unquantGeometry=void 0,null;if(!this.getInTransform())return this._cache.unquantGeometry=t,t;const r=l(t.coords.length,this._use64Bit).decoded,s=t.clone(r),n=s.coords;let a=0;for(const e of s.lengths){for(let t=1;t<e;t++){const e=2*(a+t),r=2*(a+t-1);n[e]+=n[r],n[e+1]+=n[r+1]}a+=e}return this._cache.unquantGeometry=s,s}return this._cache.unquantGeometry}_parseGeometry(e){const t=2,r=3,s=e.asUnsafe(),a=s.getLength(),i=s.pos()+a,h=[],o=[];for(;s.pos()<i&&s.next();)switch(s.tag()){case t:{const e=s.getUInt32(),t=s.pos()+e;for(;s.pos()<t;)o.push(s.getUInt32());break}case r:{const e=s.getUInt32(),t=s.pos()+e;for(h.push(s.getSInt64()),h.push(s.getSInt64()),this.hasZ&&s.getSInt64(),this.hasM&&s.getSInt64();s.pos()<t;)h.push(s.getSInt64()),h.push(s.getSInt64()),this.hasZ&&s.getSInt64(),this.hasM&&s.getSInt64();break}default:s.skip()}return new n(o,h,this.hasZ,this.hasM)}_parseGeometryForDisplay(e){const r=2,s=3,a=e.asUnsafe(),i=a.getLength(),h=a.pos()+i,o=[],d=[];let u=0,c=0,_=null,g=0;const f="esriGeometryPolygon"===this.geometryType,m="esriGeometryPolyline"===this.geometryType,I=f?3:m?2:1,p=f||m;for(;a.pos()<h&&a.next();)switch(a.tag()){case r:{const e=a.getUInt32(),t=a.pos()+e;for(;a.pos()<t;){const e=a.getUInt32();o.push(e),u+=e}_=l(2*u,this._use64Bit).delta;break}case s:{a.getUInt32();const e=2+(this.hasZ?1:0)+(this.hasM?1:0);t(_);for(const t of o){if(c+e*t>_.length){for(let e=0;e<t;e++)a.getSInt64(),a.getSInt64(),this.hasZ&&a.getSInt64(),this.hasM&&a.getSInt64();continue}let r=0,s=a.getSInt64(),n=a.getSInt64();this.hasZ&&a.getSInt64(),this.hasM&&a.getSInt64(),_[c++]=s,_[c++]=n,r+=1;for(let e=1;e<t;e++){const e=a.getSInt64(),t=a.getSInt64(),i=s+e,h=n+t;g+=-.5*(i-s)*(h+n),this.hasZ&&a.getSInt64(),this.hasM&&a.getSInt64(),0===e&&0===t||y(p,_[c-2],_[c-1],e,t)?(_[c-2]+=e,_[c-1]+=t):(_[c++]=e,_[c++]=t,r+=1),s=i,n=h}r>=I?d.push(r):c-=r*e}break}default:a.skip()}return this._cache.area=g,d.length?new n(d,_,this.hasZ,this.hasM):null!=_?this._createDeltaQuantizedExtrudedGeometry(_[0],_[1]):null}}export{m as FeatureSetReaderPBF};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../core/has.js";import{toUnit as e}from"../../../../../core/quantity.js";import{adaptiveAreaUnit as r,adaptiveLengthUnit as s}from"../../../../../core/units.js";function t(s,t){return e(s,r(s.value,s.unit,t))}function a(r,s){return e(r,u(r,s))}function u(e,r){const t=n(r);return s(e.value,e.unit,t)}function n(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";case"square-meters":return"meters";case"square-kilometers":return"kilometers"}throw new Error("unhandled area unit")}export{n as deriveLengthUnitFromAreaUnit,u as preferredLengthUnit,t as toPreferredAreaUnit,a as toPreferredLengthUnit};
5
+ import{toUnit as e}from"../../../../../core/quantity.js";import{adaptiveAreaUnit as r,adaptiveLengthUnit as s}from"../../../../../core/units.js";function t(s,t){return e(s,r(s.value,s.unit,t))}function a(r,s){return e(r,u(r,s))}function u(e,r){const t=n(r);return s(e.value,e.unit,t)}function n(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";case"square-meters":return"meters";case"square-kilometers":return"kilometers"}throw new Error("unhandled area unit")}export{n as deriveLengthUnitFromAreaUnit,u as preferredLengthUnit,t as toPreferredAreaUnit,a as toPreferredLengthUnit};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{m as e,j as n,g as t,e as i,D as o}from"../../../../chunks/vec32.js";import r from"../../../../geometry/Point.js";import{sv3d as a}from"../../../../geometry/support/vectorStacks.js";import{automaticHeadingFromCamera as s}from"./lengthDimensionManipulatorUtils.js";import{isGeodesicDimension as l,directUp as d,directStartToEnd as c}from"./lengthDimensionUtils.js";import{constraintThresholdPx as u}from"./settings.js";function m(e,n){return{enabled:n.effectiveFeatureEnabled,elevationAlignedStartPoint:e.elevationAlignedStartPoint,elevationAlignedEndPoint:e.elevationAlignedEndPoint,geometry:e.geometry}}function P(r,s){if(l(r))return 2;if(!r.enabled)return null;const{geometry:m}=r;if(null==m||e(m.directSegment.startRenderSpace,m.directSegment.endRenderSpace))return null;const{camera:P}=s.state,p=d(a.get(),m,s.renderCoordsHelper),f=c(a.get(),m),g=n(a.get(),p,t(f,p)),S=i(a.get(),f,g),v=o(S),y=o(g),{startRenderSpace:A,endRenderSpace:R}=m.directSegment,j=Math.max(P.computeScreenPixelSizeAt(A)*u,P.computeScreenPixelSizeAt(R)*u)**2;return v<j?1:y<j?0:null}function p(e,n,{constraint:t,view:i}){const{unconstrainedGeometry:o}=e;if(null==o)return;const{renderCoordsHelper:a,spatialReference:s}=i,{startRenderSpace:l,endRenderSpace:d}=o.directSegment,c=a.fromRenderCoords(l,new r({spatialReference:s})),u=a.fromRenderCoords(d,new r({spatialReference:s}));let m;m="start"===n?{startPoint:c}:{endPoint:u},f(e,m,{constraint:t,elevationAlignedStartPoint:e.elevationAlignedStartPoint,elevationAlignedEndPoint:e.elevationAlignedEndPoint,unconstrainedGeometry:o,view:i})}function f(e,n,t){const{constraint:i,elevationAlignedStartPoint:o,elevationAlignedEndPoint:r,unconstrainedGeometry:a,view:l}=t,{dimension:d,previousConstraint:c,preConstraintProperties:u}=e;if(null==o||null==r)return;const m=()=>{"startPoint"in n?d.startPoint=n.startPoint:"endPoint"in n&&(d.endPoint=n.endPoint)};if(null==i)m(),null!=c&&null!=u&&(d.measureType=u.measureType,d.orientation=u.orientation);else switch(d.measureType="direct",i){case 0:if(i!==c&&(d.orientation=0),"startPoint"in n){const e=n.startPoint;null!=e&&(e.z=r.z),d.startPoint=e}else if("endPoint"in n){const e=n.endPoint;null!=e&&(e.z=o.z),d.endPoint=e}break;case 1:if(i!==c&&(d.orientation=s(a,l)),"startPoint"in n){const e=n.startPoint;null!=e&&(e.x=r.x,e.y=r.y),d.startPoint=e}else if("endPoint"in n){const e=n.endPoint;null!=e&&(e.x=o.x,e.y=o.y),d.endPoint=e}break;case 2:i!==c&&null!=u&&(d.orientation=u.orientation),m()}e.previousConstraint=i,e.unconstrainedGeometry=a}export{f as applyConstraint,P as computeConstraint,m as constraintDependencies,p as reapplyConstraint};
5
+ import{m as e,j as n,g as t,e as i,D as o}from"../../../../chunks/vec32.js";import r from"../../../../geometry/Point.js";import{sv3d as a}from"../../../../geometry/support/vectorStacks.js";import{automaticHeadingFromCamera as s}from"./lengthDimensionManipulatorUtils.js";import{isGeodesicDimension as l,directUp as d,directStartToEnd as c}from"./lengthDimensionUtils.js";import{constraintThresholdPx as u}from"./settings.js";function m(e,n){return{enabled:n.effectiveFeatureEnabled,elevationAlignedStartPoint:e.elevationAlignedStartPoint,elevationAlignedEndPoint:e.elevationAlignedEndPoint,geometry:e.geometry}}function P(r,s){if(l(r))return 2;if(!r.enabled)return null;const{geometry:m}=r;if(null==m||e(m.directSegment.startRenderSpace,m.directSegment.endRenderSpace))return null;const{camera:P}=s.state,p=d(a.get(),m,s.renderCoordsHelper),f=c(a.get(),m),g=n(a.get(),p,t(f,p)),S=i(a.get(),f,g),v=o(S),y=o(g),{startRenderSpace:A,endRenderSpace:R}=m.directSegment,x=Math.max(P.computeScreenPixelSizeAt(A)*u,P.computeScreenPixelSizeAt(R)*u)**2;return v<x?1:y<x?0:null}function p(e,n,{constraint:t,view:i}){const{unconstrainedGeometry:o}=e;if(null==o)return;const{renderCoordsHelper:a,spatialReference:s}=i,{startRenderSpace:l,endRenderSpace:d}=o.directSegment,c=a.fromRenderCoords(l,new r({spatialReference:s})),u=a.fromRenderCoords(d,new r({spatialReference:s}));let m;m="start"===n?{startPoint:c}:{endPoint:u},f(e,m,{constraint:t,elevationAlignedStartPoint:e.elevationAlignedStartPoint,elevationAlignedEndPoint:e.elevationAlignedEndPoint,unconstrainedGeometry:o,view:i})}function f(e,n,t){const{constraint:i,elevationAlignedStartPoint:o,elevationAlignedEndPoint:r,unconstrainedGeometry:a,view:l}=t,{dimension:d,previousConstraint:c,preConstraintProperties:u}=e;if(null==o||null==r)return;const m=()=>{"startPoint"in n?d.startPoint=n.startPoint:"endPoint"in n&&(d.endPoint=n.endPoint)};if(null==i)m(),null!=c&&null!=u&&(d.measureType=u.measureType,d.orientation=u.orientation);else switch(d.measureType="direct",i){case 0:if(i!==c&&(d.orientation=0),"startPoint"in n){const e=n.startPoint;null!=e&&(e.z=r.z),d.startPoint=e}else if("endPoint"in n){const e=n.endPoint;null!=e&&(e.z=o.z),d.endPoint=e}break;case 1:if(i!==c&&(d.orientation=s(a,l)),"startPoint"in n){const e=n.startPoint;null!=e&&(e.x=r.x,e.y=r.y),d.startPoint=e}else if("endPoint"in n){const e=n.endPoint;null!=e&&(e.x=o.x,e.y=o.y),d.endPoint=e}break;case 2:i!==c&&null!=u&&(d.orientation=u.orientation),m()}e.previousConstraint=i,e.unconstrainedGeometry=a}export{f as applyConstraint,P as computeConstraint,m as constraintDependencies,p as reapplyConstraint};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{throttle as o}from"../../../../core/throttle.js";import{property as r,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{fromValues as a,fromArray as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{OutlineVisualElement as m}from"../../interactive/visualElements/OutlineVisualElement.js";import{getConfig as c}from"../../../analysis/ElevationProfile/constants.js";import{ElevationProfileHoveredPointVisualization as f}from"../../../analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js";import{createLineGeometry as h}from"../../../analysis/ElevationProfile/elevationProfileVisualizationUtils.js";let u=class extends t{constructor(e){super(e),this._hasGeometry=!1,this._updateGeometryThrottled=o(e=>{e&&this._setGeometry(h(e.samples,e.spatialReference))},c().profileLinesUpdateThrottleMillis)}initialize(){this._indicatorVisualization=new f({analysisViewData:this.analysisViewData,line:this.line,view:this.view}),this._visualElement=new m({view:this.view,elevationInfo:p,innerWidth:0,innerColor:a(0,0,0,0),width:3,falloff:0,renderOccluded:16,isDecoration:!0}),this.addHandles([i(()=>this._effectiveLineVisible,e=>{this._visualElement.visible=e},s),i(()=>this._effectiveIndicatorVisible,e=>{this._indicatorVisualization.visible=e},s),i(()=>this._result?.computation.profile.color,e=>{e&&(this._visualElement.color=n(e.toUnitRGBA()))},s),i(()=>this.analysisViewData.analysis.geometry,()=>this._setGeometry(null),s),i(()=>this._geometryUpdateParameters,e=>this._updateGeometryThrottled(e),s),this._updateGeometryThrottled])}destroy(){this._visualElement.destroy(),this._indicatorVisualization.destroy()}get updating(){return this._updateGeometryThrottled.hasPendingUpdates()}get _result(){return this.analysisViewData.results.find(e=>e.computation.profile===this.line)}get _effectiveLineVisible(){return this.getEffectiveVisible("lineVisible")}get _effectiveIndicatorVisible(){const e=this.getEffectiveVisible("hoveredPointVisible");return this._effectiveLineVisible?e&&this._hasGeometry:e}getEffectiveVisible(e){const{analysisViewData:t,_result:i}=this;return t.visible&&!!i?.available&&i.computation.profile.viewOptions[e]}get _geometryUpdateParameters(){const e={samples:this._result?.samples,spatialReference:this.view.spatialReference};return e.samples&&this._effectiveLineVisible&&1!==this.analysisViewData.progress?null:e}_setGeometry(e){this._hasGeometry=null!=e,this._visualElement.geometry=e}};e([r({constructOnly:!0})],u.prototype,"view",void 0),e([r({constructOnly:!0})],u.prototype,"analysisViewData",void 0),e([r({constructOnly:!0})],u.prototype,"line",void 0),e([r()],u.prototype,"_hasGeometry",void 0),e([r()],u.prototype,"updating",null),e([r()],u.prototype,"_result",null),e([r()],u.prototype,"_effectiveLineVisible",null),e([r()],u.prototype,"_effectiveIndicatorVisible",null),e([r()],u.prototype,"_geometryUpdateParameters",null),u=e([l("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineVisualization3D")],u);export{u as ElevationProfileLineVisualization3D};
5
+ import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{watch as t,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{throttle as o}from"../../../../core/throttle.js";import{property as r,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{fromValues as a,fromArray as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{OutlineVisualElement as c}from"../../interactive/visualElements/OutlineVisualElement.js";import{getConfig as m}from"../../../analysis/ElevationProfile/constants.js";import{ElevationProfileIndicatorPointVisualization as f}from"../../../analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js";import{createLineGeometry as u}from"../../../analysis/ElevationProfile/elevationProfileVisualizationUtils.js";let h=class extends i{constructor(e){super(e),this._hasGeometry=!1,this._updateGeometryThrottled=o(e=>{e&&this._setGeometry(u(e.samples,e.spatialReference))},m().profileLinesUpdateThrottleMillis)}initialize(){this._indicatorVisualization=new f({analysisViewData:this.analysisViewData,line:this.line,view:this.view}),this._visualElement=new c({view:this.view,elevationInfo:p,innerWidth:0,innerColor:a(0,0,0,0),width:3,falloff:0,renderOccluded:16,isDecoration:!0}),this.addHandles([t(()=>this._effectiveLineVisible,e=>{this._visualElement.visible=e},s),t(()=>this._effectiveIndicatorVisible,e=>{this._indicatorVisualization.visible=e},s),t(()=>this._result?.computation.profile.color,e=>{e&&(this._visualElement.color=n(e.toUnitRGBA()))},s),t(()=>this.analysisViewData.analysis.geometry,()=>this._setGeometry(null),s),t(()=>this._geometryUpdateParameters,e=>this._updateGeometryThrottled(e),s),this._updateGeometryThrottled])}destroy(){this._visualElement.destroy(),this._indicatorVisualization.destroy()}get updating(){return this._updateGeometryThrottled.hasPendingUpdates()}get _result(){return this.analysisViewData.results.find(e=>e.computation.profile===this.line)}get _effectiveLineVisible(){return this.getEffectiveVisible("lineVisible")}get _effectiveIndicatorVisible(){const e=this.getEffectiveVisible("indicatorPointVisible");return this._effectiveLineVisible?e&&this._hasGeometry:e}getEffectiveVisible(e){const{analysisViewData:i,_result:t}=this;return i.visible&&!!t?.available&&t.computation.profile.viewOptions[e]}get _geometryUpdateParameters(){const e={samples:this._result?.samples,spatialReference:this.view.spatialReference};return e.samples&&this._effectiveLineVisible&&1!==this.analysisViewData.progress?null:e}_setGeometry(e){this._hasGeometry=null!=e,this._visualElement.geometry=e}};e([r({constructOnly:!0})],h.prototype,"view",void 0),e([r({constructOnly:!0})],h.prototype,"analysisViewData",void 0),e([r({constructOnly:!0})],h.prototype,"line",void 0),e([r()],h.prototype,"_hasGeometry",void 0),e([r()],h.prototype,"updating",null),e([r()],h.prototype,"_result",null),e([r()],h.prototype,"_effectiveLineVisible",null),e([r()],h.prototype,"_effectiveIndicatorVisible",null),e([r()],h.prototype,"_geometryUpdateParameters",null),h=e([l("esri.views.3d.analysis.ElevationProfile.ElevationProfileLineVisualization3D")],h);export{h as ElevationProfileLineVisualization3D};
@@ -52,22 +52,27 @@ export default abstract class ElevationProfileAnalysisView3D extends AnalysisVie
52
52
  */
53
53
  get error(): ElevationProfileError | null | undefined;
54
54
  /**
55
- * Points in the view that are computed from the [hoveredPosition](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#hoveredPosition) property (in the view's spatial reference).
55
+ * Points in the view that are computed from the [indicatorRelativePosition](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#indicatorRelativePosition)
56
+ * property (in the view's spatial reference).
56
57
  * There is one point for each [profile line](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#profiles).
57
- * When a [result](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html) of a profile line
58
- * is not available or no [sample](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html#samples)
59
- * exists for the hovered position, the point is `undefined`.
58
+ * When a [result](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html) of a profile line is not available or
59
+ * no [sample](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html#samples) exists for the specified indicator
60
+ * position, the point is `undefined`.
60
61
  *
61
- * Whenever the [hoveredPosition](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#hoveredPosition) property has a value, the points are calculated, and by default, rendered in the view. The points in the view
62
- * can be hidden using the [viewOptions.hoveredPointVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLine.html#viewOptions)
63
- * setting on any of the [profile lines](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#profiles).
62
+ * Whenever the [indicatorRelativePosition](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#indicatorRelativePosition) property has a
63
+ * value, the points are calculated and, by default, rendered in the view. The points in the view can be hidden using
64
+ * the [viewOptions.indicatorPointVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLine.html#viewOptions) setting on
65
+ * any of the [profile lines](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#profiles).
64
66
  */
65
- get hoveredPoints(): Array<Point | null | undefined>;
67
+ get indicatorPoints(): Array<Point | null | undefined>;
66
68
  /**
67
- * Property that indicates a relative position along a [result's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html) profile line, in [0, 1].
68
- * This can be used to track a hovered position in an elevation profile chart and display the corresponding points in the view using [hoveredPoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#hoveredPoints).
69
+ * Relative position along a [result](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html)'s profile line, in
70
+ * [0, 1]. Set this (e.g., when hovering a chart) to compute locations along each configured profile line and expose
71
+ * them via [indicatorPoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#indicatorPoints). The view shows points at these
72
+ * locations unless a line's [viewOptions.indicatorPointVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLine.html#viewOptions)
73
+ * disables them.
69
74
  */
70
- accessor hoveredPosition: number | null | undefined;
75
+ accessor indicatorRelativePosition: number | null | undefined;
71
76
  /**
72
77
  * Enables interactivity for the [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#analysis). When set to `true` the input geometry can be edited
73
78
  * interactively.
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{property as e,subclass as i}from"../../../core/accessorSupport/decorators.js";import o from"./AnalysisView3D.js";import{ElevationProfileLineSceneComputation as r}from"./ElevationProfile/ElevationProfileLineSceneComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as u}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let c=class extends o{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new r(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new u({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get hoveredPoints(){return this._controller?.hoveredPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickFeature(t){return this._sketchTool.pickFeature(t)}get testData(){return{visualization:this._visualization}}};t([e({readOnly:!0})],c.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0),t([e({readOnly:!0})],c.prototype,"effectiveDisplayUnits",null),t([e({readOnly:!0})],c.prototype,"error",null),t([e()],c.prototype,"hoveredPosition",void 0),t([e()],c.prototype,"hoveredPoints",null),t([e({readOnly:!0})],c.prototype,"progress",null),t([e({readOnly:!0})],c.prototype,"results",null),t([e({readOnly:!0})],c.prototype,"statistics",null),t([e({readOnly:!0})],c.prototype,"updating",null),t([e()],c.prototype,"sketchGraphic",null),t([e()],c.prototype,"toolState",null),t([e()],c.prototype,"_controller",void 0),t([e()],c.prototype,"_visualization",void 0),t([e()],c.prototype,"_sketchTool",void 0),c=t([i("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],c);const v=c;export{v as default};
5
+ import{__decorate as t}from"tslib";import{property as e,subclass as i}from"../../../core/accessorSupport/decorators.js";import o from"./AnalysisView3D.js";import{ElevationProfileLineSceneComputation as r}from"./ElevationProfile/ElevationProfileLineSceneComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as u}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let c=class extends o{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.indicatorRelativePosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new r(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new u({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get indicatorPoints(){return this._controller?.indicatorPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickFeature(t){return this._sketchTool.pickFeature(t)}get testData(){return{visualization:this._visualization}}};t([e({readOnly:!0})],c.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0),t([e({readOnly:!0})],c.prototype,"effectiveDisplayUnits",null),t([e({readOnly:!0})],c.prototype,"error",null),t([e()],c.prototype,"indicatorRelativePosition",void 0),t([e()],c.prototype,"indicatorPoints",null),t([e({readOnly:!0})],c.prototype,"progress",null),t([e({readOnly:!0})],c.prototype,"results",null),t([e({readOnly:!0})],c.prototype,"statistics",null),t([e({readOnly:!0})],c.prototype,"updating",null),t([e()],c.prototype,"sketchGraphic",null),t([e()],c.prototype,"toolState",null),t([e()],c.prototype,"_controller",void 0),t([e()],c.prototype,"_visualization",void 0),t([e()],c.prototype,"_sketchTool",void 0),c=t([i("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],c);const y=c;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import i from"../../../../analysis/SlicePlane.js";import"../../../../core/has.js";import e from"../../../../core/Logger.js";import{rad2deg as t,deg2rad as n}from"../../../../core/mathUtils.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{fromZRotation as s,scale as r,multiply as a,rotateZ as c,rotateX as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{b as u,h as d,i as g,j as m,d as p,e as f,g as b,n as h,f as j,D as w,a as v}from"../../../../chunks/vec32.js";import{clone as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import M from"../../../../geometry/Extent.js";import U from"../../../../geometry/Point.js";import{tryProject as y}from"../../../../geometry/projectionUtils.js";import{d as R,r as x,n as S,u as T,f as A,i as C}from"../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as k,fromVectorsAndPoint as L}from"../../../../geometry/support/plane.js";import{create as E}from"../../../../geometry/support/ray.js";import{angleAroundAxis as H}from"../../../../geometry/support/vector.js";import{sv3d as I,sm4d as z}from"../../../../geometry/support/vectorStacks.js";import{getGridColor as F,planeColor as D,getOutlineColor as W}from"./settings.js";import{resizeHandleEdgePaddingFrac as B,planeOutlineWidth as O,planeMinBasisScreenLen2 as V,initialPlaneHalfSizeViewProportion as $,shiftRestartOffsetDistance as q,smallAngleDotThreshold as G,verticalDotThreshold as J}from"./sliceToolConfig.js";import{applyProjectionAndElevationAlignment as K}from"../support/projectionUtils.js";import{calculateTranslateRotateFromBases as N}from"../../interactive/manipulatorUtils.js";import{LineVisualElement as Q}from"../../interactive/visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as X}from"../../interactive/visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as Y}from"../../support/RenderCoordsHelper.js";import{fromRender as Z}from"../../support/geometryUtils/ray.js";function _(i,e,t,n,o,s,r,a){return ii(e,r.worldUpAtPosition(i,I.get()),o,s,a.basis1,a.basis2),m(a.basis1,a.basis1,t),m(a.basis2,a.basis2,n),p(a.origin,i),L(a.basis2,a.basis1,a.origin,a.plane),a}function ii(i,e,t,n,o,s){const r=b(i,e),a=I.get(),c=I.get();switch(0===n?Math.abs(r)>J?1:2:n){case 2:{const n=Math.abs(r)<=G?i:t.viewUp;j(a,n,e),p(c,e);break}case 1:j(a,t.viewUp,e),j(c,e,a);break;case 3:{const n=Math.abs(r)<=G?e:t.viewUp;j(a,n,i),j(c,i,a);break}}const l=j(I.get(),a,c);b(l,t.viewForward)>0&&m(c,c,-1),h(o,a),h(s,c)}function ei(i,e,t){const n=e.worldUpAtPosition(i.origin,I.get()),o=i.basis1,s=Pi(i,n),r=Math.round(s/Ai)*Ai;return x(i,r-s,o,t)}function ti(i,e,t,n,o,s){const r=p(I.get(),o.origin);g(r,r,m(I.get(),o.basis1,i.direction[0]<0?1:-1)),g(r,r,m(I.get(),o.basis2,i.direction[1]<0?1:-1));const a=u(o.basis1),c=u(o.basis2),l=f(I.get(),t,r),d=f(I.get(),e,r);let h=0,j=0;if(bi(i)){const e=fi(o),t=fi(s);h=a-.5*i.direction[0]*b(o.basis1,d)/a,j=c-.5*i.direction[1]*b(o.basis2,d)/c;const n=t/e;h*=n,j*=n}const w=h+.5*i.direction[0]*b(o.basis1,l)/a,v=j+.5*i.direction[1]*b(o.basis2,l)/c,P=m(I.get(),o.basis1,w/a),M=m(I.get(),o.basis2,v/c);(w<=0||mi(s.origin,P,n)<=V)&&p(P,s.basis1),(v<=0||mi(s.origin,M,n)<=V)&&p(M,s.basis2);const U=p(I.get(),r);return g(U,U,m(I.get(),P,i.direction[0]<0?-1:1)),g(U,U,m(I.get(),M,i.direction[1]<0?-1:1)),A(U,P,M,s)}function ni(i,e){return $*Math.min(e.width,e.height)*e.computeRenderPixelSizeAt(i)}function oi(i,e,t,n){const o=j(I.get(),e,t);return j(o,o,e),k(i,o,n)}function si(i,e){return N(i.basis1,i.basis2,i.origin,e)}function ri(i,e,t,n){const o=e.worldUpAtPosition(i.origin,I.get()),s=I.get();switch(t){case 1:p(s,o);break;case 2:p(s,i.basis1)}return k(i.origin,s,n)}function ai(i,e,t,n){const s=gi(t,2),r=z.get();c(r,e,s.edge*Math.PI/2);const a=h(I.get(),s.basis);let l=m(I.get(),a,s.direction*n.computeScreenPixelSizeAt(s.position)*q);g(l,l,s.position);const u=n.projectToRenderScreen(l,o(I.get())),d=ci(n,u);Z(n,u,Ti),h(Ti.direction,Ti.direction);const p=I.get();!d&&C(t,Ti,p)&&(l=p),r[12]=0,r[13]=0,r[14]=0,i.modelTransform=r,i.renderLocation=P(l),d?i.state|=Si:i.state&=~Si}function ci(i,e){if(null==e)return!1;const[t,n,o,s]=i.viewport,r=Math.min(o,s)/16;let a=!0;return e[0]<t+r?(e[0]=t+r,a=!1):e[0]>t+o-r&&(e[0]=t+o-r,a=!1),e[1]<n+r?(e[1]=n+r,a=!1):e[1]>n+s-r&&(e[1]=n+s-r,a=!1),a}function li(i,e,t,n){const o=u(n.basis1),c=u(n.basis2),l=pi(n),p=fi(n),f=d(I.get(),0,0,0);g(f,m(I.get(),n.basis1,e.direction[0]),m(I.get(),n.basis2,e.direction[1])),g(f,n.origin,f);let b=0,h=1;if(bi(e))1===e.direction[0]&&-1===e.direction[1]?b=Ai:1===e.direction[0]&&1===e.direction[1]?b=Math.PI:-1===e.direction[0]&&1===e.direction[1]&&(b=3*Math.PI/2),h=p;else{const i=0!==e.direction[0]?1:2;b=1===i?Ai:0,h=(1===i?c:o)-l}const j=s(z.get(),b);r(j,j,d(I.get(),h,h,h)),a(j,t,j),j[12]=0,j[13]=0,j[14]=0,i.modelTransform=j,i.renderLocation=f}function ui(i,e,t,n){const o=n.worldUpAtPosition(t.origin,I.get()),r=gi(t,0),c=s(z.get(),r.edge*Math.PI/2);l(c,c,-Pi(t,o)),a(c,e,c),c[12]=0,c[13]=0,c[14]=0,i.modelTransform=c,i.renderLocation=r.position}function di(i,e,t){const n=gi(t,1),o=s(z.get(),n.edge*Math.PI/2);l(o,o,Ai),a(o,e,o),o[12]=0,o[13]=0,o[14]=0,i.modelTransform=o,i.renderLocation=n.position}function gi(i,e){switch(e){case 0:return{basis:i.basis1,direction:1,position:g(I.get(),i.origin,i.basis1),edge:e};case 1:return{basis:i.basis2,direction:1,position:g(I.get(),i.origin,i.basis2),edge:e};case 2:return{basis:i.basis1,direction:-1,position:f(I.get(),i.origin,i.basis1),edge:e};case 3:return{basis:i.basis2,direction:-1,position:f(I.get(),i.origin,i.basis2),edge:e}}}function mi(i,e,t){const n=t.projectToRenderScreen(g(I.get(),i,e),o(I.get())),s=t.projectToRenderScreen(f(I.get(),i,e),o(I.get()));return n&&s?w(f(n,n,s)):0}function pi(i){const e=u(i.basis1),t=u(i.basis2);return B*Math.min(e,t)}function fi(i){return pi(i)}function bi(i){return 0!==i.direction[0]&&0!==i.direction[1]}function hi(i){const e=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new Q({view:i,attached:!1,color:W(i.effectiveTheme),width:O,renderOccluded:4,geometry:[e],isDecoration:!0})}function ji(i){return new X({view:i,attached:!1,backgroundColor:D,gridColor:F(i.effectiveTheme),gridWidth:4,renderOccluded:4,isDecoration:!0})}function wi(e,n,o,s=new i){if(null==e)return null;const{renderCoordsHelper:r}=n,a=r.fromRenderCoords(e.origin,new U({spatialReference:n.spatialReference}));if(null==a)return null;const c=y(a,o);if(null==c)return null;s.position=c;const l=2*u(e.basis1),d=2*u(e.basis2),g=Y.renderUnitScaleFactor(n.spatialReference,o);s.width=l*g,s.height=d*g;const m=r.worldUpAtPosition(e.origin,I.get());return s.tilt=t(Pi(e,m)),s.heading=r.headingAtPosition(e.origin,e.basis1)-90,s}function vi(i,e,t){if(null==i)return null;const n=i.origin,o=I.get(),s=I.get(),r=I.get(),a=I.get();let c,l,u,d,m,p;g(o,n,i.basis1),g(o,o,i.basis2),g(s,n,i.basis1),v(s,s,i.basis2),v(r,n,i.basis1),v(r,r,i.basis2),v(a,n,i.basis1),g(a,a,i.basis2);for(const g of[o,s,r,a]){const i=e.fromRenderCoords(g,g,t);if(null==i)return null;c=null==c?i[0]:Math.min(c,i[0]),l=null==l?i[0]:Math.max(l,i[0]),u=null==u?i[1]:Math.min(u,i[1]),d=null==d?i[1]:Math.max(d,i[1]),m=null==m?i[2]:Math.min(m,i[2]),p=null==p?i[2]:Math.max(p,i[2])}return new M({xmin:c,xmax:l,ymin:u,ymax:d,zmin:m,zmax:p,spatialReference:t})}function Pi(i,e){return H(e,i.basis2,i.basis1)+Ai}function Mi(i,t,o,s,r,a,c=R()){return a.toRenderCoords(i,c.origin)?(a.worldBasisAtPosition(c.origin,0,c.basis1),a.worldBasisAtPosition(c.origin,1,c.basis2),L(c.basis2,c.basis1,c.origin,c.plane),x(c,-n(t),S(c),c),x(c,n(o),c.basis1,c),m(c.basis1,c.basis1,s/2),m(c.basis2,c.basis2,r/2),T(c),c):(e.getLogger("esri.views.3d.analysis.Slice.sliceToolUtils").error(`Failed to project slice plane position, projection from ${i.spatialReference.wkid} is not supported`),null)}function Ui(i,e){if(null==i?.position)return null;const t=K(i.position,e.spatialReference,e.elevationProvider);if(null==t)return null;const n=Y.renderUnitScaleFactor(i.position.spatialReference,e.spatialReference),o=i.width*n,s=i.height*n;return{position:t,heading:i.heading,tilt:i.tilt,renderWidth:o,renderHeight:s}}function yi(i,e,t,n=R()){const o=Ui(i,e);return null==o?null:Ri(o,e,t,n)}function Ri(i,e,t,n=R()){if(null==i)return null;const o=Mi(i.position,i.heading,i.tilt,i.renderWidth,i.renderHeight,e.renderCoordsHelper,n);return t.tiltEnabled||null==o||ei(o,e.renderCoordsHelper,o),o}const xi=16,Si=32,Ti=E(),Ai=Math.PI/2,Ci=16,ki=32;function Li(i){return null!=("building-scene-3d"===i.type?i:null)}export{xi as DidPointerMoveRecentlyFlag,Si as IsShiftEdgeOnScreenFlag,si as calculateBoundedPlaneTranslateRotate,fi as calculateDiagonalResizeHandleScale,ni as calculatePlaneHalfSize,ji as createGridVisualElement,hi as createOutlineVisualElement,_ as createPlane,ri as createRotatePlane,oi as createShiftPlane,ei as forceHorizontalOrVertical,Li as isBuildingSceneLayerView3D,bi as isDiagonalResizeHandle,ii as normalToBases,vi as planeToExtent,wi as planeToShape,Ui as projectAndElevationAlignShape,Ri as projectedShapeToPlane,Ci as resizeNormal,ki as resizeOutlineOnly,ti as resizePlane,yi as shapeToPlane,li as updateResizeHandle,ui as updateRotateHeadingHandle,di as updateRotateTiltHandle,ai as updateShiftRestartHandle};
5
+ import i from"../../../../analysis/SlicePlane.js";import e from"../../../../core/Logger.js";import{rad2deg as t,deg2rad as n}from"../../../../core/mathUtils.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{fromZRotation as s,scale as r,multiply as a,rotateZ as c,rotateX as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{b as u,h as d,i as g,j as m,d as p,e as f,g as b,n as h,f as j,D as w,a as v}from"../../../../chunks/vec32.js";import{clone as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import M from"../../../../geometry/Extent.js";import U from"../../../../geometry/Point.js";import{tryProject as y}from"../../../../geometry/projectionUtils.js";import{d as R,r as x,n as S,u as T,f as A,i as C}from"../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as k,fromVectorsAndPoint as L}from"../../../../geometry/support/plane.js";import{create as E}from"../../../../geometry/support/ray.js";import{angleAroundAxis as H}from"../../../../geometry/support/vector.js";import{sv3d as I,sm4d as z}from"../../../../geometry/support/vectorStacks.js";import{getGridColor as F,planeColor as D,getOutlineColor as W}from"./settings.js";import{resizeHandleEdgePaddingFrac as B,planeOutlineWidth as O,planeMinBasisScreenLen2 as V,initialPlaneHalfSizeViewProportion as $,shiftRestartOffsetDistance as q,smallAngleDotThreshold as G,verticalDotThreshold as J}from"./sliceToolConfig.js";import{applyProjectionAndElevationAlignment as K}from"../support/projectionUtils.js";import{calculateTranslateRotateFromBases as N}from"../../interactive/manipulatorUtils.js";import{LineVisualElement as Q}from"../../interactive/visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as X}from"../../interactive/visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as Y}from"../../support/RenderCoordsHelper.js";import{fromRender as Z}from"../../support/geometryUtils/ray.js";function _(i,e,t,n,o,s,r,a){return ii(e,r.worldUpAtPosition(i,I.get()),o,s,a.basis1,a.basis2),m(a.basis1,a.basis1,t),m(a.basis2,a.basis2,n),p(a.origin,i),L(a.basis2,a.basis1,a.origin,a.plane),a}function ii(i,e,t,n,o,s){const r=b(i,e),a=I.get(),c=I.get();switch(0===n?Math.abs(r)>J?1:2:n){case 2:{const n=Math.abs(r)<=G?i:t.viewUp;j(a,n,e),p(c,e);break}case 1:j(a,t.viewUp,e),j(c,e,a);break;case 3:{const n=Math.abs(r)<=G?e:t.viewUp;j(a,n,i),j(c,i,a);break}}const l=j(I.get(),a,c);b(l,t.viewForward)>0&&m(c,c,-1),h(o,a),h(s,c)}function ei(i,e,t){const n=e.worldUpAtPosition(i.origin,I.get()),o=i.basis1,s=Pi(i,n),r=Math.round(s/Ai)*Ai;return x(i,r-s,o,t)}function ti(i,e,t,n,o,s){const r=p(I.get(),o.origin);g(r,r,m(I.get(),o.basis1,i.direction[0]<0?1:-1)),g(r,r,m(I.get(),o.basis2,i.direction[1]<0?1:-1));const a=u(o.basis1),c=u(o.basis2),l=f(I.get(),t,r),d=f(I.get(),e,r);let h=0,j=0;if(bi(i)){const e=fi(o),t=fi(s);h=a-.5*i.direction[0]*b(o.basis1,d)/a,j=c-.5*i.direction[1]*b(o.basis2,d)/c;const n=t/e;h*=n,j*=n}const w=h+.5*i.direction[0]*b(o.basis1,l)/a,v=j+.5*i.direction[1]*b(o.basis2,l)/c,P=m(I.get(),o.basis1,w/a),M=m(I.get(),o.basis2,v/c);(w<=0||mi(s.origin,P,n)<=V)&&p(P,s.basis1),(v<=0||mi(s.origin,M,n)<=V)&&p(M,s.basis2);const U=p(I.get(),r);return g(U,U,m(I.get(),P,i.direction[0]<0?-1:1)),g(U,U,m(I.get(),M,i.direction[1]<0?-1:1)),A(U,P,M,s)}function ni(i,e){return $*Math.min(e.width,e.height)*e.computeRenderPixelSizeAt(i)}function oi(i,e,t,n){const o=j(I.get(),e,t);return j(o,o,e),k(i,o,n)}function si(i,e){return N(i.basis1,i.basis2,i.origin,e)}function ri(i,e,t,n){const o=e.worldUpAtPosition(i.origin,I.get()),s=I.get();switch(t){case 1:p(s,o);break;case 2:p(s,i.basis1)}return k(i.origin,s,n)}function ai(i,e,t,n){const s=gi(t,2),r=z.get();c(r,e,s.edge*Math.PI/2);const a=h(I.get(),s.basis);let l=m(I.get(),a,s.direction*n.computeScreenPixelSizeAt(s.position)*q);g(l,l,s.position);const u=n.projectToRenderScreen(l,o(I.get())),d=ci(n,u);Z(n,u,Ti),h(Ti.direction,Ti.direction);const p=I.get();!d&&C(t,Ti,p)&&(l=p),r[12]=0,r[13]=0,r[14]=0,i.modelTransform=r,i.renderLocation=P(l),d?i.state|=Si:i.state&=~Si}function ci(i,e){if(null==e)return!1;const[t,n,o,s]=i.viewport,r=Math.min(o,s)/16;let a=!0;return e[0]<t+r?(e[0]=t+r,a=!1):e[0]>t+o-r&&(e[0]=t+o-r,a=!1),e[1]<n+r?(e[1]=n+r,a=!1):e[1]>n+s-r&&(e[1]=n+s-r,a=!1),a}function li(i,e,t,n){const o=u(n.basis1),c=u(n.basis2),l=pi(n),p=fi(n),f=d(I.get(),0,0,0);g(f,m(I.get(),n.basis1,e.direction[0]),m(I.get(),n.basis2,e.direction[1])),g(f,n.origin,f);let b=0,h=1;if(bi(e))1===e.direction[0]&&-1===e.direction[1]?b=Ai:1===e.direction[0]&&1===e.direction[1]?b=Math.PI:-1===e.direction[0]&&1===e.direction[1]&&(b=3*Math.PI/2),h=p;else{const i=0!==e.direction[0]?1:2;b=1===i?Ai:0,h=(1===i?c:o)-l}const j=s(z.get(),b);r(j,j,d(I.get(),h,h,h)),a(j,t,j),j[12]=0,j[13]=0,j[14]=0,i.modelTransform=j,i.renderLocation=f}function ui(i,e,t,n){const o=n.worldUpAtPosition(t.origin,I.get()),r=gi(t,0),c=s(z.get(),r.edge*Math.PI/2);l(c,c,-Pi(t,o)),a(c,e,c),c[12]=0,c[13]=0,c[14]=0,i.modelTransform=c,i.renderLocation=r.position}function di(i,e,t){const n=gi(t,1),o=s(z.get(),n.edge*Math.PI/2);l(o,o,Ai),a(o,e,o),o[12]=0,o[13]=0,o[14]=0,i.modelTransform=o,i.renderLocation=n.position}function gi(i,e){switch(e){case 0:return{basis:i.basis1,direction:1,position:g(I.get(),i.origin,i.basis1),edge:e};case 1:return{basis:i.basis2,direction:1,position:g(I.get(),i.origin,i.basis2),edge:e};case 2:return{basis:i.basis1,direction:-1,position:f(I.get(),i.origin,i.basis1),edge:e};case 3:return{basis:i.basis2,direction:-1,position:f(I.get(),i.origin,i.basis2),edge:e}}}function mi(i,e,t){const n=t.projectToRenderScreen(g(I.get(),i,e),o(I.get())),s=t.projectToRenderScreen(f(I.get(),i,e),o(I.get()));return n&&s?w(f(n,n,s)):0}function pi(i){const e=u(i.basis1),t=u(i.basis2);return B*Math.min(e,t)}function fi(i){return pi(i)}function bi(i){return 0!==i.direction[0]&&0!==i.direction[1]}function hi(i){const e=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new Q({view:i,attached:!1,color:W(i.effectiveTheme),width:O,renderOccluded:4,geometry:[e],isDecoration:!0})}function ji(i){return new X({view:i,attached:!1,backgroundColor:D,gridColor:F(i.effectiveTheme),gridWidth:4,renderOccluded:4,isDecoration:!0})}function wi(e,n,o,s=new i){if(null==e)return null;const{renderCoordsHelper:r}=n,a=r.fromRenderCoords(e.origin,new U({spatialReference:n.spatialReference}));if(null==a)return null;const c=y(a,o);if(null==c)return null;s.position=c;const l=2*u(e.basis1),d=2*u(e.basis2),g=Y.renderUnitScaleFactor(n.spatialReference,o);s.width=l*g,s.height=d*g;const m=r.worldUpAtPosition(e.origin,I.get());return s.tilt=t(Pi(e,m)),s.heading=r.headingAtPosition(e.origin,e.basis1)-90,s}function vi(i,e,t){if(null==i)return null;const n=i.origin,o=I.get(),s=I.get(),r=I.get(),a=I.get();let c,l,u,d,m,p;g(o,n,i.basis1),g(o,o,i.basis2),g(s,n,i.basis1),v(s,s,i.basis2),v(r,n,i.basis1),v(r,r,i.basis2),v(a,n,i.basis1),g(a,a,i.basis2);for(const g of[o,s,r,a]){const i=e.fromRenderCoords(g,g,t);if(null==i)return null;c=null==c?i[0]:Math.min(c,i[0]),l=null==l?i[0]:Math.max(l,i[0]),u=null==u?i[1]:Math.min(u,i[1]),d=null==d?i[1]:Math.max(d,i[1]),m=null==m?i[2]:Math.min(m,i[2]),p=null==p?i[2]:Math.max(p,i[2])}return new M({xmin:c,xmax:l,ymin:u,ymax:d,zmin:m,zmax:p,spatialReference:t})}function Pi(i,e){return H(e,i.basis2,i.basis1)+Ai}function Mi(i,t,o,s,r,a,c=R()){return a.toRenderCoords(i,c.origin)?(a.worldBasisAtPosition(c.origin,0,c.basis1),a.worldBasisAtPosition(c.origin,1,c.basis2),L(c.basis2,c.basis1,c.origin,c.plane),x(c,-n(t),S(c),c),x(c,n(o),c.basis1,c),m(c.basis1,c.basis1,s/2),m(c.basis2,c.basis2,r/2),T(c),c):(e.getLogger("esri.views.3d.analysis.Slice.sliceToolUtils").error(`Failed to project slice plane position, projection from ${i.spatialReference.wkid} is not supported`),null)}function Ui(i,e){if(null==i?.position)return null;const t=K(i.position,e.spatialReference,e.elevationProvider);if(null==t)return null;const n=Y.renderUnitScaleFactor(i.position.spatialReference,e.spatialReference),o=i.width*n,s=i.height*n;return{position:t,heading:i.heading,tilt:i.tilt,renderWidth:o,renderHeight:s}}function yi(i,e,t,n=R()){const o=Ui(i,e);return null==o?null:Ri(o,e,t,n)}function Ri(i,e,t,n=R()){if(null==i)return null;const o=Mi(i.position,i.heading,i.tilt,i.renderWidth,i.renderHeight,e.renderCoordsHelper,n);return t.tiltEnabled||null==o||ei(o,e.renderCoordsHelper,o),o}const xi=16,Si=32,Ti=E(),Ai=Math.PI/2,Ci=16,ki=32;function Li(i){return null!=("building-scene-3d"===i.type?i:null)}export{xi as DidPointerMoveRecentlyFlag,Si as IsShiftEdgeOnScreenFlag,si as calculateBoundedPlaneTranslateRotate,fi as calculateDiagonalResizeHandleScale,ni as calculatePlaneHalfSize,ji as createGridVisualElement,hi as createOutlineVisualElement,_ as createPlane,ri as createRotatePlane,oi as createShiftPlane,ei as forceHorizontalOrVertical,Li as isBuildingSceneLayerView3D,bi as isDiagonalResizeHandle,ii as normalToBases,vi as planeToExtent,wi as planeToShape,Ui as projectAndElevationAlignShape,Ri as projectedShapeToPlane,Ci as resizeNormal,ki as resizeOutlineOnly,ti as resizePlane,yi as shapeToPlane,li as updateResizeHandle,ui as updateRotateHeadingHandle,di as updateRotateTiltHandle,ai as updateShiftRestartHandle};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i}from"../../../../core/promiseUtils.js";import{whenOnce as n,watch as s,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as a}from"../../../../core/screenUtils.js";import{property as p,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{e as m}from"../../../../chunks/earcut.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as d,c as h,G as g}from"../../../../chunks/vec32.js";import{fromValues as y,create as f,clone as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{projectOrLoad as w}from"../../../../geometry/projectionUtils.js";import{computeTranslationToOriginAndRotation as j}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as E}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as b,create as G,expand as R,width as x,height as L,fromExtent as T,intersects as C}from"../../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as P}from"../../../../geometry/support/DoubleArray.js";import{t as V}from"../../../../chunks/vec3.js";import H from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as A}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as M}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementDistanceTooCloseError as U,VolumeMeasurementDistanceTooFarError as D,VolumeMeasurementPerimeterTooLargeError as I,VolumeMeasurementUnsupportedCoordinateSystemError as O,VolumeMeasurementUnsupportedLayerTransparencyError as F}from"./volumeMeasurementErrors.js";import S from"./VolumeMeasurementResult.js";import{getRawResult as N}from"./volumeMeasurementUtils.js";import{ElevationContext as k}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as z}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as B}from"../../support/renderInfoUtils/polygon.js";import{CutFillDepth as W,TargetGeometryRenderInfo as q}from"../../webgl-engine/lib/CutFillDepth.js";let J=class extends r{constructor(e){super(e),this._getElevationProvider=()=>this.view.elevationProvider,this.labelAnchors=null,this._updatingHandles=new v,this._rawResult=null,this._debouncedUpdate=i(async(e,t,r)=>{if(!this._renderer.done)return;const{renderCoordsHelper:o}=this.view,i=new M({extent:e,localOrigin:t,renderCoordsHelper:o});if(this._renderer.setup(i,r),this._renderer.start(),await n(()=>this._renderer.done),!this._enabled)return;const s=this._renderer.getResults();this._updateResult(i,s),this._updateLabelAnchors(i,s)})}initialize(){const e=this.view;this._renderer=new W({view:e}),this.addHandles([this._createElevationUpdateHandle(),s(()=>this._targetGeometry,e=>this.analysisViewData.targetGeometry=e,l),s(()=>this._elevationAlignedGeometry,e=>this.analysisViewData.elevationAlignedGeometry=e,l),s(()=>({extent:this._projectedGeometry?.extent,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo,enabled:this._enabled}),({extent:e,localOrigin:t,targetGeometryRenderInfo:r,enabled:o})=>{e&&t&&r&&o?this._updatingHandles.addPromise(this._debouncedUpdate(e,t,r)):this._rawResult=null},l)])}destroy(){this._updatingHandles.destroy(),this._renderer.destroy()}get _projectedGeometry(){if(!this.analysis.valid)return null;const e=this.analysis.geometry,t=w(e,this.view.spatialReference);return t.pending?(this._updatingHandles.addPromise(t.pending),null):(e&&!t.geometry&&A(this.analysis,e.spatialReference,o.getLogger(this)),t.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?y(e.center.x,e.center.y,0):null}get _elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return K(this._getElevationProvider(),t),t}get _targetGeometry(){const e=this._elevationAlignedGeometry;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings[0].forEach(e=>e[2]=r),o}get _targetGeometryRenderInfo(){const e=this._targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:i}=this.view,n=B(e,o,i,k.fromElevationInfo(new H({mode:"absolute-height"}))),{polygons:s}=n,l=s[0],a=m(l.position,l.holeIndices,3),p=P(3*l.count),u=c(),d=c();return j(t.spatialReference,r,u,i.spatialReference),d[12]=-u[12],d[13]=-u[13],d[14]=-u[14],V(p,l.position,d),new q(p,a)}get updating(){return this._renderer.updating||this._updatingHandles.updating}get result(){const e=this._rawResult;return e?new S({measureType:this.analysis.measureType,rawResult:e,unit:this.analysisViewData.effectiveDisplayUnits.volume}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._tooNearFarError}get _tooNearFarError(){const e=this._elevationAlignedGeometry;if(!e)return null;const{view:r}=this,{elevationProvider:o,renderCoordsHelper:i}=r,{camera:n}=r.state,s=B(e,o,i,k.fromElevationInfo(new H({mode:"absolute-height"}))),{polygons:l}=s,a=l[0].position;b(te);for(let t=0;t<a.length;t+=3)n.projectToScreen(d(ee,a[t],a[t+1],a[t+2]),re),R(te,re,te);const p=x(te),u=L(te),{maxVolumeExtentSizeVw:m,minVolumeExtentSizePixels:c}=t;return p>n.width/n.pixelRatio*m||u>n.height/n.pixelRatio*m?new U:Math.max(p,u)<c?new D:null}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeter,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new I:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeter,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new I:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new O:null}get _unsupportedLayerTransparencyError(){return(this.view.map?.ground.opacity??1)<1?new F:null}get _perimeter(){const e=this._targetGeometryRenderInfo?.positions,t=e?X(Y(e)):null;return null!=t?t/this.view.renderCoordsHelper.unitInMeters:null}get _enabled(){return!this.error}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(E(e.extent,e.spatialReference,Z,this.view.spatialReference),T(t,$),C(Z,$)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n}}=e,s=r/t.width*(o/t.height),l=Q(t.cut.totalDepth,i,n)*s,a=Q(t.fill.totalDepth,i,n)*s;this._rawResult=N(Math.abs(l),a)}_updateLabelAnchors(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:l,eastVector:a,upVector:p}=e,u=e=>{const{labelDepth:u,labelCoords:m,totalDepth:c}=e,d=_(s);return 0!==c&&(h(d,d,a,r*(m[0]/t.width-.5)),h(d,d,l,o*(m[1]/t.height-.5))),h(d,d,p,-Q(u,i,n)),d};this.labelAnchors={cut:u(t.cut),fill:u(t.fill)}}};function K(e,t){t.rings[0].forEach(t=>{t[2]=z(e,t,"ground")??0})}function Q(e,t,r){return e*(r-t)+t}function X(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1],i[2]??0]),r?o+=g(r,i):r=[0,0,0],r[0]=i[0],r[1]=i[1],r[2]=i[2];return t&&r&&(o+=g(r,t)),Math.sqrt(o)}function*Y(e){const t=f();for(let r=0;r<e.length;r+=3)t[0]=e[r],t[1]=e[r+1],t[2]=e[r+2],yield t}e([p()],J.prototype,"_projectedGeometry",null),e([p()],J.prototype,"_localOrigin",null),e([p()],J.prototype,"_getElevationProvider",void 0),e([p()],J.prototype,"_elevationAlignedGeometry",null),e([p()],J.prototype,"_targetGeometry",null),e([p()],J.prototype,"_targetGeometryRenderInfo",null),e([p({constructOnly:!0})],J.prototype,"analysis",void 0),e([p({constructOnly:!0})],J.prototype,"analysisViewData",void 0),e([p({constructOnly:!0})],J.prototype,"view",void 0),e([p()],J.prototype,"updating",null),e([p()],J.prototype,"result",null),e([p()],J.prototype,"labelAnchors",void 0),e([p()],J.prototype,"error",null),e([p()],J.prototype,"_tooNearFarError",null),e([p()],J.prototype,"_perimeterTooLargeError",null),e([p()],J.prototype,"_perimeterTooLargeLocalError",null),e([p()],J.prototype,"_perimeterTooLargeGlobalError",null),e([p()],J.prototype,"_unsupportedCoordinateSystemError",null),e([p()],J.prototype,"_unsupportedLayerTransparencyError",null),e([p()],J.prototype,"_perimeter",null),e([p()],J.prototype,"_enabled",null),e([p()],J.prototype,"_renderer",void 0),e([p({readOnly:!0})],J.prototype,"_updatingHandles",void 0),e([p()],J.prototype,"_rawResult",void 0),J=e([u("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],J);const Z=b(),$=b(),ee=f(),te=G(),re=a();export{J as VolumeMeasurementCutFillController};
5
+ import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as n}from"../../../../core/promiseUtils.js";import{whenOnce as i,watch as s,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as a}from"../../../../core/screenUtils.js";import{property as p,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{e as m}from"../../../../chunks/earcut.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as d,c as h,G as g}from"../../../../chunks/vec32.js";import{fromValues as y,create as f,clone as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{projectOrLoad as w}from"../../../../geometry/projectionUtils.js";import{computeTranslationToOriginAndRotation as j}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as E}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as b,create as R,expand as G,width as x,height as L,fromExtent as T,intersects as C}from"../../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as P}from"../../../../geometry/support/DoubleArray.js";import{t as H}from"../../../../chunks/vec3.js";import M from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as V}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as U}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementDistanceTooCloseError as A,VolumeMeasurementDistanceTooFarError as I,VolumeMeasurementPerimeterTooLargeError as O,VolumeMeasurementUnsupportedCoordinateSystemError as D,VolumeMeasurementUnsupportedLayerTransparencyError as F}from"./volumeMeasurementErrors.js";import S from"./VolumeMeasurementResult.js";import{getRawResult as N}from"./volumeMeasurementUtils.js";import{ElevationContext as k}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as z}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as B}from"../../support/renderInfoUtils/polygon.js";import{CutFillDepth as W,TargetGeometryRenderInfo as q}from"../../webgl-engine/lib/CutFillDepth.js";let J=class extends r{constructor(e){super(e),this._getElevationProvider=()=>this.view.elevationProvider,this.labelAnchors=null,this._updatingHandles=new v,this._rawResult=null,this._debouncedUpdate=n(async(e,t,r)=>{if(!this._renderer.done)return;const{renderCoordsHelper:o}=this.view,n=new U({extent:e,localOrigin:t,renderCoordsHelper:o});if(this._renderer.setup(n,r),this._renderer.start(),await i(()=>this._renderer.done),!this._enabled)return;const s=this._renderer.getResults();this._updateResult(n,s),this._updateLabelAnchors(n,s)})}initialize(){const e=this.view;this._renderer=new W({view:e}),this.addHandles([this._createElevationUpdateHandle(),s(()=>({extent:this._projectedGeometry?.extent,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo,enabled:this._enabled}),({extent:e,localOrigin:t,targetGeometryRenderInfo:r,enabled:o})=>{e&&t&&r&&o?this._updatingHandles.addPromise(this._debouncedUpdate(e,t,r)):this._rawResult=null},l)])}destroy(){this._updatingHandles.destroy(),this._renderer.destroy()}get _projectedGeometry(){if(!this.analysis.valid)return null;const e=this.analysis.geometry,t=w(e,this.view.spatialReference);return t.pending?(this._updatingHandles.addPromise(t.pending),null):(e&&!t.geometry&&V(this.analysis,e.spatialReference,o.getLogger(this)),t.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?y(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return K(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings[0].forEach(e=>e[2]=r),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:n}=this.view,i=B(e,o,n,k.fromElevationInfo(new M({mode:"absolute-height"}))),{polygons:s}=i,l=s[0],a=m(l.position,l.holeIndices,3),p=P(3*l.count),u=c(),d=c();return j(t.spatialReference,r,u,n.spatialReference),d[12]=-u[12],d[13]=-u[13],d[14]=-u[14],H(p,l.position,d),new q(p,a)}get updating(){return this._renderer.updating||this._updatingHandles.updating}get result(){const e=this._rawResult;return e?new S({measureType:this.analysis.measureType,rawResult:e,unit:this.analysisViewData.effectiveDisplayUnits.volume}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._tooNearFarError}get _tooNearFarError(){const e=this.elevationAlignedGeometry;if(!e)return null;const{view:r}=this,{elevationProvider:o,renderCoordsHelper:n}=r,{camera:i}=r.state,s=B(e,o,n,k.fromElevationInfo(new M({mode:"absolute-height"}))),{polygons:l}=s,a=l[0].position;b(te);for(let t=0;t<a.length;t+=3)i.projectToScreen(d(ee,a[t],a[t+1],a[t+2]),re),G(te,re,te);const p=x(te),u=L(te),{maxVolumeExtentSizeVw:m,minVolumeExtentSizePixels:c}=t;return p>i.width/i.pixelRatio*m||u>i.height/i.pixelRatio*m?new A:Math.max(p,u)<c?new I:null}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeter,{maxPerimeterLocalWebMercator:n}=t;return null!=o&&o>n?new O:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeter,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new O:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new D:null}get _unsupportedLayerTransparencyError(){return(this.view.map?.ground.opacity??1)<1?new F:null}get _perimeter(){const e=this._targetGeometryRenderInfo?.positions,t=e?X(Y(e)):null;return null!=t?t/this.view.renderCoordsHelper.unitInMeters:null}get _enabled(){return!this.error}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(E(e.extent,e.spatialReference,Z,this.view.spatialReference),T(t,$),C(Z,$)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:n,far:i}}=e,s=r/t.width*(o/t.height),l=Q(t.cut.totalDepth,n,i)*s,a=Q(t.fill.totalDepth,n,i)*s;this._rawResult=N(Math.abs(l),a)}_updateLabelAnchors(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:n,far:i},cameraPositionRenderSpace:s,northVector:l,eastVector:a,upVector:p}=e,u=e=>{const{labelDepth:u,labelCoords:m,totalDepth:c}=e,d=_(s);return 0!==c&&(h(d,d,a,r*(m[0]/t.width-.5)),h(d,d,l,o*(m[1]/t.height-.5))),h(d,d,p,-Q(u,n,i)),d};this.labelAnchors={cut:u(t.cut),fill:u(t.fill)}}};function K(e,t){t.rings[0].forEach(t=>{t[2]=z(e,t,"ground")??0})}function Q(e,t,r){return e*(r-t)+t}function X(e){if(!e)return null;let t=null,r=null,o=0;for(const n of e)t||(t=[n[0],n[1],n[2]??0]),r?o+=g(r,n):r=[0,0,0],r[0]=n[0],r[1]=n[1],r[2]=n[2];return t&&r&&(o+=g(r,t)),Math.sqrt(o)}function*Y(e){const t=f();for(let r=0;r<e.length;r+=3)t[0]=e[r],t[1]=e[r+1],t[2]=e[r+2],yield t}e([p()],J.prototype,"_projectedGeometry",null),e([p()],J.prototype,"_localOrigin",null),e([p()],J.prototype,"_getElevationProvider",void 0),e([p()],J.prototype,"elevationAlignedGeometry",null),e([p()],J.prototype,"targetGeometry",null),e([p()],J.prototype,"_targetGeometryRenderInfo",null),e([p({constructOnly:!0})],J.prototype,"analysis",void 0),e([p({constructOnly:!0})],J.prototype,"analysisViewData",void 0),e([p({constructOnly:!0})],J.prototype,"view",void 0),e([p()],J.prototype,"updating",null),e([p()],J.prototype,"result",null),e([p()],J.prototype,"labelAnchors",void 0),e([p()],J.prototype,"error",null),e([p()],J.prototype,"_tooNearFarError",null),e([p()],J.prototype,"_perimeterTooLargeError",null),e([p()],J.prototype,"_perimeterTooLargeLocalError",null),e([p()],J.prototype,"_perimeterTooLargeGlobalError",null),e([p()],J.prototype,"_unsupportedCoordinateSystemError",null),e([p()],J.prototype,"_unsupportedLayerTransparencyError",null),e([p()],J.prototype,"_perimeter",null),e([p()],J.prototype,"_enabled",null),e([p()],J.prototype,"_renderer",void 0),e([p({readOnly:!0})],J.prototype,"_updatingHandles",void 0),e([p()],J.prototype,"_rawResult",void 0),J=e([u("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],J);const Z=b(),$=b(),ee=f(),te=R(),re=a();export{J as VolumeMeasurementCutFillController};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import"../../../../core/has.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as i,isAborted as r}from"../../../../core/promiseUtils.js";import{pausable as o,sync as h,watch as n,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as c,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import m from"../../../../layers/GraphicsLayer.js";import y from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as u,isPolygonGraphic as g}from"./volumeMeasurementGeometryUtils.js";import{VolumeMeasurementShiftTool as _}from"./VolumeMeasurementShiftTool.js";import{ExclusiveOperationManager as k}from"../../../analysis/ExclusiveOperationManager.js";import{makeAllLayerSnappingOptions as G}from"../../../interactive/snapping/allLayerSnapping.js";import w from"../../../../widgets/Sketch/SketchViewModel.js";let v=class extends s{constructor(e){super(e),this._updatingHandles=new d,this._operationManager=new k,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{analysis:e,analysisViewData:t,view:s}=this;this._graphicsLayer=new m({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}});const a=G(s,{selfEnabled:!0,excludeInternal:!0});this._externalGeometryChangeHandle=o(()=>this.analysis.geometry,()=>this._ensureUpdatedSketchGraphic(),h),this._sketchViewModel=new w({layer:this._graphicsLayer,view:s,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"move"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol,snappingOptions:a.options}),this.addHandles([this._sketchViewModel.on(["undo","redo"],this._onUndoRedo),n(()=>({map:s.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(S(e,t),s){case"idle":case"reshaping-disabled":this._operationManager.stop(),this._graphicsLayer.removeAll(),this._ensureUpdatedSketchGraphic();break;case"reshaping":i(this._startReshape());break;case"awaiting-sketch":this.analysisViewData.interactive=!0}},l),a,this._externalGeometryChangeHandle]),this._shiftTool=new _({analysis:e,view:s,analysisViewData:t}),this.addHandles(this._shiftTool.on("record-undo",e=>{const t=this._sketchViewModel.activeComponent;"reshape-3d"===t?.type&&t.recordUndo(e.apply,e.undo)})),s.tools.add(this._shiftTool),this.addHandles({remove:()=>s.tools.remove(this._shiftTool)})}destroy(){this._operationManager.destroy(),this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new y({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._operationManager.start("place",async t=>{const s=this.analysis.clone();this._ensureUpdatedSketchGraphic();const i=this._sketchViewModel.on("create",e=>{switch(e.state){case"start":this._graphicsLayer.removeAll(),this.sketchGraphic=e.graphic;break;case"active":this._updateGeometryFromSketchGraphic();break;case"complete":this._updateGeometryFromSketchGraphic(),t.stop();break;case"cancel":t.stop()}});t.handles.push(i,a(()=>(i.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?r(e)||s.equals(this.analysis)?t.reject():void t.resolve({}):(this._clearGeometry(),t.reject())))),await this._updatingHandles.addPromise(this._sketchViewModel.create("polygon"))},e)}_startReshape(){return this._operationManager.start("reshape",async e=>{const t=()=>{const e=this._ensureUpdatedSketchGraphic();return e?(this._graphicsLayer.removeAll(),this._graphicsLayer.add(e),this._updatingHandles.addPromise(this._sketchViewModel.update(e,{tool:"reshape"}))):Promise.resolve()};if(!this._ensureUpdatedSketchGraphic())return;const s=this._sketchViewModel.on("update",s=>{this._updateGeometryFromSketchGraphic(),"complete"===s.state&&("reshaping"===this.state?i(t()):e.resolve())});e.handles.push(s,a(()=>{s.remove(),this._sketchViewModel.cancel(),e.resolve()})),await t()})}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return u(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){this._externalGeometryChangeHandle.pause();const e=this.sketchGraphic;this.analysis.geometry=g(e)?e.geometry:null,this._externalGeometryChangeHandle.resume()}get test(){}};function S(e,t){t&&(t.removeFromParent(),e?.add(t))}e([c({constructOnly:!0})],v.prototype,"analysisViewData",void 0),e([c({constructOnly:!0})],v.prototype,"view",void 0),e([c({constructOnly:!0})],v.prototype,"analysis",void 0),e([c()],v.prototype,"sketchGraphic",null),e([c({nonNullable:!0})],v.prototype,"state",null),e([c()],v.prototype,"updating",null),e([c()],v.prototype,"_polygonSymbol",null),v=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],v);export{v as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{ignoreAbortErrors as i,isAborted as r}from"../../../../core/promiseUtils.js";import{pausable as o,sync as h,watch as n,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as c,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import m from"../../../../layers/GraphicsLayer.js";import y from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as u,isPolygonGraphic as g}from"./volumeMeasurementGeometryUtils.js";import{VolumeMeasurementShiftTool as _}from"./VolumeMeasurementShiftTool.js";import{ExclusiveOperationManager as k}from"../../../analysis/ExclusiveOperationManager.js";import{makeAllLayerSnappingOptions as G}from"../../../interactive/snapping/allLayerSnapping.js";import w from"../../../../widgets/Sketch/SketchViewModel.js";let v=class extends s{constructor(e){super(e),this._updatingHandles=new d,this._operationManager=new k,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{analysis:e,analysisViewData:t,view:s}=this;this._graphicsLayer=new m({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}});const a=G(s,{selfEnabled:!0,excludeInternal:!0});this._externalGeometryChangeHandle=o(()=>this.analysis.geometry,()=>this._ensureUpdatedSketchGraphic(),h),this._sketchViewModel=new w({layer:this._graphicsLayer,view:s,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"move"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol,snappingOptions:a.options}),this.addHandles([this._sketchViewModel.on(["undo","redo"],this._onUndoRedo),n(()=>({map:s.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(S(e,t),s){case"idle":case"reshaping-disabled":this._operationManager.stop(),this._graphicsLayer.removeAll(),this._ensureUpdatedSketchGraphic();break;case"reshaping":i(this._startReshape());break;case"awaiting-sketch":this.analysisViewData.interactive=!0}},l),a,this._externalGeometryChangeHandle]),this._shiftTool=new _({analysis:e,view:s,analysisViewData:t}),this.addHandles(this._shiftTool.on("record-undo",e=>{const t=this._sketchViewModel.activeComponent;"reshape-3d"===t?.type&&t.recordUndo(e.apply,e.undo)})),s.tools.add(this._shiftTool),this.addHandles({remove:()=>s.tools.remove(this._shiftTool)})}destroy(){this._operationManager.destroy(),this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new y({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._operationManager.start("place",async t=>{const s=this.analysis.clone();this._ensureUpdatedSketchGraphic();const i=this._sketchViewModel.on("create",e=>{switch(e.state){case"start":this._graphicsLayer.removeAll(),this.sketchGraphic=e.graphic;break;case"active":this._updateGeometryFromSketchGraphic();break;case"complete":this._updateGeometryFromSketchGraphic(),t.stop();break;case"cancel":t.stop()}});t.handles.push(i,a(()=>(i.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?r(e)||s.equals(this.analysis)?t.reject():void t.resolve({}):(this._clearGeometry(),t.reject())))),await this._updatingHandles.addPromise(this._sketchViewModel.create("polygon"))},e)}_startReshape(){return this._operationManager.start("reshape",async e=>{const t=()=>{const e=this._ensureUpdatedSketchGraphic();return e?(this._graphicsLayer.removeAll(),this._graphicsLayer.add(e),this._updatingHandles.addPromise(this._sketchViewModel.update(e,{tool:"reshape"}))):Promise.resolve()};if(!this._ensureUpdatedSketchGraphic())return;const s=this._sketchViewModel.on("update",s=>{this._updateGeometryFromSketchGraphic(),"complete"===s.state&&("reshaping"===this.state?i(t()):e.resolve())});e.handles.push(s,a(()=>{s.remove(),this._sketchViewModel.cancel(),e.resolve()})),await t()})}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return u(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){this._externalGeometryChangeHandle.pause();const e=this.sketchGraphic;this.analysis.geometry=g(e)?e.geometry:null,this._externalGeometryChangeHandle.resume()}get test(){}};function S(e,t){t&&(t.removeFromParent(),e?.add(t))}e([c({constructOnly:!0})],v.prototype,"analysisViewData",void 0),e([c({constructOnly:!0})],v.prototype,"view",void 0),e([c({constructOnly:!0})],v.prototype,"analysis",void 0),e([c()],v.prototype,"sketchGraphic",null),e([c({nonNullable:!0})],v.prototype,"state",null),e([c()],v.prototype,"updating",null),e([c()],v.prototype,"_polygonSymbol",null),v=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],v);export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{verticalLengthUnitFromSpatialReference as i,convertUnit as s}from"../../../core/units.js";import{property as l,subclass as n}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as r}from"../../../support/getDefaultUnitForView.js";import a from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as o}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as u}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";import y from"./VolumeMeasurement/VolumeMeasurementTool.js";let p=class extends a{constructor(e){super(e),this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null}initialize(){const{analysis:e,view:t}=this;this._analysisController=new o({view:t,analysis:e,analysisViewData:this}),this._analysisTool=new y({analysis:e,view:t,analysisViewData:this}),this._analysisVisualization=new u({view:t,analysis:e,analysisViewData:this})}destroy(){this._analysisController=t(this._analysisController),this._analysisVisualization=t(this._analysisVisualization),this._analysisTool.destroy()}get error(){return this._analysisController?.error??null}get result(){return this._analysisController?.result}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get visible(){return super.visible}set visible(e){super.visible=e}get effectiveTargetElevation(){const{cutFillOptions:e,inputUnits:t}=this.analysis,{targetElevation:l}=e,n=t?.elevation??"meters",r=i(this.view.spatialReference);if(null!=l&&null!=r)return s(l,n,r);const a=this.elevationAlignedGeometry?.extent;return null==a?.zmin||null==a?.zmax?null:(a.zmax+a.zmin)/2}get effectiveDisplayUnits(){const{displayUnits:e}=this.analysis,t=r(this.view);return{elevation:e.elevation??t,volume:e.volume??t}}get labelAnchors(){return this._analysisController.labelAnchors}get updating(){return null!=this._analysisController&&this._analysisController.updating||this._analysisTool.updating||this._analysisVisualization.updating}place(e){return this._analysisTool.place(e)}get test(){}};e([l()],p.prototype,"error",null),e([l({readOnly:!0})],p.prototype,"type",void 0),e([l({constructOnly:!0,nonNullable:!0})],p.prototype,"analysis",void 0),e([l({readOnly:!0})],p.prototype,"result",null),e([l()],p.prototype,"elevationAlignedGeometry",void 0),e([l({type:Number})],p.prototype,"effectiveTargetElevation",null),e([l()],p.prototype,"targetGeometry",void 0),e([l()],p.prototype,"effectiveDisplayUnits",null),e([l()],p.prototype,"labelAnchors",null),e([l()],p.prototype,"updating",null),p=e([n("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],p);const m=p;export{m as default};
5
+ import{__decorate as e}from"tslib";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{verticalLengthUnitFromSpatialReference as i,convertUnit as s}from"../../../core/units.js";import{property as l,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as n}from"../../../support/getDefaultUnitForView.js";import o from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as a}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as u}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";import y from"./VolumeMeasurement/VolumeMeasurementTool.js";let p=class extends o{constructor(e){super(e),this.type="volume-measurement-view-3d",this.analysis=null}initialize(){const{analysis:e,view:t}=this;this._analysisController=new a({view:t,analysis:e,analysisViewData:this}),this._analysisTool=new y({analysis:e,view:t,analysisViewData:this}),this._analysisVisualization=new u({view:t,analysis:e,analysisViewData:this})}destroy(){this._analysisController=t(this._analysisController),this._analysisVisualization=t(this._analysisVisualization),this._analysisTool.destroy()}get error(){return this._analysisController?.error??null}get result(){return this._analysisController?.result}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get visible(){return super.visible}set visible(e){super.visible=e}get elevationAlignedGeometry(){return this._analysisController?.elevationAlignedGeometry}get effectiveTargetElevation(){const{cutFillOptions:e,inputUnits:t}=this.analysis,{targetElevation:l}=e,r=t?.elevation??"meters",n=i(this.view.spatialReference);if(null!=l&&null!=n)return s(l,r,n);const o=this.elevationAlignedGeometry?.extent;return null==o?.zmin||null==o?.zmax?null:(o.zmax+o.zmin)/2}get targetGeometry(){return this._analysisController?.targetGeometry}get effectiveDisplayUnits(){const{displayUnits:e}=this.analysis,t=n(this.view);return{elevation:e.elevation??t,volume:e.volume??t}}get labelAnchors(){return this._analysisController?.labelAnchors}get updating(){return this._analysisController?.updating||this._analysisTool?.updating||this._analysisVisualization?.updating}place(e){return this._analysisTool.place(e)}get test(){}};e([l()],p.prototype,"error",null),e([l({readOnly:!0})],p.prototype,"type",void 0),e([l({constructOnly:!0,nonNullable:!0})],p.prototype,"analysis",void 0),e([l({readOnly:!0})],p.prototype,"result",null),e([l()],p.prototype,"elevationAlignedGeometry",null),e([l({type:Number})],p.prototype,"effectiveTargetElevation",null),e([l()],p.prototype,"targetGeometry",null),e([l()],p.prototype,"effectiveDisplayUnits",null),e([l()],p.prototype,"labelAnchors",null),e([l()],p.prototype,"updating",null),e([l()],p.prototype,"_analysisController",void 0),p=e([r("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],p);const m=p;export{m as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as e}from"../../../../core/compilerUtils.js";import{acosClamped as t,clamp as r,asinClamped as n,deg2rad as i}from"../../../../core/mathUtils.js";import{fromRotation as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{e as o,p as c,j as u,i as l,D as m,B as d,g as f,n as p,b as h}from"../../../../chunks/vec32.js";import{create as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as y}from"../../../../geometry/ellipsoidUtils.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{defaultConstraintOptions as I,hasConstraintType as S,adjustRangeForInteraction as x}from"./common.js";import{viewAngle as v}from"../../state/utils/viewUtils.js";function w(t,r,n,i=!0){N.eyeCenterDistance=0,N.requiresTwoSteps=!1;const s=A(t,r,n,I,N);if(0===s)return!1;switch(a(L,-s,r.viewRight),n.tiltMode){case 1:c(k,r.viewForward,L),u(k,k,N.eyeCenterDistance),r.center=l(B,r.eye,k);break;case 0:o(k,r.center,r.eye),c(k,k,L),r.eye=o(B,r.center,k);break;default:e(n.tiltMode)}return r.up=c(B,r.up,L),!N.requiresTwoSteps||!i||w(t,r,n,!1)}function A(e,t,r,n=I,i){if(!e.state.constraints.tilt)return 0;const a=Math.min(t.relativeElevation*G,t.distance),s=e.state.constraints.tilt(a,J);return E(e,r,s),2===n.interactionType&&S(n.selection,2)&&U(e,n.interactionStartCamera,s),1===r.tiltMode||1===n.tiltMode?R(e,t,s,i):P(e,t,s)}function P(e,t,n){const i=v(e.renderCoordsHelper,t.center,t.eye),a=i-r(i,n.min,n.max);return O(a)?a:0}function R(e,t,r,n){switch(n&&(n.requiresTwoSteps=!1),e.viewingMode){case"global":return j(e,t,r,n);case"local":return T(e,t,r,n)}}function T(e,t,n,i){const a=v(e.renderCoordsHelper,t.center,t.eye),s=r(a,n.min,n.max),o=a-s;if(!O(o))return 0;if(i){const r=Math.abs(e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude),n=e.renderCoordsHelper.getAltitude(t.eye)-r,a=Math.max(Math.cos(s),1e-4);Math.abs(a)>1e-4?i.eyeCenterDistance=n/a:i.eyeCenterDistance=t.distance}return o}function j(e,t,n,i){const a=b(e,t,K),s=r(a.tiltAtCenter,n.min,n.max);if(!O(a.tiltAtCenter-s))return 0;let o,c;return a.centerIsOnSurface?(o=q(a),c=H(a,o)):(o=a.constraints.clampTilt(a.distance,a.tiltAtCenter),i&&o<Math.PI/2&&(i.requiresTwoSteps=!0,o=Math.PI/2-1e-5),c=F(a,o)),i&&(i.eyeCenterDistance=D(a,o)),c}function b(e,r,n){const i=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,a=i+y(e.spatialReference).radius,s=e.renderCoordsHelper.intersectManifold(r.ray,i,B);return n.distance=Math.min(r.relativeElevation*G,r.distance),n.centerIsOnSurface=!1,null!=s?(n.distance=Math.min(r.relativeElevation*G,d(r.eye,s)),n.tiltAtCenter=v(e.renderCoordsHelper,s,r.eye),n.centerIsOnSurface=!0):e.state.isLocal?n.tiltAtCenter=v(e.renderCoordsHelper,r.center,r.eye):(g.radius=a,g.closestPointOnSilhouette(r.ray,B),n.distance=Math.min(r.relativeElevation*G,d(r.eye,B)),n.tiltAtCenter=t(-f(r.viewForward,p(B,B)))),n.radius=a,n.eyeRadius=h(r.eye),n.constraints=e.state.constraints,n}const g=new C;function O(e){return Math.abs(e)>1e-9}function q(e){const{constraints:t,distance:r,tiltAtCenter:n}=e;let i=n,a=t.clampTilt(r,n);const s=D(e,a);if(t.clampTilt(s,n)===a)return a;let o=0;for(;o<10&&O(a-i);){const r=(i+a)/2,n=D(e,r);O(t.clampTilt(n,r)-r)?i=r:a=r,o++}return a}function D(e,t){if(!e.centerIsOnSurface)return e.distance;const i=Math.PI-r(t,0,Math.PI),a=n(e.radius/e.eyeRadius*Math.sin(i)),s=Math.PI-i-a,o=Math.sin(s)/Math.sin(i);if(e.eyeRadius<e.radius&&o>1){const t=Math.PI-a,r=Math.PI-i-t;return Math.sin(r)/Math.sin(i)*e.eyeRadius}return o*e.eyeRadius}function H(e,t){const r=n(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=n(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function F(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function E(e,t,r){if(0===t.interactionType)return;const{interactionStartCamera:n,interactionFactor:i}=t;if(!n)return;const{min:a,max:s}=r,o=A(e,n,I,t),c=0===o?0:v(e.renderCoordsHelper,n.center,n.eye);r.min=a,r.max=s,2===t.interactionType?(S(t.selection,2)&&U(e,n,r),x(o,c,!0,i,z,r)):x(o,c,!1,i,z,r)}function U(e,r,n){const i=e.state.constraints;if(e.state.isLocal||!i.altitude||!r)return;const a=m(r.center),s=Math.sqrt(a),o=r.distance,c=y(e.spatialReference).radius,u=i.altitude.min+c,l=i.altitude.max+c,d=(u*u-o*o-a)/(-2*s*o),f=(l*l-o*o-a)/(-2*s*o);n.min=Math.max(n.min,Math.min(Math.PI-t(f),n.max)),n.max=Math.min(n.max,Math.PI-t(d))}const k=M(),L=s(),B=M(),z=i(5),G=30,J={min:0,max:0},K={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,distance:0,tiltAtCenter:0},N={eyeCenterDistance:0,requiresTwoSteps:!1};export{w as applyTiltConstraint,A as getTiltConstraintError};
5
+ import{acosClamped as e,clamp as t,asinClamped as n,deg2rad as r}from"../../../../core/mathUtils.js";import{fromRotation as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{e as s,p as o,j as c,i as u,D as l,B as m,g as d,n as f,b as p}from"../../../../chunks/vec32.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as M}from"../../../../geometry/ellipsoidUtils.js";import{Sphere as y}from"../../../../geometry/support/sphere.js";import{defaultConstraintOptions as C,hasConstraintType as I,adjustRangeForInteraction as S}from"./common.js";import{viewAngle as x}from"../../state/utils/viewUtils.js";function v(e,t,n,r=!0){K.eyeCenterDistance=0,K.requiresTwoSteps=!1;const a=w(e,t,n,C,K);if(0===a)return!1;switch(i(U,-a,t.viewRight),n.tiltMode){case 1:o(k,t.viewForward,U),c(k,k,K.eyeCenterDistance),t.center=u(L,t.eye,k);break;case 0:s(k,t.center,t.eye),o(k,k,U),t.eye=s(L,t.center,k);break;default:n.tiltMode}return t.up=o(L,t.up,U),!K.requiresTwoSteps||!r||v(e,t,n,!1)}function w(e,t,n,r=C,i){if(!e.state.constraints.tilt)return 0;const a=Math.min(t.relativeElevation*z,t.distance),s=e.state.constraints.tilt(a,G);return F(e,n,s),2===r.interactionType&&I(r.selection,2)&&E(e,r.interactionStartCamera,s),1===n.tiltMode||1===r.tiltMode?P(e,t,s,i):A(e,t,s)}function A(e,n,r){const i=x(e.renderCoordsHelper,n.center,n.eye),a=i-t(i,r.min,r.max);return j(a)?a:0}function P(e,t,n,r){switch(r&&(r.requiresTwoSteps=!1),e.viewingMode){case"global":return T(e,t,n,r);case"local":return R(e,t,n,r)}}function R(e,n,r,i){const a=x(e.renderCoordsHelper,n.center,n.eye),s=t(a,r.min,r.max),o=a-s;if(!j(o))return 0;if(i){const t=Math.abs(e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude),r=e.renderCoordsHelper.getAltitude(n.eye)-t,a=Math.max(Math.cos(s),1e-4);Math.abs(a)>1e-4?i.eyeCenterDistance=r/a:i.eyeCenterDistance=n.distance}return o}function T(e,n,r,i){const a=b(e,n,J),s=t(a.tiltAtCenter,r.min,r.max);if(!j(a.tiltAtCenter-s))return 0;let o,c;return a.centerIsOnSurface?(o=O(a),c=D(a,o)):(o=a.constraints.clampTilt(a.distance,a.tiltAtCenter),i&&o<Math.PI/2&&(i.requiresTwoSteps=!0,o=Math.PI/2-1e-5),c=H(a,o)),i&&(i.eyeCenterDistance=q(a,o)),c}function b(t,n,r){const i=t.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,a=i+M(t.spatialReference).radius,s=t.renderCoordsHelper.intersectManifold(n.ray,i,L);return r.distance=Math.min(n.relativeElevation*z,n.distance),r.centerIsOnSurface=!1,null!=s?(r.distance=Math.min(n.relativeElevation*z,m(n.eye,s)),r.tiltAtCenter=x(t.renderCoordsHelper,s,n.eye),r.centerIsOnSurface=!0):t.state.isLocal?r.tiltAtCenter=x(t.renderCoordsHelper,n.center,n.eye):(g.radius=a,g.closestPointOnSilhouette(n.ray,L),r.distance=Math.min(n.relativeElevation*z,m(n.eye,L)),r.tiltAtCenter=e(-d(n.viewForward,f(L,L)))),r.radius=a,r.eyeRadius=p(n.eye),r.constraints=t.state.constraints,r}const g=new y;function j(e){return Math.abs(e)>1e-9}function O(e){const{constraints:t,distance:n,tiltAtCenter:r}=e;let i=r,a=t.clampTilt(n,r);const s=q(e,a);if(t.clampTilt(s,r)===a)return a;let o=0;for(;o<10&&j(a-i);){const n=(i+a)/2,r=q(e,n);j(t.clampTilt(r,n)-n)?i=n:a=n,o++}return a}function q(e,r){if(!e.centerIsOnSurface)return e.distance;const i=Math.PI-t(r,0,Math.PI),a=n(e.radius/e.eyeRadius*Math.sin(i)),s=Math.PI-i-a,o=Math.sin(s)/Math.sin(i);if(e.eyeRadius<e.radius&&o>1){const t=Math.PI-a,n=Math.PI-i-t;return Math.sin(n)/Math.sin(i)*e.eyeRadius}return o*e.eyeRadius}function D(e,t){const r=n(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=n(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function H(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function F(e,t,n){if(0===t.interactionType)return;const{interactionStartCamera:r,interactionFactor:i}=t;if(!r)return;const{min:a,max:s}=n,o=w(e,r,C,t),c=0===o?0:x(e.renderCoordsHelper,r.center,r.eye);n.min=a,n.max=s,2===t.interactionType?(I(t.selection,2)&&E(e,r,n),S(o,c,!0,i,B,n)):S(o,c,!1,i,B,n)}function E(t,n,r){const i=t.state.constraints;if(t.state.isLocal||!i.altitude||!n)return;const a=l(n.center),s=Math.sqrt(a),o=n.distance,c=M(t.spatialReference).radius,u=i.altitude.min+c,m=i.altitude.max+c,d=(u*u-o*o-a)/(-2*s*o),f=(m*m-o*o-a)/(-2*s*o);r.min=Math.max(r.min,Math.min(Math.PI-e(f),r.max)),r.max=Math.min(r.max,Math.PI-e(d))}const k=h(),U=a(),L=h(),B=r(5),z=30,G={min:0,max:0},J={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,distance:0,tiltAtCenter:0},K={eyeCenterDistance:0,requiresTwoSteps:!1};export{v as applyTiltConstraint,w as getTiltConstraintError};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as t}from"../../../core/compilerUtils.js";import{clamp as a}from"../../../core/mathUtils.js";import{signal as e}from"../../../core/signal.js";import{rotate as s}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as r}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{D as h,n as o,j as n,d as c,b as d,e as l}from"../../../chunks/vec32.js";import{create as _,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as f,fromPoints as p,axis as m}from"../../../geometry/support/axisAngleDegrees.js";import{earth as F}from"../../../geometry/support/Ellipsoid.js";import{ensureClouds as P}from"./Clouds.js";import{heightLimit as x}from"./weather.js";class v{constructor(){this.startTime=0,this._data=e(null),this.coverage=0,this.absorption=0,this._readChannels=0,this.parallax=new g,this.parallaxNew=new g,this._anchorPoint=_(),this._fadeState=e(0),this._fadeFactor=e(1)}get data(){return this._data.value}set data(t){this._data.value=t}get readChannels(){return this._readChannels}get fadeState(){return this._fadeState.value}get fadeFactor(){return this._fadeFactor.value}get opacity(){switch(this.fadeState){case 0:return 0;case 4:return 1-this.fadeFactor;case 1:return this.fadeFactor;case 2:case 3:return 1}}fade(t,e,s){this.isFading&&this.fadeFactor<1&&(this._fadeFactor.value=s?a((e-this.startTime)/(C*s),0,1):1,1===this.fadeFactor&&this._endFade()),this._evaluateState(t,e),this._updateParallax(t)}_evaluateState(t,a){const e=t.relativeElevation,s=this._updateAnchorPoint(t);(Math.abs(e)>1.7*x||s>k)&&this.opacity>0?this._startFade(0,a):this.isFading||(Math.abs(e)>x||s>j*k?this.opacity>0&&this._startFade(4,a):P(this.data)&&(0===this.opacity?this._startFade(1,a):2===this.data.state&&(2===this.fadeState?this._startFade(3,a):this._startFade(2,a))))}_updateParallax(t){const a=h(t.eye);this.parallax.radiusCurvatureCorrection=.84*Math.sqrt(Math.max(a-F.radius*F.radius,0))/Math.sqrt(a),p(w,this.parallax.anchorPoint,S),s(this.parallax.transform,i,S[3],m(S)),p(w,this.parallaxNew.anchorPoint,S),s(this.parallaxNew.transform,i,S[3],m(S))}_updateAnchorPoint(t){return o(this._anchorPoint,t.eye),n(this._anchorPoint,this._anchorPoint,F.radius),0===this.fadeState&&2===this.data?.state?(c(this.parallax.anchorPoint,this._anchorPoint),0):d(l(b,this.parallax.anchorPoint,this._anchorPoint))}requestFade(){this._fadeFactor.value=0}_startFade(t,a){switch(this._fadeState.value=t,this.startTime=a,t){case 3:this.requestFade(),this._switchReadChannels(),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 1:this.requestFade(),this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 4:this.requestFade();break;case 2:this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint),this._endFade();break;case 0:this._endFade()}}_endFade(){switch(this._fadeFactor.value=1,this.data&&2!==this.data.state&&(this.data.state=0),this.fadeState){case 3:c(this.parallax.anchorPoint,this.parallaxNew.anchorPoint),this._fadeState.value=2;break;case 1:this._fadeState.value=2;break;case 4:this._fadeState.value=0;break;case 2:case 0:break;default:t(this.fadeState)}}_switchReadChannels(){2===this.data?.state&&(this._readChannels=1-this._readChannels,this.data.state=3)}get isFading(){return 4===this.fadeState||1===this.fadeState||3===this.fadeState}}class g{constructor(){this.anchorPoint=_(),this.radiusCurvatureCorrection=0,this.transform=r()}}const w=u(0,0,1),S=f(),b=_(),C=1.25,j=.5,k=2e5;export{v as CloudsParameters};
5
+ import{clamp as a}from"../../../core/mathUtils.js";import{signal as t}from"../../../core/signal.js";import{rotate as e}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as s,create as i}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{D as r,n as h,j as o,d as n,b as c,e as d}from"../../../chunks/vec32.js";import{create as l,fromValues as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as u,fromPoints as f,axis as p}from"../../../geometry/support/axisAngleDegrees.js";import{earth as m}from"../../../geometry/support/Ellipsoid.js";import{ensureClouds as F}from"./Clouds.js";import{heightLimit as P}from"./weather.js";class x{constructor(){this.startTime=0,this._data=t(null),this.coverage=0,this.absorption=0,this._readChannels=0,this.parallax=new v,this.parallaxNew=new v,this._anchorPoint=l(),this._fadeState=t(0),this._fadeFactor=t(1)}get data(){return this._data.value}set data(a){this._data.value=a}get readChannels(){return this._readChannels}get fadeState(){return this._fadeState.value}get fadeFactor(){return this._fadeFactor.value}get opacity(){switch(this.fadeState){case 0:return 0;case 4:return 1-this.fadeFactor;case 1:return this.fadeFactor;case 2:case 3:return 1}}fade(t,e,s){this.isFading&&this.fadeFactor<1&&(this._fadeFactor.value=s?a((e-this.startTime)/(b*s),0,1):1,1===this.fadeFactor&&this._endFade()),this._evaluateState(t,e),this._updateParallax(t)}_evaluateState(a,t){const e=a.relativeElevation,s=this._updateAnchorPoint(a);(Math.abs(e)>1.7*P||s>j)&&this.opacity>0?this._startFade(0,t):this.isFading||(Math.abs(e)>P||s>C*j?this.opacity>0&&this._startFade(4,t):F(this.data)&&(0===this.opacity?this._startFade(1,t):2===this.data.state&&(2===this.fadeState?this._startFade(3,t):this._startFade(2,t))))}_updateParallax(a){const t=r(a.eye);this.parallax.radiusCurvatureCorrection=.84*Math.sqrt(Math.max(t-m.radius*m.radius,0))/Math.sqrt(t),f(g,this.parallax.anchorPoint,w),e(this.parallax.transform,s,w[3],p(w)),f(g,this.parallaxNew.anchorPoint,w),e(this.parallaxNew.transform,s,w[3],p(w))}_updateAnchorPoint(a){return h(this._anchorPoint,a.eye),o(this._anchorPoint,this._anchorPoint,m.radius),0===this.fadeState&&2===this.data?.state?(n(this.parallax.anchorPoint,this._anchorPoint),0):c(d(S,this.parallax.anchorPoint,this._anchorPoint))}requestFade(){this._fadeFactor.value=0}_startFade(a,t){switch(this._fadeState.value=a,this.startTime=t,a){case 3:this.requestFade(),this._switchReadChannels(),n(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 1:this.requestFade(),this._switchReadChannels(),n(this.parallax.anchorPoint,this._anchorPoint),n(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 4:this.requestFade();break;case 2:this._switchReadChannels(),n(this.parallax.anchorPoint,this._anchorPoint),n(this.parallaxNew.anchorPoint,this._anchorPoint),this._endFade();break;case 0:this._endFade()}}_endFade(){switch(this._fadeFactor.value=1,this.data&&2!==this.data.state&&(this.data.state=0),this.fadeState){case 3:n(this.parallax.anchorPoint,this.parallaxNew.anchorPoint),this._fadeState.value=2;break;case 1:this._fadeState.value=2;break;case 4:this._fadeState.value=0;break;case 2:case 0:break;default:this.fadeState}}_switchReadChannels(){2===this.data?.state&&(this._readChannels=1-this._readChannels,this.data.state=3)}get isFading(){return 4===this.fadeState||1===this.fadeState||3===this.fadeState}}class v{constructor(){this.anchorPoint=l(),this.radiusCurvatureCorrection=0,this.transform=i()}}const g=_(0,0,1),w=u(),S=l(),b=1.25,C=.5,j=2e5;export{x as CloudsParameters};