@arcgis/core 4.34.0-next.24 → 4.34.0-next.25

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 (363) hide show
  1. package/Basemap.js +1 -1
  2. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/applications/Components/imageryUtils.d.ts +4 -0
  6. package/applications/Components/imageryUtils.js +5 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{0867aa688fa8938906da.js → 03bef3f4b6b09b1e864b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/06cdbccc9f325dcc303d.js +1 -0
  10. package/assets/esri/core/workers/chunks/07613c89255bdab6b7c6.js +1 -0
  11. package/assets/esri/core/workers/chunks/09618761df5c4fdd52a0.js +1 -0
  12. package/assets/esri/core/workers/chunks/0ae00339991f5387203e.js +1 -0
  13. package/assets/esri/core/workers/chunks/0b4b294f3ce74fde5620.js +1 -0
  14. package/assets/esri/core/workers/chunks/{146520d263b910b5bdc7.js → 0e96a3b7228f1ff8e6c5.js} +1 -1
  15. package/assets/esri/core/workers/chunks/109ef17dd4f9430bb686.js +1 -0
  16. package/assets/esri/core/workers/chunks/1597aca21334cab3b802.js +1 -0
  17. package/assets/esri/core/workers/chunks/196564ad230bef6b59cf.js +1 -0
  18. package/assets/esri/core/workers/chunks/19f8d551cbebc11db1eb.js +1 -0
  19. package/assets/esri/core/workers/chunks/1ceee047e3fa617b0600.js +1 -0
  20. package/assets/esri/core/workers/chunks/1d27701832ea139fcc20.js +1 -0
  21. package/assets/esri/core/workers/chunks/1f296f85becf1ca6714d.js +1 -0
  22. package/assets/esri/core/workers/chunks/1f8d7bd44d53c30df383.js +1 -0
  23. package/assets/esri/core/workers/chunks/1fabb5ec59da698c1618.js +1 -0
  24. package/assets/esri/core/workers/chunks/{919d2fd7ebc0c840a759.js → 219b2911668db120452b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/29ae5723fa35aa73ff9b.js +1 -0
  26. package/assets/esri/core/workers/chunks/2b4b073254fe8b6a081c.js +1 -0
  27. package/assets/esri/core/workers/chunks/30293b88501b5d6162fc.js +1 -0
  28. package/assets/esri/core/workers/chunks/31533f5e8b76b307f61c.js +1 -0
  29. package/assets/esri/core/workers/chunks/347117e61e1c6edd074f.js +1 -0
  30. package/assets/esri/core/workers/chunks/3616eb2607843524483f.js +1 -0
  31. package/assets/esri/core/workers/chunks/36648facd56ee91afc7c.js +1 -0
  32. package/assets/esri/core/workers/chunks/394477e88be0c6790f02.js +1 -0
  33. package/assets/esri/core/workers/chunks/3b80b01551d124534a1b.js +1 -0
  34. package/assets/esri/core/workers/chunks/{89d91ce2f566dd3f57f7.js → 3be9ec0503a669bcfce6.js} +1 -1
  35. package/assets/esri/core/workers/chunks/3c9cf06ac6aa1db6c4f6.js +1 -0
  36. package/assets/esri/core/workers/chunks/40fc7c43feaeef8b814d.js +1 -0
  37. package/assets/esri/core/workers/chunks/42cddc8f8c8d73e22ee2.js +1 -0
  38. package/assets/esri/core/workers/chunks/437a4100a837ee16df7c.js +1 -0
  39. package/assets/esri/core/workers/chunks/453e536f566d80a9863b.js +1 -0
  40. package/assets/esri/core/workers/chunks/472c677a74d779ce62d7.js +1 -0
  41. package/assets/esri/core/workers/chunks/4b68b6985430c42316b7.js +1 -0
  42. package/assets/esri/core/workers/chunks/4ce671bc4d36387b55fa.js +1 -0
  43. package/assets/esri/core/workers/chunks/51cfa2f70ec222e1582b.js +1 -0
  44. package/assets/esri/core/workers/chunks/5284d46aecd6fe0345b8.js +1 -0
  45. package/assets/esri/core/workers/chunks/567385709e18ace93b1e.js +1 -0
  46. package/assets/esri/core/workers/chunks/5a9b27f2b343cd5b0852.js +1 -0
  47. package/assets/esri/core/workers/chunks/{4c2f3e43992a918e4c2d.js → 5ef3256c32c4b622bd11.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{5ce62d9fff80d014d186.js → 60aeb7a5ccd8bc71be02.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{55e9b02d70812f7cdac2.js → 63966066a963e9a1fb14.js} +1 -1
  50. package/assets/esri/core/workers/chunks/63f50ff2ae94f684d56b.js +1 -0
  51. package/assets/esri/core/workers/chunks/{8bf04be4052bf148777a.js → 6a1cf6b0ffdf6080b5c4.js} +1 -1
  52. package/assets/esri/core/workers/chunks/6deaa08e3a61a455e564.js +1 -0
  53. package/assets/esri/core/workers/chunks/6e9b4bfe2a1497c96100.js +1 -0
  54. package/assets/esri/core/workers/chunks/6efc3d120c9c2c09cb06.js +1 -0
  55. package/assets/esri/core/workers/chunks/7338ce95bceb2c7fab87.js +1 -0
  56. package/assets/esri/core/workers/chunks/{c64fa94cba71ba2794e2.js → 771012f129890f9a089c.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{d1b363c418a67b087306.js → 780ff9314f26ae62f75f.js} +1 -1
  58. package/assets/esri/core/workers/chunks/820cf4337b248a0cb63c.js +1 -0
  59. package/assets/esri/core/workers/chunks/{fedbf639a0788417a70f.js → 86abfce1f2ac93cc4d54.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{c94cc026c4ed330408fb.js → 8894483b91bcda845b6f.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{f050ab9d100012b77bb9.js → 8c5b1114cc2a58305a81.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{6ca764b4baadef5c1515.js → 92737419b66894799a34.js} +1 -1
  63. package/assets/esri/core/workers/chunks/9511e55e4fabb3235eac.js +1 -0
  64. package/assets/esri/core/workers/chunks/{909a6218db87cba2c9ba.js → 9a78cb291c966f8ddda6.js} +1 -1
  65. package/assets/esri/core/workers/chunks/9f8341caab3b1d02f387.js +1 -0
  66. package/assets/esri/core/workers/chunks/a08d018d8c137fc4ca17.js +1 -0
  67. package/assets/esri/core/workers/chunks/{7051bcc178eb512819f6.js → a55338add265d330124b.js} +1 -1
  68. package/assets/esri/core/workers/chunks/afe4fd3b1b3521712edd.js +1 -0
  69. package/assets/esri/core/workers/chunks/{9991bd3c7991bffd8260.js → b37f3c416cefc1a6ea2c.js} +1 -1
  70. package/assets/esri/core/workers/chunks/bb50b4a3af627f91d789.js +1 -0
  71. package/assets/esri/core/workers/chunks/{f42155b7a4e6c5e80757.js → bbc2a4976d044b990193.js} +1 -1
  72. package/assets/esri/core/workers/chunks/bbf2c31d217de1b8ba6e.js +1 -0
  73. package/assets/esri/core/workers/chunks/be3977f7fe0c46a1b493.js +1 -0
  74. package/assets/esri/core/workers/chunks/befba7ceeb26a38732c1.js +1 -0
  75. package/assets/esri/core/workers/chunks/bf3fc71881aa559fc931.js +1 -0
  76. package/assets/esri/core/workers/chunks/c19421707257fc93acb9.js +1 -0
  77. package/assets/esri/core/workers/chunks/c1fb5290e0e259b74389.js +1 -0
  78. package/assets/esri/core/workers/chunks/c361bf4d41a1843d4640.js +1 -0
  79. package/assets/esri/core/workers/chunks/c51099eab5a99c88e5de.js +1 -0
  80. package/assets/esri/core/workers/chunks/c56b05a8be498b6f3ee7.js +1 -0
  81. package/assets/esri/core/workers/chunks/c82e78590c2fabc67609.js +1 -0
  82. package/assets/esri/core/workers/chunks/{7d7f8f2936ddee65e3da.js → c9e580867f7ac17be329.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{92ad9098006568358550.js → cafcb46d723d38b377a9.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{1d75cb1747ffb7b8b050.js → cb81d448ed6bad205346.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{0f6203ae32663b2b52db.js → d08a523b548e892e1222.js} +1 -1
  86. package/assets/esri/core/workers/chunks/d29ae64703a947bfb83b.js +1 -0
  87. package/assets/esri/core/workers/chunks/{04c17957c15234ca0321.js → d81260303a11d3fbe940.js} +1 -1
  88. package/assets/esri/core/workers/chunks/de1457b07f4e263f1524.js +1 -0
  89. package/assets/esri/core/workers/chunks/{6bf43bc3714d7b3878fa.js → e547318638c8f496c1a0.js} +1 -1
  90. package/assets/esri/core/workers/chunks/e8e993fb8697b8f3e0c7.js +346 -0
  91. package/assets/esri/core/workers/chunks/{53781ccca16e53d4a8c3.js → f291ccf9da6aa7d7ae23.js} +1 -1
  92. package/assets/esri/core/workers/chunks/f61a8cc7e2b198e521ba.js +1 -0
  93. package/assets/esri/core/workers/chunks/f9442a281cb91c64c7cd.js +1 -0
  94. package/assets/esri/core/workers/chunks/fb785bc38323cce6e549.js +1 -0
  95. package/assets/esri/core/workers/chunks/{c3213b487c11076985af.js → fbf3240b36718fa5dc76.js} +1 -1
  96. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  97. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  98. package/chunks/ComponentShader.glsl.js +36 -36
  99. package/chunks/RibbonLine.glsl.js +40 -33
  100. package/chunks/persistableUrlUtils.js +1 -1
  101. package/config.js +1 -1
  102. package/core/AsyncUpdate.js +1 -1
  103. package/core/Clonable.js +1 -1
  104. package/core/Evented.js +1 -1
  105. package/core/Identifiable.js +1 -1
  106. package/core/JSONSupport.js +1 -1
  107. package/core/Loadable.js +1 -1
  108. package/core/MapUtils.js +1 -1
  109. package/core/MemCache.js +1 -1
  110. package/core/MultiOriginJSONSupport.js +1 -1
  111. package/core/ObjectPool.js +1 -1
  112. package/core/Promise.js +1 -1
  113. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  114. package/core/quantity.d.ts +1 -0
  115. package/geometry/support/buffer/BufferPool.js +1 -1
  116. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  117. package/interfaces.d.ts +147 -12
  118. package/kernel.js +1 -1
  119. package/layers/CatalogLayer.js +1 -1
  120. package/layers/FeatureLayer.js +1 -1
  121. package/layers/GeoJSONLayer.js +1 -1
  122. package/layers/SubtypeGroupLayer.js +1 -1
  123. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
  124. package/layers/mixins/APIKeyMixin.js +1 -1
  125. package/layers/mixins/ArcGISCachedService.js +1 -1
  126. package/layers/mixins/ArcGISImageService.js +1 -1
  127. package/layers/mixins/ArcGISMapService.js +1 -1
  128. package/layers/mixins/ArcGISService.js +1 -1
  129. package/layers/mixins/BlendLayer.js +1 -1
  130. package/layers/mixins/CustomParametersMixin.js +1 -1
  131. package/layers/mixins/DisplayFilteredLayer.js +1 -1
  132. package/layers/mixins/EditBusLayer.js +1 -1
  133. package/layers/mixins/FeatureEffectLayer.js +1 -1
  134. package/layers/mixins/FeatureLayerBase.js +1 -1
  135. package/layers/mixins/FeatureReductionLayer.js +1 -1
  136. package/layers/mixins/ImageryTileMixin.js +1 -1
  137. package/layers/mixins/OperationalLayer.js +1 -1
  138. package/layers/mixins/OrderedLayer.js +1 -1
  139. package/layers/mixins/PortalLayer.js +1 -1
  140. package/layers/mixins/PublishableLayer.js +1 -1
  141. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  142. package/layers/mixins/RasterPresetRendererMixin.js +1 -1
  143. package/layers/mixins/RefreshableLayer.js +1 -1
  144. package/layers/mixins/ScaleRangeLayer.js +1 -1
  145. package/layers/mixins/SceneService.js +1 -1
  146. package/layers/mixins/SublayersOwner.js +1 -1
  147. package/layers/mixins/TemporalLayer.js +1 -1
  148. package/layers/mixins/TemporalSceneLayer.js +1 -1
  149. package/layers/mixins/TrackableLayer.js +1 -1
  150. package/layers/ogc/wfsUtils.js +1 -1
  151. package/layers/support/RasterJobHandler.js +1 -1
  152. package/layers/support/RasterWorker.js +1 -1
  153. package/layers/support/Sublayer.js +1 -1
  154. package/layers/support/arcgisLayerUrl.js +1 -1
  155. package/layers/support/multiLayerServiceUtils.js +1 -1
  156. package/layers/support/rasterDatasets/pixelReader.js +5 -0
  157. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  158. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  159. package/package.json +1 -1
  160. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  161. package/rest/support/CameraInfoMixin.js +1 -1
  162. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  163. package/smartMapping/renderers/color.js +1 -1
  164. package/smartMapping/renderers/heatmap.js +1 -1
  165. package/smartMapping/renderers/pieChart.js +1 -1
  166. package/smartMapping/renderers/size.js +1 -1
  167. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  168. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  169. package/smartMapping/renderers/type.js +1 -1
  170. package/smartMapping/symbology/color.js +1 -1
  171. package/smartMapping/symbology/support/utils.js +1 -1
  172. package/support/LayersMixin.js +1 -1
  173. package/support/TablesMixin.js +1 -1
  174. package/support/revision.js +1 -1
  175. package/symbols/support/utils.js +1 -1
  176. package/views/2d/engine/ParentChildStage.js +1 -1
  177. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  178. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  179. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  180. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  181. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  182. package/views/2d/engine/webgl/textureUtils.js +1 -1
  183. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  184. package/views/2d/layers/LayerView2D.js +1 -1
  185. package/views/2d/layers/MediaLayerView2D.js +1 -1
  186. package/views/2d/layers/TileLayerView2D.js +1 -1
  187. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  188. package/views/2d/layers/support/DebugOverlay.js +1 -1
  189. package/views/3d/analysis/AnalysisView3D.js +1 -1
  190. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +5 -0
  191. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  192. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  193. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  194. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  195. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  196. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  197. package/views/3d/layers/FlowSubView3D.js +1 -1
  198. package/views/3d/layers/I3SMeshView3D.js +1 -1
  199. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  200. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  201. package/views/3d/layers/LayerView3D.js +1 -1
  202. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  203. package/views/3d/layers/StreamLayerView3D.js +1 -1
  204. package/views/3d/layers/TiledLayerView3D.js +1 -1
  205. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  206. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  207. package/views/3d/layers/graphics/Labeler.js +1 -1
  208. package/views/3d/layers/graphics/StreamController.js +5 -0
  209. package/views/3d/layers/graphics/StreamGraphics3DGraphicsPipeline.js +1 -1
  210. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  211. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  212. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  213. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  214. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  215. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  216. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  217. package/views/3d/layers/support/fetchTile.js +1 -1
  218. package/views/3d/support/MemoryController.js +1 -1
  219. package/views/3d/support/ResourceController.js +1 -1
  220. package/views/3d/support/StreamDataLoader.js +1 -1
  221. package/views/3d/support/StreamDataRequester.js +5 -0
  222. package/views/3d/support/StreamTextureCollection.js +1 -1
  223. package/views/3d/support/engineContent/line.js +1 -1
  224. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  225. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  226. package/views/3d/support/flow/StreamlinesResources3D.js +1 -1
  227. package/views/3d/support/flow/geometryUtils.js +1 -1
  228. package/views/3d/support/index.js +1 -1
  229. package/views/3d/terrain/OverlayRenderer.js +1 -1
  230. package/views/3d/terrain/TerrainRenderer.js +1 -1
  231. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  232. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  233. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  234. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  235. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  236. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  237. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  238. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  239. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  240. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  241. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  242. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  243. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +17 -0
  244. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  245. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  246. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  247. package/views/BreakpointsOwner.js +1 -1
  248. package/views/DOMContainer.js +1 -1
  249. package/views/PopupView.js +1 -1
  250. package/views/VideoView.js +1 -1
  251. package/views/Viewport2DBaseMixin.js +1 -1
  252. package/views/Viewport2DMixin.js +1 -1
  253. package/views/draw/DrawGraphicTool.js +1 -1
  254. package/views/draw/DrawScreenTool.js +1 -1
  255. package/views/draw/DrawTool.js +1 -1
  256. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  257. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  258. package/views/layers/CatalogFootprintLayerView.js +1 -1
  259. package/views/layers/CatalogLayerView.js +1 -1
  260. package/views/layers/DimensionLayerView.js +1 -1
  261. package/views/layers/FeatureLayerView.js +1 -1
  262. package/views/layers/ImageryLayerView.js +1 -1
  263. package/views/layers/ImageryTileLayerView.js +1 -1
  264. package/views/layers/LineOfSightLayerView.js +1 -1
  265. package/views/layers/MapImageLayerView.js +1 -1
  266. package/views/layers/MediaLayerView.js +1 -1
  267. package/views/layers/OGCFeatureLayerView.js +1 -1
  268. package/views/layers/PointCloudLayerView.js +1 -1
  269. package/views/layers/RefreshableLayerView.js +1 -1
  270. package/views/layers/StreamLayerView.js +1 -1
  271. package/views/layers/ViewshedLayerView.js +1 -1
  272. package/views/layers/WMSLayerView.js +1 -1
  273. package/views/support/Scheduler.js +1 -1
  274. package/views/video/VideoOperationalDataView.js +1 -1
  275. package/views/webgl/BufferObject.js +1 -1
  276. package/views/webgl/Program.js +1 -1
  277. package/views/webgl/Renderbuffer.js +1 -1
  278. package/views/webgl/Texture.js +1 -1
  279. package/views/webgl/Util.js +1 -1
  280. package/webscene/SunLighting.js +1 -1
  281. package/webscene/VirtualLighting.js +1 -1
  282. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  283. package/widgets/Directions/DirectionsSearchTool.js +1 -1
  284. package/widgets/Editor/EditorViewModel.js +1 -1
  285. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  286. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  287. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  288. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  289. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  290. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  291. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  292. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  293. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  294. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  295. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
  296. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  297. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  298. package/widgets/PanoramicViewer.js +1 -1
  299. package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
  300. package/widgets/support/GoTo.js +1 -1
  301. package/assets/esri/core/workers/chunks/0202c2ac73354e3970b2.js +0 -1
  302. package/assets/esri/core/workers/chunks/02dc6e31b1244e5bb785.js +0 -1
  303. package/assets/esri/core/workers/chunks/080c79d6caca3b6a2db2.js +0 -1
  304. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +0 -1
  305. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +0 -1
  306. package/assets/esri/core/workers/chunks/16a78f5a82f5ca163816.js +0 -1
  307. package/assets/esri/core/workers/chunks/1cc30073f8200b67cff6.js +0 -1
  308. package/assets/esri/core/workers/chunks/242b216d61940aebe8e1.js +0 -1
  309. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +0 -1
  310. package/assets/esri/core/workers/chunks/35d238a5a6501f89bed7.js +0 -1
  311. package/assets/esri/core/workers/chunks/36a2a8b6547604bad2ab.js +0 -1
  312. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +0 -1
  313. package/assets/esri/core/workers/chunks/40c1d65039c8f1d6afa0.js +0 -1
  314. package/assets/esri/core/workers/chunks/49dce142ad1ea4c01d00.js +0 -1
  315. package/assets/esri/core/workers/chunks/4b89d5b9e35bf79b321e.js +0 -1
  316. package/assets/esri/core/workers/chunks/4c47d327815e281c457e.js +0 -1
  317. package/assets/esri/core/workers/chunks/4ea96aff38bb301dc40d.js +0 -346
  318. package/assets/esri/core/workers/chunks/54a49a25845897a15ab1.js +0 -1
  319. package/assets/esri/core/workers/chunks/576e408fb0834f3948e8.js +0 -1
  320. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +0 -1
  321. package/assets/esri/core/workers/chunks/6136bf09950adc46bc33.js +0 -1
  322. package/assets/esri/core/workers/chunks/666afe669866c44830bd.js +0 -1
  323. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +0 -1
  324. package/assets/esri/core/workers/chunks/843b6029d4c13115e1ac.js +0 -1
  325. package/assets/esri/core/workers/chunks/86d6007c45f2aa643ac8.js +0 -1
  326. package/assets/esri/core/workers/chunks/8ea34878a1ef24b4ded3.js +0 -1
  327. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +0 -1
  328. package/assets/esri/core/workers/chunks/90145d49a0cec902435c.js +0 -1
  329. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +0 -1
  330. package/assets/esri/core/workers/chunks/9ae18a17f62d91167202.js +0 -1
  331. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +0 -1
  332. package/assets/esri/core/workers/chunks/a273f80298417edecc07.js +0 -1
  333. package/assets/esri/core/workers/chunks/a2ed7a3cd518dd136ec7.js +0 -1
  334. package/assets/esri/core/workers/chunks/a6a7279b09d7962147ec.js +0 -1
  335. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +0 -1
  336. package/assets/esri/core/workers/chunks/acb9c166259872828646.js +0 -1
  337. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +0 -1
  338. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +0 -1
  339. package/assets/esri/core/workers/chunks/b32c1b60896a72e0ae90.js +0 -1
  340. package/assets/esri/core/workers/chunks/b4bb461955a4c2bce072.js +0 -1
  341. package/assets/esri/core/workers/chunks/b98279213f45a0c27600.js +0 -1
  342. package/assets/esri/core/workers/chunks/ba5b24beebeb703b5919.js +0 -1
  343. package/assets/esri/core/workers/chunks/bd7d19ba0c7d9143a455.js +0 -1
  344. package/assets/esri/core/workers/chunks/bffaf1f20f18c75fad4e.js +0 -1
  345. package/assets/esri/core/workers/chunks/c4f8da6c238eb5e91f91.js +0 -1
  346. package/assets/esri/core/workers/chunks/cdabea4718a7e7d34cb8.js +0 -1
  347. package/assets/esri/core/workers/chunks/ce7155ae63e7bb74be00.js +0 -1
  348. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +0 -1
  349. package/assets/esri/core/workers/chunks/d915d0a30d9beb24bd3a.js +0 -1
  350. package/assets/esri/core/workers/chunks/dc6538a2d5a1e60d0209.js +0 -1
  351. package/assets/esri/core/workers/chunks/dca633ae3bfd4a3f9bb3.js +0 -1
  352. package/assets/esri/core/workers/chunks/dfa7976085f7408a366c.js +0 -1
  353. package/assets/esri/core/workers/chunks/e0a5b499b3ae38c21278.js +0 -1
  354. package/assets/esri/core/workers/chunks/e1a20ba7d6279f59adc0.js +0 -1
  355. package/assets/esri/core/workers/chunks/e49a135a2933306a6105.js +0 -1
  356. package/assets/esri/core/workers/chunks/e9a9174c4d1a0a9effb6.js +0 -1
  357. package/assets/esri/core/workers/chunks/edead1a123860cc74b1b.js +0 -1
  358. package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +0 -1
  359. package/assets/esri/core/workers/chunks/fa9658dbfb921f9c13af.js +0 -1
  360. package/assets/esri/core/workers/chunks/fb5e2b1ced03eef28e96.js +0 -1
  361. package/assets/esri/core/workers/chunks/fd8f4eabb8bbc593dd9c.js +0 -1
  362. package/assets/esri/core/workers/chunks/fe1902d63f610cebd947.js +0 -1
  363. package/layers/graphics/controllers/StreamController.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{removeUnordered as t,filterInPlace as r}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{nextHighestPowerOfTwo as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as s}from"../../../../../core/maybe.js";import{NestedMap as o}from"../../../../../core/NestedMap.js";import a from"../../../../../core/PooledArray.js";import{addMany as n}from"../../../../../core/SetUtils.js";import{property as l}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{copy as u,invert as f,transpose as c}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as m}from"../../../support/buffer/glUtil.js";import{ShaderOutput as g}from"../../core/shaderLibrary/ShaderOutput.js";import{SyncRenderPlugin as p}from"../../effects/RenderPlugin.js";import{GLMaterials as y}from"../../lib/GLMaterials.js";import{DirtyState as _}from"../../lib/ModelDirtyTypes.js";import{RenderSlot as b}from"../../lib/RenderSlot.js";import{assert as w}from"../../lib/Util.js";import{DrawParameters as v}from"../DrawParameters.js";import{BufferRange as C,mergeAdjacentRanges as O}from"./BufferRange.js";import{Instance as A}from"./Instance.js";import{PerBufferData as E,hasVao as B}from"./PerBufferData.js";import{PerOriginData as M}from"./PerOriginData.js";import{defaultHighlightName as x}from"../../../../support/HighlightDefaults.js";let D=class extends p{get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(e){return this._highlightNames.has(e)}constructor(e){super(e),this._dataByOrigin=new Map,this._drawParameters=new v,this._highlightNames=new Set,this.drapedPriority=0,this._produces=new Map,this._hasOccludees=!1}destroy(){this._glMaterials=s(this._glMaterials),this._dataByOrigin.forEach(e=>e.dispose()),this._dataByOrigin.clear(),this._vaoCache=null}initialize(){this._updateProduces()}_updateProduces(){this.material.produces.forEach((e,t)=>{this._produces.set(t,t=>!(0===this._dataByOrigin.size||!(t!==g.Highlight&&t!==g.ShadowHighlight||this._hasHighlights))&&e(t))})}initializeRenderContext(e){F??=e.renderContext.rctx.isAssumedMetalDriver,this._glMaterials=new y(this.material,e.materials),this._bufferWriter=this.material.createBufferWriter(),this._vaoCache=e.renderContext.rctx.getVaoCache(this.material.vertexAttributeLocations,m(this._bufferWriter.vertexBufferLayout))}uninitializeRenderContext(){}get produces(){return this._produces}get hasOccludees(){return this._hasOccludees}get hasEmissions(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get numGeometries(){let e=0;return this._dataByOrigin.forEach(t=>e+=t.buffers.reduce((e,t)=>e+t.instances.size,0)),e}get usedMemory(){let e=0;return this._dataByOrigin.forEach(t=>e+=t.buffers.reduce((e,t)=>e+t.vao.cachedMemory,0)),e}forEachGeometry(e){this._dataByOrigin.forEach(t=>t.buffers.forEach(t=>t.instances.forEach(({geometry:t})=>e(t))))}modify(e,t){this._applyUpdates(e,t),this._applyAddsAndRemoves(e),this._updateDrawCommands()}get canCompact(){for(const e of this._dataByOrigin.values())if(e.buffers.some(e=>e.holes.length>1))return!0;return!1}compact(e){if(!this.canCompact)return!1;let t=!1;for(const r of this._dataByOrigin.values()){const i=new Array;for(let t=0;t<r.buffers.length&&!e.done;){const s=r.buffers[t];s.holes.length<=1?++t:(s.instances.forEach(({geometry:e})=>i.push(e)),this._vaoCache.deleteVao(s.vao),r.buffers[t]=r.buffers[r.buffers.length-1],--r.buffers.length,e.madeProgress())}if(i.length>0){for(r.buffers.forEach(e=>this._applyAdds(e,i));i.length>0;)r.buffers.push(this._applyAndRebuild(new E,i,null));t=!0}}return t}updateHighlights(e){this.highlightOrderMap=e,this._highlightNames.clear(),this._dataByOrigin.forEach(t=>{t.buffers.forEach(t=>{t.updateHighlights(e),t.highlightNames.forEach(e=>this._highlightNames.add(e))})}),this._updateProduces()}_applyUpdates(e,t){const r=this._bufferWriter;if(null==r)return void e.clearUpdates();const i=r.vertexBufferLayout.stride/4;for(const s of e.updates){if(t.done)return;const{renderGeometry:o,updateType:a}=s;e.pending.updates.removeUnordered(s),t.madeProgress();const n=this._dataByOrigin.get(o.localOrigin.id),l=n?.findBuffer(o.id);if(null==l)return;const h=l.instances.get(o.id);if(a&(_.GEOMETRY|_.TRANSFORMATION)){const e=U(r.elementCount(h.geometry.geometry.attributes)*i),t=r.vertexBufferLayout.createView(e.buffer);this._writeGeometry(o,t,0),l.vao.vertexBuffers.get("geometry").setSubData(e,h.from*i,0,h.numElements*i)}a&(_.HIGHLIGHT|_.OCCLUDEE|_.VISIBILITY)&&(l.drawCommandsDirty=!0)}}_computeDeltas(e,t){const r=new o;for(const i of e){const e=i.localOrigin;if(null==e)continue;let t=r.get(e.id,null);null==t&&(t=new H(e.vec3),r.set(e.id,null,t)),t.changes.push(i)}for(const i of t){const e=i.localOrigin;if(null==e)continue;const t=this._dataByOrigin.get(e.id),s=t?.findBuffer(i.id);if(null==s)continue;let o=r.get(e.id,s);null==o&&(o=new H(e.vec3),r.set(e.id,s,o)),o.changes.push(i)}return r}_applyAddsAndRemoves(e){const{_bufferWriter:r,_dataByOrigin:i,_vaoCache:s}=this;if(null==r||null==s)return void e.clearAddsAndRemoves();const o=r.vertexBufferLayout.stride/4,a=this._computeDeltas(e.adds,e.removes);a.forEach((e,n)=>{const l=e.get(null),h=l?.changes??[];a.delete(n,null);let u=i.get(n);if(e.forEach((e,l)=>{if(a.delete(n,l),null==l&&w(!1,"No VAO for removed geometries"),l.instances.size===e.changes.length)return s.deleteVao(l.vao),t(u.buffers,l),void(0===u.buffers.length&&0===h.length&&i.delete(n));const f=l.numElements,c=l.vao.getByteLength("geometry")/4,d=h.reduce((e,t)=>e+r.elementCount(t.geometry.attributes),0),m=e.changes.reduce((e,t)=>e+r.elementCount(t.geometry.attributes),0),g=Math.min((f+d-m)*o,W),p=g>c;g>N&&g<c/2?(e.changes.forEach(({id:e})=>l.deleteInstance(e)),l.instances.forEach(({geometry:e})=>h.push(e)),this._vaoCache.deleteVao(l.vao),t(u.buffers,l)):p?this._applyAndRebuild(l,h,e):this._applyRemoves(l,e)}),h.length>0)for(null==u&&(u=new M(l.origin),i.set(n,u)),u.buffers.forEach(e=>this._applyAdds(e,h));h.length>0;)u.buffers.push(this._applyAndRebuild(new E,h,null))}),e.clearAddsAndRemoves()}_updateDrawCommands(){this._highlightNames.clear(),this._hasOccludees=!1,this._dataByOrigin.forEach(e=>{e.buffers.forEach(e=>{e.updateIfDrawCommandsDirty(this.highlightOrderMap,this._bufferWriter.vertexBufferLayout.stride),e.hasHighlights&&n(this._highlightNames,e.highlightNames),this._hasOccludees=this._hasOccludees||e.hasOccludees})})}_applyAndRebuild(e,t,r){if(r)for(const d of r.changes)e.deleteInstance(d.id);const i=this._bufferWriter,s=i.vertexBufferLayout.stride,o=s/4,a=Math.floor(W/o);let n=e.numElements;for(;t.length>0;){const r=t.pop(),s=i.elementCount(r.geometry.attributes);if(n+s>a&&n>0){t.push(r);break}n+=s;const o=new A(r,0,0,this.highlightOrderMap);w(null==e.instances.get(r.id)),e.addInstance(r.id,o)}const l=n*o,h=U(l),u=i.vertexBufferLayout.createView(h.buffer);let f=0;e.resetInstanceSummary(),e.instances.forEach((t,r)=>{this._writeGeometry(t.geometry,u,f);const s=f;f+=i.elementCount(t.geometry.geometry.attributes),e.updateInstance(r,s,f),e.updateDrawState(t)}),this._vaoCache.deleteVao(e.vao),e.vao=this._vaoCache.newVao(V(l)),e.vao.vertexBuffers.get("geometry").setSubData(h,0,0,f*o),e.holes.clear();const c=e.holes.pushNew();return c.from=f,c.to=Math.floor(e.vao.getByteLength("geometry")/s),e.updateDrawCommands(this.highlightOrderMap,s),e}_applyRemoves(e,t){if(0===t.changes.length||null==this._bufferWriter)return;let r=1/0,i=-1/0;for(const a of t.changes){const t=a.id,s=e.instances.get(t);if(!s)continue;e.deleteInstance(t),F&&(r=Math.min(r,s.from),i=Math.max(i,s.to));const o=S.back();if(o){if(o.to===s.from){o.to=s.to;continue}if(o.from===s.to){o.from=s.from;continue}}const n=S.pushNew();n.from=s.from,n.to=s.to}O(S);const s=this._bufferWriter.vertexBufferLayout.stride/4,o=e.vao.vertexBuffers.get("geometry");if(F){const t=(i-r)*s,a=U(t),n=this._bufferWriter.vertexBufferLayout.createView(a.buffer);a.fill(0,0,t),e.instances.forEach(e=>{if(!(e.from>=r&&e.to<=i))return;const t=e.from-r;this._writeGeometry(e.geometry,n,t)}),o.setSubData(a,r*s,0,t)}else{const e=S.reduce((e,t)=>Math.max(e,t.numElements),0)*s,t=U(e);t.fill(0,0,e),S.forAll(e=>o.setSubData(t,e.from*s,0,e.numElements*s))}e.holes.pushArray(S.data,S.length),S.forAll((e,t)=>S.data[t]=null),S.clear(),e.drawCommandsDirty=!0}_applyAdds(e,t){if(0===t.length||null==this._bufferWriter)return;if(!B(e))return void this._applyAndRebuild(e,t,null);const i=this._bufferWriter,s=i.vertexBufferLayout.stride/4,o=e.numElements,a=t.reduce((e,t)=>e+i.elementCount(t.geometry.attributes),0),n=Math.min((o+a)*s,W),l=4*n;if(e.vao.getByteLength("geometry")<V(W-N)&&l>e.vao.getByteLength("geometry"))return void this._applyAndRebuild(e,t,null);O(e.holes);const h=new Array;let u=1/0,f=-1/0;for(const r of t){const t=i.elementCount(r.geometry.attributes),s=R(e.holes,t);h.push(s),F&&null!=s&&(u=Math.min(s,u),f=Math.max(s+t,f))}const c=e.vao.vertexBuffers.get("geometry");let d=0,m=0,g=0;const p=U(F?(f-u)*s:n),y=i.vertexBufferLayout.createView(p.buffer);if(t.forEach((t,r)=>{const o=h[r];if(null==o)return;const a=i.elementCount(t.geometry.attributes);if(!F){if(!(g===o)){const e=g-m;e>0&&c.setSubData(p,m*s,0,e*s),m=o,d=0}this._writeGeometry(t,y,d),d+=a,g=o+a}const n=new A(t,o,o+a,this.highlightOrderMap);w(null==e.instances.get(t.id)),e.addInstance(t.id,n),e.drawCommandsDirty=!0}),F){const t=(f-u)*s;p.fill(0,0,t),e.instances.forEach(e=>{if(!(e.from>=u&&e.to<=f))return;const t=e.from-u;this._writeGeometry(e.geometry,y,t)}),m=u,g=f}const _=g-m;_>0&&c.setSubData(p,m*s,0,_*s),r(t,(e,t)=>null==h[t])}_writeGeometry(e,t,r){null!=this._bufferWriter&&(u(L,e.transformation),L[12]-=e.localOrigin.vec3[0],L[13]-=e.localOrigin.vec3[1],L[14]-=e.localOrigin.vec3[2],f(j,L),c(j,j),this._bufferWriter.write(L,j,e.geometry.attributes,e.geometry.objectAndLayerIdColor,t,r))}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){if(!this.material.shouldRender(e))return null;const{output:t,bind:r}=e,i=this.material.produces.get(r.slot);if(!i?.(t))return null;const{highlight:s,slot:o}=r,a=t===g.ShadowHighlight,n=t===g.Highlight,l=n||a,h=s?.name;if(l&&(0===this._highlightNames.size||n&&h&&!this._highlightNames.has(h)))return null;const u=e=>n&&!!h&&!e.has(h),f=t===g.ShadowExcludeHighlight,c=!(l||f);for(const{buffers:d}of this._dataByOrigin.values())for(const i of d){if(u(i.highlightNames))continue;const s=a?i.drawCommandsHighlights.get(x):l?h?i.drawCommandsHighlights.get(h):i.drawCommandsHighlights.size>0:((f&&i.needsMultipleCommands()?i.drawCommandsShadowHighlightRest:i.drawCommandsDefault)||null)?.length??!1,n=c&&i.drawCommandsOccludees||null;if(s||n?.length){const i=this._glMaterials.load(e.rctx,o,t),s=i?.beginSlot(r);if(s)return s}}return null}render(e,t){const{output:r,bind:i}=e,{slot:s,highlight:o}=i,n=r===g.Highlight,l=o?.name??"";if(n&&!o)return;const h=r===g.ShadowHighlight,u=n||h,f=r===g.ShadowExcludeHighlight,c=!(u||f),d=s===b.OCCLUDER_MATERIAL||s===b.TRANSPARENT_OCCLUDER_MATERIAL?s:null,{rctx:m}=e;m.runAppleAmdDriverHelper();const p=m.bindTechnique(t,i,this.material.parameters);for(const g of this._dataByOrigin.values())for(const e of g.buffers){if(n&&(!e.hasHighlights||!e.drawCommandsHighlights.has(l)))continue;if(h&&(!e.hasHighlights||!e.drawCommandsHighlights.has(x)))continue;const r=()=>{const t=[],r=e.drawCommandsHighlights.get(x)??new a;return r&&t.push(r),t},s=u&&!h?e.drawCommandsHighlights.get(l)??null:null,o=h?r():u?s?[s]:z:f&&e.needsMultipleCommands()?[e.drawCommandsShadowHighlightRest]:[e.drawCommandsDefault],y=o.some(e=>e.length>0),_=c&&e.drawCommandsOccludees||null;if(y||_?.length){if(this._drawParameters.origin=g.origin,p.bindDraw(i,this.material.parameters,this._drawParameters),t.ensureAttributeLocations(e.vao),m.bindVAO(e.vao),y)for(const e of o)m.setPipelineState(t.getPipeline(!1,d)),e.forAll(e=>m.drawArrays(t.primitiveType,e.first,e.count));_?.length&&(m.setPipelineState(t.getPipeline(!0,d)),_.forAll(e=>m.drawArrays(t.primitiveType,e.first,e.count)))}}}static prune(){G=new Float32Array(N)}get test(){}};e([l({constructOnly:!0})],D.prototype,"material",void 0),e([l({})],D.prototype,"highlightOrderMap",void 0),D=e([h("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],D);class H{constructor(e){this.origin=e,this.changes=new Array}}function R(e,t){const r=e.find(e=>e.numElements>=t);if(null==r)return null;const i=r.from;return r.from+=t,r.from>=r.to&&e.removeUnordered(r),i}const L=d(),j=d(),S=new a({allocator:e=>e||new C,deallocator:null}),N=65536,I=4*N,P=1024,T=16777216,W=T/4;let G=new Float32Array(N);function U(e){return G.length<e&&(G=new Float32Array(e)),G}function V(e){const t=4*e;return t<=P?P:t<I?i(t):Math.max(Math.min(Math.ceil(1.5*t/I)*I,T),t)}const z=[];let F;export{D as MergedRenderer,V as sizeForVao};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{removeUnordered as t,filterInPlace as r}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{nextHighestPowerOfTwo as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as s}from"../../../../../core/maybe.js";import{NestedMap as o}from"../../../../../core/NestedMap.js";import a from"../../../../../core/PooledArray.js";import{addMany as n}from"../../../../../core/SetUtils.js";import{property as l}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{copy as u,invert as f,transpose as c}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as d}from"../../../support/buffer/glUtil.js";import{ShaderOutput as g}from"../../core/shaderLibrary/ShaderOutput.js";import{SyncRenderPlugin as p}from"../../effects/RenderPlugin.js";import{GLMaterials as y}from"../../lib/GLMaterials.js";import{DirtyState as _}from"../../lib/ModelDirtyTypes.js";import{RenderSlot as b}from"../../lib/RenderSlot.js";import{assert as w}from"../../lib/Util.js";import{DrawParameters as v}from"../DrawParameters.js";import{BufferRange as A,mergeAdjacentRanges as O}from"./BufferRange.js";import{Instance as C}from"./Instance.js";import{PerBufferData as E,hasVao as B}from"./PerBufferData.js";import{PerOriginData as M}from"./PerOriginData.js";import{defaultHighlightName as x}from"../../../../support/HighlightDefaults.js";var D;!function(e){e[e.Empty=0]="Empty",e[e.None=1]="None",e[e.Some=2]="Some",e[e.All=3]="All"}(D||(D={}));let S=class extends p{get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(e){return this._highlightNames.has(e)}constructor(e){super(e),this._dataByOrigin=new Map,this._drawParameters=new v,this._highlightNames=new Set,this.drapedPriority=0,this._produces=new Map,this._hasOccludees=D.Empty}destroy(){this._glMaterials=s(this._glMaterials),this._dataByOrigin.forEach(e=>e.dispose()),this._dataByOrigin.clear(),this._vaoCache=null}initialize(){this._updateProduces()}_updateProduces(){this.material.produces.forEach((e,t)=>{this._produces.set(t,t=>!(0===this._dataByOrigin.size||!(t!==g.Highlight&&t!==g.ShadowHighlight||this._hasHighlights))&&e(t))})}initializeRenderContext(e){k??=e.renderContext.rctx.isAssumedMetalDriver,this._glMaterials=new y(this.material,e.materials),this._bufferWriter=this.material.createBufferWriter(),this._vaoCache=e.renderContext.rctx.getVaoCache(this.material.vertexAttributeLocations,d(this._bufferWriter.vertexBufferLayout))}uninitializeRenderContext(){}get produces(){return this._produces}get hasOccludees(){return this._hasOccludees===D.Some||this._hasOccludees===D.All}get hasOnlyOccludees(){return this._hasOccludees===D.All}get hasEmissions(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get numGeometries(){let e=0;return this._dataByOrigin.forEach(t=>e+=t.buffers.reduce((e,t)=>e+t.instances.size,0)),e}get usedMemory(){let e=0;return this._dataByOrigin.forEach(t=>e+=t.buffers.reduce((e,t)=>e+t.vao.cachedMemory,0)),e}forEachGeometry(e){this._dataByOrigin.forEach(t=>t.buffers.forEach(t=>t.instances.forEach(({geometry:t})=>e(t))))}modify(e,t){this._applyUpdates(e,t),this._applyAddsAndRemoves(e),this._updateDrawCommands()}get canCompact(){for(const e of this._dataByOrigin.values())if(e.buffers.some(e=>e.holes.length>1))return!0;return!1}compact(e){if(!this.canCompact)return!1;let t=!1;for(const r of this._dataByOrigin.values()){const i=new Array;for(let t=0;t<r.buffers.length&&!e.done;){const s=r.buffers[t];s.holes.length<=1?++t:(s.instances.forEach(({geometry:e})=>i.push(e)),this._vaoCache.deleteVao(s.vao),r.buffers[t]=r.buffers[r.buffers.length-1],--r.buffers.length,e.madeProgress())}if(i.length>0){for(r.buffers.forEach(e=>this._applyAdds(e,i));i.length>0;)r.buffers.push(this._applyAndRebuild(new E,i,null));t=!0}}return t}updateHighlights(e){this.highlightOrderMap=e,this._highlightNames.clear(),this._dataByOrigin.forEach(t=>{t.buffers.forEach(t=>{t.updateHighlights(e),t.highlightNames.forEach(e=>this._highlightNames.add(e))})}),this._updateProduces()}_applyUpdates(e,t){const r=this._bufferWriter;if(null==r)return void e.clearUpdates();const i=r.vertexBufferLayout.stride/4;for(const s of e.updates){if(t.done)return;const{renderGeometry:o,updateType:a}=s;e.pending.updates.removeUnordered(s),t.madeProgress();const n=this._dataByOrigin.get(o.localOrigin.id),l=n?.findBuffer(o.id);if(null==l)return;const h=l.instances.get(o.id);if(a&(_.GEOMETRY|_.TRANSFORMATION)){const e=V(r.elementCount(h.geometry.geometry.attributes)*i),t=r.vertexBufferLayout.createView(e.buffer);this._writeGeometry(o,t,0),l.vao.vertexBuffers.get("geometry").setSubData(e,h.from*i,0,h.numElements*i)}a&(_.HIGHLIGHT|_.OCCLUDEE|_.VISIBILITY)&&(l.drawCommandsDirty=!0)}}_computeDeltas(e,t){const r=new o;for(const i of e){const e=i.localOrigin;if(null==e)continue;let t=r.get(e.id,null);null==t&&(t=new H(e.vec3),r.set(e.id,null,t)),t.changes.push(i)}for(const i of t){const e=i.localOrigin;if(null==e)continue;const t=this._dataByOrigin.get(e.id),s=t?.findBuffer(i.id);if(null==s)continue;let o=r.get(e.id,s);null==o&&(o=new H(e.vec3),r.set(e.id,s,o)),o.changes.push(i)}return r}_applyAddsAndRemoves(e){const{_bufferWriter:r,_dataByOrigin:i,_vaoCache:s}=this;if(null==r||null==s)return void e.clearAddsAndRemoves();const o=r.vertexBufferLayout.stride/4,a=this._computeDeltas(e.adds,e.removes);a.forEach((e,n)=>{const l=e.get(null),h=l?.changes??[];a.delete(n,null);let u=i.get(n);if(e.forEach((e,l)=>{if(a.delete(n,l),null==l&&w(!1,"No VAO for removed geometries"),l.instances.size===e.changes.length)return s.deleteVao(l.vao),t(u.buffers,l),void(0===u.buffers.length&&0===h.length&&i.delete(n));const f=l.numElements,c=l.vao.getByteLength("geometry")/4,m=h.reduce((e,t)=>e+r.elementCount(t.geometry.attributes),0),d=e.changes.reduce((e,t)=>e+r.elementCount(t.geometry.attributes),0),g=Math.min((f+m-d)*o,G),p=g>c;g>I&&g<c/2?(e.changes.forEach(({id:e})=>l.deleteInstance(e)),l.instances.forEach(({geometry:e})=>h.push(e)),this._vaoCache.deleteVao(l.vao),t(u.buffers,l)):p?this._applyAndRebuild(l,h,e):this._applyRemoves(l,e)}),h.length>0)for(null==u&&(u=new M(l.origin),i.set(n,u)),u.buffers.forEach(e=>this._applyAdds(e,h));h.length>0;)u.buffers.push(this._applyAndRebuild(new E,h,null))}),e.clearAddsAndRemoves()}_updateDrawCommands(){this._highlightNames.clear();let e=D.Empty;this._dataByOrigin.forEach(t=>{t.buffers.forEach(t=>{t.updateIfDrawCommandsDirty(this.highlightOrderMap,this._bufferWriter.vertexBufferLayout.stride),t.hasHighlights&&n(this._highlightNames,t.highlightNames),t.hasOccludees?(e===D.Empty||e===D.None)&&(e=D.All):(e===D.Empty&&(e=D.None),e===D.All&&(e=D.Some))})}),this._hasOccludees=e}_applyAndRebuild(e,t,r){if(r)for(const m of r.changes)e.deleteInstance(m.id);const i=this._bufferWriter,s=i.vertexBufferLayout.stride,o=s/4,a=Math.floor(G/o);let n=e.numElements;for(;t.length>0;){const r=t.pop(),s=i.elementCount(r.geometry.attributes);if(n+s>a&&n>0){t.push(r);break}n+=s;const o=new C(r,0,0,this.highlightOrderMap);w(null==e.instances.get(r.id)),e.addInstance(r.id,o)}const l=n*o,h=V(l),u=i.vertexBufferLayout.createView(h.buffer);let f=0;e.resetInstanceSummary(),e.instances.forEach((t,r)=>{this._writeGeometry(t.geometry,u,f);const s=f;f+=i.elementCount(t.geometry.geometry.attributes),e.updateInstance(r,s,f),e.updateDrawState(t)}),this._vaoCache.deleteVao(e.vao),e.vao=this._vaoCache.newVao(z(l)),e.vao.vertexBuffers.get("geometry").setSubData(h,0,0,f*o),e.holes.clear();const c=e.holes.pushNew();return c.from=f,c.to=Math.floor(e.vao.getByteLength("geometry")/s),e.updateDrawCommands(this.highlightOrderMap,s),e}_applyRemoves(e,t){if(0===t.changes.length||null==this._bufferWriter)return;let r=1/0,i=-1/0;for(const a of t.changes){const t=a.id,s=e.instances.get(t);if(!s)continue;e.deleteInstance(t),k&&(r=Math.min(r,s.from),i=Math.max(i,s.to));const o=N.back();if(o){if(o.to===s.from){o.to=s.to;continue}if(o.from===s.to){o.from=s.from;continue}}const n=N.pushNew();n.from=s.from,n.to=s.to}O(N);const s=this._bufferWriter.vertexBufferLayout.stride/4,o=e.vao.vertexBuffers.get("geometry");if(k){const t=(i-r)*s,a=V(t),n=this._bufferWriter.vertexBufferLayout.createView(a.buffer);a.fill(0,0,t),e.instances.forEach(e=>{if(!(e.from>=r&&e.to<=i))return;const t=e.from-r;this._writeGeometry(e.geometry,n,t)}),o.setSubData(a,r*s,0,t)}else{const e=N.reduce((e,t)=>Math.max(e,t.numElements),0)*s,t=V(e);t.fill(0,0,e),N.forAll(e=>o.setSubData(t,e.from*s,0,e.numElements*s))}e.holes.pushArray(N.data,N.length),N.forAll((e,t)=>N.data[t]=null),N.clear(),e.drawCommandsDirty=!0}_applyAdds(e,t){if(0===t.length||null==this._bufferWriter)return;if(!B(e))return void this._applyAndRebuild(e,t,null);const i=this._bufferWriter,s=i.vertexBufferLayout.stride/4,o=e.numElements,a=t.reduce((e,t)=>e+i.elementCount(t.geometry.attributes),0),n=Math.min((o+a)*s,G),l=4*n;if(e.vao.getByteLength("geometry")<z(G-I)&&l>e.vao.getByteLength("geometry"))return void this._applyAndRebuild(e,t,null);O(e.holes);const h=new Array;let u=1/0,f=-1/0;for(const r of t){const t=i.elementCount(r.geometry.attributes),s=R(e.holes,t);h.push(s),k&&null!=s&&(u=Math.min(s,u),f=Math.max(s+t,f))}const c=e.vao.vertexBuffers.get("geometry");let m=0,d=0,g=0;const p=V(k?(f-u)*s:n),y=i.vertexBufferLayout.createView(p.buffer);if(t.forEach((t,r)=>{const o=h[r];if(null==o)return;const a=i.elementCount(t.geometry.attributes);if(!k){if(!(g===o)){const e=g-d;e>0&&c.setSubData(p,d*s,0,e*s),d=o,m=0}this._writeGeometry(t,y,m),m+=a,g=o+a}const n=new C(t,o,o+a,this.highlightOrderMap);w(null==e.instances.get(t.id)),e.addInstance(t.id,n),e.drawCommandsDirty=!0}),k){const t=(f-u)*s;p.fill(0,0,t),e.instances.forEach(e=>{if(!(e.from>=u&&e.to<=f))return;const t=e.from-u;this._writeGeometry(e.geometry,y,t)}),d=u,g=f}const _=g-d;_>0&&c.setSubData(p,d*s,0,_*s),r(t,(e,t)=>null==h[t])}_writeGeometry(e,t,r){null!=this._bufferWriter&&(u(L,e.transformation),L[12]-=e.localOrigin.vec3[0],L[13]-=e.localOrigin.vec3[1],L[14]-=e.localOrigin.vec3[2],f(j,L),c(j,j),this._bufferWriter.write(L,j,e.geometry.attributes,e.geometry.objectAndLayerIdColor,t,r))}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){if(!this.material.shouldRender(e))return null;const{output:t,bind:r}=e,i=this.material.produces.get(r.slot);if(!i?.(t))return null;const{highlight:s,slot:o}=r,a=t===g.ShadowHighlight,n=t===g.Highlight,l=n||a,h=s?.name;if(l&&(0===this._highlightNames.size||n&&h&&!this._highlightNames.has(h)))return null;const u=e=>n&&!!h&&!e.has(h),f=t===g.ShadowExcludeHighlight,c=!(l||f);for(const{buffers:m}of this._dataByOrigin.values())for(const i of m){if(u(i.highlightNames))continue;const s=a?i.drawCommandsHighlights.get(x):l?h?i.drawCommandsHighlights.get(h):i.drawCommandsHighlights.size>0:((f&&i.needsMultipleCommands()?i.drawCommandsShadowHighlightRest:i.drawCommandsDefault)||null)?.length??!1,n=c&&i.drawCommandsOccludees||null;if(s||n?.length){const i=this._glMaterials.load(e.rctx,o,t),s=i?.beginSlot(r);if(s)return s}}return null}render(e,t){const{output:r,bind:i}=e,{slot:s,highlight:o}=i,n=r===g.Highlight,l=o?.name??"";if(n&&!o)return;const h=r===g.ShadowHighlight,u=n||h,f=r===g.ShadowExcludeHighlight,c=!(u||f),m=s===b.OCCLUDER_MATERIAL||s===b.TRANSPARENT_OCCLUDER_MATERIAL?s:null,{rctx:d}=e;d.runAppleAmdDriverHelper();const p=d.bindTechnique(t,i,this.material.parameters);for(const g of this._dataByOrigin.values())for(const e of g.buffers){if(n&&(!e.hasHighlights||!e.drawCommandsHighlights.has(l)))continue;if(h&&(!e.hasHighlights||!e.drawCommandsHighlights.has(x)))continue;const r=()=>{const t=[],r=e.drawCommandsHighlights.get(x)??new a;return r&&t.push(r),t},s=u&&!h?e.drawCommandsHighlights.get(l)??null:null,o=h?r():u?s?[s]:F:f&&e.needsMultipleCommands()?[e.drawCommandsShadowHighlightRest]:[e.drawCommandsDefault],y=o.some(e=>e.length>0),_=c&&e.drawCommandsOccludees||null;if(y||_?.length){if(this._drawParameters.origin=g.origin,p.bindDraw(i,this.material.parameters,this._drawParameters),t.ensureAttributeLocations(e.vao),d.bindVAO(e.vao),y)for(const e of o)d.setPipelineState(t.getPipeline(!1,m)),e.forAll(e=>d.drawArrays(t.primitiveType,e.first,e.count));_?.length&&(d.setPipelineState(t.getPipeline(!0,m)),_.forAll(e=>d.drawArrays(t.primitiveType,e.first,e.count)))}}}static prune(){U=new Float32Array(I)}get test(){}};e([l({constructOnly:!0})],S.prototype,"material",void 0),e([l({})],S.prototype,"highlightOrderMap",void 0),S=e([h("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],S);class H{constructor(e){this.origin=e,this.changes=new Array}}function R(e,t){const r=e.find(e=>e.numElements>=t);if(null==r)return null;const i=r.from;return r.from+=t,r.from>=r.to&&e.removeUnordered(r),i}const L=m(),j=m(),N=new a({allocator:e=>e||new A,deallocator:null}),I=65536,P=4*I,T=1024,W=16777216,G=W/4;let U=new Float32Array(I);function V(e){return U.length<e&&(U=new Float32Array(e)),U}function z(e){const t=4*e;return t<=T?T:t<P?i(t):Math.max(Math.min(Math.ceil(1.5*t/P)*P,W),t)}const F=[];let k;export{S as MergedRenderer,D as OccludeeState,z as sizeForVao};
@@ -0,0 +1,17 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{FloatPassUniform as t}from"../core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../core/shaderModules/glsl.js";import{VertexAttribute as e}from"../lib/VertexAttribute.js";var i;function r(r,o){const{attributes:d,varyings:m,vertex:n,fragment:s}=r,{animation:T}=o;T!==i.None&&(d.add(e.TIMESTAMPS,"vec3"),m.add("vTimeStamp","float"),m.add("vFirstTime","float"),m.add("vLastTime","float"),n.main.add(a`vTimeStamp = timeStamps.x;
6
+ vFirstTime = timeStamps.y;
7
+ vLastTime = timeStamps.z;`),s.uniforms.add(new t("timeElapsed",t=>t.timeElapsed)),s.uniforms.add(new t("trailLength",t=>t.trailLength)),T===i.FadingTrail&&s.constants.add("decayRate","float",2.3),s.code.add(a`
8
+ float getTrailOpacity(float x) {
9
+ ${l(T)}
10
+ }`),s.code.add(a`vec4 animate(vec4 color) {
11
+ float totalTimeWithTrail = vLastTime - vFirstTime + trailLength;
12
+ float timeAtHead = mod(timeElapsed - vFirstTime, totalTimeWithTrail) + vFirstTime;
13
+ float t = timeAtHead - vTimeStamp;
14
+ vec4 animatedColor = color * step(0.0, t);
15
+ animatedColor.a *= getTrailOpacity(t / trailLength);
16
+ return animatedColor;
17
+ }`))}function l(t){switch(t){case i.FixedTrail:return"return x >= 0.0 && x <= 1.0 ? 1.0 : 0.0;";case i.FadingTrail:return"float cutOff = exp(-decayRate);\n return (exp(-decayRate * x) - cutOff) / (1.0 - cutOff);";case i.FullTrail:default:return"return 1.0;"}}!function(t){t[t.None=0]="None",t[t.FullTrail=1]="FullTrail",t[t.FixedTrail=2]="FixedTrail",t[t.FadingTrail=3]="FadingTrail",t[t.COUNT=4]="COUNT"}(i||(i={}));export{r as AnimatedLine,i as Animation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/LineStipple.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../lib/VertexAttribute.js";import"./LineMarkerTechniqueConfiguration.js";import"./OutputColorHighlightOID.glsl.js";import"./RibbonLineTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build,r as ribbonlineNumRoundJoinSubdivisions}from"../../../../chunks/RibbonLine.glsl.js";
5
+ import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/LineStipple.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../lib/VertexAttribute.js";import"./AnimatedLine.glsl.js";import"./LineMarkerTechniqueConfiguration.js";import"./OutputColorHighlightOID.glsl.js";import"./RibbonLineTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build,r as ribbonlineNumRoundJoinSubdivisions}from"../../../../chunks/RibbonLine.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{isColorOrColorEmission as e}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i,depthOnlyOutputBuffersOr as r}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as l}from"../lib/OITPass.js";import{OITPolygonOffset as n,depthWrite as s,oitDepthTest as o,blending as u,getDrawBuffers as p}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{stencilToolMaskBaseParams as a,stencilBaseAllZerosParams as d,stencilWriteMaskOn as T,stencilToolTransparentOccluderParams as f,depthCompareAlways as h,stencilToolMaskOccluderParams as m,stencilWriteMaskOff as O,depthCompareLess as E}from"../lib/StencilUtils.js";import{VertexAttribute as P}from"../lib/VertexAttribute.js";import{R}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as A}from"../../../webgl/enums.js";import{makePipelineState as b,defaultColorWrite as g,unpremultipliedAlphaToPremultipliedAlpha as I}from"../../../webgl/renderState.js";class S extends i{constructor(e,i){super(e,i,new t(R,()=>import("./RibbonLine.glsl.js")),_),this.primitiveType=i.wireframe?A.LINES:A.TRIANGLE_STRIP}_makePipelineState(t,i){const{oitPass:c,output:f,hasOccludees:h,hasPolygonOffset:m}=t,O=c===l.NONE,E=c===l.FrontFace;return b({blending:e(f)?u(c):null,depthTest:{func:o(c)},depthWrite:s(t),drawBuffers:r(f,p(c,f)),colorWrite:g,stencilWrite:h?T:null,stencilTest:h?i?a:d:null,polygonOffset:O||E?m?L:null:n})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?L:null,{output:i,hasOccludees:l}=e;this._occluderPipelineTransparent=b({blending:I,polygonOffset:t,depthTest:h,depthWrite:null,colorWrite:g,stencilWrite:null,stencilTest:l?f:null,drawBuffers:r(i)}),this._occluderPipelineOpaque=b({blending:I,polygonOffset:t,depthTest:l?h:E,depthWrite:null,colorWrite:g,stencilWrite:l?O:null,stencilTest:l?m:null,drawBuffers:r(i)}),this._occluderPipelineMaskWrite=b({blending:null,polygonOffset:t,depthTest:E,depthWrite:null,colorWrite:null,stencilWrite:l?T:null,stencilTest:l?a:null,drawBuffers:r(i)})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(e)return this._occludeePipeline;switch(t){case c.TRANSPARENT_OCCLUDER_MATERIAL:return this._occluderPipelineTransparent??super.getPipeline();case c.OCCLUDER_MATERIAL:return this._occluderPipelineOpaque??super.getPipeline();default:return this._occluderPipelineMaskWrite??super.getPipeline()}}}const L={factor:0,units:-4},_=new Map([[P.POSITION,0],[P.PREVIOUSDELTA,1],[P.NEXTDELTA,2],[P.U0,3],[P.LINEPARAMETERS,4],[P.COLOR,5],[P.COLORFEATUREATTRIBUTE,5],[P.SIZE,6],[P.SIZEFEATUREATTRIBUTE,6],[P.OPACITYFEATUREATTRIBUTE,7],[P.OLIDCOLOR,8]]);export{S as RibbonLineTechnique,_ as vertexAttributeLocations};
5
+ import"../../../../core/has.js";import{isColorOrColorEmission as e}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i,depthOnlyOutputBuffersOr as r}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as l}from"../lib/OITPass.js";import{OITPolygonOffset as n,depthWrite as s,oitDepthTest as o,blending as u,getDrawBuffers as p}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{stencilToolMaskBaseParams as a,stencilBaseAllZerosParams as d,stencilWriteMaskOn as T,stencilToolTransparentOccluderParams as f,depthCompareAlways as h,stencilToolMaskOccluderParams as m,stencilWriteMaskOff as E,depthCompareLess as O}from"../lib/StencilUtils.js";import{VertexAttribute as P}from"../lib/VertexAttribute.js";import{R}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as A}from"../../../webgl/enums.js";import{makePipelineState as I,defaultColorWrite as S,unpremultipliedAlphaToPremultipliedAlpha as b}from"../../../webgl/renderState.js";class g extends i{constructor(e,i){super(e,i,new t(R,()=>import("./RibbonLine.glsl.js")),_),this.primitiveType=i.wireframe?A.LINES:A.TRIANGLE_STRIP}_makePipelineState(t,i){const{oitPass:c,output:f,hasOccludees:h,hasPolygonOffset:m}=t,E=c===l.NONE,O=c===l.FrontFace;return I({blending:e(f)?u(c):null,depthTest:{func:o(c)},depthWrite:s(t),drawBuffers:r(f,p(c,f)),colorWrite:S,stencilWrite:h?T:null,stencilTest:h?i?a:d:null,polygonOffset:E||O?m?L:null:n})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?L:null,{output:i,hasOccludees:l}=e;this._occluderPipelineTransparent=I({blending:b,polygonOffset:t,depthTest:h,depthWrite:null,colorWrite:S,stencilWrite:null,stencilTest:l?f:null,drawBuffers:r(i)}),this._occluderPipelineOpaque=I({blending:b,polygonOffset:t,depthTest:l?h:O,depthWrite:null,colorWrite:S,stencilWrite:l?E:null,stencilTest:l?m:null,drawBuffers:r(i)}),this._occluderPipelineMaskWrite=I({blending:null,polygonOffset:t,depthTest:O,depthWrite:null,colorWrite:null,stencilWrite:l?T:null,stencilTest:l?a:null,drawBuffers:r(i)})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(e)return this._occludeePipeline;switch(t){case c.TRANSPARENT_OCCLUDER_MATERIAL:return this._occluderPipelineTransparent??super.getPipeline();case c.OCCLUDER_MATERIAL:return this._occluderPipelineOpaque??super.getPipeline();default:return this._occluderPipelineMaskWrite??super.getPipeline()}}}const L={factor:0,units:-4},_=new Map([[P.POSITION,0],[P.PREVIOUSDELTA,1],[P.NEXTDELTA,2],[P.U0,3],[P.LINEPARAMETERS,4],[P.COLOR,5],[P.COLORFEATUREATTRIBUTE,5],[P.SIZE,6],[P.SIZEFEATUREATTRIBUTE,6],[P.OPACITYFEATUREATTRIBUTE,7],[P.OLIDCOLOR,8],[P.TIMESTAMPS,9]]);export{g as RibbonLineTechnique,_ as vertexAttributeLocations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as e}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";var s;!function(o){o[o.BUTT=0]="BUTT",o[o.SQUARE=1]="SQUARE",o[o.ROUND=2]="ROUND",o[o.COUNT=3]="COUNT"}(s||(s={}));class p extends r{constructor(){super(...arguments),this.capType=s.BUTT,this.hasPolygonOffset=!1,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.roundJoins=!1,this.applyMarkerOffset=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.hasOccludees=!1,this.occluder=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.wireframe=!1,this.discardInvisibleFragments=!1,this.objectAndLayerIdColorInstanced=!1,this.textureCoordinateType=t.None,this.emissionSource=e.None,this.occlusionPass=!1,this.hasVvInstancing=!0,this.hasSliceTranslatedView=!0,this.overlayEnabled=!1,this.snowCover=!1}}o([i({count:s.COUNT})],p.prototype,"capType",void 0),o([i()],p.prototype,"hasPolygonOffset",void 0),o([i()],p.prototype,"writeDepth",void 0),o([i()],p.prototype,"draped",void 0),o([i()],p.prototype,"stippleEnabled",void 0),o([i()],p.prototype,"stippleOffColorEnabled",void 0),o([i()],p.prototype,"stipplePreferContinuous",void 0),o([i()],p.prototype,"roundJoins",void 0),o([i()],p.prototype,"applyMarkerOffset",void 0),o([i()],p.prototype,"vvSize",void 0),o([i()],p.prototype,"vvColor",void 0),o([i()],p.prototype,"vvOpacity",void 0),o([i()],p.prototype,"falloffEnabled",void 0),o([i()],p.prototype,"innerColorEnabled",void 0),o([i()],p.prototype,"hasOccludees",void 0),o([i()],p.prototype,"occluder",void 0),o([i()],p.prototype,"terrainDepthTest",void 0),o([i()],p.prototype,"cullAboveTerrain",void 0),o([i()],p.prototype,"wireframe",void 0),o([i()],p.prototype,"discardInvisibleFragments",void 0),o([i()],p.prototype,"objectAndLayerIdColorInstanced",void 0);export{s as CapType,p as RibbonLineTechniqueConfiguration};
5
+ import{_ as o}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as e}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";import{Animation as s}from"./AnimatedLine.glsl.js";var p;!function(o){o[o.BUTT=0]="BUTT",o[o.SQUARE=1]="SQUARE",o[o.ROUND=2]="ROUND",o[o.COUNT=3]="COUNT"}(p||(p={}));class a extends r{constructor(){super(...arguments),this.capType=p.BUTT,this.hasPolygonOffset=!1,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.roundJoins=!1,this.applyMarkerOffset=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.hasOccludees=!1,this.occluder=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.wireframe=!1,this.discardInvisibleFragments=!1,this.objectAndLayerIdColorInstanced=!1,this.animation=s.FixedTrail,this.textureCoordinateType=t.None,this.emissionSource=e.None,this.occlusionPass=!1,this.hasVvInstancing=!0,this.hasSliceTranslatedView=!0,this.overlayEnabled=!1,this.snowCover=!1}}o([i({count:p.COUNT})],a.prototype,"capType",void 0),o([i()],a.prototype,"hasPolygonOffset",void 0),o([i()],a.prototype,"writeDepth",void 0),o([i()],a.prototype,"draped",void 0),o([i()],a.prototype,"stippleEnabled",void 0),o([i()],a.prototype,"stippleOffColorEnabled",void 0),o([i()],a.prototype,"stipplePreferContinuous",void 0),o([i()],a.prototype,"roundJoins",void 0),o([i()],a.prototype,"applyMarkerOffset",void 0),o([i()],a.prototype,"vvSize",void 0),o([i()],a.prototype,"vvColor",void 0),o([i()],a.prototype,"vvOpacity",void 0),o([i()],a.prototype,"falloffEnabled",void 0),o([i()],a.prototype,"innerColorEnabled",void 0),o([i()],a.prototype,"hasOccludees",void 0),o([i()],a.prototype,"occluder",void 0),o([i()],a.prototype,"terrainDepthTest",void 0),o([i()],a.prototype,"cullAboveTerrain",void 0),o([i()],a.prototype,"wireframe",void 0),o([i()],a.prototype,"discardInvisibleFragments",void 0),o([i()],a.prototype,"objectAndLayerIdColorInstanced",void 0),o([i({count:s.COUNT})],a.prototype,"animation",void 0);export{p as CapType,a as RibbonLineTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import i from"../core/ArrayPool.js";import{watch as s,initial as a}from"../core/reactiveUtils.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";const l={widthBreakpoint:{getValue(e){const i=e.viewSize[0],s=e.breakpoints,a=this.values;return i<=s.xsmall?a.xsmall:i<=s.small?a.small:i<=s.medium?a.medium:i<=s.large?a.large:a.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge",xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},heightBreakpoint:{getValue(e){const i=e.viewSize[1],s=e.breakpoints,a=this.values;return i<=s.xsmall?a.xsmall:i<=s.small?a.small:i<=s.medium?a.medium:i<=s.large?a.large:a.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge",xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},orientation:{getValue(e){const i=e.viewSize,s=i[0],a=i[1],t=this.values;return a>=s?t.portrait:t.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},h={xsmall:544,small:768,medium:992,large:1200};function n(e){const i=e;return i&&i.xsmall<i.small&&i.small<i.medium&&i.medium<i.large}function m(e,i){return i?l[e].valueToClassName[i].split(" "):[]}const o=o=>{let g=class extends o{constructor(...e){super(...e),this.orientation=null,this.widthBreakpoint=null,this.heightBreakpoint=null,this.breakpoints=h}initialize(){this.addHandles(s(()=>[this.breakpoints,this.size],()=>this._updateClassNames(),a))}destroy(){this.destroyed||this._removeActiveClassNames()}set breakpoints(e){if(e===this._get("breakpoints"))return;if(!n(e)){const i=JSON.stringify(h,null,2);console.warn("provided breakpoints are not valid, using defaults:"+i),e=h}this._set("breakpoints",{...e})}_updateClassNames(){if(!this.container)return;const e=i.acquire(),s=i.acquire();let a,t=!1;for(a in l){const i=this[a],r=l[a].getValue({viewSize:this.size,breakpoints:this.breakpoints});i!==r&&(t=!0,this[a]=r,m(a,i).forEach(e=>s.push(e)),m(a,r).forEach(i=>e.push(i)))}t&&(this._applyClassNameChanges(e,s),i.release(e),i.release(s))}_applyClassNameChanges(e,i){const s=this.container;s&&(i.forEach(e=>s.classList.remove(e)),e.forEach(e=>s.classList.add(e)))}_removeActiveClassNames(){const e=this.container;if(!e)return;let i;for(i in l)m(i,this[i]).forEach(i=>e.classList.remove(i))}};return e([t()],g.prototype,"breakpoints",null),e([t()],g.prototype,"orientation",void 0),e([t()],g.prototype,"widthBreakpoint",void 0),e([t()],g.prototype,"heightBreakpoint",void 0),g=e([r("esri.views.BreakpointsOwner")],g),g};export{o as BreakpointsOwner};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import i from"../core/ArrayPool.js";import{watch as s,initial as a}from"../core/reactiveUtils.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";const l={widthBreakpoint:{getValue(e){const i=e.viewSize[0],s=e.breakpoints,a=this.values;return i<=s.xsmall?a.xsmall:i<=s.small?a.small:i<=s.medium?a.medium:i<=s.large?a.large:a.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge",xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},heightBreakpoint:{getValue(e){const i=e.viewSize[1],s=e.breakpoints,a=this.values;return i<=s.xsmall?a.xsmall:i<=s.small?a.small:i<=s.medium?a.medium:i<=s.large?a.large:a.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge",xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},orientation:{getValue(e){const i=e.viewSize,s=i[0],a=i[1],t=this.values;return a>=s?t.portrait:t.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},h={xsmall:544,small:768,medium:992,large:1200};function n(e){const i=e;return i&&i.xsmall<i.small&&i.small<i.medium&&i.medium<i.large}function m(e,i){return i?l[e].valueToClassName[i].split(" "):[]}const o=o=>{const g=o;let w=class extends g{constructor(...e){super(...e),this.orientation=null,this.widthBreakpoint=null,this.heightBreakpoint=null,this.breakpoints=h}initialize(){this.addHandles(s(()=>[this.breakpoints,this.size],()=>this._updateClassNames(),a))}destroy(){this.destroyed||this._removeActiveClassNames()}set breakpoints(e){if(e===this._get("breakpoints"))return;if(!n(e)){const i=JSON.stringify(h,null,2);console.warn("provided breakpoints are not valid, using defaults:"+i),e=h}this._set("breakpoints",{...e})}_updateClassNames(){if(!this.container)return;const e=i.acquire(),s=i.acquire();let a,t=!1;for(a in l){const i=this[a],r=l[a].getValue({viewSize:this.size,breakpoints:this.breakpoints});i!==r&&(t=!0,this[a]=r,m(a,i).forEach(e=>s.push(e)),m(a,r).forEach(i=>e.push(i)))}t&&(this._applyClassNameChanges(e,s),i.release(e),i.release(s))}_applyClassNameChanges(e,i){const s=this.container;s&&(i.forEach(e=>s.classList.remove(e)),e.forEach(e=>s.classList.add(e)))}_removeActiveClassNames(){const e=this.container;if(!e)return;let i;for(i in l)m(i,this[i]).forEach(i=>e.classList.remove(i))}};return e([t()],w.prototype,"breakpoints",null),e([t()],w.prototype,"orientation",void 0),e([t()],w.prototype,"widthBreakpoint",void 0),e([t()],w.prototype,"heightBreakpoint",void 0),w=e([r("esri.views.BreakpointsOwner")],w),w};export{o as BreakpointsOwner};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{byId as t,reparent as s}from"../core/domUtils.js";import{on as i}from"../core/events.js";import{makeHandle as r}from"../core/handleUtils.js";import o from"../core/Logger.js";import{removeMaybe as n}from"../core/maybe.js";import{watch as a,initial as h}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import c from"./overlay/ViewOverlay.js";const p=[0,0];function m(e){const t=(e.ownerDocument||window.document).defaultView,s=e.getBoundingClientRect();return p[0]=s.left+(t?.pageXOffset??0),p[1]=s.top+(t?.pageYOffset??0),p}function f(e){e&&(e.textContent="",e.parentNode&&e.parentNode.removeChild(e))}function y(e){const t=document.createElement("div");return e.appendChild(t),t}const g=16,_=750,v=512,w=2,C=p=>{let C=class extends p{constructor(...e){super(...e),this._freqInfo={freq:g,time:_},this._overlayRenderTaskHandle=null,this.height=0,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([a(()=>this.cursor,e=>{const{surface:t}=this;t&&t.setAttribute("data-cursor",e)}),a(()=>this.navigating,e=>{const{surface:t}=this;t&&t.setAttribute("data-navigating",e.toString())})])}initialize(){this.addHandles([a(()=>this.ui,(e,t)=>this._handleUIChange(e,t),h),this.on("focus",()=>this.notifyChange("focused")),this.on("blur",()=>this.notifyChange("focused"))])}destroy(){this.destroyed||(this.ui?.destroy(),this.container=null)}get container(){return this._get("container")??null}set container(e){const i=this._get("container"),r=t(e);if(r||"string"!=typeof e||o.getLogger(this).error("#container",`element with id '${e}' not found`),i===r)return;if(this._stopMeasuring(),i&&(i.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this.root&&(f(this.root),this._set("root",null)),this.userContent&&(s(this.userContent,i),f(this.userContent),this._set("userContent",null))),!r)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);r.classList.add("esri-view");const h=document.createElement("div");h.className="esri-view-user-storage",s(r,h),r.appendChild(h),this._set("userContent",h);const l=document.createElement("div");l.className="esri-view-root",r.insertBefore(l,r.firstChild),this._set("root",l);const u=document.createElement("div");u.className="esri-view-surface",u.setAttribute("role","application"),u.tabIndex=0,l.appendChild(u),this._set("surface",u);const p=new c;l.appendChild(p.surface),this._set("overlay",p),this.addHandles(a(()=>p.needsRender,e=>{e&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=d({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=n(this._overlayRenderTaskHandle)})),this.forceDOMReadyCycle(),this._set("container",r),this._startMeasuring()}get focused(){const e=document.activeElement===this.surface;return document.hasFocus()&&e}get size(){return[this.width,this.height]}set ui(e){const t=this._get("ui");t!==e&&t?.destroy(),this._set("ui",e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,s){const i=this.position;return e-=i?i[0]:0,t-=i?i[1]:0,s?(s[0]=e,s[1]=t):s=[e,t],s}containerToPage(e,t,s){const i=this.position;return e+=i?i[0]:0,t+=i?i[1]:0,s?(s[0]=e,s[1]=t):s=[e,t],s}_handleUIChange(e,t){this.removeHandles("ui"),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(a(()=>this.root,t=>{e.container=t?y(t):null},h),"ui")),this._set("ui",e)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const e=this._freqInfo;e.freq=g,e.time=_;const t=d({prepare:e=>{const s=this._measure(),i=this._freqInfo;if(i.time+=e.deltaTime,s&&(i.freq=g,this._get("resizing")||this._set("resizing",!0)),i.time<i.freq)return;i.time=0;const r=this._position();i.freq=r||s?g:Math.min(_,i.freq*w),!s&&i.freq>=v&&(t.pause(),this._get("resizing")&&this._set("resizing",!1))}}),s=new ResizeObserver(s=>{e.freq=g,e.time=_,t.resume()});null!=this.container&&s.observe(this.container);const o=r(()=>s.disconnect());this.addHandles([i(window,"resize",()=>{e.freq=g,e.time=_,t.resume()}),o,t],"measuring"),this._measure(),this._position()}_measure(){const e=this.container,t=e?e.clientWidth:0,s=e?e.clientHeight:0;if(0===t||0===s)return this.suspended||this._set("suspended",!0),!1;const i=this.width,r=this.height;return t===i&&s===r?(this.suspended&&this._set("suspended",!1),!1):(this._set("width",t),this._set("height",s),this.suspended&&this._set("suspended",!1),this.emit("resize",{oldWidth:i,oldHeight:r,width:t,height:s}),!0)}_position(){const e=this.container,t=this.position,s=e&&m(e);return!!s&&((!t||s[0]!==t[0]||s[1]!==t[1])&&(this._set("position",[s[0],s[1]]),!0))}forceDOMReadyCycle(){}};return e([l()],C.prototype,"container",null),e([l({readOnly:!0})],C.prototype,"focused",null),e([l({readOnly:!0})],C.prototype,"height",void 0),e([l()],C.prototype,"messagesCommon",void 0),e([l({type:c})],C.prototype,"overlay",void 0),e([l({readOnly:!0})],C.prototype,"position",void 0),e([l({readOnly:!0})],C.prototype,"resizing",void 0),e([l({readOnly:!0})],C.prototype,"root",void 0),e([l({value:null,readOnly:!0})],C.prototype,"size",null),e([l({readOnly:!0})],C.prototype,"surface",void 0),e([l({readOnly:!0})],C.prototype,"suspended",void 0),e([l({nonNullable:!0})],C.prototype,"ui",null),e([l({readOnly:!0})],C.prototype,"userContent",void 0),e([l({readOnly:!0})],C.prototype,"width",void 0),e([l()],C.prototype,"widthBreakpoint",void 0),C=e([u("esri.views.DOMContainer")],C),C};export{C as DOMContainer};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{byId as t,reparent as s}from"../core/domUtils.js";import{on as i}from"../core/events.js";import{makeHandle as r}from"../core/handleUtils.js";import o from"../core/Logger.js";import{removeMaybe as n}from"../core/maybe.js";import{watch as a,initial as h}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import c from"./overlay/ViewOverlay.js";const p=[0,0];function m(e){const t=(e.ownerDocument||window.document).defaultView,s=e.getBoundingClientRect();return p[0]=s.left+(t?.pageXOffset??0),p[1]=s.top+(t?.pageYOffset??0),p}function f(e){e&&(e.textContent="",e.parentNode&&e.parentNode.removeChild(e))}function y(e){const t=document.createElement("div");return e.appendChild(t),t}const g=16,_=750,v=512,w=2,C=p=>{const C=p;let H=class extends C{constructor(...e){super(...e),this._freqInfo={freq:g,time:_},this._overlayRenderTaskHandle=null,this.height=0,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([a(()=>this.cursor,e=>{const{surface:t}=this;t&&t.setAttribute("data-cursor",e)}),a(()=>this.navigating,e=>{const{surface:t}=this;t&&t.setAttribute("data-navigating",e.toString())})])}initialize(){this.addHandles([a(()=>this.ui,(e,t)=>this._handleUIChange(e,t),h),this.on("focus",()=>this.notifyChange("focused")),this.on("blur",()=>this.notifyChange("focused"))])}destroy(){this.destroyed||(this.ui?.destroy(),this.container=null)}get container(){return this._get("container")??null}set container(e){const i=this._get("container"),r=t(e);if(r||"string"!=typeof e||o.getLogger(this).error("#container",`element with id '${e}' not found`),i===r)return;if(this._stopMeasuring(),i&&(i.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this.root&&(f(this.root),this._set("root",null)),this.userContent&&(s(this.userContent,i),f(this.userContent),this._set("userContent",null))),!r)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);r.classList.add("esri-view");const h=document.createElement("div");h.className="esri-view-user-storage",s(r,h),r.appendChild(h),this._set("userContent",h);const l=document.createElement("div");l.className="esri-view-root",r.insertBefore(l,r.firstChild),this._set("root",l);const u=document.createElement("div");u.className="esri-view-surface",u.setAttribute("role","application"),u.tabIndex=0,l.appendChild(u),this._set("surface",u);const p=new c;l.appendChild(p.surface),this._set("overlay",p),this.addHandles(a(()=>p.needsRender,e=>{e&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=d({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=n(this._overlayRenderTaskHandle)})),this.forceDOMReadyCycle(),this._set("container",r),this._startMeasuring()}get focused(){const e=document.activeElement===this.surface;return document.hasFocus()&&e}get size(){return[this.width,this.height]}set ui(e){const t=this._get("ui");t!==e&&t?.destroy(),this._set("ui",e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,s){const i=this.position;return e-=i?i[0]:0,t-=i?i[1]:0,s?(s[0]=e,s[1]=t):s=[e,t],s}containerToPage(e,t,s){const i=this.position;return e+=i?i[0]:0,t+=i?i[1]:0,s?(s[0]=e,s[1]=t):s=[e,t],s}_handleUIChange(e,t){this.removeHandles("ui"),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(a(()=>this.root,t=>{e.container=t?y(t):null},h),"ui")),this._set("ui",e)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const e=this._freqInfo;e.freq=g,e.time=_;const t=d({prepare:e=>{const s=this._measure(),i=this._freqInfo;if(i.time+=e.deltaTime,s&&(i.freq=g,this._get("resizing")||this._set("resizing",!0)),i.time<i.freq)return;i.time=0;const r=this._position();i.freq=r||s?g:Math.min(_,i.freq*w),!s&&i.freq>=v&&(t.pause(),this._get("resizing")&&this._set("resizing",!1))}}),s=new ResizeObserver(s=>{e.freq=g,e.time=_,t.resume()});null!=this.container&&s.observe(this.container);const o=r(()=>s.disconnect());this.addHandles([i(window,"resize",()=>{e.freq=g,e.time=_,t.resume()}),o,t],"measuring"),this._measure(),this._position()}_measure(){const e=this.container,t=e?e.clientWidth:0,s=e?e.clientHeight:0;if(0===t||0===s)return this.suspended||this._set("suspended",!0),!1;const i=this.width,r=this.height;return t===i&&s===r?(this.suspended&&this._set("suspended",!1),!1):(this._set("width",t),this._set("height",s),this.suspended&&this._set("suspended",!1),this.emit("resize",{oldWidth:i,oldHeight:r,width:t,height:s}),!0)}_position(){const e=this.container,t=this.position,s=e&&m(e);return!!s&&((!t||s[0]!==t[0]||s[1]!==t[1])&&(this._set("position",[s[0],s[1]]),!0))}forceDOMReadyCycle(){}};return e([l()],H.prototype,"container",null),e([l({readOnly:!0})],H.prototype,"focused",null),e([l({readOnly:!0})],H.prototype,"height",void 0),e([l()],H.prototype,"messagesCommon",void 0),e([l({type:c})],H.prototype,"overlay",void 0),e([l({readOnly:!0})],H.prototype,"position",void 0),e([l({readOnly:!0})],H.prototype,"resizing",void 0),e([l({readOnly:!0})],H.prototype,"root",void 0),e([l({value:null,readOnly:!0})],H.prototype,"size",null),e([l({readOnly:!0})],H.prototype,"surface",void 0),e([l({readOnly:!0})],H.prototype,"suspended",void 0),e([l({nonNullable:!0})],H.prototype,"ui",null),e([l({readOnly:!0})],H.prototype,"userContent",void 0),e([l({readOnly:!0})],H.prototype,"width",void 0),e([l()],H.prototype,"widthBreakpoint",void 0),H=e([u("esri.views.DOMContainer")],H),H};export{C as DOMContainer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as p}from"../chunks/tslib.es6.js";import{createTask as e}from"../core/asyncUtils.js";import t from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{throwIfAborted as i,wrapAbortWithTimeout as s,allSettledValues as r,createResolver as a}from"../core/promiseUtils.js";import{watch as u,syncAndInitial as n,whenOnce as c}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{ViewEventPriorities as d}from"./input/InputManager.js";function m(p){return null!=p&&"open"in p&&"declaredClass"in p}function f(p){return null!=p&&"declaredClass"in p&&"dockOptions"in p}const w=a=>{let w=class extends a{constructor(){super(...arguments),this._popupSetupTask=null,this.popup={},this.popupEnabled=!0}initialize(){this.addHandles([u(()=>[this.ui,this.popup],([p,e],t)=>{const o="popup",i="manual";if(t){const[p,i]=t;p&&m(i)&&(i.view=null,f(i)&&(p.remove(i,o),i!==e&&e&&i.destroy()))}p&&m(e)&&(e.view=this,f(e)&&p.add(e,{key:o,position:i,internal:!0}))},n),this.on("click",p=>{this.popup&&this.popupEnabled&&("mouse"!==p.pointerType||0===p.button)&&(m(this.popup)?this.popup.viewModel.handleViewClick(p):p.defer(async()=>{await this.setupPopup(),m(this.popup)&&!this.destroyed&&this.ready&&this.popupEnabled&&this.popup.viewModel.handleViewClick(p)}))},d.WIDGET)]),c(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>{import("../widgets/Popup.js")})}destroy(){this.destroyed||this.closePopup()}async openPopup(p){if(m(this.popup))return this.popup.open(p);try{if(await this.setupPopup(),!this.popup)return void o.getLogger(this).error(new t("view:null-popup","Popup is null and can't be opened"));this.popup.open(p)}catch{}}closePopup(){this._popupSetupTask?.abort(),m(this.popup)&&this.popup.close()}async fetchPopupFeatures(p,e){return await this.when(),this._popupHitsToFeatures(await this._getPopupHits(p,e),e)}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!m(this.popup))return this._popupSetupTask=e(async p=>{const{default:e}=await import("../widgets/Popup.js");if(i(p),!this.popup||m(this.popup))return;const t=this.popup;delete t.open,delete t.close,this.popup=new e(t)}),this._popupSetupTask.promise}async _popupHitsToFeatures({location:p,hits:e},t){const o=[],i=[];let a=!1;const u=s(t,has("popup-view-fetch-timeout")??P),n=p=>{const e=new y(p);return i.push(e),o.push(e.promise),e},c=p=>{const e=i.at(-1);return e&&e.layerView===p&&!a?e:n(p)};for(const s of e)if("graphic"in s){c(s.layerView).graphics.push(s.graphic),a=!1}else o.push(s.layerView.fetchPopupFeaturesAtLocation(s.mapPoint,u)),a=!0;i.map(p=>p.resolve(u));const h=r(o).then(p=>p.filter(p=>!!p).flat());return{pendingFeatures:o,allGraphicsPromise:h,location:p}}async _getPopupHits(p,e){const{hits:t,location:o}=await this.popupHitTest(p);i(e);const s=[];for(const i of t)if("graphic"in i){if(this._isValidPopupGraphic(i.graphic,e)){const p=this._isValidPopupGraphicsLayerView(i.layerView)?i.layerView:void 0;s.push({graphic:i.graphic,layerView:p})}}else this._isValidPopupLocationLayerView(i.layerView)&&s.push({mapPoint:i.mapPoint,layerView:i.layerView});return{hits:s,location:o}}_isValidPopupGraphic(p,e){return p&&!!p.getEffectivePopupTemplate(e?.defaultPopupTemplateEnabled)}_isValidPopupGraphicsLayerView(p){return!p||(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesFromGraphics"in p}_isValidPopupLocationLayerView(p){return(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesAtLocation"in p}};return p([h()],w.prototype,"popup",void 0),p([h()],w.prototype,"popupEnabled",void 0),w=p([l("esri.views.PopupView")],w),w};class y{constructor(p){this.layerView=p,this._resolver=a(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(p){const{layerView:e,graphics:t,_resolver:o}=this;if(!e)return o.resolve(t),o.promise;let i;return e.fetchPopupFeaturesFromGraphics(t,p).catch(p=>(i=p,null)).then(p=>{p?o.resolve(p):o.reject(i)}),o.promise}}const P=5e3;export{w as PopupView};
5
+ import{_ as p}from"../chunks/tslib.es6.js";import{createTask as e}from"../core/asyncUtils.js";import t from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{throwIfAborted as i,wrapAbortWithTimeout as s,allSettledValues as r,createResolver as a}from"../core/promiseUtils.js";import{watch as u,syncAndInitial as n,whenOnce as c}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{ViewEventPriorities as d}from"./input/InputManager.js";function m(p){return null!=p&&"open"in p&&"declaredClass"in p}function f(p){return null!=p&&"declaredClass"in p&&"dockOptions"in p}const w=a=>{const w=a;let V=class extends w{constructor(){super(...arguments),this._popupSetupTask=null,this.popup={},this.popupEnabled=!0}initialize(){this.addHandles([u(()=>[this.ui,this.popup],([p,e],t)=>{const o="popup",i="manual";if(t){const[p,i]=t;p&&m(i)&&(i.view=null,f(i)&&(p.remove(i,o),i!==e&&e&&i.destroy()))}p&&m(e)&&(e.view=this,f(e)&&p.add(e,{key:o,position:i,internal:!0}))},n),this.on("click",p=>{this.popup&&this.popupEnabled&&("mouse"!==p.pointerType||0===p.button)&&(m(this.popup)?this.popup.viewModel.handleViewClick(p):p.defer(async()=>{await this.setupPopup(),m(this.popup)&&!this.destroyed&&this.ready&&this.popupEnabled&&this.popup.viewModel.handleViewClick(p)}))},d.WIDGET)]),c(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>{import("../widgets/Popup.js")})}destroy(){this.destroyed||this.closePopup()}async openPopup(p){if(m(this.popup))return this.popup.open(p);try{if(await this.setupPopup(),!this.popup)return void o.getLogger(this).error(new t("view:null-popup","Popup is null and can't be opened"));this.popup.open(p)}catch{}}closePopup(){this._popupSetupTask?.abort(),m(this.popup)&&this.popup.close()}async fetchPopupFeatures(p,e){return await this.when(),this._popupHitsToFeatures(await this._getPopupHits(p,e),e)}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!m(this.popup))return this._popupSetupTask=e(async p=>{const{default:e}=await import("../widgets/Popup.js");if(i(p),!this.popup||m(this.popup))return;const t=this.popup;delete t.open,delete t.close,this.popup=new e(t)}),this._popupSetupTask.promise}async _popupHitsToFeatures({location:p,hits:e},t){const o=[],i=[];let a=!1;const u=s(t,has("popup-view-fetch-timeout")??P),n=p=>{const e=new y(p);return i.push(e),o.push(e.promise),e},c=p=>{const e=i.at(-1);return e&&e.layerView===p&&!a?e:n(p)};for(const s of e)if("graphic"in s){c(s.layerView).graphics.push(s.graphic),a=!1}else o.push(s.layerView.fetchPopupFeaturesAtLocation(s.mapPoint,u)),a=!0;i.map(p=>p.resolve(u));const h=r(o).then(p=>p.filter(p=>!!p).flat());return{pendingFeatures:o,allGraphicsPromise:h,location:p}}async _getPopupHits(p,e){const{hits:t,location:o}=await this.popupHitTest(p);i(e);const s=[];for(const i of t)if("graphic"in i){if(this._isValidPopupGraphic(i.graphic,e)){const p=this._isValidPopupGraphicsLayerView(i.layerView)?i.layerView:void 0;s.push({graphic:i.graphic,layerView:p})}}else this._isValidPopupLocationLayerView(i.layerView)&&s.push({mapPoint:i.mapPoint,layerView:i.layerView});return{hits:s,location:o}}_isValidPopupGraphic(p,e){return p&&!!p.getEffectivePopupTemplate(e?.defaultPopupTemplateEnabled)}_isValidPopupGraphicsLayerView(p){return!p||(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesFromGraphics"in p}_isValidPopupLocationLayerView(p){return(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesAtLocation"in p}};return p([h()],V.prototype,"popup",void 0),p([h()],V.prototype,"popupEnabled",void 0),V=p([l("esri.views.PopupView")],V),V};class y{constructor(p){this.layerView=p,this._resolver=a(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(p){const{layerView:e,graphics:t,_resolver:o}=this;if(!e)return o.resolve(t),o.promise;let i;return e.fetchPopupFeaturesFromGraphics(t,p).catch(p=>(i=p,null)).then(p=>{p?o.resolve(p):o.reject(i)}),o.promise}}const P=5e3;export{w as PopupView};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import r from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import a from"../core/Promise.js";import{watch as n,initial as l,whenOnce as p,syncAndInitial as m}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import u from"../geometry/Point.js";import y from"../geometry/SpatialReference.js";import{load as j,execute as w}from"../geometry/operators/projectOperator.js";import b from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as v}from"../layers/support/MediaElementView.js";import M from"../layers/support/TileInfo.js";import _ from"../layers/support/VideoElement.js";import{DOMContainer as S}from"./DOMContainer.js";import{Viewport2DBaseMixin as C}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as x}from"./Viewport2DMixin.js";import V from"./2d/AnimationManager.js";import E from"./2d/MapViewConstraints.js";import"../core/Error.js";import"../core/scheduling.js";import"../core/Logger.js";import"../core/colorUtils.js";import"../config.js";import"../symbols/cim/defaultCIMValues.js";import"../symbols/cim/enums.js";import"../core/floatRGBA.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"./2d/engine/webgl/definitions.js";import"./2d/engine/webgl/animations/instructions.js";import"../core/mathUtils.js";import"../symbols/Font.js";import"../core/ObjectPool.js";import"../geometry/support/Axis.js";import"../geometry/support/spatialReferenceUtils.js";import"../geometry/support/TileClipper.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/PlacementAtRatioPositions.js";import"../symbols/cim/placements/PlacementInsidePolygon.js";import"../symbols/cim/placements/PlacementOnLine.js";import"../symbols/cim/placements/PlacementOnVertices.js";import"../symbols/cim/placements/PlacementPolygonCenter.js";import"../symbols/cim/constants.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"./2d/engine/webgl/alignmentUtils.js";import"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as P}from"./2d/engine/Container.js";import"./2d/engine/webgl/enums.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"./webgl/enums.js";import"./2d/engine/webgl/shaders/BackgroundPrograms.js";import"./webgl/checkWebGLError.js";import"./2d/engine/webgl/DefaultVertexAttributeLayouts.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/number.js";import"./2d/engine/webgl/shaders/TileInfoPrograms.js";import"./webgl/Texture.js";import"./webgl/FBOAttachmentType.js";import"./2d/engine/vectorTiles/style/StyleDefinition.js";import"./2d/engine/vectorTiles/enums.js";import"./2d/engine/webgl/shaders/BitBlitPrograms.js";import"../request.js";import"../core/urlUtils.js";import"../core/pbf.js";import"./2d/engine/webgl/shaders/StencilPrograms.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueType.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"./2d/engine/webgl/meshing/SimpleMesh.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/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/constants.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"./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"../arcade/ArcadeDate.js";import"../intl/locale.js";import"luxon";import"../core/sql/UnknownTimeZone.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/renderState.js";import"./3d/webgl-engine/core/shaderModules/glsl.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as G}from"./2d/engine/ManagedCanvas.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"../chunks/earcut.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtilsCommon.js";import"../geometry/support/Ellipsoid.js";import"../kernel.js";import"./2d/layers/support/util.js";import D 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/unitUtils.js";import"../geometry/ellipsoidUtils.js";import"../chunks/pe.js";import"../geometry/projection/projectors.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import{ViewStateManager as R}from"./2d/ViewStateManager.js";import q from"./2d/engine/webgl/Overlay.js";import T from"./2d/engine/webgl/OverlayContainer.js";import O from"./navigation/Navigation.js";import z from"./ui/DefaultUI.js";import W from"./ui/video/DefaultUIVideo.js";const A=new t("#000");let U;async function k(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);U=e}const F=.01,H=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let L=class extends s{};L=e([c("esri.views.VideoView.Base")],L);let B=class extends(x(C(S(r.EventedMixin(a.EsriPromiseMixin(L)))))){constructor(e){super(e),this._isValid=!1,this._prevZoomEnabled=!1,this._prevRotationEnabled=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!1,this.layer=null,this.map=null,this.navigation=new O,this.ready=!1,this.spatialReference=new y({wkid:0}),this.stateManager=new R({constraints:new E({view:this,minScale:1,maxScale:F})}),this.type="2d",this.ui=new W,this.view2dType="video",this.addHandles([n(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),n(()=>this.layer,()=>this.addResolvingPromise(p(()=>this.ready)),l),n(()=>this.videoSize,([e,t])=>{this._extent&&e&&t&&(this._extent.xmax=e,this._extent.ymax=t)}),n(()=>[this.layer?.frameEffect,this._effectsContainer],()=>{this._effectsContainer&&(this._effectsContainer.effect=this.layer?.frameEffect??null)},m)])}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"])])))},m)]),this.addResolvingPromise(k().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 preconditionsReady(){return!(!this._isValid||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){return this._operationalDataView&&this._operationalDataView.ready?this._operationalDataView.hitTest(e,t):{screenPoint:e,results:[]}}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:A,groundControlPoints:()=>this.layer?.groundControlPoints},i=new U(this.surface,t,new G(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new V({view:this});this._set("animationManager",s);const r=new D({view:this,animationManager:s});this._set("mapViewNavigation",r),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){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.teardown(),this.frameTask.stop(),this.stationaryManager.clear()}_getViewpoint(){return new i({targetGeometry:new u({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,m),n(()=>this.state.id,()=>e.state=this.state,m),n(()=>this.renderingOptions,t=>e.renderingOptions=t,m)],"video-view"),this._extent=new f({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new v({element:new _({video:this.layer?.videoElement,georeference:new b({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new q(this._videoElementView);this._overlayContainer=new T,this._overlayContainer.addChild(t),this._effectsContainer=new P,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(H).has(e.type),videoWidth:this.videoSize[0],videoHeight:this.videoSize[1],map:t}),p(()=>this._operationalDataView?.ready).then(()=>{e.videoScreenRenderer.visible=this.operationalDataVisible})},m),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),r=e.state.spatialReference;for(let e=0;e<i;e++){const{lat:i,lon:o}=t[e];s[e]=w(new u(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=f.fromJSON({xmin:o,ymin:a,xmax:n,ymax:l,spatialReference:r});await(this._operationalDataView?.goTo(p,{animate:!1}).catch(()=>{}))},m)])}_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>F;r/=2)i.push(r);i.push(F);const{lods:s}=M.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})}};e([h()],B.prototype,"_overlayContainer",void 0),e([h()],B.prototype,"_isValid",void 0),e([h()],B.prototype,"_effectsContainer",void 0),e([h()],B.prototype,"constraintsInfo",null),e([h()],B.prototype,"operationalDataVisible",void 0),e([h()],B.prototype,"layer",void 0),e([h()],B.prototype,"map",void 0),e([h({type:O,nonNullable:!0})],B.prototype,"navigation",void 0),e([h({readOnly:!0})],B.prototype,"preconditionsReady",null),e([h({readOnly:!0})],B.prototype,"ready",void 0),e([h({readOnly:!0})],B.prototype,"rendering",null),e([h()],B.prototype,"scale",null),e([h()],B.prototype,"spatialReference",void 0),e([h()],B.prototype,"stateManager",void 0),e([h()],B.prototype,"type",void 0),e([h(),d(e=>e instanceof z?e:g(W,e))],B.prototype,"ui",void 0),e([h({readOnly:!0})],B.prototype,"videoSize",null),e([h({readOnly:!0})],B.prototype,"view2dType",void 0),B=e([c("esri.views.VideoView")],B);const I=B;export{I as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import r from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import a from"../core/Promise.js";import{watch as n,initial as l,whenOnce as p,syncAndInitial as m}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{ensureClass as g}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import u from"../geometry/Point.js";import j from"../geometry/SpatialReference.js";import{load as y,execute as w}from"../geometry/operators/projectOperator.js";import b from"../layers/support/ExtentAndRotationGeoreference.js";import{MediaElementView as v}from"../layers/support/MediaElementView.js";import M from"../layers/support/TileInfo.js";import _ from"../layers/support/VideoElement.js";import{DOMContainer as S}from"./DOMContainer.js";import{Viewport2DBaseMixin as C}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as V}from"./Viewport2DMixin.js";import x from"./2d/AnimationManager.js";import P from"./2d/MapViewConstraints.js";import"../core/Error.js";import"../core/scheduling.js";import"../core/Logger.js";import"../core/colorUtils.js";import"../config.js";import"../symbols/cim/defaultCIMValues.js";import"../symbols/cim/enums.js";import"../core/floatRGBA.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"./2d/engine/webgl/definitions.js";import"./2d/engine/webgl/animations/instructions.js";import"../core/mathUtils.js";import"../symbols/Font.js";import"../core/ObjectPool.js";import"../geometry/support/Axis.js";import"../geometry/support/spatialReferenceUtils.js";import"../geometry/support/TileClipper.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/PlacementAtRatioPositions.js";import"../symbols/cim/placements/PlacementInsidePolygon.js";import"../symbols/cim/placements/PlacementOnLine.js";import"../symbols/cim/placements/PlacementOnVertices.js";import"../symbols/cim/placements/PlacementPolygonCenter.js";import"../symbols/cim/constants.js";import"../core/libs/gl-matrix-2/factories/vec2f32.js";import"./2d/engine/webgl/alignmentUtils.js";import"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as E}from"./2d/engine/Container.js";import"./2d/engine/webgl/enums.js";import"../core/libs/gl-matrix-2/factories/vec4f32.js";import"./webgl/enums.js";import"./2d/engine/webgl/shaders/BackgroundPrograms.js";import"./webgl/Program.js";import"./2d/engine/webgl/DefaultVertexAttributeLayouts.js";import"./webgl/BufferObject.js";import"./webgl/checkWebGLError.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/number.js";import"./2d/engine/webgl/shaders/TileInfoPrograms.js";import"./webgl/Texture.js";import"./webgl/FBOAttachmentType.js";import"./2d/engine/vectorTiles/style/StyleDefinition.js";import"./2d/engine/vectorTiles/enums.js";import"./2d/engine/webgl/shaders/BitBlitPrograms.js";import"../request.js";import"../core/urlUtils.js";import"../core/pbf.js";import"./2d/engine/webgl/shaders/StencilPrograms.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueType.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"./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/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/constants.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"./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"../arcade/ArcadeDate.js";import"../intl/locale.js";import"luxon";import"../core/sql/UnknownTimeZone.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/renderState.js";import"./3d/webgl-engine/core/shaderModules/glsl.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as G}from"./2d/engine/ManagedCanvas.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"../chunks/earcut.js";import"../core/libs/gl-matrix-2/factories/vec3f32.js";import"../geometry/support/normalizeUtilsCommon.js";import"../geometry/support/Ellipsoid.js";import"../kernel.js";import"./2d/layers/support/util.js";import D 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/unitUtils.js";import"../geometry/ellipsoidUtils.js";import"../chunks/pe.js";import"../geometry/projection/projectors.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../geometry/support/geodesicConstants.js";import{ViewStateManager as R}from"./2d/ViewStateManager.js";import q from"./2d/engine/webgl/Overlay.js";import z from"./2d/engine/webgl/OverlayContainer.js";import T from"./navigation/Navigation.js";import O from"./ui/DefaultUI.js";import W from"./ui/video/DefaultUIVideo.js";const A=new t("#000");let U;async function k(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);U=e}const F=.01,B=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let H=class extends s{};H=e([c("esri.views.VideoView.Base")],H);let L=class extends(V(C(S(r.EventedMixin(a.EsriPromiseMixin(H)))))){constructor(e){super(e),this._isValid=!1,this._prevZoomEnabled=!1,this._prevRotationEnabled=!1,this.stage=null,this.childStage=null,this._operationalDataView=null,this.operationalDataVisible=!1,this.layer=null,this.map=null,this.navigation=new T,this.ready=!1,this.spatialReference=new j({wkid:0}),this.stateManager=new R({constraints:new P({view:this,minScale:1,maxScale:F})}),this.type="2d",this.ui=new W,this.view2dType="video",this.addHandles([n(()=>this.preconditionsReady,e=>e?this._startup():this._teardown()),n(()=>this.layer,()=>this.addResolvingPromise(p(()=>this.ready)),l),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)},m)])}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"])])))},m)]),this.addResolvingPromise(k().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 preconditionsReady(){return!(!this._isValid||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){return this._operationalDataView&&this._operationalDataView.ready?this._operationalDataView.hitTest(e,t):{screenPoint:e,results:[]}}_startup(){if(!this.layer)return;const e=this._getViewpoint();this.stateManager.startup(e,this.size,e.targetGeometry.spatialReference);const t={renderingOptions:this.renderingOptions,backgroundColor:A,groundControlPoints:()=>this.layer?.groundControlPoints,getSize:()=>this.videoSize},i=new U(this.surface,t,new G(this.surface));this.stage=i,this._prepareStage(this.stage),this.childStage=i.childStage,this._prepareChildStage(this.childStage);const s=new x({view:this});this._set("animationManager",s);const r=new D({view:this,animationManager:s});this._set("mapViewNavigation",r),this._updateConstraints(),this.frameTask.start(),this._set("ready",!0)}_teardown(){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.teardown(),this.frameTask.stop(),this.stationaryManager.clear()}_getViewpoint(){return new i({targetGeometry:new u({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,m),n(()=>this.state.id,()=>e.state=this.state,m),n(()=>this.renderingOptions,t=>e.renderingOptions=t,m)],"video-view"),this._extent=new f({xmin:0,ymin:0,xmax:this.videoSize[0],ymax:this.videoSize[1],spatialReference:{wkid:0}}),this._videoElementView=new v({element:new _({video:this.layer?.videoElement,georeference:new b({extent:this._extent}),autoplay:!1}),spatialReference:this.spatialReference});const t=new q(this._videoElementView);this._overlayContainer=new z,this._overlayContainer.addChild(t),this._effectsContainer=new E,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}),p(()=>this._operationalDataView?.ready).then(()=>{e.videoScreenRenderer.visible=this.operationalDataVisible})},m),n(()=>this.layer?.groundControlPoints,async()=>{if(!this.layer?.groundControlPoints||!e.state)return;const t=this.layer.groundControlPoints,i=t?.length;if(!i)return;await y();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]=w(new u(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=f.fromJSON({xmin:o,ymin:a,xmax:n,ymax:l,spatialReference:r});await(this._operationalDataView?.goTo(p,{animate:!1}).catch(()=>{}))},m)])}_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>F;r/=2)i.push(r);i.push(F);const{lods:s}=M.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})}};e([h()],L.prototype,"_overlayContainer",void 0),e([h()],L.prototype,"_isValid",void 0),e([h()],L.prototype,"_effectsContainer",void 0),e([h()],L.prototype,"constraintsInfo",null),e([h()],L.prototype,"operationalDataVisible",void 0),e([h()],L.prototype,"layer",void 0),e([h()],L.prototype,"map",void 0),e([h({type:T,nonNullable:!0})],L.prototype,"navigation",void 0),e([h({readOnly:!0})],L.prototype,"preconditionsReady",null),e([h({readOnly:!0})],L.prototype,"ready",void 0),e([h({readOnly:!0})],L.prototype,"rendering",null),e([h()],L.prototype,"scale",null),e([h()],L.prototype,"spatialReference",void 0),e([h()],L.prototype,"stateManager",void 0),e([h()],L.prototype,"type",void 0),e([h(),d(e=>e instanceof O?e:g(W,e))],L.prototype,"ui",void 0),e([h({readOnly:!0})],L.prototype,"videoSize",null),e([h({readOnly:!0})],L.prototype,"view2dType",void 0),L=e([c("esri.views.VideoView")],L);const I=L;export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import e from"../Viewpoint.js";import{watch as i,sync as n}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import r from"./2d/FrameTask.js";import o from"./2d/MapViewConstraints.js";import{ViewStateManager as p}from"./2d/ViewStateManager.js";import{StationaryManager as l}from"./2d/support/StationaryManager.js";import{ViewEvents as g}from"./input/ViewEvents.js";const d=d=>{let h=class extends d{constructor(...t){super(...t),this.fullOpacity=1,this.stateManager=new p({constraints:new o({view:this})}),this.stationaryManager=new l,this.mapViewNavigation=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!1,labelsAnimationTime:0,labelCollisionsEnabled:!1},this.frameTask=new r(this),this.viewEvents=new g(this),this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([i(()=>this.viewpoint,()=>this.stationaryManager.flip(),n)])}get constraintsInfo(){return{lods:null,spatialReference:null}}get extent(){return this.stateManager?.extent??null}set extent(t){this.stateManager.extent=t}get state(){return this.stateManager.state}get interacting(){return!1}get stationary(){return!this.animation&&this.stationaryManager.stationary}set animation(t){const e=this._get("animation");if(t===e)return;if(e&&e.stop(),t!==this.animationManager.animation&&this.animationManager.stop(),!t||t.isFulfilled())return void this._set("animation",null);this._set("animation",t);const i=()=>{this.destroyed||t===this._get("animation")&&(this._set("animation",null),this.frameTask?.requestFrame())};t.when(i,i)}get constraints(){return this.stateManager?.constraints}set constraints(t){t.view=this;const e=this.stateManager.constraints;this.stateManager.constraints=t,e?.destroy()}get padding(){return this.stateManager?.padding}set padding(t){this.stateManager&&(this.stateManager.padding=t)}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(t){this.stateManager.resizeAlign=t}get rotation(){return this.stateManager.rotation??0}set rotation(t){const{rotationEnabled:e}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=t,this.constraints.rotationEnabled=e}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(t){this.stateManager.viewpoint=t,this.frameTask.requestFrame()}};return t([a({readOnly:!0})],h.prototype,"animationManager",void 0),t([a({readOnly:!0})],h.prototype,"fullOpacity",void 0),t([a()],h.prototype,"stateManager",void 0),t([a()],h.prototype,"constraintsInfo",null),t([a()],h.prototype,"extent",null),t([a({readOnly:!0})],h.prototype,"state",null),t([a({readOnly:!0})],h.prototype,"mapViewNavigation",void 0),t([a()],h.prototype,"renderingOptions",void 0),t([a({readOnly:!0})],h.prototype,"interacting",null),t([a()],h.prototype,"stationary",null),t([a()],h.prototype,"animation",null),t([a({type:o})],h.prototype,"constraints",null),t([a()],h.prototype,"padding",null),t([a()],h.prototype,"resizeAlign",null),t([a()],h.prototype,"rotation",null),t([a({readOnly:!0})],h.prototype,"viewEvents",void 0),t([a({type:e})],h.prototype,"viewpoint",null),h=t([s("esri.views.Viewport2DBaseMixin")],h),h};export{d as Viewport2DBaseMixin};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import e from"../Viewpoint.js";import{watch as n,sync as i}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import r from"./2d/FrameTask.js";import o from"./2d/MapViewConstraints.js";import{ViewStateManager as p}from"./2d/ViewStateManager.js";import{StationaryManager as l}from"./2d/support/StationaryManager.js";import{ViewEvents as g}from"./input/ViewEvents.js";const d=d=>{const h=d;let m=class extends h{constructor(...t){super(...t),this.fullOpacity=1,this.stateManager=new p({constraints:new o({view:this})}),this.stationaryManager=new l,this.mapViewNavigation=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!1,labelsAnimationTime:0,labelCollisionsEnabled:!1},this.frameTask=new r(this),this.viewEvents=new g(this),this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([n(()=>this.viewpoint,()=>this.stationaryManager.flip(),i)])}get constraintsInfo(){return{lods:null,spatialReference:null}}get extent(){return this.stateManager?.extent??null}set extent(t){this.stateManager.extent=t}get state(){return this.stateManager.state}get interacting(){return!1}get stationary(){return!this.animation&&this.stationaryManager.stationary}set animation(t){const e=this._get("animation");if(t===e)return;if(e&&e.stop(),t!==this.animationManager.animation&&this.animationManager.stop(),!t||t.isFulfilled())return void this._set("animation",null);this._set("animation",t);const n=()=>{this.destroyed||t===this._get("animation")&&(this._set("animation",null),this.frameTask?.requestFrame())};t.when(n,n)}get constraints(){return this.stateManager?.constraints}set constraints(t){t.view=this;const e=this.stateManager.constraints;this.stateManager.constraints=t,e?.destroy()}get padding(){return this.stateManager?.padding}set padding(t){this.stateManager&&(this.stateManager.padding=t)}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(t){this.stateManager.resizeAlign=t}get rotation(){return this.stateManager.rotation??0}set rotation(t){const{rotationEnabled:e}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=t,this.constraints.rotationEnabled=e}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(t){this.stateManager.viewpoint=t,this.frameTask.requestFrame()}};return t([a({readOnly:!0})],m.prototype,"animationManager",void 0),t([a({readOnly:!0})],m.prototype,"fullOpacity",void 0),t([a()],m.prototype,"stateManager",void 0),t([a()],m.prototype,"constraintsInfo",null),t([a()],m.prototype,"extent",null),t([a({readOnly:!0})],m.prototype,"state",null),t([a({readOnly:!0})],m.prototype,"mapViewNavigation",void 0),t([a()],m.prototype,"renderingOptions",void 0),t([a({readOnly:!0})],m.prototype,"interacting",null),t([a()],m.prototype,"stationary",null),t([a()],m.prototype,"animation",null),t([a({type:o})],m.prototype,"constraints",null),t([a()],m.prototype,"padding",null),t([a()],m.prototype,"resizeAlign",null),t([a()],m.prototype,"rotation",null),t([a({readOnly:!0})],m.prototype,"viewEvents",void 0),t([a({type:e})],m.prototype,"viewpoint",null),m=t([s("esri.views.Viewport2DBaseMixin")],m),m};export{d as Viewport2DBaseMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as e}from"../core/accessorSupport/decorators/subclass.js";import{GoToManager as s}from"./2d/GoToManager.js";import o from"./2d/input/MapViewInputManager.js";import{isSupportedScreenPointEvent as i,createScreenPointFromSupportedEvent as n}from"./support/screenUtils.js";const a=a=>{let p=class extends a{constructor(...t){super(...t),this.goToManager=new s({view:this}),this.inputManager=new o({view:this}),this.addHandles([this.on("resize",t=>this.stateManager.resize(t.width,t.height))])}get interacting(){return this.navigating}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager.stationary}on(t,r,e,s){const o=this.inputManager&&this.viewEvents.on(t,r,e,s);return o||super.on(t,r)}hasEventListener(t){return super.hasEventListener(t)||this.viewEvents.hasHandler(t)}goTo(t,r){return this.goToManager.goTo(t,r)}toMap(t){if(!this.ready)return null;const r=i(t)?n(this,t):t;return this.stateManager.toMap(r)}};return t([r()],p.prototype,"goToManager",void 0),t([r({readOnly:!0})],p.prototype,"interacting",null),t([r()],p.prototype,"stationary",null),t([r({readOnly:!0})],p.prototype,"inputManager",void 0),p=t([e("esri.views.Viewport2DMixin")],p),p};export{a as Viewport2DMixin};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as e}from"../core/accessorSupport/decorators/subclass.js";import{GoToManager as s}from"./2d/GoToManager.js";import o from"./2d/input/MapViewInputManager.js";import{isSupportedScreenPointEvent as i,createScreenPointFromSupportedEvent as n}from"./support/screenUtils.js";const a=a=>{const p=a;let g=class extends p{constructor(...t){super(...t),this.goToManager=new s({view:this}),this.inputManager=new o({view:this}),this.addHandles([this.on("resize",t=>this.stateManager.resize(t.width,t.height))])}get interacting(){return this.navigating}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager.stationary}on(t,r,e,s){const o=this.inputManager&&this.viewEvents.on(t,r,e,s);return o||super.on(t,r)}hasEventListener(t){return super.hasEventListener(t)||this.viewEvents.hasHandler(t)}goTo(t,r){return this.goToManager.goTo(t,r)}toMap(t){if(!this.ready)return null;const r=i(t)?n(this,t):t;return this.stateManager.toMap(r)}};return t([r()],g.prototype,"goToManager",void 0),t([r({readOnly:!0})],g.prototype,"interacting",null),t([r()],g.prototype,"stationary",null),t([r({readOnly:!0})],g.prototype,"inputManager",void 0),g=t([e("esri.views.Viewport2DMixin")],g),g};export{a as Viewport2DMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Graphic.js";import{UndoRedo as o}from"../../UndoRedo.js";import{createTask as r}from"../../core/asyncUtils.js";import i from"../../core/Evented.js";import{makeHandle as s}from"../../core/handleUtils.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as a,syncAndInitial as l,sync as p}from"../../core/reactiveUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{load as h}from"../../geometry/coordinateFormatter.js";import u from"../../layers/GraphicsLayer.js";import{pointEquals as m}from"../../layers/graphics/dehydratedFeatureComparison.js";import{CreateOperationGeometry as y}from"./support/CreateOperationGeometry.js";import{createCircle as g,createEllipse as v,createSquare as f,createRectangle as O,createPolygon as _,createPolyline as w,createMultipoint as C}from"./support/createUtils.js";import{createViewAlignedCoordinateSystem as G}from"./support/surfaceCoordinateSystems.js";import{createTooltipInfos as x,initializeConstraints as V,updateTooltipInfo as U,getConstraintZ as b,unlockConstraintsOnVertexAddOrRemove as k,lockElevationOnVertexAdd as S,getActiveTooltipInfo as j}from"./support/tooltipUtils.js";import{InteractiveToolBase as T}from"../interactive/InteractiveToolBase.js";import L from"../interactive/sketch/SketchOptions.js";import{makeTooltip as H,pasteLocation as R,enterInputModeIfAvailable as z}from"../interactive/tooltip/tooltipCommonUtils.js";import{autorun as A}from"../../core/accessorSupport/trackingUtils.js";let E=class extends(i.EventedMixin(T)){constructor(t){super(t),this._graphic=null,this._coordinateFormatterLoadTask=null,this._createOperationGeometry=null,this.defaultZ=0,this.directionOptions=null,this.elevationLockOnVertexAddDisabled=!1,this.geometryType=null,this.hasZ=!0,this.geometryToPlace=null,this.snappingManager=null,this.snapToScene=!1,this.sketchOptions=new L}initialize(){const{view:t}=this;this.internalGraphicsLayer=new u({listMode:"hide",internal:!0}),this.view.map.layers.add(this.internalGraphicsLayer);const e=this.drawOperation=this.makeDrawOperation();this.tooltipInfos=x(t.type,this.sketchOptions);const o=H(()=>({view:t,options:this.sketchOptions.tooltips}));this.tooltip=o,V(this._tooltipsContext),this._coordinateFormatterLoadTask=r(()=>h()),this.addHandles([e.on("vertex-add",t=>this.onVertexAdd(t)),e.on("vertex-remove",t=>this.onVertexRemove(t)),e.on("vertex-update",t=>this.onVertexUpdate(t)),e.on("cursor-update",t=>this.onCursorUpdate(t)),e.on("cursor-remove",()=>this._updateGraphic()),e.on("complete",t=>this.onComplete(t)),this._coordinateFormatterLoadTask,o.on("paste",t=>R(t,this.activeTooltipInfo)),a(()=>this.cursor,t=>{e.cursor=t},l),A(()=>{const{activeTooltipInfo:t,sketchOptions:e}=this;U(t,this._tooltipsContext),o.info=e.tooltips.effectiveEnabled?t:null}),A(()=>{e.constraintZ=b(this._tooltipsContext)},p)]),this.finishToolCreation()}destroy(){this.drawOperation=n(this.drawOperation),this.tooltip=n(this.tooltip),this._destroyAllVisualizations(),this.view.map.remove(this.internalGraphicsLayer),this.internalGraphicsLayer=n(this.internalGraphicsLayer),this._set("view",null)}get _drawSpatialReference(){return this.drawOperation.coordinateHelper.spatialReference}get _tooltipsContext(){const{defaultZ:t,directionOptions:e,drawOperation:o,forceUniformSize:r,geometryType:i,graphic:s,sketchOptions:n,tooltipInfos:a,view:l,automaticAreaMeasurementUtils:p,automaticLengthMeasurementUtils:c}=this;return{createOperationGeometry:this._createOperationGeometry,defaultZ:t,directionOptions:e,drawOperation:o,forceUniformSize:r,geometryType:i,graphic:s,sketchOptions:n,tooltipInfos:a,view:l,automaticAreaMeasurementUtils:p,automaticLengthMeasurementUtils:c}}get canRedo(){return this.drawOperation.canRedo}get canUndo(){return this.drawOperation.canUndo}set centered(t){this._set("centered",t),this._updateGraphic()}get cursor(){return this._get("cursor")}set cursor(t){this._set("cursor",t)}set enabled(t){this.drawOperation.interactive=t,this._set("enabled",t)}set forceUniformSize(t){this._set("forceUniformSize",t),this._updateGraphic()}get graphic(){return this._graphic}set graphicSymbol(t){this._set("graphicSymbol",t),null!=this._graphic&&(this._graphic.symbol=t)}set mode(t){const e=this.drawOperation;e&&(e.drawingMode=t),this._set("mode",t)}get updating(){return this.drawOperation?.updating??!1}get undoRedo(){const{view:{type:t,map:e}}=this;return"2d"===t&&e&&"undoRedo"in e&&e.undoRedo instanceof o?e.undoRedo:null}set undoRedo(t){this._override("undoRedo",t)}completeCreateOperation(){this.drawOperation.complete()}onInputEvent(t){this.destroyed||z(t,this.tooltip)||this.drawOperation.onInputEvent(t)}redo(){this.drawOperation.redo()}reset(){}undo(){this.drawOperation.undo(),0===this.drawOperation.numCommittedVertices&&V(this._tooltipsContext)}_destroyAllVisualizations(){this.removeHandles(I.outline),this.removeHandles(I.regularVertices),this.removeHandles(I.activeVertex),this.removeHandles(I.activeEdge),this.removeHandles(M)}_createOrUpdateGraphic(t){if(null!=this._graphic)return this.updateGraphicGeometry(t),this._graphic;const o=new e({...this.graphicProperties,symbol:this.graphicSymbol});return this._graphic=o,this.updateGraphicGeometry(t),this.internalGraphicsLayer.add(o),this.addHandles(this.initializeGraphic(o)),this.notifyChange("graphic"),this.addHandles(s(()=>{this.internalGraphicsLayer.remove(o),this._graphic===o&&(this._graphic=null)}),M),o}updateGraphicGeometry(t){this._graphic.geometry=t}_getCreateOperationGeometry(t={operationComplete:!1}){if(null==this.drawOperation)return;const{coordinateHelper:e,view:o,visualizationCursorVertex:r,lastVertex:i,committedVertices:s,geometryIncludingUncommittedVertices:n,numCommittedVertices:a}=this.drawOperation;if(!(a>0||null!=r))return;const l=t.operationComplete?s:n,p=l.length,c=null!=r?e.pointToArray(r):null,d=this._drawSpatialReference,h="3d"===o.type&&"global"===o.viewingMode,u=new y;u.committedVertices=s,u.cursorVertex=c;const{geometryType:x}=this;switch(x){case"point":case"mesh":u.full=e.arrayToPoint(l[0]);break;case"multipoint":u.full=p>0?C(l,d):null;break;case"polyline":case"polygon":p>0&&(u.full="polygon"===x?_([l],d,h,!0):w([l],d,h),u.cursorEdge=null!=c&&i&&!m(r,i)?w([[c,e.pointToArray(i)]],d,h):null,u.outline=p>1?u.full:null);break;case"circle":case"rectangle":{if(u.committedVertices=u.cursorVertex=null,!p)break;const e=G(o,l[0]),r=l[0],i=e.makeMapPoint(r[0]+Z*o.resolution,r[1]);"circle"===x?1===p&&t.operationComplete?u.circle=g([r,i],e,!0):2===p&&(this.forceUniformSize?u.circle=g(l,e,this.centered):u.rectangle=v(l,e,this.centered)):1===p&&t.operationComplete?u.rectangle=f([r,i],e,!0):2===p&&(u.rectangle=this.forceUniformSize?f(l,e,this.centered):O(l,e,this.centered)),u.full=null!=u.circle?u.circle.geometry:u.rectangle?.geometry,u.outline="polygon"===u.full?.type?u.full:null;break}default:return null}return u}initializeGraphic(t){return s()}onComplete(t){if(!this.drawOperation)return;this._updateGraphic();let e=null;if(this.drawOperation.isCompleted){const t=this._getCreateOperationGeometry({operationComplete:!0});null!=t&&(e=this._createOrUpdateGraphic(t.full))}this._createOperationGeometry=null,this.emit("complete",{graphic:e,...t})}onCursorUpdate(t){this._updateGraphic(),this.emit("cursor-update",t)}onDeactivate(){const{drawOperation:t}=this;t&&(t.isCompleted||t.cancel())}onOutlineChanged(t){return s()}onCursorEdgeChanged(t){return s()}onVertexAdd(t){k(this._tooltipsContext),this._updateGraphic(),this.elevationLockOnVertexAddDisabled||S(t.vertices.at(0)?.coordinates,this._tooltipsContext),this.emit("vertex-add",t)}onVertexRemove(t){k(this._tooltipsContext),this._updateGraphic(),this.emit("vertex-remove",t)}onVertexUpdate(t){this._updateGraphic(),this.emit("vertex-update",t)}_updateGraphic(){const t=this._getCreateOperationGeometry();this._createOperationGeometry=t,null!=t?(null!=t.cursorEdge?this.addHandles(this.onCursorEdgeChanged(t.cursorEdge),I.activeEdge):this.removeHandles(I.activeEdge),null!=t.outline?this.addHandles(this.onOutlineChanged(t.outline),I.outline):this.removeHandles(I.outline),null!=t.committedVertices?this.addHandles(this.onRegularVerticesChanged(t.committedVertices),I.regularVertices):this.removeHandles(I.regularVertices),null!=t.cursorVertex?this.addHandles(this.onActiveVertexChanged(t.cursorVertex),I.activeVertex):this.removeHandles(I.activeVertex),null!=t.full?this._createOrUpdateGraphic(t.full):this.removeHandles(M)):this._destroyAllVisualizations()}get activeTooltipInfo(){return this._coordinateFormatterLoadTask?.finished?j(this._tooltipsContext):null}};t([c()],E.prototype,"_coordinateFormatterLoadTask",void 0),t([c()],E.prototype,"_createOperationGeometry",void 0),t([c()],E.prototype,"_tooltipsContext",null),t([c({value:!0})],E.prototype,"centered",null),t([c()],E.prototype,"cursor",null),t([c({nonNullable:!0})],E.prototype,"defaultZ",void 0),t([c({constructOnly:!0})],E.prototype,"directionOptions",void 0),t([c()],E.prototype,"drawOperation",void 0),t([c()],E.prototype,"elevationLockOnVertexAddDisabled",void 0),t([c({value:!0})],E.prototype,"enabled",null),t([c({value:!0})],E.prototype,"forceUniformSize",null),t([c({constructOnly:!0})],E.prototype,"geometryType",void 0),t([c()],E.prototype,"graphic",null),t([c({constructOnly:!0})],E.prototype,"graphicProperties",void 0),t([c()],E.prototype,"graphicSymbol",null),t([c({constructOnly:!0})],E.prototype,"hasZ",void 0),t([c({constructOnly:!0})],E.prototype,"geometryToPlace",void 0),t([c()],E.prototype,"mode",null),t([c()],E.prototype,"snappingManager",void 0),t([c()],E.prototype,"snapToScene",void 0),t([c()],E.prototype,"tooltip",void 0),t([c()],E.prototype,"tooltipInfos",void 0),t([c({constructOnly:!0,type:L})],E.prototype,"sketchOptions",void 0),t([c()],E.prototype,"updating",null),t([c({constructOnly:!0,nonNullable:!0})],E.prototype,"view",void 0),t([c({constructOnly:!0})],E.prototype,"automaticAreaMeasurementUtils",void 0),t([c({constructOnly:!0})],E.prototype,"automaticLengthMeasurementUtils",void 0),t([c({constructOnly:!0})],E.prototype,"undoRedo",null),t([c()],E.prototype,"activeTooltipInfo",null),E=t([d("esri.views.draw.DrawGraphicTool")],E);const M=Symbol("create-operation-graphic"),I={outline:Symbol("outline-visual"),regularVertices:Symbol("regular-vertices-visual"),activeVertex:Symbol("active-vertex-visual"),activeEdge:Symbol("active-edge-visual")};function F(t){switch(t){case"point":case"polyline":case"polygon":case"multipoint":return t;case"circle":case"rectangle":return"segment";case"mesh":return"point"}}const Z=48;export{E as DrawGraphicTool,F as geometryTypeToDrawOperationGeometryType};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Graphic.js";import{UndoRedo as o}from"../../UndoRedo.js";import{createTask as r}from"../../core/asyncUtils.js";import{makeHandle as i}from"../../core/handleUtils.js";import{destroyMaybe as s}from"../../core/maybe.js";import{watch as a,syncAndInitial as n,sync as l}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{load as d}from"../../geometry/coordinateFormatter.js";import h from"../../layers/GraphicsLayer.js";import{pointEquals as u}from"../../layers/graphics/dehydratedFeatureComparison.js";import{CreateOperationGeometry as m}from"./support/CreateOperationGeometry.js";import{createCircle as y,createEllipse as g,createSquare as v,createRectangle as f,createPolygon as O,createPolyline as _,createMultipoint as w}from"./support/createUtils.js";import{createViewAlignedCoordinateSystem as C}from"./support/surfaceCoordinateSystems.js";import{createTooltipInfos as G,initializeConstraints as x,updateTooltipInfo as V,getConstraintZ as U,unlockConstraintsOnVertexAddOrRemove as b,lockElevationOnVertexAdd as k,getActiveTooltipInfo as S}from"./support/tooltipUtils.js";import{InteractiveToolBase as T}from"../interactive/InteractiveToolBase.js";import j from"../interactive/sketch/SketchOptions.js";import{makeTooltip as L,pasteLocation as H,enterInputModeIfAvailable as R}from"../interactive/tooltip/tooltipCommonUtils.js";import{autorun as z}from"../../core/accessorSupport/trackingUtils.js";let A=class extends T{constructor(t){super(t),this._graphic=null,this._coordinateFormatterLoadTask=null,this._createOperationGeometry=null,this.defaultZ=0,this.directionOptions=null,this.elevationLockOnVertexAddDisabled=!1,this.geometryType=null,this.hasZ=!0,this.geometryToPlace=null,this.snappingManager=null,this.snapToScene=!1,this.sketchOptions=new j}initialize(){const{view:t}=this;this.internalGraphicsLayer=new h({listMode:"hide",internal:!0}),this.view.map.layers.add(this.internalGraphicsLayer);const e=this.drawOperation=this.makeDrawOperation();this.tooltipInfos=G(t.type,this.sketchOptions);const o=L(()=>({view:t,options:this.sketchOptions.tooltips}));this.tooltip=o,x(this._tooltipsContext),this._coordinateFormatterLoadTask=r(()=>d()),this.addHandles([e.on("vertex-add",t=>this.onVertexAdd(t)),e.on("vertex-remove",t=>this.onVertexRemove(t)),e.on("vertex-update",t=>this.onVertexUpdate(t)),e.on("cursor-update",t=>this.onCursorUpdate(t)),e.on("cursor-remove",()=>this._updateGraphic()),e.on("complete",t=>this.onComplete(t)),this._coordinateFormatterLoadTask,o.on("paste",t=>H(t,this.activeTooltipInfo)),a(()=>this.cursor,t=>{e.cursor=t},n),z(()=>{const{activeTooltipInfo:t,sketchOptions:e}=this;V(t,this._tooltipsContext),o.info=e.tooltips.effectiveEnabled?t:null}),z(()=>{e.constraintZ=U(this._tooltipsContext)},l)]),this.finishToolCreation()}destroy(){this.drawOperation=s(this.drawOperation),this.tooltip=s(this.tooltip),this._destroyAllVisualizations(),this.view.map.remove(this.internalGraphicsLayer),this.internalGraphicsLayer=s(this.internalGraphicsLayer),this._set("view",null)}get _drawSpatialReference(){return this.drawOperation.coordinateHelper.spatialReference}get _tooltipsContext(){const{defaultZ:t,directionOptions:e,drawOperation:o,forceUniformSize:r,geometryType:i,graphic:s,sketchOptions:a,tooltipInfos:n,view:l,automaticAreaMeasurementUtils:p,automaticLengthMeasurementUtils:c}=this;return{createOperationGeometry:this._createOperationGeometry,defaultZ:t,directionOptions:e,drawOperation:o,forceUniformSize:r,geometryType:i,graphic:s,sketchOptions:a,tooltipInfos:n,view:l,automaticAreaMeasurementUtils:p,automaticLengthMeasurementUtils:c}}get canRedo(){return this.drawOperation.canRedo}get canUndo(){return this.drawOperation.canUndo}set centered(t){this._set("centered",t),this._updateGraphic()}get cursor(){return this._get("cursor")}set cursor(t){this._set("cursor",t)}set enabled(t){this.drawOperation.interactive=t,this._set("enabled",t)}set forceUniformSize(t){this._set("forceUniformSize",t),this._updateGraphic()}get graphic(){return this._graphic}set graphicSymbol(t){this._set("graphicSymbol",t),null!=this._graphic&&(this._graphic.symbol=t)}set mode(t){const e=this.drawOperation;e&&(e.drawingMode=t),this._set("mode",t)}get updating(){return this.drawOperation?.updating??!1}get undoRedo(){const{view:{type:t,map:e}}=this;return"2d"===t&&e&&"undoRedo"in e&&e.undoRedo instanceof o?e.undoRedo:null}set undoRedo(t){this._override("undoRedo",t)}completeCreateOperation(){this.drawOperation.complete()}onInputEvent(t){this.destroyed||R(t,this.tooltip)||this.drawOperation.onInputEvent(t)}redo(){this.drawOperation.redo()}reset(){}undo(){this.drawOperation.undo(),0===this.drawOperation.numCommittedVertices&&x(this._tooltipsContext)}_destroyAllVisualizations(){this.removeHandles(I.outline),this.removeHandles(I.regularVertices),this.removeHandles(I.activeVertex),this.removeHandles(I.activeEdge),this.removeHandles(E)}_createOrUpdateGraphic(t){if(null!=this._graphic)return this.updateGraphicGeometry(t),this._graphic;const o=new e({...this.graphicProperties,symbol:this.graphicSymbol});return this._graphic=o,this.updateGraphicGeometry(t),this.internalGraphicsLayer.add(o),this.addHandles(this.initializeGraphic(o)),this.notifyChange("graphic"),this.addHandles(i(()=>{this.internalGraphicsLayer.remove(o),this._graphic===o&&(this._graphic=null)}),E),o}updateGraphicGeometry(t){this._graphic.geometry=t}_getCreateOperationGeometry(t={operationComplete:!1}){if(null==this.drawOperation)return;const{coordinateHelper:e,view:o,visualizationCursorVertex:r,lastVertex:i,committedVertices:s,geometryIncludingUncommittedVertices:a,numCommittedVertices:n}=this.drawOperation;if(!(n>0||null!=r))return;const l=t.operationComplete?s:a,p=l.length,c=null!=r?e.pointToArray(r):null,d=this._drawSpatialReference,h="3d"===o.type&&"global"===o.viewingMode,G=new m;G.committedVertices=s,G.cursorVertex=c;const{geometryType:x}=this;switch(x){case"point":case"mesh":G.full=e.arrayToPoint(l[0]);break;case"multipoint":G.full=p>0?w(l,d):null;break;case"polyline":case"polygon":p>0&&(G.full="polygon"===x?O([l],d,h,!0):_([l],d,h),G.cursorEdge=null!=c&&i&&!u(r,i)?_([[c,e.pointToArray(i)]],d,h):null,G.outline=p>1?G.full:null);break;case"circle":case"rectangle":{if(G.committedVertices=G.cursorVertex=null,!p)break;const e=C(o,l[0]),r=l[0],i=e.makeMapPoint(r[0]+F*o.resolution,r[1]);"circle"===x?1===p&&t.operationComplete?G.circle=y([r,i],e,!0):2===p&&(this.forceUniformSize?G.circle=y(l,e,this.centered):G.rectangle=g(l,e,this.centered)):1===p&&t.operationComplete?G.rectangle=v([r,i],e,!0):2===p&&(G.rectangle=this.forceUniformSize?v(l,e,this.centered):f(l,e,this.centered)),G.full=null!=G.circle?G.circle.geometry:G.rectangle?.geometry,G.outline="polygon"===G.full?.type?G.full:null;break}default:return null}return G}initializeGraphic(t){return i()}onComplete(t){if(!this.drawOperation)return;this._updateGraphic();let e=null;if(this.drawOperation.isCompleted){const t=this._getCreateOperationGeometry({operationComplete:!0});null!=t&&(e=this._createOrUpdateGraphic(t.full))}this._createOperationGeometry=null,this.emit("complete",{graphic:e,...t})}onCursorUpdate(t){this._updateGraphic(),this.emit("cursor-update",t)}onDeactivate(){const{drawOperation:t}=this;t&&(t.isCompleted||t.cancel())}onOutlineChanged(t){return i()}onCursorEdgeChanged(t){return i()}onVertexAdd(t){b(this._tooltipsContext),this._updateGraphic(),this.elevationLockOnVertexAddDisabled||k(t.vertices.at(0)?.coordinates,this._tooltipsContext),this.emit("vertex-add",t)}onVertexRemove(t){b(this._tooltipsContext),this._updateGraphic(),this.emit("vertex-remove",t)}onVertexUpdate(t){this._updateGraphic(),this.emit("vertex-update",t)}_updateGraphic(){const t=this._getCreateOperationGeometry();this._createOperationGeometry=t,null!=t?(null!=t.cursorEdge?this.addHandles(this.onCursorEdgeChanged(t.cursorEdge),I.activeEdge):this.removeHandles(I.activeEdge),null!=t.outline?this.addHandles(this.onOutlineChanged(t.outline),I.outline):this.removeHandles(I.outline),null!=t.committedVertices?this.addHandles(this.onRegularVerticesChanged(t.committedVertices),I.regularVertices):this.removeHandles(I.regularVertices),null!=t.cursorVertex?this.addHandles(this.onActiveVertexChanged(t.cursorVertex),I.activeVertex):this.removeHandles(I.activeVertex),null!=t.full?this._createOrUpdateGraphic(t.full):this.removeHandles(E)):this._destroyAllVisualizations()}get activeTooltipInfo(){return this._coordinateFormatterLoadTask?.finished?S(this._tooltipsContext):null}};t([p()],A.prototype,"_coordinateFormatterLoadTask",void 0),t([p()],A.prototype,"_createOperationGeometry",void 0),t([p()],A.prototype,"_tooltipsContext",null),t([p({value:!0})],A.prototype,"centered",null),t([p()],A.prototype,"cursor",null),t([p({nonNullable:!0})],A.prototype,"defaultZ",void 0),t([p({constructOnly:!0})],A.prototype,"directionOptions",void 0),t([p()],A.prototype,"drawOperation",void 0),t([p()],A.prototype,"elevationLockOnVertexAddDisabled",void 0),t([p({value:!0})],A.prototype,"enabled",null),t([p({value:!0})],A.prototype,"forceUniformSize",null),t([p({constructOnly:!0})],A.prototype,"geometryType",void 0),t([p()],A.prototype,"graphic",null),t([p({constructOnly:!0})],A.prototype,"graphicProperties",void 0),t([p()],A.prototype,"graphicSymbol",null),t([p({constructOnly:!0})],A.prototype,"hasZ",void 0),t([p({constructOnly:!0})],A.prototype,"geometryToPlace",void 0),t([p()],A.prototype,"mode",null),t([p()],A.prototype,"snappingManager",void 0),t([p()],A.prototype,"snapToScene",void 0),t([p()],A.prototype,"tooltip",void 0),t([p()],A.prototype,"tooltipInfos",void 0),t([p({constructOnly:!0,type:j})],A.prototype,"sketchOptions",void 0),t([p()],A.prototype,"updating",null),t([p({constructOnly:!0,nonNullable:!0})],A.prototype,"view",void 0),t([p({constructOnly:!0})],A.prototype,"automaticAreaMeasurementUtils",void 0),t([p({constructOnly:!0})],A.prototype,"automaticLengthMeasurementUtils",void 0),t([p({constructOnly:!0})],A.prototype,"undoRedo",null),t([p()],A.prototype,"activeTooltipInfo",null),A=t([c("esri.views.draw.DrawGraphicTool")],A);const E=Symbol("create-operation-graphic"),I={outline:Symbol("outline-visual"),regularVertices:Symbol("regular-vertices-visual"),activeVertex:Symbol("active-vertex-visual"),activeEdge:Symbol("active-edge-visual")};function M(t){switch(t){case"point":case"polyline":case"polygon":case"multipoint":return t;case"circle":case"rectangle":return"segment";case"mesh":return"point"}}const F=48;export{A as DrawGraphicTool,M as geometryTypeToDrawOperationGeometryType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import{makeHandle as r}from"../../core/handleUtils.js";import{destroyMaybe as o}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{IDENTITY as a}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{DrawOperation as n}from"./DrawOperation.js";import{ScreenDrawSurface as p}from"./drawSurfaces.js";import{createCircle as c,createSquare as l,createEllipse as d,createRectangle as u}from"./support/createUtils.js";import{AffineCoordinateSystem as m}from"./support/surfaceCoordinateSystems.js";import{InteractiveToolBase as h}from"../interactive/InteractiveToolBase.js";import g from"../overlay/OutlineOverlayItem.js";let y=class extends(t.EventedMixin(h)){constructor(e){super(e),this.drawOperation=null,this._overlayItem=void 0,this.geometryType=null,this.mode=null,this.type="draw-screen"}initialize(){this.drawOperation=this._makeDrawOperation();const e=e=>this.drawOperation?.on(e,t=>{this._updateVisuals(),this.emit(e,t)})??r();this.addHandles([e("vertex-add"),e("vertex-remove"),e("vertex-update"),e("cursor-update"),e("complete")]),this.finishToolCreation()}destroy(){this.drawOperation=o(this.drawOperation),this._set("view",null)}get canRedo(){return!!this.drawOperation?.canRedo}get canUndo(){return!!this.drawOperation?.canUndo}set centeredToggled(e){this._set("centeredToggled",e),this._updateVisuals()}set enabled(e){const{drawOperation:t}=this;t&&(t.interactive=e),this._set("enabled",e)}set uniformSizeToggled(e){this._set("uniformSizeToggled",e),this._updateVisuals()}get updating(){return this.drawOperation?.updating??!1}get cursor(){return this._get("cursor")??"crosshair"}set cursor(e){this._set("cursor",e);const{drawOperation:t}=this;t&&(t.cursor=e)}completeCreateOperation(){this.drawOperation?.complete()}onInputEvent(e){this.destroyed||this.drawOperation?.onInputEvent(e)}redo(){this.drawOperation?.redo()}undo(){this.drawOperation?.undo()}reset(){}_makeDrawOperation(){const{view:e}=this;return new n({view:e,manipulators:this.manipulators,geometryType:v(this.geometryType),drawingMode:this.mode,hasZ:!1,defaultZ:0,snapToSceneEnabled:!1,drawSurface:new p,hasM:!1,snappingManager:null,snappingVisualizer:null,graphic:null,cursor:this.cursor,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}get coordinates(){const{drawOperation:e}=this;if(!e?.geometryIncludingUncommittedVertices.length)return[];const{coordinateHelper:t}=e,r=e.committableVertex,o=e.committedVertices.slice();null!=r&&o.push(t.pointToArray(r));const s=o.length;switch(this.geometryType){case"point":return o.slice(0,1);case"circle":case"rectangle":{const t=new m(a,p.spatialReference),r="circle"===this.geometryType?c:l,i="circle"===this.geometryType?d:u;if(1===s&&e.isCompleted){const e=o[0],s=t.makeMapPoint(e[0]+w,e[1]);return r([e,s],t,!0)?.geometry.rings[0]??[]}if(2===s){const e="rectangle"!==this.geometryType,s=this.centeredToggled!==e,a="rectangle"!==this.geometryType;return(this.uniformSizeToggled!==a?r(o,t,s)?.geometry.rings[0]:i(o,t,s)?.geometry.rings[0])??[]}return[]}}return o}_updateVisuals(){if(!this._overlayItem){const e=new g({strokeDash:[5],strokeDashColor:[255,255,255,255]});this.view.overlay?.addItem(e),this.addHandles(r(()=>{this.view.overlay?.removeItem(e),e?.destroy(),this._overlayItem=void 0})),this._overlayItem=e}this._overlayItem.coordinates=this.coordinates}onDeactivate(){this.drawOperation?.isCompleted||this.drawOperation?.cancel()}};function v(e){switch(e){case"polygon":case"point":return e;case"circle":case"rectangle":return"segment"}}e([s({value:!1})],y.prototype,"centeredToggled",null),e([s()],y.prototype,"drawOperation",void 0),e([s({value:!0})],y.prototype,"enabled",null),e([s({value:!1})],y.prototype,"uniformSizeToggled",null),e([s({constructOnly:!0})],y.prototype,"geometryType",void 0),e([s({constructOnly:!0})],y.prototype,"mode",void 0),e([s({readOnly:!0})],y.prototype,"type",void 0),e([s({readOnly:!0})],y.prototype,"updating",null),e([s({constructOnly:!0,nonNullable:!0})],y.prototype,"view",void 0),e([s({constructOnly:!0})],y.prototype,"automaticLengthMeasurementUtils",void 0),e([s()],y.prototype,"cursor",null),y=e([i("esri.views.draw.DrawScreenTool")],y);const w=48;export{y as DrawScreenTool,v as geometryTypeToDrawOperationGeometryType};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{makeHandle as t}from"../../core/handleUtils.js";import{destroyMaybe as r}from"../../core/maybe.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{IDENTITY as i}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{DrawOperation as a}from"./DrawOperation.js";import{ScreenDrawSurface as n}from"./drawSurfaces.js";import{createCircle as p,createSquare as c,createEllipse as l,createRectangle as d}from"./support/createUtils.js";import{AffineCoordinateSystem as u}from"./support/surfaceCoordinateSystems.js";import{InteractiveToolBase as m}from"../interactive/InteractiveToolBase.js";import h from"../overlay/OutlineOverlayItem.js";let g=class extends m{constructor(e){super(e),this.drawOperation=null,this._overlayItem=void 0,this.geometryType=null,this.mode=null,this.type="draw-screen"}initialize(){this.drawOperation=this._makeDrawOperation();const e=e=>this.drawOperation?.on(e,t=>{this._updateVisuals(),this.emit(e,t)})??t();this.addHandles([e("vertex-add"),e("vertex-remove"),e("vertex-update"),e("cursor-update"),e("complete")]),this.finishToolCreation()}destroy(){this.drawOperation=r(this.drawOperation),this._set("view",null)}get canRedo(){return!!this.drawOperation?.canRedo}get canUndo(){return!!this.drawOperation?.canUndo}set centeredToggled(e){this._set("centeredToggled",e),this._updateVisuals()}set enabled(e){const{drawOperation:t}=this;t&&(t.interactive=e),this._set("enabled",e)}set uniformSizeToggled(e){this._set("uniformSizeToggled",e),this._updateVisuals()}get updating(){return this.drawOperation?.updating??!1}get cursor(){return this._get("cursor")??"crosshair"}set cursor(e){this._set("cursor",e);const{drawOperation:t}=this;t&&(t.cursor=e)}completeCreateOperation(){this.drawOperation?.complete()}onInputEvent(e){this.destroyed||this.drawOperation?.onInputEvent(e)}redo(){this.drawOperation?.redo()}undo(){this.drawOperation?.undo()}reset(){}_makeDrawOperation(){const{view:e}=this;return new a({view:e,manipulators:this.manipulators,geometryType:y(this.geometryType),drawingMode:this.mode,hasZ:!1,defaultZ:0,snapToSceneEnabled:!1,drawSurface:new n,hasM:!1,snappingManager:null,snappingVisualizer:null,graphic:null,cursor:this.cursor,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}get coordinates(){const{drawOperation:e}=this;if(!e?.geometryIncludingUncommittedVertices.length)return[];const{coordinateHelper:t}=e,r=e.committableVertex,o=e.committedVertices.slice();null!=r&&o.push(t.pointToArray(r));const s=o.length;switch(this.geometryType){case"point":return o.slice(0,1);case"circle":case"rectangle":{const t=new u(i,n.spatialReference),r="circle"===this.geometryType?p:c,a="circle"===this.geometryType?l:d;if(1===s&&e.isCompleted){const e=o[0],s=t.makeMapPoint(e[0]+w,e[1]);return r([e,s],t,!0)?.geometry.rings[0]??[]}if(2===s){const e="rectangle"!==this.geometryType,s=this.centeredToggled!==e,i="rectangle"!==this.geometryType;return(this.uniformSizeToggled!==i?r(o,t,s)?.geometry.rings[0]:a(o,t,s)?.geometry.rings[0])??[]}return[]}}return o}_updateVisuals(){if(!this._overlayItem){const e=new h({strokeDash:[5],strokeDashColor:[255,255,255,255]});this.view.overlay?.addItem(e),this.addHandles(t(()=>{this.view.overlay?.removeItem(e),e?.destroy(),this._overlayItem=void 0})),this._overlayItem=e}this._overlayItem.coordinates=this.coordinates}onDeactivate(){this.drawOperation?.isCompleted||this.drawOperation?.cancel()}};function y(e){switch(e){case"polygon":case"point":return e;case"circle":case"rectangle":return"segment"}}e([o({value:!1})],g.prototype,"centeredToggled",null),e([o()],g.prototype,"drawOperation",void 0),e([o({value:!0})],g.prototype,"enabled",null),e([o({value:!1})],g.prototype,"uniformSizeToggled",null),e([o({constructOnly:!0})],g.prototype,"geometryType",void 0),e([o({constructOnly:!0})],g.prototype,"mode",void 0),e([o({readOnly:!0})],g.prototype,"type",void 0),e([o({readOnly:!0})],g.prototype,"updating",null),e([o({constructOnly:!0,nonNullable:!0})],g.prototype,"view",void 0),e([o({constructOnly:!0})],g.prototype,"automaticLengthMeasurementUtils",void 0),e([o()],g.prototype,"cursor",null),g=e([s("esri.views.draw.DrawScreenTool")],g);const w=48;export{g as DrawScreenTool,y as geometryTypeToDrawOperationGeometryType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import{destroyMaybe as o}from"../../core/maybe.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{getEffectiveElevationInfo as n}from"../../support/elevationInfoUtils.js";import{DrawOperation as a}from"./DrawOperation.js";import{ElevationDrawSurface as s,SceneDrawSurface as p}from"./drawSurfaces.js";import{InteractiveToolBase as d}from"../interactive/InteractiveToolBase.js";let l=class extends(e.EventedMixin(d)){constructor(t){super(t),this.defaultZ=0,this.elevationInfo=null,this.hasZ=!0,this.mode=null,this.snapToScene=null,this.type="draw-3d"}initialize(){const t=this.view,e=n(this.hasZ,this.elevationInfo);this.drawOperation=new a({view:t,manipulators:this.manipulators,geometryType:this.geometryType,drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:"3d"===t.type?new p(t,e):null,elevationDrawSurface:"3d"===t.type?new s(e,this.defaultZ,t):null,hasM:!1,elevationInfo:e,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils}),this.addHandles([this.drawOperation.on("vertex-add",t=>this.onVertexAdd(t)),this.drawOperation.on("vertex-remove",t=>this.onVertexRemove(t)),this.drawOperation.on("vertex-update",t=>this.onVertexUpdate(t)),this.drawOperation.on("cursor-update",t=>this.onCursorUpdate(t)),this.drawOperation.on("complete",t=>this.onComplete(t))]),this.finishToolCreation()}destroy(){this.drawOperation=o(this.drawOperation),this._set("view",null)}set enabled(t){this.drawOperation.interactive=t,this._set("enabled",t)}get updating(){return this.drawOperation?.updating??!1}completeCreateOperation(){this.drawOperation.complete()}onDeactivate(){this.drawOperation.isCompleted||this.drawOperation.cancel()}getVertexCoords(){return this.drawOperation.geometryIncludingUncommittedVertices}onInputEvent(t){this.drawOperation.onInputEvent(t)}canRedo(){return this.drawOperation.canRedo}canUndo(){return this.drawOperation.canUndo}redo(){this.drawOperation.redo()}reset(){}undo(){this.drawOperation.undo()}onComplete(t){this.emit("complete",t)}onCursorUpdate(t){this.emit("cursor-update",t)}onVertexAdd(t){this.emit("vertex-add",t)}onVertexRemove(t){this.emit("vertex-remove",t)}onVertexUpdate(t){this.emit("vertex-update",t)}};t([r({constructOnly:!0,nonNullable:!0})],l.prototype,"defaultZ",void 0),t([r()],l.prototype,"drawOperation",void 0),t([r({constructOnly:!0})],l.prototype,"elevationInfo",void 0),t([r({value:!0})],l.prototype,"enabled",null),t([r({constructOnly:!0})],l.prototype,"geometryType",void 0),t([r({constructOnly:!0})],l.prototype,"automaticLengthMeasurementUtils",void 0),t([r({constructOnly:!0})],l.prototype,"hasZ",void 0),t([r({constructOnly:!0})],l.prototype,"mode",void 0),t([r()],l.prototype,"snapToScene",void 0),t([r({readOnly:!0})],l.prototype,"type",void 0),t([r({readOnly:!0})],l.prototype,"updating",null),t([r({constructOnly:!0,nonNullable:!0})],l.prototype,"view",void 0),l=t([i("esri.views.draw.DrawTool")],l);export{l as DrawTool};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import{destroyMaybe as e}from"../../core/maybe.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{getEffectiveElevationInfo as i}from"../../support/elevationInfoUtils.js";import{DrawOperation as n}from"./DrawOperation.js";import{ElevationDrawSurface as a,SceneDrawSurface as s}from"./drawSurfaces.js";import{InteractiveToolBase as p}from"../interactive/InteractiveToolBase.js";let d=class extends p{constructor(t){super(t),this.defaultZ=0,this.elevationInfo=null,this.hasZ=!0,this.mode=null,this.snapToScene=null,this.type="draw-3d"}initialize(){const t=this.view,e=i(this.hasZ,this.elevationInfo);this.drawOperation=new n({view:t,manipulators:this.manipulators,geometryType:this.geometryType,drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:"3d"===t.type?new s(t,e):null,elevationDrawSurface:"3d"===t.type?new a(e,this.defaultZ,t):null,hasM:!1,elevationInfo:e,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils}),this.addHandles([this.drawOperation.on("vertex-add",t=>this.onVertexAdd(t)),this.drawOperation.on("vertex-remove",t=>this.onVertexRemove(t)),this.drawOperation.on("vertex-update",t=>this.onVertexUpdate(t)),this.drawOperation.on("cursor-update",t=>this.onCursorUpdate(t)),this.drawOperation.on("complete",t=>this.onComplete(t))]),this.finishToolCreation()}destroy(){this.drawOperation=e(this.drawOperation),this._set("view",null)}set enabled(t){this.drawOperation.interactive=t,this._set("enabled",t)}get updating(){return this.drawOperation?.updating??!1}completeCreateOperation(){this.drawOperation.complete()}onDeactivate(){this.drawOperation.isCompleted||this.drawOperation.cancel()}getVertexCoords(){return this.drawOperation.geometryIncludingUncommittedVertices}onInputEvent(t){this.drawOperation.onInputEvent(t)}canRedo(){return this.drawOperation.canRedo}canUndo(){return this.drawOperation.canUndo}redo(){this.drawOperation.redo()}reset(){}undo(){this.drawOperation.undo()}onComplete(t){this.emit("complete",t)}onCursorUpdate(t){this.emit("cursor-update",t)}onVertexAdd(t){this.emit("vertex-add",t)}onVertexRemove(t){this.emit("vertex-remove",t)}onVertexUpdate(t){this.emit("vertex-update",t)}};t([o({constructOnly:!0,nonNullable:!0})],d.prototype,"defaultZ",void 0),t([o()],d.prototype,"drawOperation",void 0),t([o({constructOnly:!0})],d.prototype,"elevationInfo",void 0),t([o({value:!0})],d.prototype,"enabled",null),t([o({constructOnly:!0})],d.prototype,"geometryType",void 0),t([o({constructOnly:!0})],d.prototype,"automaticLengthMeasurementUtils",void 0),t([o({constructOnly:!0})],d.prototype,"hasZ",void 0),t([o({constructOnly:!0})],d.prototype,"mode",void 0),t([o()],d.prototype,"snapToScene",void 0),t([o({readOnly:!0})],d.prototype,"type",void 0),t([o({readOnly:!0})],d.prototype,"updating",null),t([o({constructOnly:!0,nonNullable:!0})],d.prototype,"view",void 0),d=t([r("esri.views.draw.DrawTool")],d);export{d as DrawTool};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import{createScalar as e}from"../../../../core/quantityUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{getLongitudeLatitude as s}from"../../../../geometry/support/pointUtils.js";import{makeLongitudeField as r,makeLatitudeField as a,makeXField as l,makeYField as c,makeElevationField as u}from"../fields/fields.js";import{createGeographicCoordinate as p}from"../fields/parsingAndFormattingUtils.js";import{supportsGeodesicMeasurement as n}from"../../../support/geodesicMeasurementUtils.js";const h=h=>{let f=class extends h{constructor(){super(...arguments),this.longitude=r(),this.latitude=a(),this.x=l(),this.y=c(),this.elevation=u(),this.geographic=!1}get effectiveX(){return this.geographic?this.longitude:this.x}get effectiveY(){return this.geographic?this.latitude:this.y}get key(){return{longitude:this.longitude.actual,latitude:this.latitude.actual,x:this.x.actual,y:this.y.actual,elevation:this.elevation.actual,geographic:this.geographic}}setLocationFromPoint(t,i=t?.spatialReference){if(this.geographic=!!i&&n(i),null==t)return this._setActualLonLat(null,null),void this._setActualXY(null,null);if(this.geographic){const e=s(t,g);this._setActualLonLat(p(e?.[0]),p(e?.[1]))}else this._setActualXY(e(t.x),e(t.y))}_setActualLonLat(t,e){this.longitude.actual=t,this.latitude.actual=e}_setActualXY(t,e){this.x.actual=t,this.y.actual=e}};return t([i()],f.prototype,"geographic",void 0),t([i()],f.prototype,"effectiveX",null),t([i()],f.prototype,"effectiveY",null),t([i()],f.prototype,"key",null),f=t([o("esri.views.interactive.tooltip.infos.TooltipInfoWithCoordinates")],f),f},g=[0,0];export{h as TooltipInfoWithCoordinates};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import{createScalar as e}from"../../../../core/quantityUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{getLongitudeLatitude as s}from"../../../../geometry/support/pointUtils.js";import{makeLongitudeField as r,makeLatitudeField as a,makeXField as l,makeYField as c,makeElevationField as u}from"../fields/fields.js";import{createGeographicCoordinate as n}from"../fields/parsingAndFormattingUtils.js";import{supportsGeodesicMeasurement as p}from"../../../support/geodesicMeasurementUtils.js";const h=h=>{const f=h;let m=class extends f{constructor(){super(...arguments),this.longitude=r(),this.latitude=a(),this.x=l(),this.y=c(),this.elevation=u(),this.geographic=!1}get effectiveX(){return this.geographic?this.longitude:this.x}get effectiveY(){return this.geographic?this.latitude:this.y}get key(){return{longitude:this.longitude.actual,latitude:this.latitude.actual,x:this.x.actual,y:this.y.actual,elevation:this.elevation.actual,geographic:this.geographic}}setLocationFromPoint(t,i=t?.spatialReference){if(this.geographic=!!i&&p(i),null==t)return this._setActualLonLat(null,null),void this._setActualXY(null,null);if(this.geographic){const e=s(t,g);this._setActualLonLat(n(e?.[0]),n(e?.[1]))}else this._setActualXY(e(t.x),e(t.y))}_setActualLonLat(t,e){this.longitude.actual=t,this.latitude.actual=e}_setActualXY(t,e){this.x.actual=t,this.y.actual=e}};return t([i()],m.prototype,"geographic",void 0),t([i()],m.prototype,"effectiveX",null),t([i()],m.prototype,"effectiveY",null),t([i()],m.prototype,"key",null),m=t([o("esri.views.interactive.tooltip.infos.TooltipInfoWithCoordinates")],m),m},g=[0,0];export{h as TooltipInfoWithCoordinates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Collection.js";import{handlesGroup as t,makeHandle as s}from"../../core/handleUtils.js";import i from"../../core/Logger.js";import{debounce as a,ignoreAbortErrors as o}from"../../core/promiseUtils.js";import{sqlAnd as n}from"../../core/sql.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";const l=Symbol(),u=u=>{let y=class extends u{constructor(...e){super(...e),this.layerViews=new r,this._debouncedUpdate=a(async()=>{const{layer:e,parent:r}=this,t=r?.footprintLayerView;let s=[];const i=this._createQuery();if(i&&t){const{features:r}=await t.queryFeatures(i);this.suspended||(s=r.map(r=>e.acquireLayer(r)))}this.removeHandles(l),this.addHandles(s,l)})}get creatingLayerViews(){return this.view?.layerViewManager.isCreatingLayerViewsForLayer(this.layer)??!1}isUpdating(){return this.creatingLayerViews||this.layer.updating||this.layerViews.some(e=>e.updating)}enableLayerUpdates(){return t([this._updatingHandles.addWhen(()=>!1===this.parent?.footprintLayerView?.dataUpdating,()=>this.updateLayers()),this._updatingHandles.add(()=>[this.layer.maximumVisibleSublayers,this.layer.parent?.orderBy,this.parent?.footprintLayerView?.filter,this.parent?.footprintLayerView?.timeExtent,this.suspended],()=>this.updateLayers()),s(()=>this.removeHandles(l))])}updateLayers(){this.suspended?this.removeHandles(l):this._updatingHandles.addPromise(o(this._debouncedUpdate()).catch(e=>{i.getLogger(this).error(e)}))}_createQuery(){const e=this.parent?.footprintLayerView,r=this.layer?.parent;if(!e||!r||r.destroyed)return null;const{layer:{maximumVisibleSublayers:t},view:{scale:s}}=this;if(!t)return null;const{itemTypeField:i,itemSourceField:a,itemNameField:o,minScaleField:d,maxScaleField:p,objectIdField:l,orderBy:u}=r,y=n(`${d} IS NULL OR ${s} <= ${d} OR ${d} = 0`,`${p} IS NULL OR ${s} >= ${p}`),c=u?.find(e=>e.field&&!e.valueExpression),m=e.createQuery();if(m.returnGeometry=!1,m.num=t,m.outFields=[l,a,o],m.where=n(m.where,y),null!=this.unsupportedItemTypes){const e=`${i} NOT IN (${this.unsupportedItemTypes.map(e=>`'${e}'`)})`;m.where=n(m.where,e)}return c?.field&&(m.orderByFields=[`${c.field} ${"descending"===c.order?"DESC":"ASC"}`],m.outFields.push(c.field)),m}};return e([d({readOnly:!0})],y.prototype,"creatingLayerViews",null),e([d()],y.prototype,"layer",void 0),e([d()],y.prototype,"layerViews",void 0),e([d({readOnly:!0})],y.prototype,"unsupportedItemTypes",void 0),e([d()],y.prototype,"parent",void 0),e([d({readOnly:!0})],y.prototype,"isUpdating",null),y=e([p("esri.views.layers.CatalogDynamicGroupLayerView")],y),y};export{u as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Collection.js";import{handlesGroup as t,makeHandle as s}from"../../core/handleUtils.js";import i from"../../core/Logger.js";import{debounce as a,ignoreAbortErrors as o}from"../../core/promiseUtils.js";import{sqlAnd as n}from"../../core/sql.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";const l=Symbol(),u=u=>{const y=u;let c=class extends y{constructor(...e){super(...e),this.layerViews=new r,this._debouncedUpdate=a(async()=>{const{layer:e,parent:r}=this,t=r?.footprintLayerView;let s=[];const i=this._createQuery();if(i&&t){const{features:r}=await t.queryFeatures(i);this.suspended||(s=r.map(r=>e.acquireLayer(r)))}this.removeHandles(l),this.addHandles(s,l)})}get creatingLayerViews(){return this.view?.layerViewManager.isCreatingLayerViewsForLayer(this.layer)??!1}isUpdating(){return this.creatingLayerViews||this.layer.updating||this.layerViews.some(e=>e.updating)}enableLayerUpdates(){return t([this._updatingHandles.addWhen(()=>!1===this.parent?.footprintLayerView?.dataUpdating,()=>this.updateLayers()),this._updatingHandles.add(()=>[this.layer.maximumVisibleSublayers,this.layer.parent?.orderBy,this.parent?.footprintLayerView?.filter,this.parent?.footprintLayerView?.timeExtent,this.suspended],()=>this.updateLayers()),s(()=>this.removeHandles(l))])}updateLayers(){this.suspended?this.removeHandles(l):this._updatingHandles.addPromise(o(this._debouncedUpdate()).catch(e=>{i.getLogger(this).error(e)}))}_createQuery(){const e=this.parent?.footprintLayerView,r=this.layer?.parent;if(!e||!r||r.destroyed)return null;const{layer:{maximumVisibleSublayers:t},view:{scale:s}}=this;if(!t)return null;const{itemTypeField:i,itemSourceField:a,itemNameField:o,minScaleField:d,maxScaleField:p,objectIdField:l,orderBy:u}=r,y=n(`${d} IS NULL OR ${s} <= ${d} OR ${d} = 0`,`${p} IS NULL OR ${s} >= ${p}`),c=u?.find(e=>e.field&&!e.valueExpression),m=e.createQuery();if(m.returnGeometry=!1,m.num=t,m.outFields=[l,a,o],m.where=n(m.where,y),null!=this.unsupportedItemTypes){const e=`${i} NOT IN (${this.unsupportedItemTypes.map(e=>`'${e}'`)})`;m.where=n(m.where,e)}return c?.field&&(m.orderByFields=[`${c.field} ${"descending"===c.order?"DESC":"ASC"}`],m.outFields.push(c.field)),m}};return e([d({readOnly:!0})],c.prototype,"creatingLayerViews",null),e([d()],c.prototype,"layer",void 0),e([d()],c.prototype,"layerViews",void 0),e([d({readOnly:!0})],c.prototype,"unsupportedItemTypes",void 0),e([d()],c.prototype,"parent",void 0),e([d({readOnly:!0})],c.prototype,"isUpdating",null),c=e([p("esri.views.layers.CatalogDynamicGroupLayerView")],c),c};export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";const t=t=>{let s=class extends t{constructor(...e){super(...e)}get updateSuspended(){const e=this.parent?.dynamicGroupLayerView;return this.suspended&&(!e||!0===e.suspended)}queryAggregates(){throw new Error("Not implemented")}};return e([r()],s.prototype,"layer",void 0),e([r()],s.prototype,"parent",void 0),e([r()],s.prototype,"highlightOptions",void 0),e([r()],s.prototype,"updateSuspended",null),s=e([o("esri.views.layers.CatalogFootprintLayerView")],s),s};export{t as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";const t=t=>{const s=t;let p=class extends s{constructor(...e){super(...e)}get updateSuspended(){const e=this.parent?.dynamicGroupLayerView;return this.suspended&&(!e||!0===e.suspended)}queryAggregates(){throw new Error("Not implemented")}};return e([r()],p.prototype,"layer",void 0),e([r()],p.prototype,"parent",void 0),e([r()],p.prototype,"highlightOptions",void 0),e([r()],p.prototype,"updateSuspended",null),p=e([o("esri.views.layers.CatalogFootprintLayerView")],p),p};export{t as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import e from"../../core/Collection.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const i=i=>{let s=class extends i{constructor(...r){super(...r),this.layerViews=new e}get dynamicGroupLayerView(){return this.layerViews.find(r=>r.layer===this.layer?.dynamicGroupLayer)}get footprintLayerView(){return this.layerViews.find(r=>r.layer===this.layer?.footprintLayer)}isUpdating(){return!this.dynamicGroupLayerView||!this.footprintLayerView||this.dynamicGroupLayerView.updating||this.footprintLayerView.updating}};return r([o()],s.prototype,"layer",void 0),r([o()],s.prototype,"layerViews",void 0),r([o({readOnly:!0})],s.prototype,"dynamicGroupLayerView",null),r([o({readOnly:!0})],s.prototype,"footprintLayerView",null),s=r([t("esri.views.layers.CatalogLayerView")],s),s};export{i as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import e from"../../core/Collection.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const i=i=>{const s=i;let a=class extends s{constructor(...r){super(...r),this.layerViews=new e}get dynamicGroupLayerView(){return this.layerViews.find(r=>r.layer===this.layer?.dynamicGroupLayer)}get footprintLayerView(){return this.layerViews.find(r=>r.layer===this.layer?.footprintLayer)}isUpdating(){return!this.dynamicGroupLayerView||!this.footprintLayerView||this.dynamicGroupLayerView.updating||this.footprintLayerView.updating}};return r([o()],a.prototype,"layer",void 0),r([o()],a.prototype,"layerViews",void 0),r([o({readOnly:!0})],a.prototype,"dynamicGroupLayerView",null),r([o({readOnly:!0})],a.prototype,"footprintLayerView",null),a=r([t("esri.views.layers.CatalogLayerView")],a),a};export{i as default};