@arcgis/core 5.1.0-next.84 → 5.1.0-next.86

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 (367) hide show
  1. package/assets/components/assets/icon/gpsReceiver16.json +1 -0
  2. package/assets/components/assets/icon/gpsReceiver24.json +1 -0
  3. package/assets/components/assets/icon/gpsReceiver32.json +1 -0
  4. package/assets/components/assets/icon/totalStation16.json +1 -0
  5. package/assets/components/assets/icon/totalStation24.json +1 -0
  6. package/assets/components/assets/icon/totalStation32.json +1 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{e89dc473f46a5584d2ef.js → 004af103a94d21cb4889.js} +3 -3
  9. package/assets/esri/core/workers/chunks/{67abbe81c16de26f61d8.js → 1bad4331a43169f3cc34.js} +1 -1
  10. package/assets/esri/core/workers/chunks/27f67a3828b78d4c1413.js +1 -0
  11. package/assets/esri/core/workers/chunks/2c916b93d8a6e6b9c0d7.js +1 -0
  12. package/assets/esri/core/workers/chunks/{db86a1119e4e58ecfbda.js → 2f8b173d1dac73ba0d9e.js} +1 -1
  13. package/assets/esri/core/workers/chunks/49e8144effc299dfcd66.js +1 -0
  14. package/assets/esri/core/workers/chunks/5166f204fd078dced5db.js +1 -0
  15. package/assets/esri/core/workers/chunks/{45c83eb7c2a06166e3b0.js → 56717ff315c6ec874142.js} +1 -1
  16. package/assets/esri/core/workers/chunks/577cbc131b21c351fae5.js +2 -0
  17. package/assets/esri/core/workers/chunks/{72691fe14024e35f85d0.js → 618106f5fbdf88ef2278.js} +1 -1
  18. package/assets/esri/core/workers/chunks/61fada8942b65fa0b5e1.js +1 -0
  19. package/assets/esri/core/workers/chunks/{05c5f68e117fc58ae801.js → 701b823763e941b71f4f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{1e2c0c6d724f7639d4c1.js → 713ab619060bd5087479.js} +13 -13
  21. package/assets/esri/core/workers/chunks/{a9b5ce00323cd5574bf7.js → 7160e3e7340beb7fdb42.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{0219edb509e01270d42d.js → 99c6bd2125f4eb6796fe.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js → a844547bf33a8527ee9f.js} +2 -2
  24. package/assets/esri/core/workers/chunks/aa6808146c76b2d49b64.js +1 -0
  25. package/assets/esri/core/workers/chunks/{9cac70164d8528c283af.js → add000f51c778114c028.js} +1 -1
  26. package/assets/esri/core/workers/chunks/b23e677c33db6f9bac8a.js +1 -0
  27. package/assets/esri/core/workers/chunks/{dfe1139124fda0d6c059.js → b575292013bceef9b015.js} +1 -1
  28. package/assets/esri/core/workers/chunks/bae8f2a5dfe0cfbc0688.js +1 -0
  29. package/assets/esri/core/workers/chunks/bb5f909a2f26fc6a21b0.js +2 -0
  30. package/assets/esri/core/workers/chunks/{28a45bd26eb5c9b3ec7c.js → ce66c551b7083913eee5.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{22bdea4ca52970c29504.js → d0aee7c80c5c7e23d216.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{f4220b6eab0865318033.js → d8de7fe49dba9ed589df.js} +1 -1
  33. package/assets/esri/core/workers/chunks/ded2f19a1685db2137f4.js +2 -0
  34. package/assets/esri/core/workers/chunks/{f77d23ee60c876b01e4b.js → e9a42f0262fc44a79d4b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/edbdee69440dbfc05644.js +1 -0
  36. package/assets/esri/core/workers/chunks/ee057c85cdf6beb5b012.js +2 -0
  37. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +596 -0
  38. package/assets/esri/core/workers/chunks/ff57a071156d8a7e47be.js +1 -0
  39. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  40. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  41. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
  42. package/assets/esri/themes/dark/main.css +1 -1
  43. package/assets/esri/themes/light/main.css +1 -1
  44. package/assets/esri/themes/light/view.css +1 -1
  45. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
  46. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
  47. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  48. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  49. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  50. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  51. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  52. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  53. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  54. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  55. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  56. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  57. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  58. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  59. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  60. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  61. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  62. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  63. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  64. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  65. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  66. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  67. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  68. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  69. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  70. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  71. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  72. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  73. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  74. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  75. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  76. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  77. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  78. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  79. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  80. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  81. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  82. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  83. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  84. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  85. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  91. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  92. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  93. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  94. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  95. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  96. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  97. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  98. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  99. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  100. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  101. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  102. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  103. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  104. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  105. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  106. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  107. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  108. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  109. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  110. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  111. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  112. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  113. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  114. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  115. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  116. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  117. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  118. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  119. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  120. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  121. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  122. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  123. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  124. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  125. package/chunks/EdgeShader.glsl.js +13 -9
  126. package/chunks/Fog.glsl.js +1 -1
  127. package/chunks/GlowBlur.glsl.js +9 -13
  128. package/chunks/GlowComposition.glsl.js +10 -10
  129. package/chunks/ShadowCastVisualize.glsl.js +10 -10
  130. package/config.js +1 -1
  131. package/core/arrayUtils.js +1 -1
  132. package/core/has.js +1 -1
  133. package/core/screenUtils.js +1 -1
  134. package/form/types.d.ts +1 -1
  135. package/geohash/GeohashCell.js +1 -1
  136. package/geohash/GeohashTree.js +1 -1
  137. package/interfaces.d.ts +14 -14
  138. package/kernel.js +1 -1
  139. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  140. package/layers/ParquetLayer.d.ts +10 -10
  141. package/layers/ParquetLayer.js +1 -1
  142. package/layers/StreamLayer.js +1 -1
  143. package/layers/graphics/sources/connections/FabricKustoConnection.js +2 -0
  144. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  145. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  146. package/layers/graphics/sources/connections/createConnection.js +1 -1
  147. package/layers/graphics/sources/connections/websocketUils.js +2 -0
  148. package/layers/scene/ModelFileInfo.js +1 -1
  149. package/layers/scene/modelQuerySupport.js +1 -1
  150. package/layers/support/ClientSideConnection.js +1 -1
  151. package/layers/support/FabricKustoSource.js +2 -0
  152. package/layers/support/{ParquetGeometryEncodingLocation.d.ts → GeometryEncodingLocation.d.ts} +9 -9
  153. package/layers/support/{ParquetGeometryEncodingLocation.js → GeometryEncodingLocation.js} +1 -1
  154. package/layers/support/{ParquetGeometryEncodingWkb.d.ts → GeometryEncodingWkb.d.ts} +8 -9
  155. package/layers/support/GeometryEncodingWkb.js +2 -0
  156. package/layers/support/kustoUtils.js +2 -0
  157. package/layers/support/parquetEncodingUtils.js +1 -1
  158. package/layers/support/parquetUtils.js +1 -1
  159. package/layers/support/types.d.ts +3 -3
  160. package/package.json +2 -2
  161. package/popup/Features.d.ts +10 -0
  162. package/popup/Features.js +1 -1
  163. package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +4 -1
  164. package/support/revision.js +1 -1
  165. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  166. package/views/2d/FrameTask.js +1 -1
  167. package/views/2d/LabelManager.js +1 -1
  168. package/views/2d/ViewState.js +1 -1
  169. package/views/2d/engine/DisplayObject.js +1 -1
  170. package/views/2d/engine/Stage.js +1 -1
  171. package/views/2d/engine/flow/FlowContainer.js +1 -1
  172. package/views/2d/engine/flow/FlowView2D.js +1 -1
  173. package/views/2d/engine/flow/styles/AFlowResources.js +1 -1
  174. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  175. package/views/2d/engine/flow/styles/Particles.js +1 -1
  176. package/views/2d/engine/flow/styles/Stack.js +1 -1
  177. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  178. package/views/2d/engine/transitions/FadeTransition.js +1 -1
  179. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  180. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  181. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  182. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  183. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  184. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  185. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  186. package/views/2d/engine/webgl/ResizableUint32Array.js +2 -0
  187. package/views/2d/engine/webgl/TileCpuState.js +2 -0
  188. package/views/2d/engine/webgl/TileGpuState.js +2 -0
  189. package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +2 -0
  190. package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +2 -0
  191. package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +2 -0
  192. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  193. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugContainer.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
  195. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  196. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  197. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  198. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  199. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  200. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  201. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  202. package/views/2d/layers/KMLLayerView2D.js +1 -1
  203. package/views/2d/layers/LayerView2D.js +1 -1
  204. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  205. package/views/2d/layers/MediaLayerView2D.js +1 -1
  206. package/views/2d/layers/RouteLayerView2D.js +1 -1
  207. package/views/2d/layers/TileLayerView2D.js +1 -1
  208. package/views/2d/layers/features/FeatureContainer.js +1 -1
  209. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  210. package/views/2d/layers/features/FeatureTilePresentStrategy.js +2 -0
  211. package/views/2d/layers/features/Processor.js +1 -1
  212. package/views/2d/layers/features/RenderState.js +1 -1
  213. package/views/2d/layers/features/aggregation/AAggregateSpatialIndex.js +1 -1
  214. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  215. package/views/2d/layers/features/aggregation/GridCell.js +1 -1
  216. package/views/2d/layers/features/aggregation/GridIndexCell.js +2 -0
  217. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  218. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  219. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  220. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  221. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  222. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  223. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  224. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  225. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  226. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  227. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  228. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  229. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  230. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  231. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  232. package/views/2d/layers/features/sources/FeatureSourceMessage.js +1 -1
  233. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  234. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  235. package/views/2d/layers/features/support/Hashed.js +2 -0
  236. package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
  237. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  238. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  239. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  240. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  241. package/views/2d/support/hitTestUtils.js +1 -1
  242. package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
  243. package/views/2d/tiling/TileCombinedCoverage.js +2 -0
  244. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  245. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +2 -0
  246. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  247. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  248. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  249. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +2 -0
  250. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  251. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  252. package/views/3d/analysis/Viewshed/ViewshedTool2.js +2 -0
  253. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +2 -0
  254. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  255. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  256. package/views/3d/environment/CloudyWeather.js +1 -1
  257. package/views/3d/environment/FoggyWeather.js +1 -1
  258. package/views/3d/environment/RainyWeather.js +1 -1
  259. package/views/3d/environment/SnowyWeather.js +1 -1
  260. package/views/3d/environment/SunnyWeather.js +1 -1
  261. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  262. package/views/3d/layers/graphics/StreamController.js +1 -1
  263. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  264. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  265. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  266. package/views/3d/webgl/ManagedColorAttachment.js +1 -1
  267. package/views/3d/webgl/ManagedDepthAttachment.js +1 -1
  268. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  269. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  270. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  271. package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
  272. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  273. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +11 -11
  274. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  275. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  276. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  277. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  278. package/views/3d/webgl-engine/effects/glow/Glow.js +2 -0
  279. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  280. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  281. package/views/3d/webgl-engine/effects/raymarching/{RayDistanceFalloff.glsl.js → DistanceFalloff.glsl.js} +2 -2
  282. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  283. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  284. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  285. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  286. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  287. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  288. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  289. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  290. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  291. package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
  292. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  293. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  294. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  295. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  296. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  297. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  298. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  299. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  300. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  301. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  302. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  303. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  304. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  305. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  306. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  307. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  308. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -7
  309. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  310. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
  311. package/views/VideoView.js +1 -1
  312. package/views/View2D.js +1 -1
  313. package/views/draw/support/GraphicMover.js +1 -1
  314. package/views/support/rasterHitTestUtils.js +1 -1
  315. package/views/support/waitForResources.js +1 -1
  316. package/views/video/VideoOperationalDataView.js +1 -1
  317. package/views/webgl/FramebufferObject.js +1 -1
  318. package/views/webgl/RenderingContext.js +1 -1
  319. package/views/webgl/Texture.js +1 -1
  320. package/views/webgl/textureUtils.js +1 -1
  321. package/widgets/BatchAttributeForm/css.js +1 -1
  322. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.d.ts +61 -0
  323. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +2 -0
  324. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  325. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  326. package/widgets/BatchAttributeForm/inputs/types.d.ts +9 -4
  327. package/widgets/BatchAttributeForm/templates/UtilityNetworkAssociationsElementTemplate.js +2 -0
  328. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  329. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  330. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  331. package/widgets/BatchAttributeForm.js +1 -1
  332. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  333. package/widgets/FeatureTable/Grid/Column.d.ts +17 -2
  334. package/widgets/FeatureTable/Grid/Column.js +1 -1
  335. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  336. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  337. package/widgets/FeatureTable/Grid/GroupColumn.d.ts +7 -1
  338. package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
  339. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +9 -1
  340. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  341. package/widgets/FeatureTable/support/types.d.ts +8 -0
  342. package/widgets/FeatureTable.js +1 -1
  343. package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +0 -1
  344. package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +0 -596
  345. package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +0 -1
  346. package/assets/esri/core/workers/chunks/5818f1f526577068d6ca.js +0 -2
  347. package/assets/esri/core/workers/chunks/5ec66e39e53c11e75179.js +0 -2
  348. package/assets/esri/core/workers/chunks/5f6fd20a7f4e80eafa25.js +0 -1
  349. package/assets/esri/core/workers/chunks/6d2abdb48e17b2b56599.js +0 -1
  350. package/assets/esri/core/workers/chunks/7cdd0492b2191df95102.js +0 -2
  351. package/assets/esri/core/workers/chunks/7e530e635325dba07864.js +0 -1
  352. package/assets/esri/core/workers/chunks/8f4cd30ce23e41c1a42c.js +0 -1
  353. package/assets/esri/core/workers/chunks/936f2b1332ece14d7c28.js +0 -2
  354. package/assets/esri/core/workers/chunks/983f6c8727fd9484718e.js +0 -1
  355. package/assets/esri/core/workers/chunks/bd8cb64b6e08839398f3.js +0 -1
  356. package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +0 -1
  357. package/layers/support/ParquetGeometryEncodingWkb.js +0 -2
  358. package/views/2d/engine/webgl/PooledUint32Array.js +0 -2
  359. package/views/2d/engine/webgl/cpuMapped/Buffer.js +0 -2
  360. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +0 -2
  361. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +0 -2
  362. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +0 -4
  363. /package/assets/esri/core/workers/chunks/{5ec66e39e53c11e75179.js.LICENSE.txt → 577cbc131b21c351fae5.js.LICENSE.txt} +0 -0
  364. /package/assets/esri/core/workers/chunks/{ff713926985a284f5d81.js.LICENSE.txt → a844547bf33a8527ee9f.js.LICENSE.txt} +0 -0
  365. /package/assets/esri/core/workers/chunks/{5818f1f526577068d6ca.js.LICENSE.txt → bb5f909a2f26fc6a21b0.js.LICENSE.txt} +0 -0
  366. /package/assets/esri/core/workers/chunks/{7cdd0492b2191df95102.js.LICENSE.txt → ded2f19a1685db2137f4.js.LICENSE.txt} +0 -0
  367. /package/assets/esri/core/workers/chunks/{936f2b1332ece14d7c28.js.LICENSE.txt → ee057c85cdf6beb5b012.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as i,ZEROS as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{glLayout as s}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import{isOITColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as n}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as m}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as c}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import{depthTest as f,blending as u}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZerosParams as h,stencilWriteMaskOn as d}from"../lib/StencilUtils.js";import{P as b}from"../../../../chunks/Path.glsl.js";import{advancedMRRFactors as g}from"./pbrUtils.js";import{polygonOffset as j}from"./PolygonOffset.js";import{makePipelineState as S,defaultColorWrite as v,defaultDepthWrite as y,frontFaceCullingParams as P}from"../../../webgl/renderState.js";class T extends n{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=i(),this.modelTransformation=null,this.mrrFactors=g,this.emissiveStrengthFromSymbol=0,this.emissiveSource=1,this.emissiveBaseColor=o}get emissiveStrength(){return this.emissiveStrengthFromSymbol}}let V=class extends c{constructor(e,r){super(e,r,s(x(r))),this.shader=new m(b,()=>import("./Path.glsl.js"))}initializePipeline(e){const{output:r,transparent:t,hasSlicePlane:i,doubleSidedMode:o,hasOccludees:s}=e,l=!a(r);return S({blending:t?u(r):null,culling:i&&!t&&0!==o?P:null,depthTest:f(r),depthWrite:l?y:null,colorWrite:v,stencilWrite:s?d:null,stencilTest:s?h:null,polygonOffset:j(e)})}};function x(e){const r=l().vec3f("position").vec4f16("profileVertexAndNormal").vec2i16("profileRight",{glNormalized:!0}).vec2i16("profileUp",{glNormalized:!0});return e.hasVVSize&&r.f32("sizeFeatureAttribute"),e.hasVVColor&&r.f32("colorFeatureAttribute"),e.hasVVOpacity&&r.f32("opacityFeatureAttribute"),p()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}V=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],V);export{T as PathPassParameters,V as PathTechnique,x as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as i,ZEROS as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{glLayout as s}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import{isOITColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as n}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as m}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as c}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import{depthTest as f,blending as u}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZeros as h,stencilWriteMaskOn as d}from"../lib/StencilUtils.js";import{P as b}from"../../../../chunks/Path.glsl.js";import{advancedMRRFactors as g}from"./pbrUtils.js";import{polygonOffset as j}from"./PolygonOffset.js";import{makePipelineState as S,defaultColorWrite as v,defaultDepthWrite as y,frontFaceCullingParams as P}from"../../../webgl/renderState.js";class T extends n{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=i(),this.modelTransformation=null,this.mrrFactors=g,this.emissiveStrengthFromSymbol=0,this.emissiveSource=1,this.emissiveBaseColor=o}get emissiveStrength(){return this.emissiveStrengthFromSymbol}}let V=class extends c{constructor(e,r){super(e,r,s(x(r))),this.shader=new m(b,()=>import("./Path.glsl.js"))}initializePipeline(e){const{output:r,transparent:t,hasSlicePlane:i,doubleSidedMode:o,hasOccludees:s}=e,l=!a(r);return S({blending:t?u(r):null,culling:i&&!t&&0!==o?P:null,depthTest:f(r),depthWrite:l?y:null,colorWrite:v,stencilWrite:s?d:null,stencilTest:s?h:null,polygonOffset:j(e)})}};function x(e){const r=l().vec3f("position").vec4f16("profileVertexAndNormal").vec2i16("profileRight",{glNormalized:!0}).vec2i16("profileUp",{glNormalized:!0});return e.hasVVSize&&r.f32("sizeFeatureAttribute"),e.hasVVColor&&r.f32("colorFeatureAttribute"),e.hasVVOpacity&&r.f32("opacityFeatureAttribute"),p()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}V=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],V);export{T as PathPassParameters,V as PathTechnique,x as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as d,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{isMoon as u,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as v}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as x}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlobalIllumination as T}from"../effects/globalIllumination/GlobalIllumination.js";import{GlowRenderNode as O}from"../effects/glow/GlowRenderNode.js";import{Haze as U}from"../effects/haze/Haze.js";import{Highlight as q}from"../effects/highlight/Highlight.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as L}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as k}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{Stars as W}from"../effects/stars/Stars.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as I}from"../lib/RenderingContext.js";import{RenderingContextOptions as G}from"../lib/RenderingContextOptions.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as V}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as X}from"./contextCache.js";import{removeLoadedShaderModules as Q}from"./renderUtils.js";import{ScreenshotManager as J,ScreenshotContext as K}from"./ScreenshotManager.js";import{contextCache as Y}from"./testUtils.js";import{noBudget as Z}from"../../../support/Scheduler.js";import{checkWebGLError as $}from"../../../webgl/checkWebGLError.js";let ee=class extends t{constructor(e,t){super(e),this.olidRenderHelper=C()?new H:null,this.waterTextures=new V,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new v(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new N(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new B(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),d(()=>this.waterTextures.updating,()=>this.requestRender(),h),d(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),l)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new J(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Z,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;if(new W({view:e}),u(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new x({view:e}),new R({view:e}),new U({view:e}),this.fog=new b({view:e}))),has("global-illumination")){const t=new T({view:e});this.test&&(this.test.globalIllumination=t)}else new F({view:e});new k({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new q({view:e}),new L({view:e}),new M({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const d=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let l=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=d(4*s,h,i.nearFar);l>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(l=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&l>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(l=s)}return l===Number.MAX_VALUE?void 0:l}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Q(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new K(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");$(n,!0),this._rctx=te(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function te(e,t){const r=new G(t);if(Y.enabled){let t=re.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new I(e,r),re.set(e,t),t.ref(),t)}return new I(e,r)}e([m({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([m({constructOnly:!0})],ee.prototype,"view",void 0),e([m({readOnly:!0})],ee.prototype,"componentObjectCollection",null),e([m()],ee.prototype,"_componentObjectCollection",void 0),e([m()],ee.prototype,"_needsUpdate",void 0),e([m()],ee.prototype,"_needsWaterReflectionUpdate",void 0),ee=e([f("esri.views.3d.webgl-engine.parts.RenderView")],ee);const re=X();export{ee as RenderView};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as d,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{isMoon as u,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as v}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as x}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlobalIllumination as T}from"../effects/globalIllumination/GlobalIllumination.js";import{Glow as O}from"../effects/glow/Glow.js";import{Haze as U}from"../effects/haze/Haze.js";import{Highlight as q}from"../effects/highlight/Highlight.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as L}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as k}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{Stars as W}from"../effects/stars/Stars.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as I}from"../lib/RenderingContext.js";import{RenderingContextOptions as G}from"../lib/RenderingContextOptions.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as V}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as X}from"./contextCache.js";import{removeLoadedShaderModules as Q}from"./renderUtils.js";import{ScreenshotManager as J,ScreenshotContext as K}from"./ScreenshotManager.js";import{contextCache as Y}from"./testUtils.js";import{noBudget as Z}from"../../../support/Scheduler.js";import{checkWebGLError as $}from"../../../webgl/checkWebGLError.js";let ee=class extends t{constructor(e,t){super(e),this.olidRenderHelper=C()?new H:null,this.waterTextures=new V,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new v(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new N(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new B(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),d(()=>this.waterTextures.updating,()=>this.requestRender(),h),d(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),l)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new J(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Z,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;if(new W({view:e}),u(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new x({view:e}),new R({view:e}),new U({view:e}),this.fog=new b({view:e}))),has("global-illumination")){const t=new T({view:e});this.test&&(this.test.globalIllumination=t)}else new F({view:e});new k({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new q({view:e}),new L({view:e}),new M({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const d=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let l=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=d(4*s,h,i.nearFar);l>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(l=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&l>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(l=s)}return l===Number.MAX_VALUE?void 0:l}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Q(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new K(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");$(n,!0),this._rctx=te(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function te(e,t){const r=new G(t);if(Y.enabled){let t=re.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new I(e,r),re.set(e,t),t.ref(),t)}return new I(e,r)}e([m({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([m({constructOnly:!0})],ee.prototype,"view",void 0),e([m({readOnly:!0})],ee.prototype,"componentObjectCollection",null),e([m()],ee.prototype,"_componentObjectCollection",void 0),e([m()],ee.prototype,"_needsUpdate",void 0),e([m()],ee.prototype,"_needsWaterReflectionUpdate",void 0),ee=e([f("esri.views.3d.webgl-engine.parts.RenderView")],ee);const re=X();export{ee as RenderView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{depthWrite as a,depthTest as c,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as m,stencilBaseAllZerosParams as u,stencilWriteMaskOn as f}from"../lib/StencilUtils.js";import{polygonOffset as d}from"../materials/PolygonOffset.js";import{VisualVariablePassParameters as h}from"../materials/VisualVariablePassParameters.js";import{C as g}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as j,defaultColorWrite as b,cullingParams as P}from"../../../webgl/renderState.js";class C extends h{constructor(){super(...arguments),this.color=t}}let S=class extends l{constructor(e,r){super(e,r,i(T(r))),this.shader=new s(g,()=>import("./ColorMaterial.glsl.js")),this.ignoreUnused=!0}_createPipeline(e,r){const{output:t,transparent:i,cullFace:o,draped:s,hasOccludees:l}=e;return j({blending:i?p(t,!1,e.emissionDimmingPass):null,culling:P(o),depthTest:s?null:c(t),depthWrite:a(e),colorWrite:b,stencilWrite:l?f:null,stencilTest:l?r?m:u:null,polygonOffset:d(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e,r){return r?this._occludeePipelineState:super.getPipeline(e)}};function T(e){const r=o().vec3f("position");return n()&&r.vec4u8("olidColor"),e.hasVVColor?r.f32("colorFeatureAttribute"):e.hasVertexColors&&r.vec4u8("color",{glNormalized:!0}),r.freeze()}S=e([r("esri.views.3d.webgl-engine.shaders.ColorMaterialTechnique")],S);export{C as ColorMaterialPassParameters,S as ColorMaterialTechnique,T as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{depthWrite as a,depthTest as c,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as m,stencilBaseAllZeros as u,stencilWriteMaskOn as f}from"../lib/StencilUtils.js";import{polygonOffset as d}from"../materials/PolygonOffset.js";import{VisualVariablePassParameters as h}from"../materials/VisualVariablePassParameters.js";import{C as g}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as j,defaultColorWrite as b,cullingParams as P}from"../../../webgl/renderState.js";class C extends h{constructor(){super(...arguments),this.color=t}}let S=class extends l{constructor(e,r){super(e,r,i(T(r))),this.shader=new s(g,()=>import("./ColorMaterial.glsl.js")),this.ignoreUnused=!0}_createPipeline(e,r){const{output:t,transparent:i,cullFace:o,draped:s,hasOccludees:l}=e;return j({blending:i?p(t,!1,e.emissionDimmingPass):null,culling:P(o),depthTest:s?null:c(t),depthWrite:a(e),colorWrite:b,stencilWrite:l?f:null,stencilTest:l?r?m:u:null,polygonOffset:d(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e,r){return r?this._occludeePipelineState:super.getPipeline(e)}};function T(e){const r=o().vec3f("position");return n()&&r.vec4u8("olidColor"),e.hasVVColor?r.f32("colorFeatureAttribute"):e.hasVertexColors&&r.vec4u8("color",{glNormalized:!0}),r.freeze()}S=e([r("esri.views.3d.webgl-engine.shaders.ColorMaterialTechnique")],S);export{C as ColorMaterialPassParameters,S as ColorMaterialTechnique,T as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as c}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as h}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as u}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as m}from"../effects/geometry/olidUtils.js";import{depthWrite as p,blending as d,depthTest as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as g,stencilBaseAllZerosParams as v,stencilWriteMaskOn as b}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as S}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as y}from"../materials/pbrUtils.js";import{polygonOffset as j}from"../materials/PolygonOffset.js";import{D as P}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as T,cullingParams as x,defaultColorWrite as C}from"../../../webgl/renderState.js";import{alphaCutoff as O}from"../../../../webscene/support/AlphaCutoff.js";class D extends a{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=y,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=O,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class V extends c{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let w=class extends u{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(S(t)))),super(e,t,i),this.shader=new h(P,()=>import("./DefaultMaterial.glsl.js")),this.ignoreUnused=!0}_makePipeline(e,t){const{output:i,transparent:s,cullFace:r,customDepthTest:o,hasOccludees:l}=e;return T({blending:s?d(i,!1,e.emissionDimmingPass):null,culling:M(e)?x(r):null,depthTest:f(i,A(o)),depthWrite:p(e),colorWrite:C,stencilWrite:l?b:null,stencilTest:l?t?g:v:null,polygonOffset:j(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function A(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function M(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function z(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&m()&&t.vec4u8("olidColor"),t}w=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],w);export{V as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,w as DefaultMaterialTechnique,z as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as c}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as h}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as u}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as m}from"../effects/geometry/olidUtils.js";import{depthWrite as p,blending as d,depthTest as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as g,stencilBaseAllZeros as v,stencilWriteMaskOn as b}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as S}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as y}from"../materials/pbrUtils.js";import{polygonOffset as j}from"../materials/PolygonOffset.js";import{D as P}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as T,cullingParams as x,defaultColorWrite as C}from"../../../webgl/renderState.js";import{alphaCutoff as O}from"../../../../webscene/support/AlphaCutoff.js";class D extends a{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=y,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=O,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class V extends c{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let w=class extends u{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(S(t)))),super(e,t,i),this.shader=new h(P,()=>import("./DefaultMaterial.glsl.js")),this.ignoreUnused=!0}_makePipeline(e,t){const{output:i,transparent:s,cullFace:r,customDepthTest:o,hasOccludees:l}=e;return T({blending:s?d(i,!1,e.emissionDimmingPass):null,culling:M(e)?x(r):null,depthTest:f(i,A(o)),depthWrite:p(e),colorWrite:C,stencilWrite:l?b:null,stencilTest:l?t?g:v:null,polygonOffset:j(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function A(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function M(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function z(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&m()&&t.vec4u8("olidColor"),t}w=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],w);export{V as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,w as DefaultMaterialTechnique,z as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as l,depthTest as o,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as a,stencilBaseAllZerosParams as p,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{PositionUvLayout as m}from"../materials/DefaultLayouts.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{I as d}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as h}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,i(P(t))),this.shader=new r(d,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{output:i,hasOccludees:r,cullFace:s}=e;return f({blending:n(i,!0,e.emissionDimmingPass),culling:h(s),depthTest:o(i),depthWrite:l(e),colorWrite:g,stencilWrite:r?c:null,stencilTest:r?t?a:p:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipeline:super.getPipeline(e)}};function P(e){let t=m;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}j=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],j);export{j as ImageMaterialTechnique,P as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as l,depthTest as o,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as a,stencilBaseAllZeros as p,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{PositionUvLayout as m}from"../materials/DefaultLayouts.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{I as d}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as h}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,i(P(t))),this.shader=new r(d,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{output:i,hasOccludees:r,cullFace:s}=e;return f({blending:n(i,!0,e.emissionDimmingPass),culling:h(s),depthTest:o(i),depthWrite:l(e),colorWrite:g,stencilWrite:r?c:null,stencilTest:r?t?a:p:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipeline:super.getPipeline(e)}};function P(e){let t=m;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}j=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],j);export{j as ImageMaterialTechnique,P as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as o,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as p,stencilBaseAllZerosParams as u,stencilWriteMaskOn as a,stencilToolTransparentOccluderParams as d,depthCompareAlways as h,stencilToolMaskOccluderParams as m,stencilWriteMaskOff as f,depthCompareLess as P}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as T,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as W}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,i){super(e,i,t(S(i))),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,i){const{output:t,space:r,hasOccludees:l}=e;return T({blending:c(t,!1,e.emissionDimmingPass),depthTest:0===r?null:o(t),depthWrite:n(e),colorWrite:b,stencilWrite:l?a:null,stencilTest:l?i?p:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:f,stencilTest:m}),this._occluderPipelineMaskWrite=T({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:p})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){return i?this._occludeePipelineState:11===e.occluder?this._occluderPipelineTransparent??super.getPipeline(e):10===e.occluder?this._occluderPipelineOpaque??super.getPipeline(e):this._occluderPipelineMaskWrite??super.getPipeline(e)}};function S(e){const i=r().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?i.f32("colorFeatureAttribute"):i.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&i.f32("opacityFeatureAttribute"),e.hasVVSize?i.f32("sizeFeatureAttribute"):i.f16("size"),e.worldSpace&&i.vec3f16("normal"),i.freeze()}_=e([i("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],_);export{_ as LineMarkerTechnique,S as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as o,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as u,stencilWriteMaskOn as a,stencilToolTransparentOccluder as d,depthCompareAlways as h,stencilToolMaskOccluder as m,stencilWriteMaskOff as f,depthCompareLess as P}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as T,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as W}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,i){super(e,i,t(S(i))),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,i){const{output:t,space:r,hasOccludees:l}=e;return T({blending:c(t,!1,e.emissionDimmingPass),depthTest:0===r?null:o(t),depthWrite:n(e),colorWrite:b,stencilWrite:l?a:null,stencilTest:l?i?p:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:f,stencilTest:m}),this._occluderPipelineMaskWrite=T({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:p})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){return i?this._occludeePipelineState:11===e.occluder?this._occluderPipelineTransparent??super.getPipeline(e):10===e.occluder?this._occluderPipelineOpaque??super.getPipeline(e):this._occluderPipelineMaskWrite??super.getPipeline(e)}};function S(e){const i=r().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?i.f32("colorFeatureAttribute"):i.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&i.f32("opacityFeatureAttribute"),e.hasVVSize?i.f32("sizeFeatureAttribute"):i.f16("size"),e.worldSpace&&i.vec3f16("normal"),i.freeze()}_=e([i("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],_);export{_ as LineMarkerTechnique,S as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as s}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as n}from"../lib/OrderIndependentTransparency.js";import{polygonOffset as m}from"../materials/PolygonOffset.js";import{M as p}from"../../../../chunks/MeasurementArrow.glsl.js";import{PrimitiveType as l}from"../../../webgl/enums.js";import{makePipelineState as a,defaultColorWrite as f,defaultDepthWrite as u}from"../../../webgl/renderState.js";let c=class extends i{constructor(e,r){super(e,r,s(d)),this.shader=new t(p,()=>import("./MeasurementArrow.glsl.js")),this.primitiveType=l.TRIANGLE_STRIP}initializePipeline(e){const{output:r,transparent:s}=e;return a({blending:s?n(r,!1,e.emissionDimmingPass):null,polygonOffset:m(e),depthTest:{func:513},depthWrite:e.emissionDimmingPass?null:u,colorWrite:f})}};c=e([r("esri.views.3d.webgl-engine.shaders.MeasurementArrowTechnique")],c);const d=o().vec3f("position").vec3f("normal").vec2f("uv0").f32("length");export{c as MeasurementArrowTechnique,d as layout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,blending as m}from"../lib/OrderIndependentTransparency.js";import{polygonOffset as p}from"../materials/PolygonOffset.js";import{M as a}from"../../../../chunks/MeasurementArrow.glsl.js";import{PrimitiveType as l}from"../../../webgl/enums.js";import{makePipelineState as f,defaultColorWrite as u}from"../../../webgl/renderState.js";let c=class extends i{constructor(e,r){super(e,r,o(d)),this.shader=new t(a,()=>import("./MeasurementArrow.glsl.js")),this.primitiveType=l.TRIANGLE_STRIP}initializePipeline(e){const{output:r,transparent:o}=e;return f({blending:o?m(r,!1,e.emissionDimmingPass):null,polygonOffset:p(e),depthTest:{func:513},depthWrite:n(e),colorWrite:u})}};c=e([r("esri.views.3d.webgl-engine.shaders.MeasurementArrowTechnique")],c);const d=s().vec3f("position").vec3f("normal").vec2f("uv0").f32("length");export{c as MeasurementArrowTechnique,d as layout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";class s extends r{constructor(){super(...arguments),this.enableOITOffset=!1,this.transparent=!1,this.polygonOffset=3,this.discardInvisibleFragments=!0,this.draped=!1,this.emissionSource=0,this.snowCover=!1,this.textureCoordinateType=0}}e([t()],s.prototype,"enableOITOffset",void 0),e([t()],s.prototype,"transparent",void 0);export{s as MeasurementArrowTechniqueConfiguration};
2
+ import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";class r extends i{constructor(){super(...arguments),this.enableOITOffset=!1,this.transparent=!1,this.writeDepth=!0,this.polygonOffset=3,this.discardInvisibleFragments=!0,this.draped=!1,this.emissionSource=0,this.snowCover=!1,this.textureCoordinateType=0}}t([e()],r.prototype,"enableOITOffset",void 0),t([e()],r.prototype,"transparent",void 0),t([e()],r.prototype,"writeDepth",void 0);export{r as MeasurementArrowTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{stencilToolMaskBaseParams as l,stencilBaseAllZerosParams as o,stencilWriteMaskOn as n,depthCompareLess as a}from"../lib/StencilUtils.js";import{PositionColorGLLayout as p,PositionGLLayout as u}from"../materials/DefaultLayouts.js";import{N as c}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as m}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as d,defaultDepthWrite as f,unpremultipliedAlphaToPremultipliedAlpha as j}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?p:u),this.shader=new t(c,()=>import("./NativeLine.glsl.js")),this.primitiveType=m.LINES}initializePipeline(e){const{hasOccludees:r,output:t,transparent:s}=e,p=(e,i=null,t=null)=>h({blending:i,depthTest:a,depthWrite:t,colorWrite:d,stencilWrite:r?n:null,stencilTest:r?e?l:o:null});return i(t)?(this._occludeePipeline=p(!0,s?j:null,f),p(!1,s?j:null,f)):p(!1)}getPipeline(e,r){return r?this._occludeePipeline:super.getPipeline(e)}};g=e([r("esri.views.3d.webgl-engine.shaders.NativeLineTechnique")],g);export{g as NativeLineTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{stencilToolMaskBase as l,stencilBaseAllZeros as o,stencilWriteMaskOn as n,depthCompareLess as a}from"../lib/StencilUtils.js";import{PositionColorGLLayout as p,PositionGLLayout as u}from"../materials/DefaultLayouts.js";import{N as c}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as m}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as d,defaultDepthWrite as f,unpremultipliedAlphaToPremultipliedAlpha as j}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?p:u),this.shader=new t(c,()=>import("./NativeLine.glsl.js")),this.primitiveType=m.LINES}initializePipeline(e){const{hasOccludees:r,output:t,transparent:s}=e,p=(e,i=null,t=null)=>h({blending:i,depthTest:a,depthWrite:t,colorWrite:d,stencilWrite:r?n:null,stencilTest:r?e?l:o:null});return i(t)?(this._occludeePipeline=p(!0,s?j:null,f),p(!1,s?j:null,f)):p(!1)}getPipeline(e,r){return r?this._occludeePipeline:super.getPipeline(e)}};g=e([r("esri.views.3d.webgl-engine.shaders.NativeLineTechnique")],g);export{g as NativeLineTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as l,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as p,stencilBaseAllZerosParams as a,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{P as m}from"../../../../chunks/Pattern.glsl.js";import{getLayout as d}from"./PatternLayouts.js";import{makePipelineState as h,defaultColorWrite as f,cullingParams as P}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,t){super(e,t,r(d(t))),this.shader=new i(m,()=>import("./Pattern.glsl.js")),this.ignoreUnused=!0}_setPipelineState(e,t){const{output:r,cullFace:i,draped:s,hasOccludees:m}=e;return h({blending:n(r),culling:P(i),depthTest:s?null:l(r),depthWrite:o(e),colorWrite:f,stencilWrite:m?c:null,stencilTest:m?t?p:a:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};g=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],g);export{g as PatternTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as l,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as a,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{P as m}from"../../../../chunks/Pattern.glsl.js";import{getLayout as d}from"./PatternLayouts.js";import{makePipelineState as h,defaultColorWrite as f,cullingParams as P}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,t){super(e,t,r(d(t))),this.shader=new i(m,()=>import("./Pattern.glsl.js")),this.ignoreUnused=!0}_setPipelineState(e,t){const{output:r,cullFace:i,draped:s,hasOccludees:m}=e;return h({blending:n(r),culling:P(i),depthTest:s?null:l(r),depthWrite:o(e),colorWrite:f,stencilWrite:m?c:null,stencilTest:m?t?p:a:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};g=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],g);export{g as PatternTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{stencilBaseAllZerosParams as o,stencilWriteMaskOn as i}from"../lib/StencilUtils.js";import{b as n}from"../../../../chunks/PointRenderer.glsl.js";import{DataType as l}from"../../../webgl/enums.js";import{makePipelineState as c,defaultColorWrite as m,defaultDepthWrite as p}from"../../../webgl/renderState.js";import{VertexElementDescriptor as d}from"../../../webgl/VertexElementDescriptor.js";let a=class extends t{constructor(e,r){super(e,r,f),this.shader=new s(n,()=>import("./PointRenderer.glsl.js"))}initializePipeline(e){return c({depthTest:{func:513},depthWrite:p,colorWrite:m,stencilWrite:e.hasOccludees?i:null,stencilTest:e.hasOccludees?o:null})}};a=e([r("esri.views.3d.webgl-engine.shaders.PointRendererTechnique")],a);const h=[new d("position",3,l.FLOAT,0,12)],u=[new d("color",3,l.UNSIGNED_BYTE,0,3,!0)],f=h.concat(u);export{a as PointRendererTechnique,u as colorsLayout,h as positionsLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{stencilBaseAllZeros as o,stencilWriteMaskOn as i}from"../lib/StencilUtils.js";import{b as n}from"../../../../chunks/PointRenderer.glsl.js";import{DataType as l}from"../../../webgl/enums.js";import{makePipelineState as c,defaultColorWrite as m,defaultDepthWrite as p}from"../../../webgl/renderState.js";import{VertexElementDescriptor as d}from"../../../webgl/VertexElementDescriptor.js";let a=class extends t{constructor(e,r){super(e,r,f),this.shader=new s(n,()=>import("./PointRenderer.glsl.js"))}initializePipeline(e){return c({depthTest:{func:513},depthWrite:p,colorWrite:m,stencilWrite:e.hasOccludees?i:null,stencilTest:e.hasOccludees?o:null})}};a=e([r("esri.views.3d.webgl-engine.shaders.PointRendererTechnique")],a);const h=[new d("position",3,l.FLOAT,0,12)],u=[new d("color",3,l.UNSIGNED_BYTE,0,3,!0)],f=h.concat(u);export{a as PointRendererTechnique,u as colorsLayout,h as positionsLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{depthWrite as o,depthTest as c,blending as u}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as p,stencilBaseAllZerosParams as a,stencilWriteMaskOn as d,stencilToolTransparentOccluderParams as f,depthCompareAlways as m,stencilToolMaskOccluderParams as h,stencilWriteMaskOff as g,depthCompareLess as b}from"../lib/StencilUtils.js";import{getRibbonLineLayerPolygonOffset as P}from"../materials/PolygonOffset.js";import{R as T}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as W}from"../../../webgl/enums.js";import{makePipelineState as j,defaultColorWrite as v,unpremultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,t){super(e,t,i(y(t))),this.shader=new l(T,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=t.wireframe?W.LINES:W.TRIANGLE_STRIP}_makePipelineState(e,t){const{output:i,hasOccludees:r}=e;return j({blending:u(i,!1,e.emissionDimmingPass),depthTest:c(i),depthWrite:o(e),colorWrite:v,stencilWrite:r?d:null,stencilTest:r?t?p:a:null,polygonOffset:P(e)})}initializePipeline(e){if(e.occluder){const{hasOccludees:t}=e;this._occluderPipelineTransparent=j({blending:S,polygonOffset:P(e),depthTest:m,depthWrite:null,colorWrite:v,stencilWrite:null,stencilTest:t?f:null}),this._occluderPipelineOpaque=j({blending:S,polygonOffset:P(e),depthTest:t?m:b,depthWrite:null,colorWrite:v,stencilWrite:t?g:null,stencilTest:t?h:null}),this._occluderPipelineMaskWrite=j({blending:null,polygonOffset:P(e),depthTest:b,depthWrite:null,colorWrite:null,stencilWrite:t?d:null,stencilTest:t?p:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(t)return this._occludeePipeline;switch(e.occluder){case 11:return this._occluderPipelineTransparent??super.getPipeline(e);case 10:return this._occluderPipelineOpaque??super.getPipeline(e);default:e.occluder;case void 0:case null:return this._occluderPipelineMaskWrite??super.getPipeline(e)}}};function y(e){const t=r().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f32("size"),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),n()&&t.vec4u8("olidColor"),e.hasAnimation&&t.vec4f16("timeStamps"),t}_=e([t("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],_);export{_ as RibbonLineTechnique,y as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{depthWrite as o,depthTest as c,blending as u}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as a,stencilWriteMaskOn as d,stencilToolTransparentOccluder as f,depthCompareAlways as m,stencilToolMaskOccluder as h,stencilWriteMaskOff as g,depthCompareLess as b}from"../lib/StencilUtils.js";import{getRibbonLineLayerPolygonOffset as P}from"../materials/PolygonOffset.js";import{R as T}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as W}from"../../../webgl/enums.js";import{makePipelineState as j,defaultColorWrite as v,unpremultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,t){super(e,t,i(y(t))),this.shader=new l(T,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=t.wireframe?W.LINES:W.TRIANGLE_STRIP}_makePipelineState(e,t){const{output:i,hasOccludees:r}=e;return j({blending:u(i,!1,e.emissionDimmingPass),depthTest:c(i),depthWrite:o(e),colorWrite:v,stencilWrite:r?d:null,stencilTest:r?t?p:a:null,polygonOffset:P(e)})}initializePipeline(e){if(e.occluder){const{hasOccludees:t}=e;this._occluderPipelineTransparent=j({blending:S,polygonOffset:P(e),depthTest:m,depthWrite:null,colorWrite:v,stencilWrite:null,stencilTest:t?f:null}),this._occluderPipelineOpaque=j({blending:S,polygonOffset:P(e),depthTest:t?m:b,depthWrite:null,colorWrite:v,stencilWrite:t?g:null,stencilTest:t?h:null}),this._occluderPipelineMaskWrite=j({blending:null,polygonOffset:P(e),depthTest:b,depthWrite:null,colorWrite:null,stencilWrite:t?d:null,stencilTest:t?p:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(t)return this._occludeePipeline;switch(e.occluder){case 11:return this._occluderPipelineTransparent??super.getPipeline(e);case 10:return this._occluderPipelineOpaque??super.getPipeline(e);default:e.occluder;case void 0:case null:return this._occluderPipelineMaskWrite??super.getPipeline(e)}}};function y(e){const t=r().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f32("size"),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),n()&&t.vec4u8("olidColor"),e.hasAnimation&&t.vec4f16("timeStamps"),t}_=e([t("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],_);export{_ as RibbonLineTechnique,y as getLayout};
@@ -1,8 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{invertOrIdentity as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{If as r,glsl as o}from"../core/shaderModules/glsl.js";import{Matrix4BindUniform as t}from"../core/shaderModules/Matrix4BindUniform.js";function a(i,a={needUVs:!0,needEyeDirection:!0}){i.attributes.add("position","vec2"),i.varyings.add("worldRay","vec3");const{needUVs:n,needEyeDirection:c}=a;n&&i.varyings.add("uv","vec2"),c&&i.varyings.add("eyeDir","vec3"),i.vertex.uniforms.add(new t("inverseProjectionMatrix",e=>e.camera.inverseProjectionMatrix),new t("inverseViewMatrix",i=>e(s,i.camera.viewMatrix))),i.vertex.main.add(o`
3
- vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1.0, 1.0)).xyz;
4
- ${r(c,"eyeDir = posViewNear;")}
5
- worldRay = (inverseViewMatrix * vec4(posViewNear, 0)).xyz;
6
- ${r(n,"uv = position * 0.5 + vec2(0.5);")}
7
- gl_Position = vec4(position, 1, 1);
8
- `)}const s=i();export{a as ScreenSpacePassAtmosphere};
2
+ import{invertOrIdentity as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{Matrix4BindUniform as r}from"../core/shaderModules/Matrix4BindUniform.js";function o(i,o={needUVs:!0,needEyeDirection:!0}){i.attributes.add("position","vec2"),i.varyings.add("worldRay","vec3");const{needUVs:a,needEyeDirection:t}=o;i.vertex.uniforms.add(new r("inverseProjectionMatrix",e=>e.camera.inverseProjectionMatrix),new r("inverseViewMatrix",i=>e(n,i.camera.viewMatrix))).main.add("\n gl_Position = vec4(position, 1, 1);\n\n vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1.0, 1.0)).xyz;\n worldRay = (inverseViewMatrix * vec4(posViewNear, 0)).xyz;\n "),a&&(i.varyings.add("uv","vec2"),i.vertex.main.add("uv = position * 0.5 + vec2(0.5);")),t&&(i.varyings.add("eyeDir","vec3"),i.vertex.main.add("eyeDir = posViewNear;"))}const n=i();export{o as ScreenSpacePassAtmosphere};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{a as o}from"../../../../chunks/ShadowCastVisualize.glsl.js";import{PrimitiveType as t}from"../../../webgl/enums.js";import{makePipelineState as a,defaultColorWrite as l,premultipliedAlpha as n}from"../../../webgl/renderState.js";let h=class extends i{constructor(){super(...arguments),this.shader=new s(o,()=>import("./ShadowCastVisualize.glsl.js")),this.primitiveType=t.TRIANGLE_STRIP}initializePipeline(){return a({blending:n,colorWrite:l,depthTest:null,depthWrite:null})}};h=e([r("esri.views.3d.webgl-engine.shaders.ShadowCastVisualizeTechnique")],h);export{h as ShadowCastVisualizeTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as s}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{a as t}from"../../../../chunks/ShadowCastVisualize.glsl.js";import{PrimitiveType as o}from"../../../webgl/enums.js";import{makePipelineState as a,defaultColorWrite as l,premultipliedAlpha as n,simpleStencilTestParams as h}from"../../../webgl/renderState.js";let c=class extends i{constructor(){super(...arguments),this.shader=new r(t,()=>import("./ShadowCastVisualize.glsl.js")),this.primitiveType=o.TRIANGLE_STRIP}initializePipeline(){return a({blending:n,colorWrite:l,depthTest:null,depthWrite:null,stencilTest:this._configuration.useMask?h(0,255,{compare:517,fail:7680,zFail:7680,zPass:7680}):null})}};c=e([s("esri.views.3d.webgl-engine.shaders.ShadowCastVisualizeTechnique")],c);export{c as ShadowCastVisualizeTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import{parameter as i,ShaderTechniqueConfiguration as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends t{constructor(){super(...arguments),this.visualization=0}}o([i({count:4})],r.prototype,"visualization",void 0);export{r as ShadowCastVisualizeTechniqueConfiguration};
2
+ import{__decorate as o}from"tslib";import{parameter as i,ShaderTechniqueConfiguration as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class s extends t{constructor(){super(...arguments),this.visualization=0,this.useMask=!1}}o([i({count:4})],s.prototype,"visualization",void 0),o([i()],s.prototype,"useMask",void 0);export{s as ShadowCastVisualizeTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import{EventedMixin as r}from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import{EsriPromiseMixin as a}from"../core/Promise.js";import{watch as n,syncAndInitial as l,whenOnce as p,when as m}from"../core/reactiveUtils.js";import{property as h,cast as d,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import{create as f,fromValues as y}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import u from"../geometry/Extent.js";import j from"../geometry/Point.js";import w from"../geometry/SpatialReference.js";import{load as b,execute as v}from"../geometry/operators/projectOperator.js";import _ from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as M}from"../layers/support/MediaElementView.js";import S from"../layers/support/TileInfo.js";import C from"../layers/support/VideoElement.js";import{DOMContainer as V}from"./DOMContainer.js";import{Viewport2DBaseMixin as x}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as E}from"./Viewport2DMixin.js";import G from"./2d/AnimationManager.js";import P from"./2d/MapViewConstraints.js";import"../core/RandomLCG.js";import"../core/Logger.js";import"../core/has.js";import"../core/scheduling.js";import"../core/mathUtils.js";import"../config.js";import"../symbols/cim/defaultCIMValues.js";import"../core/floatRGBA.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"../symbols/Font.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/dimensions/effects/LinearDimensionArrowEffect.js";import"../symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionLineEffect.js";import"../symbols/dimensions/effects/LinearDimensionPointEffect.js";import"../symbols/dimensions/effects/LinearDimensionTextEffect.js";import"../symbols/cim/constants.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as D}from"./2d/engine/Container.js";import"./2d/engine/webgl/shaders/BitBlitPrograms.js";import"./webgl/enums.js";import"./webgl/Program.js";import"./webgl/Util.js";import"./webgl/VertexAttributeLayouts.js";import"./webgl/BufferObject.js";import"../request.js";import"../core/urlUtils.js";import"./webgl/Texture.js";import"../core/pbf.js";import"./2d/engine/webgl/shaders/StencilPrograms.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"./2d/engine/webgl/shaders/HighlightPrograms.js";import"./webgl/FramebufferObject.js";import"../Graphic.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"./2d/engine/webgl/meshing/SimpleMesh.js";import"./webgl/Renderbuffer.js";import"./2d/engine/webgl/PooledUint32Array.js";import"./2d/engine/webgl/Profiler.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"./2d/engine/webgl/number.js";import"./2d/engine/webgl/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/mesh/templates/templateUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../geometry/support/aaBoundingBox.js";import"../geometry/support/spatialReferenceUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../core/sql/UnknownTimeZone.js";import"luxon";import"../intl/locale.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/animations/instructions.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/checkWebGLError.js";import"./webgl/renderState.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as R}from"./2d/engine/ManagedCanvas.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"./2d/engine/transitions/FadeTransition.js";import"./2d/engine/webgl/meshing/definitions.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"./2d/LabelManager.js";import"./2d/layers/graphics/GraphicsView2D.js";import"./2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"./2d/engine/webgl/AFeatureTile.js";import"./2d/engine/webgl/DisplayEntity.js";import"./2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"./2d/engine/webgl/cpuMapped/MappedMesh.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtils.js";import"./2d/layers/support/util.js";import q from"./2d/navigation/MapViewNavigation.js";import"../core/asyncUtils.js";import"../core/support/UpdatingHandles.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../core/units.js";import"../geometry/ellipsoidUtils.js";import"../geometry/spatialReferenceEllipsoidUtils.js";import"../geometry/operators/support/GeographicTransformation.js";import"../geometry/projection/projectors.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import"../geometry/support/Ellipsoid.js";import{ViewStateManager as z}from"./2d/ViewStateManager.js";import T from"./2d/engine/webgl/Overlay.js";import O from"./2d/engine/webgl/OverlayContainer.js";import L from"./navigation/Navigation.js";import W from"./ui/DefaultUI.js";import A from"./ui/video/DefaultUIVideo.js";const U=new t("#000");let F;async function H(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);F=e}const k=.01,B=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let I=class extends(E(x(V(r(a(s)))))){constructor(e){super(e),this._isValid=!1,this._readyCycleForced=!1,this._prevZoomEnabled=!1,this._prevRotationEnabled=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!1,this.map=null,this.navigation=new L,this.ready=!1,this.spatialReference=new w({wkid:0}),this.stateManager=new z({constraints:new P({view:this,minScale:1,maxScale:k})}),this.type="2d",this.ui=new A,this.view2dType="video",this.addHandles([n(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),n(()=>this.videoSize,([e,t])=>{this._extent&&e&&t&&(this._extent.xmax=e,this._extent.ymax=t)}),n(()=>this.size,e=>{this._operationalDataView&&this._operationalDataView.stateManager.resize(e[0],e[1])}),n(()=>[this.layer?.frameEffect,this._effectsContainer],()=>{this._effectsContainer&&(this._effectsContainer.effect=this.layer?.frameEffect??null)},l)])}initialize(){this._prevZoomEnabled="zoom"===this.navigation.actionMap.mouseWheel&&this.ui.components.includes("zoom"),this._prevRotationEnabled="rotate"===this.navigation.actionMap.dragSecondary&&this.ui.components.includes("compass"),this.addHandles([n(()=>[this.operationalDataVisible,this.childStage],()=>{this.childStage&&(this.childStage.videoScreenRenderer.visible=this.operationalDataVisible),this.operationalDataVisible&&(this.scale=1,this.rotation=0),this.navigation&&(this._prevZoomEnabled&&(this.navigation.actionMap.mouseWheel=this.operationalDataVisible?"none":"zoom",this.navigation.actionMap.dragPrimary=this.operationalDataVisible?"none":"pan",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"zoom"!==e):[...new Set([...this.ui.components,"zoom"])])),this._prevRotationEnabled&&(this.navigation.actionMap.dragSecondary=this.operationalDataVisible?"none":"rotate",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"compass"!==e):[...new Set([...this.ui.components,"compass"])])))},l)]),this.addResolvingPromise(H().then(()=>(this._isValid=!0,p(()=>this.ready))))}destroy(){this._teardown(),this.removeAllHandles(),this._set("preconditionsReady",!1),this.frameTask=o(this.frameTask),this.goToManager.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get constraintsInfo(){return{lods:null,spatialReference:this.spatialReference}}get layer(){return this._get("layer")}set layer(e){e!==this._get("layer")&&(this.constructed&&!this.destroyed&&(this._forceReadyCycle(),this.addResolvingPromise(p(()=>this.ready))),this._set("layer",e))}get preconditionsReady(){return!(!this._isValid||this._readyCycleForced||0===this.width||0===this.height||0===this.videoSize[0]||0===this.videoSize[1])}get rendering(){return this.stage?.renderRequested??!1}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get videoSize(){if(!this.layer?.videoWidth||!this.layer?.videoHeight)return[0,0];const[e,t]=this.size,i=(this.layer?.videoWidth||0)/(this.layer?.videoHeight||0),s=t*i,r=e/i;return e/t>=1?i>=1?s<=e?[s,t]:[e,r]:r<=t?[e,r]:[s,t]:i>=1?r<=t?[e,r]:[s,t]:s<=e?[s,t]:[e,r]}async hitTest(e,t){if(!this._operationalDataView||!this._operationalDataView.ready)return{screenPoint:e,results:[]};const i=this._operationalDataView.videoToMap(e);if(!i)return{screenPoint:e,results:[]};const s=this._operationalDataView.state.toScreen(f(),i);return this._operationalDataView.hitTest({x:s[0],y:s[1]},t)}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:U,groundControlPoints:()=>this._groundControlPoints(),getSize:()=>this.videoSize},i=new F(this.surface,t,new R(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new G({view:this});this._set("animationManager",s);const r=new q({view:this,animationManager:s});this._set("mapViewNavigation",r),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){this.frameTask?.stop(),this.stationaryManager?.clear(),this.stage?.destroy(),this.stage=null,this._videoElementView=null,this._overlayContainer?.removeAllChildren(),this._overlayContainer=null,this.removeHandles("video-view"),this._set("ready",!1),this.stateManager?.ready&&this.stateManager.teardown()}_getViewpoint(){return new i({targetGeometry:new j({x:this.videoSize[0]/2,y:this.videoSize[1]/2,spatialReference:this.spatialReference}),scale:1})}_prepareStage(e){this.addHandles([n(()=>this.stationary,t=>e.stationary=t,l),n(()=>this.state.id,()=>e.state=this.state,l),n(()=>this.renderingOptions,t=>e.renderingOptions=t,l)],"video-view"),this._extent=new u({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new M({element:new C({video:this.layer?.videoElement,georeference:new _({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new T(this._videoElementView);this._overlayContainer=new O,this._overlayContainer.addChild(t),this._effectsContainer=new D,this._effectsContainer.addChild(this._overlayContainer),this.stage.addChild(this._effectsContainer);const i=document.createElement("div");i.classList.add("esri-video-poster"),this.container?.classList.add("esri-video-view"),this.container?.appendChild(i)}_prepareChildStage(e){this.addHandles([n(()=>this.map,async t=>{if(!t)return;const{default:i}=await import("./video/VideoOperationalDataView.js");this._operationalDataView=new i({stage:e,layerViewFilter:e=>new Set(B).has(e.type),width:this.size[0],height:this.size[1],map:t,groundControlPoints:()=>this._groundControlPoints(),getVideoResolution:()=>y(this.layer?.videoWidth||0,this.layer?.videoHeight||0),getSize:()=>this.size}),p(()=>this._operationalDataView?.ready).then(()=>{e.videoScreenRenderer.visible=this.operationalDataVisible})},l),n(()=>this.layer?.groundControlPoints,async()=>{if(!this.layer?.groundControlPoints||!e.state)return;const t=this.layer.groundControlPoints,i=t?.length;if(!i)return;await b();const s=new Array(i),r=e.state.spatialReference;for(let e=0;e<i;e++){const{lat:i,lon:o}=t[e];s[e]=v(new j(o,i),r)}let o=1/0,a=1/0,n=-1/0,l=-1/0;for(const e of s)o=Math.min(o,e.x),a=Math.min(a,e.y),n=Math.max(n,e.x),l=Math.max(l,e.y);const p=u.fromJSON({xmin:o,ymin:a,xmax:n,ymax:l,spatialReference:r});await(this._operationalDataView?.goTo(p,{animate:!1}).catch(()=>{}))},l)])}_updateConstraints(){this._updateZoomConstraints(),this._updatePanConstraints()}_updateZoomConstraints(){const e=this.videoSize,t=Math.max(e[0]/this.size[0],e[1]/this.size[1]),i=[];for(let r=t;r>k;r/=2)i.push(r);i.push(k);const{lods:s}=S.create({scales:i});this.constraints.set({lods:s,minScale:t})}_updatePanConstraints(){const e=e=>{if(!e.targetGeometry)return e;const[t,i]=this.videoSize,s=t*e.scale/2,r=i*e.scale/2,o=e.targetGeometry.clone();return o.x=Math.max(s,Math.min(t-s,o.x)),o.y=Math.max(r,Math.min(i-r,o.y)),e.targetGeometry=o,e};this.constraints.customConstraints.add({constrain:e,applyPanConstraint:e})}_forceReadyCycle(){this.ready&&(m(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}_groundControlPoints(){return this.layer?.groundControlPoints}};e([h()],I.prototype,"_overlayContainer",void 0),e([h()],I.prototype,"_isValid",void 0),e([h()],I.prototype,"_readyCycleForced",void 0),e([h()],I.prototype,"_effectsContainer",void 0),e([h()],I.prototype,"constraintsInfo",null),e([h()],I.prototype,"operationalDataVisible",void 0),e([h()],I.prototype,"layer",null),e([h()],I.prototype,"map",void 0),e([h({type:L,nonNullable:!0})],I.prototype,"navigation",void 0),e([h({readOnly:!0})],I.prototype,"preconditionsReady",null),e([h({readOnly:!0})],I.prototype,"ready",void 0),e([h({readOnly:!0})],I.prototype,"rendering",null),e([h()],I.prototype,"scale",null),e([h()],I.prototype,"spatialReference",void 0),e([h()],I.prototype,"stateManager",void 0),e([h()],I.prototype,"type",void 0),e([h(),d(e=>e instanceof W?e:g(A,e))],I.prototype,"ui",void 0),e([h({readOnly:!0})],I.prototype,"videoSize",null),e([h({readOnly:!0})],I.prototype,"view2dType",void 0),I=e([c("esri.views.VideoView")],I);const Z=I;export{Z as default};
2
+ import{__decorate as e}from"tslib";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import{EventedMixin as o}from"../core/Evented.js";import{destroyMaybe as r}from"../core/maybe.js";import{EsriPromiseMixin as a}from"../core/Promise.js";import{watch as n,syncAndInitial as p,whenOnce as l,when as h}from"../core/reactiveUtils.js";import{property as d,cast as m,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import{create as y,fromValues as u}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import f from"../geometry/Extent.js";import w from"../geometry/Point.js";import v from"../geometry/SpatialReference.js";import{load as j,execute as _}from"../geometry/operators/projectOperator.js";import b from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as C}from"../layers/support/MediaElementView.js";import S from"../layers/support/TileInfo.js";import V from"../layers/support/VideoElement.js";import{DOMContainer as M}from"./DOMContainer.js";import{Viewport2DBaseMixin as x}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as R}from"./Viewport2DMixin.js";import D from"./2d/AnimationManager.js";import z from"./2d/MapViewConstraints.js";import"./2d/engine/Stage.js";import{ManagedCanvas as P}from"./2d/engine/ManagedCanvas.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"../core/RandomLCG.js";import"./2d/engine/transitions/FadeTransition.js";import"./webgl/BufferObject.js";import"./webgl/FramebufferObject.js";import"./webgl/Program.js";import"../core/has.js";import"./webgl/Renderbuffer.js";import"./webgl/Texture.js";import"../core/Logger.js";import"./webgl/enums.js";import"./webgl/Util.js";import"./2d/engine/webgl/meshing/definitions.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"./2d/LabelManager.js";import"./2d/layers/graphics/GraphicsView2D.js";import{Container as T}from"./2d/engine/Container.js";import"./2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"./2d/engine/webgl/AFeatureTile.js";import"./2d/engine/webgl/DisplayEntity.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"./2d/engine/webgl/number.js";import"./2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"./2d/engine/webgl/cpuMapped/GpuMeshState.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtils.js";import"./2d/layers/support/util.js";import E from"./2d/navigation/MapViewNavigation.js";import"../request.js";import"../core/asyncUtils.js";import"../core/support/UpdatingHandles.js";import"../core/mathUtils.js";import"../core/urlUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../core/units.js";import"../geometry/ellipsoidUtils.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"../geometry/spatialReferenceEllipsoidUtils.js";import"../geometry/operators/support/GeographicTransformation.js";import"../geometry/projection/projectors.js";import"../geometry/support/spatialReferenceUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import"../geometry/support/Ellipsoid.js";import{ViewStateManager as G}from"./2d/ViewStateManager.js";import O from"./2d/engine/webgl/Overlay.js";import q from"./2d/engine/webgl/OverlayContainer.js";import U from"./navigation/Navigation.js";import H from"./ui/DefaultUI.js";import F from"./ui/video/DefaultUIVideo.js";const k=new t("#000");let A;async function I(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);A=e}const L=.01,N=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let W=class extends(R(x(M(o(a(s)))))){constructor(e){super(e),this._isValid=!1,this._readyCycleForced=!1,this._prevZoomEnabled=!1,this._prevRotationEnabled=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!1,this.map=null,this.navigation=new U,this.ready=!1,this.spatialReference=new v({wkid:0}),this.stateManager=new G({constraints:new z({view:this,minScale:1,maxScale:L})}),this.type="2d",this.ui=new F,this.view2dType="video",this.addHandles([n(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),n(()=>this.videoSize,([e,t])=>{this._extent&&e&&t&&(this._extent.xmax=e,this._extent.ymax=t)}),n(()=>this.size,e=>{this._operationalDataView&&this._operationalDataView.stateManager.resize(e[0],e[1])}),n(()=>[this.layer?.frameEffect,this._effectsContainer],()=>{this._effectsContainer&&(this._effectsContainer.effect=this.layer?.frameEffect??null)},p)])}initialize(){this._prevZoomEnabled="zoom"===this.navigation.actionMap.mouseWheel&&this.ui.components.includes("zoom"),this._prevRotationEnabled="rotate"===this.navigation.actionMap.dragSecondary&&this.ui.components.includes("compass"),this.addHandles([n(()=>[this.operationalDataVisible,this.childStage],()=>{this.childStage&&(this.childStage.videoScreenRenderer.visible=this.operationalDataVisible),this.operationalDataVisible&&(this.scale=1,this.rotation=0),this.navigation&&(this._prevZoomEnabled&&(this.navigation.actionMap.mouseWheel=this.operationalDataVisible?"none":"zoom",this.navigation.actionMap.dragPrimary=this.operationalDataVisible?"none":"pan",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"zoom"!==e):[...new Set([...this.ui.components,"zoom"])])),this._prevRotationEnabled&&(this.navigation.actionMap.dragSecondary=this.operationalDataVisible?"none":"rotate",this.ui.components&&(this.ui.components=this.operationalDataVisible?this.ui.components.filter(e=>"compass"!==e):[...new Set([...this.ui.components,"compass"])])))},p)]),this.addResolvingPromise(I().then(()=>(this._isValid=!0,l(()=>this.ready))))}destroy(){this._teardown(),this.removeAllHandles(),this._set("preconditionsReady",!1),this.frameTask=r(this.frameTask),this.goToManager.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get constraintsInfo(){return{lods:null,spatialReference:this.spatialReference}}get layer(){return this._get("layer")}set layer(e){e!==this._get("layer")&&(this.constructed&&!this.destroyed&&(this._forceReadyCycle(),this.addResolvingPromise(l(()=>this.ready))),this._set("layer",e))}get preconditionsReady(){return!(!this._isValid||this._readyCycleForced||0===this.width||0===this.height||0===this.videoSize[0]||0===this.videoSize[1])}get rendering(){return this.stage?.renderRequested??!1}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get videoSize(){if(!this.layer?.videoWidth||!this.layer?.videoHeight)return[0,0];const[e,t]=this.size,i=(this.layer?.videoWidth||0)/(this.layer?.videoHeight||0),s=t*i,o=e/i;return e/t>=1?i>=1?s<=e?[s,t]:[e,o]:o<=t?[e,o]:[s,t]:i>=1?o<=t?[e,o]:[s,t]:s<=e?[s,t]:[e,o]}async hitTest(e,t){if(!this._operationalDataView||!this._operationalDataView.ready)return{screenPoint:e,results:[]};const i=this._operationalDataView.videoToMap(e);if(!i)return{screenPoint:e,results:[]};const s=this._operationalDataView.state.toScreen(y(),i);return this._operationalDataView.hitTest({x:s[0],y:s[1]},t)}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:k,groundControlPoints:()=>this._groundControlPoints(),getSize:()=>this.videoSize},i=new A(this.surface,t,new P(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new D({view:this});this._set("animationManager",s);const o=new E({view:this,animationManager:s});this._set("mapViewNavigation",o),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){this.frameTask?.stop(),this.stationaryManager?.clear(),this.stage?.destroy(),this.stage=null,this._videoElementView=null,this._overlayContainer?.removeAllChildren(),this._overlayContainer=null,this.removeHandles("video-view"),this._set("ready",!1),this.stateManager?.ready&&this.stateManager.teardown()}_getViewpoint(){return new i({targetGeometry:new w({x:this.videoSize[0]/2,y:this.videoSize[1]/2,spatialReference:this.spatialReference}),scale:1})}_prepareStage(e){this.addHandles([n(()=>this.stationary,t=>e.stationary=t,p),n(()=>this.state.id,()=>e.state=this.state,p),n(()=>this.renderingOptions,t=>e.renderingOptions=t,p)],"video-view"),this._extent=new f({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new C({element:new V({video:this.layer?.videoElement,georeference:new b({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new O(this._videoElementView);this._overlayContainer=new q,this._overlayContainer.addChild(t),this._effectsContainer=new T,this._effectsContainer.addChild(this._overlayContainer),this.stage.addChild(this._effectsContainer);const i=document.createElement("div");i.classList.add("esri-video-poster"),this.container?.classList.add("esri-video-view"),this.container?.appendChild(i)}_prepareChildStage(e){this.addHandles([n(()=>this.map,async t=>{if(!t)return;const{default:i}=await import("./video/VideoOperationalDataView.js");this._operationalDataView=new i({stage:e,layerViewFilter:e=>new Set(N).has(e.type),width:this.size[0],height:this.size[1],map:t,groundControlPoints:()=>this._groundControlPoints(),getVideoResolution:()=>u(this.layer?.videoWidth||0,this.layer?.videoHeight||0),getSize:()=>this.size}),l(()=>this._operationalDataView?.ready).then(()=>{e.videoScreenRenderer.visible=this.operationalDataVisible})},p),n(()=>this.layer?.groundControlPoints,async()=>{if(!this.layer?.groundControlPoints||!e.state)return;const t=this.layer.groundControlPoints,i=t?.length;if(!i)return;await j();const s=new Array(i),o=e.state.spatialReference;for(let e=0;e<i;e++){const{lat:i,lon:r}=t[e];s[e]=_(new w(r,i),o)}let r=1/0,a=1/0,n=-1/0,p=-1/0;for(const e of s)r=Math.min(r,e.x),a=Math.min(a,e.y),n=Math.max(n,e.x),p=Math.max(p,e.y);const l=f.fromJSON({xmin:r,ymin:a,xmax:n,ymax:p,spatialReference:o});await(this._operationalDataView?.goTo(l,{animate:!1}).catch(()=>{}))},p)])}_updateConstraints(){this._updateZoomConstraints(),this._updatePanConstraints()}_updateZoomConstraints(){const e=this.videoSize,t=Math.max(e[0]/this.size[0],e[1]/this.size[1]),i=[];for(let o=t;o>L;o/=2)i.push(o);i.push(L);const{lods:s}=S.create({scales:i});this.constraints.set({lods:s,minScale:t})}_updatePanConstraints(){const e=e=>{if(!e.targetGeometry)return e;const[t,i]=this.videoSize,s=t*e.scale/2,o=i*e.scale/2,r=e.targetGeometry.clone();return r.x=Math.max(s,Math.min(t-s,r.x)),r.y=Math.max(o,Math.min(i-o,r.y)),e.targetGeometry=r,e};this.constraints.customConstraints.add({constrain:e,applyPanConstraint:e})}_forceReadyCycle(){this.ready&&(h(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}_groundControlPoints(){return this.layer?.groundControlPoints}};e([d()],W.prototype,"_overlayContainer",void 0),e([d()],W.prototype,"_isValid",void 0),e([d()],W.prototype,"_readyCycleForced",void 0),e([d()],W.prototype,"_effectsContainer",void 0),e([d()],W.prototype,"constraintsInfo",null),e([d()],W.prototype,"operationalDataVisible",void 0),e([d()],W.prototype,"layer",null),e([d()],W.prototype,"map",void 0),e([d({type:U,nonNullable:!0})],W.prototype,"navigation",void 0),e([d({readOnly:!0})],W.prototype,"preconditionsReady",null),e([d({readOnly:!0})],W.prototype,"ready",void 0),e([d({readOnly:!0})],W.prototype,"rendering",null),e([d()],W.prototype,"scale",null),e([d()],W.prototype,"spatialReference",void 0),e([d()],W.prototype,"stateManager",void 0),e([d()],W.prototype,"type",void 0),e([d(),m(e=>e instanceof H?e:g(F,e))],W.prototype,"ui",void 0),e([d({readOnly:!0})],W.prototype,"videoSize",null),e([d({readOnly:!0})],W.prototype,"view2dType",void 0),W=e([c("esri.views.VideoView")],W);const Z=W;export{Z as default};
package/views/View2D.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as p,cast as h,subclass as g}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{initialize as u}from"../core/workers/workers.js";import c from"../geometry/Point.js";import m from"../geometry/Polygon.js";import{isLoadedOrLoadFor as y}from"../geometry/projectionUtils.js";import w from"../layers/support/TileInfo.js";import{BreakpointsOwner as f}from"./BreakpointsOwner.js";import{DOMContainer as V}from"./DOMContainer.js";import{PopupView as M}from"./PopupView.js";import v from"./View.js";import{Viewport2DBaseMixin as b}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as _}from"./Viewport2DMixin.js";import R from"./2d/AnimationManager.js";import{layerView2DImporter as j}from"./2d/layerViewModuleImportUtils.js";import S from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as L}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as O}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as T}from"./2d/engine/ManagedCanvas.js";import k from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as C}from"./2d/layers/support/util.js";import{clipContainsPoint as x}from"./2d/support/clippingUtils.js";import{hitTest as D}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as P,takeScreenshot as z}from"./2d/support/screenshotUtils.js";import{Timeline as A}from"./2d/support/Timeline.js";import E from"./navigation/Navigation.js";import U from"./navigation/NavigationActionMap.js";import I from"./support/AnalysisViewManager.js";import G from"./ui/DefaultUI.js";import N from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as q}from"./webgl/RenderingContextOptions.js";import{isWebMap as $}from"../webmap/utils.js";import W from"../webmap/background/ColorBackground.js";let F,B,H,Z,J,K,Q;async function X(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:r,MagnifierView2D:s,GridView2D:a,Stage:n}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);B=e,H=t,Z=i,J=r,K=s,Q=a,F=n}let Y=class extends(_(b(f(M(V(v)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.labelManager=null,this.navigation=new E({actionMap:new U({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new I({importAnalysisViewModule:e=>O(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new A,this.type="2d",this.view2dType=null,this.ui=new N,this.test={takeScreenshot:async e=>P(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},u()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new k(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return y(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return $(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const e=!(!this.magnifier.visible||null===this.magnifier.position||!this._magnifierView?.updatingHandles.updating),t=!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||!0===this.analysisViewManager.updating||!0===this.layerViewManager.updating||!0===this.labelManager.updating||!0===this.graphicsView.updating||this.allLayerViews.some(e=>!e.destroyed&&!("layerViews"in e)&&!0===e.updating)||e);if(has("esri-2d-log-updating")){const i=this.allLayerViews.reduce((e,t)=>({...e,[`${t.layer.id}(${t.layer.type})`]:!t.destroyed&&!("layerViews"in t)&&t.updating}),{});console.log(`Updating MapView: ${t}\n-> Null LayerViewManager: ${!this.layerViewManager}\n-> Null LabelManager: ${!this.labelManager}\n-> Null GraphicsView: ${!this.graphicsView}\n-> layerViewManager.updating: ${this.layerViewManager?.updating}\n-> labelManager.updating: ${this.labelManager?.updating}\n-> graphicsView.updating: ${this.graphicsView?.updating}\n-> allLayerViews: ${JSON.stringify(i)}\n-> updatingMagnifier: ${e}\n`)}return t}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new m({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return D(this,e,t)}async takeScreenshot(e){return z(this._getScreenshotView(e),e)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}zoomIn(){return super.zoomIn()}zoomOut(){return super.zoomOut()}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return $(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return $(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return j.hasLayerViewModule(e)}importLayerView(e){return j.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter(i=>i.clips.every(i=>x(this,i,e,t))).reverse(),s=new globalThis.Map(r.map(e=>[e.layer.uid,e])),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtLocation"in e&&a.push({mapPoint:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return X()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&L(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new T(this.surface),i=new F(this.surface,{canvas:this.renderCanvas,contextOptions:new q(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),renderingOptions:this.renderingOptions,timeline:this.timeline},t);this.stage=i,this._magnifierView=new K,this._magnifierView.magnifier=this.magnifier,this._gridView=new Q;const r=new Z({view:this});this._set("labelManager",r);const s=new R({view:this});this._set("animationManager",s);const a=new J({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),i.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>i.stationary=e,l),o(()=>this.background,e=>{i.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>i.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{i.highlightGradient=C(i.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>i.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(){const e=new S(w.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",e);const t=new B({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new H(e,!0)});this._set("graphicsView",t)}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([p()],Y.prototype,"_magnifierView",void 0),e([p()],Y.prototype,"_gridView",void 0),e([p({constructOnly:!0})],Y.prototype,"deactivatedWebGLExtensions",void 0),e([p({constructOnly:!0})],Y.prototype,"debugWebGLExtensions",void 0),e([p({readOnly:!0})],Y.prototype,"featuresTilingScheme",void 0),e([p({readOnly:!0})],Y.prototype,"graphicsTileStore",null),e([p()],Y.prototype,"graphicsView",void 0),e([p()],Y.prototype,"constraintsInfo",null),e([p()],Y.prototype,"initialExtentRequired",null),e([p()],Y.prototype,"labelManager",void 0),e([p({type:E,nonNullable:!0})],Y.prototype,"navigation",void 0),e([p({constructOnly:!0})],Y.prototype,"renderCanvas",void 0),e([p()],Y.prototype,"renderingOptions",void 0),e([p({constructOnly:!0})],Y.prototype,"supersampleScreenshotsEnabled",void 0),e([p()],Y.prototype,"defaultsFromMapSettings",null),e([p({readOnly:!0})],Y.prototype,"typeSpecificPreconditionsReady",null),e([p()],Y.prototype,"analysisViewManager",void 0),e([p({type:W})],Y.prototype,"background",null),e([p({type:c})],Y.prototype,"center",null),e([p({type:i})],Y.prototype,"floors",void 0),e([p()],Y.prototype,"grid",void 0),e([p()],Y.prototype,"map",void 0),e([p()],Y.prototype,"padding",null),e([p({readOnly:!0})],Y.prototype,"rendering",null),e([p({readOnly:!0})],Y.prototype,"resolution",null),e([p()],Y.prototype,"scale",null),e([p({type:Boolean,value:!1})],Y.prototype,"spatialReferenceLocked",null),e([p({readOnly:!0})],Y.prototype,"tileInfo",null),e([p({type:A,readOnly:!0})],Y.prototype,"timeline",void 0),e([p({readOnly:!0})],Y.prototype,"type",void 0),e([p({readOnly:!0})],Y.prototype,"updating",null),e([p({readOnly:!0})],Y.prototype,"view2dType",void 0),e([p({readOnly:!0})],Y.prototype,"visibleArea",null),e([p()],Y.prototype,"zoom",null),e([p({readOnly:!0})],Y.prototype,"navigating",null),e([p(),h(e=>e instanceof G?e:d(N,e))],Y.prototype,"ui",void 0),Y=e([g("esri.views.View2D")],Y);const ee=Y;export{ee as default};
2
+ import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import has from"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as p,cast as h,subclass as g}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{initialize as u}from"../core/workers/workers.js";import c from"../geometry/Point.js";import m from"../geometry/Polygon.js";import{isLoadedOrLoadFor as y}from"../geometry/projectionUtils.js";import f from"../layers/support/TileInfo.js";import{BreakpointsOwner as w}from"./BreakpointsOwner.js";import{DOMContainer as V}from"./DOMContainer.js";import{PopupView as v}from"./PopupView.js";import M from"./View.js";import{Viewport2DBaseMixin as _}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as b}from"./Viewport2DMixin.js";import S from"./2d/AnimationManager.js";import{layerView2DImporter as R}from"./2d/layerViewModuleImportUtils.js";import j from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as T}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as L}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as O}from"./2d/engine/ManagedCanvas.js";import k from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as C}from"./2d/layers/support/util.js";import{clipContainsPoint as x}from"./2d/support/clippingUtils.js";import{hitTest as D}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as P,takeScreenshot as z}from"./2d/support/screenshotUtils.js";import{Timeline as A}from"./2d/support/Timeline.js";import E from"./navigation/Navigation.js";import U from"./navigation/NavigationActionMap.js";import I from"./support/AnalysisViewManager.js";import G from"./ui/DefaultUI.js";import F from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as N}from"./webgl/RenderingContextOptions.js";import{isWebMap as q}from"../webmap/utils.js";import W from"../webmap/background/ColorBackground.js";let $,B,H,Z,J,K;async function Q(){const[,{GraphicsView2D:e,GraphicContainer:t,MapViewNavigation:i,MagnifierView2D:r,GridView2D:s,Stage:a}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);B=e,H=t,Z=i,J=r,K=s,$=a}let X=class extends(b(_(w(v(V(M)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.navigation=new E({actionMap:new U({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new I({importAnalysisViewModule:e=>L(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new A,this.type="2d",this.view2dType=null,this.ui=new F,this.test={takeScreenshot:async e=>P(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},u()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new k(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return y(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return q(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const e=!(!this.magnifier.visible||null===this.magnifier.position||!this._magnifierView?.updatingHandles.updating),t=!this.destroyed&&(!this.layerViewManager||!this.graphicsView||!0===this.analysisViewManager.updating||!0===this.layerViewManager.updating||this.stage.updating||!0===this.graphicsView.updating||this.allLayerViews.some(e=>!e.destroyed&&!("layerViews"in e)&&!0===e.updating)||e);if(has("esri-2d-log-updating")){const i=this.allLayerViews.reduce((e,t)=>({...e,[`${t.layer.id}(${t.layer.type})`]:!t.destroyed&&!("layerViews"in t)&&t.updating}),{});console.log(`Updating MapView: ${t}\n-> Null LayerViewManager: ${!this.layerViewManager}\n-> Null GraphicsView: ${!this.graphicsView}\n-> layerViewManager.updating: ${this.layerViewManager?.updating}\n-> stage.updating: ${this.stage?.updating}\n-> graphicsView.updating: ${this.graphicsView?.updating}\n-> allLayerViews: ${JSON.stringify(i)}\n-> updatingMagnifier: ${e}\n`)}return t}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new m({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return D(this,e,t)}async takeScreenshot(e){return z(this._getScreenshotView(e),e)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}zoomIn(){return super.zoomIn()}zoomOut(){return super.zoomOut()}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return q(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return q(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return R.hasLayerViewModule(e)}importLayerView(e){return R.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter(i=>i.clips.every(i=>x(this,i,e,t))).reverse(),s=new globalThis.Map(r.map(e=>[e.layer.uid,e])),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtLocation"in e&&a.push({mapPoint:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return Q()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&T(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=this._createFeaturesTilingScheme(),i=new O(this.surface),r=new $(this.surface,{canvas:this.renderCanvas,contextOptions:new N(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),featuresTilingScheme:t,renderingOptions:this.renderingOptions,timeline:this.timeline},i);this.stage=r,this._magnifierView=new J,this._magnifierView.magnifier=this.magnifier,this._gridView=new K;const s=new S({view:this});this._set("animationManager",s);const a=new Z({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(t),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),r.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>r.stationary=e,l),o(()=>this.background,e=>{r.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>r.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{r.highlightGradient=C(r.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>r.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(e=this._createFeaturesTilingScheme()){this._set("featuresTilingScheme",e),this.stage.labelManager.featuresTilingScheme=e;const t=new B({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new H(e,!0)});this._set("graphicsView",t)}_createFeaturesTilingScheme(){return new j(f.create({spatialReference:this.spatialReference,size:512,numLODs:36}))}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([p()],X.prototype,"_magnifierView",void 0),e([p()],X.prototype,"_gridView",void 0),e([p({constructOnly:!0})],X.prototype,"deactivatedWebGLExtensions",void 0),e([p({constructOnly:!0})],X.prototype,"debugWebGLExtensions",void 0),e([p({readOnly:!0})],X.prototype,"featuresTilingScheme",void 0),e([p({readOnly:!0})],X.prototype,"graphicsTileStore",null),e([p()],X.prototype,"graphicsView",void 0),e([p()],X.prototype,"constraintsInfo",null),e([p()],X.prototype,"initialExtentRequired",null),e([p({type:E,nonNullable:!0})],X.prototype,"navigation",void 0),e([p({constructOnly:!0})],X.prototype,"renderCanvas",void 0),e([p()],X.prototype,"renderingOptions",void 0),e([p({constructOnly:!0})],X.prototype,"supersampleScreenshotsEnabled",void 0),e([p()],X.prototype,"defaultsFromMapSettings",null),e([p({readOnly:!0})],X.prototype,"typeSpecificPreconditionsReady",null),e([p()],X.prototype,"analysisViewManager",void 0),e([p({type:W})],X.prototype,"background",null),e([p({type:c})],X.prototype,"center",null),e([p({type:i})],X.prototype,"floors",void 0),e([p()],X.prototype,"grid",void 0),e([p()],X.prototype,"map",void 0),e([p()],X.prototype,"padding",null),e([p({readOnly:!0})],X.prototype,"rendering",null),e([p({readOnly:!0})],X.prototype,"resolution",null),e([p()],X.prototype,"scale",null),e([p({type:Boolean,value:!1})],X.prototype,"spatialReferenceLocked",null),e([p({readOnly:!0})],X.prototype,"tileInfo",null),e([p({type:A,readOnly:!0})],X.prototype,"timeline",void 0),e([p({readOnly:!0})],X.prototype,"type",void 0),e([p({readOnly:!0})],X.prototype,"updating",null),e([p({readOnly:!0})],X.prototype,"view2dType",void 0),e([p({readOnly:!0})],X.prototype,"visibleArea",null),e([p()],X.prototype,"zoom",null),e([p({readOnly:!0})],X.prototype,"navigating",null),e([p(),h(e=>e instanceof G?e:d(F,e))],X.prototype,"ui",void 0),X=e([g("esri.views.View2D")],X);const Y=X;export{Y as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as i}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import{clone as e}from"../../../core/lang.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,when as h}from"../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import n from"../../../layers/GraphicsLayer.js";import c from"../../../symbols/SimpleFillSymbol.js";import l from"../../../symbols/SimpleLineSymbol.js";import p from"../../../symbols/SimpleMarkerSymbol.js";import{cloneMove as d}from"./drawUtils.js";import g from"./HighlightHelper.js";import{addUniqueLayer as v,findLayerView as m}from"./layerUtils.js";import{GraphicClickEvent as y,GraphicDoubleClickEvent as _,GraphicPointerDownEvent as f,GraphicPointerUpEvent as u,GraphicPointerOutEvent as w,GraphicPointerOverEvent as G,GraphicMoveStartEvent as b,GraphicMoveEvent as k,GraphicMoveStopEvent as O}from"./input/GraphicMoverEvents.js";import{ViewEventPriorities as x}from"../../input/InputManager.js";import{createScreenPointFromEvent as H}from"../../support/screenUtils.js";const M="indicator-symbols";let E=class extends t{constructor(i){super(i),this._activeGraphic=null,this._dragEvent=null,this._hoverGraphic=null,this._indicators=[],this._initialDragGeometry=null,this._layerViews=null,this.type="graphic-mover",this.callbacks={onGraphicClick(){},onGraphicDoubleClick(){},onGraphicMoveStart(){},onGraphicMove(){},onGraphicMoveStop(){},onGraphicPointerOver(){},onGraphicPointerOut(){},onGraphicPointerDown(){},onGraphicPointerUp(){}},this.enableMoveAllGraphics=!1,this.graphics=[],this.highlightName=null,this.highlightsEnabled=!1,this.indicatorsEnabled=!1,this._defaultLayer=new n({listMode:"hide",internal:!0,title:"GraphicMover highlight layer"}),this.layer=this._defaultLayer,this.view=null}initialize(){v(this.view,this.layer),this._highlightHelper=new g({view:this.view}),this.refresh(),this.addHandles([r(()=>this.graphics.length,()=>this.refresh()),h(()=>this.view?.ready,()=>{this.addHandles([this.view.on("immediate-click",i=>this._clickHandler(i),x.TOOL),this.view.on("double-click",i=>this._doubleClickHandler(i),x.TOOL),this.view.on("pointer-down",i=>this._pointerDownHandler(i),x.TOOL),this.view.on("pointer-move",i=>this._pointerMoveHandler(i),x.TOOL),this.view.on("pointer-up",i=>this._pointerUpHandler(i),x.TOOL),this.view.on("drag",i=>this._dragHandler(i),x.TOOL),this.view.on("key-down",i=>this._keyDownHandler(i),x.TOOL)])},{once:!0,initial:!0}),r(()=>this.view,i=>{this._highlightHelper.removeAll(),this._highlightHelper.view=i}),r(()=>[this.highlightsEnabled,this.highlightName],()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()})])}destroy(){this._removeIndicators(),this.view.map?.remove(this.layer),s(this._defaultLayer),this.reset()}get state(){const i=this.view.ready,t=this.graphics.length>0,e=this._activeGraphic;return i&&t?e?"moving":"active":i?"ready":"disabled"}refresh(){this.reset(),this._setup()}reset(){this._activeGraphic=null,this._hoverGraphic=null,this._dragEvent=null,this._highlightHelper.removeAll()}updateGeometry(i,t){const e=this.graphics[i];e&&(e.set("geometry",t),this._setUpIndicators())}_setup(){this._setUpHighlights(),this._setUpIndicators(),this._syncLayerViews()}_clickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new y(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-click",e),this.callbacks.onGraphicClick?.(e)}}_doubleClickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new _(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-double-click",e),this.callbacks.onGraphicDoubleClick?.(e)}}_pointerDownHandler(i){const t=this._findTargetGraphic(H(i));if(t){this._activeGraphic=t;const{x:e,y:s}=i,r=new f(t,this.graphics.indexOf(t),e,s,i);this.emit("graphic-pointer-down",r),this.callbacks.onGraphicPointerDown?.(r)}else this._activeGraphic=null}_pointerUpHandler(i){if(this._activeGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._activeGraphic),r=new u(this._activeGraphic,s,t,e,i);this.emit("graphic-pointer-up",r),this.callbacks.onGraphicPointerUp?.(r),this._hoverGraphic=this._activeGraphic}}_pointerMoveHandler(i){if(this._dragEvent)return;const t=this._findTargetGraphic(H(i));if(t){const{x:e,y:s}=i;if(this._hoverGraphic){if(this._hoverGraphic===t)return;const r=this.graphics.indexOf(this._hoverGraphic),h=new w(this.graphics[r],r,e,s,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",h),this.callbacks.onGraphicPointerOut?.(h)}const r=this.graphics.indexOf(t),h=new G(t,r,e,s,i);return this._hoverGraphic=t,this.emit("graphic-pointer-over",h),void this.callbacks.onGraphicPointerOver?.(h)}if(this._hoverGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._hoverGraphic),r=new w(this.graphics[s],s,t,e,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",r),this.callbacks.onGraphicPointerOut?.(r)}}_dragHandler(i){if("start"!==i.action&&!this._dragEvent||!this._activeGraphic?.geometry)return;"start"===i.action&&this._removeIndicators(),i.stopPropagation();const{action:t,x:s,y:r}=i,h=this.graphics.indexOf(this._activeGraphic),o=this._dragEvent?s-this._dragEvent.x:0,a=this._dragEvent?r-this._dragEvent.y:0,n=s-i.origin.x,c=r-i.origin.y,l="start"===t?this._activeGraphic.geometry:this._initialDragGeometry,p=d(l,n,c,this.view);if(this._activeGraphic.geometry=p,this.enableMoveAllGraphics&&this.graphics.forEach(i=>{i!==this._activeGraphic&&(i.geometry=d(i.geometry,o,a,this.view))}),this._dragEvent=i,"start"===t){this._initialDragGeometry=e(l);const t=new b(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move-start",t),this.callbacks.onGraphicMoveStart?.(t),t.defaultPrevented&&this._activeGraphic.set("geometry",l)}else if("update"===t){const t=new k(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move",t),this.callbacks.onGraphicMove?.(t),t.defaultPrevented&&(this._activeGraphic.geometry=l)}else{const t=new O(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this._dragEvent=null,this._activeGraphic=null,this._setUpIndicators(),this.emit("graphic-move-stop",t),this.callbacks.onGraphicMoveStop?.(t),t.defaultPrevented&&(this.graphics[h].set("geometry",this._initialDragGeometry),this._setUpIndicators()),this._initialDragGeometry=null}}_keyDownHandler(i){"a"!==i.key&&"d"!==i.key&&"n"!==i.key||"moving"!==this.state||i.stopPropagation()}_findTargetGraphic(i){const t=this.view.toMap(i),e=this.graphics;this._syncLayerViews();const s=this._layerViews.flatMap(i=>"graphicsViews"in i?Array.from(i.graphicsViews(),i=>i.hitTest(t)).flat():i.graphicsView.hitTest(t)).filter(i=>e.includes(i)).sort((i,t)=>e.indexOf(i)-e.indexOf(t));return s.length?s[0]:null}_syncLayerViews(){this._layerViews=[];const i=new Set;for(const t of this.graphics){const e=m(this.view,t.layer);e&&i.add(e)}this._layerViews=[...i]}_setUpHighlights(){this.highlightsEnabled&&this.graphics.length&&this._highlightHelper.add(this.graphics,this.highlightName)}_setUpIndicators(){if(this._removeIndicators(),this.indicatorsEnabled){for(const i of this.graphics){const t=i.clone();t.symbol=U(i),this._indicators.push(t),this.addHandles(r(()=>i.symbol,()=>this._setUpIndicators()),M)}this.layer.addMany(this._indicators)}}_removeIndicators(){this.removeHandles(M),this._indicators.length&&(this.layer.removeMany(this._indicators),this._indicators.forEach(i=>i.destroy()),this._indicators=[])}};function U(i){const t=12;if(null==i.symbol)return null;switch(i.symbol.type){case"cim":return new p({style:"circle",size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}});case"picture-marker":{const{xoffset:t,yoffset:e,height:s,width:r}=i.symbol,h=s===r?r:Math.max(s,r);return new p({xoffset:t,yoffset:e,size:h,style:"square",color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-marker":{const{xoffset:t,yoffset:e,size:s,style:r}=i.symbol;return new p({xoffset:t,yoffset:e,style:"circle"===r?"circle":"square",size:s+2,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-fill":return new c({color:[0,0,0,0],outline:{style:"dash",color:[255,127,0,1],width:1}});case"simple-line":return new l({color:[255,127,0,1],style:"dash",width:1});case"text":{const{xoffset:e,yoffset:s}=i.symbol;return new p({xoffset:e,yoffset:s,size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}default:return null}}i([o()],E.prototype,"_activeGraphic",void 0),i([o({readOnly:!0})],E.prototype,"type",void 0),i([o()],E.prototype,"callbacks",void 0),i([o()],E.prototype,"enableMoveAllGraphics",void 0),i([o()],E.prototype,"graphics",void 0),i([o()],E.prototype,"highlightName",void 0),i([o()],E.prototype,"highlightsEnabled",void 0),i([o()],E.prototype,"indicatorsEnabled",void 0),i([o()],E.prototype,"_defaultLayer",void 0),i([o()],E.prototype,"layer",void 0),i([o({readOnly:!0})],E.prototype,"state",null),i([o()],E.prototype,"view",void 0),E=i([a("esri.views.draw.support.GraphicMover")],E);const L=E;export{L as default};
2
+ import{__decorate as i}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import{clone as e}from"../../../core/lang.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as r,when as h}from"../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import n from"../../../layers/GraphicsLayer.js";import c from"../../../symbols/SimpleFillSymbol.js";import l from"../../../symbols/SimpleLineSymbol.js";import p from"../../../symbols/SimpleMarkerSymbol.js";import{cloneMove as d}from"./drawUtils.js";import g from"./HighlightHelper.js";import{addUniqueLayer as v,findLayerView as m}from"./layerUtils.js";import{GraphicClickEvent as y,GraphicDoubleClickEvent as _,GraphicPointerDownEvent as f,GraphicPointerUpEvent as u,GraphicPointerOutEvent as w,GraphicPointerOverEvent as G,GraphicMoveStartEvent as b,GraphicMoveEvent as k,GraphicMoveStopEvent as O}from"./input/GraphicMoverEvents.js";import{ViewEventPriorities as x}from"../../input/InputManager.js";import{createScreenPointFromEvent as H}from"../../support/screenUtils.js";const E="indicator-symbols";let M=class extends t{constructor(i){super(i),this._activeGraphic=null,this._dragEvent=null,this._hoverGraphic=null,this._indicators=[],this._initialDragGeometry=null,this._layerViews=null,this.type="graphic-mover",this.callbacks={onGraphicClick(){},onGraphicDoubleClick(){},onGraphicMoveStart(){},onGraphicMove(){},onGraphicMoveStop(){},onGraphicPointerOver(){},onGraphicPointerOut(){},onGraphicPointerDown(){},onGraphicPointerUp(){}},this.enableMoveAllGraphics=!1,this.graphics=[],this.highlightName=null,this.highlightsEnabled=!1,this.indicatorsEnabled=!1,this._defaultLayer=new n({listMode:"hide",internal:!0,title:"GraphicMover highlight layer"}),this.layer=this._defaultLayer,this.view=null}initialize(){v(this.view,this.layer),this._highlightHelper=new g({view:this.view}),this.refresh(),this.addHandles([r(()=>this.graphics.length,()=>this.refresh()),h(()=>this.view?.ready,()=>{this.addHandles([this.view.on("immediate-click",i=>this._clickHandler(i),x.TOOL),this.view.on("double-click",i=>this._doubleClickHandler(i),x.TOOL),this.view.on("pointer-down",i=>this._pointerDownHandler(i),x.TOOL),this.view.on("pointer-move",i=>this._pointerMoveHandler(i),x.TOOL),this.view.on("pointer-up",i=>this._pointerUpHandler(i),x.TOOL),this.view.on("drag",i=>this._dragHandler(i),x.TOOL),this.view.on("key-down",i=>this._keyDownHandler(i),x.TOOL)])},{once:!0,initial:!0}),r(()=>this.view,i=>{this._highlightHelper.removeAll(),this._highlightHelper.view=i}),r(()=>[this.highlightsEnabled,this.highlightName],()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()})])}destroy(){this._removeIndicators(),this.view.map?.remove(this.layer),s(this._defaultLayer),this.reset()}get state(){const i=this.view.ready,t=this.graphics.length>0,e=this._activeGraphic;return i&&t?e?"moving":"active":i?"ready":"disabled"}refresh(){this.reset(),this._setup()}reset(){this._activeGraphic=null,this._hoverGraphic=null,this._dragEvent=null,this._highlightHelper.removeAll()}updateGeometry(i,t){const e=this.graphics[i];e&&(e.set("geometry",t),this._setUpIndicators())}_setup(){this._setUpHighlights(),this._setUpIndicators(),this._syncLayerViews()}_clickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new y(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-click",e),this.callbacks.onGraphicClick?.(e)}}_doubleClickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new _(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-double-click",e),this.callbacks.onGraphicDoubleClick?.(e)}}_pointerDownHandler(i){const t=this._findTargetGraphic(H(i));if(t){this._activeGraphic=t;const{x:e,y:s}=i,r=new f(t,this.graphics.indexOf(t),e,s,i);this.emit("graphic-pointer-down",r),this.callbacks.onGraphicPointerDown?.(r)}else this._activeGraphic=null}_pointerUpHandler(i){if(this._activeGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._activeGraphic),r=new u(this._activeGraphic,s,t,e,i);this.emit("graphic-pointer-up",r),this.callbacks.onGraphicPointerUp?.(r),this._hoverGraphic=this._activeGraphic}}_pointerMoveHandler(i){if(this._dragEvent)return;const t=this._findTargetGraphic(H(i));if(t){const{x:e,y:s}=i;if(this._hoverGraphic){if(this._hoverGraphic===t)return;const r=this.graphics.indexOf(this._hoverGraphic),h=new w(this.graphics[r],r,e,s,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",h),this.callbacks.onGraphicPointerOut?.(h)}const r=this.graphics.indexOf(t),h=new G(t,r,e,s,i);return this._hoverGraphic=t,this.emit("graphic-pointer-over",h),void this.callbacks.onGraphicPointerOver?.(h)}if(this._hoverGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._hoverGraphic),r=new w(this.graphics[s],s,t,e,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",r),this.callbacks.onGraphicPointerOut?.(r)}}_dragHandler(i){if("start"!==i.action&&!this._dragEvent||!this._activeGraphic?.geometry)return;"start"===i.action&&this._removeIndicators(),i.stopPropagation();const{action:t,x:s,y:r}=i,h=this.graphics.indexOf(this._activeGraphic),o=this._dragEvent?s-this._dragEvent.x:0,a=this._dragEvent?r-this._dragEvent.y:0,n=s-i.origin.x,c=r-i.origin.y,l="start"===t?this._activeGraphic.geometry:this._initialDragGeometry,p=d(l,n,c,this.view);if(this._activeGraphic.geometry=p,this.enableMoveAllGraphics&&this.graphics.forEach(i=>{i!==this._activeGraphic&&(i.geometry=d(i.geometry,o,a,this.view))}),this._dragEvent=i,"start"===t){this._initialDragGeometry=e(l);const t=new b(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move-start",t),this.callbacks.onGraphicMoveStart?.(t),t.defaultPrevented&&this._activeGraphic.set("geometry",l)}else if("update"===t){const t=new k(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this.emit("graphic-move",t),this.callbacks.onGraphicMove?.(t),t.defaultPrevented&&(this._activeGraphic.geometry=l)}else{const t=new O(this._activeGraphic,this.graphics,h,s,r,o,a,n,c,i);this._dragEvent=null,this._activeGraphic=null,this._setUpIndicators(),this.emit("graphic-move-stop",t),this.callbacks.onGraphicMoveStop?.(t),t.defaultPrevented&&(this.graphics[h].set("geometry",this._initialDragGeometry),this._setUpIndicators()),this._initialDragGeometry=null}}_keyDownHandler(i){"a"!==i.key&&"d"!==i.key&&"n"!==i.key||"moving"!==this.state||i.stopPropagation()}_findTargetGraphic(i){const t=this.graphics;this._syncLayerViews();const e=this._layerViews.flatMap(t=>"graphicsViews"in t?Array.from(t.graphicsViews(),t=>t.hitTest(this.view,i)).flat():t.graphicsView.hitTest(this.view,i)).filter(i=>t.includes(i)).sort((i,e)=>t.indexOf(i)-t.indexOf(e));return e.length?e[0]:null}_syncLayerViews(){this._layerViews=[];const i=new Set;for(const t of this.graphics){const e=m(this.view,t.layer);e&&i.add(e)}this._layerViews=[...i]}_setUpHighlights(){this.highlightsEnabled&&this.graphics.length&&this._highlightHelper.add(this.graphics,this.highlightName)}_setUpIndicators(){if(this._removeIndicators(),this.indicatorsEnabled){for(const i of this.graphics){const t=i.clone();t.symbol=U(i),this._indicators.push(t),this.addHandles(r(()=>i.symbol,()=>this._setUpIndicators()),E)}this.layer.addMany(this._indicators)}}_removeIndicators(){this.removeHandles(E),this._indicators.length&&(this.layer.removeMany(this._indicators),this._indicators.forEach(i=>i.destroy()),this._indicators=[])}};function U(i){const t=12;if(null==i.symbol)return null;switch(i.symbol.type){case"cim":return new p({style:"circle",size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}});case"picture-marker":{const{xoffset:t,yoffset:e,height:s,width:r}=i.symbol,h=s===r?r:Math.max(s,r);return new p({xoffset:t,yoffset:e,size:h,style:"square",color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-marker":{const{xoffset:t,yoffset:e,size:s,style:r}=i.symbol;return new p({xoffset:t,yoffset:e,style:"circle"===r?"circle":"square",size:s+2,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-fill":return new c({color:[0,0,0,0],outline:{style:"dash",color:[255,127,0,1],width:1}});case"simple-line":return new l({color:[255,127,0,1],style:"dash",width:1});case"text":{const{xoffset:e,yoffset:s}=i.symbol;return new p({xoffset:e,yoffset:s,size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}default:return null}}i([o()],M.prototype,"_activeGraphic",void 0),i([o({readOnly:!0})],M.prototype,"type",void 0),i([o()],M.prototype,"callbacks",void 0),i([o()],M.prototype,"enableMoveAllGraphics",void 0),i([o()],M.prototype,"graphics",void 0),i([o()],M.prototype,"highlightName",void 0),i([o()],M.prototype,"highlightsEnabled",void 0),i([o()],M.prototype,"indicatorsEnabled",void 0),i([o()],M.prototype,"_defaultLayer",void 0),i([o()],M.prototype,"layer",void 0),i([o({readOnly:!0})],M.prototype,"state",null),i([o()],M.prototype,"view",void 0),M=i([a("esri.views.draw.support.GraphicMover")],M);const L=M;export{L as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{isFunctionRaster as e}from"../../layers/raster/datasets/datasetUtils.js";import{getPixelLocationAndValue as t}from"../../layers/raster/functions/pixelUtils.js";import{uvComponentToVector as r}from"../../layers/raster/functions/vectorFieldUtils.js";async function i(e){const{pixelData:r}=e,{pixelBlock:i}=r;if(!i)return null;const{extent:n}=r,s={x:n.width/i.width,y:n.height/i.height},l=t({pos:e.mapPoint,pixelData:r,pixelSize:s});return l?.value?.length?a(e.layer,l.value,e.sourceIsUV):null}async function n(r){const{rawPixelData:i,transformGrid:n,tileSize:s}=r.sourceData;if(!i?.pixelBlock)return null;const{extent:l}=i,o={x:l.width/s.width,y:l.height/s.height},c=t({pos:r.mapPoint,pixelData:i,pixelSize:o,transformGrid:n});if(!c?.value?.length)return null;const{layer:u,processRasterFunction:p,sourceIsUV:d}=r;if("imagery-tile"===u.type&&p&&e(u.raster)){const e=await u.raster.processOnePixel(c,i);return e?.length?a(u,e,d):null}return a(u,c.value,d)}function a(e,t,i){const{renderer:n}=e,a="vector-field"===n?.type||"flow"===n?.type?[0,1]:e.bandIds?.length?e.bandIds:Array.from({length:Math.min(3,t.length)},(e,t)=>t),{serviceRasterInfo:s}=e;"imagery"!==e.type&&!s?.storageInfo?.isBsqTile&&(t=a.map(e=>t[e]));const l=s?.dataType,o="vector-magdir"===l||"vector-uv"===l;return o&&2===t?.length&&(i||"vector-uv"===l)&&(t=r(t)),{pixelValue:t,bandIds:a,isMagnitudeAndDirection:o}}export{i as readFromPixelData,n as readFromTiledRasterData};
2
+ import{isFunctionRaster as t}from"../../layers/raster/datasets/datasetUtils.js";import{getPixelLocationAndValue as e}from"../../layers/raster/functions/pixelUtils.js";import{uvComponentToVector as r}from"../../layers/raster/functions/vectorFieldUtils.js";async function n(t){const{pixelData:r}=t,{pixelBlock:n}=r;if(!n)return null;const{extent:i}=r,s={x:i.width/n.width,y:i.height/n.height},l=e({pos:t.mapPoint,pixelData:r,pixelSize:s});return l?.value?.length?a(t.layer,l.value,t.sourceIsUV):null}async function i(r){const{rawPixelData:n,transformGrid:i,tileSize:s}=r.sourceData;if(!n?.pixelBlock)return null;const{extent:l}=n,o={x:l.width/s.width,y:l.height/s.height},c=e({pos:r.mapPoint,pixelData:n,pixelSize:o,transformGrid:i});if(!c?.value?.length)return null;const{layer:u,processRasterFunction:h,sourceIsUV:p}=r;if("imagery-tile"===u.type&&h&&t(u.raster)){const t=await u.raster.processOnePixel(c,n);return t?.length?a(u,t,p):null}return a(u,c.value,p)}function a(t,e,n){const{renderer:i}=t,a="vector-field"===i?.type||"flow"===i?.type?[0,1]:t.bandIds?.length?t.bandIds:Array.from({length:Math.min(3,e.length)},(t,e)=>e),{serviceRasterInfo:s}=t;"imagery"!==t.type&&!s?.storageInfo?.isBsqTile&&(e=a.map(t=>e[t]));const l=s?.dataType,o="vector-magdir"===l||"vector-uv"===l;return o&&2===e?.length&&(n||"vector-uv"===l)&&(e=r(e)),{pixelValue:e,bandIds:a,isMagnitudeAndDirection:o}}function s(t){const{flowData:e,extent:r}=t.sourceData,{data:n,mask:i,width:s,height:l}=e,o={x:r.width/s,y:r.height/l},{mapPoint:c}=t,{xmin:u,ymax:h}=r,p=Math.floor((c.x-u)/o.x),d=Math.floor((h-c.y)/o.y)*s+p;if(i&&!i[d])return null;const f=[n[2*d],-n[2*d+1]];return a(t.layer,f,!0)}export{s as readFromFlowData,n as readFromPixelData,i as readFromTiledRasterData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{whenOnce as r}from"../../core/reactiveUtils.js";import{debug as e}from"../../core/scheduling.js";import{dispatch as t}from"../../core/accessorSupport/watch.js";async function o(o){switch(o.type){case"2d":await s(o);break;case"3d":t(),e.dispatch(),await r(()=>o.fatalError||!o.updating).then(()=>n(o))}if(o.fatalError)throw o.fatalError}function n(r){const e="3d"===r.type?r.resourceController?.scheduler?.test?.getRunning()??null:null;if(null!=e)throw new Error(`View is not updating, but scheduler is running:${e} at ${(new Error).stack}`)}function s(r){const o=Promise.withResolvers();let n=performance.now();const s=()=>(t(),e.dispatch(),!r.fatalError&&(!r.ready||r.updating||!r.stationary||r.rendering));function a(){if(!r.destroyed&&s())n=null,setTimeout(a,16);else{n||(n=performance.now());performance.now()-n>=100?o.resolve():setTimeout(a,16)}}return setTimeout(a,16),o.promise}export{o as default};
2
+ import{whenOnce as r}from"../../core/reactiveUtils.js";import{debug as t}from"../../core/scheduling.js";import{dispatch as e}from"../../core/accessorSupport/watch.js";async function o(o){switch(o.type){case"2d":await s(o);break;case"3d":e(),t.dispatch(),await r(()=>o.fatalError||!o.updating).then(()=>n(o))}if(o.fatalError)throw o.fatalError}function n(r){const t="3d"===r.type?r.resourceController?.scheduler?.test?.getRunning()??null:null;if(null!=t)throw new Error(`View is not updating, but scheduler is running:${t} at ${(new Error).stack}`)}function s(r){const o=Promise.withResolvers();let n=performance.now();const s=()=>(e(),t.dispatch(),!r.fatalError&&(!r.ready||r.updating||!r.stationary));function a(){if(!r.destroyed&&s())n=null,setTimeout(a,16);else{n||(n=performance.now());performance.now()-n>=100?o.resolve():setTimeout(a,16)}}return setTimeout(a,16),o.promise}export{o as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../Viewpoint.js";import i from"../../core/CollectionFlattener.js";import{destroyMaybe as s}from"../../core/maybe.js";import{whenOnce as r,watch as a,syncAndInitial as o}from"../../core/reactiveUtils.js";import{property as n,subclass as l}from"../../core/accessorSupport/decorators.js";import{initialize as p}from"../../core/workers/workers.js";import{isLoadedOrLoadFor as h}from"../../geometry/projectionUtils.js";import{load as d}from"../../geometry/operators/projectOperator.js";import g from"../../layers/support/TileInfo.js";import{computeVideoToMapBaricentric as m}from"../../layers/video/videoUtils.js";import c from"../View.js";import{Viewport2DBaseMixin as u}from"../Viewport2DBaseMixin.js";import w from"../2d/AnimationManager.js";import{GoToManager as y}from"../2d/GoToManager.js";import{layerView2DImporter as f}from"../2d/layerViewModuleImportUtils.js";import V from"../2d/tiling/TileInfoView.js";import"../2d/tiling/TileKey.js";import"../2d/tiling/TileQueue.js";import"../2d/tiling/TileStrategy.js";import{extentToScale as v}from"../2d/viewpointUtils.js";import M from"../2d/layers/features/support/TileStore.js";import{hitTest as T}from"../2d/support/hitTestUtils.js";import{Timeline as j}from"../2d/support/Timeline.js";let _,S,b,C;async function R(){const[,{GraphicsView2D:t,GraphicContainer:e,LabelManager:i,MapViewNavigation:s}]=await Promise.all([import("../2d/webglDeps.js"),import("../2d/mapViewDeps.js"),d()]);_=t,S=e,b=i,C=s}let D=class extends(u(c)){constructor(t){super(t),this.stage=null,this.rootLayerViews=new i({getCollections:()=>[this.layerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.timeline=new j,this.goToManager=new y({view:this}),this.labelManager=null,this.map=null,this.surface=null,this.padding={top:0,right:0,bottom:0,left:0},p(),this._groundControlPoints=t?.groundControlPoints.bind(this),this._getVideoResolution=t?.getVideoResolution.bind(this),this._getSize=t?.getSize.bind(this)}initialize(){this.addResolvingPromise(r(()=>this.ready))}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=s(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy()}get graphicsTileStore(){return new M(this.featuresTilingScheme)}get typeSpecificPreconditionsReady(){const t=this._getDefaultViewpoint();if(!t)return!1;const e=t.targetGeometry,i=this.spatialReference;return h(e.spatialReference,i)}videoToMap(t){const e=this._groundControlPoints?.();if(!e)return null;const i=this._getVideoResolution?.(),s=this._getSize?.();if(!i||!s||0===i[1]||0===s[1])return null;const r=i[0]/s[0],a=i[1]/s[1];return t.x*=r,t.y*=-a,m(t,e,this.state.spatialReference)}async hitTest(t,e){return T(this,t,e)}goTo(t,e){return this.goToManager.goTo(t,e)}toMap(t){return this.stateManager.toMap(t)}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return R()}hasLayerViewModule(t){return f.hasLayerViewModule(t)}importLayerView(t){return f.importLayerView(t)}_getDefaultViewpoint(){const{constraints:t,initialExtent:i,map:s,padding:r,size:a}=this;if(!t)return null;const o=s&&"initialViewProperties"in s?s.initialViewProperties:void 0,n=this.stateManager.getUserStartupOptions(this.size),l=o?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,d=l?.rotation??0,g=l?.scale||p&&v(p,[a[0]-r.left-r.right,a[1]-r.top-r.bottom]),m=n.center??h,c=n.rotation??d,u=n.scale??g;return m&&u?new e({targetGeometry:m,scale:u,rotation:c}):null}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(t=>{this.stage.addChild(t.container)});const t=this.graphicsView;this.stage.addChild(t.container)}_startup(){this.timeline.begin("VideoOperationalDataView Startup");const t=this._getDefaultViewpoint();this.stateManager.startup(t,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const e=new b({view:this});this._set("labelManager",e);const i=new w({view:this});this._set("animationManager",i);const s=new C({view:this,animationManager:i});this._set("mapViewNavigation",s);const r=new V(g.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",r);const n=new _({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new S(r)});this._set("graphicsView",n),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),this.stage.on("webgl-error",t=>this.fatalError=t.error),a(()=>this.stationary,t=>this.stage.stationary=t,o),a(()=>this.state.id,()=>this.stage.state=this.state,o)],"video-graphics-view"),this._updateStageChildren(),this.timeline.end("VideoOperationalDataView Startup"),this.frameTask.start(),this.stage.viewIsReady=!0,this._set("ready",!0)}_teardown(){this.removeHandles("video-graphics-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.stage.destroy(),this.stage=null;const t=this.graphicsView;this._set("graphicsView",null),t.destroy(),this._set("featuresTilingScheme",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}};t([n()],D.prototype,"stage",void 0),t([n({readOnly:!0})],D.prototype,"featuresTilingScheme",void 0),t([n({readOnly:!0})],D.prototype,"graphicsTileStore",null),t([n()],D.prototype,"graphicsView",void 0),t([n({type:j,readOnly:!0})],D.prototype,"timeline",void 0),t([n()],D.prototype,"goToManager",void 0),t([n()],D.prototype,"labelManager",void 0),t([n()],D.prototype,"map",void 0),t([n({readOnly:!0})],D.prototype,"typeSpecificPreconditionsReady",null),t([n({readOnly:!0})],D.prototype,"surface",void 0),D=t([l("esri.views.video.VideoOperationalDataView")],D);const O=D;export{O as default};
2
+ import{__decorate as t}from"tslib";import e from"../../Viewpoint.js";import i from"../../core/CollectionFlattener.js";import{destroyMaybe as s}from"../../core/maybe.js";import{whenOnce as r,watch as o,syncAndInitial as a}from"../../core/reactiveUtils.js";import{property as n,subclass as l}from"../../core/accessorSupport/decorators.js";import{initialize as p}from"../../core/workers/workers.js";import{isLoadedOrLoadFor as h}from"../../geometry/projectionUtils.js";import{load as d}from"../../geometry/operators/projectOperator.js";import g from"../../layers/support/TileInfo.js";import{computeVideoToMapBaricentric as m}from"../../layers/video/videoUtils.js";import c from"../View.js";import{Viewport2DBaseMixin as u}from"../Viewport2DBaseMixin.js";import w from"../2d/AnimationManager.js";import{GoToManager as y}from"../2d/GoToManager.js";import{layerView2DImporter as f}from"../2d/layerViewModuleImportUtils.js";import V from"../2d/tiling/TileInfoView.js";import"../2d/tiling/TileKey.js";import"../2d/tiling/TileQueue.js";import"../2d/tiling/TileStrategy.js";import{extentToScale as v}from"../2d/viewpointUtils.js";import T from"../2d/layers/features/support/TileStore.js";import{hitTest as j}from"../2d/support/hitTestUtils.js";import{Timeline as M}from"../2d/support/Timeline.js";let _,S,C;async function R(){const[,{GraphicsView2D:t,GraphicContainer:e,MapViewNavigation:i}]=await Promise.all([import("../2d/webglDeps.js"),import("../2d/mapViewDeps.js"),d()]);_=t,S=e,C=i}let b=class extends(u(c)){constructor(t){super(t),this.stage=null,this.rootLayerViews=new i({getCollections:()=>[this.layerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.timeline=new M,this.goToManager=new y({view:this}),this.map=null,this.surface=null,this.padding={top:0,right:0,bottom:0,left:0},p(),this._groundControlPoints=t?.groundControlPoints.bind(this),this._getVideoResolution=t?.getVideoResolution.bind(this),this._getSize=t?.getSize.bind(this)}initialize(){this.addResolvingPromise(r(()=>this.ready))}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=s(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy()}get graphicsTileStore(){return new T(this.featuresTilingScheme)}get typeSpecificPreconditionsReady(){const t=this._getDefaultViewpoint();if(!t)return!1;const e=t.targetGeometry,i=this.spatialReference;return h(e.spatialReference,i)}videoToMap(t){const e=this._groundControlPoints?.();if(!e)return null;const i=this._getVideoResolution?.(),s=this._getSize?.();if(!i||!s||0===i[1]||0===s[1])return null;const r=i[0]/s[0],o=i[1]/s[1];return t.x*=r,t.y*=-o,m(t,e,this.state.spatialReference)}async hitTest(t,e){return j(this,t,e)}goTo(t,e){return this.goToManager.goTo(t,e)}toMap(t){return this.stateManager.toMap(t)}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return R()}hasLayerViewModule(t){return f.hasLayerViewModule(t)}importLayerView(t){return f.importLayerView(t)}_getDefaultViewpoint(){const{constraints:t,initialExtent:i,map:s,padding:r,size:o}=this;if(!t)return null;const a=s&&"initialViewProperties"in s?s.initialViewProperties:void 0,n=this.stateManager.getUserStartupOptions(this.size),l=a?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,d=l?.rotation??0,g=l?.scale||p&&v(p,[o[0]-r.left-r.right,o[1]-r.top-r.bottom]),m=n.center??h,c=n.rotation??d,u=n.scale??g;return m&&u?new e({targetGeometry:m,scale:u,rotation:c}):null}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(t=>{this.stage.addChild(t.container)});const t=this.graphicsView;this.stage.addChild(t.container)}_startup(){this.timeline.begin("VideoOperationalDataView Startup");const t=this._getDefaultViewpoint();this.stateManager.startup(t,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const e=new w({view:this});this._set("animationManager",e);const i=new C({view:this,animationManager:e});this._set("mapViewNavigation",i);const s=new V(g.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",s),this.stage.labelManager.featuresTilingScheme=s;const r=new _({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new S(s)});this._set("graphicsView",r),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),this.stage.on("webgl-error",t=>this.fatalError=t.error),o(()=>this.stationary,t=>this.stage.stationary=t,a),o(()=>this.state.id,()=>this.stage.state=this.state,a)],"video-graphics-view"),this._updateStageChildren(),this.timeline.end("VideoOperationalDataView Startup"),this.frameTask.start(),this.stage.viewIsReady=!0,this._set("ready",!0)}_teardown(){this.removeHandles("video-graphics-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.stage.destroy(),this.stage=null;const t=this.graphicsView;this._set("graphicsView",null),t.destroy(),this._set("featuresTilingScheme",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}};t([n()],b.prototype,"stage",void 0),t([n({readOnly:!0})],b.prototype,"featuresTilingScheme",void 0),t([n({readOnly:!0})],b.prototype,"graphicsTileStore",null),t([n()],b.prototype,"graphicsView",void 0),t([n({type:M,readOnly:!0})],b.prototype,"timeline",void 0),t([n()],b.prototype,"goToManager",void 0),t([n()],b.prototype,"map",void 0),t([n({readOnly:!0})],b.prototype,"typeSpecificPreconditionsReady",null),t([n({readOnly:!0})],b.prototype,"surface",void 0),b=t([l("esri.views.video.VideoOperationalDataView")],b);const D=b;export{D as default};