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

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 (192) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{09dd8613bc03e7a3a4cb.js → 0814676e4bac81f96140.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{44031bef6d500167ef0b.js → 09dbb3e200ef8d514eb3.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0b71100fa1e7ca706dbb.js +1 -0
  6. package/assets/esri/core/workers/chunks/{3167230555c63f943485.js → 0cbd5335cc92f5891bcf.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{16fe21ca9b24eaee3069.js → 144bfd64daf103a06734.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{c20aead85cdea91c4b74.js → 170ec7fb070c63230c81.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{af1030e4c4437d4eb600.js → 1ada9e6cdd6792e3847a.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1e86df439c564fe752e3.js +1 -0
  11. package/assets/esri/core/workers/chunks/{4459c8e495a37d4c4eb8.js → 25118304c9a914194e90.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{d823277612f971a9c2f0.js → 3245663da75e168bf85c.js} +1 -1
  13. package/assets/esri/core/workers/chunks/37d7c249114994a7dfac.js +1 -0
  14. package/assets/esri/core/workers/chunks/{1c7b5ca80e80c314f78d.js → 39d69afc9da9db0c75ab.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{dbcef57073075e9cfdfe.js → 489fa17e60f25d5f33ae.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{19e5e011f929b6b940fe.js → 4bc091770bab38874848.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{09f0c9f0b6aa58ae3c52.js → 4f22e5a7f81883e8e5b6.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7a17e78c76076ed4476f.js → 5185c63fecc5f493e142.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{6fff219dfaa86167c326.js → 5303d77a3ab1b7ddeef3.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{22ec2b0a853911692dc8.js → 5993427325d1add18ed9.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{9e3f8c06b4e090a35710.js → 5b84eba4a28e25b6d5c0.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{497214e9e82b936fc94e.js → 5ed381a268855bcad072.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{33718ea851645d9078d1.js → 605acf18cbeb89e4f29f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{4d7fcec769369c576847.js → 6e59ba2afd444eb4be18.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{a700f57af6856cb5313c.js → 70dc7ec6474f0801bc04.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{60920d4856a011ace7e2.js → 80b0c88a76bd523a406a.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{117eb1422e9795d37ea3.js → 837830e1cf712d4243a5.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{ad7aa7d09bfceb12609e.js → 87fb5d755860057da164.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{481aea82501d04667ba2.js → 8a104b35708a492bd614.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{5cb238318a24b70d5ac3.js → 8bc8caa384b24af12411.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{dcad3dcbd4ea2f5a6a04.js → 8e2558b14be70b273ce4.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{8e40c409a9b0a2a768a9.js → 8f02349602b072186a1f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{fa0f94318173db2034de.js → 90491262b6d6a126c32f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{0952aeddddc16705b7a3.js → 99f133a152afb4f1b067.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{8e3c09c3524654830b14.js → a634764dec5404f4a1d7.js} +1 -1
  36. package/assets/esri/core/workers/chunks/a895da7fd64ebad3d5a4.js +1 -0
  37. package/assets/esri/core/workers/chunks/{31e7358fe802abb3f8db.js → aa970a547c60c43d6c7f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{9a6d359ead62a8eadd3c.js → ab727ed4417b7dd94ce9.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{707311e24b2f458d9209.js → ad3ebd4f05cc673140f3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{05016b0713ef760fc57d.js → b052d3ef5493eedb44a5.js} +1 -1
  41. package/assets/esri/core/workers/chunks/b335e96f6bcac6d2f0ee.js +1 -0
  42. package/assets/esri/core/workers/chunks/{dd1d9913b33d4e48baff.js → c35dad3d5ceaac6ad5a4.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{e1b573840ec1f7c3afd3.js → c4b2678dd46fa1e22f7e.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{bc931865a77fc48871d3.js → c94c797864a85342b105.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{e97250ae8da4bd0d6bc9.js → cad03967e132a28512c2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{c7a386ac90e58eb71935.js → da1a5537e2f2ca6cc247.js} +1 -1
  47. package/assets/esri/core/workers/chunks/dd447dfc50ee7f511b84.js +1 -0
  48. package/assets/esri/core/workers/chunks/{0f9813e7d4e2b47b2c39.js → e47acdb1fbf797342716.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{a16b471c3706ee37f9b6.js → e6f2ac738df16fb5e13a.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{f5101f5f93f776a6456f.js → ed1272e7681e561d843f.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{66ffefd46fe6175c2af4.js → efea3e82cec476d486e0.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{ff2614d96ca5228e9685.js → f4d4c1f13522f20b00d1.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{4be2bab8ff3bd14ffdfb.js → f9385d7fb5ff20f7b252.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{b30de4936caa654d7817.js → fac020b6886ff2d75015.js} +1 -1
  55. package/assets/esri/core/workers/chunks/fe353a53968827bcd9cc.js +1 -0
  56. package/chunks/GlowComposition.glsl.js +5 -5
  57. package/chunks/RibbonLine.glsl.js +2 -2
  58. package/config.js +1 -1
  59. package/interfaces.d.ts +66 -193
  60. package/kernel.js +1 -1
  61. package/layers/GaussianSplatLayer.js +1 -1
  62. package/layers/Layer.js +1 -1
  63. package/layers/MapImageLayer.js +1 -1
  64. package/layers/OrientedImageryLayer.js +1 -1
  65. package/layers/VoxelLayer.js +1 -1
  66. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  67. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  68. package/layers/mixins/ArcGISImageService.js +1 -1
  69. package/layers/mixins/ImageryTileMixin.js +1 -1
  70. package/layers/mixins/OperationalLayer.js +1 -1
  71. package/layers/mixins/TemporalLayer.js +1 -1
  72. package/layers/mixins/TemporalSceneLayer.js +1 -1
  73. package/layers/mixins/operationalLayers.js +1 -1
  74. package/layers/support/FeatureFilter.js +1 -1
  75. package/layers/support/TimeInfo.js +1 -1
  76. package/layers/support/TrackInfo.js +1 -1
  77. package/layers/support/layersCreator.js +1 -1
  78. package/package.json +2 -2
  79. package/portal/schemas/definitions.js +1 -1
  80. package/portal/support/portalLayers.js +1 -1
  81. package/rest/support/AttributeBinsQuery.js +1 -1
  82. package/rest/support/IdentifyParameters.js +1 -1
  83. package/rest/support/ImageGPSInfoParameters.js +1 -1
  84. package/rest/support/ImageHistogramParameters.js +1 -1
  85. package/rest/support/ImageIdentifyParameters.js +1 -1
  86. package/rest/support/ImageParameters.js +1 -1
  87. package/rest/support/ImageSampleParameters.js +1 -1
  88. package/rest/support/Query.js +1 -1
  89. package/rest/support/TopFeaturesQuery.js +1 -1
  90. package/support/revision.js +1 -1
  91. package/support/timeUtils.js +1 -1
  92. package/time/TimeExtent.js +1 -1
  93. package/time/TimeInterval.js +1 -1
  94. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  95. package/views/2d/engine/webgl/Painter.js +1 -1
  96. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  97. package/views/2d/engine/webgl/effects/post-processing/EffectManager.js +1 -1
  98. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  99. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  100. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +5 -0
  101. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +5 -0
  102. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +5 -0
  103. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  104. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +5 -0
  105. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  106. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  107. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  108. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  109. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  110. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  111. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  112. package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
  113. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  114. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  115. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  117. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  118. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  119. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  120. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  121. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +5 -0
  122. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  123. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  124. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +5 -0
  125. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +5 -0
  126. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +5 -0
  127. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +5 -0
  128. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +5 -0
  129. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PostProcessingShader.js +5 -0
  130. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  132. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  133. package/views/2d/layers/MediaLayerView2D.js +1 -1
  134. package/views/2d/layers/TileLayerView2D.js +1 -1
  135. package/views/2d/layers/features/FeatureContainer.js +1 -1
  136. package/views/2d/layers/features/RenderState.js +1 -1
  137. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  138. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  139. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +5 -0
  140. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementGeometryUtils.js +5 -0
  141. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  142. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  143. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  144. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  145. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  146. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  147. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  148. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  149. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  150. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +5 -0
  151. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  152. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  153. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +5 -0
  154. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  155. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  156. package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
  157. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  158. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  159. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  160. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  161. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +5 -0
  162. package/views/VideoView.js +1 -1
  163. package/views/View.js +1 -1
  164. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  165. package/views/analysis/ElevationProfile/ElevationProfileGenerationError.js +1 -1
  166. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  167. package/webdoc/support/timeProperties.js +1 -1
  168. package/webdoc/widgets/TimeSlider.js +1 -1
  169. package/webmap/InitialViewProperties.js +1 -1
  170. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  171. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  172. package/widgets/TimeSlider.js +1 -1
  173. package/TimeExtent.d.ts +0 -4
  174. package/TimeExtent.js +0 -5
  175. package/TimeInterval.d.ts +0 -4
  176. package/TimeInterval.js +0 -5
  177. package/assets/esri/core/workers/chunks/0b01c87db77246632ad9.js +0 -1
  178. package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +0 -1
  179. package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +0 -1
  180. package/assets/esri/core/workers/chunks/2a938096a42613425c7b.js +0 -1
  181. package/assets/esri/core/workers/chunks/3bc50ee639a4d16c4f80.js +0 -1
  182. package/assets/esri/core/workers/chunks/8f60804c7ba445f25df8.js +0 -1
  183. package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +0 -1
  184. package/chunks/TimeExtent.js +0 -5
  185. package/chunks/TimeInterval.js +0 -5
  186. package/views/2d/engine/webgl/effects/post-processing/Bloom.js +0 -5
  187. package/views/2d/engine/webgl/effects/post-processing/Blur.js +0 -5
  188. package/views/2d/engine/webgl/effects/post-processing/Colorize.js +0 -5
  189. package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +0 -5
  190. package/views/2d/engine/webgl/effects/post-processing/Opacity.js +0 -5
  191. package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +0 -5
  192. 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{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/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"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/Program.js";import"../../webgl/checkWebGLError.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as V}from"../../support/drapedUtils.js";import{getHighlightName as q}from"../../support/highlightOptionsUtils.js";import{TaskPriority as P}from"../../support/Scheduler.js";const I=[0,0];let v=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:P.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>V(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=q(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],v.prototype,"resampling",null),e([o()],v.prototype,"tilemapCache",null),v=e([l("esri.views.2d.layers.TileLayerView2D")],v);const S=v;export{S as default};
5
+ import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/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"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/Program.js";import"../../webgl/checkWebGLError.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as G,MapServiceLayerViewHelper as T}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";import{TaskPriority as S}from"../../support/Scheduler.js";const P=[0,0];let I=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:S.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),G(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new T({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=V(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(P,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],I.prototype,"resampling",null),e([o()],I.prototype,"tilemapCache",null),I=e([l("esri.views.2d.layers.TileLayerView2D")],I);const v=I;export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{throwIfAborted as t,createResolver as s}from"../../../../core/promiseUtils.js";import{UpdatingHandles as r}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as i}from"../../engine/AFeatureContainer.js";import n from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as a}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{RenderState as o}from"./RenderState.js";import{renderHighlight as h}from"../support/util.js";class d{constructor(e,t){this.id=e,this.version=t,this._resolver=s(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class l extends i{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new r,this._hitTestsRequests=[],this._store=new n,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}destroy(){this.updatingHandles.destroy(),super.destroy(),this._renderState=e(this._renderState),this._renderStateNext=e(this._renderStateNext)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._layerView.requestUpdate(),this._renderState){const e=Array.from(this._renderState.tiles()).filter(e=>e.needsUpload);if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter(),this.requestRender())}const t=this._layerView.subscriptionManager.updateVisibility();this.setVisibleTiles(t);for(const s of this.children)s.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case 1:return this._renderMapPhase(e);case 16:return this._renderHighlightPhase(e);case 2:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter(e=>this._visibleTiles.has(e.key.id)):[]}get usedMemory(){let e=0;return this._renderState&&(e+=this._renderState.usedMemory),this._renderStateNext&&(e+=this._renderStateNext.usedMemory),e+=this.attributeView.usedMemory,e}get instanceStore(){return this._store}get layerView(){return this._layerView}get tiles(){return this._renderState?.tiles()}get _instanceStore(){return this._store}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&a.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(u(t))return t;return null}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&(this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter())}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe){if(!this._subscriptions.has(t)){const e=new d(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise);continue}this._subscriptions.get(t).version=s}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new o(()=>this._stage,e=>this._subscriptions.get(e)?.version,e,this.layerView.view.labelManager.symbolFader,this,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){if(this._renderStateNext){has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`);const e=new Map;for(const t of this._renderState?.tiles()||[])e.set(t.id,t.metricsVisibility);this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush();for(const t of this._renderState.tiles())t.copyMetricsVisibility(e.get(t.id)||new Set);this._renderStateNext=null}this.requestRender()}setVisibleTiles(e){this._visibleTiles=e;for(const t of this.tiles??[])t.rendering=e.has(t.key.id)}async onMessage(e,s){t(s);const r=e.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(e),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let t=this._hitTestsRequests.find(({x:t,y:s})=>t===e.x&&s===e.y);const r=s();return t?t.resolvers.push(r):(t={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(t)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach((e,t)=>s.set(t,e)),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=a.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,0),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&h(e,!1,e=>{this._renderFeatures(e,1)})}_renderLabelPhase(e){this._renderFeatures(e,0)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,2),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,3),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),i=t.getViewport(),n=e.passOptions,a=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=8;const{distance:o,smallSymbolDistance:h}=e.passOptions,d=Math.max(o,h);for(const l of this.children)l.visible&&l.containsScreenPoint(e.state,e.passOptions.position,2*d)&&this._renderTile(l,e,0);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(i),e.passOptions=n,e.drawPhase=a}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,13);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?1:has("featurelayer-force-marker-text-draw-order")?2:0,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function u(e){return 13===e.techniqueRef.type}export{l as FeatureContainer};
5
+ import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{throwIfAborted as t,createResolver as s}from"../../../../core/promiseUtils.js";import{UpdatingHandles as r}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as i}from"../../engine/AFeatureContainer.js";import n from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as a}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{RenderState as o}from"./RenderState.js";import{renderHighlight as h}from"../support/util.js";class d{constructor(e,t){this.id=e,this.version=t,this._resolver=s(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class l extends i{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new r,this._hitTestsRequests=[],this._store=new n,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}destroy(){this.updatingHandles.destroy(),super.destroy(),this._renderState=e(this._renderState),this._renderStateNext=e(this._renderStateNext)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._layerView.requestUpdate(),this._renderState){const e=Array.from(this._renderState.tiles()).filter(e=>e.needsUpload);if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter(),this.requestRender())}const t=this._layerView.subscriptionManager.updateVisibility();this.setVisibleTiles(t);for(const s of this.children)s.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case 1:return this._renderMapPhase(e);case 16:return this._renderHighlightPhase(e);case 2:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter(e=>this._visibleTiles.has(e.key.id)):[]}get usedMemory(){let e=0;return this._renderState&&(e+=this._renderState.usedMemory),this._renderStateNext&&(e+=this._renderStateNext.usedMemory),e+=this.attributeView.usedMemory,e}get instanceStore(){return this._store}get layerView(){return this._layerView}get tiles(){return this._renderState?.tiles()}get _instanceStore(){return this._store}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&a.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(u(t))return t;return null}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&(this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter())}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe){if(!this._subscriptions.has(t)){const e=new d(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise);continue}this._subscriptions.get(t).version=s}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new o(()=>this._stage,e=>this._subscriptions.get(e)?.version,e,this.layerView.view.labelManager.symbolFader,this,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){if(this._renderStateNext){has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`);const e=new Map;for(const t of this._renderState?.tiles()||[])e.set(t.id,t.metricsVisibility);this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush();for(const t of this._renderState.tiles())t.copyMetricsVisibility(e.get(t.id)||new Set);this._renderStateNext=null}this.requestRender()}setVisibleTiles(e){this._visibleTiles=e;for(const t of this.tiles??[])t.rendering=e.has(t.key.id)}async onMessage(e,s){t(s);const r=e.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(e),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let t=this._hitTestsRequests.find(({x:t,y:s})=>t===e.x&&s===e.y);const r=s();return t?t.resolvers.push(r):(t={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(t)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach((e,t)=>s.set(t,e)),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=a.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,0),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&h(e,!1,e=>{this._renderFeatures(e,1)})}_renderLabelPhase(e){this._renderFeatures(e,0)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,2),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,3),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),i=t.getViewport(),n=e.passOptions,a=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=8;const{distance:o,smallSymbolDistance:h}=e.passOptions,d=Math.max(o,h);for(const l of this.children)l.visible&&l.containsScreenPoint(e.state,e.passOptions.position,2*d)&&this._renderTile(l,e,0);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(i),e.passOptions=n,e.drawPhase=a}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,17);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?1:has("featurelayer-force-marker-text-draw-order")?2:0,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function u(e){return 17===e.techniqueRef.type}export{l as FeatureContainer};
@@ -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/CircularArray.js";import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{create as s}from"../../../../geometry/support/aaBoundingRect.js";import"../../tiling/TileInfoView.js";import n from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{FeatureTile as r}from"../../engine/webgl/FeatureTile.js";const o=1e3;class d{constructor(t,i,s,n,r,d){this.getStage=t,this.getSubscriptionVersion=i,this.version=s,this._fader=n,this._container=r,this._tileInfoView=d,this._pendingUpdates=new e(o),this._locked=!1,this._tiles=new Map}destroy(){for(const e of this.tiles())this._fader.unregisterFeatureTile(e),e.destroy();this._pendingUpdates.clear(),this._tiles.clear(),this._container=null,this._fader=null}tiles(){return this._tiles.values()}size(){return this._tiles.size}get usedMemory(){let e=0;for(const t of this._tiles.values())e+=t.usedMemory;for(const t of this._pendingUpdates.entries)t&&(e+=l(t.inner));return e}getTile(e){return this._tiles.get(e)}setTiles(e){this._tiles.clear();for(const t of e)this._tiles.set(t.key.id,t)}lockUploads(){this._locked=!0}unlockUploads(){this._locked=!1,this.flush()}enqueueUpdate(e){this._pendingUpdates.enqueue(e)}update(e){if(!this._locked)for(;this._pendingUpdates.size;){const t=this._pendingUpdates.peek();if(null==t||t.inner.attributeEpoch>e)break;this._updateTile(t),this._pendingUpdates.dequeue()}}removeTile(e){const t=this._tiles.get(e);has("esri-2d-update-debug")&&console.debug(`Tile[${e}] RenderState.removeTile`),t&&(this._fader.unregisterFeatureTile(t),t.destroy()),this._tiles.delete(e)}isTileDone(e){const t=this._tiles.get(e.id);return!!t&&(t.isReady&&t.decluttered)}flush(){for(;this._pendingUpdates.size;){const e=this._pendingUpdates.dequeue();null!=e&&this._updateTile(e)}for(const e of this._tiles.values())e.upload()}_updateTile(e){const{inner:t,objectIdMap:i}=e,s=this.getSubscriptionVersion(t.id);if(s!==t.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${t.subscriptionVesrion} != ${s}`;console.debug(`Version[${e}] Tile[${t.id}] FeatureContainer - Dropping message, outdated version]`,t)}return}if(has("esri-2d-update-debug")){const e=t.debugInfo?.chunkId??"<EnsureEnd>";console.debug(`Version[${t.version}] Tile[${t.id}] Chunk[${e}] RenderState.updateTile [${t.type}]`,t)}const n=this._ensureTile(t.id);if("update"===t.type){const[e,...s]=t.modify;n.onMessage({type:"update",modify:e,remove:t.remove,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const n of s){const e=this._tiles.get(n.tileId);e&&e.onMessage({type:"update",modify:n,remove:t.remove,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}return}if(null==t.append)return void n.onMessage({type:"append",clear:t.clear,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});const[r,...o]=t.append;n.onMessage({type:"append",clear:t.clear,append:r,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const d of o){const e=this._tiles.get(d.tileId);e&&e.onMessage({type:"update",modify:d,remove:[],sort:!1,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}}_ensureTile(e){if(!this._tiles.has(e)){const t=this._createTile(e);this._copyPixelBufferedEntitiesInto(t),this._tiles.set(e,t)}return this._tiles.get(e)}_createTile(e){has("esri-2d-update-debug")&&console.debug(`Version[${this.version}] Tile[${e}] RenderState.createTile`);const o=new n(e),d=this._tileInfoView.getTileBounds(s(),o),l=d[0],a=d[3],u=this._tileInfoView.getTileResolution(o.level),p=this._container.instanceStore.find(14)?.instanceId,c=new r(o,u,l,a,this._fader,p,!0);if(this._fader.registerFeatureTile(c),c.stage=this.getStage(),!c.stage){const e=new t("featurelayerview:webgl","Cannot create tile with empty stage");i.getLogger("esri.views.2d.layers.features.RenderState").error(e)}return c}_copyPixelBufferedEntitiesInto(e){let t=7;const i=this._tileInfoView.getLODInfoAt(e.key);for(let s=-1;s<=1;s++)for(let n=-1;n<=1;n++){if(0===s&&0===n)continue;const r=e.key.getNormalizedNeighbor(n,s,i).id,o=this._tiles.get(r);if(null!=o){const i=1<<t;e.copyPixelBufferedEntitesFrom(o,i,n,s)}t--}}}function l(e){switch(e.type){case"update":return e.modify.reduce((e,t)=>e+a(t),0);case"append":return e.append?e.append.reduce((e,t)=>e+a(t),0):0}}function a(e){return e.entities.byteLength+e.data.reduce((e,t)=>e+u(t),0)}function u(e){return e.indices.byteLength+e.vertices.byteLength+(e.metrics?.byteLength??0)}export{d as RenderState};
5
+ import e from"../../../../core/CircularArray.js";import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{create as s}from"../../../../geometry/support/aaBoundingRect.js";import"../../tiling/TileInfoView.js";import n from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{FeatureTile as r}from"../../engine/webgl/FeatureTile.js";const o=1e3;class d{constructor(t,i,s,n,r,d){this.getStage=t,this.getSubscriptionVersion=i,this.version=s,this._fader=n,this._container=r,this._tileInfoView=d,this._pendingUpdates=new e(o),this._locked=!1,this._tiles=new Map}destroy(){for(const e of this.tiles())this._fader.unregisterFeatureTile(e),e.destroy();this._pendingUpdates.clear(),this._tiles.clear(),this._container=null,this._fader=null}tiles(){return this._tiles.values()}size(){return this._tiles.size}get usedMemory(){let e=0;for(const t of this._tiles.values())e+=t.usedMemory;for(const t of this._pendingUpdates.entries)t&&(e+=l(t.inner));return e}getTile(e){return this._tiles.get(e)}setTiles(e){this._tiles.clear();for(const t of e)this._tiles.set(t.key.id,t)}lockUploads(){this._locked=!0}unlockUploads(){this._locked=!1,this.flush()}enqueueUpdate(e){this._pendingUpdates.enqueue(e)}update(e){if(!this._locked)for(;this._pendingUpdates.size;){const t=this._pendingUpdates.peek();if(null==t||t.inner.attributeEpoch>e)break;this._updateTile(t),this._pendingUpdates.dequeue()}}removeTile(e){const t=this._tiles.get(e);has("esri-2d-update-debug")&&console.debug(`Tile[${e}] RenderState.removeTile`),t&&(this._fader.unregisterFeatureTile(t),t.destroy()),this._tiles.delete(e)}isTileDone(e){const t=this._tiles.get(e.id);return!!t&&(t.isReady&&t.decluttered)}flush(){for(;this._pendingUpdates.size;){const e=this._pendingUpdates.dequeue();null!=e&&this._updateTile(e)}for(const e of this._tiles.values())e.upload()}_updateTile(e){const{inner:t,objectIdMap:i}=e,s=this.getSubscriptionVersion(t.id);if(s!==t.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${t.subscriptionVesrion} != ${s}`;console.debug(`Version[${e}] Tile[${t.id}] FeatureContainer - Dropping message, outdated version]`,t)}return}if(has("esri-2d-update-debug")){const e=t.debugInfo?.chunkId??"<EnsureEnd>";console.debug(`Version[${t.version}] Tile[${t.id}] Chunk[${e}] RenderState.updateTile [${t.type}]`,t)}const n=this._ensureTile(t.id);if("update"===t.type){const[e,...s]=t.modify;n.onMessage({type:"update",modify:e,remove:t.remove,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const n of s){const e=this._tiles.get(n.tileId);e&&e.onMessage({type:"update",modify:n,remove:t.remove,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}return}if(null==t.append)return void n.onMessage({type:"append",clear:t.clear,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});const[r,...o]=t.append;n.onMessage({type:"append",clear:t.clear,append:r,debugInfo:t.debugInfo,end:t.end,attributeEpoch:t.attributeEpoch,objectIdMap:i});for(const d of o){const e=this._tiles.get(d.tileId);e&&e.onMessage({type:"update",modify:d,remove:[],sort:!1,end:!1,isPixelBuffer:!0,attributeEpoch:null,objectIdMap:i})}}_ensureTile(e){if(!this._tiles.has(e)){const t=this._createTile(e);this._copyPixelBufferedEntitiesInto(t),this._tiles.set(e,t)}return this._tiles.get(e)}_createTile(e){has("esri-2d-update-debug")&&console.debug(`Version[${this.version}] Tile[${e}] RenderState.createTile`);const o=new n(e),d=this._tileInfoView.getTileBounds(s(),o),l=d[0],a=d[3],u=this._tileInfoView.getTileResolution(o.level),p=this._container.instanceStore.find(18)?.instanceId,c=new r(o,u,l,a,this._fader,p,!0);if(this._fader.registerFeatureTile(c),c.stage=this.getStage(),!c.stage){const e=new t("featurelayerview:webgl","Cannot create tile with empty stage");i.getLogger("esri.views.2d.layers.features.RenderState").error(e)}return c}_copyPixelBufferedEntitiesInto(e){let t=7;const i=this._tileInfoView.getLODInfoAt(e.key);for(let s=-1;s<=1;s++)for(let n=-1;n<=1;n++){if(0===s&&0===n)continue;const r=e.key.getNormalizedNeighbor(n,s,i).id,o=this._tiles.get(r);if(null!=o){const i=1<<t;e.copyPixelBufferedEntitesFrom(o,i,n,s)}t--}}}function l(e){switch(e.type){case"update":return e.modify.reduce((e,t)=>e+a(t),0);case"append":return e.append?e.append.reduce((e,t)=>e+a(t),0):0}}function a(e){return e.entities.byteLength+e.data.reduce((e,t)=>e+u(t),0)}function u(e){return e.indices.byteLength+e.vertices.byteLength+(e.metrics?.byteLength??0)}export{d as RenderState};
@@ -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 has from"../../../../../core/has.js";import{sqlAnd as e}from"../../../../../core/sql.js";import t from"../../../../../geometry/SpatialReference.js";import{getClauseForScaleRange as r}from"../../../../../layers/support/displayFilterUtils.js";import a from"../../../../../rest/support/Query.js";import{T as i}from"../../../../../chunks/TimeExtent.js";const s=4;function o(e){switch(e.type){case"object-id":case"unique-id-simple":return`${e.fieldName} ASC`;case"unique-id-composite":return`${e.fieldNames.join(",")} ASC`}}function n(e,r,a){const s=o(a.featureIdInfo),n={returnCentroid:"esriGeometryPolygon"===a.serviceGeometryType&&!e.queryMetadata.supportsCentroidOnDegeneratedQuantizedGeometry&&!e.queryMetadata.supportsDegeneratedQuantizedGeometry,returnGeometry:!0,timeReferenceUnknownClient:a.timeReferenceUnknownClient??void 0,outSpatialReference:t.fromJSON(e.outSpatialReference),orderByFields:"memory"===e.type?[]:[s],where:r.mutable.dataFilter.definitionExpression??"1=1",outFields:r.mutable.availableFields,multipatchOption:"esriGeometryMultiPatch"===a.serviceGeometryType?"xyFootprint":null};if("feature"===r.type){const{gdbVersion:e,historicMoment:t,timeExtent:a}=r.mutable.dataFilter;return{...n,gdbVersion:e,historicMoment:t?new Date(t):null,timeExtent:a?i.fromJSON(a):null,outFields:r.mutable.availableFields}}return n}class u{static fromSchema(e,t,r){const a="feature"===t.type?t.mutable.dataFilter.queryScaleRanges:[],i=t.mutable.displayFilterInfo;return new u(n(e,t,r),i,a,r.subtypeField,t.mutable.dataFilter.customParameters,r.geometryType,e.queryMetadata)}constructor(e,t,r,a,i,s,o){this._queryParams=e,this._displayFilter=t,this._queryScaleRanges=r,this._subtypeField=a,this._customParameters=i,this._geometryType=s,this._queryMetadata=o}get pageSize(){if(null==this._queryMetadata)throw new Error("InternalError: Service does not support paged queries");const e=this._queryMetadata.supportsMaxRecordCountFactor?s:null,t=(this._queryMetadata.maxRecordCount??8e3)*(e??1);return Math.min(8e3,t)}get objectIdsQueryPageSize(){return this._queryMetadata?.maxRecordCount??2e3}updateHistoricMoment(e){this._queryParams.historicMoment=e}updateFields(e){this._queryParams.outFields=e}createPatchFieldsQuery(e,t,r){if(!t.getSize())return null;const a=e.clone();if("*"===this._queryParams.outFields[0]){if("*"===(a.outFields??[])[0])return null;a.outFields=this._queryParams.outFields}else{const e=new Set(this._queryParams.outFields),r=[];for(const a of e)t.hasField(a)||r.push(a);if(0===r.length)return null;a.outFields=r}a.returnGeometry=!1,a.returnCentroid=!1,a.quantizationParameters=null,a.cacheHint=!0;const i={inner:a,customParameters:this._customParameters};if(has("esri-tiles-debug")&&null!=r){const e=r.chunkId.toString().replaceAll("/",".");i.customParameters=i.customParameters?{...i.customParameters,chunkId:e}:{chunkId:e}}return i}createQuery(e={}){if(!this._queryParams)throw new Error("InternalError: queryInfo should be defined");return{inner:new a({...this._queryParams,...e}),customParameters:this._customParameters}}createTileQuery(t,a){if(null==this._queryMetadata)throw new Error("InternalError: Service does not support tile queries");const i=this.createQuery(a),o=i.inner;if(this._queryScaleRanges.length){const r=this._queryScaleRanges.filter(e=>(!e.minScale||e.minScale>=t.maxScale)&&(!e.maxScale||e.maxScale<=t.minScale)).map(e=>e.subtypeCode);if(r.length){const t=`${this._subtypeField} IN (${r})`;o.where=e(o.where,t)}}if(this._displayFilter&&(o.where=e(o.where,r(this._displayFilter,t.minScale,t.maxScale))),o.quantizationParameters=a.quantizationParameters??t.getQuantizationParameters(),o.resultType="tile",o.geometry=t.extent,this._queryMetadata.supportsQuantization?"esriGeometryPolyline"===this._geometryType&&(o.maxAllowableOffset=t.resolution*has("feature-polyline-generalization-factor")):"esriGeometryPolyline"!==this._geometryType&&"esriGeometryPolygon"!==this._geometryType||(o.maxAllowableOffset=t.resolution,"esriGeometryPolyline"===this._geometryType&&(o.maxAllowableOffset*=has("feature-polyline-generalization-factor"))),o.defaultSpatialReferenceEnabled=this._queryMetadata.supportsDefaultSpatialReference,o.compactGeometryEnabled=this._queryMetadata.supportsCompactGeometry,this._queryMetadata.supportsMaxRecordCountFactor&&(o.maxRecordCountFactor=s),has("esri-tiles-debug")){const e=t.id.replaceAll("/",".");i.customParameters=i.customParameters?{...i.customParameters,tileId:e}:{tileId:e}}return i}createPagedTileQuery(e,t){const r=this.pageSize;return this.createTileQuery(e,{start:r*t,num:r,returnExceededLimitFeatures:!0})}createPagedQuery(e,t){const r=this.pageSize;return this.createQuery({start:r*e,num:r,returnExceededLimitFeatures:!0,maxRecordCountFactor:s,quantizationParameters:t,cacheHint:!0})}createObjectIdsQuery(e){return this.createQuery({objectIds:e,outFields:["*"]})}}export{u as FeatureSourceQueryInfo};
5
+ import has from"../../../../../core/has.js";import{sqlAnd as e}from"../../../../../core/sql.js";import t from"../../../../../geometry/SpatialReference.js";import{getClauseForScaleRange as r}from"../../../../../layers/support/displayFilterUtils.js";import a from"../../../../../rest/support/Query.js";import i from"../../../../../time/TimeExtent.js";const s=4;function o(e){switch(e.type){case"object-id":case"unique-id-simple":return`${e.fieldName} ASC`;case"unique-id-composite":return`${e.fieldNames.join(",")} ASC`}}function n(e,r,a){const s=o(a.featureIdInfo),n={returnCentroid:"esriGeometryPolygon"===a.serviceGeometryType&&!e.queryMetadata.supportsCentroidOnDegeneratedQuantizedGeometry&&!e.queryMetadata.supportsDegeneratedQuantizedGeometry,returnGeometry:!0,timeReferenceUnknownClient:a.timeReferenceUnknownClient??void 0,outSpatialReference:t.fromJSON(e.outSpatialReference),orderByFields:"memory"===e.type?[]:[s],where:r.mutable.dataFilter.definitionExpression??"1=1",outFields:r.mutable.availableFields,multipatchOption:"esriGeometryMultiPatch"===a.serviceGeometryType?"xyFootprint":null};if("feature"===r.type){const{gdbVersion:e,historicMoment:t,timeExtent:a}=r.mutable.dataFilter;return{...n,gdbVersion:e,historicMoment:t?new Date(t):null,timeExtent:a?i.fromJSON(a):null,outFields:r.mutable.availableFields}}return n}class u{static fromSchema(e,t,r){const a="feature"===t.type?t.mutable.dataFilter.queryScaleRanges:[],i=t.mutable.displayFilterInfo;return new u(n(e,t,r),i,a,r.subtypeField,t.mutable.dataFilter.customParameters,r.geometryType,e.queryMetadata)}constructor(e,t,r,a,i,s,o){this._queryParams=e,this._displayFilter=t,this._queryScaleRanges=r,this._subtypeField=a,this._customParameters=i,this._geometryType=s,this._queryMetadata=o}get pageSize(){if(null==this._queryMetadata)throw new Error("InternalError: Service does not support paged queries");const e=this._queryMetadata.supportsMaxRecordCountFactor?s:null,t=(this._queryMetadata.maxRecordCount??8e3)*(e??1);return Math.min(8e3,t)}get objectIdsQueryPageSize(){return this._queryMetadata?.maxRecordCount??2e3}updateHistoricMoment(e){this._queryParams.historicMoment=e}updateFields(e){this._queryParams.outFields=e}createPatchFieldsQuery(e,t,r){if(!t.getSize())return null;const a=e.clone();if("*"===this._queryParams.outFields[0]){if("*"===(a.outFields??[])[0])return null;a.outFields=this._queryParams.outFields}else{const e=new Set(this._queryParams.outFields),r=[];for(const a of e)t.hasField(a)||r.push(a);if(0===r.length)return null;a.outFields=r}a.returnGeometry=!1,a.returnCentroid=!1,a.quantizationParameters=null,a.cacheHint=!0;const i={inner:a,customParameters:this._customParameters};if(has("esri-tiles-debug")&&null!=r){const e=r.chunkId.toString().replaceAll("/",".");i.customParameters=i.customParameters?{...i.customParameters,chunkId:e}:{chunkId:e}}return i}createQuery(e={}){if(!this._queryParams)throw new Error("InternalError: queryInfo should be defined");return{inner:new a({...this._queryParams,...e}),customParameters:this._customParameters}}createTileQuery(t,a){if(null==this._queryMetadata)throw new Error("InternalError: Service does not support tile queries");const i=this.createQuery(a),o=i.inner;if(this._queryScaleRanges.length){const r=this._queryScaleRanges.filter(e=>(!e.minScale||e.minScale>=t.maxScale)&&(!e.maxScale||e.maxScale<=t.minScale)).map(e=>e.subtypeCode);if(r.length){const t=`${this._subtypeField} IN (${r})`;o.where=e(o.where,t)}}if(this._displayFilter&&(o.where=e(o.where,r(this._displayFilter,t.minScale,t.maxScale))),o.quantizationParameters=a.quantizationParameters??t.getQuantizationParameters(),o.resultType="tile",o.geometry=t.extent,this._queryMetadata.supportsQuantization?"esriGeometryPolyline"===this._geometryType&&(o.maxAllowableOffset=t.resolution*has("feature-polyline-generalization-factor")):"esriGeometryPolyline"!==this._geometryType&&"esriGeometryPolygon"!==this._geometryType||(o.maxAllowableOffset=t.resolution,"esriGeometryPolyline"===this._geometryType&&(o.maxAllowableOffset*=has("feature-polyline-generalization-factor"))),o.defaultSpatialReferenceEnabled=this._queryMetadata.supportsDefaultSpatialReference,o.compactGeometryEnabled=this._queryMetadata.supportsCompactGeometry,this._queryMetadata.supportsMaxRecordCountFactor&&(o.maxRecordCountFactor=s),has("esri-tiles-debug")){const e=t.id.replaceAll("/",".");i.customParameters=i.customParameters?{...i.customParameters,tileId:e}:{tileId:e}}return i}createPagedTileQuery(e,t){const r=this.pageSize;return this.createTileQuery(e,{start:r*t,num:r,returnExceededLimitFeatures:!0})}createPagedQuery(e,t){const r=this.pageSize;return this.createQuery({start:r*e,num:r,returnExceededLimitFeatures:!0,maxRecordCountFactor:s,quantizationParameters:t,cacheHint:!0})}createObjectIdsQuery(e){return this.createQuery({objectIds:e,outFields:["*"]})}}export{u as FeatureSourceQueryInfo};
@@ -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{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as i}from"./AnalysisView3D.js";import{ElevationProfileSceneLineComputation as r}from"./ElevationProfile/ElevationProfileSceneLineComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileGroundLineComputation as n}from"../../analysis/ElevationProfile/ElevationProfileGroundLineComputation.js";import{ElevationProfileInputLineComputation as a}from"../../analysis/ElevationProfile/ElevationProfileInputLineComputation.js";import{ElevationProfileQueryLineComputation as p}from"../../analysis/ElevationProfile/ElevationProfileQueryLineComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends i{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profileLine.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new r(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new c({view:e,analysisViewData:this})}destroy(){this._controller.destroy(),this._visualization.destroy(),this._sketchTool?.destroy()}get units(){return this._controller.units}get hoveredPoints(){return this._controller.hoveredPoints}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller.progress}get results(){return this._controller.results}get statistics(){return this._controller.statistics}get updating(){return!0===this._controller.updating||!0===this._visualization.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([e({readOnly:!0})],u.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([e({readOnly:!0})],u.prototype,"units",null),t([e()],u.prototype,"hoveredPosition",void 0),t([e()],u.prototype,"hoveredPoints",null),t([e({readOnly:!0})],u.prototype,"progress",null),t([e({readOnly:!0})],u.prototype,"results",null),t([e({readOnly:!0})],u.prototype,"statistics",null),t([e({readOnly:!0})],u.prototype,"updating",null),t([e()],u.prototype,"sketchGraphic",null),t([e()],u.prototype,"toolState",null),t([e()],u.prototype,"_controller",void 0),t([e()],u.prototype,"_visualization",void 0),t([e()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],u);const h=u;export{h as default};
5
+ import{__decorate as t}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as r}from"./AnalysisView3D.js";import{ElevationProfileSceneLineComputation as i}from"./ElevationProfile/ElevationProfileSceneLineComputation.js";import{ElevationProfileVisualization3D as s}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileGroundLineComputation as n}from"../../analysis/ElevationProfile/ElevationProfileGroundLineComputation.js";import{ElevationProfileInputLineComputation as a}from"../../analysis/ElevationProfile/ElevationProfileInputLineComputation.js";import{ElevationProfileQueryLineComputation as p}from"../../analysis/ElevationProfile/ElevationProfileQueryLineComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends r{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new l({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profileLine.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":return new i(t)}}}}),this._visualization=new s({view:e,analysisViewData:this}),this._sketchTool=new c({view:e,analysisViewData:this})}destroy(){this._controller.destroy(),this._visualization.destroy(),this._sketchTool?.destroy()}get effectiveUnits(){return this._controller.effectiveUnits}get error(){return this._controller.error}get hoveredPoints(){return this._controller.hoveredPoints}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller.progress}get results(){return this._controller.results}get statistics(){return this._controller.statistics}get updating(){return!0===this._controller.updating||!0===this._visualization.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([e({readOnly:!0})],u.prototype,"type",void 0),t([e({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([e({readOnly:!0})],u.prototype,"effectiveUnits",null),t([e({readOnly:!0})],u.prototype,"error",null),t([e()],u.prototype,"hoveredPosition",void 0),t([e()],u.prototype,"hoveredPoints",null),t([e({readOnly:!0})],u.prototype,"progress",null),t([e({readOnly:!0})],u.prototype,"results",null),t([e({readOnly:!0})],u.prototype,"statistics",null),t([e({readOnly:!0})],u.prototype,"updating",null),t([e()],u.prototype,"sketchGraphic",null),t([e()],u.prototype,"toolState",null),t([e()],u.prototype,"_controller",void 0),t([e()],u.prototype,"_visualization",void 0),t([e()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],u);const h=u;export{h as default};
@@ -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{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import s from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as r,isAborted as o,createResolver as h,createAbortError as c,onAbort as p}from"../../../../core/promiseUtils.js";import{watch as n,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import u from"../../../../layers/GraphicsLayer.js";import _ from"../../../../symbols/SimpleFillSymbol.js";import{isPolygon as k,isPolygonGraphic as g}from"./volumeMeasurementGeometryUtils.js";import G from"../../../../widgets/Sketch/SketchViewModel.js";const w=Symbol("interactive-operation");let v=class extends s{constructor(e){super(e),this._updatingHandles=new y,this._onUndoRedo=()=>{this._updateGeometryFromSketchGraphic()}}initialize(){const{view:e}=this;this._graphicsLayer=new u({listMode:"hide",internal:!0,elevationInfo:{mode:"on-the-ground"}}),this._sketchViewModel=new G({layer:this._graphicsLayer,view:e,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{shapeOperation:"none"},enableRotation:!1,enableScaling:!1,enableMoveAllGraphics:!1,enableZ:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"reshape"},polygonSymbol:this._polygonSymbol}),this.addHandles(this._sketchViewModel.on(["undo","redo"],this._onUndoRedo)),this.addHandles(n(()=>({map:e.map,internalGraphicsLayer:this._graphicsLayer,state:this.state}),({map:e,internalGraphicsLayer:t,state:s})=>{switch(b(e,t),s){case"idle":case"sketching":break;case"awaiting-sketch":this.analysisViewData.interactive=!0;break;case"reshaping":this._startReshape();break;case"reshaping-disabled":this._stopOperation(),this._ensureUpdatedSketchGraphic()}},l))}destroy(){this._sketchViewModel.destroy();const e=this._graphicsLayer;this.view.map.remove(e),e.destroy()}get sketchGraphic(){return this._get("sketchGraphic")}set sketchGraphic(e){e!==this._get("sketchGraphic")&&(this._set("sketchGraphic",e),this._updateGeometryFromSketchGraphic())}get state(){const{geometry:e}=this.analysis,{interactive:t,visible:s}=this.analysisViewData;return s?this._sketchViewModel.createGraphic?this._sketchViewModel.createGraphic===this.sketchGraphic?"sketching":"awaiting-sketch":e?t?"reshaping":"reshaping-disabled":"idle":"idle"}get updating(){return this._sketchViewModel.updating||this._updatingHandles.updating}get _polygonSymbol(){return new _({color:[0,0,0,0],outline:{color:[0,0,0,0]}})}place(e){return this._startPlaceOperation(e,(t,s)=>{const i=this.analysis.clone(),h=this._sketchViewModel.on("create",e=>{switch(e.state){case"complete":this._updateGeometryFromSketchGraphic(),this._stopOperation();break;case"cancel":this._stopOperation();break;case"active":this._updateGeometryFromSketchGraphic();break;case"start":this.sketchGraphic=e.graphic}});return this._ensureUpdatedSketchGraphic(),this._updatingHandles.addPromise(r(this._sketchViewModel.create("polygon"))),a(()=>(h.remove(),this._sketchViewModel.cancel(),this._updateGeometryFromSketchGraphic(),this.analysis.valid?o(e)||i.equals(this.analysis)?s():void t():(this._clearGeometry(),s())))})}async _startPlaceOperation(e,t){const s=h(),i=t(()=>s.resolve({}),()=>s.reject(c()));return p(e,()=>this._stopOperation()),this._replaceHandles([i,p(e,()=>this._stopOperation())],w),await s.promise}_startReshape(){this._stopOperation();const e=this._sketchViewModel.on("update",e=>{this._updateGeometryFromSketchGraphic(),"complete"===e.state&&("reshaping"===this.state?this._startReshape():this._stopOperation())});this._replaceHandles(a(()=>{e.remove(),this._sketchViewModel.cancel()}),w);const t=this._ensureUpdatedSketchGraphic();t&&this._updatingHandles.addPromise(r(this._sketchViewModel.update(t,{tool:"reshape"})))}_stopOperation(){this.removeHandles(w)}_ensureUpdatedSketchGraphic(){const{geometry:e}=this.analysis;return k(e)?(this.sketchGraphic??=new t({geometry:e,symbol:this._polygonSymbol}),this.sketchGraphic.geometry=e,this._graphicsLayer.add(this.sketchGraphic),this.sketchGraphic):(this.sketchGraphic=null,null)}_clearGeometry(){this.sketchGraphic=null,this.analysis.geometry=null}_updateGeometryFromSketchGraphic(){const e=this.sketchGraphic;this.analysis.geometry=g(e)?e.geometry:null}_replaceHandles(e,t){this.removeHandles(t),this.addHandles((Array.isArray(e)?e:[e]).filter(i),t)}};function b(e,t){t&&(t.parent&&"remove"in t.parent&&t.parent.remove(t),e?.add(t))}e([d({constructOnly:!0})],v.prototype,"analysisViewData",void 0),e([d({constructOnly:!0})],v.prototype,"view",void 0),e([d({constructOnly:!0})],v.prototype,"analysis",void 0),e([d()],v.prototype,"sketchGraphic",null),e([d({nonNullable:!0})],v.prototype,"state",null),e([d()],v.prototype,"updating",null),e([d()],v.prototype,"_polygonSymbol",null),v=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementTool")],v);export{v as default};
@@ -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
+ function n(n){return t(n?.geometry)}function t(n){return null!=n&&"polygon"===n.type}export{t as isPolygon,n as isPolygonGraphic};
@@ -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{destroyMaybe as e}from"../../../core/maybe.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 s}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as r}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as o}from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as l}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as n}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";let a=class extends o{constructor(t){super(t),this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null,this.tool=null}initialize(){const{analysis:t,view:e}=this;this._analysisController=new l({view:e,analysis:t,analysisViewData:this}),this._analysisVisualization=new n({view:e,analysisViewData:this})}destroy(){this._analysisController=e(this._analysisController),this._analysisVisualization=e(this._analysisVisualization)}get result(){return this._analysisController.result}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get visible(){return super.visible}set visible(t){super.visible=t}get effectiveTargetElevation(){const{targetElevation:t}=this.analysis.cutFillOptions;if(null!=t)return t;const e=this.elevationAlignedGeometry?.extent;return e&&e.zmin&&e.zmax?(e.zmax+e.zmin)/2:null}get unit(){return this.analysis.unit??r(this.view)}get updating(){return null!=this._analysisController&&this._analysisController.updating}};t([i({readOnly:!0})],a.prototype,"type",void 0),t([i({constructOnly:!0,nonNullable:!0})],a.prototype,"analysis",void 0),t([i({readOnly:!0})],a.prototype,"result",null),t([i()],a.prototype,"elevationAlignedGeometry",void 0),t([i({type:Number})],a.prototype,"effectiveTargetElevation",null),t([i()],a.prototype,"targetGeometry",void 0),t([i()],a.prototype,"unit",null),t([i()],a.prototype,"updating",null),a=t([s("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],a);const u=a;export{u as default};
5
+ import{__decorate as e}from"tslib";import{destroyMaybe as t}from"../../../core/maybe.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as o}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as r}from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as l}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as a}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";import n from"./VolumeMeasurement/VolumeMeasurementTool.js";let u=class extends r{constructor(e){super(e),this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null}initialize(){const{analysis:e,view:t}=this;this._analysisController=new l({view:t,analysis:e,analysisViewData:this}),this._analysisTool=new n({analysis:e,view:t,analysisViewData:this}),this._analysisVisualization=new a({view:t,analysisViewData:this})}destroy(){this._analysisController=t(this._analysisController),this._analysisVisualization=t(this._analysisVisualization),this._analysisTool.destroy()}get result(){return this._analysisController.result}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get visible(){return super.visible}set visible(e){super.visible=e}get effectiveTargetElevation(){const{targetElevation:e}=this.analysis.cutFillOptions;if(null!=e)return e;const t=this.elevationAlignedGeometry?.extent;return t&&t.zmin&&t.zmax?(t.zmax+t.zmin)/2:null}get unit(){return this.analysis.unit??o(this.view)}get updating(){return null!=this._analysisController&&this._analysisController.updating||this._analysisTool.updating}place(e){return this._analysisTool.place(e)}};e([s({readOnly:!0})],u.prototype,"type",void 0),e([s({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),e([s({readOnly:!0})],u.prototype,"result",null),e([s()],u.prototype,"elevationAlignedGeometry",void 0),e([s({type:Number})],u.prototype,"effectiveTargetElevation",null),e([s()],u.prototype,"targetGeometry",void 0),e([s()],u.prototype,"unit",null),e([s()],u.prototype,"updating",null),u=e([i("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],u);const p=u;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{__decorate as e}from"tslib";import t from"../../../Graphic.js";import i from"../../../core/Error.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{destroyMaybe as s}from"../../../core/maybe.js";import n from"../../../core/ReactiveMap.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as p}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as a}from"../../../layers/support/timeSupport.js";import h from"../../../rest/support/Query.js";import{isGraphic as u}from"../../../support/guards.js";import{attributeLookup as g}from"./support/attributeUtils.js";import{normalizeHighlightTarget as c,emptyHighlightHandle as y,isObjectId as d}from"./support/highlightUtils.js";import{getHighlightName as m}from"../../support/highlightOptionsUtils.js";import{isInEffectiveScaleRange as f,hasLayerBasedScaleVisibility as P}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as b}from"../../support/projectionUtils.js";const v=v=>{const w=v;let I=class extends w{constructor(){super(...arguments),this.highlightOptions=null,this.updatePolicy=1,this.slicePlaneEnabled=!1,this._highlightCounter=new n,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new i("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference="local"===this.view.viewingMode?await b(this.layer.fullExtent,this.view.spatialReference):null;const e=await this.createGraphicsPipeline();this.destroyed?e.destroy():(this.graphicsPipeline=e,await e.when())})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=s(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return P()?f(this.layer.effectiveScaleRange,this.view.scale):!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return a(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get highlightIds(){return Array.from(this._highlightCounter.keys())}get hasHighlight(){return this._highlightCounter.size>0}getHit(e,t){if(has("feature-pipeline-3d-test"))return this._getHitMock(e);const i=this.graphicsPipeline.findGraphic(t=>t.uid===e);if(null==i)return null;const r=p(i,this.layer,this.layer.graphicOrigin);return{type:"graphic",graphic:r,layer:r.layer}}_getHitMock(e){const i=this.layer,r={};r[this.layer.objectIdField]=e;const s=new t({layer:i,sourceLayer:i,origin:this.graphicOrigin,visible:!0,symbol:null,attributes:r,geometry:null});return{type:"graphic",graphic:s,layer:s.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.graphicsQuery.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.graphicsPipeline.graphicsQuery.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():h.from(e)}_addHighlightIds(e){for(const t of e){const e=this._highlightCounter.get(t)??0;this._highlightCounter.set(t,e+1)}}_removeHighlightIds(e){for(const t of e){let e=this._highlightCounter.get(t);null!=e&&(e--,e>0?this._highlightCounter.set(t,e):this._highlightCounter.delete(t))}}highlight(e,t){const i=m(t),s=this.layer.objectIdField,n=c(e);if(0===n.length)return y;if(u(n[0])){const e=n;if(null!=g(this.layer.fieldsIndex,e[0].attributes,s)){const t=e.map(e=>g(this.layer.fieldsIndex,e.attributes,s)),n=this.graphicsPipeline.highlightByObjectIds(t,i);return this._addHighlightIds(t),r(()=>{this._removeHighlightIds(t),n.remove()})}return this.graphicsPipeline.highlightByGraphics(e,i)}if(d(n[0])){const e=n;this._addHighlightIds(e);const t=this.graphicsPipeline.highlightByObjectIds(e,i);return r(()=>{t.remove(),this._removeHighlightIds(e)})}return y}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new i("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}queryAttributeBins(){throw new Error("Not implemented")}queryAggregates(){throw new Error("Not implemented")}};return e([o()],I.prototype,"graphicsPipeline",void 0),e([o({readOnly:!0})],I.prototype,"dataUpdating",null),e([o()],I.prototype,"highlightOptions",void 0),e([o()],I.prototype,"suspended",void 0),e([o({readOnly:!0})],I.prototype,"legendEnabled",null),e([o({readOnly:!0})],I.prototype,"visibleAtCurrentScale",null),e([o()],I.prototype,"updating",void 0),e([o({readOnly:!0})],I.prototype,"updatePolicy",void 0),e([o({type:Boolean})],I.prototype,"slicePlaneEnabled",void 0),e([o({readOnly:!0})],I.prototype,"suspendInfo",void 0),e([o()],I.prototype,"symbologySnappingSupported",null),e([o({readOnly:!0})],I.prototype,"hasAllFeatures",null),e([o({readOnly:!0})],I.prototype,"hasAllFeaturesInView",null),e([o({readOnly:!0})],I.prototype,"hasFullGeometries",null),e([o({readOnly:!0})],I.prototype,"timeExtent",null),I=e([l("esri.views.3d.layers.FeatureLikeLayerView3D")],I),I};export{v as FeatureLikeLayerView3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import i from"../../../core/Error.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as l}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as h}from"../../../layers/support/timeSupport.js";import a from"../../../rest/support/AttributeBinsQuery.js";import p from"../../../rest/support/Query.js";import{isGraphic as u}from"../../../support/guards.js";import{attributeLookup as g}from"./support/attributeUtils.js";import{normalizeHighlightTarget as c,emptyHighlightHandle as y,isObjectId as d}from"./support/highlightUtils.js";import{getHighlightName as m}from"../../support/highlightOptionsUtils.js";import{isInEffectiveScaleRange as f,hasLayerBasedScaleVisibility as P}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as b}from"../../support/projectionUtils.js";const v=v=>{const I=v;let w=class extends I{constructor(){super(...arguments),this.highlightOptions=null,this.updatePolicy=1,this.slicePlaneEnabled=!1,this._highlightCounter=new Map,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new i("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference="local"===this.view.viewingMode?await b(this.layer.fullExtent,this.view.spatialReference):null;const e=await this.createGraphicsPipeline();this.destroyed?e.destroy():(this.graphicsPipeline=e,await e.when())})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=s(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return P()?f(this.layer.effectiveScaleRange,this.view.scale):!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return h(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get highlightIds(){return Array.from(this._highlightCounter.keys())}get hasHighlight(){return this.highlightIds.length>0}getHit(e,t){if(has("feature-pipeline-3d-test"))return this._getHitMock(e);const i=this.graphicsPipeline.findGraphic(t=>t.uid===e);if(null==i)return null;const r=l(i,this.layer,this.layer.graphicOrigin);return{type:"graphic",graphic:r,layer:r.layer}}_getHitMock(e){const i=this.layer,r={};r[this.layer.objectIdField]=e;const s=new t({layer:i,sourceLayer:i,origin:this.graphicOrigin,visible:!0,symbol:null,attributes:r,geometry:null});return{type:"graphic",graphic:s,layer:s.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.graphicsQuery.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.graphicsPipeline.graphicsQuery.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForCount(this._ensureQuery(e),t?.signal)}async queryAttributeBins(e,t){return this.graphicsPipeline.graphicsQuery.executeAttributeBinsQuery(this._ensureAttributeBinsQuery(e),t?.signal)}queryExtent(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():p.from(e)}_ensureAttributeBinsQuery(e){const t=a.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t}_addHighlightIds(e){for(const t of e){const e=this._highlightCounter.get(t)??0;this._highlightCounter.set(t,e+1)}this.notifyChange("highlightIds")}_removeHighlightIds(e){for(const t of e){let e=this._highlightCounter.get(t);null!=e&&(e--,e>0?this._highlightCounter.set(t,e):this._highlightCounter.delete(t))}this.notifyChange("highlightIds")}highlight(e,t){const i=m(t),s=this.layer.objectIdField,n=c(e);if(0===n.length)return y;if(u(n[0])){const e=n;if(null!=g(this.layer.fieldsIndex,e[0].attributes,s)){const t=e.map(e=>g(this.layer.fieldsIndex,e.attributes,s)),n=this.graphicsPipeline.highlightByObjectIds(t,i);return this._addHighlightIds(t),r(()=>{this._removeHighlightIds(t),n.remove()})}return this.graphicsPipeline.highlightByGraphics(e,i)}if(d(n[0])){const e=n;this._addHighlightIds(e);const t=this.graphicsPipeline.highlightByObjectIds(e,i);return r(()=>{t.remove(),this._removeHighlightIds(e)})}return y}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new i("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}queryAggregates(){throw new Error("Not implemented")}};return e([n()],w.prototype,"graphicsPipeline",void 0),e([n({readOnly:!0})],w.prototype,"dataUpdating",null),e([n()],w.prototype,"highlightOptions",void 0),e([n()],w.prototype,"suspended",void 0),e([n({readOnly:!0})],w.prototype,"legendEnabled",null),e([n({readOnly:!0})],w.prototype,"visibleAtCurrentScale",null),e([n()],w.prototype,"updating",void 0),e([n({readOnly:!0})],w.prototype,"updatePolicy",void 0),e([n({type:Boolean})],w.prototype,"slicePlaneEnabled",void 0),e([n({readOnly:!0})],w.prototype,"suspendInfo",void 0),e([n()],w.prototype,"symbologySnappingSupported",null),e([n({readOnly:!0})],w.prototype,"hasAllFeatures",null),e([n({readOnly:!0})],w.prototype,"hasAllFeaturesInView",null),e([n({readOnly:!0})],w.prototype,"hasFullGeometries",null),e([n({readOnly:!0})],w.prototype,"timeExtent",null),e([n()],w.prototype,"highlightIds",null),e([n()],w.prototype,"hasHighlight",null),w=e([o("esri.views.3d.layers.FeatureLikeLayerView3D")],w),w};export{v as FeatureLikeLayerView3D};
@@ -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/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{EsriPromise as i}from"../../../../core/Promise.js";import{initial as s,watch as o,sync as n,whenOnce as a}from"../../../../core/reactiveUtils.js";import{property as l}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{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{FeatureTileController3D as u}from"../../../../layers/graphics/controllers/FeatureTileController3D.js";import{symbolHasExtrudeSymbolLayer as d}from"../../../../symbols/support/utils.js";import{elevationAlignPointsInFeatures as c}from"./elevationAlignPointsInFeatures.js";import{Graphics3DFeatureProcessor as y}from"./Graphics3DFeatureProcessor.js";import{QueryEngine as g}from"./QueryEngine.js";import{QueryEngineContext as m}from"./QueryEngineContext.js";import{queryForSymbologySnapping as f}from"./queryForSymbologySnapping.js";import{HeatmapFeatureProcessor as w}from"../support/HeatmapFeatureProcessor.js";import{LayerViewPerformanceInfo as E}from"../support/LayerViewPerformanceInfo.js";import{hasLayerBasedScaleVisibility as b}from"../../../support/layerViewUtils.js";import{TaskPriority as F}from"../../../support/Scheduler.js";let _=class extends i{constructor(e){super(e),this._dataUpdatingState=0,this.graphicsQuery={queryForSymbologySnapping:async(e,t)=>this.symbologySnappingSupported?f(this.graphics3DProcessor,e,t):{candidates:[],sourceCandidateIndices:[]},executeQuery:(e,t)=>this.queryEngine.executeQuery(e,t),executeQueryForIds:(e,t)=>this.queryEngine.executeQueryForIds(e,t),executeQueryForCount:(e,t)=>this.queryEngine.executeQueryForCount(e,t),executeQueryForExtent:(e,t)=>this.queryEngine.executeQueryForExtent(e,t),executeQueryForLatestObservations:(e,t)=>this.queryEngine.executeQueryForLatestObservations(e,t)},this.controller=null,this.updatingHandles=new h,this._controllerCreated=!1,this._pendingController=null}initialize(){this.addResolvingPromise(this._initializeController()),this.updatingHandles.add(()=>this.layer.renderer,e=>this._recreateProcessor(e),s),this.updatingHandles.add(()=>this.updatePolicy,e=>this.processor.preferredUpdatePolicy=e);const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:o,resourceController:n}=t,a=new m(o,e,n,()=>this.processor.featureStore,i,r);this.queryEngine=new g({context:a,priority:F.FEATURE_QUERY_ENGINE})}destroy(){this.removeAllHandles(),this.updatingHandles.destroy(),this._destroyPendingController(),this.controller=r(this.controller),this.processor=r(this.processor),this.queryEngine=r(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this._pendingController=r(this._pendingController)}get updating(){return this.updatingHandles.updating||!this._controllerCreated||this.controller?.updating||this.processor?.updating}get legendEnabled(){return this.processor.legendEnabled}get layer(){return this.layerView.layer}get layerViewUid(){return this.layerView.uid}get view(){return this.layerView.view}get hasZ(){return this.layerView.hasZ}get hasM(){return this.layerView.hasM}get fullOpacity(){return this.layerView.fullOpacity}get suspended(){return this.layerView.suspended}get filter(){return"filter"in this.layerView?this.layerView.filter:null}get effectiveDisplayFilterClause(){return"effectiveDisplayFilterClause"in this.layerView?this.layerView.effectiveDisplayFilterClause:null}get slicePlaneEnabled(){return this.layerView.slicePlaneEnabled}get featureSpatialReference(){return"featureSpatialReference"in this.layerView?this.layerView.featureSpatialReference:null}get graphics3DProcessor(){return"graphics-3d"===this.processor?.type?this.processor:null}get heatmapProcessor(){return"heatmap"===this.processor?.type?this.processor:null}get hasAllFeatures(){return!(!this.controller||!("hasAllFeatures"in this.controller))&&this.controller.hasAllFeatures}get hasAllFeaturesInView(){return!(!this.controller||!("hasAllFeaturesInView"in this.controller))&&this.controller.hasAllFeaturesInView}get hasFullGeometries(){return!(!this.controller||!("hasFullGeometries"in this.controller))&&this.controller.hasFullGeometries}get symbologySnappingSupported(){return this.layer?.renderer?.symbols?.some(d)??!1}get updatePolicy(){return 1}get scaleVisibilitySuspended(){return this.processor?.scaleVisibilitySuspended}get timeExtent(){return"timeExtent"in this.layerView?this.layerView.timeExtent:null}get dataUpdating(){return 0!==this._dataUpdatingState}get suspendInfo(){return this.processor?.suspendInfo??{}}forEachGraphic(e){this.loadedGraphics.forEach(e)}findGraphic(e){return this.loadedGraphics.find(e)}queryObjectIds(e,t){return this.layerView.queryObjectIds(e,t)}whenGraphicBounds(e,t){return this.processor?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,r){const i=this.graphics3DProcessor;if(null==i)throw new t("featurelayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");return c(this.view,this.layer,e=>i.getGraphics3DGraphicByObjectId(e),e,r)}highlightByGraphics(e,t){return this.processor.highlightByGraphics(e,t)}highlightByObjectIds(e,t){return this.processor.highlightByObjectIds(e,this.layer.objectIdField,t)}maskOccludee(e){return this.processor.maskOccludee(e)}notifyContentGeometryUpdate(){this.layerView.emit("visible-geometry-changed")}async _initializeController(){const e=this.createController();this._pendingController=e,this._setupDataUpdating(e),await e.when(),this._setControllerWhenInitialized(e)}_setupDataUpdating(e){"dataUpdating"in e&&this.addHandles([o(()=>e.dataUpdating,e=>{e&&0===this._dataUpdatingState?this._dataUpdatingState=1:e||1!==this._dataUpdatingState||(this._dataUpdatingState=0)},n),o(()=>!!this.graphics3DProcessor?.dataUpdating,t=>{t&&1===this._dataUpdatingState?this._dataUpdatingState=2:t||2!==this._dataUpdatingState||(this._dataUpdatingState=e.dataUpdating?1:0)},n)])}async _setControllerWhenInitialized(e){try{await this.when()}catch(t){}this._controllerCreated=!0,this.isResolved()&&!this.destroyed?(await a(()=>this.view?.basemapTerrain?.ready),this.beforeSetController(e),this._pendingController=null,this.controller=e,this.loadedGraphics=e.graphics):this._destroyPendingController()}_recreateProcessor(e){const t="heatmap"===e?.type,r="heatmap"===this.processor?.type,i=this.processor;if(i&&t===r)return;const s=t?new w({owner:this}):new y({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!b(),filterVisibilityEnabled:!0,timeExtentEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this.processor=s,i?.destroy(),this.queryEngine?.clear(),this.addResolvingPromise(s.when())}_updateClippingExtent(e){if(this.clippingExtent=e,!this.controller)return!1;switch(this.controller.type){case"stream":return!1;case"feature-tile-3d":return this.controller.extent=e,!0}}get usedMemory(){return this.processor?.usedMemory??0}get performanceInfo(){const e=this.controller instanceof u?this.controller:null;return new E(this.usedMemory,this.loadedGraphics?.length,e?.serviceDataCount??-1,e?.maximumNumberOfFeatures??-1,0,this.processor.performanceInfo)}};e([l()],_.prototype,"updating",null),e([l()],_.prototype,"legendEnabled",null),e([l()],_.prototype,"layerView",void 0),e([l()],_.prototype,"layer",null),e([l()],_.prototype,"layerViewUid",null),e([l()],_.prototype,"view",null),e([l()],_.prototype,"hasZ",null),e([l()],_.prototype,"hasM",null),e([l()],_.prototype,"fullOpacity",null),e([l()],_.prototype,"suspended",null),e([l()],_.prototype,"filter",null),e([l()],_.prototype,"effectiveDisplayFilterClause",null),e([l()],_.prototype,"slicePlaneEnabled",null),e([l()],_.prototype,"featureSpatialReference",null),e([l()],_.prototype,"loadedGraphics",void 0),e([l()],_.prototype,"graphics3DProcessor",null),e([l()],_.prototype,"heatmapProcessor",null),e([l()],_.prototype,"hasAllFeatures",null),e([l()],_.prototype,"hasAllFeaturesInView",null),e([l()],_.prototype,"hasFullGeometries",null),e([l()],_.prototype,"symbologySnappingSupported",null),e([l()],_.prototype,"updatePolicy",null),e([l()],_.prototype,"scaleVisibilitySuspended",null),e([l()],_.prototype,"timeExtent",null),e([l()],_.prototype,"_dataUpdatingState",void 0),e([l({readOnly:!0})],_.prototype,"dataUpdating",null),e([l()],_.prototype,"controller",void 0),e([l()],_.prototype,"processor",void 0),e([l()],_.prototype,"updatingHandles",void 0),e([l()],_.prototype,"_controllerCreated",void 0),_=e([p("esri.views.3d.layers.graphics.Graphics3DGraphicsPipeline")],_);export{_ as Graphics3DGraphicsPipeline};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{EsriPromise as i}from"../../../../core/Promise.js";import{initial as s,watch as o,sync as n,whenOnce as l}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{FeatureTileController3D as u}from"../../../../layers/graphics/controllers/FeatureTileController3D.js";import{symbolHasExtrudeSymbolLayer as d}from"../../../../symbols/support/utils.js";import{elevationAlignPointsInFeatures as c}from"./elevationAlignPointsInFeatures.js";import{Graphics3DFeatureProcessor as y}from"./Graphics3DFeatureProcessor.js";import{QueryEngine as g}from"./QueryEngine.js";import{QueryEngineContext as m}from"./QueryEngineContext.js";import{queryForSymbologySnapping as f}from"./queryForSymbologySnapping.js";import{HeatmapFeatureProcessor as w}from"../support/HeatmapFeatureProcessor.js";import{LayerViewPerformanceInfo as E}from"../support/LayerViewPerformanceInfo.js";import{hasLayerBasedScaleVisibility as b}from"../../../support/layerViewUtils.js";import{TaskPriority as F}from"../../../support/Scheduler.js";let V=class extends i{constructor(e){super(e),this._dataUpdatingState=0,this.graphicsQuery={queryForSymbologySnapping:async(e,t)=>this.symbologySnappingSupported?f(this.graphics3DProcessor,e,t):{candidates:[],sourceCandidateIndices:[]},executeQuery:(e,t)=>this.queryEngine.executeQuery(e,t),executeQueryForIds:(e,t)=>this.queryEngine.executeQueryForIds(e,t),executeQueryForCount:(e,t)=>this.queryEngine.executeQueryForCount(e,t),executeQueryForExtent:(e,t)=>this.queryEngine.executeQueryForExtent(e,t),executeQueryForLatestObservations:(e,t)=>this.queryEngine.executeQueryForLatestObservations(e,t),executeAttributeBinsQuery:(e,t)=>this.queryEngine.executeAttributeBinsQuery(e,t)},this.controller=null,this.updatingHandles=new h,this._controllerCreated=!1,this._pendingController=null}initialize(){this.addResolvingPromise(this._initializeController()),this.updatingHandles.add(()=>this.layer.renderer,e=>this._recreateProcessor(e),s),this.updatingHandles.add(()=>this.updatePolicy,e=>this.processor.preferredUpdatePolicy=e);const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:o,resourceController:n}=t,l=new m(o,e,n,()=>this.processor.featureStore,i,r);this.queryEngine=new g({context:l,priority:F.FEATURE_QUERY_ENGINE})}destroy(){this.removeAllHandles(),this.updatingHandles.destroy(),this._destroyPendingController(),this.controller=r(this.controller),this.processor=r(this.processor),this.queryEngine=r(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this._pendingController=r(this._pendingController)}get updating(){return this.updatingHandles.updating||!this._controllerCreated||this.controller?.updating||this.processor?.updating}get legendEnabled(){return this.processor.legendEnabled}get layer(){return this.layerView.layer}get layerViewUid(){return this.layerView.uid}get view(){return this.layerView.view}get hasZ(){return this.layerView.hasZ}get hasM(){return this.layerView.hasM}get fullOpacity(){return this.layerView.fullOpacity}get suspended(){return this.layerView.suspended}get filter(){return"filter"in this.layerView?this.layerView.filter:null}get effectiveDisplayFilter(){return"effectiveDisplayFilter"in this.layerView?this.layerView.effectiveDisplayFilter:null}get highlightIds(){return"highlightIds"in this.layerView?this.layerView.highlightIds:null}get slicePlaneEnabled(){return this.layerView.slicePlaneEnabled}get featureSpatialReference(){return"featureSpatialReference"in this.layerView?this.layerView.featureSpatialReference:null}get graphics3DProcessor(){return"graphics-3d"===this.processor?.type?this.processor:null}get heatmapProcessor(){return"heatmap"===this.processor?.type?this.processor:null}get hasAllFeatures(){return!(!this.controller||!("hasAllFeatures"in this.controller))&&this.controller.hasAllFeatures}get hasAllFeaturesInView(){return!(!this.controller||!("hasAllFeaturesInView"in this.controller))&&this.controller.hasAllFeaturesInView}get hasFullGeometries(){return!(!this.controller||!("hasFullGeometries"in this.controller))&&this.controller.hasFullGeometries}get symbologySnappingSupported(){return this.layer?.renderer?.symbols?.some(d)??!1}get updatePolicy(){return 1}get scaleVisibilitySuspended(){return this.processor?.scaleVisibilitySuspended}get timeExtent(){return"timeExtent"in this.layerView?this.layerView.timeExtent:null}get dataUpdating(){return 0!==this._dataUpdatingState}get suspendInfo(){return this.processor?.suspendInfo??{}}forEachGraphic(e){this.loadedGraphics.forEach(e)}findGraphic(e){return this.loadedGraphics.find(e)}queryObjectIds(e,t){return this.layerView.queryObjectIds(e,t)}whenGraphicBounds(e,t){return this.processor?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,r){const i=this.graphics3DProcessor;if(null==i)throw new t("featurelayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");return c(this.view,this.layer,e=>i.getGraphics3DGraphicByObjectId(e),e,r)}highlightByGraphics(e,t){return this.processor.highlightByGraphics(e,t)}highlightByObjectIds(e,t){return this.processor.highlightByObjectIds(e,this.layer.objectIdField,t)}maskOccludee(e){return this.processor.maskOccludee(e)}notifyContentGeometryUpdate(){this.layerView.emit("visible-geometry-changed")}async _initializeController(){const e=this.createController();this._pendingController=e,this._setupDataUpdating(e),await e.when(),this._setControllerWhenInitialized(e)}_setupDataUpdating(e){"dataUpdating"in e&&this.addHandles([o(()=>e.dataUpdating,e=>{e&&0===this._dataUpdatingState?this._dataUpdatingState=1:e||1!==this._dataUpdatingState||(this._dataUpdatingState=0)},n),o(()=>!!this.graphics3DProcessor?.dataUpdating,t=>{t&&1===this._dataUpdatingState?this._dataUpdatingState=2:t||2!==this._dataUpdatingState||(this._dataUpdatingState=e.dataUpdating?1:0)},n)])}async _setControllerWhenInitialized(e){try{await this.when()}catch(t){}this._controllerCreated=!0,this.isResolved()&&!this.destroyed?(await l(()=>this.view?.basemapTerrain?.ready),this.beforeSetController(e),this._pendingController=null,this.controller=e,this.loadedGraphics=e.graphics):this._destroyPendingController()}_recreateProcessor(e){const t="heatmap"===e?.type,r="heatmap"===this.processor?.type,i=this.processor;if(i&&t===r)return;const s=t?new w({owner:this}):new y({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!b(),filterVisibilityEnabled:!0,timeExtentEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this.processor=s,i?.destroy(),this.queryEngine?.clear(),this.addResolvingPromise(s.when())}_updateClippingExtent(e){if(this.clippingExtent=e,!this.controller)return!1;switch(this.controller.type){case"stream":return!1;case"feature-tile-3d":return this.controller.extent=e,!0}}get usedMemory(){return this.processor?.usedMemory??0}get performanceInfo(){const e=this.controller instanceof u?this.controller:null;return new E(this.usedMemory,this.loadedGraphics?.length,e?.serviceDataCount??-1,e?.maximumNumberOfFeatures??-1,0,this.processor.performanceInfo)}};e([a()],V.prototype,"updating",null),e([a()],V.prototype,"legendEnabled",null),e([a()],V.prototype,"layerView",void 0),e([a()],V.prototype,"layer",null),e([a()],V.prototype,"layerViewUid",null),e([a()],V.prototype,"view",null),e([a()],V.prototype,"hasZ",null),e([a()],V.prototype,"hasM",null),e([a()],V.prototype,"fullOpacity",null),e([a()],V.prototype,"suspended",null),e([a()],V.prototype,"filter",null),e([a()],V.prototype,"effectiveDisplayFilter",null),e([a()],V.prototype,"highlightIds",null),e([a()],V.prototype,"slicePlaneEnabled",null),e([a()],V.prototype,"featureSpatialReference",null),e([a()],V.prototype,"loadedGraphics",void 0),e([a()],V.prototype,"graphics3DProcessor",null),e([a()],V.prototype,"heatmapProcessor",null),e([a()],V.prototype,"hasAllFeatures",null),e([a()],V.prototype,"hasAllFeaturesInView",null),e([a()],V.prototype,"hasFullGeometries",null),e([a()],V.prototype,"symbologySnappingSupported",null),e([a()],V.prototype,"updatePolicy",null),e([a()],V.prototype,"scaleVisibilitySuspended",null),e([a()],V.prototype,"timeExtent",null),e([a()],V.prototype,"_dataUpdatingState",void 0),e([a({readOnly:!0})],V.prototype,"dataUpdating",null),e([a()],V.prototype,"controller",void 0),e([a()],V.prototype,"processor",void 0),e([a()],V.prototype,"updatingHandles",void 0),e([a()],V.prototype,"_controllerCreated",void 0),V=e([p("esri.views.3d.layers.graphics.Graphics3DGraphicsPipeline")],V);export{V as Graphics3DGraphicsPipeline};
@@ -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{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import s from"../../../../geometry/Extent.js";import{featureGeometryTypeKebabDictionary as a}from"../../../../geometry/support/typeUtils.js";import{QueryEngine as i}from"../../../../layers/graphics/data/QueryEngine.js";import o from"../../../../layers/support/FieldsIndex.js";import u from"../../../../rest/support/FeatureSet.js";import y from"../../../../rest/support/Query.js";import{createFeatureIdInfo as c}from"../../../2d/layers/features/layerAdapters/featureServiceUtils.js";import{QueryEngineCache as l}from"./QueryEngineCache.js";const p=i;let h=class extends r{constructor(e){super(e),this._dataQueryEngineInstance=null}destroy(){this.clear()}get layer(){return this.context.layer}get spatialReference(){return this.context.spatialReference}get _queryGeometryType(){switch(this.layer.geometryType){case"multipoint":case"point":case"polygon":case"polyline":return this.layer.geometryType;case"mesh":return"polygon";default:return}}get defaultQueryJSON(){return new y({outSpatialReference:this.spatialReference}).toJSON()}clear(){return!!this._dataQueryEngineInstance&&(this._dataQueryEngineInstance.destroy(),this._dataQueryEngineInstance=null,!0)}async executeQueryForIdSet(e,r,t){return this._dataQueryEngine.executeQueryForIdSet(this._ensureQueryJSON(e,r),t)}async executeQueryForCount(e,r){return this._dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),r)}async executeQueryForExtent(e,r){const{count:t,extent:n}=await this._dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),r);return{count:t,extent:s.fromJSON(n)}}async executeQueryForIds(e,r){return this._dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),r)}async executeQueryForLatestObservations(e,r){const t=await this._dataQueryEngine.executeQueryForLatestObservations(this._ensureQueryJSON(e),r),n=u.fromJSON(t);return n.features.forEach(e=>{e.layer=this.layer,e.sourceLayer=this.layer,"graphicOrigin"in this.layer&&(e.origin=this.layer.graphicOrigin)}),n}async executeQuery(e,r){const t=await this._dataQueryEngine.executeQuery(this._ensureQueryJSON(e),r),n=u.fromJSON(t);return n.features.forEach(e=>{e.layer=this.layer,e.sourceLayer=this.layer,"graphicOrigin"in this.layer&&(e.origin=this.layer.graphicOrigin)}),n}_ensureQueryJSON(e,r){let t=this.defaultQueryJSON;if(null!=e&&("outSpatialReference"in e&&!e.outSpatialReference&&(e.outSpatialReference=this.spatialReference),t=e.toJSON(),t.cacheHint=!0),null!=r){const e=r.geometries.map(e=>e.toJSON()).reduce((e,r)=>(e.rings=e.rings.concat(r.rings),e));t={...t,cacheHint:!0,sceneFilter:{...r,geometry:e}}}return t}get _dataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const{priority:e,layer:r}=this,t="timeInfo"in r&&r.timeInfo?.toJSON()||null,n=c(r),s=a.toJSON(this._queryGeometryType),i=r.fieldsIndex?.toJSON()||new o([]),u=this.spatialReference.toJSON(),{hasZ:y,hasM:h,featureStore:g,scheduler:m,memoryController:f}=this.context,d=new l(f);return this._dataQueryEngineInstance=new p({hasZ:y,hasM:h,geometryType:s,fieldsIndex:i,timeInfo:t,spatialReference:u,featureIdInfo:n,featureStore:g,scheduler:m,cache:d,priority:e}),this._dataQueryEngineInstance}};e([t({constructOnly:!0})],h.prototype,"context",void 0),e([t({constructOnly:!0})],h.prototype,"priority",void 0),e([t()],h.prototype,"layer",null),e([t()],h.prototype,"spatialReference",null),e([t()],h.prototype,"_queryGeometryType",null),e([t()],h.prototype,"defaultQueryJSON",null),h=e([n("esri.views.3d.layers.graphics.QueryEngine")],h);export{h as QueryEngine};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.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 n}from"../../../../core/accessorSupport/decorators/subclass.js";import s from"../../../../geometry/Extent.js";import{featureGeometryTypeKebabDictionary as i}from"../../../../geometry/support/typeUtils.js";import{QueryEngine as a}from"../../../../layers/graphics/data/QueryEngine.js";import o from"../../../../layers/support/FieldsIndex.js";import u from"../../../../rest/support/AttributeBinsFeatureSet.js";import y from"../../../../rest/support/FeatureSet.js";import c from"../../../../rest/support/Query.js";import{createFeatureIdInfo as p}from"../../../2d/layers/features/layerAdapters/featureServiceUtils.js";import{QueryEngineCache as l}from"./QueryEngineCache.js";const h=a;let m=class extends t{constructor(e){super(e),this._dataQueryEngineInstance=null}destroy(){this.clear()}get layer(){return this.context.layer}get spatialReference(){return this.context.spatialReference}get _queryGeometryType(){switch(this.layer.geometryType){case"multipoint":case"point":case"polygon":case"polyline":return this.layer.geometryType;case"mesh":return"polygon";default:return}}get defaultQueryJSON(){return new c({outSpatialReference:this.spatialReference}).toJSON()}clear(){return!!this._dataQueryEngineInstance&&(this._dataQueryEngineInstance.destroy(),this._dataQueryEngineInstance=null,!0)}async executeQueryForIdSet(e,t,r){return this._dataQueryEngine.executeQueryForIdSet(this._ensureQueryJSON(e,t),r)}async executeQueryForCount(e,t){return this._dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),t)}async executeQueryForExtent(e,t){const{count:r,extent:n}=await this._dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),t);return{count:r,extent:s.fromJSON(n)}}async executeQueryForIds(e,t){return this._dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),t)}async executeQueryForLatestObservations(e,t){const r=await this._dataQueryEngine.executeQueryForLatestObservations(this._ensureQueryJSON(e),t),n=y.fromJSON(r);return n.features.forEach(e=>{e.layer=this.layer,e.sourceLayer=this.layer,"graphicOrigin"in this.layer&&(e.origin=this.layer.graphicOrigin)}),n}async executeAttributeBinsQuery(e,t){const r=await this._dataQueryEngine.executeAttributeBinsQuery(e.toJSON(),t);return u.fromJSON(r)}async executeQuery(e,t){const r=await this._dataQueryEngine.executeQuery(this._ensureQueryJSON(e),t),n=y.fromJSON(r);return n.features.forEach(e=>{e.layer=this.layer,e.sourceLayer=this.layer,"graphicOrigin"in this.layer&&(e.origin=this.layer.graphicOrigin)}),n}_ensureQueryJSON(e,t){let r=this.defaultQueryJSON;if(null!=e&&("outSpatialReference"in e&&!e.outSpatialReference&&(e.outSpatialReference=this.spatialReference),r=e.toJSON(),r.cacheHint=!0),null!=t){const e=t.geometries.map(e=>e.toJSON()).reduce((e,t)=>(e.rings=e.rings.concat(t.rings),e));r={...r,cacheHint:!0,sceneFilter:{...t,geometry:e}}}return r}get _dataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const{priority:e,layer:t}=this,r="timeInfo"in t&&t.timeInfo?.toJSON()||null,n=p(t),s=i.toJSON(this._queryGeometryType),a=t.fieldsIndex?.toJSON()||new o([]),u=this.spatialReference.toJSON(),{hasZ:y,hasM:c,featureStore:m,scheduler:g,memoryController:f}=this.context,d=new l(f);return this._dataQueryEngineInstance=new h({hasZ:y,hasM:c,geometryType:s,fieldsIndex:a,timeInfo:r,spatialReference:u,featureIdInfo:n,featureStore:m,scheduler:g,cache:d,priority:e}),this._dataQueryEngineInstance}};e([r({constructOnly:!0})],m.prototype,"context",void 0),e([r({constructOnly:!0})],m.prototype,"priority",void 0),e([r()],m.prototype,"layer",null),e([r()],m.prototype,"spatialReference",null),e([r()],m.prototype,"_queryGeometryType",null),e([r()],m.prototype,"defaultQueryJSON",null),m=e([n("esri.views.3d.layers.graphics.QueryEngine")],m);export{m as QueryEngine};
@@ -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/Error.js";import{makeHandle as t}from"../../../../../core/handleUtils.js";import{destroyMaybe as n}from"../../../../../core/maybe.js";import{EsriPromise as o}from"../../../../../core/Promise.js";import{on as i,watch as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as u}from"../../../../../core/accessorSupport/decorators/subclass.js";import{FeatureLayerViewPerformanceInfo as l}from"../../FeatureLayerViewPerformanceInfo.js";import{Feature3DPipelineWorkerHandle as d}from"./Feature3DPipelineWorkerHandle.js";import{FeaturePipelineRenderManager as p}from"./rendering/FeaturePipelineRenderManager.js";import{emptyHighlightHandle as y}from"../../support/highlightUtils.js";import{LayerViewPerformanceInfo as m}from"../../support/LayerViewPerformanceInfo.js";let c=class extends o{constructor(e){super(e),this._renderer=null,this.graphicsQuery={queryForSymbologySnapping:(e,t)=>{throw new r("featurelayer:unsupported-symbology-snapping","Symbology snapping not supported")},executeQuery:async(e,r)=>await this._workerHandle.executeQuery(e,r),executeQueryForIds:async(e,r)=>await this._workerHandle.executeQueryForIds(e,r),executeQueryForCount:async(e,r)=>await this._workerHandle.executeQueryForCount(e,r),executeQueryForExtent:async(e,r)=>await this._workerHandle.executeQueryForExtent(e,r),executeQueryForLatestObservations:async(e,r)=>await this._workerHandle.executeQueryForLatestObservations(e,r)},this.maximumNumberOfFeatures=1e3}initialize(){if("point"!==this.layerView.layer.geometryType)throw new r("featurelayer:unsupported-geometry-type",`${this.layerView.layer.geometryType} is not supported`);this.addResolvingPromise(this.setup())}destroy(){this.removeAllHandles(),this._workerHandle.destroy(),n(this._renderer)}async setup(){const e=this.layerView,{layer:t,view:n,uid:o}=e,{spatialReference:s,renderSpatialReference:u,resourceController:l,renderCoordsHelper:y,elevationProvider:m}=n,c=n.state.viewingMode;if(this._renderer=new p({view:n,layerViewUid:o}),"feature"!==t.type)throw new r("featurelayer:unsupported-layertype","Only FeatureLayer is supported");const h=new d({schedule:e=>l.immediate.schedule(e),layer:t,layerView:e,viewSpatialReference:s,renderSpatialReference:u,viewingMode:c,renderer:this._renderer,elevationProvider:m,renderCoordsHelper:y});this._workerHandle=await h.when(),this.addHandles([this.layerView.view.enableFeatureTiles(),i(()=>this.layerView.view.featureTiles?.tiles,"change",e=>{this._workerHandle.onTileTreeChange(e.target)},{onListenerAdd:e=>this._workerHandle.onTileTreeChange(e),onListenerRemove:e=>this._workerHandle.onTileTreeChange(e)}),n.elevationProvider.on("elevation-change",e=>this._workerHandle.onElevationChange(e)),a(()=>this.layerView.fullOpacity,e=>this._workerHandle.onLayerViewOpacityChange(e),{sync:!1}),a(()=>t.renderer,e=>this._workerHandle.onRendererChange(e),{sync:!1})])}get legendEnabled(){return!1}get hasAllFeatures(){return!1}get hasAllFeaturesInView(){return!1}get hasFullGeometries(){return!1}get symbologySnappingSupported(){return!1}get scaleVisibilitySuspended(){return!1}get suspendInfo(){return{}}get updating(){return this._workerHandle.updating}get dataUpdating(){return!1}get updatePolicy(){return 0}get maximumNumberOfFeaturesExceeded(){return!1}get updatingProgressValue(){return 1}get usedMemory(){return this._renderer?.usedMemory??0}get unloadedMemory(){return 0}get ignoresMemoryFactor(){return!0}get totalFeatures(){return this._renderer?.totalFeatures??0}get performanceInfo(){const e=this.totalFeatures;return new l(new m(this.usedMemory,e,e,this.maximumNumberOfFeatures,0,null),e,e,this.maximumNumberOfFeaturesExceeded,"tiles","n/a")}get suspendResumeExtentMode(){return"computed"}forEachGraphic(e){}findGraphic(e){return null}highlightByObjectIds(e,r){return y}highlightByGraphics(e,r){return y}maskOccludee(e){return t()}async whenGraphicBounds(e,r){return null}computeAttachmentOrigin(e,r){return null}elevationAlignPointsInFeatures(e,t){throw new r("featurelayer:unsupported-elevation-alignment","Elevation alignment not supported")}async doRefresh(e){}setVisibility(e,r){}getMissingAttributesForFeature(e){return null}getHydratedGeometry(e){return null}};e([s()],c.prototype,"layerView",void 0),e([s()],c.prototype,"updating",null),e([s()],c.prototype,"totalFeatures",null),c=e([u("esri.views.3d.layers.graphics.pipeline.Feature3DPipeline")],c);export{c as Feature3DPipeline};
5
+ import{__decorate as e}from"tslib";import r from"../../../../../core/Error.js";import{makeHandle as t}from"../../../../../core/handleUtils.js";import{destroyMaybe as n}from"../../../../../core/maybe.js";import{EsriPromise as i}from"../../../../../core/Promise.js";import{on as o,watch as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as u}from"../../../../../core/accessorSupport/decorators/subclass.js";import{FeatureLayerViewPerformanceInfo as l}from"../../FeatureLayerViewPerformanceInfo.js";import{Feature3DPipelineWorkerHandle as d}from"./Feature3DPipelineWorkerHandle.js";import{FeaturePipelineRenderManager as p}from"./rendering/FeaturePipelineRenderManager.js";import{emptyHighlightHandle as y}from"../../support/highlightUtils.js";import{LayerViewPerformanceInfo as c}from"../../support/LayerViewPerformanceInfo.js";let m=class extends i{constructor(e){super(e),this._renderer=null,this.graphicsQuery={queryForSymbologySnapping:(e,t)=>{throw new r("featurelayer:unsupported-symbology-snapping","Symbology snapping not supported")},executeQuery:async(e,r)=>await this._workerHandle.executeQuery(e,r),executeQueryForIds:async(e,r)=>await this._workerHandle.executeQueryForIds(e,r),executeQueryForCount:async(e,r)=>await this._workerHandle.executeQueryForCount(e,r),executeQueryForExtent:async(e,r)=>await this._workerHandle.executeQueryForExtent(e,r),executeQueryForLatestObservations:async(e,r)=>await this._workerHandle.executeQueryForLatestObservations(e,r),executeAttributeBinsQuery:async(e,r)=>this._workerHandle.executeAttributeBinsQuery(e,r)},this.maximumNumberOfFeatures=1e3}initialize(){if("point"!==this.layerView.layer.geometryType)throw new r("featurelayer:unsupported-geometry-type",`${this.layerView.layer.geometryType} is not supported`);this.addResolvingPromise(this.setup())}destroy(){this.removeAllHandles(),this._workerHandle.destroy(),n(this._renderer)}async setup(){const e=this.layerView,{layer:t,view:n,uid:i}=e,{spatialReference:s,renderSpatialReference:u,resourceController:l,renderCoordsHelper:y,elevationProvider:c}=n,m=n.state.viewingMode;if(this._renderer=new p({view:n,layerViewUid:i}),"feature"!==t.type)throw new r("featurelayer:unsupported-layertype","Only FeatureLayer is supported");const h=new d({schedule:e=>l.immediate.schedule(e),layer:t,layerView:e,viewSpatialReference:s,renderSpatialReference:u,viewingMode:m,renderer:this._renderer,elevationProvider:c,renderCoordsHelper:y});this._workerHandle=await h.when(),this.addHandles([this.layerView.view.enableFeatureTiles(),o(()=>this.layerView.view.featureTiles?.tiles,"change",e=>{this._workerHandle.onTileTreeChange(e.target)},{onListenerAdd:e=>this._workerHandle.onTileTreeChange(e),onListenerRemove:e=>this._workerHandle.onTileTreeChange(e)}),n.elevationProvider.on("elevation-change",e=>this._workerHandle.onElevationChange(e)),a(()=>this.layerView.fullOpacity,e=>this._workerHandle.onLayerViewOpacityChange(e),{sync:!1}),a(()=>t.renderer,e=>this._workerHandle.onRendererChange(e),{sync:!1})])}get legendEnabled(){return!1}get hasAllFeatures(){return!1}get hasAllFeaturesInView(){return!1}get hasFullGeometries(){return!1}get symbologySnappingSupported(){return!1}get scaleVisibilitySuspended(){return!1}get suspendInfo(){return{}}get updating(){return this._workerHandle.updating}get dataUpdating(){return!1}get updatePolicy(){return 0}get maximumNumberOfFeaturesExceeded(){return!1}get updatingProgressValue(){return 1}get usedMemory(){return this._renderer?.usedMemory??0}get unloadedMemory(){return 0}get ignoresMemoryFactor(){return!0}get totalFeatures(){return this._renderer?.totalFeatures??0}get performanceInfo(){const e=this.totalFeatures;return new l(new c(this.usedMemory,e,e,this.maximumNumberOfFeatures,0,null),e,e,this.maximumNumberOfFeaturesExceeded,"tiles","n/a")}get suspendResumeExtentMode(){return"computed"}forEachGraphic(e){}findGraphic(e){return null}highlightByObjectIds(e,r){return y}highlightByGraphics(e,r){return y}maskOccludee(e){return t()}async whenGraphicBounds(e,r){return null}computeAttachmentOrigin(e,r){return null}elevationAlignPointsInFeatures(e,t){throw new r("featurelayer:unsupported-elevation-alignment","Elevation alignment not supported")}async doRefresh(e){}setVisibility(e,r){}getMissingAttributesForFeature(e){return null}getHydratedGeometry(e){return null}};e([s()],m.prototype,"layerView",void 0),e([s()],m.prototype,"updating",null),e([s()],m.prototype,"totalFeatures",null),m=e([u("esri.views.3d.layers.graphics.pipeline.Feature3DPipeline")],m);export{m as Feature3DPipeline};
@@ -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{__addDisposableResource as e,__disposeResources as t,__decorate as r}from"tslib";import{EventedAccessor as a}from"../../../../../core/Evented.js";import{throwIfAborted as n}from"../../../../../core/promiseUtils.js";import{watch as i,initial as o}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../../geometry/Extent.js";import{initializeProjection as d,project as m}from"../../../../../geometry/projectionUtils.js";import u from"../../../../../geometry/SpatialReference.js";import{QueryEngine as h}from"../../../../../layers/graphics/data/QueryEngine.js";import y from"../../../../../rest/support/Query.js";import{FeatureProcessingContext as p}from"./FeatureProcessingContext.js";import{PipelineCommand as f}from"./PipelineCommand.js";import{Tile3DManager as _}from"./Tile3DManager.js";import{TileLocks as C}from"./TileLocks.js";import{TiledFeatureStore as w}from"./featureSet/TiledFeatureStore.js";import{Tile3DFetcher as g}from"./fetching/Tile3DFetcher.js";import{RenderCommandContext as x}from"./rendering/RenderCommandContext.js";import{RenderCoordsHelper as v}from"../../../support/RenderCoordsHelper.js";let R=class extends a{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new w,this._tileLocks=new C,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,layerInfo:a,layerViewInfo:n}){const s=u.fromJSON(e);this._viewSpatialReference=s;const l=u.fromJSON(t);this._fetcher=new g(this._viewSpatialReference,y.fromJSON(a.baseQuery),a.url,a.objectIdField,a.capabilities),this._queryEngine=new h({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:a.objectIdField},fieldsIndex:a.fieldIndex,availableFields:[a.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:a.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const a={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",a,{transferList:r})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};const f=v.create(r,l),C=new x(r,this._mainThreadDelegate);this._renderCommandContext=C;const w=new p(s,l,this._mainThreadDelegate,f,C,a,n);this._context=w,this._renderer=w.symbolRendererFactory.createSymbolRendererFromJSON(a.renderer),this._defaultQueryJSON=new y({outSpatialReference:s}).toJSON();let R=null;if(null!=a.fullExtent){const e=c.fromJSON(a.fullExtent);await d(e.spatialReference,s),R=m(e,s)}return this._tileManager=new _({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:R}),this.addHandles(i(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o),null!=this._renderer&&await this._renderer.load(),j}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(j)}async onElevationChange(e){return j}async onLayerViewOpacityChange(e){const{_context:t,_renderer:r}=this;if(t.layerViewInfo.fullOpacity=e,null==r)return j;const a=await r.createUpdateLayerViewOpacityCommand(e);return await a.execute(),j}async onRendererChange(r){const{_context:a}=this,n=a.symbolRendererFactory.createSymbolRendererFromJSON(r);await n.load();const i=this._renderer;this._renderer=n;const o=[...this._tileManager.loadedTiles()],s=o.map(e=>e.tileId);{const r={stack:[],error:void 0,hasError:!1};try{e(r,await this._tileLocks.lock(s),!1);const t=o.flatMap(e=>[i.createRemoveCommand(e.id),n.createAddCommand(e)]),l=await Promise.all(t),c=a.joinPipelineCommands(l);await c.execute()}catch(c){r.error=c,r.hasError=!0}finally{t(r)}}const l=await i.createDestroyCommand();return await l.execute(),j}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,a=this._renderer;let i;return i=null!=a?await a.createAddCommand(e):f.create(this._renderCommandContext),n(t),i.appendPipelineStateCommand(()=>{r.addTile(e)}),i}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer;let a;return a=null!=r?await r.createRemoveCommand(e):f.create(this._renderCommandContext),a.appendPipelineStateCommand(()=>{t.removeTile(e)}),a}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer;let a;return a=null!=r?await r.createUpdateVisibilityCommand(e):f.create(this._renderCommandContext),n(t),a}_ensureQuery(e){return e??this._defaultQueryJSON}};r([s()],R.prototype,"updating",null),R=r([l("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],R);const S=R,j={result:void 0};export{S as default};
5
+ import{__addDisposableResource as e,__disposeResources as t,__decorate as r}from"tslib";import{EventedAccessor as a}from"../../../../../core/Evented.js";import{throwIfAborted as n}from"../../../../../core/promiseUtils.js";import{watch as i,initial as o}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../../geometry/Extent.js";import{initializeProjection as d,project as m}from"../../../../../geometry/projectionUtils.js";import u from"../../../../../geometry/SpatialReference.js";import{QueryEngine as h}from"../../../../../layers/graphics/data/QueryEngine.js";import y from"../../../../../rest/support/Query.js";import{FeatureProcessingContext as p}from"./FeatureProcessingContext.js";import{PipelineCommand as f}from"./PipelineCommand.js";import{Tile3DManager as _}from"./Tile3DManager.js";import{TileLocks as C}from"./TileLocks.js";import{TiledFeatureStore as w}from"./featureSet/TiledFeatureStore.js";import{Tile3DFetcher as g}from"./fetching/Tile3DFetcher.js";import{RenderCommandContext as x}from"./rendering/RenderCommandContext.js";import{RenderCoordsHelper as v}from"../../../support/RenderCoordsHelper.js";let R=class extends a{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new w,this._tileLocks=new C,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,layerInfo:a,layerViewInfo:n}){const s=u.fromJSON(e);this._viewSpatialReference=s;const l=u.fromJSON(t);this._fetcher=new g(this._viewSpatialReference,y.fromJSON(a.baseQuery),a.url,a.objectIdField,a.capabilities),this._queryEngine=new h({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:a.objectIdField},fieldsIndex:a.fieldIndex,availableFields:[a.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:a.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const a={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",a,{transferList:r})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})}};const f=v.create(r,l),C=new x(r,this._mainThreadDelegate);this._renderCommandContext=C;const w=new p(s,l,this._mainThreadDelegate,f,C,a,n);this._context=w,this._renderer=w.symbolRendererFactory.createSymbolRendererFromJSON(a.renderer),this._defaultQueryJSON=new y({outSpatialReference:s}).toJSON();let R=null;if(null!=a.fullExtent){const e=c.fromJSON(a.fullExtent);await d(e.spatialReference,s),R=m(e,s)}return this._tileManager=new _({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:R}),this.addHandles(i(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o),null!=this._renderer&&await this._renderer.load(),j}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async executeAttributeBinsQuery(e,t){return{result:await this._queryEngine.executeAttributeBinsQuery(e,t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(j)}async onElevationChange(e){return j}async onLayerViewOpacityChange(e){const{_context:t,_renderer:r}=this;if(t.layerViewInfo.fullOpacity=e,null==r)return j;const a=await r.createUpdateLayerViewOpacityCommand(e);return await a.execute(),j}async onRendererChange(r){const{_context:a}=this,n=a.symbolRendererFactory.createSymbolRendererFromJSON(r);await n.load();const i=this._renderer;this._renderer=n;const o=[...this._tileManager.loadedTiles()],s=o.map(e=>e.tileId);{const r={stack:[],error:void 0,hasError:!1};try{e(r,await this._tileLocks.lock(s),!1);const t=o.flatMap(e=>[i.createRemoveCommand(e.id),n.createAddCommand(e)]),l=await Promise.all(t),c=a.joinPipelineCommands(l);await c.execute()}catch(c){r.error=c,r.hasError=!0}finally{t(r)}}const l=await i.createDestroyCommand();return await l.execute(),j}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,a=this._renderer;let i;return i=null!=a?await a.createAddCommand(e):f.create(this._renderCommandContext),n(t),i.appendPipelineStateCommand(()=>{r.addTile(e)}),i}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer;let a;return a=null!=r?await r.createRemoveCommand(e):f.create(this._renderCommandContext),a.appendPipelineStateCommand(()=>{t.removeTile(e)}),a}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer;let a;return a=null!=r?await r.createUpdateVisibilityCommand(e):f.create(this._renderCommandContext),n(t),a}_ensureQuery(e){return e??this._defaultQueryJSON}};r([s()],R.prototype,"updating",null),R=r([l("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],R);const S=R,j={result:void 0};export{S 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 r from"../../../../../core/Error.js";import{EsriPromise as t}from"../../../../../core/Promise.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{WorkerHandle as n}from"../../../../../core/workers/WorkerHandle.js";import a from"../../../../../geometry/Extent.js";import{clone as s}from"../../../../../geometry/support/aaBoundingRect.js";import{isFeatureGraphicOrigin as d}from"../../../../../graphic/isFeatureGraphicOrigin.js";import c from"../../../../../rest/support/FeatureSet.js";import{ElevationContext as l}from"../ElevationContext.js";import{applyElevationAlignment as p}from"./utils.js";let u=class extends t{constructor(e){super(e),this.schedule=null,this._workerUpdating=!0}get updating(){return this._workerUpdating}get _graphicOrigin(){const e=this.layer.graphicOrigin;if(!d(e))throw new r("featurelayerview3d:invalid-graphic-origin","Layer's graphic origin is not a FeatureGraphicOrigin");return e}initialize(){const{layer:e,layerView:r,viewSpatialReference:t,renderSpatialReference:o}=this,i=e.elevationInfo;this._elevationContext=l.fromElevationInfo(i),this._workerHandle=new y(this.schedule,{createTexture:async({data:e,parameters:r})=>({result:await this.renderer.createTexture(e,r),transferList:[]}),releaseTexture:async({uid:e})=>(await this.renderer.releaseTexture(e),m),createMaterial:async({materialJSON:e})=>(await this.renderer.createMaterial(e),m),destroyMaterial:async({materialId:e})=>(await this.renderer.destroyMaterial(e),m),createDirectRenderer:async({materialId:e})=>(await this.renderer.createDirectRenderer(e),m),destroyDirectRenderer:async({materialId:e})=>(await this.renderer.destroyDirectRenderer(e),m),createLoDRenderer:async({rendererId:e,lodRenderGeometry:r},t)=>(await this.renderer.createLoDRenderer(e,r,t?.signal??void 0),m),destroyLoDRenderer:async({rendererId:e},r)=>(await this.renderer.destroyLoDRenderer(e,r?.signal??void 0),m),dispatchRenderCommands:async({commands:e})=>(await this.renderer.executeRenderCommands(e),m),applyElevationAlignment:async({mapPoints:e})=>{const{viewSpatialReference:r,elevationProvider:t,renderCoordsHelper:o}=this,i=p(e,r,this._elevationContext,t,o);return{result:i,transferList:[i.buffer]}}}),this.addResolvingPromise((async()=>{await e.load();const n={url:e.parsedUrl?.path??"",baseQuery:e.createQuery().toJSON(),objectIdField:e.objectIdField,capabilities:e.capabilities,fieldIndex:e.fieldsIndex.toJSON(),timeInfo:e.timeInfo?.toJSON(),elevationInfo:i?.toJSON(),fullExtent:e.fullExtent?.toJSON(),renderer:e.renderer?.toJSON()},a={fullOpacity:r.fullOpacity};await this._workerHandle.invokeMethod("setup",{viewSpatialReference:t.toJSON(),renderSpatialReference:o.toJSON(),viewingMode:this.viewingMode,layerInfo:n,layerViewInfo:a})})()),this.addHandles(this._workerHandle.on("notify-updating",({updating:e})=>{this._workerUpdating=e}))}onTileTreeChange(e){this._workerHandle.invokeMethod("onTileTreeChange",{tiles:e.items.map(h)})}onElevationChange(e){this._workerHandle.invokeMethod("onElevationChange",{context:e.context,spatialReference:e.spatialReference?.toJSON(),extent:s(e.extent)})}onLayerViewOpacityChange(e){this._workerHandle.invokeMethod("onLayerViewOpacityChange",e)}onRendererChange(e){const r=e?.toJSON();this._workerHandle.invokeMethod("onRendererChange",r)}async executeQuery(e,r){const t=await this._workerHandle.invokeMethod("executeQuery",e?.toJSON(),r),o=c.fromJSON(t);return this._ensureLayerOnFeatures(o),o}async executeQueryForIds(e,r){return await this._workerHandle.invokeMethod("executeQueryForIds",e?.toJSON(),r)}async executeQueryForCount(e,r){return await this._workerHandle.invokeMethod("executeQueryForCount",e?.toJSON(),r)}async executeQueryForExtent(e,r){const{count:t,extent:o}=await this._workerHandle.invokeMethod("executeQueryForExtent",e?.toJSON(),r);return{count:t,extent:a.fromJSON(o)}}async executeQueryForLatestObservations(e,r){const t=await this._workerHandle.invokeMethod("executeQueryForLatestObservations",e?.toJSON(),r),o=c.fromJSON(t);return this._ensureLayerOnFeatures(o),o}_ensureLayerOnFeatures(e){const{layer:r,_graphicOrigin:t}=this;for(const o of e.features)o.layer=r,o.sourceLayer=r,o.origin=t}};e([o()],u.prototype,"updating",null),e([o({constructOnly:!0})],u.prototype,"schedule",void 0),e([o({constructOnly:!0})],u.prototype,"layer",void 0),e([o({constructOnly:!0})],u.prototype,"layerView",void 0),e([o({constructOnly:!0})],u.prototype,"viewSpatialReference",void 0),e([o({constructOnly:!0})],u.prototype,"renderSpatialReference",void 0),e([o({constructOnly:!0})],u.prototype,"viewingMode",void 0),e([o({constructOnly:!0})],u.prototype,"renderer",void 0),e([o({constructOnly:!0})],u.prototype,"elevationProvider",void 0),e([o({constructOnly:!0})],u.prototype,"renderCoordsHelper",void 0),e([o()],u.prototype,"_workerUpdating",void 0),e([o()],u.prototype,"_graphicOrigin",null),u=e([i("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorkerHandle")],u);class y extends n{constructor(e,r){super("Feature3DPipelineWorker","setup",{},e,{strategy:"dedicated",client:r})}}function h({id:e,lij:r,extent:t}){return{id:e,lij:r,extent:t}}const m={result:void 0};export{u as Feature3DPipelineWorkerHandle};
5
+ import{__decorate as e}from"tslib";import r from"../../../../../core/Error.js";import{EsriPromise as t}from"../../../../../core/Promise.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{WorkerHandle as n}from"../../../../../core/workers/WorkerHandle.js";import a from"../../../../../geometry/Extent.js";import{clone as s}from"../../../../../geometry/support/aaBoundingRect.js";import{isFeatureGraphicOrigin as d}from"../../../../../graphic/isFeatureGraphicOrigin.js";import c from"../../../../../rest/support/AttributeBinsFeatureSet.js";import l from"../../../../../rest/support/FeatureSet.js";import{ElevationContext as u}from"../ElevationContext.js";import{applyElevationAlignment as p}from"./utils.js";let y=class extends t{constructor(e){super(e),this.schedule=null,this._workerUpdating=!0}get updating(){return this._workerUpdating}get _graphicOrigin(){const e=this.layer.graphicOrigin;if(!d(e))throw new r("featurelayerview3d:invalid-graphic-origin","Layer's graphic origin is not a FeatureGraphicOrigin");return e}initialize(){const{layer:e,layerView:r,viewSpatialReference:t,renderSpatialReference:o}=this,i=e.elevationInfo;this._elevationContext=u.fromElevationInfo(i),this._workerHandle=new h(this.schedule,{createTexture:async({data:e,parameters:r})=>({result:await this.renderer.createTexture(e,r),transferList:[]}),releaseTexture:async({uid:e})=>(await this.renderer.releaseTexture(e),w),createMaterial:async({materialJSON:e})=>(await this.renderer.createMaterial(e),w),destroyMaterial:async({materialId:e})=>(await this.renderer.destroyMaterial(e),w),createDirectRenderer:async({materialId:e})=>(await this.renderer.createDirectRenderer(e),w),destroyDirectRenderer:async({materialId:e})=>(await this.renderer.destroyDirectRenderer(e),w),createLoDRenderer:async({rendererId:e,lodRenderGeometry:r},t)=>(await this.renderer.createLoDRenderer(e,r,t?.signal??void 0),w),destroyLoDRenderer:async({rendererId:e},r)=>(await this.renderer.destroyLoDRenderer(e,r?.signal??void 0),w),dispatchRenderCommands:async({commands:e})=>(await this.renderer.executeRenderCommands(e),w),applyElevationAlignment:async({mapPoints:e})=>{const{viewSpatialReference:r,elevationProvider:t,renderCoordsHelper:o}=this,i=p(e,r,this._elevationContext,t,o);return{result:i,transferList:[i.buffer]}}}),this.addResolvingPromise((async()=>{await e.load();const n={url:e.parsedUrl?.path??"",baseQuery:e.createQuery().toJSON(),objectIdField:e.objectIdField,capabilities:e.capabilities,fieldIndex:e.fieldsIndex.toJSON(),timeInfo:e.timeInfo?.toJSON(),elevationInfo:i?.toJSON(),fullExtent:e.fullExtent?.toJSON(),renderer:e.renderer?.toJSON()},a={fullOpacity:r.fullOpacity};await this._workerHandle.invokeMethod("setup",{viewSpatialReference:t.toJSON(),renderSpatialReference:o.toJSON(),viewingMode:this.viewingMode,layerInfo:n,layerViewInfo:a})})()),this.addHandles(this._workerHandle.on("notify-updating",({updating:e})=>{this._workerUpdating=e}))}onTileTreeChange(e){this._workerHandle.invokeMethod("onTileTreeChange",{tiles:e.items.map(m)})}onElevationChange(e){this._workerHandle.invokeMethod("onElevationChange",{context:e.context,spatialReference:e.spatialReference?.toJSON(),extent:s(e.extent)})}onLayerViewOpacityChange(e){this._workerHandle.invokeMethod("onLayerViewOpacityChange",e)}onRendererChange(e){const r=e?.toJSON();this._workerHandle.invokeMethod("onRendererChange",r)}async executeQuery(e,r){const t=await this._workerHandle.invokeMethod("executeQuery",e?.toJSON(),r),o=l.fromJSON(t);return this._ensureLayerOnFeatures(o),o}async executeQueryForIds(e,r){return await this._workerHandle.invokeMethod("executeQueryForIds",e?.toJSON(),r)}async executeQueryForCount(e,r){return await this._workerHandle.invokeMethod("executeQueryForCount",e?.toJSON(),r)}async executeQueryForExtent(e,r){const{count:t,extent:o}=await this._workerHandle.invokeMethod("executeQueryForExtent",e?.toJSON(),r);return{count:t,extent:a.fromJSON(o)}}async executeQueryForLatestObservations(e,r){const t=await this._workerHandle.invokeMethod("executeQueryForLatestObservations",e?.toJSON(),r),o=l.fromJSON(t);return this._ensureLayerOnFeatures(o),o}async executeAttributeBinsQuery(e,r){const t=await this._workerHandle.invokeMethod("executeAttributeBinsQuery",e.toJSON(),r);return c.fromJSON(t)}_ensureLayerOnFeatures(e){const{layer:r,_graphicOrigin:t}=this;for(const o of e.features)o.layer=r,o.sourceLayer=r,o.origin=t}};e([o()],y.prototype,"updating",null),e([o({constructOnly:!0})],y.prototype,"schedule",void 0),e([o({constructOnly:!0})],y.prototype,"layer",void 0),e([o({constructOnly:!0})],y.prototype,"layerView",void 0),e([o({constructOnly:!0})],y.prototype,"viewSpatialReference",void 0),e([o({constructOnly:!0})],y.prototype,"renderSpatialReference",void 0),e([o({constructOnly:!0})],y.prototype,"viewingMode",void 0),e([o({constructOnly:!0})],y.prototype,"renderer",void 0),e([o({constructOnly:!0})],y.prototype,"elevationProvider",void 0),e([o({constructOnly:!0})],y.prototype,"renderCoordsHelper",void 0),e([o()],y.prototype,"_workerUpdating",void 0),e([o()],y.prototype,"_graphicOrigin",null),y=e([i("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorkerHandle")],y);class h extends n{constructor(e,r){super("Feature3DPipelineWorker","setup",{},e,{strategy:"dedicated",client:r})}}function m({id:e,lij:r,extent:t}){return{id:e,lij:r,extent:t}}const w={result:void 0};export{y as Feature3DPipelineWorkerHandle};