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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/arcade/Feature.js +1 -1
  3. package/arcade/functions/measures.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{09dd8613bc03e7a3a4cb.js → 0814676e4bac81f96140.js} +1 -1
  6. package/assets/esri/core/workers/chunks/097a5c333de28ec5e16f.js +1 -0
  7. package/assets/esri/core/workers/chunks/{44031bef6d500167ef0b.js → 09dbb3e200ef8d514eb3.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0b71100fa1e7ca706dbb.js +1 -0
  9. package/assets/esri/core/workers/chunks/{3167230555c63f943485.js → 0cbd5335cc92f5891bcf.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{16fe21ca9b24eaee3069.js → 144bfd64daf103a06734.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{c20aead85cdea91c4b74.js → 170ec7fb070c63230c81.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{997a2a1a51039ce7e4e3.js → 1ac6bbaee76684a07b64.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{af1030e4c4437d4eb600.js → 1ada9e6cdd6792e3847a.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1e86df439c564fe752e3.js +1 -0
  15. package/assets/esri/core/workers/chunks/{4459c8e495a37d4c4eb8.js → 25118304c9a914194e90.js} +1 -1
  16. package/assets/esri/core/workers/chunks/28cfe1b270602e0c767b.js +1 -0
  17. package/assets/esri/core/workers/chunks/2ad1d458e4d18232a667.js +1 -0
  18. package/assets/esri/core/workers/chunks/{d823277612f971a9c2f0.js → 3245663da75e168bf85c.js} +1 -1
  19. package/assets/esri/core/workers/chunks/37d7c249114994a7dfac.js +1 -0
  20. package/assets/esri/core/workers/chunks/{2cd27b06226e30aec5da.js → 3f164e587f8d69c306d5.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{96102a9296afd1bfe1a9.js → 451dd3bb44664b4ca2ae.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{dbcef57073075e9cfdfe.js → 489fa17e60f25d5f33ae.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{e97250ae8da4bd0d6bc9.js → 4aa98309081e6889ccbb.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{19e5e011f929b6b940fe.js → 4bc091770bab38874848.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{09f0c9f0b6aa58ae3c52.js → 4f22e5a7f81883e8e5b6.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{7a17e78c76076ed4476f.js → 5185c63fecc5f493e142.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{fa0f94318173db2034de.js → 52483db12203276e726e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{6fff219dfaa86167c326.js → 5303d77a3ab1b7ddeef3.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{22ec2b0a853911692dc8.js → 5993427325d1add18ed9.js} +1 -1
  30. package/assets/esri/core/workers/chunks/5a95688651d7e8b7101d.js +1 -0
  31. package/assets/esri/core/workers/chunks/{9e3f8c06b4e090a35710.js → 5b84eba4a28e25b6d5c0.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{497214e9e82b936fc94e.js → 5ed381a268855bcad072.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{33718ea851645d9078d1.js → 605acf18cbeb89e4f29f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5d8c64693830506c8776.js → 643acb12ec6a1d4b4fbb.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{4d7fcec769369c576847.js → 6e59ba2afd444eb4be18.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{de4da985c398c8bcf2e7.js → 7336bfd57f6172ec7186.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{bafd9b0f6e817252cb31.js → 75dd0acf049c7f3271b8.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{60920d4856a011ace7e2.js → 80b0c88a76bd523a406a.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{117eb1422e9795d37ea3.js → 837830e1cf712d4243a5.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{ad7aa7d09bfceb12609e.js → 87fb5d755860057da164.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{5cb238318a24b70d5ac3.js → 8bc8caa384b24af12411.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{dcad3dcbd4ea2f5a6a04.js → 8e2558b14be70b273ce4.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{8e40c409a9b0a2a768a9.js → 8f02349602b072186a1f.js} +1 -1
  44. package/assets/esri/core/workers/chunks/900eb2aa5cb1b08e1906.js +1 -0
  45. package/assets/esri/core/workers/chunks/{0952aeddddc16705b7a3.js → 99f133a152afb4f1b067.js} +1 -1
  46. package/assets/esri/core/workers/chunks/a6f66492651646c18f10.js +1 -0
  47. package/assets/esri/core/workers/chunks/a895da7fd64ebad3d5a4.js +1 -0
  48. package/assets/esri/core/workers/chunks/{31e7358fe802abb3f8db.js → aa970a547c60c43d6c7f.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{9a6d359ead62a8eadd3c.js → ab727ed4417b7dd94ce9.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{707311e24b2f458d9209.js → ad3ebd4f05cc673140f3.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{0f20c0eec850a39620a1.js → ad69cceec8db593fac14.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{05016b0713ef760fc57d.js → b052d3ef5493eedb44a5.js} +1 -1
  53. package/assets/esri/core/workers/chunks/b335e96f6bcac6d2f0ee.js +1 -0
  54. package/assets/esri/core/workers/chunks/{a44f17397d8589433dae.js → b683b0fa7fc430b4d9c5.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{dd1d9913b33d4e48baff.js → c35dad3d5ceaac6ad5a4.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{e1b573840ec1f7c3afd3.js → c4b2678dd46fa1e22f7e.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{2f7e192ee2066f863e1d.js → c908184d747d33366881.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{bc931865a77fc48871d3.js → c94c797864a85342b105.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{06ff5f34ad9bdf9705de.js → d3f59fbaa524b53fcbc6.js} +6 -0
  60. package/assets/esri/core/workers/chunks/{c7a386ac90e58eb71935.js → da1a5537e2f2ca6cc247.js} +1 -1
  61. package/assets/esri/core/workers/chunks/dd447dfc50ee7f511b84.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a700f57af6856cb5313c.js → de443d29d1a6b5300d00.js} +1 -1
  63. package/assets/esri/core/workers/chunks/e2486bf5546443408c85.js +1 -0
  64. package/assets/esri/core/workers/chunks/{0f9813e7d4e2b47b2c39.js → e47acdb1fbf797342716.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{a16b471c3706ee37f9b6.js → e6f2ac738df16fb5e13a.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{f5101f5f93f776a6456f.js → ed1272e7681e561d843f.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{66ffefd46fe6175c2af4.js → efea3e82cec476d486e0.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{d6f5297f7b323c340727.js → f060a52a9b69eb250d63.js} +1 -1
  69. package/assets/esri/core/workers/chunks/f8adac87e48ea86bec21.js +1 -0
  70. package/assets/esri/core/workers/chunks/{4be2bab8ff3bd14ffdfb.js → f9385d7fb5ff20f7b252.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{b30de4936caa654d7817.js → fac020b6886ff2d75015.js} +1 -1
  72. package/assets/esri/core/workers/chunks/fe353a53968827bcd9cc.js +1 -0
  73. package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
  74. package/assets/esri/themes/dark/main.css +1 -1
  75. package/assets/esri/themes/light/main.css +1 -1
  76. package/assets/esri/themes/light/view.css +1 -1
  77. package/chunks/ComponentShader.glsl.js +42 -36
  78. package/chunks/GlowComposition.glsl.js +5 -5
  79. package/chunks/RibbonLine.glsl.js +2 -2
  80. package/config.js +1 -1
  81. package/core/MemCache.js +1 -1
  82. package/editing/geometry/lineUtils.js +1 -1
  83. package/geometry/ellipsoidUtils.js +1 -1
  84. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  85. package/geometry/support/curves/circleUtils.js +1 -1
  86. package/geometry/support/curves/curveLength.js +1 -1
  87. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  88. package/interfaces.d.ts +66 -193
  89. package/kernel.js +1 -1
  90. package/layers/GaussianSplatLayer.js +1 -1
  91. package/layers/Layer.js +1 -1
  92. package/layers/MapImageLayer.js +1 -1
  93. package/layers/OrientedImageryLayer.js +1 -1
  94. package/layers/VoxelLayer.js +1 -1
  95. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  96. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  97. package/layers/mixins/ArcGISImageService.js +1 -1
  98. package/layers/mixins/ImageryTileMixin.js +1 -1
  99. package/layers/mixins/OperationalLayer.js +1 -1
  100. package/layers/mixins/TemporalLayer.js +1 -1
  101. package/layers/mixins/TemporalSceneLayer.js +1 -1
  102. package/layers/mixins/operationalLayers.js +1 -1
  103. package/layers/support/FeatureFilter.js +1 -1
  104. package/layers/support/TimeInfo.js +1 -1
  105. package/layers/support/TrackInfo.js +1 -1
  106. package/layers/support/gaussianSplatUtils.js +1 -1
  107. package/layers/support/layersCreator.js +1 -1
  108. package/package.json +2 -2
  109. package/portal/schemas/definitions.js +1 -1
  110. package/portal/support/portalLayers.js +1 -1
  111. package/rest/support/AttributeBinsQuery.js +1 -1
  112. package/rest/support/IdentifyParameters.js +1 -1
  113. package/rest/support/ImageGPSInfoParameters.js +1 -1
  114. package/rest/support/ImageHistogramParameters.js +1 -1
  115. package/rest/support/ImageIdentifyParameters.js +1 -1
  116. package/rest/support/ImageParameters.js +1 -1
  117. package/rest/support/ImageSampleParameters.js +1 -1
  118. package/rest/support/Query.js +1 -1
  119. package/rest/support/TopFeaturesQuery.js +1 -1
  120. package/support/elevationInfoUtils.js +1 -1
  121. package/support/revision.js +1 -1
  122. package/support/timeUtils.js +1 -1
  123. package/time/TimeExtent.js +1 -1
  124. package/time/TimeInterval.js +1 -1
  125. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  126. package/views/2d/engine/webgl/Painter.js +1 -1
  127. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  128. package/views/2d/engine/webgl/effects/post-processing/EffectManager.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +5 -0
  132. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +5 -0
  133. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +5 -0
  134. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  135. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +5 -0
  136. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  137. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  138. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  139. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  147. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  148. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  149. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  150. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  151. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  152. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +5 -0
  153. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  154. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  155. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +5 -0
  156. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +5 -0
  157. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +5 -0
  158. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +5 -0
  159. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +5 -0
  160. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PostProcessingShader.js +5 -0
  161. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  162. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  163. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  164. package/views/2d/layers/MediaLayerView2D.js +1 -1
  165. package/views/2d/layers/TileLayerView2D.js +1 -1
  166. package/views/2d/layers/features/FeatureContainer.js +1 -1
  167. package/views/2d/layers/features/RenderState.js +1 -1
  168. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  169. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  170. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +5 -0
  171. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementGeometryUtils.js +5 -0
  172. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  173. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  174. package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
  175. package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
  176. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  177. package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
  178. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  179. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  180. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  181. package/views/3d/layers/graphics/ElevationContext.js +1 -1
  182. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  184. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  185. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  186. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  187. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  188. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  189. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  190. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  191. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  192. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  193. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  194. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  195. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  196. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  197. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  198. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  199. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  200. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  201. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  202. package/views/3d/layers/graphics/Labeler.js +1 -1
  203. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  204. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  205. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  206. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  207. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  208. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  209. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  210. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  211. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  212. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  213. package/views/3d/support/CombinedElevationProvider.js +1 -1
  214. package/views/3d/terrain/TerrainSurface.js +1 -1
  215. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  216. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  217. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  218. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +8 -2
  219. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +5 -0
  220. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  221. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  222. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +5 -0
  223. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  224. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  225. package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
  226. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  227. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  228. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  229. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  230. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  231. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +5 -0
  232. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +17 -0
  233. package/views/GroundView.js +1 -1
  234. package/views/VideoView.js +1 -1
  235. package/views/View.js +1 -1
  236. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  237. package/views/analysis/ElevationProfile/ElevationProfileGenerationError.js +1 -1
  238. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  239. package/webdoc/support/timeProperties.js +1 -1
  240. package/webdoc/widgets/TimeSlider.js +1 -1
  241. package/webmap/InitialViewProperties.js +1 -1
  242. package/widgets/Bookmarks.js +1 -1
  243. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  244. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  245. package/widgets/Editor/support/EditorItem.js +1 -1
  246. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  247. package/widgets/Expand.js +1 -1
  248. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  249. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  250. package/widgets/TimeSlider.js +1 -1
  251. package/TimeExtent.d.ts +0 -4
  252. package/TimeExtent.js +0 -5
  253. package/TimeInterval.d.ts +0 -4
  254. package/TimeInterval.js +0 -5
  255. package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +0 -1
  256. package/assets/esri/core/workers/chunks/0b01c87db77246632ad9.js +0 -1
  257. package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +0 -1
  258. package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +0 -1
  259. package/assets/esri/core/workers/chunks/1c7b5ca80e80c314f78d.js +0 -1
  260. package/assets/esri/core/workers/chunks/2a938096a42613425c7b.js +0 -1
  261. package/assets/esri/core/workers/chunks/3212a476184be25d17f8.js +0 -1
  262. package/assets/esri/core/workers/chunks/3bc50ee639a4d16c4f80.js +0 -1
  263. package/assets/esri/core/workers/chunks/481aea82501d04667ba2.js +0 -1
  264. package/assets/esri/core/workers/chunks/548818df658b607a364e.js +0 -1
  265. package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +0 -1
  266. package/assets/esri/core/workers/chunks/8e3c09c3524654830b14.js +0 -1
  267. package/assets/esri/core/workers/chunks/8f60804c7ba445f25df8.js +0 -1
  268. package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +0 -1
  269. package/assets/esri/core/workers/chunks/ff2614d96ca5228e9685.js +0 -1
  270. package/chunks/TimeExtent.js +0 -5
  271. package/chunks/TimeInterval.js +0 -5
  272. package/views/2d/engine/webgl/effects/post-processing/Bloom.js +0 -5
  273. package/views/2d/engine/webgl/effects/post-processing/Blur.js +0 -5
  274. package/views/2d/engine/webgl/effects/post-processing/Colorize.js +0 -5
  275. package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +0 -5
  276. package/views/2d/engine/webgl/effects/post-processing/Opacity.js +0 -5
  277. package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +0 -5
  278. package/views/3d/webgl-engine/shaders/FocusAreaMask.glsl.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{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as r,filterInPlace as o}from"../../../../../core/arrayUtils.js";import{nextHighestPowerOfTwo as s}from"../../../../../core/mathUtils.js";import{NestedMap as n}from"../../../../../core/NestedMap.js";import i from"../../../../../core/PooledArray.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{subclass as l}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 h}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as d}from"../../../support/buffer/glUtil.js";import{assert as m}from"../../lib/Util.js";import{BufferRange as g,mergeAdjacentRanges as p}from"./BufferRange.js";import{Instance as y}from"./Instance.js";import{PerBufferData as b,hasVao as _}from"./PerBufferData.js";import{PerOriginData as v}from"./PerOriginData.js";let w=class extends t{constructor(e){super(e),this._vaoCache=null,this._bufferWriter=null,this._useMetalWorkaround=!1,this._hasOccludees=!1}destroy(){this.uninitializeRenderContext()}initializeRenderContext(e){this._useMetalWorkaround=e.renderContext.rctx.isAssumedMetalDriver,this._bufferWriter=this.material.createBufferWriter(),this._vaoCache=e.renderContext.rctx.getVaoCache(d(this._bufferWriter.layout))}uninitializeRenderContext(){this._useMetalWorkaround=!1,this._bufferWriter=null,this._vaoCache=null}get hasOccludees(){return this._hasOccludees}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 o=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})=>o.push(e)),this._vaoCache.deleteVao(s.vao),r.buffers[t]=r.buffers[r.buffers.length-1],--r.buffers.length,e.madeProgress())}if(o.length>0){for(r.buffers.forEach(e=>this._applyAdds(e,o));o.length>0;)r.buffers.push(this._applyAndRebuild(new b,o,null));t=!0}}return t}updateHighlights(e){this.highlightOrderMap=e,this.dataByOrigin.forEach(t=>t.buffers.forEach(t=>t.updateHighlights(e)))}_applyUpdates(e,t){const o=this._bufferWriter;if(null==o)return void e.clearUpdates();const s=o.layout.stride/4;for(const n of e.updates){if(t.done)return;const{renderGeometry:i,updateType:a}=n;r(e.pending.updates,n),t.madeProgress();const l=this.dataByOrigin.get(i.localOrigin.id),u=l?.findBuffer(i.id);if(null==u)return;const f=u.instances.get(i.id);if(6&a){const e=k(o.elementCount(f.geometry.geometry.attributes)*s),t=o.layout.createView(e.buffer);this._writeGeometry(i,t,0),u.vao.buffer()?.setSubData(e,f.from*s,0,f.numElements*s)}25&a&&(u.drawCommandsDirty=!0)}}_computeDeltas(e,t){const r=new n;for(const o of e){const e=o.localOrigin;if(null==e)continue;let t=r.get(e.id,null);null==t&&(t=new C(e.vec3),r.set(e.id,null,t)),t.changes.push(o)}for(const o of t){const e=o.localOrigin;if(null==e)continue;const t=this.dataByOrigin.get(e.id),s=t?.findBuffer(o.id);if(null==s)continue;let n=r.get(e.id,s);null==n&&(n=new C(e.vec3),r.set(e.id,s,n)),n.changes.push(o)}return r}_applyAddsAndRemoves(e){const{_bufferWriter:t,dataByOrigin:o,_vaoCache:s}=this;if(null==t||null==s)return void e.clearAddsAndRemoves();const n=t.layout.stride/4,i=this._computeDeltas(e.adds,e.removes);i.forEach((e,a)=>{const l=e.get(null),u=l?.changes??[];i.delete(a,null);let f=o.get(a);if(e.forEach((e,l)=>{if(i.delete(a,l),null==l&&m(!1,"No VAO for removed geometries"),l.instances.size===e.changes.length)return s.deleteVao(l.vao),r(f.buffers,l),void(0===f.buffers.length&&0===u.length&&o.delete(a));const c=l.numElements,h=l.vao.getByteLength("geometry")/4,d=u.reduce((e,r)=>e+t.elementCount(r.geometry.attributes),0),g=e.changes.reduce((e,r)=>e+t.elementCount(r.geometry.attributes),0),p=Math.min((c+d-g)*n,R),y=p>h;p>E&&p<h/2?(e.changes.forEach(({id:e})=>l.deleteInstance(e)),l.instances.forEach(({geometry:e})=>u.push(e)),this._vaoCache.deleteVao(l.vao),r(f.buffers,l)):y?this._applyAndRebuild(l,u,e):this._applyRemoves(l,e)}),u.length>0)for(null==f&&(f=new v(l.origin),o.set(a,f)),f.buffers.forEach(e=>this._applyAdds(e,u));u.length>0;)f.buffers.push(this._applyAndRebuild(new b,u,null))}),e.clearAddsAndRemoves()}_updateDrawCommands(){this._hasOccludees=!1,this.dataByOrigin.forEach(e=>{e.buffers.forEach(e=>{e.updateIfDrawCommandsDirty(this.highlightOrderMap,this._bufferWriter.layout.stride),this._hasOccludees||=e.hasOccludees})})}_applyAndRebuild(e,t,r){if(r)for(const d of r.changes)e.deleteInstance(d.id);const o=this._bufferWriter,s=o.layout.stride,n=s/4,i=Math.floor(R/n);let a=e.numElements;for(;t.length>0;){const r=t.pop(),s=o.elementCount(r.geometry.attributes);if(a+s>i&&a>0){t.push(r);break}a+=s;const n=new y(r,0,0,this.highlightOrderMap);m(null==e.instances.get(r.id)),e.addInstance(r.id,n)}const l=a*n,u=k(l),f=o.layout.createView(u.buffer);let c=0;e.resetInstanceSummary(),e.instances.forEach((t,r)=>{this._writeGeometry(t.geometry,f,c);const s=c;c+=o.elementCount(t.geometry.geometry.attributes),e.updateInstance(r,s,c),e.updateDrawState(t)}),this._vaoCache.deleteVao(e.vao),e.vao=this._vaoCache.newVao(V(l)),e.vao.buffer()?.setSubData(u,0,0,c*n),e.holes.clear();const h=e.holes.pushNew();return h.from=c,h.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,o=-1/0;for(const i of t.changes){const t=i.id,s=e.instances.get(t);if(!s)continue;e.deleteInstance(t),this._useMetalWorkaround&&(r=Math.min(r,s.from),o=Math.max(o,s.to));const n=W.back();if(n){if(n.to===s.from){n.to=s.to;continue}if(n.from===s.to){n.from=s.from;continue}}const a=W.pushNew();a.from=s.from,a.to=s.to}p(W);const s=this._bufferWriter.layout.stride/4,n=e.vao.buffer();if(this._useMetalWorkaround){const t=(o-r)*s,i=k(t),a=this._bufferWriter.layout.createView(i.buffer);i.fill(0,0,t),e.instances.forEach(e=>{if(!(e.from>=r&&e.to<=o))return;const t=e.from-r;this._writeGeometry(e.geometry,a,t)}),n?.setSubData(i,r*s,0,t)}else{const e=W.reduce((e,t)=>Math.max(e,t.numElements),0)*s,t=k(e);t.fill(0,0,e),W.forAll(e=>n?.setSubData(t,e.from*s,0,e.numElements*s))}e.holes.pushArray(W.data,W.length),W.forAll((e,t)=>W.data[t]=null),W.clear(),e.drawCommandsDirty=!0}_applyAdds(e,t){if(0===t.length||null==this._bufferWriter)return;if(!_(e))return void this._applyAndRebuild(e,t,null);const r=this._bufferWriter,s=r.layout.stride/4,n=e.numElements,i=t.reduce((e,t)=>e+r.elementCount(t.geometry.attributes),0),a=Math.min((n+i)*s,R),l=4*a;if(e.vao.getByteLength("geometry")<V(R-E)&&l>e.vao.getByteLength("geometry"))return void this._applyAndRebuild(e,t,null);p(e.holes);const u=new Array;let f=1/0,c=-1/0;for(const o of t){const t=r.elementCount(o.geometry.attributes),s=A(e.holes,t);u.push(s),this._useMetalWorkaround&&null!=s&&(f=Math.min(s,f),c=Math.max(s+t,c))}const h=e.vao.buffer();let d=0,g=0,b=0;const v=this._useMetalWorkaround?k((c-f)*s):k(a),w=r.layout.createView(v.buffer);if(t.forEach((t,o)=>{const n=u[o];if(null==n)return;const i=r.elementCount(t.geometry.attributes);if(!this._useMetalWorkaround){if(!(b===n)){const e=b-g;e>0&&h?.setSubData(v,g*s,0,e*s),g=n,d=0}this._writeGeometry(t,w,d),d+=i,b=n+i}const a=new y(t,n,n+i,this.highlightOrderMap);m(null==e.instances.get(t.id)),e.addInstance(t.id,a),e.drawCommandsDirty=!0}),this._useMetalWorkaround){const t=(c-f)*s;v.fill(0,0,t),e.instances.forEach(e=>{if(!(e.from>=f&&e.to<=c))return;const t=e.from-f;this._writeGeometry(e.geometry,w,t)}),g=f,b=c}const C=b-g;C>0&&h?.setSubData(v,g*s,0,C*s),o(t,(e,t)=>null==u[t])}_writeGeometry(e,t,r){null!=this._bufferWriter&&(u(M,e.transformation),M[12]-=e.localOrigin.vec3[0],M[13]-=e.localOrigin.vec3[1],M[14]-=e.localOrigin.vec3[2],f(O,M),c(O,O),this._bufferWriter.write(M,O,e.geometry.attributes,e.geometry.olidColor,t,r))}static prune(){x=new Float32Array(E)}};e([a({constructOnly:!0})],w.prototype,"dataByOrigin",void 0),e([a({constructOnly:!0})],w.prototype,"material",void 0),e([a()],w.prototype,"highlightOrderMap",void 0),w=e([l("esri.views.3d.webgl-engine.materials.renderers.MergedBuffer")],w);class C{constructor(e){this.origin=e,this.changes=new Array}}function A(e,t){const r=e.find(e=>e.numElements>=t);if(null==r)return null;const o=r.from;return r.from+=t,r.from>=r.to&&e.removeUnordered(r),o}const M=h(),O=h(),W=new i({allocator:e=>e||new g,deallocator:null}),E=65536,D=4*E,B=1024,j=16777216,R=j/4;let x=new Float32Array(E);function k(e){return x.length<e&&(x=new Float32Array(e)),x}function V(e){const t=4*e;return t<=B?B:t<D?s(t):Math.max(Math.min(Math.ceil(1.5*t/D)*D,j),t)}export{w as MergedBuffer,V as sizeForVao};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as r,filterInPlace as s}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{NestedMap as n}from"../../../../../core/NestedMap.js";import o from"../../../../../core/PooledArray.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{assert as l}from"../../lib/Util.js";import{BufferRange as c,mergeAdjacentRanges as u}from"./BufferRange.js";import{Instance as d}from"./Instance.js";import{PerBufferData as f,hasVao as h}from"./PerBufferData.js";import{PerOriginData as m}from"./PerOriginData.js";import{VaoWriter as p}from"./VaoWriter.js";let g=class extends t{constructor(e){super(e),this._vaoWriter=null,this._useMetalWorkaround=!1,this._hasOccludees=!1}destroy(){this.uninitializeRenderContext()}initializeRenderContext(e){this._useMetalWorkaround=e.renderContext.rctx.isAssumedMetalDriver,this._vaoWriter=new p(this.material,e.renderContext.rctx)}uninitializeRenderContext(){this._useMetalWorkaround=!1,this._vaoWriter=null}get hasOccludees(){return this._hasOccludees}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 s=new Array;for(let t=0;t<r.buffers.length&&!e.done;){const n=r.buffers[t];n.holes.length<=1?++t:(n.instances.forEach(({geometry:e})=>s.push(e)),this._vaoWriter?.deleteBuffer(n.vao),r.buffers[t]=r.buffers[r.buffers.length-1],--r.buffers.length,e.madeProgress())}if(s.length>0){for(r.buffers.forEach(e=>this._applyAdds(e,s));s.length>0;)r.buffers.push(this._applyAndRebuild(new f,s,null));t=!0}}return t}updateHighlights(e){this.highlightOrderMap=e,this.dataByOrigin.forEach(t=>t.buffers.forEach(t=>t.updateHighlights(e)))}_applyUpdates(e,t){const s=this._vaoWriter;if(null!=s)for(const n of e.updates){if(t.done)return;const{renderGeometry:o,updateType:a}=n;r(e.pending.updates,n),t.madeProgress();const i=this.dataByOrigin.get(o.localOrigin.id),l=i?.findBuffer(o.id);if(null==l)return;const c=l.instances.get(o.id);6&a&&s.updateInstance(c,l.vao),25&a&&(l.drawCommandsDirty=!0)}else e.clearUpdates()}_computeDeltas(e,t){const r=new n;for(const s of e){const e=s.localOrigin;if(null==e)continue;let t=r.get(e.id,null);null==t&&(t=new v(e.vec3),r.set(e.id,null,t)),t.changes.push(s)}for(const s of t){const e=s.localOrigin;if(null==e)continue;const t=this.dataByOrigin.get(e.id),n=t?.findBuffer(s.id);if(null==n)continue;let o=r.get(e.id,n);null==o&&(o=new v(e.vec3),r.set(e.id,n,o)),o.changes.push(s)}return r}_applyAddsAndRemoves(e){const{_vaoWriter:t,dataByOrigin:s}=this;if(null==t)return void e.clearAddsAndRemoves();const n=this._computeDeltas(e.adds,e.removes);n.forEach((e,o)=>{const a=e.get(null),i=a?.changes??[];n.delete(o,null);let c=s.get(o);if(e.forEach((e,a)=>{if(n.delete(o,a),null==a&&l(!1,"No VAO for removed geometries"),a.instances.size===e.changes.length)return t.deleteBuffer(a.vao),r(c.buffers,a),void(0===c.buffers.length&&0===i.length&&s.delete(o));const u=a.numElements;switch(t.evaluateBufferAllocation(u,i,e.changes,a.vao)){case 0:e.changes.forEach(({id:e})=>a.deleteInstance(e)),a.instances.forEach(({geometry:e})=>i.push(e)),t.deleteBuffer(a.vao),r(c.buffers,a);break;case 1:this._applyAndRebuild(a,i,e);break;case 2:this._applyRemoves(a,e)}}),i.length>0)for(null==c&&(c=new m(a.origin),s.set(o,c)),c.buffers.forEach(e=>this._applyAdds(e,i));i.length>0;)c.buffers.push(this._applyAndRebuild(new f,i,null))}),e.clearAddsAndRemoves()}_updateDrawCommands(){this._hasOccludees=!1,this.dataByOrigin.forEach(e=>{e.buffers.forEach(e=>{e.updateIfDrawCommandsDirty(this.highlightOrderMap),this._hasOccludees||=e.hasOccludees})})}_applyAndRebuild(e,t,r){if(r)for(const l of r.changes)e.deleteInstance(l.id);const s=this._vaoWriter,n=s.maxElements;let o=e.numElements;for(;t.length>0;){const r=t.pop(),a=s.elementCount(r);if(o+a>n&&o>0){t.push(r);break}o+=a;const i=new d(r,0,0,this.highlightOrderMap);l(null==e.instances.get(r.id)),e.addInstance(r.id,i)}e.resetInstanceSummary(),e.vao=s.reallocateBuffer(e.vao,o),e.vaoEndElement=s.vaoEndElement(e.vao);const a=s.rebuildInstances(o,e.writeableInstances.values(),e.vao);e.updateInstances(),e.holes.clear();const i=e.holes.pushNew();return i.from=a,i.to=e.vaoEndElement,e.updateDrawCommands(this.highlightOrderMap),e}_applyRemoves(e,t){const{_vaoWriter:r}=this;if(0===t.changes.length||null==r)return;let s=1/0,n=-1/0;for(const o of t.changes){const t=o.id,r=e.instances.get(t);if(!r)continue;e.deleteInstance(t),this._useMetalWorkaround&&(s=Math.min(s,r.from),n=Math.max(n,r.to));const a=_.back();if(a){if(a.to===r.from){a.to=r.to;continue}if(a.from===r.to){a.from=r.from;continue}}const i=_.pushNew();i.from=r.from,i.to=r.to}u(_),this._useMetalWorkaround?r.clearHolesMetal(e.instances.values(),s,n,e.vao):r.clearHoles(_,e.vao),e.holes.pushArray(_.data,_.length),_.forAll((e,t)=>_.data[t]=null),_.clear(),e.drawCommandsDirty=!0}_applyAdds(e,t){if(0===t.length||null==this._vaoWriter)return;if(!h(e))return void this._applyAndRebuild(e,t,null);const r=this._vaoWriter,n=e.numElements,o=t.reduce((e,t)=>e+r.elementCount(t),0),a=Math.max(n+o,r.maxElements);if(r.canGrow(e.vao,a))return void this._applyAndRebuild(e,t,null);u(e.holes);const i=new Array;let l=1/0,c=-1/0;for(const s of t){const t=r.elementCount(s),n=y(e.holes,t);i.push(n),this._useMetalWorkaround&&null!=n&&(l=Math.min(n,l),c=Math.max(n+t,c))}const d=this._addInstances(t,e,i);if(this._useMetalWorkaround){for(const e of d);r.writeInstanceRangeMetal(c,l,e.instances.values(),e.vao)}else r.writeRandomInstances(a,d,e.vao);s(t,(e,t)=>null==i[t])}*_addInstances(e,t,r){const s=e.length,n=this._vaoWriter;for(let o=0;o<s;++o){const s=r[o];if(null==s)continue;const a=e[o],i=n.elementCount(a),c=new d(a,s,s+i,this.highlightOrderMap);l(null==t.instances.get(a.id)),t.addInstance(a.id,c),t.drawCommandsDirty=!0,yield c}}static prune(){p.prune()}};e([a({constructOnly:!0})],g.prototype,"dataByOrigin",void 0),e([a({constructOnly:!0})],g.prototype,"material",void 0),e([a()],g.prototype,"highlightOrderMap",void 0),g=e([i("esri.views.3d.webgl-engine.materials.renderers.MergedBuffer")],g);class v{constructor(e){this.origin=e,this.changes=new Array}}function y(e,t){const r=e.find(e=>e.numElements>=t);if(null==r)return null;const s=r.from;return r.from+=t,r.from>=r.to&&e.removeUnordered(r),s}const _=new o({allocator:e=>e||new c,deallocator:null});export{g as MergedBuffer};
@@ -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{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import s from"../../../../../core/PooledArray.js";import{BufferRange as e}from"./BufferRange.js";import{DrawCommand as i}from"./DrawCommand.js";import{defaultHighlightName as n}from"../../../../support/HighlightDefaults.js";class a{constructor(){this._numElements=0,this._instances=new Map,this.holes=new s({allocator:t=>t||new e,deallocator:null}),this.hasHiddenInstances=!1,this.hasOccludees=!1,this.drawCommandsDirty=!0,this.highlightNames=new Set,this.drawCommandsDefault=r(),this.drawCommandsHighlights=new Map,this.drawCommandsOccludees=r(),this.drawCommandsShadowHighlightRest=r()}get numElements(){return this._numElements}get instances(){return this._instances}get hasHighlights(){return this.highlightNames.size>0}resetInstanceSummary(){this.hasHiddenInstances=!1,this.hasOccludees=!1,this.highlightNames.clear()}updateIfDrawCommandsDirty(t,s){if(this.drawCommandsDirty){this.resetInstanceSummary();for(const t of this.instances.values())this.updateDrawState(t);this.updateDrawCommands(t,s)}}addInstance(t,s){this.deleteInstance(t),this._instances.set(t,s),this._numElements+=s.numElements}deleteInstance(t){const s=this._instances.get(t);s&&(this._numElements-=s.numElements,this._instances.delete(t))}updateInstance(t,s,e){const i=this._instances.get(t);i&&(this._numElements-=i.numElements,i.from=s,i.to=e,this._numElements+=i.numElements)}updateDrawState(t){if(t.isVisible){const{highlightName:s}=t;s&&this.highlightNames.add(s),t.hasOccludees&&(this.hasOccludees=!0)}else this.hasHiddenInstances=!0}updateDrawCommands(t,s){if(this.drawCommandsDefault.clear(),this.drawCommandsOccludees.clear(),this.drawCommandsDirty=!1,0===this._instances.size)return;const{sortedInstances:e}=this;if(this._updateHighlightDrawCommands(t,e),!this.needsMultipleCommands){const t=this.drawCommandsDefault.pushNew(),e=this.holes.front();return this.vao&&1===this.holes.length&&e.to===Math.floor(this.vao.getByteLength("geometry")/s)?(t.first=0,void(t.count=e.from)):(t.first=1/0,t.count=0,this._instances.forEach(s=>{t.first=Math.min(t.first,s.from),t.count=Math.max(t.count,s.to)}),void(t.count-=t.first))}for(const i of e)i.isVisible&&m(i.hasOccludees?this.drawCommandsOccludees:this.drawCommandsDefault,i)}get sortedInstances(){return Array.from(this._instances.values()).sort((t,s)=>t.from===s.from?t.to-s.to:t.from-s.from)}updateHighlights(t){this.highlightNames.clear();const s=this.sortedInstances;for(const e of s)e.updateHighlightOptions(t),e.isVisible&&e.highlightName&&this.highlightNames.add(e.highlightName);this._updateHighlightDrawCommands(t)}_updateHighlightDrawCommands(s,e=this.sortedInstances){const{drawCommandsHighlights:i,drawCommandsShadowHighlightRest:a}=this;i.clear(),a.clear();for(const h of e){if(h.updateHighlightOptions(s),!h.isVisible)continue;const{highlightName:e}=h;if(e){this.highlightNames.add(e);m(t(i,e,r),h)}e&&e===n||m(a,h)}}get needsMultipleCommands(){return this.hasOccludees||this.hasHighlights||this.hasHiddenInstances}}class h extends a{}function o(t){return null!=t.vao}function r(){return new s({allocator:t=>t||new i,deallocator:t=>t})}function m(t,s){const e=t.back();if(null==e){const e=t.pushNew();return e.first=s.from,void(e.count=s.numElements)}if(l(e,s)){const t=s.from-e.first+s.numElements;e.count=t}else{const e=t.pushNew();e.first=s.from,e.count=s.numElements}}function l(t,s){return t.first+t.count>=s.from}export{a as PerBufferData,h as PerVaoData,o as hasVao};
5
+ import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import s from"../../../../../core/PooledArray.js";import{BufferRange as e}from"./BufferRange.js";import{DrawCommand as i}from"./DrawCommand.js";import{defaultHighlightName as n}from"../../../../support/HighlightDefaults.js";class a{constructor(){this.vaoEndElement=0,this._numElements=0,this._instances=new Map,this.holes=new s({allocator:t=>t||new e,deallocator:null}),this.hasHiddenInstances=!1,this.hasOccludees=!1,this.drawCommandsDirty=!0,this.highlightNames=new Set,this.drawCommandsDefault=r(),this.drawCommandsHighlights=new Map,this.drawCommandsOccludees=r(),this.drawCommandsShadowHighlightRest=r()}get numElements(){return this._numElements}get instances(){return this._instances}get writeableInstances(){return this._instances}get hasHighlights(){return this.highlightNames.size>0}resetInstanceSummary(){this.hasHiddenInstances=!1,this.hasOccludees=!1,this.highlightNames.clear()}updateIfDrawCommandsDirty(t){if(this.drawCommandsDirty){this.resetInstanceSummary();for(const t of this.instances.values())this.updateDrawState(t);this.updateDrawCommands(t)}}addInstance(t,s){this.deleteInstance(t),this._instances.set(t,s),this._numElements+=s.numElements}deleteInstance(t){const s=this._instances.get(t);s&&(this._numElements-=s.numElements,this._instances.delete(t))}updateInstances(){let t=0;for(const s of this._instances.values())t+=s.numElements,this.updateDrawState(s);this._numElements=t}updateDrawState(t){if(t.isVisible){const{highlightName:s}=t;s&&this.highlightNames.add(s),t.hasOccludees&&(this.hasOccludees=!0)}else this.hasHiddenInstances=!0}updateDrawCommands(t){if(this.drawCommandsDefault.clear(),this.drawCommandsOccludees.clear(),this.drawCommandsDirty=!1,0===this._instances.size)return;const{sortedInstances:s}=this;if(this._updateHighlightDrawCommands(t,s),!this.needsMultipleCommands){const t=this.drawCommandsDefault.pushNew(),s=this.holes.front();return this.vao&&1===this.holes.length&&s.to===this.vaoEndElement?(t.first=0,void(t.count=s.from)):(t.first=1/0,t.count=0,this._instances.forEach(s=>{t.first=Math.min(t.first,s.from),t.count=Math.max(t.count,s.to)}),void(t.count-=t.first))}for(const e of s)e.isVisible&&m(e.hasOccludees?this.drawCommandsOccludees:this.drawCommandsDefault,e)}get sortedInstances(){return Array.from(this._instances.values()).sort((t,s)=>t.from===s.from?t.to-s.to:t.from-s.from)}updateHighlights(t){this.highlightNames.clear();const s=this.sortedInstances;for(const e of s)e.updateHighlightOptions(t),e.isVisible&&e.highlightName&&this.highlightNames.add(e.highlightName);this._updateHighlightDrawCommands(t)}_updateHighlightDrawCommands(s,e=this.sortedInstances){const{drawCommandsHighlights:i,drawCommandsShadowHighlightRest:a}=this;i.clear(),a.clear();for(const h of e){if(h.updateHighlightOptions(s),!h.isVisible)continue;const{highlightName:e}=h;if(e){this.highlightNames.add(e);m(t(i,e,r),h)}e&&e===n||m(a,h)}}get needsMultipleCommands(){return this.hasOccludees||this.hasHighlights||this.hasHiddenInstances}}class h extends a{}function o(t){return null!=t.vao}function r(){return new s({allocator:t=>t||new i,deallocator:t=>t})}function m(t,s){const e=t.back();if(null==e){const e=t.pushNew();return e.first=s.from,void(e.count=s.numElements)}if(l(e,s)){const t=s.from-e.first+s.numElements;e.count=t}else{const e=t.pushNew();e.first=s.from,e.count=s.numElements}}function l(t,s){return t.first+t.count>=s.from}export{a as PerBufferData,h as PerVaoData,o as hasVao};
@@ -0,0 +1,5 @@
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{nextHighestPowerOfTwo as t}from"../../../../../core/mathUtils.js";import{copy as e,invert as r,transpose as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as i}from"../../../support/buffer/glUtil.js";class a{constructor(t,e){this._bufferWriter=t.createBufferWriter(),this._vaoCache=e.getVaoCache(i(this._bufferWriter.layout))}get maxElements(){return Math.floor(h/this._strideFloats)}get _strideBytes(){return this._bufferWriter.layout.stride}get _strideFloats(){return this._strideBytes/4}vaoEndElement(t){return Math.floor(t.getByteLength("geometry")/this._strideBytes)}evaluateBufferAllocation(t,e,r,o){const s=this._strideFloats,i=e.reduce((t,e)=>t+this.elementCount(e),0),a=r.reduce((t,e)=>t+this.elementCount(e),0),n=Math.min((t+i-a)*s,h),f=o.getByteLength("geometry")/4;return n>l&&n<f/2?0:n>f?1:2}deleteBuffer(t){this._vaoCache.deleteVao(t)}reallocateBuffer(t,e){this.deleteBuffer(t);const r=e*this._strideFloats;return this._vaoCache.newVao(g(r))}elementCount(t){return this._bufferWriter.elementCount(t.geometry.attributes)}canGrow(t,e){const r=4*(e*this._strideFloats);return t.getByteLength("geometry")<g(h-l)&&r>t.getByteLength("geometry")}clearHoles(t,e){const{_strideFloats:r}=this,o=t.reduce((t,e)=>Math.max(t,e.numElements),0)*r,s=b(o);s.fill(0,0,o);const i=e.buffer();for(const a of t)i?.setSubData(s,a.from*r,0,a.numElements*r)}clearHolesMetal(t,e,r,o){const{_bufferWriter:s,_strideFloats:i}=this,a=(r-e)*i,n=b(a),f=s.layout.createView(n.buffer);n.fill(0,0,a);for(const l of t){if(!(l.from>=e&&l.to<=r))continue;const t=l.from-e;this._writeGeometry(l.geometry,f,t)}o.buffer()?.setSubData(n,e*i,0,a)}writeRandomInstances(t,e,r){const{_bufferWriter:o,_strideFloats:s}=this,i=b(t*s),a=o.layout.createView(i.buffer);let n=0,f=0,l=0;const u=r.buffer();for(const c of e){if(!(l===c.from)){const t=l-f;t>0&&u?.setSubData(i,f*s,0,t*s),f=c.from,n=0}this._writeGeometry(c.geometry,a,n),n+=c.numElements,l=c.to}const m=l-f;m>0&&u?.setSubData(i,f*s,0,m*s)}writeInstanceRangeMetal(t,e,r,o){const{_bufferWriter:s,_strideFloats:i}=this,a=t-e,n=a*i,f=b(n),l=s.layout.createView(f.buffer);f.fill(0,0,n);for(const u of r){if(!(u.from>=e&&u.to<=t))continue;const r=u.from-e;this._writeGeometry(u.geometry,l,r)}a>0&&o.buffer()?.setSubData(f,e*i,0,n)}rebuildInstances(t,e,r){const{_bufferWriter:o,_strideFloats:s}=this,i=b(t*s),a=o.layout.createView(i.buffer);let n=0;for(const f of e){this._writeGeometry(f.geometry,a,n);const t=n;n+=this.elementCount(f.geometry),f.from=t,f.to=n}return r.buffer()?.setSubData(i,0,0,n*s),n}updateInstance(t,e){const{_bufferWriter:r,_strideFloats:o}=this,s=b(r.elementCount(t.geometry.geometry.attributes)*o),i=r.layout.createView(s.buffer);this._writeGeometry(t.geometry,i,0),e.buffer()?.setSubData(s,t.from*o,0,t.numElements*o)}_writeGeometry(t,s,i){const{_bufferWriter:a}=this;null!=a&&(e(n,t.transformation),n[12]-=t.localOrigin.vec3[0],n[13]-=t.localOrigin.vec3[1],n[14]-=t.localOrigin.vec3[2],r(f,n),o(f,f),a.write(n,f,t.geometry.attributes,t.geometry.olidColor,s,i))}static prune(){y=new Float32Array(l)}}const n=s(),f=s(),l=65536,u=4*l,m=1024,c=16777216,h=c/4;let y=new Float32Array(l);function b(t){return y.length<t&&(y=new Float32Array(t)),y}function g(e){const r=4*e;return r<=m?m:r<u?t(r):Math.max(Math.min(Math.ceil(1.5*r/u)*u,c),r)}export{a as VaoWriter};
@@ -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{smoothstep as e}from"../../../../core/mathUtils.js";import{k as r}from"../../../../chunks/vec32.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Float3BindUniform as a}from"../core/shaderModules/Float3BindUniform.js";import{Float4BindUniform as o}from"../core/shaderModules/Float4BindUniform.js";import{glsl as s}from"../core/shaderModules/glsl.js";import{SphereIntersect as n}from"./SphereIntersect.glsl.js";function i(i,h){i.fragment.uniforms.add(new o("heightParameters",a=>{const o=a.camera,s=r(o.eye),n=Math.sqrt(s),i=h.radius,l=s-i*i;let m=e(4e6,5e6,n-i);return m=Math.min(m,.98),t(m,l,0,0)}),new a("cameraPosition",e=>e.camera.eye)),i.fragment.include(n),i.fragment.code.add(s`float sphereFade() {return heightParameters[0];}
6
+ float sphereDepthInterpolate(vec3 worldRay, vec3 viewRay, float currentLinearDepth) {
7
+ vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, worldRay, heightParameters[1]);
8
+ bool hitsPlanet = (rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.x > 0.0;
9
+ if (hitsPlanet) {
10
+ float sphereDepth = rayPlanetIntersect.x;
11
+ viewRay *= viewRay.z*sphereDepth;
12
+ float linearDepth = length(viewRay);
13
+ float sphereFade = heightParameters[0];
14
+ return (-linearDepth)*sphereFade + currentLinearDepth*(1.0-sphereFade);
15
+ }
16
+ return currentLinearDepth;
17
+ }`)}export{i as sphereDepthInterpolate};
@@ -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{__decorate as e}from"tslib";import r from"../core/Accessor.js";import t from"../core/Collection.js";import{when as s}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{isLayerGroundReplacement as a}from"../layers/GroundLayer.js";import{toExtent as n}from"./3d/support/cameraUtils.js";import p from"./support/GroundViewElevationSampler.js";let d=class extends r{constructor(e){super(e),this.view=null,this.layerViews=new t}initialize(){this.addHandles(s(()=>this.view?.map?.ground,async e=>e.load())),"3d"===this.view.type&&this.addHandles([s(()=>this.view.map?.basemap,e=>{e.groundLayers.on("after-changes",()=>this._groundLayersChanged())},{initial:!0}),s(()=>"3d"===this.view.type&&(this.view?.basemapTerrain??!1),async()=>{this._groundLayersChanged()})])}_groundLayersChanged(){const{view:e}=this;if(null!=e&&"3d"===e.type){const r=e.basemapTerrain;if(r){const t=e.map?.basemap?.groundLayers.some(a);r.enable(!t)}}}get ground(){return this.view?.map?.ground}destroy(){this._set("view",null);for(const e of this.layerViews)e.destroy();this.layerViews.length=0}get elevationSampler(){return"2d"!==this.view?.type&&this.view?.ready&&this.view?.basemapTerrain?.ready?new p({view:this.view}):null}get extent(){const e=this.view;return e&&"2d"!==e.type&&e.ready?n(e,e.state.camera,e.pointsOfInterest.centerOnSurfaceFrequent.renderLocation):null}get updating(){return!this.suspended&&this.layerViews.some(e=>e.updating)}get suspended(){return this.view?.suspended??!0}};e([o({readOnly:!0})],d.prototype,"elevationSampler",null),e([o({readOnly:!0})],d.prototype,"extent",null),e([o({type:Boolean,readOnly:!0})],d.prototype,"updating",null),e([o({constructOnly:!0})],d.prototype,"view",void 0),e([o({type:t,readOnly:!0})],d.prototype,"layerViews",void 0),e([o({readOnly:!0})],d.prototype,"suspended",null),d=e([i("esri.views.GroundView")],d);const l=d;export{l as default};
5
+ import{__decorate as e}from"tslib";import r from"../core/Accessor.js";import t from"../core/Collection.js";import{when as s,watch as o}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{isLayerGroundReplacement as n}from"../layers/GroundLayer.js";import{toExtent as p}from"./3d/support/cameraUtils.js";import d from"./support/GroundViewElevationSampler.js";let l=class extends r{constructor(e){super(e),this.view=null,this.layerViews=new t}initialize(){this.addHandles(s(()=>this.view?.map?.ground,async e=>e.load())),"3d"===this.view.type&&this.addHandles([o(()=>this.view.map?.basemap,()=>this._groundLayersChanged(),{initial:!0}),o(()=>this.view.map?.basemap?.groundLayers,e=>{this._groundLayersChanged(),e?.on("after-changes",()=>this._groundLayersChanged())},{initial:!0}),s(()=>"3d"===this.view.type&&(this.view?.basemapTerrain??!1),async()=>{this._groundLayersChanged()})])}_groundLayersChanged(){const{view:e}=this;if(null!=e&&"3d"===e.type){const r=e.basemapTerrain;if(r){const t=e.map?.basemap?.groundLayers.some(n);r.enable(!t)}}}get ground(){return this.view?.map?.ground}destroy(){this._set("view",null);for(const e of this.layerViews)e.destroy();this.layerViews.length=0}get elevationSampler(){return"2d"!==this.view?.type&&this.view?.ready&&this.view?.basemapTerrain?.ready?new d({view:this.view}):null}get extent(){const e=this.view;return e&&"2d"!==e.type&&e.ready?p(e,e.state.camera,e.pointsOfInterest.centerOnSurfaceFrequent.renderLocation):null}get updating(){return!this.suspended&&this.layerViews.some(e=>e.updating)}get suspended(){return this.view?.suspended??!0}};e([i({readOnly:!0})],l.prototype,"elevationSampler",null),e([i({readOnly:!0})],l.prototype,"extent",null),e([i({type:Boolean,readOnly:!0})],l.prototype,"updating",null),e([i({constructOnly:!0})],l.prototype,"view",void 0),e([i({type:t,readOnly:!0})],l.prototype,"layerViews",void 0),e([i({readOnly:!0})],l.prototype,"suspended",null),l=e([a("esri.views.GroundView")],l);const u=l;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{__decorate as e}from"tslib";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import{EventedMixin as r}from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import{EsriPromiseMixin as a}from"../core/Promise.js";import{watch as n,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 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/mathUtils.js";import"../config.js";import"../core/floatRGBA.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"../symbols/Font.js";import"../core/ObjectPool.js";import"../geometry/support/spatialReferenceUtils.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"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as E}from"./2d/engine/Container.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"./webgl/checkWebGLError.js";import"./webgl/VertexAttributeLayouts.js";import"./webgl/BufferObject.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"./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/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/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"../core/sql/UnknownTimeZone.js";import"luxon";import"../intl/locale.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/animations/instructions.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/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 O from"./navigation/Navigation.js";import T from"./ui/DefaultUI.js";import W from"./ui/video/DefaultUIVideo.js";const k=new t("#000");let A;async function U(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);A=e}const F=.01,H=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let L=class extends(V(C(S(r(a(s)))))){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 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(U().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:k,groundControlPoints:()=>this.layer?.groundControlPoints,getSize:()=>this.videoSize},i=new A(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(H).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 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()],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:O,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 T?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 B=L;export{B as default};
5
+ import{__decorate as e}from"tslib";import t from"../Color.js";import i from"../Viewpoint.js";import s from"../core/Accessor.js";import{EventedMixin as r}from"../core/Evented.js";import{destroyMaybe as o}from"../core/maybe.js";import{EsriPromiseMixin as a}from"../core/Promise.js";import{watch as n,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 S from"../layers/support/VideoElement.js";import{DOMContainer as _}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/mathUtils.js";import"../config.js";import"../core/floatRGBA.js";import"../geometry/Geometry.js";import"../geometry/Multipoint.js";import"../geometry/Polygon.js";import"../geometry/Polyline.js";import"../symbols/Font.js";import"../core/ObjectPool.js";import"../geometry/support/spatialReferenceUtils.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"../symbols/support/defaults.js";import"../symbols/cim/OverrideHelper.js";import{Container as G}from"./2d/engine/Container.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"./webgl/checkWebGLError.js";import"./webgl/VertexAttributeLayouts.js";import"./webgl/BufferObject.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"./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/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/shaderGraph/techniques/shaders/BlitShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"./2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"./2d/engine/webgl/meshing/SimpleMesh.js";import"./webgl/Renderbuffer.js";import"./2d/engine/webgl/PooledUint32Array.js";import"./2d/engine/webgl/Profiler.js";import"./2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"./2d/engine/webgl/shaderGraph/techniques/animated/attributes.js";import"./2d/engine/webgl/mesh/templates/templateUtils.js";import"./2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../geometry/support/aaBoundingBox.js";import"./2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"./2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../core/sql/UnknownTimeZone.js";import"luxon";import"../intl/locale.js";import"../layers/support/fieldUtils.js";import"../time/constants.js";import"./2d/engine/webgl/animations/instructions.js";import"./2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"./webgl/renderState.js";import"./3d/webgl-engine/core/shaderModules/glsl.js";import"./webgl/testSVGPremultipliedAlpha.js";import{ManagedCanvas as E}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 O from"./navigation/Navigation.js";import T from"./ui/DefaultUI.js";import W from"./ui/video/DefaultUIVideo.js";const k=new t("#000");let A;async function U(){const[,{ParentStage:e}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);A=e}const B=.01,F=["feature","geojson","csv","stream","ogc-feature","catalog","wfs","parquet","graphics","group"];let H=class extends(V(C(_(r(a(s)))))){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 P({view:this,minScale:1,maxScale:B})}),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(U().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:k,groundControlPoints:()=>this.layer?.groundControlPoints,getSize:()=>this.videoSize},i=new A(this.surface,t,new E(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 S({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 G,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(F).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 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>B;r/=2)i.push(r);i.push(B);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()],H.prototype,"_overlayContainer",void 0),e([h()],H.prototype,"_isValid",void 0),e([h()],H.prototype,"_effectsContainer",void 0),e([h()],H.prototype,"constraintsInfo",null),e([h()],H.prototype,"operationalDataVisible",void 0),e([h()],H.prototype,"layer",void 0),e([h()],H.prototype,"map",void 0),e([h({type:O,nonNullable:!0})],H.prototype,"navigation",void 0),e([h({readOnly:!0})],H.prototype,"preconditionsReady",null),e([h({readOnly:!0})],H.prototype,"ready",void 0),e([h({readOnly:!0})],H.prototype,"rendering",null),e([h()],H.prototype,"scale",null),e([h()],H.prototype,"spatialReference",void 0),e([h()],H.prototype,"stateManager",void 0),e([h()],H.prototype,"type",void 0),e([h(),d(e=>e instanceof T?e:g(W,e))],H.prototype,"ui",void 0),e([h({readOnly:!0})],H.prototype,"videoSize",null),e([h({readOnly:!0})],H.prototype,"view2dType",void 0),H=e([c("esri.views.VideoView")],H);const L=H;export{L as default};
package/views/View.js CHANGED
@@ -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{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import s from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as h}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as y,abortMaybe as u}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import{watch as g,sync as f,whenOnce as w,when as v,syncAndInitial as _}from"../core/reactiveUtils.js";import{property as V}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as M}from"../core/accessorSupport/decorators/subclass.js";import{owningCollectionProperty as R}from"../core/support/OwningCollection.js";import{UpdatingHandles as S}from"../core/support/UpdatingHandles.js";import T from"../geometry/Extent.js";import j from"../geometry/HeightModelInfo.js";import F from"../geometry/SpatialReference.js";import{equals as E}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as k}from"../support/AnalysesCollection.js";import{GraphicsCollection as x}from"../support/GraphicsCollection.js";import{system as b}from"../time/constants.js";import{T as O}from"../chunks/TimeExtent.js";import{isTimeZoneValid as C}from"../time/timeZoneUtils.js";import L from"./BasemapView.js";import H from"./Magnifier.js";import P from"./SelectionManager.js";import Z from"./Theme.js";import{ToolViewManager as I}from"./ToolViewManager.js";import{makeDefaultHighlightOptions as W}from"./3d/support/DefaultHighlights.js";import q from"./input/Input.js";import{ViewEvents as D}from"./input/ViewEvents.js";import U from"./navigation/Navigation.js";import{DefaultsFromMap as z}from"./support/DefaultsFromMap.js";import A from"./support/HighlightOptions.js";import G from"./support/LayerViewManager.js";import N from"./support/RequiredFieldsOptions.js";var $;let B=class extends(n(m)){static{$=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new S,this.allLayerViews=new s({getCollections:()=>[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:Q}),this.analyses=new k,this.basemapView=null,this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new x,this.groundView=null,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new H,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.supportsGround=!0,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new q,this.navigation=new U,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new D(this),this.persistableViewModels=new r,this.requiredFieldsOptions=new N,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this.theme=null,this.handles.add(g(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,$.views.add(this)):(this._lockedSpatialReference=null,$.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this.analysisViewManager?.attach(),this.toolViewManager.attach()}},f))}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,w(()=>this.ready)))),this.basemapView=new L({view:this}),this.layerViewManager=new G({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},supportsGround:this.supportsGround}),this.toolViewManager=new I({view:this}),this.selectionManager=new P({view:this}),this.addHandles([v(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{d.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),g(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},_),g(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)},f),g(()=>this._userSpatialReference,e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)},_)])}destroy(){this.destroyed||($.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=y(this.graphics),this.analyses=y(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=y(this.analysisViewManager),this.toolViewManager=y(this.toolViewManager),this.layerViewManager=y(this.layerViewManager),this.selectionManager=y(this.selectionManager),this.basemapView=y(this.basemapView),this.groundView?.destroy(),this.layerViews?.forEach(e=>e.destroy()),this.layerViews.length=0,this.invalidate(),this.handles.destroy(),this.map=y(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new z({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get highlights(){return this._get("highlights")??W()}set highlights(e){this._set("highlights",a(e,this._get("highlights"),r.ofType(A)))}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){return!this.destroying&&!this.destroyed&&!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||h(this.map)&&!this.map.loaded||0===this.width||0===this.height||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(d.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),h(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=u(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const e=this._userSpatialReference||this._lockedSpatialReference||this.getDefaultSpatialReference()||null;if(e&&this.defaultsFromMap?.required?.heightModelInfo){const t=e.clone();return t.vcsWkid=this.defaultsFromMap.vcsWkid,t.latestVcsWkid=this.defaultsFromMap.latestVcsWkid,t}return e}set spatialReference(e){const t=!E(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(e))}_spatialReferenceChanged(e){}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??b}set timeZone(e){this._userTimeZone=e,C(e)||d.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},s=p(()=>i.remove(r));return i.add(r),this.addHandles(s),s}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new Z}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getDefaultSpatialReference(){return this.defaultsFromMap?.spatialReference}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(v(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}};e([V()],B.prototype,"_userSpatialReference",void 0),e([V()],B.prototype,"activeTool",null),e([V({readOnly:!0})],B.prototype,"allLayerViews",void 0),e([V(R(k,"analyses"))],B.prototype,"analyses",void 0),e([V()],B.prototype,"animation",null),e([V()],B.prototype,"basemapView",void 0),e([V()],B.prototype,"center",null),e([V()],B.prototype,"defaultsFromMapSettings",null),e([V()],B.prototype,"defaultsFromMap",null),e([V()],B.prototype,"displayFilterEnabled",void 0),e([V({type:T})],B.prototype,"extent",null),e([V()],B.prototype,"fatalError",void 0),e([V(R(x,"graphics"))],B.prototype,"graphics",void 0),e([V()],B.prototype,"groundView",void 0),e([V({readOnly:!0,type:j})],B.prototype,"heightModelInfo",null),e([V({type:r.ofType(A)})],B.prototype,"highlights",null),e([V({readOnly:!0})],B.prototype,"interacting",null),e([V({constructOnly:!0})],B.prototype,"layerViewFilter",void 0),e([V({readOnly:!0})],B.prototype,"navigating",null),e([V({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_lockedSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],B.prototype,"preconditionsReady",null),e([V({readOnly:!0})],B.prototype,"typeSpecificPreconditionsReady",void 0),e([V({type:r,readOnly:!0})],B.prototype,"layerViews",void 0),e([V()],B.prototype,"resolution",null),e([V({type:H})],B.prototype,"magnifier",void 0),e([V({value:null,type:t})],B.prototype,"map",null),e([V()],B.prototype,"padding",void 0),e([V({readOnly:!0})],B.prototype,"ready",void 0),e([V()],B.prototype,"_readyStateWaitingTask",void 0),e([V({readOnly:!0})],B.prototype,"readyState",null),e([V({type:F})],B.prototype,"spatialReference",null),e([V()],B.prototype,"stationary",null),e([V({readOnly:!0})],B.prototype,"supportsGround",void 0),e([V({type:O})],B.prototype,"timeExtent",null),e([V({type:String,nonNullable:!0})],B.prototype,"timeZone",null),e([V()],B.prototype,"tools",null),e([V()],B.prototype,"toolViewManager",void 0),e([V({readOnly:!0})],B.prototype,"type",void 0),e([V({type:Number})],B.prototype,"scale",void 0),e([V({readOnly:!0})],B.prototype,"updating",void 0),e([V({readOnly:!0})],B.prototype,"initialExtentRequired",void 0),e([V({readOnly:!0})],B.prototype,"initialExtent",null),e([V()],B.prototype,"cursor",null),e([V({readOnly:!0})],B.prototype,"input",void 0),e([V({type:U,nonNullable:!0})],B.prototype,"navigation",void 0),e([V()],B.prototype,"layerViewManager",void 0),e([V()],B.prototype,"analysisViewManager",void 0),e([V()],B.prototype,"selectionManager",void 0),e([V()],B.prototype,"width",void 0),e([V()],B.prototype,"height",void 0),e([V({readOnly:!0})],B.prototype,"resizing",void 0),e([V({value:null,readOnly:!0})],B.prototype,"size",null),e([V({readOnly:!0})],B.prototype,"suspended",void 0),e([V({readOnly:!0})],B.prototype,"viewEvents",void 0),e([V({readOnly:!0})],B.prototype,"persistableViewModels",void 0),e([V()],B.prototype,"_isValid",void 0),e([V()],B.prototype,"_readyCycleForced",void 0),e([V()],B.prototype,"_lockedSpatialReference",void 0),e([V()],B.prototype,"_userTimeZone",void 0),e([V()],B.prototype,"_lockedTimeZone",void 0),e([V()],B.prototype,"_userTimeExtent",void 0),e([V()],B.prototype,"_lockedTimeExtent",void 0),e([V({type:Z})],B.prototype,"theme",void 0),e([V({readOnly:!0,type:Z})],B.prototype,"effectiveTheme",null),B=$=e([M("esri.views.View")],B);const J=globalThis.$arcgis;J&&!J.views&&Object.defineProperty(J,"views",{configurable:!1,enumerable:!0,writable:!1,value:B.views});const K=B;function Q(e){return e.layerViews}export{K as default};
5
+ import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import s from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as h}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as y,abortMaybe as u}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import{watch as g,sync as f,whenOnce as w,when as v,syncAndInitial as _}from"../core/reactiveUtils.js";import{property as V}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as M}from"../core/accessorSupport/decorators/subclass.js";import{owningCollectionProperty as R}from"../core/support/OwningCollection.js";import{UpdatingHandles as S}from"../core/support/UpdatingHandles.js";import j from"../geometry/Extent.js";import T from"../geometry/HeightModelInfo.js";import F from"../geometry/SpatialReference.js";import{equals as E}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as k}from"../support/AnalysesCollection.js";import{GraphicsCollection as x}from"../support/GraphicsCollection.js";import{system as b}from"../time/constants.js";import O from"../time/TimeExtent.js";import{isTimeZoneValid as C}from"../time/timeZoneUtils.js";import L from"./BasemapView.js";import H from"./Magnifier.js";import P from"./SelectionManager.js";import Z from"./Theme.js";import{ToolViewManager as I}from"./ToolViewManager.js";import{makeDefaultHighlightOptions as W}from"./3d/support/DefaultHighlights.js";import q from"./input/Input.js";import{ViewEvents as D}from"./input/ViewEvents.js";import U from"./navigation/Navigation.js";import{DefaultsFromMap as z}from"./support/DefaultsFromMap.js";import A from"./support/HighlightOptions.js";import G from"./support/LayerViewManager.js";import N from"./support/RequiredFieldsOptions.js";var $;let B=class extends(n(m)){static{$=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new S,this.allLayerViews=new s({getCollections:()=>[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:Q}),this.analyses=new k,this.basemapView=null,this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new x,this.groundView=null,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new H,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.supportsGround=!0,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new q,this.navigation=new U,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new D(this),this.persistableViewModels=new r,this.requiredFieldsOptions=new N,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this.theme=null,this.handles.add(g(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,$.views.add(this)):(this._lockedSpatialReference=null,$.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this.analysisViewManager?.attach(),this.toolViewManager.attach()}},f))}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,w(()=>this.ready)))),this.basemapView=new L({view:this}),this.layerViewManager=new G({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},supportsGround:this.supportsGround}),this.toolViewManager=new I({view:this}),this.selectionManager=new P({view:this}),this.addHandles([v(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{d.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),g(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},_),g(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)},f),g(()=>this._userSpatialReference,e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)},_)])}destroy(){this.destroyed||($.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=y(this.graphics),this.analyses=y(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=y(this.analysisViewManager),this.toolViewManager=y(this.toolViewManager),this.layerViewManager=y(this.layerViewManager),this.selectionManager=y(this.selectionManager),this.basemapView=y(this.basemapView),this.groundView?.destroy(),this.layerViews?.forEach(e=>e.destroy()),this.layerViews.length=0,this.invalidate(),this.handles.destroy(),this.map=y(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new z({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get highlights(){return this._get("highlights")??W()}set highlights(e){this._set("highlights",a(e,this._get("highlights"),r.ofType(A)))}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){return!this.destroying&&!this.destroyed&&!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||h(this.map)&&!this.map.loaded||0===this.width||0===this.height||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(d.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),h(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=u(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const e=this._userSpatialReference||this._lockedSpatialReference||this.getDefaultSpatialReference()||null;if(e&&this.defaultsFromMap?.required?.heightModelInfo){const t=e.clone();return t.vcsWkid=this.defaultsFromMap.vcsWkid,t.latestVcsWkid=this.defaultsFromMap.latestVcsWkid,t}return e}set spatialReference(e){const t=!E(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(e))}_spatialReferenceChanged(e){}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??b}set timeZone(e){this._userTimeZone=e,C(e)||d.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},s=p(()=>i.remove(r));return i.add(r),this.addHandles(s),s}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new Z}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getDefaultSpatialReference(){return this.defaultsFromMap?.spatialReference}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(v(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}};e([V()],B.prototype,"_userSpatialReference",void 0),e([V()],B.prototype,"activeTool",null),e([V({readOnly:!0})],B.prototype,"allLayerViews",void 0),e([V(R(k,"analyses"))],B.prototype,"analyses",void 0),e([V()],B.prototype,"animation",null),e([V()],B.prototype,"basemapView",void 0),e([V()],B.prototype,"center",null),e([V()],B.prototype,"defaultsFromMapSettings",null),e([V()],B.prototype,"defaultsFromMap",null),e([V()],B.prototype,"displayFilterEnabled",void 0),e([V({type:j})],B.prototype,"extent",null),e([V()],B.prototype,"fatalError",void 0),e([V(R(x,"graphics"))],B.prototype,"graphics",void 0),e([V()],B.prototype,"groundView",void 0),e([V({readOnly:!0,type:T})],B.prototype,"heightModelInfo",null),e([V({type:r.ofType(A)})],B.prototype,"highlights",null),e([V({readOnly:!0})],B.prototype,"interacting",null),e([V({constructOnly:!0})],B.prototype,"layerViewFilter",void 0),e([V({readOnly:!0})],B.prototype,"navigating",null),e([V({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_lockedSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],B.prototype,"preconditionsReady",null),e([V({readOnly:!0})],B.prototype,"typeSpecificPreconditionsReady",void 0),e([V({type:r,readOnly:!0})],B.prototype,"layerViews",void 0),e([V()],B.prototype,"resolution",null),e([V({type:H})],B.prototype,"magnifier",void 0),e([V({value:null,type:t})],B.prototype,"map",null),e([V()],B.prototype,"padding",void 0),e([V({readOnly:!0})],B.prototype,"ready",void 0),e([V()],B.prototype,"_readyStateWaitingTask",void 0),e([V({readOnly:!0})],B.prototype,"readyState",null),e([V({type:F})],B.prototype,"spatialReference",null),e([V()],B.prototype,"stationary",null),e([V({readOnly:!0})],B.prototype,"supportsGround",void 0),e([V({type:O})],B.prototype,"timeExtent",null),e([V({type:String,nonNullable:!0})],B.prototype,"timeZone",null),e([V()],B.prototype,"tools",null),e([V()],B.prototype,"toolViewManager",void 0),e([V({readOnly:!0})],B.prototype,"type",void 0),e([V({type:Number})],B.prototype,"scale",void 0),e([V({readOnly:!0})],B.prototype,"updating",void 0),e([V({readOnly:!0})],B.prototype,"initialExtentRequired",void 0),e([V({readOnly:!0})],B.prototype,"initialExtent",null),e([V()],B.prototype,"cursor",null),e([V({readOnly:!0})],B.prototype,"input",void 0),e([V({type:U,nonNullable:!0})],B.prototype,"navigation",void 0),e([V()],B.prototype,"layerViewManager",void 0),e([V()],B.prototype,"analysisViewManager",void 0),e([V()],B.prototype,"selectionManager",void 0),e([V()],B.prototype,"width",void 0),e([V()],B.prototype,"height",void 0),e([V({readOnly:!0})],B.prototype,"resizing",void 0),e([V({value:null,readOnly:!0})],B.prototype,"size",null),e([V({readOnly:!0})],B.prototype,"suspended",void 0),e([V({readOnly:!0})],B.prototype,"viewEvents",void 0),e([V({readOnly:!0})],B.prototype,"persistableViewModels",void 0),e([V()],B.prototype,"_isValid",void 0),e([V()],B.prototype,"_readyCycleForced",void 0),e([V()],B.prototype,"_lockedSpatialReference",void 0),e([V()],B.prototype,"_userTimeZone",void 0),e([V()],B.prototype,"_lockedTimeZone",void 0),e([V()],B.prototype,"_userTimeExtent",void 0),e([V()],B.prototype,"_lockedTimeExtent",void 0),e([V({type:Z})],B.prototype,"theme",void 0),e([V({readOnly:!0,type:Z})],B.prototype,"effectiveTheme",null),B=$=e([M("esri.views.View")],B);const J=globalThis.$arcgis;J&&!J.views&&Object.defineProperty(J,"views",{configurable:!1,enumerable:!0,writable:!1,value:B.views});const K=B;function Q(e){return e.layerViews}export{K 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{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{min as o}from"../../../core/arrayUtils.js";import{createTask as i}from"../../../core/asyncUtils.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{LRUCache as r}from"../../../core/LRUCache.js";import{mapCollection as a}from"../../../core/mapCollectionUtils.js";import{destroyMaybe as n,abortMaybe as l}from"../../../core/maybe.js";import{memoize as p}from"../../../core/memoize.js";import{throwIfAborted as u,throwIfAbortError as m}from"../../../core/promiseUtils.js";import{watch as c,syncAndInitial as h,on as _}from"../../../core/reactiveUtils.js";import{throttle as d}from"../../../core/throttle.js";import{adaptiveLengthUnit as f,adaptiveVerticalLengthUnit as y}from"../../../core/unitUtils.js";import{property as v}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as g}from"../../../core/accessorSupport/decorators/subclass.js";import{ElevationQueryTileCache as C}from"../../../layers/support/ElevationQueryTileCache.js";import{hasGraphicFeatureExpressionInfo as P,getGraphicEffectiveElevationInfo as T}from"../../../support/elevationInfoUtils.js";import{getDefaultUnitForView as j}from"../../../support/getDefaultUnitForView.js";import{getConfig as U}from"./constants.js";import{createProfileQueue as R,generateProfiles as w}from"./elevationProfileGenerationUtils.js";import{isValidInputPath as M,getInputGeometry as z,getInputGraphic as D}from"./elevationProfileGeometryUtils.js";import{getBoundsInMeters as b,mergeStatistics as I}from"./elevationProfileStatisticsUtils.js";let E=class extends e{constructor(t){super(t),this.error=null,this._getEffectiveUnitsMemoized=p((t,e)=>({distance:t,elevation:e})),this._updateTask=null,this._queue=null,this._currentTileCache=null,this._parametersPerComputation=new Map,this._getUpdateParametersMemoized=p((t,e,o)=>({stationary:t,activeComputations:e,generationParameters:o})),this._getGenerationParametersMemoized=p((t,e,o,i,s,r,a)=>M(e)&&null!=i?{view:t,geometry:e,elevationInfo:o,options:r,queue:i,cache:s,slicePlane:a}:null),this._getElevationInfoMemoized=p((t,e)=>({mode:t,offset:e})),this._getOptionsMemoized=p((t,e)=>{const{densificationMaxSamples:o,maxTotalSamples:i}=U();return{samplingDistance:t,densificationMaxSamples:Math.round(o/e),maxTotalSamples:i}}),this._updateThrottled=d(t=>this._update(t),U().updateThrottleMillis)}initialize(){this._computationsCollection=a(()=>this.analysis.profiles,t=>this.computationFactory.create({controller:this,profileLine:t,onInvalidate:t=>this._invalidateComputation(t)}),{recycleItems:!0}),this.addHandles([this._computationsCollection.on("change",()=>{this._parametersPerComputation.clear(),this._updateThrottled(this._updateParameters)}),c(()=>this._updateParameters,t=>this._updateThrottled(t),h),this._updateThrottled]);const t="3d"===this.view.type?this.view.resourceController:void 0;this._queue=R(t?.scheduler),t?.addUpdatingObject(this)}destroy(){this._abortUpdate(),this._parametersPerComputation.clear(),this._computationsCollection?.destroy(),this._queue=n(this._queue),this._currentTileCache=n(this._currentTileCache)}get units(){const t=b(this._activeComputations.map(t=>t.result.rawResult)),e=this.analysis.units,o=j(this.view),i=f(t.maxDistance,"meters",e.distance??o),s=y(t.maxElevation,"meters",e.elevation??o);return this._getEffectiveUnitsMemoized(i,s)}get progress(){let t=0,e=0;for(const o of this._activeComputations)t++,e+=o.progress;return t>0?e/t:0}get updating(){const{progress:t}=this;return t>0&&t<1||!!this._queue?.updating||this._updateThrottled.hasPendingUpdates()||null!=this._updateTask&&!this._updateTask.finished}get results(){return this._computations.map(t=>t.result)}get statistics(){return I(this._activeComputations.map(t=>t.result.statistics))}get hoveredPoints(){return this._computations.map(t=>t.hoveredPoint)}onElevationChange(t){const{view:e}=this;return"3d"===e?.type?_(()=>e.elevationProvider,"elevation-change",t,{onListenerAdd:t,onListenerRemove:t}):s()}get _tileCache(){this._currentTileCache=n(this._currentTileCache);const t=this.view;if("3d"===t?.type){const e=t.basemapTerrain?.elevationQueryCache;if(null!=e)return e}return null==this._currentTileCache&&(this._currentTileCache=new C(new r(20971520))),this._currentTileCache}get _computations(){return this._computationsCollection?.toArray()??[]}get _activeComputations(){return this._computations.filter(t=>t.profileLine.enabled&&t.available)}get _minDemResolution(){const t=this._minDemResolutions;return t.length>0?o(t):null}get _minDemResolutions(){const t=[];for(const{minDemResolution:e}of this._activeComputations)null!=e&&t.push(e);return t}get _updateParameters(){const{view:t}=this;return this._getUpdateParametersMemoized(t?.stationary??!0,this._activeComputations,this._generationParameters)}get _generationParameters(){const{view:t}=this;return null!=t&&t.ready?this._getGenerationParametersMemoized(t,this._inputGeometry,this._elevationInfo,this._queue,this._tileCache,this._options,"3d"===t.type?t.slice.plane:null):null}get _inputGeometry(){return z(this.analysis.input)}get _elevationInfo(){const t=D(this.analysis.input);if(!t)return null;const e=t?P(t)?null:T(t):null;return null!=e?this._getElevationInfoMemoized(e.mode,e.offset):null}get _options(){const t=this._activeComputations.length;let e=this._minDemResolution??U().defaultDemResolution;return e=parseFloat(e.toFixed(2)),this._getOptionsMemoized(e,t)}_update({stationary:t,activeComputations:e,generationParameters:o}){this._abortUpdate(),t&&(null!=o?this._updateTask=i(async t=>{this.error=null;const i=e.filter(t=>!this._isComputationValid(t,o)),s=w({...o,providers:i},{signal:t});try{for await(const e of s){u(t),this._clearInvalidResults(o);for(let t=0;t<i.length;t++)i[t].setResult(e[t])}for(const t of i)this._parametersPerComputation.set(t,o)}catch(r){m(r),this._abortUpdate(),this.error=r,i.forEach(t=>{t.clearResult()})}}):this._clearResults())}_abortUpdate(){this._updateTask=l(this._updateTask)}_isComputationValid(t,e){return this._parametersPerComputation.has(t)&&this._parametersPerComputation.get(t)===e}_invalidateComputation(t){this._parametersPerComputation.delete(t),this._updateThrottled(this._updateParameters)}_clearInvalidResults(t){for(const e of this._computations)this._isComputationValid(e,t)||(e.clearResult(),this._parametersPerComputation.delete(e))}_clearResults(){for(const t of this._computations)t.clearResult(),this._parametersPerComputation.delete(t)}};t([v({constructOnly:!0})],E.prototype,"analysis",void 0),t([v({constructOnly:!0})],E.prototype,"analysisViewData",void 0),t([v({constructOnly:!0})],E.prototype,"computationFactory",void 0),t([v({constructOnly:!0})],E.prototype,"view",void 0),t([v()],E.prototype,"error",void 0),t([v({readOnly:!0})],E.prototype,"units",null),t([v()],E.prototype,"progress",null),t([v()],E.prototype,"updating",null),t([v()],E.prototype,"results",null),t([v()],E.prototype,"statistics",null),t([v()],E.prototype,"hoveredPoints",null),t([v()],E.prototype,"_queue",void 0),t([v()],E.prototype,"_tileCache",null),t([v()],E.prototype,"_computationsCollection",void 0),t([v()],E.prototype,"_computations",null),t([v()],E.prototype,"_activeComputations",null),t([v({readOnly:!0})],E.prototype,"_minDemResolution",null),t([v()],E.prototype,"_minDemResolutions",null),t([v()],E.prototype,"_updateParameters",null),t([v()],E.prototype,"_generationParameters",null),t([v()],E.prototype,"_inputGeometry",null),t([v()],E.prototype,"_elevationInfo",null),t([v()],E.prototype,"_options",null),E=t([g("esri.views.analysis.ElevationProfile.ElevationProfileController")],E);export{E as ElevationProfileController};
5
+ import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{min as o}from"../../../core/arrayUtils.js";import{createTask as i}from"../../../core/asyncUtils.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{LRUCache as r}from"../../../core/LRUCache.js";import{mapCollection as a}from"../../../core/mapCollectionUtils.js";import{destroyMaybe as n,abortMaybe as l}from"../../../core/maybe.js";import{memoize as p}from"../../../core/memoize.js";import{throwIfAborted as u,throwIfAbortError as m}from"../../../core/promiseUtils.js";import{watch as c,syncAndInitial as h,on as _}from"../../../core/reactiveUtils.js";import{throttle as d}from"../../../core/throttle.js";import{adaptiveLengthUnit as f,adaptiveVerticalLengthUnit as v}from"../../../core/unitUtils.js";import{property as y}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as g}from"../../../core/accessorSupport/decorators/subclass.js";import{ElevationQueryTileCache as C}from"../../../layers/support/ElevationQueryTileCache.js";import{hasGraphicFeatureExpressionInfo as P,getGraphicEffectiveElevationInfo as j}from"../../../support/elevationInfoUtils.js";import{getDefaultUnitForView as T}from"../../../support/getDefaultUnitForView.js";import{getConfig as U}from"./constants.js";import{ElevationProfileGenerationError as w}from"./ElevationProfileGenerationError.js";import{createProfileQueue as R,generateProfiles as M}from"./elevationProfileGenerationUtils.js";import{isValidInputPath as z,getInputGeometry as D,getInputGraphic as E}from"./elevationProfileGeometryUtils.js";import{getBoundsInMeters as b,mergeStatistics as I}from"./elevationProfileStatisticsUtils.js";let x=class extends e{constructor(t){super(t),this.error=null,this._getEffectiveUnitsMemoized=p((t,e)=>({distance:t,elevation:e})),this._updateTask=null,this._queue=null,this._currentTileCache=null,this._parametersPerComputation=new Map,this._getUpdateParametersMemoized=p((t,e,o)=>({stationary:t,activeComputations:e,generationParameters:o})),this._getGenerationParametersMemoized=p((t,e,o,i,s,r,a)=>z(e)&&null!=i?{view:t,geometry:e,elevationInfo:o,options:r,queue:i,cache:s,slicePlane:a}:null),this._getElevationInfoMemoized=p((t,e)=>({mode:t,offset:e})),this._getOptionsMemoized=p((t,e)=>{const{densificationMaxSamples:o,maxTotalSamples:i}=U();return{samplingDistance:t,densificationMaxSamples:Math.round(o/e),maxTotalSamples:i}}),this._updateThrottled=d(t=>this._update(t),U().updateThrottleMillis)}initialize(){this._computationsCollection=a(()=>this.analysis.profiles,t=>this.computationFactory.create({controller:this,profileLine:t,onInvalidate:t=>this._invalidateComputation(t)}),{recycleItems:!0}),this.addHandles([this._computationsCollection.on("change",()=>{this._parametersPerComputation.clear(),this._updateThrottled(this._updateParameters)}),c(()=>this._updateParameters,t=>this._updateThrottled(t),h),this._updateThrottled]);const t="3d"===this.view.type?this.view.resourceController:void 0;this._queue=R(t?.scheduler),t?.addUpdatingObject(this)}destroy(){this._abortUpdate(),this._parametersPerComputation.clear(),this._computationsCollection?.destroy(),this._queue=n(this._queue),this._currentTileCache=n(this._currentTileCache)}get effectiveUnits(){const t=b(this._activeComputations.map(t=>t.result.rawResult)),e=this.analysis.units,o=T(this.view),i=f(t.maxDistance,"meters",e.distance??o),s=v(t.maxElevation,"meters",e.elevation??o);return this._getEffectiveUnitsMemoized(i,s)}get progress(){let t=0,e=0;for(const o of this._activeComputations)t++,e+=o.progress;return t>0?e/t:0}get updating(){const{progress:t}=this;return t>0&&t<1||!!this._queue?.updating||this._updateThrottled.hasPendingUpdates()||null!=this._updateTask&&!this._updateTask.finished}get results(){return this._computations.map(t=>t.result)}get statistics(){return I(this._activeComputations.map(t=>t.result.statistics))}get hoveredPoints(){return this._computations.map(t=>t.hoveredPoint)}onElevationChange(t){const{view:e}=this;return"3d"===e?.type?_(()=>e.elevationProvider,"elevation-change",t,{onListenerAdd:t,onListenerRemove:t}):s()}get _tileCache(){this._currentTileCache=n(this._currentTileCache);const t=this.view;if("3d"===t?.type){const e=t.basemapTerrain?.elevationQueryCache;if(null!=e)return e}return null==this._currentTileCache&&(this._currentTileCache=new C(new r(20971520))),this._currentTileCache}get _computations(){return this._computationsCollection?.toArray()??[]}get _activeComputations(){return this._computations.filter(t=>t.profileLine.enabled&&t.available)}get _minDemResolution(){const t=this._minDemResolutions;return t.length>0?o(t):null}get _minDemResolutions(){const t=[];for(const{minDemResolution:e}of this._activeComputations)null!=e&&t.push(e);return t}get _updateParameters(){const{view:t}=this;return this._getUpdateParametersMemoized(t?.stationary??!0,this._activeComputations,this._generationParameters)}get _generationParameters(){const{view:t}=this;return null!=t&&t.ready?this._getGenerationParametersMemoized(t,this._inputGeometry,this._elevationInfo,this._queue,this._tileCache,this._options,"3d"===t.type?t.slice.plane:null):null}get _inputGeometry(){return D(this.analysis.input)}get _elevationInfo(){const t=E(this.analysis.input);if(!t)return null;const e=t?P(t)?null:j(t):null;return null!=e?this._getElevationInfoMemoized(e.mode,e.offset):null}get _options(){const t=this._activeComputations.length;let e=this._minDemResolution??U().defaultDemResolution;return e=parseFloat(e.toFixed(2)),this._getOptionsMemoized(e,t)}_update({stationary:t,activeComputations:e,generationParameters:o}){this._abortUpdate(),t&&(null!=o?this._updateTask=i(async t=>{this.error=null;const i=e.filter(t=>!this._isComputationValid(t,o)),s=M({...o,providers:i},{signal:t});try{for await(const e of s){u(t),this._clearInvalidResults(o);for(let t=0;t<i.length;t++)i[t].setResult(e[t])}for(const t of i)this._parametersPerComputation.set(t,o)}catch(r){m(r),this._abortUpdate(),this.error=r instanceof w?r:new w("unknown"),i.forEach(t=>{t.clearResult()})}}):this._clearResults())}_abortUpdate(){this._updateTask=l(this._updateTask)}_isComputationValid(t,e){return this._parametersPerComputation.has(t)&&this._parametersPerComputation.get(t)===e}_invalidateComputation(t){this._parametersPerComputation.delete(t),this._updateThrottled(this._updateParameters)}_clearInvalidResults(t){for(const e of this._computations)this._isComputationValid(e,t)||(e.clearResult(),this._parametersPerComputation.delete(e))}_clearResults(){for(const t of this._computations)t.clearResult(),this._parametersPerComputation.delete(t)}};t([y({constructOnly:!0})],x.prototype,"analysis",void 0),t([y({constructOnly:!0})],x.prototype,"analysisViewData",void 0),t([y({constructOnly:!0})],x.prototype,"computationFactory",void 0),t([y({constructOnly:!0})],x.prototype,"view",void 0),t([y()],x.prototype,"error",void 0),t([y({readOnly:!0})],x.prototype,"effectiveUnits",null),t([y()],x.prototype,"progress",null),t([y()],x.prototype,"updating",null),t([y()],x.prototype,"results",null),t([y()],x.prototype,"statistics",null),t([y()],x.prototype,"hoveredPoints",null),t([y()],x.prototype,"_queue",void 0),t([y()],x.prototype,"_tileCache",null),t([y()],x.prototype,"_computationsCollection",void 0),t([y()],x.prototype,"_computations",null),t([y()],x.prototype,"_activeComputations",null),t([y({readOnly:!0})],x.prototype,"_minDemResolution",null),t([y()],x.prototype,"_minDemResolutions",null),t([y()],x.prototype,"_updateParameters",null),t([y()],x.prototype,"_generationParameters",null),t([y()],x.prototype,"_inputGeometry",null),t([y()],x.prototype,"_elevationInfo",null),t([y()],x.prototype,"_options",null),x=t([g("esri.views.analysis.ElevationProfile.ElevationProfileController")],x);export{x as ElevationProfileController};
@@ -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
- const e="ProfileGenerationError";class r extends Error{constructor(r){super("profile could not be generated",{cause:r}),this.type=e}}function t(r){return r.type===e}export{r as ElevationProfileGenerationError,t as isElevationProfileGenerationError};
5
+ import r from"../../../core/Error.js";class e extends r{constructor(r){super(`elevation-profile-analysis:${r}`,"Elevation profile generation error")}}export{e as ElevationProfileGenerationError};
@@ -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{__decorate as t}from"tslib";import{Clonable as e}from"../../../core/Clonable.js";import{memoize as o}from"../../../core/memoize.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 s}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../../geometry/Point.js";import{binaryFindClosest as l}from"./elevationProfileGenerationUtils.js";import{convertSamples as n,convertStatistics as a}from"./elevationProfileUnitUtils.js";let p=class extends e{constructor(t){super(t),this._getSamplesMemoized=o((t,e)=>n(t,e)),this._getStatisticsMemoized=o((t,e)=>a(t,e)),this.rawResult=null}get available(){const{computation:t}=this;return t.profileLine.enabled&&t.available}get progress(){return null!=this.rawResult&&this.computation.profileLine.enabled?this.rawResult.progress:0}get samples(){return this._getSamplesMemoized(this.rawResult,this.computation.controller.units)}get statistics(){return this._getStatisticsMemoized(this.rawResult,this.computation.controller.units)}get hoveredPoint(){if(!this.computation.profileLine.enabled)return null;const t=this.computation.controller.analysisViewData.hoveredPosition;if(null==t)return null;const{rawResult:e,samples:o}=this;if(null==o||null==e)return null;const r=o.length;if(0===r)return null;const s=o[r-1].distance,n=l(o,t*s,t=>t.distance);if(null==n)return null;const{x:a,y:p,z:u}=n;return null==u?null:new i({x:a,y:p,z:u,spatialReference:e.spatialReference})}};t([r()],p.prototype,"available",null),t([r()],p.prototype,"progress",null),t([r()],p.prototype,"samples",null),t([r()],p.prototype,"statistics",null),t([r({constructOnly:!0})],p.prototype,"computation",void 0),t([r()],p.prototype,"rawResult",void 0),t([r()],p.prototype,"hoveredPoint",null),p=t([s("esri.views.analysis.ElevationProfile.ElevationProfileResult")],p);export{p as default};
5
+ import{__decorate as t}from"tslib";import{Clonable as e}from"../../../core/Clonable.js";import{memoize as o}from"../../../core/memoize.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 s}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../../geometry/Point.js";import{binaryFindClosest as l}from"./elevationProfileGenerationUtils.js";import{convertSamples as n,convertStatistics as a}from"./elevationProfileUnitUtils.js";let p=class extends e{constructor(t){super(t),this._getSamplesMemoized=o((t,e)=>n(t,e)),this._getStatisticsMemoized=o((t,e)=>a(t,e)),this.rawResult=null}get available(){const{computation:t}=this;return t.profileLine.enabled&&t.available}get progress(){return null!=this.rawResult&&this.computation.profileLine.enabled?this.rawResult.progress:0}get samples(){return this._getSamplesMemoized(this.rawResult,this.computation.controller.effectiveUnits)}get statistics(){return this._getStatisticsMemoized(this.rawResult,this.computation.controller.effectiveUnits)}get hoveredPoint(){if(!this.computation.profileLine.enabled)return null;const t=this.computation.controller.analysisViewData.hoveredPosition;if(null==t)return null;const{rawResult:e,samples:o}=this;if(null==o||null==e)return null;const r=o.length;if(0===r)return null;const s=o[r-1].distance,n=l(o,t*s,t=>t.distance);if(null==n)return null;const{x:a,y:p,z:u}=n;return null==u?null:new i({x:a,y:p,z:u,spatialReference:e.spatialReference})}};t([r()],p.prototype,"available",null),t([r()],p.prototype,"progress",null),t([r()],p.prototype,"samples",null),t([r()],p.prototype,"statistics",null),t([r({constructOnly:!0})],p.prototype,"computation",void 0),t([r()],p.prototype,"rawResult",void 0),t([r()],p.prototype,"hoveredPoint",null),p=t([s("esri.views.analysis.ElevationProfile.ElevationProfileResult")],p);export{p 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 e from"../../core/Error.js";import{Integer as r,Null as t}from"../../core/accessorSupport/ensureType.js";import{T as s}from"../../chunks/TimeExtent.js";const o={type:s,json:{read:{source:"timeExtent",reader:e=>e?Array.isArray(e)?s.fromArray(e):s.fromJSON(e):null},write:{writer:(r,t,s,o)=>{r&&(r.isEmpty?o?.messages&&o.messages.push(new e("invalid-timeExtent","TimeExtent cannot be empty")):t[s]=r.toArray())},target:{timeExtent:{type:[[r,t]]}}}}};export{o as timeExtent};
5
+ import e from"../../core/Error.js";import{Integer as r,Null as t}from"../../core/accessorSupport/ensureType.js";import o from"../../time/TimeExtent.js";const m={type:o,json:{read:{source:"timeExtent",reader:e=>e?Array.isArray(e)?o.fromArray(e):o.fromJSON(e):null},write:{writer:(r,t,o,m)=>{r&&(r.isEmpty?m?.messages&&m.messages.push(new e("invalid-timeExtent","TimeExtent cannot be empty")):t[o]=r.toArray())},target:{timeExtent:{type:[[r,t]]}}}}};export{m as timeExtent};
@@ -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{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{setDeepValue as o}from"../../core/object.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{Integer as p,Null as n}from"../../core/accessorSupport/ensureType.js";import{reader as i}from"../../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";import{timeUnitKebabDictionary as a}from"../../portal/timeUnitKebabDictionary.js";import{T as m}from"../../chunks/TimeExtent.js";import{T as c}from"../../chunks/TimeInterval.js";var d;let T=d=class extends e{constructor(t){super(t),this.currentTimeExtent=null,this.fullTimeExtent=null,this.loop=!1,this.numStops=null,this.numThumbs=null,this.stopDelay=null,this.stopInterval=null,this.stops=null}readCurrentTimeExtent(t){return t?m.fromArray(t):void 0}writeCurrentTimeExtent(t,e,r){t&&o(r,t.toArray(),e)}readFullTimeExtent(t,e){const r=e.properties;if(!r)return;const o=null!=r.endTime?new Date(r.endTime):null,s=null!=r.startTime?new Date(r.startTime):null;return new m({start:s,end:o})}writeFullTimeExtent(t,e){if(!t)return;const r=e.properties=e.properties||{},o=t.end,s=t.start;o&&(r.endTime=null!=o?o.getTime():null),s&&(r.startTime=null!=s?s.getTime():null)}readStopInterval(t,e,r){return t?c.fromJSON({value:t.interval,unit:t.units},r):null}writeStopInterval(t,e,r,s){if(!t)return;const p=t.toJSON(s);o("properties.timeStopInterval",{interval:p.value,units:p.unit},e)}readStops(t){return t?.length?t.map(t=>new Date(t)):null}writeStops(t,e,r){t?.length&&o(r,t.map(t=>t.getTime()),e)}clone(){return new d(r({currentTimeExtent:this.currentTimeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:this.numStops,numThumbs:this.numThumbs,stopDelay:this.stopDelay,stopInterval:this.stopInterval,stops:this.stops}))}};t([s({type:m,json:{type:[[p,n]],read:{source:"properties.currentTimeExtent"},write:{target:"properties.currentTimeExtent"}}})],T.prototype,"currentTimeExtent",void 0),t([i("currentTimeExtent")],T.prototype,"readCurrentTimeExtent",null),t([u("currentTimeExtent")],T.prototype,"writeCurrentTimeExtent",null),t([s({type:m,json:{read:{source:["properties.endTime","properties.startTime"]},write:{target:{"properties.endTime":{type:Number},"properties.startTime":{type:Number}}}}})],T.prototype,"fullTimeExtent",void 0),t([i("fullTimeExtent")],T.prototype,"readFullTimeExtent",null),t([u("fullTimeExtent")],T.prototype,"writeFullTimeExtent",null),t([s({type:Boolean,nonNullable:!0,json:{default:!1,read:{source:"properties.loop"},write:{target:"properties.loop"}}})],T.prototype,"loop",void 0),t([s({type:p,json:{read:{source:"properties.numberOfStops"},write:{target:"properties.numberOfStops",overridePolicy(){const t=!!this.stopInterval,e=!!this.stops?.length,r=!(t||e);return{enabled:r,isRequired:r}}}}})],T.prototype,"numStops",void 0),t([s({type:[1,2],nonNullable:!0,json:{type:p,read:{source:"properties.thumbCount"},write:{target:"properties.thumbCount",isRequired:!0}}})],T.prototype,"numThumbs",void 0),t([s({type:Number,nonNullable:!0,json:{read:{source:"properties.thumbMovingRate"},write:{target:"properties.thumbMovingRate",isRequired:!0}}})],T.prototype,"stopDelay",void 0),t([s({type:c,json:{read:{source:"properties.timeStopInterval"},write:{target:{"properties.timeStopInterval.interval":{type:Number},"properties.timeStopInterval.units":{type:a.jsonValues.filter(t=>"esriTimeUnitsUnknown"!==t)}},overridePolicy(){const t=null!=this.numStops,e=!!this.stops?.length;return{enabled:!e,isRequired:!(t||e)}}}}})],T.prototype,"stopInterval",void 0),t([i("stopInterval")],T.prototype,"readStopInterval",null),t([u("stopInterval")],T.prototype,"writeStopInterval",null),t([s({type:[Date],json:{type:[p],read:{source:"properties.stops"},write:{target:"properties.stops",overridePolicy(){return{isRequired:null==this.numStops&&!this.stopInterval}}}}})],T.prototype,"stops",void 0),t([i("stops")],T.prototype,"readStops",null),t([u("stops")],T.prototype,"writeStops",null),T=d=t([l("esri.webdoc.widgets.TimeSlider")],T);const y=T;export{y as default};
5
+ import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{setDeepValue as o}from"../../core/object.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import{Integer as s,Null as i}from"../../core/accessorSupport/ensureType.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";import{timeUnitKebabDictionary as m}from"../../portal/timeUnitKebabDictionary.js";import a from"../../time/TimeExtent.js";import c from"../../time/TimeInterval.js";var d;let T=d=class extends e{constructor(t){super(t),this.currentTimeExtent=null,this.fullTimeExtent=null,this.loop=!1,this.numStops=null,this.numThumbs=null,this.stopDelay=null,this.stopInterval=null,this.stops=null}readCurrentTimeExtent(t){return t?a.fromArray(t):void 0}writeCurrentTimeExtent(t,e,r){t&&o(r,t.toArray(),e)}readFullTimeExtent(t,e){const r=e.properties;if(!r)return;const o=null!=r.endTime?new Date(r.endTime):null,p=null!=r.startTime?new Date(r.startTime):null;return new a({start:p,end:o})}writeFullTimeExtent(t,e){if(!t)return;const r=e.properties=e.properties||{},o=t.end,p=t.start;o&&(r.endTime=null!=o?o.getTime():null),p&&(r.startTime=null!=p?p.getTime():null)}readStopInterval(t,e,r){return t?c.fromJSON({value:t.interval,unit:t.units},r):null}writeStopInterval(t,e,r,p){if(!t)return;const s=t.toJSON(p);o("properties.timeStopInterval",{interval:s.value,units:s.unit},e)}readStops(t){return t?.length?t.map(t=>new Date(t)):null}writeStops(t,e,r){t?.length&&o(r,t.map(t=>t.getTime()),e)}clone(){return new d(r({currentTimeExtent:this.currentTimeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:this.numStops,numThumbs:this.numThumbs,stopDelay:this.stopDelay,stopInterval:this.stopInterval,stops:this.stops}))}};t([p({type:a,json:{type:[[s,i]],read:{source:"properties.currentTimeExtent"},write:{target:"properties.currentTimeExtent"}}})],T.prototype,"currentTimeExtent",void 0),t([n("currentTimeExtent")],T.prototype,"readCurrentTimeExtent",null),t([u("currentTimeExtent")],T.prototype,"writeCurrentTimeExtent",null),t([p({type:a,json:{read:{source:["properties.endTime","properties.startTime"]},write:{target:{"properties.endTime":{type:Number},"properties.startTime":{type:Number}}}}})],T.prototype,"fullTimeExtent",void 0),t([n("fullTimeExtent")],T.prototype,"readFullTimeExtent",null),t([u("fullTimeExtent")],T.prototype,"writeFullTimeExtent",null),t([p({type:Boolean,nonNullable:!0,json:{default:!1,read:{source:"properties.loop"},write:{target:"properties.loop"}}})],T.prototype,"loop",void 0),t([p({type:s,json:{read:{source:"properties.numberOfStops"},write:{target:"properties.numberOfStops",overridePolicy(){const t=!!this.stopInterval,e=!!this.stops?.length,r=!(t||e);return{enabled:r,isRequired:r}}}}})],T.prototype,"numStops",void 0),t([p({type:[1,2],nonNullable:!0,json:{type:s,read:{source:"properties.thumbCount"},write:{target:"properties.thumbCount",isRequired:!0}}})],T.prototype,"numThumbs",void 0),t([p({type:Number,nonNullable:!0,json:{read:{source:"properties.thumbMovingRate"},write:{target:"properties.thumbMovingRate",isRequired:!0}}})],T.prototype,"stopDelay",void 0),t([p({type:c,json:{read:{source:"properties.timeStopInterval"},write:{target:{"properties.timeStopInterval.interval":{type:Number},"properties.timeStopInterval.units":{type:m.jsonValues.filter(t=>"esriTimeUnitsUnknown"!==t)}},overridePolicy(){const t=null!=this.numStops,e=!!this.stops?.length;return{enabled:!e,isRequired:!(t||e)}}}}})],T.prototype,"stopInterval",void 0),t([n("stopInterval")],T.prototype,"readStopInterval",null),t([u("stopInterval")],T.prototype,"writeStopInterval",null),t([p({type:[Date],json:{type:[s],read:{source:"properties.stops"},write:{target:"properties.stops",overridePolicy(){return{isRequired:null==this.numStops&&!this.stopInterval}}}}})],T.prototype,"stops",void 0),t([n("stops")],T.prototype,"readStops",null),t([u("stops")],T.prototype,"writeStops",null),T=d=t([l("esri.webdoc.widgets.TimeSlider")],T);const y=T;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import t from"../Viewpoint.js";import e from"../core/Accessor.js";import{ClonableMixin as r}from"../core/Clonable.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 p}from"../core/accessorSupport/decorators/subclass.js";import s from"../geometry/SpatialReference.js";import{system as n}from"../time/constants.js";import{T as m}from"../chunks/TimeExtent.js";import c from"../webdoc/RangeInfo.js";import a from"./background/ColorBackground.js";let l=class extends(r(e)){constructor(o){super(o),this.background=null,this.rangeInfo=null,this.spatialReference=null,this.timeExtent=null,this.timeZone=n,this.viewpoint=null}};o([i({type:a})],l.prototype,"background",void 0),o([i({type:c})],l.prototype,"rangeInfo",void 0),o([i({type:s})],l.prototype,"spatialReference",void 0),o([i({type:m})],l.prototype,"timeExtent",void 0),o([i({nonNullable:!0})],l.prototype,"timeZone",void 0),o([i({type:t})],l.prototype,"viewpoint",void 0),l=o([p("esri.webmap.InitialViewProperties")],l);const f=l;export{f as default};
5
+ import{__decorate as o}from"tslib";import t from"../Viewpoint.js";import e from"../core/Accessor.js";import{ClonableMixin as r}from"../core/Clonable.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 p}from"../core/accessorSupport/decorators/subclass.js";import s from"../geometry/SpatialReference.js";import{system as n}from"../time/constants.js";import m from"../time/TimeExtent.js";import c from"../webdoc/RangeInfo.js";import a from"./background/ColorBackground.js";let l=class extends(r(e)){constructor(o){super(o),this.background=null,this.rangeInfo=null,this.spatialReference=null,this.timeExtent=null,this.timeZone=n,this.viewpoint=null}};o([i({type:a})],l.prototype,"background",void 0),o([i({type:c})],l.prototype,"rangeInfo",void 0),o([i({type:s})],l.prototype,"spatialReference",void 0),o([i({type:m})],l.prototype,"timeExtent",void 0),o([i({nonNullable:!0})],l.prototype,"timeZone",void 0),o([i({type:t})],l.prototype,"viewpoint",void 0),l=o([p("esri.webmap.InitialViewProperties")],l);const f=l;export{f 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{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import{IdentifiableMixin as o}from"../core/Identifiable.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as a,convertDateFormatToIntlOptions as s}from"../intl/date.js";import{system as n}from"../time/constants.js";import{SlideThumbnail as l}from"../webdoc/support/SlideThumbnail.js";import d from"./Widget.js";import m from"./Bookmarks/BookmarksUserState.js";import c from"./Bookmarks/BookmarksViewModel.js";import u from"./Bookmarks/BookmarksVisibleElements.js";import{css as k}from"./Bookmarks/css.js";import{loadCalciteComponents as h}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{Heading as b}from"./support/Heading.js";import{calciteListFilterProps as _}from"./support/listUtils.js";import{setFocus as g}from"./support/widgetUtils.js";import{messageBundle as f}from"./support/decorators/messageBundle.js";import{vmEvent as v}from"./support/decorators/vmEvent.js";import{tsx as B}from"./support/jsxFactory.js";let w=class extends(o(d)){constructor(e,t){super(e,t),this._addInputNode=null,this._editInputNode=null,this._urlEditInputNode=null,this._lastDragDetail=null,this._selectedDragBookmarkUid=null,this._editIncludeTimeExtent=void 0,this._userState=null,this._focusRootFlowItem=!1,this._focusAddFlowItem=!1,this._focusEditFlowItem=!1,this.disabled=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.viewModel=new c,this.visibleElements=new u,this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t,bookmarks:o}=this,{toEl:i,fromEl:r,dragEl:a,newIndex:s}=e;if(!o.length)return;if(!r||!i||t?.newIndex===s&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===r)return;this._lastDragDetail=e;const n=Array.from(r.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);o.sort((e,t)=>{const o=n.indexOf(e.uid),i=n.indexOf(t.uid);return o>i?1:o<i?-1:0}),this._selectedDragBookmarkUid=a.value}}loadDependencies(){return h({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),"chip-group":()=>import("@esri/calcite-components/dist/components/calcite-chip-group"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),table:()=>import("@esri/calcite-components/dist/components/calcite-table"),"table-cell":()=>import("@esri/calcite-components/dist/components/calcite-table-cell"),"table-header":()=>import("@esri/calcite-components/dist/components/calcite-table-header"),"table-row":()=>import("@esri/calcite-components/dist/components/calcite-table-row")})}get defaultCreateOptions(){return this.viewModel.defaultCreateOptions}set defaultCreateOptions(e){this.viewModel.defaultCreateOptions=e}get defaultEditOptions(){return this.viewModel.defaultEditOptions}set defaultEditOptions(e){this.viewModel.defaultEditOptions=e}get bookmarks(){return this.viewModel.bookmarks}set bookmarks(e){this.viewModel.bookmarks=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get icon(){return"bookmark"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}endAddBookmark(){this._userState=null}goTo(e){return this.viewModel.goTo(e)}render(){return B("div",{class:this.classes(k.base,p.widget,p.panel)},this._renderBookmarksContainer())}startAddBookmark(){this._userState=new m({state:"add"}),this._focusAddFlowItem=!0}_renderNoBookmarksContainer(e){const{messages:t,viewModel:{state:o}}=this;return e.length||"loading"===o?null:B("div",{class:p.empty,key:"no-bookmarks"},B("calcite-icon",{icon:"bookmark",scale:"l"}),B(b,{class:this.classes(p.heading,k.noBookmarksHeader),level:this.headingLevel},t?.noBookmarksHeading),B("p",{class:k.noBookmarksDescription},t.noBookmarksDescription))}_renderEditBookmarkFlowItems(){const{_userState:e}=this,t=e?.editedBookmark;return t&&"edit"===e?.state?this._renderEditingBookmark(t):[]}_renderBookmarkItems(e){return e?e.toArray().map(e=>this._renderBookmark(e)):[]}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:o,oldIndex:i}=e;t.insertBefore(o,t.children[i])}_renderBookmarksContainer(){const{viewModel:{state:e,bookmarks:o},dragEnabled:i,messages:r,disabled:a,filterPlaceholder:s,filterText:n,visible:l,headingLevel:d,visibleElements:{closeButton:m,collapseButton:c,filter:u,heading:h,flow:p},uid:b}=this,g=o.filter(t),f=g.length?B("calcite-list",{class:k.list,displayMode:"flat",dragEnabled:i,filterEnabled:u,filterPlaceholder:s,filterProps:_,filterText:n,group:`bookmarks-${b}`,key:"bookmark-list",label:r.widgetLabel,selectionAppearance:"border",selectionMode:"none",onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},this._renderBookmarkItems(g),u?B("div",{class:k.filterNoResults,slot:"filter-no-results"},B("calcite-notice",{kind:"info",open:!0,width:"full"},B("div",{slot:"message"},r.noBookmarksHeading),";")):null):null,v=[B("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:m,closed:!l,collapsible:c,disabled:a,heading:h?r.widgetLabel:void 0,headingLevel:d,loading:"loading"===e,selected:!this._userState?.state,onCalciteFlowItemClose:()=>this.visible=!1},this._renderNoBookmarksContainer(g),f,this._renderAddBookmarkButton()),this._renderAddingBookmark(),this._renderEditBookmarkFlowItems()];return l?p?B("calcite-flow",{key:"root-flow"},v):v:null}_renderAddBookmarkButton(){const{messages:e,_userState:t,disabled:o,viewModel:{view:i,state:r},visibleElements:{addBookmarkButton:a}}=this,s=t?.loading??!1;return i&&"loading"!==r&&a?B("calcite-fab",{appearance:"outline-fill",bind:this,class:k.addBookmarkButton,disabled:o||s,icon:"plus",key:"add-bookmark-item",kind:"neutral",loading:s,onclick:this.startAddBookmark,slot:"fab",text:e.addBookmark,textEnabled:!0,title:e.addBookmark,type:"button"}):null}_renderEditContainer(e){const{messagesCommon:t,visibleElements:{editBookmarkButton:o}}=this,i=`${t.edit} ${this._getBookmarkTitle(e)}`;return o?B("calcite-action",{appearance:"transparent",icon:"pencil",key:"edit-action",onclick:()=>this._showEditBookmarkForm(e),slot:"actions-end",text:i,title:i}):null}_renderBookmarkImage(e,t){return t?B("img",{alt:"",class:k.bookmarkImage,key:"bookmark-image",src:e.thumbnail?.url}):null}_renderBookmarkTimeSwitch(e){const{messages:t,viewModel:{view:o}}=this,{timeExtent:i}=e;return o?.timeExtent??i?B("calcite-label",{layout:"inline-space-between"},t.includeTimeExtent,B("calcite-switch",{checked:!!i,onCalciteSwitchChange:e=>{this._editIncludeTimeExtent=!!e.currentTarget.checked}})):null}_renderEditBookmarkTimeExtent(e){return this._editIncludeTimeExtent?this._renderBookmarkTimeExtent(e):null}_getTimeExtentStrings(e){const{visibleElements:t}=this,{timeExtent:o}=e;if(!o)return{};const{start:i,end:r}=o,a=null!=r&&(null==i||i.getTime()!==r.getTime()),s=i?this._formatDate(i):"",n=i&&t.time?this._formatTime(i):"";if(!a)return{startDate:s,startTime:n};return{startDate:s,startTime:n,endDate:this._formatDate(r),endTime:t.time?this._formatTime(r):""}}_renderTimeExtentDescription(e){const{startDate:t,startTime:o,endDate:i,endTime:r}=this._getTimeExtentStrings(e);if(!t)return"";const a=`${t} ${o}`;return i?`${a} - ${`${i} ${r}`}`:a}_renderBookmarkTimeExtent(e,t=!1){const{messages:o}=this,{startDate:i,startTime:r,endDate:a,endTime:s}=this._getTimeExtentStrings(e),n=t?null:B("calcite-table-row",{slot:"table-header"},B("calcite-table-header",{heading:o.startDate}),a?B("calcite-table-header",{heading:o.endDate}):null);return i?B("calcite-table",{caption:o.timeExtent,scale:"s"},n,B("calcite-table-row",null,B("calcite-table-cell",null,i," ",r?[B("br",null),r]:null),a?B("calcite-table-cell",null,a,s?[B("br",null),s]:null):null)):null}_renderBookmarkActiveScrim(e,t){return this.viewModel.activeBookmark===e&&t?B("calcite-scrim",{key:"bookmark-active-scrim",loading:!0}):null}_renderBookmarkActiveLoader(e,t){return this.viewModel.activeBookmark!==e||t?null:B("calcite-loader",{class:k.loader,inline:!0,key:"bookmark-active-loader",label:this.messagesCommon.loading})}_renderBookmarkImageIcon(e,t){return this.viewModel.activeBookmark===e||t?null:B("calcite-icon",{icon:"bookmark",key:"bookmark-icon",scale:"s"})}_renderBookmarkThumbnail(e){const t=this.visibleElements.thumbnail&&!!e.thumbnail?.url;return B("div",{class:k.bookmarkImageContainer,slot:"content-start"},this._renderBookmarkActiveScrim(e,t),this._renderBookmarkImage(e,t),this._renderBookmarkActiveLoader(e,t),this._renderBookmarkImageIcon(e,t))}_focusSelectedDragEl(e,t){this._selectedDragBookmarkUid===t.uid&&(g(e),this._selectedDragBookmarkUid=null)}_renderBookmark(e){return B("calcite-list-item",{afterCreate:t=>this._focusSelectedDragEl(t,e),afterUpdate:t=>this._focusSelectedDragEl(t,e),class:this.classes({[k.dragEnabled]:this.dragEnabled}),description:this._renderTimeExtentDescription(e),key:e.uid,label:this._getBookmarkTitle(e),value:e.uid,onCalciteListItemSelect:()=>this._goToBookmark(e)},this._renderBookmarkThumbnail(e),this._renderBookmarkContent(e),this._renderEditContainer(e))}_renderBookmarkContent(e){return B("div",{class:k.bookmarkContent,slot:"content"},B("span",{class:k.bookmarkContentLabel},this._getBookmarkTitle(e)),this._renderBookmarkTimeExtent(e,!0))}_renderEditingBookmarkName(e){const{messages:t,_userState:o}=this,i="name-required"===o?.validationState;return B("calcite-label",null,t.title,B("calcite-input",{afterCreate:this._storeEditInput,bind:this,class:k.editBookmarkInput,name:"bookmark-name",placeholder:t.titlePlaceholder,required:!0,type:"text",value:e.name}),i?B("calcite-input-message",{icon:"exclamation-mark-triangle",status:"invalid"},t.invalidTitle):null)}_renderEditingBookmarkActions(){const{messagesCommon:e,_userState:t}=this,o=t?.bookmark;return[B("calcite-button",{appearance:"transparent",kind:"danger",onclick:()=>this._deleteBookmark(o),slot:"footer",type:"button",width:"full"},e.delete),B("calcite-button",{appearance:"outline",bind:this,onclick:this._closeEditBookmarkForm,slot:"footer",type:"button",width:"full"},e.cancel),B("calcite-button",{slot:"footer",type:"submit",width:"full"},e.save)]}_handleUrlEditInputChange(){const{_userState:e,_urlEditInputNode:t}=this,o=t?.value;if(!e?.editedBookmark||!o)return;e.validationState=void 0,e.editedBookmark.thumbnail?.isDataURI&&(e.screenshotUrl=e.editedBookmark.thumbnail?.url);const i=new l({url:o});i.isSecureUrl&&(e.customUrl=o,e.editedBookmark.thumbnail=i)}_renderEditingTimeExtent(e){const{capabilities:t,view:o}=this.viewModel,{timeExtent:i}=e;return t.time&&(o?.timeExtent??i)?B("div",{key:"edit-bookmark-time-container"},this._renderBookmarkTimeSwitch(e),this._renderEditBookmarkTimeExtent(e)):null}_renderEditingBookmarkImage(e){const{_userState:t}=this,o=t?.thumbnailState,i=e.thumbnail?.isSecureUrl?"url"===o:e.thumbnail?.isDataURI?"screenshot"===o:null;if(i)return this._renderBookmarkImage(e,i)}_renderEditingThumbnail(e){const{_userState:t,visibleElements:o}=this,i=t?.thumbnailState;return o.thumbnail&&"none"!==i?B("div",{class:k.authoringImageContainer},this._renderEditingBookmarkImage(e)):null}_renderUpdateThumbnailButton(){const{visibleElements:e,messages:t,_userState:o}=this,i=o?.thumbnailState;return e.thumbnail&&"screenshot"===i?B("calcite-button",{appearance:"outline",class:k.authoringRefreshThumbnailButton,iconStart:"refresh",key:"update-thumbnail",kind:"neutral",onclick:()=>{this._updateThumbnail()},width:"full"},t.updateThumbnail):null}_renderEditingBookmarkUrlInput(e){const{messages:t,_userState:o}=this,i=e.thumbnail?.url,r=e.thumbnail?.isSecureUrl?i:void 0,a=i&&"absolute-url-required"===o?.validationState,s=o?.thumbnailState;return"url"===s?B("calcite-label",{key:"thumbnail-url-input"},B("calcite-input",{afterCreate:this._storeUrlEditInput,bind:this,name:"bookmark-thumbnail-url",pattern:"https://.*",placeholder:t?`https://<${t.imageUrlPlaceholder}>`:void 0,required:!0,title:t.imageUrlTooltip,type:"text",value:r,onCalciteInputChange:this._handleUrlEditInputChange,onCalciteInputInput:this._handleUrlEditInputChange}),a?B("calcite-input-message",{icon:"exclamation-mark-triangle",status:"invalid"},t.invalidImageUrl):null):null}_renderThumbnailSelector(){const{visibleElements:e,messages:t,_userState:o}=this,i=o?.thumbnailState;return e.thumbnail?B("calcite-label",{key:"thumbnail-chip-group"},t.thumbnail,B("calcite-chip-group",{label:t.thumbnail,selectionMode:"single-persist",onCalciteChipGroupSelect:e=>this._handleThumbnailTypeSelect(e.currentTarget.selectedItems[0].value)},B("calcite-chip",{label:t.screenshot,selected:"screenshot"===i,value:"screenshot"},t.screenshot),B("calcite-chip",{label:t.url,selected:"url"===i,value:"url"},t.url),B("calcite-chip",{label:t.none,selected:"none"===i,value:"none"},t.none))):null}_renderEditingBookmark(e){const{disabled:t,messagesCommon:o,headingLevel:i}=this;return e?B("form",{bind:this,class:k.form,disabled:this.disabled,onsubmit:this._editBookmarkSubmit},B("calcite-flow-item",{afterCreate:this._focusEditFlowItemNode,afterUpdate:this._focusEditFlowItemNode,bind:this,disabled:t,heading:o.edit,headingLevel:i,key:"edit-bookmark-form",selected:"edit"===this._userState?.state,onCalciteFlowItemBack:e=>{e.preventDefault(),this._closeEditBookmarkForm()}},B("div",{class:k.formContent},B("div",{class:k.authoring},this._renderEditingBookmarkName(e),this._renderThumbnailSelector(),this._renderEditingThumbnail(e),this._renderEditingBookmarkUrlInput(e),this._renderUpdateThumbnailButton(),this._renderEditingTimeExtent(e))),this._renderEditingBookmarkActions())):null}_renderAddingBookmarkName(){const{_userState:e,messages:t}=this,o="name-required"===e?.validationState;return B("calcite-label",null,t.title,B("calcite-input",{afterCreate:this._storeAddInput,bind:this,class:k.addBookmarkInput,name:"bookmark-name",placeholder:t.titlePlaceholder,required:!0,type:"text",value:""}),o?B("calcite-input-message",{icon:"exclamation-mark-triangle",status:"invalid"},t.invalidTitle):null)}_renderAddingBookmarkActions(){const{messagesCommon:e}=this;return[B("calcite-button",{appearance:"outline",bind:this,onclick:this._endAddBookmark,slot:"footer",type:"button",width:"full"},e.cancel),B("calcite-button",{slot:"footer",type:"submit",width:"full"},e.add)]}_renderAddingBookmark(){const{disabled:e,messages:t,headingLevel:o,_userState:i}=this;return"add"===i?.state?B("form",{bind:this,class:k.form,disabled:e,onsubmit:this._addBookmarkSubmitClick},B("calcite-flow-item",{afterCreate:this._focusAddFlowItemNode,afterUpdate:this._focusAddFlowItemNode,bind:this,disabled:e,heading:t.addBookmark,headingLevel:o,key:"add-bookmark-form",selected:"add"===this._userState?.state,onCalciteFlowItemBack:e=>{e.preventDefault(),this._endAddBookmark()}},B("div",{class:k.formContent},this._renderAddingBookmarkName()),this._renderAddingBookmarkActions())):null}_getBookmarkTitle(e){return e?.name||this.messagesCommon.untitled}_formatDate(e){return e?a(e,{...s("short-date"),timeZone:this.viewModel.view?.timeZone??n}):""}_formatTime(e){return e?a(e,{...s("long-time"),timeZone:this.viewModel.view?.timeZone??n}):""}_endAddBookmark(){this.endAddBookmark(),this._focusRootFlowItem=!0}_showEditBookmarkForm(e){e&&(this._editIncludeTimeExtent=!!e.timeExtent,this._userState=new m({bookmark:e,state:"edit"}),this._focusEditFlowItem=!0,this.viewModel.goTo(e))}async _createNewScreenshotUrl(){const e=await this.viewModel.createBookmark();return e.thumbnail?.url??null}_storeCurrentUrl(){const{_userState:e}=this,t=e?.editedBookmark?.thumbnail?.url;t&&(e?.editedBookmark?.thumbnail?.isSecureUrl?e.customUrl=t:e?.editedBookmark?.thumbnail?.isDataURI&&(e.screenshotUrl=t))}async _handleThumbnailTypeSelect(e){const{_userState:t}=this;if(!t)return;const{screenshotUrl:o,customUrl:i,editedBookmark:r}=t,a="screenshot"===e?o??await this._createNewScreenshotUrl():"url"===e&&i?i:null;this._storeCurrentUrl(),r&&a&&(r.thumbnail=new l({url:a})),t.validationState=void 0,t.thumbnailState=e}_closeEditBookmarkForm(){this._userState=null,this._focusRootFlowItem=!0}_addBookmarkSubmitClick(e){e.preventDefault(),this._addBookmarkSubmit()}async _addBookmarkSubmit(){const{_addInputNode:e,_userState:t,viewModel:o,viewModel:{bookmarks:i}}=this;if(!t)return;const r=e?e.value.trim():null;if(!r)return void(t.validationState="name-required");t.loading=!0;const a=await o.createBookmark();a.name=r,i.add(a),this._endAddBookmark()}async _editBookmarkAndClose(e,t){const{viewModel:o,viewModel:{defaultEditOptions:i}}=this;await o.editBookmark(e,{...i,...t}),this._closeEditBookmarkForm()}_editBookmarkSubmit(e){e.preventDefault();const{_editInputNode:t,_userState:o,_editIncludeTimeExtent:i,_urlEditInputNode:r}=this;if(!o?.bookmark||!o.editedBookmark)return;o.validationState=void 0,o.customUrl=void 0,o.screenshotUrl=void 0;const a=t?.value.trim();if(!a)return void(o.validationState="name-required");o.bookmark.name=a,o.bookmark.thumbnail=o.editedBookmark.thumbnail,i||(o.bookmark.timeExtent=null);const s=o.thumbnailState;if("url"===s&&r){const e=r.value,t=new l({url:e});if(!t.isSecureUrl)return void(o.validationState="absolute-url-required");o.bookmark.thumbnail=t}else"none"===s&&(o.bookmark.thumbnail=null);this._editBookmarkAndClose(o.bookmark,{takeScreenshot:!1,captureTimeExtent:i})}_storeEditInput(e){this._editInputNode=e}_storeAddInput(e){this._addInputNode=e}_storeUrlEditInput(e){this._urlEditInputNode=e}_deleteBookmark(e){this._closeEditBookmarkForm(),e&&(this.viewModel.bookmarks.remove(e),e.destroy())}_goToBookmark(e){this.endAddBookmark(),this.viewModel.goTo(e)}async _updateThumbnail(){const{_userState:e,viewModel:t}=this;e&&(e.validationState=void 0,await t.editBookmark(e.editedBookmark,{takeScreenshot:!0,captureViewpoint:!1,captureRotation:!1,captureScale:!1,captureTimeExtent:!1}))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,g(e))}_focusEditFlowItemNode(e){this._focusEditFlowItem&&(this._focusEditFlowItem=!1,g(e))}_focusAddFlowItemNode(e){this._focusAddFlowItem&&(this._focusAddFlowItem=!1,g(e))}};e([i()],w.prototype,"_editIncludeTimeExtent",void 0),e([i({type:m})],w.prototype,"_userState",void 0),e([i()],w.prototype,"_focusRootFlowItem",void 0),e([i()],w.prototype,"_focusAddFlowItem",void 0),e([i()],w.prototype,"_focusEditFlowItem",void 0),e([i()],w.prototype,"defaultCreateOptions",null),e([i()],w.prototype,"defaultEditOptions",null),e([i()],w.prototype,"bookmarks",null),e([i()],w.prototype,"disabled",void 0),e([i()],w.prototype,"dragEnabled",void 0),e([i()],w.prototype,"filterPlaceholder",void 0),e([i()],w.prototype,"filterText",void 0),e([i()],w.prototype,"headingLevel",void 0),e([i()],w.prototype,"goToOverride",null),e([i()],w.prototype,"icon",null),e([i()],w.prototype,"label",null),e([i(),f("esri/widgets/Bookmarks/t9n/Bookmarks")],w.prototype,"messages",void 0),e([i(),f("esri/t9n/common")],w.prototype,"messagesCommon",void 0),e([i()],w.prototype,"uiStrings",void 0),e([i()],w.prototype,"view",null),e([i({type:c}),v(["select-bookmark","bookmark-edit","bookmark-select"])],w.prototype,"viewModel",void 0),e([i({type:u,nonNullable:!0})],w.prototype,"visibleElements",void 0),e([i()],w.prototype,"endAddBookmark",null),e([i()],w.prototype,"startAddBookmark",null),w=e([r("esri.widgets.Bookmarks")],w);const E=w;export{E as default};
5
+ import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import{deprecateWidget as o}from"../core/deprecate.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import r from"../core/Logger.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as n,convertDateFormatToIntlOptions as l}from"../intl/date.js";import{system as d}from"../time/constants.js";import{SlideThumbnail as m}from"../webdoc/support/SlideThumbnail.js";import c from"./Widget.js";import u from"./Bookmarks/BookmarksUserState.js";import k from"./Bookmarks/BookmarksViewModel.js";import h from"./Bookmarks/BookmarksVisibleElements.js";import{css as p}from"./Bookmarks/css.js";import{loadCalciteComponents as b}from"./support/componentsUtils.js";import{globalCss as _}from"./support/globalCss.js";import{Heading as g}from"./support/Heading.js";import{calciteListFilterProps as f}from"./support/listUtils.js";import{setFocus as v}from"./support/widgetUtils.js";import{messageBundle as B}from"./support/decorators/messageBundle.js";import{vmEvent as w}from"./support/decorators/vmEvent.js";import{tsx as E}from"./support/jsxFactory.js";let I=class extends(i(c)){constructor(e,t){super(e,t),this._addInputNode=null,this._editInputNode=null,this._urlEditInputNode=null,this._lastDragDetail=null,this._selectedDragBookmarkUid=null,this._editIncludeTimeExtent=void 0,this._userState=null,this._focusRootFlowItem=!1,this._focusAddFlowItem=!1,this._focusEditFlowItem=!1,this.disabled=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.viewModel=new k,this.visibleElements=new h,this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t,bookmarks:o}=this,{toEl:i,fromEl:r,dragEl:a,newIndex:s}=e;if(!o.length)return;if(!r||!i||t?.newIndex===s&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===r)return;this._lastDragDetail=e;const n=Array.from(r.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);o.sort((e,t)=>{const o=n.indexOf(e.uid),i=n.indexOf(t.uid);return o>i?1:o<i?-1:0}),this._selectedDragBookmarkUid=a.value},o(r.getLogger(this),"Bookmarks","arcgis-bookmarks",{version:"4.34"})}loadDependencies(){return b({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),"chip-group":()=>import("@esri/calcite-components/dist/components/calcite-chip-group"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),table:()=>import("@esri/calcite-components/dist/components/calcite-table"),"table-cell":()=>import("@esri/calcite-components/dist/components/calcite-table-cell"),"table-header":()=>import("@esri/calcite-components/dist/components/calcite-table-header"),"table-row":()=>import("@esri/calcite-components/dist/components/calcite-table-row")})}get defaultCreateOptions(){return this.viewModel.defaultCreateOptions}set defaultCreateOptions(e){this.viewModel.defaultCreateOptions=e}get defaultEditOptions(){return this.viewModel.defaultEditOptions}set defaultEditOptions(e){this.viewModel.defaultEditOptions=e}get bookmarks(){return this.viewModel.bookmarks}set bookmarks(e){this.viewModel.bookmarks=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get icon(){return"bookmark"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}endAddBookmark(){this._userState=null}goTo(e){return this.viewModel.goTo(e)}render(){return E("div",{class:this.classes(p.base,_.widget,_.panel)},this._renderBookmarksContainer())}startAddBookmark(){this._userState=new u({state:"add"}),this._focusAddFlowItem=!0}_renderNoBookmarksContainer(e){const{messages:t,viewModel:{state:o}}=this;return e.length||"loading"===o?null:E("div",{class:_.empty,key:"no-bookmarks"},E("calcite-icon",{icon:"bookmark",scale:"l"}),E(g,{class:this.classes(_.heading,p.noBookmarksHeader),level:this.headingLevel},t?.noBookmarksHeading),E("p",{class:p.noBookmarksDescription},t.noBookmarksDescription))}_renderEditBookmarkFlowItems(){const{_userState:e}=this,t=e?.editedBookmark;return t&&"edit"===e?.state?this._renderEditingBookmark(t):[]}_renderBookmarkItems(e){return e?e.toArray().map(e=>this._renderBookmark(e)):[]}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:o,oldIndex:i}=e;t.insertBefore(o,t.children[i])}_renderBookmarksContainer(){const{viewModel:{state:e,bookmarks:o},dragEnabled:i,messages:r,disabled:a,filterPlaceholder:s,filterText:n,visible:l,headingLevel:d,visibleElements:{closeButton:m,collapseButton:c,filter:u,heading:k,flow:h},uid:b}=this,_=o.filter(t),g=_.length?E("calcite-list",{class:p.list,displayMode:"flat",dragEnabled:i,filterEnabled:u,filterPlaceholder:s,filterProps:f,filterText:n,group:`bookmarks-${b}`,key:"bookmark-list",label:r.widgetLabel,selectionAppearance:"border",selectionMode:"none",onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},this._renderBookmarkItems(_),u?E("div",{class:p.filterNoResults,slot:"filter-no-results"},E("calcite-notice",{kind:"info",open:!0,width:"full"},E("div",{slot:"message"},r.noBookmarksHeading),";")):null):null,v=[E("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:m,closed:!l,collapsible:c,disabled:a,heading:k?r.widgetLabel:void 0,headingLevel:d,loading:"loading"===e,selected:!this._userState?.state,onCalciteFlowItemClose:()=>this.visible=!1},this._renderNoBookmarksContainer(_),g,this._renderAddBookmarkButton()),this._renderAddingBookmark(),this._renderEditBookmarkFlowItems()];return l?h?E("calcite-flow",{key:"root-flow"},v):v:null}_renderAddBookmarkButton(){const{messages:e,_userState:t,disabled:o,viewModel:{view:i,state:r},visibleElements:{addBookmarkButton:a}}=this,s=t?.loading??!1;return i&&"loading"!==r&&a?E("calcite-fab",{appearance:"outline-fill",bind:this,class:p.addBookmarkButton,disabled:o||s,icon:"plus",key:"add-bookmark-item",kind:"neutral",loading:s,onclick:this.startAddBookmark,slot:"fab",text:e.addBookmark,textEnabled:!0,title:e.addBookmark,type:"button"}):null}_renderEditContainer(e){const{messagesCommon:t,visibleElements:{editBookmarkButton:o}}=this,i=`${t.edit} ${this._getBookmarkTitle(e)}`;return o?E("calcite-action",{appearance:"transparent",icon:"pencil",key:"edit-action",onclick:()=>this._showEditBookmarkForm(e),slot:"actions-end",text:i,title:i}):null}_renderBookmarkImage(e,t){return t?E("img",{alt:"",class:p.bookmarkImage,key:"bookmark-image",src:e.thumbnail?.url}):null}_renderBookmarkTimeSwitch(e){const{messages:t,viewModel:{view:o}}=this,{timeExtent:i}=e;return o?.timeExtent??i?E("calcite-label",{layout:"inline-space-between"},t.includeTimeExtent,E("calcite-switch",{checked:!!i,onCalciteSwitchChange:e=>{this._editIncludeTimeExtent=!!e.currentTarget.checked}})):null}_renderEditBookmarkTimeExtent(e){return this._editIncludeTimeExtent?this._renderBookmarkTimeExtent(e):null}_getTimeExtentStrings(e){const{visibleElements:t}=this,{timeExtent:o}=e;if(!o)return{};const{start:i,end:r}=o,a=null!=r&&(null==i||i.getTime()!==r.getTime()),s=i?this._formatDate(i):"",n=i&&t.time?this._formatTime(i):"";if(!a)return{startDate:s,startTime:n};return{startDate:s,startTime:n,endDate:this._formatDate(r),endTime:t.time?this._formatTime(r):""}}_renderTimeExtentDescription(e){const{startDate:t,startTime:o,endDate:i,endTime:r}=this._getTimeExtentStrings(e);if(!t)return"";const a=`${t} ${o}`;return i?`${a} - ${`${i} ${r}`}`:a}_renderBookmarkTimeExtent(e,t=!1){const{messages:o}=this,{startDate:i,startTime:r,endDate:a,endTime:s}=this._getTimeExtentStrings(e),n=t?null:E("calcite-table-row",{slot:"table-header"},E("calcite-table-header",{heading:o.startDate}),a?E("calcite-table-header",{heading:o.endDate}):null);return i?E("calcite-table",{caption:o.timeExtent,scale:"s"},n,E("calcite-table-row",null,E("calcite-table-cell",null,i," ",r?[E("br",null),r]:null),a?E("calcite-table-cell",null,a,s?[E("br",null),s]:null):null)):null}_renderBookmarkActiveScrim(e,t){return this.viewModel.activeBookmark===e&&t?E("calcite-scrim",{key:"bookmark-active-scrim",loading:!0}):null}_renderBookmarkActiveLoader(e,t){return this.viewModel.activeBookmark!==e||t?null:E("calcite-loader",{class:p.loader,inline:!0,key:"bookmark-active-loader",label:this.messagesCommon.loading})}_renderBookmarkImageIcon(e,t){return this.viewModel.activeBookmark===e||t?null:E("calcite-icon",{icon:"bookmark",key:"bookmark-icon",scale:"s"})}_renderBookmarkThumbnail(e){const t=this.visibleElements.thumbnail&&!!e.thumbnail?.url;return E("div",{class:p.bookmarkImageContainer,slot:"content-start"},this._renderBookmarkActiveScrim(e,t),this._renderBookmarkImage(e,t),this._renderBookmarkActiveLoader(e,t),this._renderBookmarkImageIcon(e,t))}_focusSelectedDragEl(e,t){this._selectedDragBookmarkUid===t.uid&&(v(e),this._selectedDragBookmarkUid=null)}_renderBookmark(e){return E("calcite-list-item",{afterCreate:t=>this._focusSelectedDragEl(t,e),afterUpdate:t=>this._focusSelectedDragEl(t,e),class:this.classes({[p.dragEnabled]:this.dragEnabled}),description:this._renderTimeExtentDescription(e),key:e.uid,label:this._getBookmarkTitle(e),value:e.uid,onCalciteListItemSelect:()=>this._goToBookmark(e)},this._renderBookmarkThumbnail(e),this._renderBookmarkContent(e),this._renderEditContainer(e))}_renderBookmarkContent(e){return E("div",{class:p.bookmarkContent,slot:"content"},E("span",{class:p.bookmarkContentLabel},this._getBookmarkTitle(e)),this._renderBookmarkTimeExtent(e,!0))}_renderEditingBookmarkName(e){const{messages:t,_userState:o}=this,i="name-required"===o?.validationState;return E("calcite-label",null,t.title,E("calcite-input",{afterCreate:this._storeEditInput,bind:this,class:p.editBookmarkInput,name:"bookmark-name",placeholder:t.titlePlaceholder,required:!0,type:"text",value:e.name}),i?E("calcite-input-message",{icon:"exclamation-mark-triangle",status:"invalid"},t.invalidTitle):null)}_renderEditingBookmarkActions(){const{messagesCommon:e,_userState:t}=this,o=t?.bookmark;return[E("calcite-button",{appearance:"transparent",kind:"danger",onclick:()=>this._deleteBookmark(o),slot:"footer",type:"button",width:"full"},e.delete),E("calcite-button",{appearance:"outline",bind:this,onclick:this._closeEditBookmarkForm,slot:"footer",type:"button",width:"full"},e.cancel),E("calcite-button",{slot:"footer",type:"submit",width:"full"},e.save)]}_handleUrlEditInputChange(){const{_userState:e,_urlEditInputNode:t}=this,o=t?.value;if(!e?.editedBookmark||!o)return;e.validationState=void 0,e.editedBookmark.thumbnail?.isDataURI&&(e.screenshotUrl=e.editedBookmark.thumbnail?.url);const i=new m({url:o});i.isSecureUrl&&(e.customUrl=o,e.editedBookmark.thumbnail=i)}_renderEditingTimeExtent(e){const{capabilities:t,view:o}=this.viewModel,{timeExtent:i}=e;return t.time&&(o?.timeExtent??i)?E("div",{key:"edit-bookmark-time-container"},this._renderBookmarkTimeSwitch(e),this._renderEditBookmarkTimeExtent(e)):null}_renderEditingBookmarkImage(e){const{_userState:t}=this,o=t?.thumbnailState,i=e.thumbnail?.isSecureUrl?"url"===o:e.thumbnail?.isDataURI?"screenshot"===o:null;if(i)return this._renderBookmarkImage(e,i)}_renderEditingThumbnail(e){const{_userState:t,visibleElements:o}=this,i=t?.thumbnailState;return o.thumbnail&&"none"!==i?E("div",{class:p.authoringImageContainer},this._renderEditingBookmarkImage(e)):null}_renderUpdateThumbnailButton(){const{visibleElements:e,messages:t,_userState:o}=this,i=o?.thumbnailState;return e.thumbnail&&"screenshot"===i?E("calcite-button",{appearance:"outline",class:p.authoringRefreshThumbnailButton,iconStart:"refresh",key:"update-thumbnail",kind:"neutral",onclick:()=>{this._updateThumbnail()},width:"full"},t.updateThumbnail):null}_renderEditingBookmarkUrlInput(e){const{messages:t,_userState:o}=this,i=e.thumbnail?.url,r=e.thumbnail?.isSecureUrl?i:void 0,a=i&&"absolute-url-required"===o?.validationState,s=o?.thumbnailState;return"url"===s?E("calcite-label",{key:"thumbnail-url-input"},E("calcite-input",{afterCreate:this._storeUrlEditInput,bind:this,name:"bookmark-thumbnail-url",pattern:"https://.*",placeholder:t?`https://<${t.imageUrlPlaceholder}>`:void 0,required:!0,title:t.imageUrlTooltip,type:"text",value:r,onCalciteInputChange:this._handleUrlEditInputChange,onCalciteInputInput:this._handleUrlEditInputChange}),a?E("calcite-input-message",{icon:"exclamation-mark-triangle",status:"invalid"},t.invalidImageUrl):null):null}_renderThumbnailSelector(){const{visibleElements:e,messages:t,_userState:o}=this,i=o?.thumbnailState;return e.thumbnail?E("calcite-label",{key:"thumbnail-chip-group"},t.thumbnail,E("calcite-chip-group",{label:t.thumbnail,selectionMode:"single-persist",onCalciteChipGroupSelect:e=>this._handleThumbnailTypeSelect(e.currentTarget.selectedItems[0].value)},E("calcite-chip",{label:t.screenshot,selected:"screenshot"===i,value:"screenshot"},t.screenshot),E("calcite-chip",{label:t.url,selected:"url"===i,value:"url"},t.url),E("calcite-chip",{label:t.none,selected:"none"===i,value:"none"},t.none))):null}_renderEditingBookmark(e){const{disabled:t,messagesCommon:o,headingLevel:i}=this;return e?E("form",{bind:this,class:p.form,disabled:this.disabled,onsubmit:this._editBookmarkSubmit},E("calcite-flow-item",{afterCreate:this._focusEditFlowItemNode,afterUpdate:this._focusEditFlowItemNode,bind:this,disabled:t,heading:o.edit,headingLevel:i,key:"edit-bookmark-form",selected:"edit"===this._userState?.state,onCalciteFlowItemBack:e=>{e.preventDefault(),this._closeEditBookmarkForm()}},E("div",{class:p.formContent},E("div",{class:p.authoring},this._renderEditingBookmarkName(e),this._renderThumbnailSelector(),this._renderEditingThumbnail(e),this._renderEditingBookmarkUrlInput(e),this._renderUpdateThumbnailButton(),this._renderEditingTimeExtent(e))),this._renderEditingBookmarkActions())):null}_renderAddingBookmarkName(){const{_userState:e,messages:t}=this,o="name-required"===e?.validationState;return E("calcite-label",null,t.title,E("calcite-input",{afterCreate:this._storeAddInput,bind:this,class:p.addBookmarkInput,name:"bookmark-name",placeholder:t.titlePlaceholder,required:!0,type:"text",value:""}),o?E("calcite-input-message",{icon:"exclamation-mark-triangle",status:"invalid"},t.invalidTitle):null)}_renderAddingBookmarkActions(){const{messagesCommon:e}=this;return[E("calcite-button",{appearance:"outline",bind:this,onclick:this._endAddBookmark,slot:"footer",type:"button",width:"full"},e.cancel),E("calcite-button",{slot:"footer",type:"submit",width:"full"},e.add)]}_renderAddingBookmark(){const{disabled:e,messages:t,headingLevel:o,_userState:i}=this;return"add"===i?.state?E("form",{bind:this,class:p.form,disabled:e,onsubmit:this._addBookmarkSubmitClick},E("calcite-flow-item",{afterCreate:this._focusAddFlowItemNode,afterUpdate:this._focusAddFlowItemNode,bind:this,disabled:e,heading:t.addBookmark,headingLevel:o,key:"add-bookmark-form",selected:"add"===this._userState?.state,onCalciteFlowItemBack:e=>{e.preventDefault(),this._endAddBookmark()}},E("div",{class:p.formContent},this._renderAddingBookmarkName()),this._renderAddingBookmarkActions())):null}_getBookmarkTitle(e){return e?.name||this.messagesCommon.untitled}_formatDate(e){return e?n(e,{...l("short-date"),timeZone:this.viewModel.view?.timeZone??d}):""}_formatTime(e){return e?n(e,{...l("long-time"),timeZone:this.viewModel.view?.timeZone??d}):""}_endAddBookmark(){this.endAddBookmark(),this._focusRootFlowItem=!0}_showEditBookmarkForm(e){e&&(this._editIncludeTimeExtent=!!e.timeExtent,this._userState=new u({bookmark:e,state:"edit"}),this._focusEditFlowItem=!0,this.viewModel.goTo(e))}async _createNewScreenshotUrl(){const e=await this.viewModel.createBookmark();return e.thumbnail?.url??null}_storeCurrentUrl(){const{_userState:e}=this,t=e?.editedBookmark?.thumbnail?.url;t&&(e?.editedBookmark?.thumbnail?.isSecureUrl?e.customUrl=t:e?.editedBookmark?.thumbnail?.isDataURI&&(e.screenshotUrl=t))}async _handleThumbnailTypeSelect(e){const{_userState:t}=this;if(!t)return;const{screenshotUrl:o,customUrl:i,editedBookmark:r}=t,a="screenshot"===e?o??await this._createNewScreenshotUrl():"url"===e&&i?i:null;this._storeCurrentUrl(),r&&a&&(r.thumbnail=new m({url:a})),t.validationState=void 0,t.thumbnailState=e}_closeEditBookmarkForm(){this._userState=null,this._focusRootFlowItem=!0}_addBookmarkSubmitClick(e){e.preventDefault(),this._addBookmarkSubmit()}async _addBookmarkSubmit(){const{_addInputNode:e,_userState:t,viewModel:o,viewModel:{bookmarks:i}}=this;if(!t)return;const r=e?e.value.trim():null;if(!r)return void(t.validationState="name-required");t.loading=!0;const a=await o.createBookmark();a.name=r,i.add(a),this._endAddBookmark()}async _editBookmarkAndClose(e,t){const{viewModel:o,viewModel:{defaultEditOptions:i}}=this;await o.editBookmark(e,{...i,...t}),this._closeEditBookmarkForm()}_editBookmarkSubmit(e){e.preventDefault();const{_editInputNode:t,_userState:o,_editIncludeTimeExtent:i,_urlEditInputNode:r}=this;if(!o?.bookmark||!o.editedBookmark)return;o.validationState=void 0,o.customUrl=void 0,o.screenshotUrl=void 0;const a=t?.value.trim();if(!a)return void(o.validationState="name-required");o.bookmark.name=a,o.bookmark.thumbnail=o.editedBookmark.thumbnail,i||(o.bookmark.timeExtent=null);const s=o.thumbnailState;if("url"===s&&r){const e=r.value,t=new m({url:e});if(!t.isSecureUrl)return void(o.validationState="absolute-url-required");o.bookmark.thumbnail=t}else"none"===s&&(o.bookmark.thumbnail=null);this._editBookmarkAndClose(o.bookmark,{takeScreenshot:!1,captureTimeExtent:i})}_storeEditInput(e){this._editInputNode=e}_storeAddInput(e){this._addInputNode=e}_storeUrlEditInput(e){this._urlEditInputNode=e}_deleteBookmark(e){this._closeEditBookmarkForm(),e&&(this.viewModel.bookmarks.remove(e),e.destroy())}_goToBookmark(e){this.endAddBookmark(),this.viewModel.goTo(e)}async _updateThumbnail(){const{_userState:e,viewModel:t}=this;e&&(e.validationState=void 0,await t.editBookmark(e.editedBookmark,{takeScreenshot:!0,captureViewpoint:!1,captureRotation:!1,captureScale:!1,captureTimeExtent:!1}))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,v(e))}_focusEditFlowItemNode(e){this._focusEditFlowItem&&(this._focusEditFlowItem=!1,v(e))}_focusAddFlowItemNode(e){this._focusAddFlowItem&&(this._focusAddFlowItem=!1,v(e))}};e([a()],I.prototype,"_editIncludeTimeExtent",void 0),e([a({type:u})],I.prototype,"_userState",void 0),e([a()],I.prototype,"_focusRootFlowItem",void 0),e([a()],I.prototype,"_focusAddFlowItem",void 0),e([a()],I.prototype,"_focusEditFlowItem",void 0),e([a()],I.prototype,"defaultCreateOptions",null),e([a()],I.prototype,"defaultEditOptions",null),e([a()],I.prototype,"bookmarks",null),e([a()],I.prototype,"disabled",void 0),e([a()],I.prototype,"dragEnabled",void 0),e([a()],I.prototype,"filterPlaceholder",void 0),e([a()],I.prototype,"filterText",void 0),e([a()],I.prototype,"headingLevel",void 0),e([a()],I.prototype,"goToOverride",null),e([a()],I.prototype,"icon",null),e([a()],I.prototype,"label",null),e([a(),B("esri/widgets/Bookmarks/t9n/Bookmarks")],I.prototype,"messages",void 0),e([a(),B("esri/t9n/common")],I.prototype,"messagesCommon",void 0),e([a()],I.prototype,"uiStrings",void 0),e([a()],I.prototype,"view",null),e([a({type:k}),w(["select-bookmark","bookmark-edit","bookmark-select"])],I.prototype,"viewModel",void 0),e([a({type:h,nonNullable:!0})],I.prototype,"visibleElements",void 0),e([a()],I.prototype,"endAddBookmark",null),e([a()],I.prototype,"startAddBookmark",null),I=e([s("esri.widgets.Bookmarks")],I);const S=I;export{S as default};