@arcgis/core 4.22.0-next.20211205 → 4.22.1

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 (222) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{44ccee36f8c74f4f134e.js → 025df54bafc05c183182.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{23af0b02208e20d5c07e.js → 04adf8c6c5e8ad67aa06.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0677ed519c51710d7629.js +1 -0
  6. package/assets/esri/core/workers/chunks/2174266668fa6f2df8cc.js +1 -0
  7. package/assets/esri/core/workers/chunks/25017204ffbd1bbac91f.js +1 -0
  8. package/assets/esri/core/workers/chunks/28f9b48b59bf1347facd.js +1 -0
  9. package/assets/esri/core/workers/chunks/2d97adeb48adeecd7607.js +1 -0
  10. package/assets/esri/core/workers/chunks/{52aa3b44bddb10caa343.js → 2f29fb12452d363a1b17.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{96a62dc1e07f3ef20a30.js → 32efb77e3dabd2c11446.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{6a1ce00bcb689ea95bcb.js → 3a4885bf1cfc82cf2b67.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{ff9a9e705237c55f78ff.js → 49bf6ce6b31a0028cee1.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{02ce52ca0084536bc066.js → 4f4cc4ebd68dbd5ee9c3.js} +1 -1
  15. package/assets/esri/core/workers/chunks/5a31dfbac9c7e15a4dc5.js +1 -0
  16. package/assets/esri/core/workers/chunks/60bfe5450b85b0d4605f.js +1 -0
  17. package/assets/esri/core/workers/chunks/{f3da8b797c8e1fcb1c21.js → 63161320a58a0b1702a2.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{d7f77fe32bb2d69b5714.js → 762f45a7ecd40d564be2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/7b12bf4be88ca0e14683.js +1 -0
  20. package/assets/esri/core/workers/chunks/{07bfb7bb4447aeacd87a.js → 7db1818ed9e834402e98.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{8bc4ea821be16a752226.js → 8b98fc7d115469e6ae5d.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{6210b23872c362f51b12.js → a3b7217566347ab595d0.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{bc0b85bc1e5116836ba4.js → ac9b25ce30f2cd569944.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{058955b87ce2aa1b1809.js → c535188091d83fd50d74.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4417dfcb2ba50ac9f199.js → d431b35c274b76150724.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{5f2718cd77cbd5ba7920.js → da62f8159ec2fdbdeb58.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{b6b46f8e6a7d8d3cef50.js → db00e63a7c4fdf635a8c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{489147cf21d55f47d0e6.js → e7117121160907a593d4.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{44145763617ea985cce4.js → fa9c5dd90d19d4061b40.js} +1 -1
  30. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  31. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  32. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  33. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  34. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  35. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  36. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  37. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  38. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  39. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  40. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  41. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  42. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  43. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  44. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  45. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  46. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  47. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  50. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  51. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  52. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  53. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  54. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  55. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  56. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  57. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  58. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  59. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  60. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  61. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  62. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  63. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  64. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  65. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  66. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  67. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  68. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  69. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  70. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  71. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  72. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  73. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  74. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  75. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  76. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  77. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  78. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  79. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  80. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  81. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  82. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  83. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  84. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  85. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  86. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  87. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  88. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  89. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  90. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
  91. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  92. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  93. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  94. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  95. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  96. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  97. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  98. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  99. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  100. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  101. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  102. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  103. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  104. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  105. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  106. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  107. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  108. package/chunks/Clouds.glsl.js +4 -4
  109. package/chunks/RibbonLine.glsl.js +55 -61
  110. package/config.js +1 -1
  111. package/copyright.txt +47 -19
  112. package/interfaces.d.ts +184 -47
  113. package/layers/CSVLayer.js +1 -1
  114. package/layers/GeoJSONLayer.js +1 -1
  115. package/layers/mixins/ArcGISImageService.js +1 -1
  116. package/layers/mixins/operationalLayers.js +1 -1
  117. package/layers/support/layersCreator.js +1 -1
  118. package/package.json +1 -1
  119. package/renderers/VectorFieldRenderer.js +1 -1
  120. package/renderers/support/RasterSymbolizer.js +1 -1
  121. package/renderers/support/rasterRendererHelper.js +1 -1
  122. package/rest/query/operations/query.js +1 -1
  123. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  124. package/support/arcadeUtils.js +1 -1
  125. package/support/revision.js +1 -1
  126. package/views/2d/MapViewConstraints.js +1 -1
  127. package/views/2d/constraints/ZoomConstraint.js +1 -1
  128. package/views/2d/engine/Stage.js +1 -1
  129. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  130. package/views/2d/engine/webgl/collisions/CollisionGrid.js +1 -1
  131. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  132. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  133. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  134. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  135. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  136. package/views/2d/layers/imagery/ImageryGraphicsView2D.js +1 -1
  137. package/views/3d/environment/Clouds.glsl.js +1 -1
  138. package/views/3d/environment/CloudsGenerator.js +1 -1
  139. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  140. package/views/MapView.js +1 -1
  141. package/views/MapViewBase.js +1 -1
  142. package/views/webgl/Program.js +1 -1
  143. package/widgets/Histogram.js +1 -1
  144. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  145. package/widgets/Sketch/SketchViewModel.js +1 -1
  146. package/widgets/UtilityNetworkTrace.js +1 -1
  147. package/assets/esri/core/t9n/Units_no.json +0 -1
  148. package/assets/esri/core/workers/chunks/49bb222ee07a768e998d.js +0 -1
  149. package/assets/esri/core/workers/chunks/650f04de72c173beaebc.js +0 -1
  150. package/assets/esri/core/workers/chunks/aa57f2c380132c746730.js +0 -1
  151. package/assets/esri/core/workers/chunks/af6251cc7973b43a1523.js +0 -1
  152. package/assets/esri/core/workers/chunks/b17afdfe4450f69298ad.js +0 -1
  153. package/assets/esri/core/workers/chunks/bad899fd3564ec97f69b.js +0 -1
  154. package/assets/esri/core/workers/chunks/deba37055be7c2d7da26.js +0 -1
  155. package/assets/esri/core/workers/chunks/e02a3d456525e76ddb60.js +0 -1
  156. package/assets/esri/identity/t9n/identity_no.json +0 -1
  157. package/assets/esri/smartMapping/t9n/smartMapping_no.json +0 -1
  158. package/assets/esri/t9n/basemaps_no.json +0 -1
  159. package/assets/esri/t9n/common_no.json +0 -1
  160. package/assets/esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D_no.json +0 -1
  161. package/assets/esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D_no.json +0 -1
  162. package/assets/esri/widgets/Attachments/t9n/Attachments_no.json +0 -1
  163. package/assets/esri/widgets/Attribution/t9n/Attribution_no.json +0 -1
  164. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_no.json +0 -1
  165. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_no.json +0 -1
  166. package/assets/esri/widgets/BasemapToggle/t9n/BasemapToggle_no.json +0 -1
  167. package/assets/esri/widgets/Bookmarks/t9n/Bookmarks_no.json +0 -1
  168. package/assets/esri/widgets/BuildingExplorer/t9n/BuildingExplorer_no.json +0 -1
  169. package/assets/esri/widgets/Compass/t9n/Compass_no.json +0 -1
  170. package/assets/esri/widgets/CoordinateConversion/t9n/CoordinateConversion_no.json +0 -1
  171. package/assets/esri/widgets/Daylight/t9n/Daylight_no.json +0 -1
  172. package/assets/esri/widgets/DirectLineMeasurement3D/t9n/DirectLineMeasurement3D_no.json +0 -1
  173. package/assets/esri/widgets/Directions/t9n/Directions_no.json +0 -1
  174. package/assets/esri/widgets/Directions/t9n/Printout_no.json +0 -1
  175. package/assets/esri/widgets/DistanceMeasurement2D/t9n/DistanceMeasurement2D_no.json +0 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_no.json +0 -1
  177. package/assets/esri/widgets/ElevationProfile/t9n/ElevationProfile_no.json +0 -1
  178. package/assets/esri/widgets/Expand/t9n/Expand_no.json +0 -1
  179. package/assets/esri/widgets/Feature/t9n/Feature_no.json +0 -1
  180. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +0 -1
  181. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +0 -1
  182. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_no.json +0 -1
  183. package/assets/esri/widgets/FloorFilter/t9n/FloorFilter_no.json +0 -1
  184. package/assets/esri/widgets/Fullscreen/t9n/Fullscreen_no.json +0 -1
  185. package/assets/esri/widgets/Histogram/t9n/Histogram_no.json +0 -1
  186. package/assets/esri/widgets/HistogramRangeSlider/t9n/HistogramRangeSlider_no.json +0 -1
  187. package/assets/esri/widgets/Home/t9n/Home_no.json +0 -1
  188. package/assets/esri/widgets/LayerList/t9n/LayerList_no.json +0 -1
  189. package/assets/esri/widgets/Legend/t9n/Legend_no.json +0 -1
  190. package/assets/esri/widgets/LineOfSight/t9n/LineOfSight_no.json +0 -1
  191. package/assets/esri/widgets/Locate/t9n/Locate_no.json +0 -1
  192. package/assets/esri/widgets/Measurement/t9n/Measurement_no.json +0 -1
  193. package/assets/esri/widgets/NavigationToggle/t9n/NavigationToggle_no.json +0 -1
  194. package/assets/esri/widgets/Popup/t9n/Popup_no.json +0 -1
  195. package/assets/esri/widgets/Print/t9n/Print_no.json +0 -1
  196. package/assets/esri/widgets/ScaleBar/t9n/ScaleBar_no.json +0 -1
  197. package/assets/esri/widgets/ScaleRangeSlider/t9n/ScaleRangeSlider_no.json +0 -1
  198. package/assets/esri/widgets/Search/t9n/Search_no.json +0 -1
  199. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +0 -1
  200. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +0 -1
  201. package/assets/esri/widgets/Slice/t9n/Slice_no.json +0 -1
  202. package/assets/esri/widgets/Slider/t9n/Slider_no.json +0 -1
  203. package/assets/esri/widgets/Swipe/t9n/Swipe_no.json +0 -1
  204. package/assets/esri/widgets/TableList/t9n/TableList_no.json +0 -1
  205. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +0 -1
  206. package/assets/esri/widgets/Track/t9n/Track_no.json +0 -1
  207. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_no.json +0 -1
  208. package/assets/esri/widgets/Zoom/t9n/Zoom_no.json +0 -1
  209. package/assets/esri/widgets/smartMapping/ClassedColorSlider/t9n/ClassedColorSlider_no.json +0 -1
  210. package/assets/esri/widgets/smartMapping/ClassedSizeSlider/t9n/ClassedSizeSlider_no.json +0 -1
  211. package/assets/esri/widgets/smartMapping/ColorSizeSlider/t9n/ColorSizeSlider_no.json +0 -1
  212. package/assets/esri/widgets/smartMapping/ColorSlider/t9n/ColorSlider_no.json +0 -1
  213. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/HeatmapSlider_no.json +0 -1
  214. package/assets/esri/widgets/smartMapping/OpacitySlider/t9n/OpacitySlider_no.json +0 -1
  215. package/assets/esri/widgets/smartMapping/SizeSlider/t9n/SizeSlider_no.json +0 -1
  216. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_no.json +0 -1
  217. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_no.json +0 -1
  218. package/assets/esri/widgets/support/t9n/ColorPicker_no.json +0 -1
  219. package/assets/esri/widgets/support/t9n/DatePicker_no.json +0 -1
  220. package/assets/esri/widgets/support/t9n/TimePicker_no.json +0 -1
  221. package/assets/esri/widgets/support/t9n/timezone_no.json +0 -1
  222. package/assets/esri/widgets/support/t9n/uriUtils_no.json +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
4
  */
5
- import{b as t,m as e,c as s,d as r,r as i}from"../../../../chunks/mat3.js";import{c as o}from"../../../../chunks/mat3f32.js";import{f as a}from"../../../../chunks/vec2f32.js";import{f as n}from"../../../../chunks/vec3f32.js";import{normalizeMapX as f}from"../../../../geometry/support/normalizeUtils.js";import l from"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import{Program as m}from"../../../webgl/Program.js";import"../../../webgl/enums.js";import"../../../webgl/Texture.js";import u from"../../../webgl/VertexArrayObject.js";import{DisplayObject as c}from"../../engine/DisplayObject.js";import{createProgramDescriptor as h}from"../../engine/webgl/Utils.js";const d=Math.PI/180,p=4;class _ extends c{constructor(t){super(),this._dvsMat3=o(),this._localOrigin={x:0,y:0},this._getBounds=t}destroy(){this._vao&&(this._vao.dispose(!0),this._vao=null,this._vertexBuffer=null,this._indexBuffer=null),this._program&&(this._program.dispose(),this._program=null)}doRender(t){const{context:e}=t,s=this._getBounds();if(s.length<1)return;this._createShaderProgram(e),this._updateMatricesAndLocalOrigin(t),this._updateBufferData(e,s),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),e.setStencilTestEnabled(!1),e.setBlendFunction(1,771),e.setColorMask(!0,!0,!0,!0);const r=this._program;e.bindVAO(this._vao),e.useProgram(r),r.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),e.gl.lineWidth(1),e.drawElements(1,8*s.length,5125,0),e.bindVAO()}_createTransforms(){return{dvs:o()}}_createShaderProgram(t){if(this._program)return;const e="precision highp float;\n uniform mat3 u_dvsMat3;\n\n attribute vec2 a_position;\n\n void main() {\n mediump vec3 pos = u_dvsMat3 * vec3(a_position, 1.0);\n gl_Position = vec4(pos.xy, 0.0, 1.0);\n }",s="precision mediump float;\n void main() {\n gl_FragColor = vec4(0.75, 0.0, 0.0, 0.75);\n }";this._program=new m(t,e,s,g().attributes)}_updateMatricesAndLocalOrigin(o){const{state:l}=o,{displayMat3:m,size:u,resolution:c,pixelRatio:h,rotation:p,viewpoint:_}=l,g=d*p,{x:v,y:b}=_.targetGeometry,x=f(v,l.spatialReference);this._localOrigin.x=x,this._localOrigin.y=b;const j=h*u[0],y=h*u[1],B=c*j,w=c*y,M=t(this._dvsMat3);e(M,M,m),s(M,M,a(j/2,y/2)),r(M,M,n(u[0]/B,-y/w,1)),i(M,M,-g)}_updateBufferData(t,e){const{x:s,y:r}=this._localOrigin,i=2*p*e.length,o=new Float32Array(i),a=new Uint32Array(8*e.length);let n=0,f=0;for(const l of e)o[2*n+0]=l[0]-s,o[2*n+1]=l[1]-r,o[2*n+2]=l[0]-s,o[2*n+3]=l[3]-r,o[2*n+4]=l[2]-s,o[2*n+5]=l[3]-r,o[2*n+6]=l[2]-s,o[2*n+7]=l[1]-r,a[f+0]=n+0,a[f+1]=n+3,a[f+2]=n+3,a[f+3]=n+2,a[f+4]=n+2,a[f+5]=n+1,a[f+6]=n+1,a[f+7]=n+0,n+=4,f+=8;if(this._vertexBuffer?this._vertexBuffer.setData(o.buffer):this._vertexBuffer=l.createVertex(t,35048,o.buffer),this._indexBuffer?this._indexBuffer.setData(a):this._indexBuffer=l.createIndex(t,35048,a),!this._vao){const e=g();this._vao=new u(t,e.attributes,e.bufferLayouts,{geometry:this._vertexBuffer},this._indexBuffer)}}}const g=()=>h("bounds",{geometry:[{location:0,name:"a_position",count:2,type:5126}]});export{_ as default};
5
+ import{b as t,m as e,c as s,d as r,r as i}from"../../../../chunks/mat3.js";import{c as o}from"../../../../chunks/mat3f32.js";import{f as a}from"../../../../chunks/vec2f32.js";import{f as n}from"../../../../chunks/vec3f32.js";import{normalizeMapX as f}from"../../../../geometry/support/normalizeUtils.js";import l from"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import{Program as m}from"../../../webgl/Program.js";import"../../../webgl/enums.js";import"../../../webgl/Texture.js";import u from"../../../webgl/VertexArrayObject.js";import{DisplayObject as c}from"../../engine/DisplayObject.js";import{createProgramDescriptor as h}from"../../engine/webgl/Utils.js";const d=Math.PI/180,p=4;class _ extends c{constructor(t){super(),this._dvsMat3=o(),this._localOrigin={x:0,y:0},this._getBounds=t}destroy(){this._vao&&(this._vao.dispose(!0),this._vao=null,this._vertexBuffer=null,this._indexBuffer=null),this._program&&(this._program.dispose(),this._program=null)}doRender(t){const{context:e}=t,s=this._getBounds();if(s.length<1)return;this._createShaderProgram(e),this._updateMatricesAndLocalOrigin(t),this._updateBufferData(e,s),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),e.setStencilTestEnabled(!1),e.setBlendFunction(1,771),e.setColorMask(!0,!0,!0,!0);const r=this._program;e.bindVAO(this._vao),e.useProgram(r),r.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),e.gl.lineWidth(1),e.drawElements(1,8*s.length,5125,0),e.bindVAO()}_createTransforms(){return{dvs:o()}}_createShaderProgram(t){if(this._program)return;const e="precision highp float;\n uniform mat3 u_dvsMat3;\n\n attribute vec2 a_position;\n\n void main() {\n mediump vec3 pos = u_dvsMat3 * vec3(a_position, 1.0);\n gl_Position = vec4(pos.xy, 0.0, 1.0);\n }",s="precision mediump float;\n void main() {\n gl_FragColor = vec4(0.75, 0.0, 0.0, 0.75);\n }";this._program=new m(t,e,s,g().attributes)}_updateMatricesAndLocalOrigin(o){const{state:l}=o,{displayMat3:m,size:u,resolution:c,pixelRatio:h,rotation:p,viewpoint:_}=l,g=d*p,{x:v,y:b}=_.targetGeometry,x=f(v,l.spatialReference);this._localOrigin.x=x,this._localOrigin.y=b;const j=h*u[0],y=h*u[1],B=c*j,w=c*y,M=t(this._dvsMat3);e(M,M,m),s(M,M,a(j/2,y/2)),r(M,M,n(u[0]/B,-y/w,1)),i(M,M,-g)}_updateBufferData(t,e){const{x:s,y:r}=this._localOrigin,i=2*p*e.length,o=new Float32Array(i),a=new Uint32Array(8*e.length);let n=0,f=0;for(const l of e)l&&(o[2*n+0]=l[0]-s,o[2*n+1]=l[1]-r,o[2*n+2]=l[0]-s,o[2*n+3]=l[3]-r,o[2*n+4]=l[2]-s,o[2*n+5]=l[3]-r,o[2*n+6]=l[2]-s,o[2*n+7]=l[1]-r,a[f+0]=n+0,a[f+1]=n+3,a[f+2]=n+3,a[f+3]=n+2,a[f+4]=n+2,a[f+5]=n+1,a[f+6]=n+1,a[f+7]=n+0,n+=4,f+=8);if(this._vertexBuffer?this._vertexBuffer.setData(o.buffer):this._vertexBuffer=l.createVertex(t,35048,o.buffer),this._indexBuffer?this._indexBuffer.setData(a):this._indexBuffer=l.createIndex(t,35048,a),!this._vao){const e=g();this._vao=new u(t,e.attributes,e.bufferLayouts,{geometry:this._vertexBuffer},this._indexBuffer)}}}const g=()=>h("bounds",{geometry:[{location:0,name:"a_position",count:2,type:5126}]});export{_ 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.22/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as e,isSome as t}from"../../../../core/maybe.js";import{pt2px as r}from"../../../../core/screenUtils.js";import{r as i}from"../../../../chunks/rbush.js";import{create as s,intersects as o,clone as n}from"../../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as h}from"../../../../geometry/support/boundsUtils.js";import{normalizeMapX as a}from"../../../../geometry/support/normalizeUtils.js";import{getSpatialReferenceMinMaxX as u}from"../../../../geometry/support/normalizeUtilsCommon.js";import{HittestDrawHelper as l}from"../../../../symbols/cim/CIMSymbolDrawHelper.js";import{CIMSimbolInflatedSizeHelper as c}from"../../../../symbols/cim/CIMSymbolHelper.js";import m from"./GraphicStoreItem.js";import{PIXEL_BUFFER as d,graphicGeometryToNumber as p}from"./graphicsUtils.js";const g={minX:0,minY:0,maxX:0,maxY:0},f=s(),_=1e-5;function b(e,t,r,i,s){return g.minX=t,g.minY=r,g.maxX=i,g.maxY=s,e.search(g)}function y(e){return{minX:e.bounds[0],minY:e.bounds[1],maxX:e.bounds[2],maxY:e.bounds[3]}}class I{constructor(e,t,r,s,o,n,h){this._graphics=s,this._onAdd=o,this._onRemove=n,this._hashToCIM=h,this._index=i(9,y),this._itemByGraphic=new Map,this._inflatedSizeHelper=new c,this._tileInfoView=e,this._uidFieldName=r;const a=e.getClosestInfoForScale(t);a&&(this._resolution=this._tileInfoView.getTileResolution(a.level))}setResourceManager(e){this._cimResourceManager=e,this._hittestDrawHelper=new l(e)}hitTest(e,t,r,i,n){e=a(e,this._tileInfoView.spatialReference);const h=.5*i*window.devicePixelRatio*r;f[0]=e-h,f[1]=t-h,f[2]=e+h,f[3]=t+h;const u=.5*i*(r+d),l=b(this._index,e-u,t-u,e+u,t+u);if(!l||0===l.length)return[];const c=[],m=s(),p=s();for(const s of l){const{geometry:e,symbolResource:t}=s;this._getSymbolBounds(m,t,e,p,n),p[3]=p[2]=p[1]=p[0]=0,o(m,f)&&s.graphic.visible&&c.push(s)}if(0===c.length)return[];const g=this._hittestDrawHelper,_=[];for(const s of c){const{geometry:e,symbolResource:t}=s,{hash:r,textInfo:o}=t,h=this._hashToCIM.get(r);h&&(g.hitTest(f,h.symbol,e,o,n,i)&&_.push(s))}return _.sort(z),_.map((e=>e.graphic))}getGraphicsData(e,t,r){const i=this._searchForItems(t);if(0===i.length||0===r.length)return[];i.sort(((e,t)=>e.zorder-t.zorder)),i[0].insertAfter=-1;for(let l=1;l<i.length;l++)i[l].insertAfter=i[l-1].graphic.uid;i.sort(((e,t)=>e.graphic.uid-t.graphic.uid)),r.sort(((e,t)=>e.uid-t.uid));let s,o=0,n=0;const h=t.resolution,a=[],u={originPosition:"upperLeft",scale:[h,h],translate:[t.bounds[0],t.bounds[3]]};for(const l of r){for(n=-2;o<i.length;)if(s=i[o],o++,l.uid===s.graphic.uid){n=s.insertAfter;break}if(!s.geometry||-2===n)continue;const r=s.getGeometryQuantized(u,t.bounds,this._tileInfoView.spatialReference,h),c={...s.graphic.attributes};c[this._uidFieldName]=l.uid,null==s.groupId&&(s.groupId=e.createTemplateGroup(s.symbol,null)),a.push({centroid:m.getCentroidQuantized(s,u),geometry:r,attributes:c,symbol:s.symbol,groupId:s.groupId,insertAfter:n,zorder:s.zorder})}return a.sort(((e,t)=>e.zorder-t.zorder)),a}queryTileData(e,t){if(0===this._graphics.length)return[];const{bounds:r,resolution:i}=t,s=this._searchForItems(t),o=[];return 0===s.length||this._createTileGraphics(o,e,s,{originPosition:"upperLeft",scale:[i,i],translate:[r[0],r[3]]},t),o}has(e){return this._itemByGraphic.has(e)}getBounds(e){const t=this._itemByGraphic.get(e);return t?t.bounds:null}getAllBounds(){return Array.from(this._itemByGraphic.values()).filter((e=>e.graphic.visible)).map((e=>e.bounds))}addOrModify(r,i,s){if(!r||e(i))return;this.has(r)&&this.remove(r),this._onAdd(r);const o=[0,0,0,0],n=this._getSymbolBounds(null,i,s,o,0),h=m.acquire(r,i,s,t(n)?n:null,o);return this._itemByGraphic.set(r,h),s&&this._index.insert(h),h.bounds}remove(e){if(!this._itemByGraphic.has(e))return;this._onRemove(e);const t=this._itemByGraphic.get(e);this._index.remove(t),this._itemByGraphic.delete(e)}updateZ(){const e=this._graphics.items;let t,r;for(let i=0;i<e.length;i++)r=e[i],t=this._itemByGraphic.get(r),t&&(t.zorder=i)}update(e,r,i){const s=this._itemByGraphic.get(e);s.groupId=null;const o=n(s.bounds);this._index.remove(s);const h=this._getSymbolBounds(s.bounds,r,i,s.size,0);return t(h)&&s.set(e,r,i,h,s.size),i&&this._index.insert(s),{oldBounds:o,newBounds:s.bounds}}updateLevel(e){if(this._resolution===e)return;this._resolution=e,this._index.clear();const r=this._itemByGraphic,i=[];for(const[s,o]of r){const e=this._getSymbolBounds(o.bounds,o.symbolResource,o.geometry,o.size,0);o.geometry&&t(e)&&(o.bounds=e,i.push(o))}this._index.load(i)}clear(){this._itemByGraphic.clear(),this._index.clear()}_createTileGraphics(e,t,r,i,s){const o=this._uidFieldName,n=this._tileInfoView.spatialReference,{bounds:h,resolution:a}=s;let u,l,c,d;r.sort(((e,t)=>e.zorder-t.zorder));for(let p=0;p<r.length;p++){c=r[p],u=c.graphic,l=c.getGeometryQuantized(i,h,n,a),d=0===p?-1:r[p-1].graphic.uid;const s={...c.graphic.attributes};s[o]=u.uid,null==c.groupId&&(c.groupId=t.createTemplateGroup(c.symbol,null)),e.push({centroid:m.getCentroidQuantized(c,i),geometry:l,attributes:s,symbol:c.symbol,groupId:c.groupId,insertAfter:d,zorder:c.zorder})}}_searchForItems(e){const t=this._tileInfoView.spatialReference,r=e.bounds;if(t.isWrappable){const[i,o]=u(t),n=Math.abs(r[2]-o)<_,h=Math.abs(r[0]-i)<_;if((!n||!h)&&(n||h)){const t=e.resolution;let h;h=s(n?[i,r[1],i+t*d,r[3]]:[o-t*d,r[1],o,r[3]]);const a=b(this._index,r[0],r[1],r[2],r[3]),u=b(this._index,h[0],h[1],h[2],h[3]);return[...new Set([...a,...u])]}}return b(this._index,r[0],r[1],r[2],r[3])}_getSymbolBounds(e,t,i,o,n){if(!t||!t.symbol)return null;if(e||(e=s()),h(e,i),!o||0===o[0]&&0===o[1]&&0===o[2]&&0===o[3]){const{hash:e,textInfo:i}=t,s=this._hashToCIM.get(e);if(!s)return null;o||(o=[0,0,0,0]);const h=this._inflatedSizeHelper.getSymbolInflateSize(o,s.symbol,this._cimResourceManager,n,i);o[0]=r(h[0]),o[1]=r(h[1]),o[2]=r(h[2]),o[3]=r(h[3])}const a=this._resolution,u=c.SafeSize(o);return e[0]-=u*a,e[1]-=u*a,e[2]+=u*a,e[3]+=u*a,e}}const z=(e,t)=>{const r=p(e.graphic),i=p(t.graphic);return r===i?t.zorder-e.zorder:r-i};export{I as default};
5
+ import{isNone as e,isSome as t}from"../../../../core/maybe.js";import{pt2px as r}from"../../../../core/screenUtils.js";import{r as i}from"../../../../chunks/rbush.js";import{create as s,intersects as o,clone as n}from"../../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as h}from"../../../../geometry/support/boundsUtils.js";import{normalizeMapX as u}from"../../../../geometry/support/normalizeUtils.js";import{getSpatialReferenceMinMaxX as a}from"../../../../geometry/support/normalizeUtilsCommon.js";import{HittestDrawHelper as l}from"../../../../symbols/cim/CIMSymbolDrawHelper.js";import{CIMSimbolInflatedSizeHelper as c}from"../../../../symbols/cim/CIMSymbolHelper.js";import m from"./GraphicStoreItem.js";import{PIXEL_BUFFER as d,graphicGeometryToNumber as p}from"./graphicsUtils.js";const g={minX:0,minY:0,maxX:0,maxY:0},f=s(),_=1e-5;function b(e,t,r,i,s){return g.minX=t,g.minY=r,g.maxX=i,g.maxY=s,e.search(g)}function y(e){return{minX:e.bounds[0],minY:e.bounds[1],maxX:e.bounds[2],maxY:e.bounds[3]}}class I{constructor(e,t,r,s,o,n,h){this._graphics=s,this._onAdd=o,this._onRemove=n,this._hashToCIM=h,this._index=i(9,y),this._itemByGraphic=new Map,this._inflatedSizeHelper=new c,this._tileInfoView=e,this._uidFieldName=r;const u=e.getClosestInfoForScale(t);u&&(this._resolution=this._tileInfoView.getTileResolution(u.level))}setResourceManager(e){this._cimResourceManager=e,this._hittestDrawHelper=new l(e)}hitTest(e,t,r,i,n){e=u(e,this._tileInfoView.spatialReference);const h=.5*i*window.devicePixelRatio*r;f[0]=e-h,f[1]=t-h,f[2]=e+h,f[3]=t+h;const a=.5*i*(r+d),l=b(this._index,e-a,t-a,e+a,t+a);if(!l||0===l.length)return[];const c=[],m=s(),p=s();for(const s of l){const{geometry:e,symbolResource:t}=s;this._getSymbolBounds(m,t,e,p,n),p[3]=p[2]=p[1]=p[0]=0,o(m,f)&&s.graphic.visible&&c.push(s)}if(0===c.length)return[];const g=this._hittestDrawHelper,_=[];for(const s of c){const{geometry:e,symbolResource:t}=s,{hash:r,textInfo:o}=t,h=this._hashToCIM.get(r);h&&(g.hitTest(f,h.symbol,e,o,n,i)&&_.push(s))}return _.sort(z),_.map((e=>e.graphic))}getGraphicsData(e,t,r){const i=this._searchForItems(t);if(0===i.length||0===r.length)return[];i.sort(((e,t)=>e.zorder-t.zorder)),i[0].insertAfter=-1;for(let l=1;l<i.length;l++)i[l].insertAfter=i[l-1].graphic.uid;i.sort(((e,t)=>e.graphic.uid-t.graphic.uid)),r.sort(((e,t)=>e.uid-t.uid));let s,o=0,n=0;const h=t.resolution,u=[],a={originPosition:"upperLeft",scale:[h,h],translate:[t.bounds[0],t.bounds[3]]};for(const l of r){for(n=-2;o<i.length;)if(s=i[o],o++,l.uid===s.graphic.uid){n=s.insertAfter;break}if(!s.geometry||-2===n)continue;const r=s.getGeometryQuantized(a,t.bounds,this._tileInfoView.spatialReference,h),c={...s.graphic.attributes};c[this._uidFieldName]=l.uid,null==s.groupId&&(s.groupId=e.createTemplateGroup(s.symbol,null)),u.push({centroid:m.getCentroidQuantized(s,a),geometry:r,attributes:c,symbol:s.symbol,groupId:s.groupId,insertAfter:n,zorder:s.zorder})}return u.sort(((e,t)=>e.zorder-t.zorder)),u}queryTileData(e,t){if(0===this._graphics.length)return[];const{bounds:r,resolution:i}=t,s=this._searchForItems(t),o=[];return 0===s.length||this._createTileGraphics(o,e,s,{originPosition:"upperLeft",scale:[i,i],translate:[r[0],r[3]]},t),o}has(e){return this._itemByGraphic.has(e)}getBounds(e){const t=this._itemByGraphic.get(e);return t?t.bounds:null}getAllBounds(){return Array.from(this._itemByGraphic.values()).filter((e=>e.graphic.visible)).map((e=>e.bounds))}addOrModify(r,i,s){if(!r||e(i))return;this.has(r)&&this.remove(r),this._onAdd(r);const o=[0,0,0,0],n=this._getSymbolBounds(null,i,s,o,0),h=m.acquire(r,i,s,t(n)?n:null,o);return this._itemByGraphic.set(r,h),s&&this._index.insert(h),h.bounds}remove(e){if(!this._itemByGraphic.has(e))return;this._onRemove(e);const t=this._itemByGraphic.get(e);t.bounds&&this._index.remove(t),this._itemByGraphic.delete(e)}updateZ(){const e=this._graphics.items;let t,r;for(let i=0;i<e.length;i++)r=e[i],t=this._itemByGraphic.get(r),t&&(t.zorder=i)}update(e,r,i){const s=this._itemByGraphic.get(e);s.groupId=null;const o=n(s.bounds);this._index.remove(s);const h=this._getSymbolBounds(s.bounds,r,i,s.size,0);return t(h)&&s.set(e,r,i,h,s.size),i&&this._index.insert(s),{oldBounds:o,newBounds:s.bounds}}updateLevel(e){if(this._resolution===e)return;this._resolution=e,this._index.clear();const r=this._itemByGraphic,i=[];for(const[s,o]of r){const e=this._getSymbolBounds(o.bounds,o.symbolResource,o.geometry,o.size,0);o.geometry&&t(e)&&(o.bounds=e,i.push(o))}this._index.load(i)}clear(){this._itemByGraphic.clear(),this._index.clear()}_createTileGraphics(e,t,r,i,s){const o=this._uidFieldName,n=this._tileInfoView.spatialReference,{bounds:h,resolution:u}=s;let a,l,c,d;r.sort(((e,t)=>e.zorder-t.zorder));for(let p=0;p<r.length;p++){c=r[p],a=c.graphic,l=c.getGeometryQuantized(i,h,n,u),d=0===p?-1:r[p-1].graphic.uid;const s={...c.graphic.attributes};s[o]=a.uid,null==c.groupId&&(c.groupId=t.createTemplateGroup(c.symbol,null)),e.push({centroid:m.getCentroidQuantized(c,i),geometry:l,attributes:s,symbol:c.symbol,groupId:c.groupId,insertAfter:d,zorder:c.zorder})}}_searchForItems(e){const t=this._tileInfoView.spatialReference,r=e.bounds;if(t.isWrappable){const[i,o]=a(t),n=Math.abs(r[2]-o)<_,h=Math.abs(r[0]-i)<_;if((!n||!h)&&(n||h)){const t=e.resolution;let h;h=s(n?[i,r[1],i+t*d,r[3]]:[o-t*d,r[1],o,r[3]]);const u=b(this._index,r[0],r[1],r[2],r[3]),a=b(this._index,h[0],h[1],h[2],h[3]);return[...new Set([...u,...a])]}}return b(this._index,r[0],r[1],r[2],r[3])}_getSymbolBounds(e,t,i,o,n){if(!t||!t.symbol||!i)return null;if(e||(e=s()),h(e,i),!o||0===o[0]&&0===o[1]&&0===o[2]&&0===o[3]){const{hash:e,textInfo:i}=t,s=this._hashToCIM.get(e);if(!s)return null;o||(o=[0,0,0,0]);const h=this._inflatedSizeHelper.getSymbolInflateSize(o,s.symbol,this._cimResourceManager,n,i);o[0]=r(h[0]),o[1]=r(h[1]),o[2]=r(h[2]),o[3]=r(h[3])}const u=this._resolution,a=c.SafeSize(o);return e[0]-=a*u,e[1]-=a*u,e[2]+=a*u,e[3]+=a*u,e}}const z=(e,t)=>{const r=p(e.graphic),i=p(t.graphic);return r===i?t.zorder-e.zorder:r-i};export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import r from"../../../../request.js";import i from"../../../../core/Accessor.js";import s from"../../../../core/Logger.js";import{isSome as a}from"../../../../core/maybe.js";import{debounce as o,isAbortError as n}from"../../../../core/promiseUtils.js";import{property as p}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{enumeration as c}from"../../../../core/accessorSupport/decorators/enumeration.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import l from"../../../../geometry/Extent.js";import{projectExtent as m}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{snapImageToSymbolTile as u}from"../../../../layers/support/rasterFunctions/vectorFieldUtils.js";import{GraphicsCollection as d}from"../../../../support/GraphicsCollection.js";import{Container as y}from"../../engine/Container.js";import g from"../graphics/GraphicContainer.js";import x from"../graphics/GraphicsView2D.js";const f=s.getLogger("esri.views.2d.layers.imagery.ImageryGraphicsView2D");let _=class extends i{constructor(){super(...arguments),this.attached=!1,this.container=new y,this.updateRequested=!1,this._graphicsView=null,this._projectFullExtentPromise=null,this._dataParameters={exportParametersVersion:0,extents:[],tileResolution:0,time:""},this.type="Graphics",this._graphics=new d,this._updateGraphics=o((async(e,t)=>{if(!e.stationary)return;const r=e.state,i=new l({xmin:r.extent.xmin,ymin:r.extent.ymin,xmax:r.extent.xmax,ymax:r.extent.ymax,spatialReference:r.spatialReference}),[s,o]=e.state.size,n={};n.timeExtent=this.timeExtent,n.requestAsImageElement=!1,n.signal=t,null==this._projectFullExtentPromise&&(this._projectFullExtentPromise=this._getProjectedFullExtent(i.spatialReference));const p="vector-field"===this.layer.renderer.type?this.layer.renderer.symbolTileSize:50,c=await this._projectFullExtentPromise,{extent:h,resolution:m,width:d,height:y}=u(i,s,o,p,c),g=await this.layer.fetchImage(h,d,y,n),x=this.layer.renderer;if("vector-field"===x.type){const t=g.pixelData.pixelBlock,r=x.sizeVariables[0];!a(t)||r.minDataValue&&r.maxDataValue||(r.minDataValue=t.statistics[0].minValue,r.maxDataValue=t.statistics[0].maxValue),this._pixelData={extent:h,pixelBlock:t};const i=h.clone().normalize(),s={exportParametersVersion:this.layer.exportImageServiceParameters.version,extents:i,tileResolution:m,time:JSON.stringify(this.timeExtent||"")},o=this._canReuseVectorFieldData(s)?this._dataParameters.extents:[],n=await x.getGraphicsFromPixelData(g.pixelData,"vector-uv"===this.layer.rasterInfo.dataType,o);if(o.length){const e=this._graphics.items.filter((e=>a(e.geometry)&&o.some((t=>t.intersects(e.geometry)))&&!i.some((t=>t.intersects(e.geometry)))));this._graphics.removeMany(e),this._graphics.addMany(n)}else this._graphics.set("items",n);this._graphicsView.update(e),this._dataParameters=s}}))}destroy(){this.attached&&(this.detach(),this.attached=!1),this.updateRequested=!1}get updating(){return!this.attached||this.isUpdating()}update(e){this._updateGraphics(e).catch((e=>{n(e)||f.error(e)}))}hitTest(e){return new t({attributes:{},geometry:e.clone(),layer:this.layer})}attach(){this._graphicsView=new x({view:this.view,graphics:this._graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme)}),this.attached=!0}detach(){this._graphics.destroy(),this._graphicsView.destroy(),this.container.removeChild(this._graphicsView.container),this._graphicsView=null}install(e){this.container.addChild(this._graphicsView.container),e.addChild(this.container)}uninstall(e){this.container.removeChild(this._graphicsView.container),e.removeChild(this.container)}isUpdating(){return this._graphicsView.updating||this.updateRequested}getPixelData(){return this.updating?null:this._pixelData}redraw(){}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view.requestUpdate())}async _getProjectedFullExtent(e){try{return await m(this.layer.fullExtent,e)}catch(t){try{const t=(await r(this.layer.url,{query:{option:"footprints",outSR:e.wkid||JSON.stringify(e.toJSON()),f:"json"}})).data.featureCollection.layers[0].layerDefinition.extent;return t?l.fromJSON(t):null}catch{return null}}}_canReuseVectorFieldData(e){const t=this._dataParameters.exportParametersVersion===e.exportParametersVersion,r=this._dataParameters.time===e.time,i=Math.abs(this._dataParameters.tileResolution-e.tileResolution)/e.tileResolution<.01,s=this._dataParameters.extents.some((t=>e.extents.some((e=>t.intersects(e)))));return t&&r&&i&&s}};e([p()],_.prototype,"attached",void 0),e([p()],_.prototype,"container",void 0),e([p()],_.prototype,"layer",void 0),e([p()],_.prototype,"timeExtent",void 0),e([p()],_.prototype,"view",void 0),e([p()],_.prototype,"updateRequested",void 0),e([p()],_.prototype,"updating",null),e([c({graphics:"Graphics"})],_.prototype,"type",void 0),_=e([h("esri.views.2d.layers.imagery.ImageryGraphicsView2D")],_);const w=_;export{w as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import r from"../../../../request.js";import i from"../../../../core/Accessor.js";import s from"../../../../core/Logger.js";import{isSome as a}from"../../../../core/maybe.js";import{debounce as o,isAbortError as n}from"../../../../core/promiseUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{enumeration as p}from"../../../../core/accessorSupport/decorators/enumeration.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import l from"../../../../geometry/Extent.js";import{projectExtent as m}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{snapImageToSymbolTile as u}from"../../../../layers/support/rasterFunctions/vectorFieldUtils.js";import{GraphicsCollection as d}from"../../../../support/GraphicsCollection.js";import{Container as y}from"../../engine/Container.js";import g from"../graphics/GraphicContainer.js";import x from"../graphics/GraphicsView2D.js";const f=s.getLogger("esri.views.2d.layers.imagery.ImageryGraphicsView2D");let _=class extends i{constructor(){super(...arguments),this.attached=!1,this.container=new y,this.updateRequested=!1,this._graphicsView=null,this._projectFullExtentPromise=null,this._dataParameters={exportParametersVersion:0,extents:[],tileResolution:0,time:"",isOceanStyle:!1,isOceanographic:!1},this.type="Graphics",this._graphics=new d,this._updateGraphics=o((async(e,t)=>{if(!e.stationary)return;const r=e.state,i=new l({xmin:r.extent.xmin,ymin:r.extent.ymin,xmax:r.extent.xmax,ymax:r.extent.ymax,spatialReference:r.spatialReference}),[s,o]=e.state.size,n={};n.timeExtent=this.timeExtent,n.requestAsImageElement=!1,n.signal=t,null==this._projectFullExtentPromise&&(this._projectFullExtentPromise=this._getProjectedFullExtent(i.spatialReference));const c="vector-field"===this.layer.renderer.type?this.layer.renderer.symbolTileSize:50,p=await this._projectFullExtentPromise,{extent:h,resolution:m,width:d,height:y}=u(i,s,o,c,p),g=await this.layer.fetchImage(h,d,y,n),x=this.layer.renderer;if("vector-field"===x.type){const t=g.pixelData.pixelBlock,r=x.sizeVariables[0];!a(t)||r.minDataValue&&r.maxDataValue||(r.minDataValue=t.statistics[0].minValue,r.maxDataValue=t.statistics[0].maxValue),this._pixelData={extent:h,pixelBlock:t};const i=h.clone().normalize(),s={exportParametersVersion:this.layer.exportImageServiceParameters.version,extents:i,tileResolution:m,time:JSON.stringify(this.timeExtent||""),isOceanStyle:"flow-to"===x.flowRepresentation,isOceanographic:"ocean-current-kn"===x.style||"ocean-current-m"===x.style},o=this._canReuseVectorFieldData(s)?this._dataParameters.extents:[],n=await x.getGraphicsFromPixelData(g.pixelData,"vector-uv"===this.layer.rasterInfo.dataType,o);if(o.length){const e=this._graphics.items.filter((e=>a(e.geometry)&&o.some((t=>t.intersects(e.geometry)))&&!i.some((t=>t.intersects(e.geometry)))));this._graphics.removeMany(e),this._graphics.addMany(n)}else this._graphics.set("items",n);this._graphicsView.update(e),this._dataParameters=s}}))}destroy(){this.attached&&(this.detach(),this.attached=!1),this.updateRequested=!1}get updating(){return!this.attached||this.isUpdating()}update(e){this._updateGraphics(e).catch((e=>{n(e)||f.error(e)}))}hitTest(e){return new t({attributes:{},geometry:e.clone(),layer:this.layer})}attach(){this._graphicsView=new x({view:this.view,graphics:this._graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme)}),this.attached=!0}detach(){this._graphics.destroy(),this._graphicsView.destroy(),this.container.removeChild(this._graphicsView.container),this._graphicsView=null}install(e){this.container.addChild(this._graphicsView.container),e.addChild(this.container)}uninstall(e){this.container.removeChild(this._graphicsView.container),e.removeChild(this.container)}isUpdating(){return this._graphicsView.updating||this.updateRequested}getPixelData(){return this.updating?null:this._pixelData}redraw(){}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view.requestUpdate())}async _getProjectedFullExtent(e){try{return await m(this.layer.fullExtent,e)}catch(t){try{const t=(await r(this.layer.url,{query:{option:"footprints",outSR:e.wkid||JSON.stringify(e.toJSON()),f:"json"}})).data.featureCollection.layers[0].layerDefinition.extent;return t?l.fromJSON(t):null}catch{return null}}}_canReuseVectorFieldData(e){const t=this._dataParameters.exportParametersVersion===e.exportParametersVersion,r=this._dataParameters.time===e.time,i=Math.abs(this._dataParameters.tileResolution-e.tileResolution)/e.tileResolution<.01,s=this._dataParameters.extents.some((t=>e.extents.some((e=>t.intersects(e))))),a=this._dataParameters.isOceanStyle===e.isOceanStyle,o=this._dataParameters.isOceanographic===e.isOceanographic;return t&&r&&i&&s&&a&&o}};e([c()],_.prototype,"attached",void 0),e([c()],_.prototype,"container",void 0),e([c()],_.prototype,"layer",void 0),e([c()],_.prototype,"timeExtent",void 0),e([c()],_.prototype,"view",void 0),e([c()],_.prototype,"updateRequested",void 0),e([c()],_.prototype,"updating",null),e([p({graphics:"Graphics"})],_.prototype,"type",void 0),_=e([h("esri.views.2d.layers.imagery.ImageryGraphicsView2D")],_);const w=_;export{w 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.22/esri/copyright.txt for details.
4
4
  */
5
- import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";export{b as build}from"../../../chunks/Clouds.glsl.js";
5
+ import"./NoiseTextureAtlas.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";export{b as build}from"../../../chunks/Clouds.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import s from"../../../core/has.js";import{lerp as i}from"../../../core/mathUtils.js";import{removeMaybe as r,releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{q as p}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f,z as _}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as g}from"../../../geometry/projectionEllipsoid.js";import{CloudsTechniqueConfiguration as y,CloudsTechnique as b}from"./CloudsTechnique.js";import{NoiseTextureAtlas as S}from"./NoiseTextureAtlas.js";import{createQuadVAO as v}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as x}from"../../support/Scheduler.js";import w from"../../webgl/FramebufferObject.js";let T=class extends t{constructor(e){super(e),this._frameTask=null,this._techniques=[],this._techniqueConfiguration=new y,this._cubeMapSize=s("esri-mobile")?1024:2048,this._viewMat3=d(),this._eye=_(),this._didRenderFaces=!1,this._raymarchingStepType=0,this._cloudRadius=0,this._viewMatrix=l();const t=j.sunny;this.coverage=i(t.coverage[1],t.coverage[0],.5),this.density=i(t.density[1],t.density[0],.5),this.absorption=i(t.absorption[1],t.absorption[0],.5),this.cloudSize=i(t.cloudSize[1],t.cloudSize[0],.5),this.detailSize=i(t.detailSize[1],t.detailSize[0],.5),this.smoothness=i(t.smoothness[1],t.smoothness[0],.5),this.cloudHeight=i(t.cloudHeight[1],t.cloudHeight[0],.5),this.raymarchingStepType=t.raymarchingStepType}_getTechnique(e){const t=this._techniques[e];return t||(this._techniqueConfiguration.steps=e,this._techniques[e]=new b({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[e])}initialize(){this._vao=v(this.rctx);const e=g(this.view.spatialReference);this._cloudRadius=.5*e.radius,this.resetRenderFlags(),this._frameTask=this.view.resourceController.scheduler.registerTask(x.CLOUDS_GENERATOR,this)}destroy(){this._frameTask=r(this._frameTask),this._techniques.forEach((e=>o(e))),this._techniques=null,this._frameBufferCube=h(this._frameBufferCube),this._vao=h(this._vao),this._noiseTextureAtlas=a(this._noiseTextureAtlas)}set coverage(e){this._coverage=e,this.resetRenderFlags()}get coverage(){return this._coverage}set density(e){this._density=this.remap(e,0,1,0,.3),this.resetRenderFlags()}set cloudSize(e){this._cloudSize=this.remap(Math.max(.01,1-e),0,1,0,.02),this.resetRenderFlags()}set detailSize(e){this._detailSize=this.remap(Math.max(.01,1-e),0,1,0,.2),this.resetRenderFlags()}set smoothness(e){this._smoothness=this.remap(1-e,0,1,0,.5),this.resetRenderFlags()}set absorption(e){this._sigmaE=1+e,this._power=this.remap(e,0,1,35,120),this.resetRenderFlags()}get absorption(){return this._sigmaE-1}set cloudHeight(e){this._cloudHeight=this.remap(e,0,1,0,1500),this.resetRenderFlags()}get cloudHeight(){return this._cloudHeight}set raymarchingStepType(e){this._raymarchingStepType=e,this.resetRenderFlags()}get noiseTextureAtlas(){return n(this._noiseTextureAtlas)&&(this._noiseTextureAtlas=new S(this.rctx,this.view),this._noiseTextureAtlas.render(128,this.rctx)),this._noiseTextureAtlas}get frameBufferCube(){if(n(this._frameBufferCube)){const e={target:34067,pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new w(this.rctx,{colorTarget:2,width:this._cubeMapSize,height:this._cubeMapSize},e)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}resetRenderFlags(){this._didRenderFaces=!1}remap(e,t,s,i,r){return i+(e-t)*(r-i)/(s-t)}get running(){return!this._didRenderFaces}runTask(e){if(0===this.coverage||n(this._vao))return void(this._didRenderFaces=!0);const t=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube,!1,34069);const s=this._getTechnique(this._raymarchingStepType),i=s.program;this.rctx.useProgram(i),i.bindTexture(this.noiseTextureAtlas.textureAtlas,"cloudShapeTexture"),i.setUniform1f("cloudRadius",this._cloudRadius),i.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),i.setUniform1f("power",this._power),i.setUniform1f("sigmaE",this._sigmaE),i.setUniform1f("density",this._density),i.setUniform1f("cloudSize",this._cloudSize),i.setUniform1f("detailSize",this._detailSize),i.setUniform1f("smoothness",this._smoothness),i.setUniform1f("cloudHeight",this._cloudHeight),i.setUniform1f("coverage",this._coverage),this.rctx.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao),s.bindPipelineState(this.rctx);for(let r=0;r<5;r++){const e=z[r],t=R[r];p(this._viewMatrix,this._eye,e,t),m(this._viewMat3,this._viewMatrix),i.setUniformMatrix3fv("viewMatrix",this._viewMat3);const s=34069+r;this.frameBufferCube.framebufferTexture2D(this.frameBufferCube.colorAttachment.glName,this.rctx.gl,36064,s),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this._didRenderFaces=!0,this.rctx.setViewport(t.x,t.y,t.width,t.height),e.madeProgress(),this.requestRender()}get test(){return{coverage:this._coverage,density:this.remap(this._density,0,.3,0,1),absorption:this._sigmaE-1,cloudSize:1-this.remap(this._cloudSize,0,.02,0,1),detailSize:1-this.remap(this._detailSize,0,.2,0,1),smoothness:1-this.remap(this._smoothness,0,.5,0,1),cloudHeight:this.remap(this._cloudHeight,0,1500,0,1)}}};e([c({constructOnly:!0})],T.prototype,"rctx",void 0),e([c({constructOnly:!0})],T.prototype,"view",void 0),e([c({constructOnly:!0})],T.prototype,"requestRender",void 0),e([c()],T.prototype,"_frameTask",void 0),e([c()],T.prototype,"_didRenderFaces",void 0),e([c({readOnly:!0})],T.prototype,"running",null),T=e([u("esri.views.3d.environment.CloudsGenerator")],T);const z=[f(1,0,0),f(-1,0,0),f(0,1,0),f(0,-1,0),f(0,0,1)],R=[f(0,1,0),f(0,1,0),f(0,0,-1),f(0,0,1),f(0,1,0)];class M{constructor(e,t,s,i,r,o,h,a,n=.5){this.coverage=e,this.density=t,this.absorption=s,this.cloudSize=i,this.detailSize=r,this.smoothness=o,this.cloudHeight=h,this.raymarchingStepType=a,this.median=n}}const j={sunny:new M([.1,.7],[.02,.02],[0,0],[.86,.86],[.8,.8],[.5,.5],[.05,.05],0),cloudy:new M([.24,.7],[.135,.2],[0,0],[.5,.5],[.65,.7],[.3,.3],[1,1],2),rainy:new M([.5,.9],[.2,.5],[.3,.6],[.4,.4],[.7,.7],[.5,.5],[1,1],2),foggy:new M([.8,.8],[.5,.5],[0,0],[.85,.85],[.75,.75],[.8,.8],[.3,.3],1)};export{T as CloudsGenerator,j as cloudPresets};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import s from"../../../core/has.js";import{lerp as i}from"../../../core/mathUtils.js";import{removeMaybe as r,releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{q as p}from"../../../chunks/mat4.js";import{c as f}from"../../../chunks/mat4f64.js";import{f as l,z as _}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as g}from"../../../geometry/projectionEllipsoid.js";import{CloudsTechniqueConfiguration as y,CloudsTechnique as b}from"./CloudsTechnique.js";import{NoiseTextureAtlas as v}from"./NoiseTextureAtlas.js";import{createQuadVAO as S}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as x}from"../../support/Scheduler.js";import w from"../../webgl/FramebufferObject.js";let T=class extends t{constructor(e){super(e),this._frameTask=null,this._techniques=[],this._techniqueConfiguration=new y,this._cubeMapSize=s("esri-mobile")?1024:2048,this._viewMat3=d(),this._eye=_(),this._didRenderFaces=!1,this._raymarchingStepType=0,this._cloudRadius=0,this._viewMatrix=f();const t=j.sunny;this.coverage=i(t.coverage[1],t.coverage[0],.5),this.density=i(t.density[1],t.density[0],.5),this.absorption=i(t.absorption[1],t.absorption[0],.5),this.cloudSize=i(t.cloudSize[1],t.cloudSize[0],.5),this.detailSize=i(t.detailSize[1],t.detailSize[0],.5),this.smoothness=i(t.smoothness[1],t.smoothness[0],.5),this.cloudHeight=i(t.cloudHeight[1],t.cloudHeight[0],.5),this.raymarchingStepType=t.raymarchingStepType}_getTechnique(e){const t=this._techniques[e];return t||(this._techniqueConfiguration.steps=e,this._techniques[e]=new b({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[e])}initialize(){this._vao=S(this.rctx);const e=g(this.view.spatialReference);this._cloudRadius=.5*e.radius,this.resetRenderFlags(),this._frameTask=this.view.resourceController.scheduler.registerTask(x.CLOUDS_GENERATOR,this)}destroy(){this._frameTask=r(this._frameTask),this._techniques.forEach((e=>o(e))),this._techniques=null,this._frameBufferCube=h(this._frameBufferCube),this._vao=h(this._vao),this._noiseTexture=a(this._noiseTexture)}set coverage(e){this._coverage=e,this.resetRenderFlags()}get coverage(){return this._coverage}set density(e){this._density=this.remap(e,0,1,0,.3),this.resetRenderFlags()}set cloudSize(e){this._cloudSize=this.remap(Math.max(.01,1-e),0,1,0,.02),this.resetRenderFlags()}set detailSize(e){this._detailSize=this.remap(Math.max(.01,1-e),0,1,0,.2),this.resetRenderFlags()}set smoothness(e){this._smoothness=this.remap(1-e,0,1,0,.5),this.resetRenderFlags()}set absorption(e){this._sigmaE=1+e,this._power=this.remap(e,0,1,35,120),this.resetRenderFlags()}get absorption(){return this._sigmaE-1}set cloudHeight(e){this._cloudHeight=this.remap(e,0,1,0,1500),this.resetRenderFlags()}get cloudHeight(){return this._cloudHeight}set raymarchingStepType(e){this._raymarchingStepType=e,this.resetRenderFlags()}_ensureNoiseTexture(){return n(this._noiseTexture)&&(this._noiseTexture=new v(this.rctx,this.view),this._noiseTexture.render(this.rctx)),this._noiseTexture}get frameBufferCube(){if(n(this._frameBufferCube)){const e={target:34067,pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new w(this.rctx,{colorTarget:2,width:this._cubeMapSize,height:this._cubeMapSize},e)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}resetRenderFlags(){this._didRenderFaces=!1}remap(e,t,s,i,r){return i+(e-t)*(r-i)/(s-t)}get running(){return!this._didRenderFaces}runTask(e){if(0===this.coverage||n(this._vao))return void(this._didRenderFaces=!0);const t=this._ensureNoiseTexture().textureAtlas;if(n(t))return void(this._didRenderFaces=!0);const s=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube,!1,34069);const i=this._getTechnique(this._raymarchingStepType),r=i.program;this.rctx.useProgram(r),r.bindTexture(t,"cloudShapeTexture"),r.setUniform1f("cloudRadius",this._cloudRadius),r.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),r.setUniform1f("power",this._power),r.setUniform1f("sigmaE",this._sigmaE),r.setUniform1f("density",this._density),r.setUniform1f("cloudSize",this._cloudSize),r.setUniform1f("detailSize",this._detailSize),r.setUniform1f("smoothness",this._smoothness),r.setUniform1f("cloudHeight",this._cloudHeight),r.setUniform1f("coverage",this._coverage),this.rctx.bindVAO(this._vao),r.assertCompatibleVertexAttributeLocations(this._vao),i.bindPipelineState(this.rctx);for(let o=0;o<5;o++){const e=z[o],t=R[o];p(this._viewMatrix,this._eye,e,t),m(this._viewMat3,this._viewMatrix),r.setUniformMatrix3fv("viewMatrix",this._viewMat3);const s=34069+o;this.frameBufferCube.framebufferTexture2D(this.frameBufferCube.colorAttachment.glName,this.rctx.gl,36064,s),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this.rctx.setViewport(s.x,s.y,s.width,s.height),this.requestRender(),this._didRenderFaces=!0,e.madeProgress()}get test(){return{coverage:this._coverage,density:this.remap(this._density,0,.3,0,1),absorption:this._sigmaE-1,cloudSize:1-this.remap(this._cloudSize,0,.02,0,1),detailSize:1-this.remap(this._detailSize,0,.2,0,1),smoothness:1-this.remap(this._smoothness,0,.5,0,1),cloudHeight:this.remap(this._cloudHeight,0,1500,0,1)}}};e([c({constructOnly:!0})],T.prototype,"rctx",void 0),e([c({constructOnly:!0})],T.prototype,"view",void 0),e([c({constructOnly:!0})],T.prototype,"requestRender",void 0),e([c()],T.prototype,"_frameTask",void 0),e([c()],T.prototype,"_didRenderFaces",void 0),e([c({readOnly:!0})],T.prototype,"running",null),T=e([u("esri.views.3d.environment.CloudsGenerator")],T);const z=[l(1,0,0),l(-1,0,0),l(0,1,0),l(0,-1,0),l(0,0,1)],R=[l(0,1,0),l(0,1,0),l(0,0,-1),l(0,0,1),l(0,1,0)];class M{constructor(e,t,s,i,r,o,h,a,n=.5){this.coverage=e,this.density=t,this.absorption=s,this.cloudSize=i,this.detailSize=r,this.smoothness=o,this.cloudHeight=h,this.raymarchingStepType=a,this.median=n}}const j={sunny:new M([.1,.7],[.02,.02],[0,0],[.86,.86],[.8,.8],[.5,.5],[.05,.05],0),cloudy:new M([.24,.7],[.135,.2],[0,0],[.5,.5],[.65,.7],[.3,.3],[1,1],2),rainy:new M([.5,.9],[.2,.5],[.3,.6],[.4,.4],[.7,.7],[.5,.5],[1,1],2),foggy:new M([.8,.8],[.5,.5],[0,0],[.85,.85],[.75,.75],[.8,.8],[.3,.3],1)};export{T as CloudsGenerator,j as cloudPresets};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
4
  */
5
- import{releaseMaybe as e,disposeMaybe as t,isNone as i}from"../../../core/maybe.js";import"../../webgl/BufferObject.js";import r from"../../webgl/FramebufferObject.js";import"../../../core/has.js";import"../../webgl/checkWebGLError.js";import"../../webgl/enums.js";import"../../../chunks/builtins.js";import s from"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import{NoiseTextureAtlasTechnique as o}from"./NoiseTextureAtlasTechnique.js";import{createQuadVAO as h}from"../webgl-engine/lib/glUtil3D.js";class a{constructor(e,t){this._shapeTextureDescriptor={target:3553,pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,hasMipmap:!1,width:1,height:1},this._tileSize=1,this._tileRows=1,this._frameBuffer=new r(e,{colorTarget:0}),this._vao=h(e),this.textureAtlas=new s(e,this._shapeTextureDescriptor,null),this._technique=new o({rctx:e,viewingMode:t.state.viewingMode},null)}destroy(){this._technique=e(this._technique),this._frameBuffer=t(this._frameBuffer),this._vao=t(this._vao),this.textureAtlas=t(this.textureAtlas)}render(e,t){if(i(this._vao)||i(this.textureAtlas))return!1;this._tileSize=e,this._tileRows=Math.ceil(Math.sqrt(this._tileSize));const r=(e+2)*this._tileRows;this._frameBuffer.resize(r,r),this.textureAtlas.resize(r,r),this._frameBuffer.attachColorTexture(this.textureAtlas),t.bindFramebuffer(this._frameBuffer);const s=this._technique.program;t.bindVAO(this._vao),s.assertCompatibleVertexAttributeLocations(this._vao),this._technique.bindPipelineState(t),t.useProgram(s),s.setUniform1f("tileSize",this._tileSize),s.setUniform1f("tileRows",this._tileRows);const o=t.getViewport();return t.setViewport(0,0,r,r),t.gl.drawArrays(t.gl.TRIANGLE_STRIP,0,4),this._frameBuffer.detachColorTexture(),t.setViewport(o.x,o.y,o.width,o.height),!0}}export{a as NoiseTextureAtlas};
5
+ import e from"../../../core/has.js";import{releaseMaybe as t,disposeMaybe as r,isNone as i}from"../../../core/maybe.js";import"../../webgl/BufferObject.js";import s from"../../webgl/FramebufferObject.js";import"../../webgl/checkWebGLError.js";import"../../webgl/enums.js";import"../../../chunks/builtins.js";import o from"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import{NoiseTextureAtlasTechnique as a}from"./NoiseTextureAtlasTechnique.js";import{createQuadVAO as h}from"../webgl-engine/lib/glUtil3D.js";const f=e("esri-mobile")?64:128,u=Math.ceil(Math.sqrt(f)),m=(f+2)*u;class l{constructor(e,t){this._shapeTextureDescriptor={target:3553,pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,hasMipmap:!1,width:1,height:1},this._frameBuffer=new s(e,{colorTarget:0}),this._vao=h(e),this.textureAtlas=new o(e,this._shapeTextureDescriptor,null),this._technique=new a({rctx:e,viewingMode:t.state.viewingMode},null)}destroy(){this._technique=t(this._technique),this._frameBuffer=r(this._frameBuffer),this._vao=r(this._vao),this.textureAtlas=r(this.textureAtlas)}render(e){if(i(this._vao)||i(this.textureAtlas))return!1;this._frameBuffer.resize(m,m),this.textureAtlas.resize(m,m),this._frameBuffer.attachColorTexture(this.textureAtlas),e.bindFramebuffer(this._frameBuffer);const t=this._technique.program;e.bindVAO(this._vao),t.assertCompatibleVertexAttributeLocations(this._vao),this._technique.bindPipelineState(e),e.useProgram(t),t.setUniform1f("tileSize",f),t.setUniform1f("tileRows",u);const r=e.getViewport();return e.setViewport(0,0,m,m),e.gl.drawArrays(e.gl.TRIANGLE_STRIP,0,4),this._frameBuffer.detachColorTexture(),e.setViewport(r.x,r.y,r.width,r.height),!0}}export{m as ATLAS_SIZE,l as NoiseTextureAtlas,u as TILE_ROWS,f as TILE_SIZE};
package/views/MapView.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import a from"../core/has.js";import{isIterable as n}from"../core/iteratorUtils.js";import o from"../core/Logger.js";import{isSome as h}from"../core/maybe.js";import{init as l}from"../core/watchUtils.js";import{initialize as p}from"../core/workers/workers.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/accessorSupport/ensureType.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{BreakpointsOwner as u}from"./BreakpointsOwner.js";import{DOMContainer as g}from"./DOMContainer.js";import m from"./MapViewBase.js";import w from"./2d/input/MapViewInputManager.js";import f from"./2d/support/HighlightOptions.js";import y from"./support/createScreenshotPlan.js";import{getMaximumResolutionScale as v,getFormatAndQuality as V}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as b,createScreenPointFromSupportedEvent as _}from"./support/screenUtils.js";import{check as M}from"./support/WebGLRequirements.js";import j from"./ui/2d/DefaultUI2D.js";import L from"../webmap/background/ColorBackground.js";const O=o.getLogger("esri.views.MapView");let S,C,k,E,x,N;async function W(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:r,MagnifierView2D:s,Stage:a}]=await Promise.all([import("./webgl.js"),import("./2d/mapViewDeps.js")]);C=e,k=t,E=i,x=r,N=s,S=a}let P=class extends(u(g(m))){constructor(e){super(e),this._magnifierView=null,this._stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>{var e,t;return[null==(e=this.basemapView)?void 0:e.baseLayerViews,this.layerViews,null==(t=this.basemapView)?void 0:t.referenceLayerViews]},getChildrenFunction:()=>null}),this.floors=new i,this.graphicsView=null,this.highlightOptions=new f,this.inputManager=new w({view:this}),this.mapViewNavigation=null,this.supersampleScreenshotsEnabled=!1,this.ui=new j,this.rendering=!1,p()}destroy(){this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get background(){return this.get("map.initialViewProperties.background")||null}set background(e){void 0===e?this._clearOverride("background"):this._override("background",e)}get textureManager(){return this._stage.painter.textureManager}get navigating(){return!(!this.mapViewNavigation||!this.mapViewNavigation.interacting)}toMap(e){if(b(e)){const t=_(this,e);return super.toMap(t)}return super.toMap(e)}async hitTest(e,t){const i=b(e)?_(this,e):e;if(!this.ready||isNaN(i.x)||isNaN(i.y))return{screenPoint:i,results:[]};let r=new Set,s=!1,a=null,n=null;null!=t&&t.include?q(t.include,U(this,(e=>r.add(e)),(e=>{a||(a=new Set),a.add(e)}),(e=>r.add(e)),(()=>s=!0))):(s=!0,r=new Set(this.allLayerViews)),null!=t&&t.exclude&&q(t.exclude,U(this,(e=>r.delete(e)),(e=>{n||(n=new Set),n.add(e)})));const o=this.allLayerViews.filter((e=>!e.suspended&&r.has(e))).reverse(),l=this.toMap(i);let p=(await Promise.all([s?this.graphicsView.hitTest(l):null,...o.map((e=>e.hitTest(l,i)))])).filter(h).flat();return a&&(p=p.filter((e=>a.has(G(e))))),n&&(p=p.filter((e=>!n.has(G(e))))),{screenPoint:i,results:p.map((e=>({mapPoint:l,graphic:e})))}}takeScreenshot(e){e=e||{};const t=this.supersampleScreenshotsEnabled?Math.min(4,v(this.size,Math.min(4096,this._stage.context.parameters.maxTextureSize))):1;let i;e.layers?(i=[],e.layers.forEach((e=>{const t=this.allLayerViews.find((t=>t.layer.id===e.id));t&&"container"in t&&t.container&&i.push(t.container)}))):i=this._stage.children;const{format:r,quality:s}=V(e.format,e.quality),a=y(e,t,this.size,this.padding,r,s,i,e.rotation);return this._stage.takeScreenshot(a)}on(e,t,i,r){const s=this.inputManager&&this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}forceDOMReadyCycle(){this.forceReadyCycle()}validate(){let e=M({checkMajorWebPerformanceCaveat:!1});return a("safari")&&a("safari")<9&&(e=new s("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:a("safari")})),h(e)?(O.warn("#validate()",e.message),Promise.reject(e)):W()}_startup(){this.timeline.begin("MapView Startup"),super._startup(),this.graphics.owner=this;const e={disabledExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions},t=new S(this.surface,{canvas:this.renderCanvas,supersampleScreenshots:this.supersampleScreenshotsEnabled,contextOptions:e,renderingOptions:this.renderingOptions,timeline:this.timeline}),i=new C({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new k(this.featuresTilingScheme)}),r=new x({view:this,animationManager:this.animationManager}),s=new E({view:this});this._magnifierView=new N,this._magnifierView.magnifier=this.magnifier,this._stage=t,this.frameTask.graphicsView=i,this._set("graphicsView",i),this._set("mapViewNavigation",r),this._set("labelManager",s),this.handles.add([this.rootLayerViews.on("change",(()=>this._updateStageChildren())),t.on("post-render",(()=>this._set("rendering",t.renderRequested))),t.on("will-render",(()=>this._set("rendering",t.renderRequested))),t.on("webgl-error",(e=>this.fatalError=e.error)),l(this,"stationary",(e=>t.stationary=e),!0),l(this,"state.id",(()=>t.state=this.state),!0),l(this,"background",(e=>{t.background=e,this._magnifierView.background=e}),!0),l(this,"magnifier",(e=>this._magnifierView.magnifier=e),!0),l(this,"renderingOptions",(e=>t.renderingOptions=e),!0),l(this,"highlightOptions",(()=>t.highlightOptions=this.highlightOptions),!0)],"map-view"),t.state=this.state,this._updateStageChildren();const a=this._resolveWhenReady;this._resolveWhenReady=[],a.forEach((e=>e(this))),this.timeline.end("MapView Startup")}_teardown(){this.handles.remove("map-view"),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._stage.destroy();this.graphicsView.destroy(),this.mapViewNavigation.destroy(),this._stage=null,this._set("graphicsView",null),this._magnifierView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,super._teardown()}_updateStageChildren(){this._stage.removeAllChildren(),this.rootLayerViews.forEach((e=>{this._stage.addChild(e.container)}));const e=this.graphicsView;this._stage.addChild(e.container),this._stage.addChild(this._magnifierView)}};e([d({type:L})],P.prototype,"background",null),e([d()],P.prototype,"floors",void 0),e([d()],P.prototype,"graphicsView",void 0),e([d({type:f})],P.prototype,"highlightOptions",void 0),e([d({readOnly:!0})],P.prototype,"inputManager",void 0),e([d({readOnly:!0})],P.prototype,"textureManager",null),e([d({readOnly:!0})],P.prototype,"mapViewNavigation",void 0),e([d({type:Boolean})],P.prototype,"navigating",null),e([d({type:Boolean,constructOnly:!0})],P.prototype,"supersampleScreenshotsEnabled",void 0),e([d({type:j})],P.prototype,"ui",void 0),e([d({readOnly:!0})],P.prototype,"rendering",void 0),e([d({constructOnly:!0})],P.prototype,"renderCanvas",void 0),e([d({constructOnly:!0})],P.prototype,"deactivatedWebGLExtensions",void 0),e([d({constructOnly:!0})],P.prototype,"debugWebGLExtensions",void 0),P=e([c("esri.views.MapView")],P);const R=P;function G(e){const t=e.getObjectId();var i,r,s,a;return t?`${null!=(i=null!=(r=null==(s=e.layer)?void 0:s.uid)?r:null==(a=e.sourceLayer)?void 0:a.uid)?i:"MapView"}/${t}`:`"MapView/${e.uid}`}function U(e,i,r,s,a){return n=>{if(n instanceof t){if(n.layer===e)null==a||a();else{const t=e.allLayerViews.find((e=>e.layer===n.layer));t&&(null==s||s(t))}r(G(n))}else{const t=e.allLayerViews.find((e=>e.layer===n));t&&i(t)}}}function q(e,t){if(e)if(n(e))for(const i of e)if(n(i))for(const e of i)t(e);else t(i);else t(e)}export{R as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import a from"../core/has.js";import{isIterable as n}from"../core/iteratorUtils.js";import o from"../core/Logger.js";import{isSome as h}from"../core/maybe.js";import{init as l}from"../core/watchUtils.js";import{initialize as p}from"../core/workers/workers.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/accessorSupport/ensureType.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{BreakpointsOwner as u}from"./BreakpointsOwner.js";import{DOMContainer as g}from"./DOMContainer.js";import m from"./MapViewBase.js";import w from"./2d/input/MapViewInputManager.js";import y from"./2d/support/HighlightOptions.js";import f from"./support/createScreenshotPlan.js";import{getMaximumResolutionScale as v,getFormatAndQuality as V}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as b,createScreenPointFromSupportedEvent as _}from"./support/screenUtils.js";import{check as M}from"./support/WebGLRequirements.js";import j from"./ui/2d/DefaultUI2D.js";import L from"../webmap/background/ColorBackground.js";const O=o.getLogger("esri.views.MapView");let S,C,k,E,x,N;async function W(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:r,MagnifierView2D:s,Stage:a}]=await Promise.all([import("./webgl.js"),import("./2d/mapViewDeps.js")]);C=e,k=t,E=i,x=r,N=s,S=a}let P=class extends(u(g(m))){constructor(e){super(e),this._magnifierView=null,this._stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>{var e,t;return[null==(e=this.basemapView)?void 0:e.baseLayerViews,this.layerViews,null==(t=this.basemapView)?void 0:t.referenceLayerViews]},getChildrenFunction:()=>null}),this.floors=new i,this.graphicsView=null,this.highlightOptions=new y,this.inputManager=new w({view:this}),this.mapViewNavigation=null,this.supersampleScreenshotsEnabled=!1,this.ui=new j,this.rendering=!1,p()}destroy(){this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get background(){return this.get("map.initialViewProperties.background")||null}set background(e){void 0===e?this._clearOverride("background"):this._override("background",e)}get resourceManager(){return this._stage.resourceManager}get textureManager(){return this._stage.painter.textureManager}get navigating(){return!(!this.mapViewNavigation||!this.mapViewNavigation.interacting)}toMap(e){if(b(e)){const t=_(this,e);return super.toMap(t)}return super.toMap(e)}async hitTest(e,t){const i=b(e)?_(this,e):e;if(!this.ready||isNaN(i.x)||isNaN(i.y))return{screenPoint:i,results:[]};let r=new Set,s=!1,a=null,n=null;null!=t&&t.include?q(t.include,U(this,(e=>r.add(e)),(e=>{a||(a=new Set),a.add(e)}),(e=>r.add(e)),(()=>s=!0))):(s=!0,r=new Set(this.allLayerViews)),null!=t&&t.exclude&&q(t.exclude,U(this,(e=>r.delete(e)),(e=>{n||(n=new Set),n.add(e)})));const o=this.allLayerViews.filter((e=>!e.suspended&&r.has(e))).reverse(),l=this.toMap(i);let p=(await Promise.all([s?this.graphicsView.hitTest(l):null,...o.map((e=>e.hitTest(l,i)))])).filter(h).flat();return a&&(p=p.filter((e=>a.has(G(e))))),n&&(p=p.filter((e=>!n.has(G(e))))),{screenPoint:i,results:p.map((e=>({mapPoint:l,graphic:e})))}}takeScreenshot(e){e=e||{};const t=this.supersampleScreenshotsEnabled?Math.min(4,v(this.size,Math.min(4096,this._stage.context.parameters.maxTextureSize))):1;let i;e.layers?(i=[],e.layers.forEach((e=>{const t=this.allLayerViews.find((t=>t.layer.id===e.id));t&&"container"in t&&t.container&&i.push(t.container)}))):i=this._stage.children;const{format:r,quality:s}=V(e.format,e.quality),a=f(e,t,this.size,this.padding,r,s,i,e.rotation);return this._stage.takeScreenshot(a)}on(e,t,i,r){const s=this.inputManager&&this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}forceDOMReadyCycle(){this.forceReadyCycle()}validate(){let e=M({checkMajorWebPerformanceCaveat:!1});return a("safari")&&a("safari")<9&&(e=new s("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:a("safari")})),h(e)?(O.warn("#validate()",e.message),Promise.reject(e)):W()}_startup(){this.timeline.begin("MapView Startup"),super._startup(),this.graphics.owner=this;const e={disabledExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions},t=new S(this.surface,{canvas:this.renderCanvas,supersampleScreenshots:this.supersampleScreenshotsEnabled,contextOptions:e,renderingOptions:this.renderingOptions,timeline:this.timeline}),i=new C({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new k(this.featuresTilingScheme)}),r=new x({view:this,animationManager:this.animationManager}),s=new E({view:this});this._magnifierView=new N,this._magnifierView.magnifier=this.magnifier,this._stage=t,this.frameTask.graphicsView=i,this._set("graphicsView",i),this._set("mapViewNavigation",r),this._set("labelManager",s),this.handles.add([this.rootLayerViews.on("change",(()=>this._updateStageChildren())),t.on("post-render",(()=>this._set("rendering",t.renderRequested))),t.on("will-render",(()=>this._set("rendering",t.renderRequested))),t.on("webgl-error",(e=>this.fatalError=e.error)),l(this,"stationary",(e=>t.stationary=e),!0),l(this,"state.id",(()=>t.state=this.state),!0),l(this,"background",(e=>{t.background=e,this._magnifierView.background=e}),!0),l(this,"magnifier",(e=>this._magnifierView.magnifier=e),!0),l(this,"renderingOptions",(e=>t.renderingOptions=e),!0),l(this,"highlightOptions",(()=>t.highlightOptions=this.highlightOptions),!0)],"map-view"),t.state=this.state,this._updateStageChildren();const a=this._resolveWhenReady;this._resolveWhenReady=[],a.forEach((e=>e(this))),this.timeline.end("MapView Startup")}_teardown(){this.handles.remove("map-view"),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._stage.destroy();this.graphicsView.destroy(),this.mapViewNavigation.destroy(),this._stage=null,this._set("graphicsView",null),this._magnifierView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,super._teardown()}_updateStageChildren(){this._stage.removeAllChildren(),this.rootLayerViews.forEach((e=>{this._stage.addChild(e.container)}));const e=this.graphicsView;this._stage.addChild(e.container),this._stage.addChild(this._magnifierView)}};e([d({type:L})],P.prototype,"background",null),e([d()],P.prototype,"floors",void 0),e([d()],P.prototype,"graphicsView",void 0),e([d({type:y})],P.prototype,"highlightOptions",void 0),e([d({readOnly:!0})],P.prototype,"inputManager",void 0),e([d({readOnly:!0})],P.prototype,"resourceManager",null),e([d({readOnly:!0})],P.prototype,"textureManager",null),e([d({readOnly:!0})],P.prototype,"mapViewNavigation",void 0),e([d({type:Boolean})],P.prototype,"navigating",null),e([d({type:Boolean,constructOnly:!0})],P.prototype,"supersampleScreenshotsEnabled",void 0),e([d({type:j})],P.prototype,"ui",void 0),e([d({readOnly:!0})],P.prototype,"rendering",void 0),e([d({constructOnly:!0})],P.prototype,"renderCanvas",void 0),e([d({constructOnly:!0})],P.prototype,"deactivatedWebGLExtensions",void 0),e([d({constructOnly:!0})],P.prototype,"debugWebGLExtensions",void 0),P=e([c("esri.views.MapView")],P);const R=P;function G(e){const t=e.getObjectId();var i,r,s,a;return t?`${null!=(i=null!=(r=null==(s=e.layer)?void 0:s.uid)?r:null==(a=e.sourceLayer)?void 0:a.uid)?i:"MapView"}/${t}`:`"MapView/${e.uid}`}function U(e,i,r,s,a){return n=>{if(n instanceof t){if(n.layer===e)null==a||a();else{const t=e.allLayerViews.find((e=>e.layer===n.layer));t&&(null==s||s(t))}r(G(n))}else{const t=e.allLayerViews.find((e=>e.layer===n));t&&i(t)}}}function q(e,t){if(e)if(n(e))for(const i of e)if(n(i))for(const e of i)t(e);else t(i);else t(e)}export{R 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.22/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import"../geometry.js";import e from"../Viewpoint.js";import i from"../core/Error.js";import s from"../core/Logger.js";import{isSome as n,isNone as a}from"../core/maybe.js";import{throwIfAborted as r}from"../core/promiseUtils.js";import{createScreenPoint as o}from"../core/screenUtils.js";import{whenTrueOnce as l}from"../core/watchUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{canProject as d,project as m}from"../geometry/support/webMercatorUtils.js";import u from"../layers/support/TileInfo.js";import{PopupView as c}from"./PopupView.js";import g from"./View.js";import y from"./ViewAnimation.js";import f from"./2d/AnimationManager.js";import w from"./2d/FrameTask.js";import{layerView2DImporter as _}from"./2d/layerViewModuleImportUtils.js";import v from"./2d/MapViewConstraints.js";import T from"./2d/PaddedViewState.js";import"./2d/tiling/PagedTileQueue.js";import z from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{centerAt as V,setExtent as S,rotateTo as x,scaleTo as R,copy as j,createAsync as b,resize as O,extentToScale as M}from"./2d/viewpointUtils.js";import I from"./2d/layers/features/support/TileStore.js";import{Timeline as k}from"./2d/support/Timeline.js";import P from"../geometry/Point.js";import G from"../geometry/Extent.js";import E from"../geometry/SpatialReference.js";const L=s.getLogger("esri.views.MapView");function N(t){return t&&"esri.Viewpoint"===t.declaredClass}const q=160;let A=class extends(c(g)){constructor(t){super(t),this._stationaryTimer=null,this.frameTask=new w(this),this.featuresTilingScheme=null,this.fullOpacity=1,this.graphicsView=null,this.initialExtent=null,this.map=null,this.labelManager=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.resizeAlign="center",this.supportsGround=!1,this.timeline=new k,this.type="2d",this.constraints=new v,this.padding={top:0,right:0,bottom:0,left:0};const e=this.handles,i=()=>this.notifyChange("updating");e.add([this.watch("viewpoint",(()=>{this._lastStationaryEventTimestamp=performance.now(),this._flipStationary(q)}),!0),this.on("resize",(t=>this._resizeHandler(t))),this.watch("animationManager.animation",(t=>{this.animation=t})),this.allLayerViews.on("change",(()=>{i(),e.remove("map-view-base-layerViewsUpdating"),e.add(this.allLayerViews.map((t=>t.watch("updating",i))),"map-view-base-layerViewsUpdating")}))],"map-view-base")}destroy(){this.destroyed||(this._set("preconditionsReady",!1),this._gotoTask=this.frameTask=null)}get _defaultsFromMapSettings(){return{required:{tileInfo:!0,heightModelInfo:!1,extent:!1}}}set animation(t){const e=this._get("animation");if(t===e)return;if(e&&e.stop(),!t||t.isFulfilled())return void this._set("animation",null);this._set("animation",t),this.frameTask.animationInProgress=!0;const i=()=>{t===this._get("animation")&&(this._set("animation",null),this.frameTask.requestFrame()),this.frameTask.animationInProgress=!1};t.when(i,i)}get center(){if(!this.ready)return this._get("center");const{center:t,spatialReference:e}=this.state.paddedViewState;return new P({x:t[0],y:t[1],spatialReference:e})}set center(t){if(null==t)return;if(!this._normalizeInput(t))return void L.error("#center",`incompatible spatialReference ${JSON.stringify(t.spatialReference)} with view's spatialReference ${JSON.stringify(this.spatialReference)}`);if(!this.ready)return this._set("center",t),void this.notifyChange("initialExtentRequired");const e=this.viewpoint;V(e,e,t),this.viewpoint=e}set constraints(t){const e=this._get("constraints");e&&(this.handles.remove("map-view-base-constraints"),e.destroy()),this._set("constraints",t),t&&(t.view=this,this.ready&&(this.state.viewpoint=t.fit(this.state.paddedViewState.viewpoint)),this.handles.add(t.on("update",(()=>{this.ready&&this.state&&(this.state.viewpoint=t.fit(this.state.paddedViewState.viewpoint))})),"map-view-base-constraints"))}get extent(){return this.ready?this.state.paddedViewState.extent.clone():this._get("extent")}set extent(t){if(null==t)return;const e=this._normalizeInput(t);if(!e)return void L.error("#center",`incompatible spatialReference ${JSON.stringify(t.spatialReference)} with view's spatialReference ${JSON.stringify(this.spatialReference)}`);if(!e.width||!e.height)return void L.error("#extent","invalid extent size");if(!this.ready)return this._set("extent",e),this._set("center",null),this._set("viewpoint",null),this._set("scale",0),this._set("zoom",-1),void this.notifyChange("initialExtentRequired");const i=this.viewpoint;S(i,i,e,this.size,{constraints:this.constraints}),this.viewpoint=i}get graphicsTileStore(){return new I(this.featuresTilingScheme)}get initialExtentRequired(){const t=this._normalizeInput(this.center),e=this._normalizeInput(this.viewpoint),i=this._normalizeInput(this.extent),{scale:s,constraints:a}=this;let r=this.zoom;return!this.get("map.initialViewProperties.viewpoint")&&(!i&&(a.effectiveLODs||(r=-1),(!t||0===s&&-1===r)&&(!e||!n(e.targetGeometry)||"extent"!==e.targetGeometry.type&&!e.scale)))}get padding(){return this.ready?this.state.padding:this._get("padding")}set padding(t){this.ready?(this.state.padding=t,this._set("padding",this.state.padding)):this._set("padding",t)}get resolution(){return this.state?this.state.resolution:0}get rotation(){return this.ready?this.state.rotation:this._get("rotation")}set rotation(t){if(isNaN(t))return;if(!this.ready)return void this._set("rotation",t);const e=this.viewpoint;x(e,e,t),this.viewpoint=e}get scale(){return this.ready?this.state.scale:this._get("scale")}set scale(t){if(!t||isNaN(t))return;if(!this.ready){this._set("scale",t),this._set("zoom",-1);const e=this._get("extent");return e&&(this._set("extent",null),this._set("center",e.center)),void this.notifyChange("initialExtentRequired")}const e=this.viewpoint;R(e,e,t),this.viewpoint=e}get stationary(){return!(this.animation||this.navigating||this._get("resizing")||this._stationaryTimer)}get updating(){return!this.destroyed&&(!0===this.get("layerViewManager.updating")||!0===this.get("labelManager.updating")||!0===this.get("graphicsView.updating")||this.allLayerViews.some((t=>!t.destroyed&&!("layerViews"in t)&&!0===t.updating)))}get viewpoint(){if(!this.ready)return this._get("viewpoint");const t=this.state.paddedViewState;return t&&t.viewpoint.clone()}set viewpoint(t){if(null==t)return;const i=this._normalizeInput(t);if(!i)return void(!t.scale||isNaN(t.scale)?L.error("#viewpoint",`invalid scale value of ${t.scale}`):a(t.targetGeometry)?L.error("#viewpoint","geometry not defined"):L.error("#viewpoint",`incompatible spatialReference ${JSON.stringify(t.targetGeometry.spatialReference)} with view's spatialReference ${JSON.stringify(this.spatialReference)}`));if(!this.ready)return this._set("viewpoint",i),this._set("extent",null),this._set("center",null),this._set("zoom",-1),this._set("scale",0),void this.notifyChange("initialExtentRequired");const s=new e({targetGeometry:new P,scale:0,rotation:0});j(s,i),this.constraints.constrain(s,this.state.paddedViewState.viewpoint),this.state.viewpoint=s,this.frameTask.requestFrame(),this._set("viewpoint",s)}get zoom(){return this.ready?this.constraints.scaleToZoom(this.scale):this._get("zoom")}set zoom(t){if(null==t)return;if(!this.ready){this.notifyChange("initialExtentRequired"),this._set("zoom",t),this._set("scale",0);const e=this._get("extent");e&&(this._set("extent",null),this._set("center",e.center))}if(!this.constraints.effectiveLODs)return;const e=this.viewpoint;R(e,e,this.constraints.zoomToScale(t)),this.viewpoint=e,this._set("zoom",this.constraints.scaleToZoom(this.scale))}goTo(t,e){if(t)return this.animation&&(this.animation=null),this._createAnimation(),l(this,"ready",e&&e.signal).then((()=>{const i={animate:!0,...e},s=b(t,this);return this.animation.update(s),this._gotoTask={},i.animate?this._gotoAnimated(s,i):this._gotoImmediate(s,i)}));L.error("#goTo()","target cannot be null or undefined")}hitTest(t){return Promise.reject("Should be implemented by subclasses")}popupHitTest(t){return this.hitTest(t).then((e=>({...e,mapPoint:this.toMap(t)})))}toMap(t){if(!this.ready)return null;const e=[0,0],[i,s]=this.state.toMap(e,[t.x,t.y]),n=this.spatialReference;return new P({x:i,y:s,spatialReference:n})}toScreen(t){if(!this.ready)return null;const e=this._normalizeInput(t),i=[e.x,e.y];return this.state.toScreen(i,i),o(i[0],i[1])}pixelSizeAt(){return this.ready?this.state.resolution:(L.error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}getDefaultSpatialReference(){var t,e,i;return this.map&&"initialViewProperties"in this.map&&(null==(t=this.map)||null==(e=t.initialViewProperties)?void 0:e.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||null}getSpatialReferenceSupport({layer:t}){return t||this._get("ready")||null!==this._getDefaultViewpoint()?{}:null}importLayerView(t){return _.importLayerView(t)}hasLayerViewModule(t){return _.hasLayerViewModule(t)}_createAnimation(){return this.animation&&!this.animation.done||(this.animation=new y),this.animation}_cancellableGoTo(t,e,i){const s=()=>t===this._gotoTask,n=i.then((()=>{s()&&(this.animation=null)})).catch((t=>{throw s()&&(this.animation=null,e.done||(e.stop(),this.frameTask.animationInProgress=!1)),t})),a=new Promise((t=>t(n)));return e.when().catch((()=>{s()&&a.cancel&&a.cancel()})),a}_gotoImmediate(t,e){const s=this._gotoTask,n=this.animation,a=t.then((t=>{if(r(e),s!==this._gotoTask)throw new i("view:goto-interrupted","Goto was interrupted");this.viewpoint=n.target=t,n.finish()}));return this._cancellableGoTo(s,n,a)}_gotoAnimated(t,e){const s=this._gotoTask,n=this.animation,a=t.then((t=>{if(r(e),s!==this._gotoTask)throw new i("view:goto-interrupted","Goto was interrupted");return n.update(t),this.animationManager.animate(n,this.viewpoint,e),n.when().then((()=>{}),(()=>{}))}));return this._cancellableGoTo(s,n,a)}_resizeHandler(t){const e=this.state;if(!e)return;let i=this.state.paddedViewState.viewpoint;const s=this.state.paddedViewState.size.concat();e.size=[t.width,t.height],O(i,i,s,this.state.paddedViewState.size,this.resizeAlign),i=this.constraints.constrain(i,null),this.state.viewpoint=i}_startup(){const t=this._getDefaultViewpoint();this.constraints.view=this,this.constraints.fit(t),this._set("animationManager",new f({view:this})),this._set("state",new T({padding:this._get("padding"),size:this.size,viewpoint:t})),this._set("featuresTilingScheme",new z(u.create({spatialReference:this.spatialReference,size:512,numLODs:36}))),this._set("ready",!0),this.frameTask&&this.frameTask.start()}_teardown(){this.frameTask&&this.frameTask.stop(),this._set("ready",!1),this._stationaryTimer&&(clearTimeout(this._stationaryTimer),this._stationaryTimer=null);const{center:[t,e],spatialReference:i,rotation:s,scale:n}=this.state.paddedViewState,a=new P({x:t,y:e,spatialReference:i});this._set("viewpoint",null),this._set("extent",null),this._set("center",a),this._set("zoom",-1),this._set("rotation",s),this._set("scale",n),this._set("spatialReference",i),this.constraints.view=null,this.animationManager.destroy(),this._set("animationManager",null),this._set("state",null),this.animation=null}_flipStationary(t){return null!==this._stationaryTimer||(this._stationaryTimer=setTimeout((()=>{this._stationaryTimer=null;const t=performance.now()-this._lastStationaryEventTimestamp;t<q&&(this._stationaryTimer=this._flipStationary(t))}),t)),this._stationaryTimer}_normalizeInput(t,e=this.spatialReference){const i=t&&t.targetGeometry||t;return e?i?e.equals(i.spatialReference)?t:d(i,e)?N(t)?(t.targetGeometry=m(i,e),t):m(i,e):null:null:t}_getDefaultViewpoint(){const t=this.constraints,i={zoom:this._get("zoom"),scale:this._get("scale"),center:this._normalizeInput(this._get("center")),extent:this._normalizeInput(this._get("extent")),rotation:this._get("rotation"),viewpoint:this._normalizeInput(this._get("viewpoint")),spatialReference:this._userSpatialReference};t.effectiveLODs?-1!==i.zoom&&(i.scale=t.zoomToScale(i.zoom)):i.zoom=-1;let s=null,a=null,r=0;const o=i.viewpoint&&i.viewpoint.rotation,l=i.viewpoint&&i.viewpoint.targetGeometry;n(l)&&("extent"===l.type?s=l:"point"===l.type&&(a=l,r=i.viewpoint.scale));const p=this._normalizeInput(this.get("map.initialViewProperties.viewpoint.targetGeometry.extent")),h=this._normalizeInput(this.initialExtent),d=i.extent||s||p||h,m=i.center||a||d&&d.center,u=this.get("map.initialViewProperties.viewpoint.scale"),c=i.scale||r||u||d&&M(d,this.size),g=this.get("map.initialViewProperties.viewpoint.rotation"),y=i.rotation||o||g||0;return m&&c?new e({targetGeometry:m,scale:c,rotation:y}):null}};t([p()],A.prototype,"_stationaryTimer",void 0),t([p()],A.prototype,"_defaultsFromMapSettings",null),t([p()],A.prototype,"animation",null),t([p({readOnly:!0})],A.prototype,"animationManager",void 0),t([p({value:null,type:P,dependsOn:["state.id","ready"]})],A.prototype,"center",null),t([p({type:v})],A.prototype,"constraints",null),t([p({value:null,type:G,dependsOn:["state.id","ready"]})],A.prototype,"extent",null),t([p({readOnly:!0})],A.prototype,"featuresTilingScheme",void 0),t([p()],A.prototype,"fullOpacity",void 0),t([p({readOnly:!0})],A.prototype,"graphicsTileStore",null),t([p()],A.prototype,"graphicsView",void 0),t([p({type:G})],A.prototype,"initialExtent",void 0),t([p({dependsOn:["map.initialViewProperties?.viewpoint","constraints.effectiveLODs"]})],A.prototype,"initialExtentRequired",null),t([p()],A.prototype,"map",void 0),t([p()],A.prototype,"labelManager",void 0),t([p({value:{top:0,right:0,bottom:0,left:0},cast:t=>({top:0,right:0,bottom:0,left:0,...t})})],A.prototype,"padding",null),t([p({type:Object})],A.prototype,"renderingOptions",void 0),t([p()],A.prototype,"resizeAlign",void 0),t([p({readOnly:!0,dependsOn:["state.id"]})],A.prototype,"resolution",null),t([p({value:0,type:Number,dependsOn:["state.id","ready"]})],A.prototype,"rotation",null),t([p({value:0,type:Number,dependsOn:["state.id","ready"]})],A.prototype,"scale",null),t([p({type:E,dependsOn:["map.initialViewProperties?.spatialReference","defaultsFromMap.ready"]})],A.prototype,"spatialReference",void 0),t([p({readOnly:!0})],A.prototype,"state",void 0),t([p({dependsOn:["animation","navigating","resizing","_stationaryTimer"]})],A.prototype,"stationary",null),t([p({readOnly:!0})],A.prototype,"supportsGround",void 0),t([p({type:k,readOnly:!0})],A.prototype,"timeline",void 0),t([p({readOnly:!0})],A.prototype,"type",void 0),t([p({readOnly:!0,dependsOn:["layerViewManager.updating","labelManager.updating","graphicsView?.updating"]})],A.prototype,"updating",null),t([p({value:null,type:e,dependsOn:["state.id","ready"]})],A.prototype,"viewpoint",null),t([p({value:-1,dependsOn:["state.id"]})],A.prototype,"zoom",null),A=t([h("esri.views.MapViewBase")],A);const U=A;export{U as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import"../geometry.js";import e from"../Viewpoint.js";import i from"../core/Error.js";import s from"../core/Logger.js";import{isSome as n,isNone as a}from"../core/maybe.js";import{throwIfAborted as r}from"../core/promiseUtils.js";import{createScreenPoint as o}from"../core/screenUtils.js";import{whenTrueOnce as l}from"../core/watchUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{canProject as d,project as m}from"../geometry/support/webMercatorUtils.js";import u from"../layers/support/TileInfo.js";import{PopupView as c}from"./PopupView.js";import g from"./View.js";import y from"./ViewAnimation.js";import f from"./2d/AnimationManager.js";import w from"./2d/FrameTask.js";import{layerView2DImporter as _}from"./2d/layerViewModuleImportUtils.js";import v from"./2d/MapViewConstraints.js";import T from"./2d/PaddedViewState.js";import"./2d/tiling/PagedTileQueue.js";import z from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{centerAt as V,setExtent as S,rotateTo as x,scaleTo as R,copy as j,createAsync as b,resize as O,extentToScale as M}from"./2d/viewpointUtils.js";import I from"./2d/layers/features/support/TileStore.js";import{Timeline as k}from"./2d/support/Timeline.js";import P from"../geometry/Point.js";import G from"../geometry/Extent.js";import E from"../geometry/SpatialReference.js";const L=s.getLogger("esri.views.MapView");function N(t){return t&&"esri.Viewpoint"===t.declaredClass}const q=160;let A=class extends(c(g)){constructor(t){super(t),this._stationaryTimer=null,this.frameTask=new w(this),this.featuresTilingScheme=null,this.fullOpacity=1,this.graphicsView=null,this.initialExtent=null,this.map=null,this.labelManager=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.resizeAlign="center",this.supportsGround=!1,this.timeline=new k,this.type="2d",this.constraints=new v,this.padding={top:0,right:0,bottom:0,left:0};const e=this.handles,i=()=>this.notifyChange("updating");e.add([this.watch("viewpoint",(()=>{this._lastStationaryEventTimestamp=performance.now(),this._flipStationary(q)}),!0),this.on("resize",(t=>this._resizeHandler(t))),this.watch("animationManager.animation",(t=>{this.animation=t})),this.allLayerViews.on("change",(()=>{i(),e.remove("map-view-base-layerViewsUpdating"),e.add(this.allLayerViews.map((t=>t.watch("updating",i))),"map-view-base-layerViewsUpdating")}))],"map-view-base")}destroy(){this.destroyed||(this._set("preconditionsReady",!1),this._gotoTask=this.frameTask=null)}get _defaultsFromMapSettings(){return{required:{tileInfo:!0,heightModelInfo:!1,extent:!1}}}set animation(t){const e=this._get("animation");if(t===e)return;if(e&&e.stop(),!t||t.isFulfilled())return void this._set("animation",null);this._set("animation",t),this.frameTask.animationInProgress=!0;const i=()=>{t===this._get("animation")&&(this._set("animation",null),this.frameTask.requestFrame()),this.frameTask.animationInProgress=!1};t.when(i,i)}get center(){if(!this.ready)return this._get("center");const{center:t,spatialReference:e}=this.state.paddedViewState;return new P({x:t[0],y:t[1],spatialReference:e})}set center(t){if(null==t)return;if(!this._normalizeInput(t))return void L.error("#center",`incompatible spatialReference ${JSON.stringify(t.spatialReference)} with view's spatialReference ${JSON.stringify(this.spatialReference)}`);if(!this.ready)return this._set("center",t),void this.notifyChange("initialExtentRequired");const e=this.viewpoint;V(e,e,t),this.viewpoint=e}set constraints(t){const e=this._get("constraints");e&&(this.handles.remove("map-view-base-constraints"),e.destroy()),this._set("constraints",t),t&&(t.view=this,this.ready&&(this.state.viewpoint=t.fit(this.state.paddedViewState.viewpoint)),this.handles.add(t.on("update",(()=>{this.ready&&this.state&&(this.state.viewpoint=t.fit(this.state.paddedViewState.viewpoint))})),"map-view-base-constraints"))}get extent(){return this.ready?this.state.paddedViewState.extent.clone():this._get("extent")}set extent(t){if(null==t)return;const e=this._normalizeInput(t);if(!e)return void L.error("#center",`incompatible spatialReference ${JSON.stringify(t.spatialReference)} with view's spatialReference ${JSON.stringify(this.spatialReference)}`);if(!e.width||!e.height)return void L.error("#extent","invalid extent size");if(!this.ready)return this._set("extent",e),this._set("center",null),this._set("viewpoint",null),this._set("scale",0),this._set("zoom",-1),void this.notifyChange("initialExtentRequired");const i=this.viewpoint;S(i,i,e,this.size,{constraints:this.constraints}),this.viewpoint=i}get graphicsTileStore(){return new I(this.featuresTilingScheme)}get initialExtentRequired(){const t=this._normalizeInput(this.center),e=this._normalizeInput(this.viewpoint),i=this._normalizeInput(this.extent),{scale:s,constraints:a}=this;let r=this.zoom;return!this.get("map.initialViewProperties.viewpoint")&&(!i&&(a.effectiveLODs||(r=-1),(!t||0===s&&-1===r)&&(!e||!n(e.targetGeometry)||"extent"!==e.targetGeometry.type&&!e.scale)))}get padding(){return this.ready?this.state.padding:this._get("padding")}set padding(t){this.ready?(this.state.padding=t,this._set("padding",this.state.padding)):this._set("padding",t)}get resolution(){return this.state?this.state.resolution:0}get rotation(){return this.ready?this.state.rotation:this._get("rotation")}set rotation(t){if(isNaN(t))return;if(!this.ready)return void this._set("rotation",t);const e=this.viewpoint;x(e,e,t),this.viewpoint=e}get scale(){return this.ready?this.state.scale:this._get("scale")}set scale(t){if(!t||isNaN(t))return;if(!this.ready){this._set("scale",t),this._set("zoom",-1);const e=this._get("extent");return e&&(this._set("extent",null),this._set("center",e.center)),void this.notifyChange("initialExtentRequired")}const e=this.viewpoint;R(e,e,t),this.viewpoint=e}get stationary(){return!(this.animation||this.navigating||this._get("resizing")||this._stationaryTimer)}get updating(){return!this.destroyed&&(!0===this.get("layerViewManager.updating")||!0===this.get("labelManager.updating")||!0===this.get("graphicsView.updating")||this.allLayerViews.some((t=>!t.destroyed&&!("layerViews"in t)&&!0===t.updating)))}get viewpoint(){if(!this.ready)return this._get("viewpoint");const t=this.state.paddedViewState;return t&&t.viewpoint.clone()}set viewpoint(t){if(null==t)return;const i=this._normalizeInput(t);if(!i)return void(!t.scale||isNaN(t.scale)?L.error("#viewpoint",`invalid scale value of ${t.scale}`):a(t.targetGeometry)?L.error("#viewpoint","geometry not defined"):L.error("#viewpoint",`incompatible spatialReference ${JSON.stringify(t.targetGeometry.spatialReference)} with view's spatialReference ${JSON.stringify(this.spatialReference)}`));if(!this.ready)return this._set("viewpoint",i),this._set("extent",null),this._set("center",null),this._set("zoom",-1),this._set("scale",0),void this.notifyChange("initialExtentRequired");const s=new e({targetGeometry:new P,scale:0,rotation:0});j(s,i),this.constraints.constrain(s,this.state.paddedViewState.viewpoint),this.state.viewpoint=s,this.frameTask.requestFrame(),this._set("viewpoint",s)}get zoom(){return this.ready?this.constraints.scaleToZoom(this.scale):this._get("zoom")}set zoom(t){if(null==t)return;if(!this.ready){this.notifyChange("initialExtentRequired"),this._set("zoom",t),this._set("scale",0);const e=this._get("extent");e&&(this._set("extent",null),this._set("center",e.center))}if(!this.constraints.effectiveLODs)return;const e=this.viewpoint;R(e,e,this.constraints.zoomToScale(t)),this.viewpoint=e,this._set("zoom",this.constraints.scaleToZoom(this.scale))}goTo(t,e){if(t)return this.animation&&(this.animation=null),this._createAnimation(),l(this,"ready",e&&e.signal).then((()=>{const i={animate:!0,...e},s=b(t,this);return this.animation.update(s),this._gotoTask={},i.animate?this._gotoAnimated(s,i):this._gotoImmediate(s,i)}));L.error("#goTo()","target cannot be null or undefined")}hitTest(t){return Promise.reject("Should be implemented by subclasses")}popupHitTest(t){return this.hitTest(t).then((e=>({...e,mapPoint:this.toMap(t)})))}toMap(t){if(!this.ready)return null;const e=[0,0],[i,s]=this.state.toMap(e,[t.x,t.y]),n=this.spatialReference;return new P({x:i,y:s,spatialReference:n})}toScreen(t){if(!this.ready)return null;const e=this._normalizeInput(t),i=[e.x,e.y];return this.state.toScreen(i,i),o(i[0],i[1])}pixelSizeAt(){return this.ready?this.state.resolution:(L.error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}getDefaultSpatialReference(){var t,e,i;return this.map&&"initialViewProperties"in this.map&&(null==(t=this.map)||null==(e=t.initialViewProperties)?void 0:e.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||null}getSpatialReferenceSupport({layer:t}){return t||this._get("ready")||null!==this._getDefaultViewpoint()?{}:null}importLayerView(t){return _.importLayerView(t)}hasLayerViewModule(t){return _.hasLayerViewModule(t)}_createAnimation(){return this.animation&&!this.animation.done||(this.animation=new y),this.animation}_cancellableGoTo(t,e,i){const s=()=>t===this._gotoTask,n=i.then((()=>{s()&&(this.animation=null)})).catch((t=>{throw s()&&(this.animation=null,e.done||(e.stop(),this.frameTask.animationInProgress=!1)),t})),a=new Promise((t=>t(n)));return e.when().catch((()=>{s()&&a.cancel&&a.cancel()})),a}_gotoImmediate(t,e){const s=this._gotoTask,n=this.animation,a=t.then((t=>{if(r(e),s!==this._gotoTask)throw new i("view:goto-interrupted","Goto was interrupted");this.viewpoint=n.target=t,n.finish()}));return this._cancellableGoTo(s,n,a)}_gotoAnimated(t,e){const s=this._gotoTask,n=this.animation,a=t.then((t=>{if(r(e),s!==this._gotoTask)throw new i("view:goto-interrupted","Goto was interrupted");return n.update(t),this.animationManager.animate(n,this.viewpoint,e),n.when().then((()=>{}),(()=>{}))}));return this._cancellableGoTo(s,n,a)}_resizeHandler(t){const e=this.state;if(!e)return;let i=this.state.paddedViewState.viewpoint;const s=this.state.paddedViewState.size.concat();e.size=[t.width,t.height],O(i,i,s,this.state.paddedViewState.size,this.resizeAlign),i=this.constraints.constrain(i,null),this.state.viewpoint=i}_startup(){const t=this._getDefaultViewpoint();this.constraints.view=this,this.constraints.fit(t),this._set("animationManager",new f({view:this})),this._set("state",new T({padding:this._get("padding"),size:this.size,viewpoint:t})),this._set("featuresTilingScheme",new z(u.create({spatialReference:this.spatialReference,size:512,numLODs:36}))),this._set("ready",!0),this.frameTask&&this.frameTask.start()}_teardown(){this.frameTask&&this.frameTask.stop(),this._set("ready",!1),this._stationaryTimer&&(clearTimeout(this._stationaryTimer),this._stationaryTimer=null);const{center:[t,e],spatialReference:i,rotation:s,scale:n}=this.state.paddedViewState,a=new P({x:t,y:e,spatialReference:i});this._set("viewpoint",null),this._set("extent",null),this._set("center",a),this._set("zoom",-1),this._set("rotation",s),this._set("scale",n),this._set("spatialReference",i),this.constraints.view=null,this.animationManager.destroy(),this._set("animationManager",null),this._set("state",null),this.animation=null}_flipStationary(t){return null!==this._stationaryTimer||(this._stationaryTimer=setTimeout((()=>{this._stationaryTimer=null;const t=performance.now()-this._lastStationaryEventTimestamp;t<q&&(this._stationaryTimer=this._flipStationary(t))}),t)),this._stationaryTimer}_normalizeInput(t,e=this.spatialReference){const i=t&&t.targetGeometry||t;return e?i?e.equals(i.spatialReference)?t:d(i,e)?N(t)?(t.targetGeometry=m(i,e),t):m(i,e):null:null:t}_getDefaultViewpoint(){const t=this.constraints,i={zoom:this._get("zoom"),scale:this._get("scale"),center:this._normalizeInput(this._get("center")),extent:this._normalizeInput(this._get("extent")),rotation:this._get("rotation"),viewpoint:this._normalizeInput(this._get("viewpoint")),spatialReference:this._userSpatialReference};t.effectiveLODs?-1!==i.zoom&&(i.scale=t.zoomToScale(i.zoom)):i.zoom=-1;let s=null,a=null,r=0;const o=i.viewpoint&&i.viewpoint.rotation,l=i.viewpoint&&i.viewpoint.targetGeometry;n(l)&&("extent"===l.type?s=l:"point"===l.type&&(a=l,r=i.viewpoint.scale));const p=this._normalizeInput(this.get("map.initialViewProperties.viewpoint.targetGeometry.extent")),h=this._normalizeInput(this.initialExtent),d=i.extent||s||p||h,m=i.center||a||d&&d.center,u=this.get("map.initialViewProperties.viewpoint.scale"),c=i.scale||r||u||d&&M(d,this.size),g=this.get("map.initialViewProperties.viewpoint.rotation"),y=i.rotation||o||g||0;return m&&c?new e({targetGeometry:m,scale:c,rotation:y}):null}};t([p()],A.prototype,"_stationaryTimer",void 0),t([p()],A.prototype,"_defaultsFromMapSettings",null),t([p()],A.prototype,"animation",null),t([p({readOnly:!0})],A.prototype,"animationManager",void 0),t([p({value:null,type:P,dependsOn:["state.id","ready"]})],A.prototype,"center",null),t([p({type:v})],A.prototype,"constraints",null),t([p({value:null,type:G,dependsOn:["state.id","ready"]})],A.prototype,"extent",null),t([p({readOnly:!0})],A.prototype,"featuresTilingScheme",void 0),t([p()],A.prototype,"fullOpacity",void 0),t([p({readOnly:!0})],A.prototype,"graphicsTileStore",null),t([p()],A.prototype,"graphicsView",void 0),t([p({type:G})],A.prototype,"initialExtent",void 0),t([p({dependsOn:["map.initialViewProperties?.viewpoint","constraints.effectiveLODs","spatialReference"]})],A.prototype,"initialExtentRequired",null),t([p()],A.prototype,"map",void 0),t([p()],A.prototype,"labelManager",void 0),t([p({value:{top:0,right:0,bottom:0,left:0},cast:t=>({top:0,right:0,bottom:0,left:0,...t})})],A.prototype,"padding",null),t([p({type:Object})],A.prototype,"renderingOptions",void 0),t([p()],A.prototype,"resizeAlign",void 0),t([p({readOnly:!0,dependsOn:["state.id"]})],A.prototype,"resolution",null),t([p({value:0,type:Number,dependsOn:["state.id","ready"]})],A.prototype,"rotation",null),t([p({value:0,type:Number,dependsOn:["state.id","ready"]})],A.prototype,"scale",null),t([p({type:E,dependsOn:["map.initialViewProperties?.spatialReference","defaultsFromMap.ready"]})],A.prototype,"spatialReference",void 0),t([p({readOnly:!0})],A.prototype,"state",void 0),t([p({dependsOn:["animation","navigating","resizing","_stationaryTimer"]})],A.prototype,"stationary",null),t([p({readOnly:!0})],A.prototype,"supportsGround",void 0),t([p({type:k,readOnly:!0})],A.prototype,"timeline",void 0),t([p({readOnly:!0})],A.prototype,"type",void 0),t([p({readOnly:!0,dependsOn:["layerViewManager.updating","labelManager.updating","graphicsView?.updating"]})],A.prototype,"updating",null),t([p({value:null,type:e,dependsOn:["state.id","ready"]})],A.prototype,"viewpoint",null),t([p({value:-1,dependsOn:["state.id"]})],A.prototype,"zoom",null),A=t([h("esri.views.MapViewBase")],A);const U=A;export{U as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import{isSome as t,isNone as o}from"../../core/maybe.js";import{webglValidateShadersEnabled as i}from"./checkWebGLError.js";import{ResourceType as r}from"./enums.js";import{transpileShader as n}from"./ShaderTranspiler.js";class e{constructor(t,o,i,n){this._context=t,this._locations=n,this._nameToUniformLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},t||console.error("RenderingContext isn't initialized!"),0===o.length&&console.error("Shaders source should not be empty!"),this._vShader=m(this._context,35633,o),this._fShader=m(this._context,35632,i),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(r.VertexShader,this),this._context.instanceCounter.increment(r.FragmentShader,this)}get glName(){if(t(this._glName))return this._glName;if(o(this._vShader))return null;const n=this._context.gl,e=n.createProgram();return n.attachShader(e,this._vShader),n.attachShader(e,this._fShader),this._locations.forEach(((t,o)=>n.bindAttribLocation(e,t,o))),n.linkProgram(e),i()&&!n.getProgramParameter(e,n.LINK_STATUS)&&console.error("Could not initialize shader\nVALIDATE_STATUS: "+n.getProgramParameter(e,n.VALIDATE_STATUS)+", gl error ["+n.getError()+"]infoLog: "+n.getProgramInfoLog(e)),this._glName=e,this._context.instanceCounter.increment(r.Program,this),e}dispose(){const t=this._context.gl;this._vShader&&(t.deleteShader(this._vShader),this._vShader=null,this._context.instanceCounter.decrement(r.VertexShader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null,this._context.instanceCounter.decrement(r.FragmentShader,this)),this._glName&&(t.deleteProgram(this._glName),this._glName=null,this._context.instanceCounter.decrement(r.Program,this))}_getUniformLocation(t){return void 0===this._nameToUniformLocation[t]&&(this._nameToUniformLocation[t]=this._context.gl.getUniformLocation(this.glName,t)),this._nameToUniformLocation[t]}hasUniform(t){return null!==this._getUniformLocation(t)}setUniform1i(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.useProgram(this);this._context.gl.uniform1i(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1iv(t,o){const i=this._nameToUniform1v[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform1iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):f(o,i)}}setUniform2iv(t,o){const i=this._nameToUniform2[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform2iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):f(o,i)}}setUniform3iv(t,o){const i=this._nameToUniform3[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform3iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):f(o,i)}}setUniform4iv(t,o){const i=this._nameToUniform4[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform4iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):f(o,i)}}setUniform1f(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.useProgram(this);this._context.gl.uniform1f(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1fv(t,o){const i=this._nameToUniform1v[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform1fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):f(o,i)}}setUniform2f(t,o,i){const r=this._nameToUniform2[t];if(void 0===r||o!==r[0]||i!==r[1]){this._context.useProgram(this);this._context.gl.uniform2f(this._getUniformLocation(t),o,i),void 0===r?this._nameToUniform2[t]=[o,i]:(r[0]=o,r[1]=i)}}setUniform2fv(t,o){const i=this._nameToUniform2[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform2fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):f(o,i)}}setUniform3f(t,o,i,r){const n=this._nameToUniform3[t];if(void 0===n||o!==n[0]||i!==n[1]||r!==n[2]){this._context.useProgram(this);this._context.gl.uniform3f(this._getUniformLocation(t),o,i,r),void 0===n?this._nameToUniform3[t]=[o,i,r]:(n[0]=o,n[1]=i,n[2]=r)}}setUniform3fv(t,o){const i=this._nameToUniform3[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform3fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):f(o,i)}}setUniform4f(t,o,i,r,n){const e=this._nameToUniform4[t];if(void 0===e||o!==e[0]||i!==e[1]||r!==e[2]||n!==e[3]){this._context.useProgram(this);this._context.gl.uniform4f(this._getUniformLocation(t),o,i,r,n),void 0===e?this._nameToUniform4[t]=[o,i,r,n]:(e[0]=o,e[1]=i,e[2]=r,e[3]=n)}}setUniform4fv(t,o){const i=this._nameToUniform4[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform4fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):f(o,i)}}setUniformMatrix3fv(t,o,i=!1,r=!1){const n=this._nameToUniformMatrix3[t];if(r?n!==o:c(n,o)){this._context.useProgram(this);this._context.gl.uniformMatrix3fv(this._getUniformLocation(t),i,o),void 0===n?this._nameToUniformMatrix3[t]=Array.from(o):f(o,n)}}setUniformMatrix4fv(t,o,i=!1){const r=this._nameToUniformMatrix4[t];if(_(r,o)){this._context.useProgram(this);this._context.gl.uniformMatrix4fv(this._getUniformLocation(t),i,o),void 0===r?this._nameToUniformMatrix4[t]=Array.from(o):f(o,r)}}assertCompatibleVertexAttributeLocations(t){t.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){}}function s(t,i){if(o(t)||t.length!==i.length)return!0;for(let o=0;o<t.length;++o)if(t[o]!==i[o])return!0;return!1}function m(t,o,r){const e="webgl2"===t.webglVersion?n(r,o):r,s=t.gl,m=s.createShader(o);return s.shaderSource(m,e),s.compileShader(m),i()&&!s.getShaderParameter(m,s.COMPILE_STATUS)&&(console.error("Compile error in ".concat(35633===o?"vertex":"fragment"," shader")),console.error(s.getShaderInfoLog(m)),console.error(a(e)),"webgl2"===t.webglVersion&&(console.log("Shader source before transpilation:"),console.log(r))),m}function a(t){let o=2;return t.replace(/\n/g,(()=>"\n"+h(o++)+":"))}function h(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function f(t,o){for(let i=0;i<t.length;++i)o[i]=t[i]}function c(t,i){return!!o(t)||(9!==t.length?s(t,i):9!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8])}function _(t,i){return!!o(t)||(16!==t.length?s(t,i):16!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8]||t[9]!==i[9]||t[10]!==i[10]||t[11]!==i[11]||t[12]!==i[12]||t[13]!==i[13]||t[14]!==i[14]||t[15]!==i[15])}export{e as Program};
5
+ import"../../core/has.js";import{isSome as t,isNone as o}from"../../core/maybe.js";import{webglValidateShadersEnabled as i}from"./checkWebGLError.js";import{ResourceType as r}from"./enums.js";import{transpileShader as e}from"./ShaderTranspiler.js";class n{constructor(t,o,i,e){this._context=t,this._locations=e,this._nameToUniformLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},t||console.error("RenderingContext isn't initialized!"),0===o.length&&console.error("Shaders source should not be empty!"),this._vShader=m(this._context,35633,o),this._fShader=m(this._context,35632,i),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(r.VertexShader,this),this._context.instanceCounter.increment(r.FragmentShader,this)}get glName(){if(t(this._glName))return this._glName;if(o(this._vShader))return null;const e=this._context.gl,n=e.createProgram();return e.attachShader(n,this._vShader),e.attachShader(n,this._fShader),this._locations.forEach(((t,o)=>e.bindAttribLocation(n,t,o))),e.linkProgram(n),i()&&!e.getProgramParameter(n,e.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${e.getProgramParameter(n,e.VALIDATE_STATUS)}, gl error ${e.getError()}, vertex: ${e.getShaderParameter(this._vShader,e.COMPILE_STATUS)}, fragment: ${e.getShaderParameter(this._fShader,e.COMPILE_STATUS)}, info log: ${e.getProgramInfoLog(n)}`),this._glName=n,this._context.instanceCounter.increment(r.Program,this),n}dispose(){const t=this._context.gl;this._vShader&&(t.deleteShader(this._vShader),this._vShader=null,this._context.instanceCounter.decrement(r.VertexShader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null,this._context.instanceCounter.decrement(r.FragmentShader,this)),this._glName&&(t.deleteProgram(this._glName),this._glName=null,this._context.instanceCounter.decrement(r.Program,this))}_getUniformLocation(t){return void 0===this._nameToUniformLocation[t]&&(this._nameToUniformLocation[t]=this._context.gl.getUniformLocation(this.glName,t)),this._nameToUniformLocation[t]}hasUniform(t){return null!==this._getUniformLocation(t)}setUniform1i(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.useProgram(this);this._context.gl.uniform1i(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1iv(t,o){const i=this._nameToUniform1v[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform1iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):f(o,i)}}setUniform2iv(t,o){const i=this._nameToUniform2[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform2iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):f(o,i)}}setUniform3iv(t,o){const i=this._nameToUniform3[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform3iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):f(o,i)}}setUniform4iv(t,o){const i=this._nameToUniform4[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform4iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):f(o,i)}}setUniform1f(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.useProgram(this);this._context.gl.uniform1f(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1fv(t,o){const i=this._nameToUniform1v[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform1fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):f(o,i)}}setUniform2f(t,o,i){const r=this._nameToUniform2[t];if(void 0===r||o!==r[0]||i!==r[1]){this._context.useProgram(this);this._context.gl.uniform2f(this._getUniformLocation(t),o,i),void 0===r?this._nameToUniform2[t]=[o,i]:(r[0]=o,r[1]=i)}}setUniform2fv(t,o){const i=this._nameToUniform2[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform2fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):f(o,i)}}setUniform3f(t,o,i,r){const e=this._nameToUniform3[t];if(void 0===e||o!==e[0]||i!==e[1]||r!==e[2]){this._context.useProgram(this);this._context.gl.uniform3f(this._getUniformLocation(t),o,i,r),void 0===e?this._nameToUniform3[t]=[o,i,r]:(e[0]=o,e[1]=i,e[2]=r)}}setUniform3fv(t,o){const i=this._nameToUniform3[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform3fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):f(o,i)}}setUniform4f(t,o,i,r,e){const n=this._nameToUniform4[t];if(void 0===n||o!==n[0]||i!==n[1]||r!==n[2]||e!==n[3]){this._context.useProgram(this);this._context.gl.uniform4f(this._getUniformLocation(t),o,i,r,e),void 0===n?this._nameToUniform4[t]=[o,i,r,e]:(n[0]=o,n[1]=i,n[2]=r,n[3]=e)}}setUniform4fv(t,o){const i=this._nameToUniform4[t];if(s(i,o)){this._context.useProgram(this);this._context.gl.uniform4fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):f(o,i)}}setUniformMatrix3fv(t,o,i=!1,r=!1){const e=this._nameToUniformMatrix3[t];if(r?e!==o:c(e,o)){this._context.useProgram(this);this._context.gl.uniformMatrix3fv(this._getUniformLocation(t),i,o),void 0===e?this._nameToUniformMatrix3[t]=Array.from(o):f(o,e)}}setUniformMatrix4fv(t,o,i=!1){const r=this._nameToUniformMatrix4[t];if(_(r,o)){this._context.useProgram(this);this._context.gl.uniformMatrix4fv(this._getUniformLocation(t),i,o),void 0===r?this._nameToUniformMatrix4[t]=Array.from(o):f(o,r)}}assertCompatibleVertexAttributeLocations(t){t.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){}}function s(t,i){if(o(t)||t.length!==i.length)return!0;for(let o=0;o<t.length;++o)if(t[o]!==i[o])return!0;return!1}function m(t,o,r){const n="webgl2"===t.webglVersion?e(r,o):r,s=t.gl,m=s.createShader(o);return s.shaderSource(m,n),s.compileShader(m),i()&&!s.getShaderParameter(m,s.COMPILE_STATUS)&&(console.error("Compile error in ".concat(35633===o?"vertex":"fragment"," shader")),console.error(s.getShaderInfoLog(m)),console.error(a(n)),"webgl2"===t.webglVersion&&(console.log("Shader source before transpilation:"),console.log(r))),m}function a(t){let o=2;return t.replace(/\n/g,(()=>"\n"+h(o++)+":"))}function h(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function f(t,o){for(let i=0;i<t.length;++i)o[i]=t[i]}function c(t,i){return!!o(t)||(9!==t.length?s(t,i):9!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8])}function _(t,i){return!!o(t)||(16!==t.length?s(t,i):16!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8]||t[9]!==i[9]||t[10]!==i[10]||t[11]!==i[11]||t[12]!==i[12]||t[13]!==i[13]||t[14]!==i[14]||t[15]!==i[15])}export{n as Program};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/maybe.js";import{aliasOf as i}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{R as a}from"../chunks/ResizeObserver.js";import n from"./Widget.js";import o from"./Histogram/HistogramViewModel.js";import"./support/widgetUtils.js";import{messageBundle as l}from"./support/decorators/messageBundle.js";import"../core/Logger.js";import{tsx as d}from"./support/jsxFactory.js";import{substitute as h}from"../intl/substitute.js";var u;const c={base:"esri-histogram",horizontalLayout:"esri-histogram--horizontal",verticalLayout:"esri-histogram--vertical",content:"esri-histogram__content",svg:"esri-histogram__svg",bar:"esri-histogram__bar",bars:"esri-histogram__bars",label:"esri-histogram__label",dataLines:"esri-histogram__data-lines",dataLinesSubgroup:"esri-histogram__data-lines-subgroup",dataLine:"esri-histogram__data-line",averageLabel:"esri-histogram__average-label",averageDataLine:"esri-histogram__average-data-line",averageSymbol:"esri-histogram__average-symbol",esriWidget:"esri-widget",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"};let g=u=class extends n{constructor(e,t){super(e,t),this._bgFillId=null,this._containerNode=null,this._containerOffsetHeight=0,this._containerOffsetWidth=0,this._defaultBarColor="#d8d8d8",this._observer=null,this.average=null,this.barCreatedFunction=null,this.bins=null,this.dataLines=null,this.dataLineCreatedFunction=null,this.dataLineUpdatedFunction=null,this.label=void 0,this.labelFormatFunction=null,this.max=null,this.messages=null,this.min=null,this.state=null,this.viewModel=new o,this._observer=new a((()=>this._storeContainerDimensions())),this._bgFillId=`${this.id}-bg-fill`}destroy(){this._containerNode&&this._observer.unobserve(this._containerNode)}set layout(e){"vertical"!==e&&(e="horizontal"),this._set("layout",e)}static fromHistogramResult(e){const{bins:t,maxValue:i,minValue:s}=e;return new u({bins:t,max:i,min:s})}render(){const{label:e,layout:t,state:i}=this,s=this.classes(c.base,c.esriWidget,"horizontal"===t?c.horizontalLayout:c.verticalLayout,"disabled"===i?c.disabled:null);return d("div",{"aria-label":e,afterCreate:this._afterContainerNodeCreate,bind:this,class:s,"data-node-ref":"_containerNode"},"ready"===i?this.renderContent():null)}renderContent(){if(!this._containerNode)return;const e=this._bgFillId,t=`clip-path: url(#${e})`;return d("div",{class:c.content},d("svg",{class:c.svg,xmlns:"http://www.w3.org/2000/svg"},d("defs",null,this.renderFillDefinition(e)),d("g",{style:t},this.renderBarsGroup()),this.renderLinesGroup()))}renderBarsGroup(){return d("g",{class:this.classes(c.bars)},this.renderBars())}renderBars(){const{layout:e,viewModel:{binRange:t,range:i}}=this;if(!t||!i)return;const s=t/i,[r,a]=this._getContainerDimensions();if(0===r&&0===a)return;if(0===r&&0!==a)return void this.scheduleRender();const[n,o]="vertical"===e?[r*s,a]:[r,a*s];return this._getBarDimensions(n,o).map((([e,t],i)=>this.renderBar(i,e,t)))}renderBar(e,t,i){const{bins:s,layout:r,max:a,messages:n,viewModel:{range:o}}=this,[l,u]=this._getContainerDimensions(),g=s.slice()[e],{count:p,maxValue:m,minValue:b}=g,_=a-m,[v,f]="vertical"===r?[0,_*(l/o)]:[u-i-_*(u/o),l-t],L=h(n.barLabel,{count:p,maxValue:m,minValue:b});return d("rect",{"aria-label":L,afterCreate:this._afterBarCreate,bind:this,class:c.bar,"data-index":e,fill:this._defaultBarColor,height:t,role:"img","shape-rendering":"crispEdges","stroke-width":"0",width:i,x:v,y:f})}renderLinesGroup(){return d("g",{class:this.classes(c.dataLines)},this.renderAverageLine(),this.renderCustomLines())}renderAverageLine(){const{average:e}=this;if(!t(e))return;const i=[d("tspan",{class:this.classes(c.averageSymbol)},"x̄ "),d("tspan",{class:this.classes(c.averageLabel)},this.labelFormatFunction?this.labelFormatFunction(e,"average"):e)];return d("g",{afterCreate:this._afterLinesSubgroupCreate,afterUpdate:this._afterLinesSubgroupUpdate,bind:this,class:this.classes(c.dataLinesSubgroup)},d("title",{key:"title"},e),this.renderLine(e,this.classes(c.averageDataLine)),this.renderLabel(e,i))}renderCustomLines(){if(this.dataLines&&this.dataLines.length)return this.dataLines.map((({value:e,label:t},i)=>this.renderLineSubgroup(i,e,t)))}renderLineSubgroup(e,t,i){return d("g",{afterCreate:this._afterLinesSubgroupCreate,afterUpdate:this._afterLinesSubgroupUpdate,bind:this,class:this.classes(c.dataLinesSubgroup),"data-index":e},d("title",{key:"title"},t),this.renderLine(t),this.renderLabel(t,i))}renderLine(e,t){const[i,s,r,a]=this._getLinePosition(e);return d("line",{class:this.classes(c.dataLine,t),x1:i,x2:s,y1:r,y2:a,"shape-rendering":"crispEdges"})}renderLabel(e,t,i){const[s,r]=this._getLabelPosition(e),a=2;return d("text",{class:this.classes(c.label,i),"text-anchor":"end",transform:"horizontal"===this.layout?"rotate(270)":null,x:s,y:r-a},t)}renderFillDefinition(e){const[t,i]=this._getContainerDimensions();return d("clipPath",{id:e},d("rect",{x:"0",y:"0",width:i,height:t}))}_afterContainerNodeCreate(e){this._containerNode&&this._observer.unobserve(this._containerNode),this._containerNode=e,this._observer.observe(this._containerNode),this._storeContainerDimensions()}_afterBarCreate(e){if(this.barCreatedFunction){const t=e.dataset?parseInt(e.dataset.index,10):e.getAttribute("data-index")?parseInt(e.getAttribute("data-index"),10):null;this.barCreatedFunction(isNaN(t)?null:t,e)}}_afterLinesSubgroupCreate(e){if(this.dataLineCreatedFunction){const t=e.dataset?parseInt(e.dataset.index,10):e.getAttribute("data-index")?parseInt(e.getAttribute("data-index"),10):null,i=e.childNodes[0],s=e.childNodes[1]?e.childNodes[1]:null;this.dataLineCreatedFunction(i,s,isNaN(t)?null:t)}}_afterLinesSubgroupUpdate(e){if(this.dataLineUpdatedFunction){const t=e.dataset?parseInt(e.dataset.index,10):e.getAttribute("data-index")?parseInt(e.getAttribute("data-index"),10):null,i=e.childNodes[0],s=e.childNodes[1]?e.childNodes[1]:null;this.dataLineUpdatedFunction(i,s,isNaN(t)?null:t)}}_storeContainerDimensions(){const{_containerNode:e}=this;e&&(this._containerOffsetHeight=e.offsetHeight,this._containerOffsetWidth=e.offsetWidth)}_getContainerDimensions(){return[this._containerOffsetHeight,this._containerOffsetWidth]}_getBarDimensions(e,t){const{bins:i,layout:s}=this,r=i?i.map((e=>e.count)):[],a=Math.max.apply(Math,r);return r.map((i=>"vertical"===s?[e/r.length,0!==a?i/a*t:0]:[0!==a?i/a*e:0,t/r.length]))}_getLinePosition(e){const{layout:t,min:i,viewModel:{range:s}}=this,r=Math.round((e-i)/s*100)/100,[a,n]=this._getContainerDimensions(),[o,l]=[r*n||1,a-r*a||1];return"vertical"===t?[0,"100%",l,l]:[o,o,"100%",0]}_getLabelPosition(e){const{layout:t,min:i,viewModel:{range:s}}=this,r=Math.round((e-i)/s*100)/100,[a,n]=this._getContainerDimensions();return"vertical"===t?[n,a-r*a]:[0,r*n]}};e([s()],g.prototype,"_containerOffsetHeight",void 0),e([s()],g.prototype,"_containerOffsetWidth",void 0),e([i("viewModel.average")],g.prototype,"average",void 0),e([s()],g.prototype,"barCreatedFunction",void 0),e([i("viewModel.bins")],g.prototype,"bins",void 0),e([s()],g.prototype,"dataLines",void 0),e([s()],g.prototype,"dataLineCreatedFunction",void 0),e([s()],g.prototype,"dataLineUpdatedFunction",void 0),e([s({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],g.prototype,"label",void 0),e([i("viewModel.labelFormatFunction")],g.prototype,"labelFormatFunction",void 0),e([s({value:"horizontal"})],g.prototype,"layout",null),e([i("viewModel.max")],g.prototype,"max",void 0),e([s(),l("esri/widgets/Histogram/t9n/Histogram")],g.prototype,"messages",void 0),e([i("viewModel.min")],g.prototype,"min",void 0),e([i("viewModel.state")],g.prototype,"state",void 0),e([s()],g.prototype,"viewModel",void 0),g=u=e([r("esri.widgets.Histogram")],g);const p=g;export{p as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/maybe.js";import{aliasOf as i}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{R as a}from"../chunks/ResizeObserver.js";import n from"./Widget.js";import o from"./Histogram/HistogramViewModel.js";import"./support/widgetUtils.js";import{messageBundle as l}from"./support/decorators/messageBundle.js";import"../core/Logger.js";import{tsx as d}from"./support/jsxFactory.js";import{substitute as h}from"../intl/substitute.js";var u;const c={base:"esri-histogram",horizontalLayout:"esri-histogram--horizontal",verticalLayout:"esri-histogram--vertical",content:"esri-histogram__content",svg:"esri-histogram__svg",bar:"esri-histogram__bar",bars:"esri-histogram__bars",label:"esri-histogram__label",dataLines:"esri-histogram__data-lines",dataLinesSubgroup:"esri-histogram__data-lines-subgroup",dataLine:"esri-histogram__data-line",averageLabel:"esri-histogram__average-label",averageDataLine:"esri-histogram__average-data-line",averageSymbol:"esri-histogram__average-symbol",esriWidget:"esri-widget",widgetIcon:"esri-icon-edit",disabled:"esri-disabled"};let g=u=class extends n{constructor(e,t){super(e,t),this._bgFillId=null,this._containerNode=null,this._containerOffsetHeight=0,this._containerOffsetWidth=0,this._defaultBarColor="#d8d8d8",this._observer=null,this.average=null,this.barCreatedFunction=null,this.bins=null,this.dataLines=null,this.dataLineCreatedFunction=null,this.dataLineUpdatedFunction=null,this.label=void 0,this.labelFormatFunction=null,this.max=null,this.messages=null,this.min=null,this.state=null,this.viewModel=new o,this._observer=new a((()=>{this._storeContainerDimensions(),this.scheduleRender()})),this._bgFillId=`${this.id}-bg-fill`}destroy(){this._containerNode&&this._observer.unobserve(this._containerNode)}set layout(e){"vertical"!==e&&(e="horizontal"),this._set("layout",e)}static fromHistogramResult(e){const{bins:t,maxValue:i,minValue:s}=e;return new u({bins:t,max:i,min:s})}render(){const{label:e,layout:t,state:i}=this,s=this.classes(c.base,c.esriWidget,"horizontal"===t?c.horizontalLayout:c.verticalLayout,"disabled"===i?c.disabled:null);return d("div",{"aria-label":e,afterCreate:this._afterContainerNodeCreate,bind:this,class:s,"data-node-ref":"_containerNode"},"ready"===i?this.renderContent():null)}renderContent(){if(!this._containerNode)return;const e=this._bgFillId,t=`clip-path: url(#${e})`;return d("div",{class:c.content},d("svg",{class:c.svg,xmlns:"http://www.w3.org/2000/svg"},d("defs",null,this.renderFillDefinition(e)),d("g",{style:t},this.renderBarsGroup()),this.renderLinesGroup()))}renderBarsGroup(){return d("g",{class:this.classes(c.bars)},this.renderBars())}renderBars(){const{layout:e,viewModel:{binRange:t,range:i}}=this;if(!t||!i)return;const s=t/i,[r,a]=this._getContainerDimensions();if(0===r&&0===a)return;if(0===r&&0!==a)return void this.scheduleRender();const[n,o]="vertical"===e?[r*s,a]:[r,a*s];return this._getBarDimensions(n,o).map((([e,t],i)=>this.renderBar(i,e,t)))}renderBar(e,t,i){const{bins:s,layout:r,max:a,messages:n,viewModel:{range:o}}=this,[l,u]=this._getContainerDimensions(),g=s.slice()[e],{count:p,maxValue:m,minValue:b}=g,_=a-m,[v,f]="vertical"===r?[0,_*(l/o)]:[u-i-_*(u/o),l-t],L=h(n.barLabel,{count:p,maxValue:m,minValue:b});return d("rect",{"aria-label":L,afterCreate:this._afterBarCreate,bind:this,class:c.bar,"data-index":e,fill:this._defaultBarColor,height:t,role:"img","shape-rendering":"crispEdges","stroke-width":"0",width:i,x:v,y:f})}renderLinesGroup(){return d("g",{class:this.classes(c.dataLines)},this.renderAverageLine(),this.renderCustomLines())}renderAverageLine(){const{average:e}=this;if(!t(e))return;const i=[d("tspan",{class:this.classes(c.averageSymbol)},"x̄ "),d("tspan",{class:this.classes(c.averageLabel)},this.labelFormatFunction?this.labelFormatFunction(e,"average"):e)];return d("g",{afterCreate:this._afterLinesSubgroupCreate,afterUpdate:this._afterLinesSubgroupUpdate,bind:this,class:this.classes(c.dataLinesSubgroup)},d("title",{key:"title"},e),this.renderLine(e,this.classes(c.averageDataLine)),this.renderLabel(e,i))}renderCustomLines(){if(this.dataLines&&this.dataLines.length)return this.dataLines.map((({value:e,label:t},i)=>this.renderLineSubgroup(i,e,t)))}renderLineSubgroup(e,t,i){return d("g",{afterCreate:this._afterLinesSubgroupCreate,afterUpdate:this._afterLinesSubgroupUpdate,bind:this,class:this.classes(c.dataLinesSubgroup),"data-index":e},d("title",{key:"title"},t),this.renderLine(t),this.renderLabel(t,i))}renderLine(e,t){const[i,s,r,a]=this._getLinePosition(e);return d("line",{class:this.classes(c.dataLine,t),x1:i,x2:s,y1:r,y2:a,"shape-rendering":"crispEdges"})}renderLabel(e,t,i){const[s,r]=this._getLabelPosition(e),a=2;return d("text",{class:this.classes(c.label,i),"text-anchor":"end",transform:"horizontal"===this.layout?"rotate(270)":null,x:s,y:r-a},t)}renderFillDefinition(e){const[t,i]=this._getContainerDimensions();return d("clipPath",{id:e},d("rect",{x:"0",y:"0",width:i,height:t}))}_afterContainerNodeCreate(e){this._containerNode&&this._observer.unobserve(this._containerNode),this._containerNode=e,this._observer.observe(this._containerNode),this._storeContainerDimensions()}_afterBarCreate(e){if(this.barCreatedFunction){const t=e.dataset?parseInt(e.dataset.index,10):e.getAttribute("data-index")?parseInt(e.getAttribute("data-index"),10):null;this.barCreatedFunction(isNaN(t)?null:t,e)}}_afterLinesSubgroupCreate(e){if(this.dataLineCreatedFunction){const t=e.dataset?parseInt(e.dataset.index,10):e.getAttribute("data-index")?parseInt(e.getAttribute("data-index"),10):null,i=e.childNodes[0],s=e.childNodes[1]?e.childNodes[1]:null;this.dataLineCreatedFunction(i,s,isNaN(t)?null:t)}}_afterLinesSubgroupUpdate(e){if(this.dataLineUpdatedFunction){const t=e.dataset?parseInt(e.dataset.index,10):e.getAttribute("data-index")?parseInt(e.getAttribute("data-index"),10):null,i=e.childNodes[0],s=e.childNodes[1]?e.childNodes[1]:null;this.dataLineUpdatedFunction(i,s,isNaN(t)?null:t)}}_storeContainerDimensions(){const{_containerNode:e}=this;e&&(this._containerOffsetHeight=e.offsetHeight,this._containerOffsetWidth=e.offsetWidth)}_getContainerDimensions(){return[this._containerOffsetHeight,this._containerOffsetWidth]}_getBarDimensions(e,t){const{bins:i,layout:s}=this,r=i?i.map((e=>e.count)):[],a=Math.max.apply(Math,r);return r.map((i=>"vertical"===s?[e/r.length,0!==a?i/a*t:0]:[0!==a?i/a*e:0,t/r.length]))}_getLinePosition(e){const{layout:t,min:i,viewModel:{range:s}}=this,r=Math.round((e-i)/s*100)/100,[a,n]=this._getContainerDimensions(),[o,l]=[r*n||1,a-r*a||1];return"vertical"===t?[0,"100%",l,l]:[o,o,"100%",0]}_getLabelPosition(e){const{layout:t,min:i,viewModel:{range:s}}=this,r=Math.round((e-i)/s*100)/100,[a,n]=this._getContainerDimensions();return"vertical"===t?[n,a-r*a]:[0,r*n]}};e([s()],g.prototype,"_containerOffsetHeight",void 0),e([s()],g.prototype,"_containerOffsetWidth",void 0),e([i("viewModel.average")],g.prototype,"average",void 0),e([s()],g.prototype,"barCreatedFunction",void 0),e([i("viewModel.bins")],g.prototype,"bins",void 0),e([s()],g.prototype,"dataLines",void 0),e([s()],g.prototype,"dataLineCreatedFunction",void 0),e([s()],g.prototype,"dataLineUpdatedFunction",void 0),e([s({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],g.prototype,"label",void 0),e([i("viewModel.labelFormatFunction")],g.prototype,"labelFormatFunction",void 0),e([s({value:"horizontal"})],g.prototype,"layout",null),e([i("viewModel.max")],g.prototype,"max",void 0),e([s(),l("esri/widgets/Histogram/t9n/Histogram")],g.prototype,"messages",void 0),e([i("viewModel.min")],g.prototype,"min",void 0),e([i("viewModel.state")],g.prototype,"state",void 0),e([s()],g.prototype,"viewModel",void 0),g=u=e([r("esri.widgets.Histogram")],g);const p=g;export{p as default};