@arcgis/core 4.33.0-next.20250422 → 4.33.0-next.20250424

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 (329) hide show
  1. package/Graphic.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/analysis/Analysis.d.ts +4 -0
  4. package/analysis/Analysis.js +1 -1
  5. package/analysis/SliceAnalysis.js +1 -1
  6. package/analysis/SlicePlane.js +1 -1
  7. package/analysis/support/AnalysisOriginWebScene.d.ts +4 -0
  8. package/analysis/support/AnalysisOriginWebScene.js +5 -0
  9. package/analysis/support/SliceAnalysisExcludedLayer.js +5 -0
  10. package/arcade/geometry/constructors.js +1 -1
  11. package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -0
  12. package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -0
  13. package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -0
  14. package/assets/components/assets/icon/mosaicMethodByAttribute16.json +1 -0
  15. package/assets/components/assets/icon/mosaicMethodByAttribute24.json +1 -0
  16. package/assets/components/assets/icon/mosaicMethodByAttribute32.json +1 -0
  17. package/assets/components/assets/icon/mosaicMethodClosestToCenter16.json +1 -0
  18. package/assets/components/assets/icon/mosaicMethodClosestToCenter24.json +1 -0
  19. package/assets/components/assets/icon/mosaicMethodClosestToCenter32.json +1 -0
  20. package/assets/components/assets/icon/mosaicMethodClosestToNadir16.json +1 -0
  21. package/assets/components/assets/icon/mosaicMethodClosestToNadir24.json +1 -0
  22. package/assets/components/assets/icon/mosaicMethodClosestToNadir32.json +1 -0
  23. package/assets/components/assets/icon/mosaicMethodFirst16.json +1 -0
  24. package/assets/components/assets/icon/mosaicMethodFirst24.json +1 -0
  25. package/assets/components/assets/icon/mosaicMethodFirst32.json +1 -0
  26. package/assets/components/assets/icon/mosaicMethodLast16.json +1 -0
  27. package/assets/components/assets/icon/mosaicMethodLast24.json +1 -0
  28. package/assets/components/assets/icon/mosaicMethodLast32.json +1 -0
  29. package/assets/components/assets/icon/mosaicMethodLockRaster16.json +1 -0
  30. package/assets/components/assets/icon/mosaicMethodLockRaster24.json +1 -0
  31. package/assets/components/assets/icon/mosaicMethodLockRaster32.json +1 -0
  32. package/assets/components/assets/icon/mosaicMethodMaximum16.json +1 -0
  33. package/assets/components/assets/icon/mosaicMethodMaximum24.json +1 -0
  34. package/assets/components/assets/icon/mosaicMethodMaximum32.json +1 -0
  35. package/assets/components/assets/icon/mosaicMethodMean16.json +1 -0
  36. package/assets/components/assets/icon/mosaicMethodMean24.json +1 -0
  37. package/assets/components/assets/icon/mosaicMethodMean32.json +1 -0
  38. package/assets/components/assets/icon/mosaicMethodMinimum16.json +1 -0
  39. package/assets/components/assets/icon/mosaicMethodMinimum24.json +1 -0
  40. package/assets/components/assets/icon/mosaicMethodMinimum32.json +1 -0
  41. package/assets/components/assets/icon/mosaicMethodNone16.json +1 -0
  42. package/assets/components/assets/icon/mosaicMethodNone24.json +1 -0
  43. package/assets/components/assets/icon/mosaicMethodNone32.json +1 -0
  44. package/assets/components/assets/icon/mosaicMethodNorthWest16.json +1 -0
  45. package/assets/components/assets/icon/mosaicMethodNorthWest24.json +1 -0
  46. package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -0
  47. package/assets/components/assets/icon/mosaicMethodSeamline16.json +1 -0
  48. package/assets/components/assets/icon/mosaicMethodSeamline24.json +1 -0
  49. package/assets/components/assets/icon/mosaicMethodSeamline32.json +1 -0
  50. package/assets/components/assets/icon/mosaicMethodSum16.json +1 -0
  51. package/assets/components/assets/icon/mosaicMethodSum24.json +1 -0
  52. package/assets/components/assets/icon/mosaicMethodSum32.json +1 -0
  53. package/assets/esri/core/workers/RemoteClient.js +1 -1
  54. package/assets/esri/core/workers/chunks/{b2f9f0767dadf185120c.js → 00612d6e05b1c8647668.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{d4d011eea16a89a5aad9.js → 0219c3f9408d3fa3c9a0.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{f54546c155fba2fd3a7e.js → 05d7d8ff3e4cbad32580.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{b1e275607d9754079f60.js → 079434fe765c53d304f2.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{4f8782b3b6ad414409e8.js → 0a48b9734ab4c64a6f4f.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{0eed612e82a279ac8d1e.js → 11b55e7e76e50fe11bbe.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{ccc50f28f217e50cc2c3.js → 1427e7953c3d8c87c5e8.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{184d7c8ea818bec5c462.js → 146b3699a9e8b1f2dcc2.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{8ba7d44eff348004f084.js → 1a6d2d090b643a87408a.js} +1 -1
  63. package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +1 -0
  64. package/assets/esri/core/workers/chunks/{5e5225623977e61fd0ef.js → 213adc87c843d627c5d6.js} +1 -1
  65. package/assets/esri/core/workers/chunks/235efd948ae470a6f238.js +1 -0
  66. package/assets/esri/core/workers/chunks/{60d3b329e69f3cddb7f4.js → 265f69d153b7b6f07e42.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{769b66cca8347f0f84db.js → 279bbd61b32577693a4a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/290b065b377f9d2ee058.js +1 -0
  69. package/assets/esri/core/workers/chunks/29d3245261a7223124ed.js +1 -0
  70. package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js → 30551c1d3e4fa7be86c1.js} +2 -2
  71. package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js.LICENSE.txt → 30551c1d3e4fa7be86c1.js.LICENSE.txt} +1 -1
  72. package/assets/esri/core/workers/chunks/335b539893569e3d7b82.js +1 -0
  73. package/assets/esri/core/workers/chunks/{78242f2bf742b33d99fa.js → 3795793643f4db64af0e.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js → 3cf001abca8ad933bccf.js} +2 -2
  75. package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js.LICENSE.txt → 3cf001abca8ad933bccf.js.LICENSE.txt} +1 -1
  76. package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js → 543eb46b55cacd6e1dbc.js} +2 -2
  77. package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js.LICENSE.txt → 543eb46b55cacd6e1dbc.js.LICENSE.txt} +1 -1
  78. package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js → 577f24923fa4d08360e4.js} +2 -2
  79. package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js.LICENSE.txt → 577f24923fa4d08360e4.js.LICENSE.txt} +1 -1
  80. package/assets/esri/core/workers/chunks/5958af341014e13475d2.js +1 -0
  81. package/assets/esri/core/workers/chunks/{f46c4a69ef2f763e905b.js → 5d63dfa5a60c88e03b28.js} +1 -1
  82. package/assets/esri/core/workers/chunks/60f7cd05e88701f43d3f.js +1 -0
  83. package/assets/esri/core/workers/chunks/{26e0a0a13060cd3e4291.js → 626ba3a7dee952308566.js} +1 -1
  84. package/assets/esri/core/workers/chunks/7bfa18dd8771d4932533.js +1 -0
  85. package/assets/esri/core/workers/chunks/7cd32b10ed0e18e44ef2.js +1 -0
  86. package/assets/esri/core/workers/chunks/7ffa68d69c138db1295d.js +1 -0
  87. package/assets/esri/core/workers/chunks/8dd26b12c625d20196ed.js +319 -0
  88. package/assets/esri/core/workers/chunks/91f8547a13f0461045ef.js +1 -0
  89. package/assets/esri/core/workers/chunks/9661ee8569ee208e6237.js +1 -0
  90. package/assets/esri/core/workers/chunks/{c2f38c66fae2cdb57445.js → 96e5d192c8d23c1e324f.js} +1 -1
  91. package/assets/esri/core/workers/chunks/974742af7beb000c4b4a.js +1 -0
  92. package/assets/esri/core/workers/chunks/{e27fa1e84f16b7f19a90.js → 9850ff14bd9c7da81c65.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{796cf1c2ca9955595836.js → 9b2ab27159500315fbc1.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{a276980c06d5d311a37e.js → 9f416cc5673665f8c37c.js} +1 -1
  95. package/assets/esri/core/workers/chunks/a0c51c4c30a5f749dfc6.js +1 -0
  96. package/assets/esri/core/workers/chunks/a79511b926a2830bb160.js +1 -0
  97. package/assets/esri/core/workers/chunks/{fdcbd28f38bc485ac5e3.js → ab6ecd8eeec5ff761b34.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js → ac9c6779771ec855da79.js} +2 -2
  99. package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js.LICENSE.txt → ac9c6779771ec855da79.js.LICENSE.txt} +1 -1
  100. package/assets/esri/core/workers/chunks/{ef6e805c49e1afdf966b.js → c054198c6438cb57f188.js} +1 -1
  101. package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js.LICENSE.txt +1 -1
  102. package/assets/esri/core/workers/chunks/{5bdd5ae2d2f23ef6b331.js → c87e2a63b96e0da77dfe.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{601fc99426f0213b0769.js → cbec01223d51cdb9ee79.js} +1 -1
  104. package/assets/esri/core/workers/chunks/cc4dd739c4c7e3ccea3f.js +1 -0
  105. package/assets/esri/core/workers/chunks/{90c893959145827961ac.js → cd9343c78a7c3acdbbcd.js} +1 -1
  106. package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +1 -0
  107. package/assets/esri/core/workers/chunks/{26fcbe053194bd78fcc3.js → d8474dca270b25705699.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js → d8dc922f7466300b668f.js} +2 -2
  109. package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js.LICENSE.txt → d8dc922f7466300b668f.js.LICENSE.txt} +1 -1
  110. package/assets/esri/core/workers/chunks/{96cddbbeef61a4f33f29.js → db5913824d5e5a2a8365.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{48a1bb1e171dd06a7c6e.js → dd94585508f49863dc15.js} +1 -1
  112. package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +2 -0
  113. package/assets/esri/core/workers/chunks/{02176f84d6d57f1bc1c8.js.LICENSE.txt → e524462c63834fae7e01.js.LICENSE.txt} +1 -1
  114. package/assets/esri/core/workers/chunks/{e7e987558cf017c62458.js → ebfa4a0334401f5e004a.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{736a11e64e5f03e3936b.js → f2cef954b58c6604642c.js} +64 -64
  116. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  117. package/assets/esri/themes/dark/main.css +1 -1
  118. package/assets/esri/themes/light/main.css +1 -1
  119. package/assets/esri/themes/light/view.css +1 -1
  120. package/chunks/BloomBlur.glsl.js +7 -7
  121. package/chunks/BloomComposition.glsl.js +24 -25
  122. package/chunks/Bufferer-CicaNej1.js +1 -1
  123. package/chunks/Envelope.js +1 -1
  124. package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
  125. package/chunks/Geometry.js +1 -1
  126. package/chunks/OperatorGeodesicBuffer.js +1 -1
  127. package/chunks/OperatorGeodeticArea.js +1 -1
  128. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  129. package/chunks/OperatorGeodeticLength.js +1 -1
  130. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  131. package/chunks/OperatorProximityGeodesic.js +1 -1
  132. package/chunks/OperatorShapePreservingLength.js +1 -1
  133. package/chunks/OperatorShapePreservingProject.js +1 -1
  134. package/chunks/OperatorSimplifyOGC.js +5 -0
  135. package/chunks/Point2D.js +1 -1
  136. package/chunks/ProjectionTransformation.js +1 -1
  137. package/chunks/QuadraticBezier.js +1 -1
  138. package/chunks/cameraUtilsSpherical.js +1 -1
  139. package/chunks/languageUtils.js +1 -1
  140. package/chunks/relateOperator.js +1 -1
  141. package/chunks/sphere.js +1 -1
  142. package/chunks/vxlLayer.js +1 -1
  143. package/core/Collection.js +1 -1
  144. package/core/JSONSupport.js +1 -1
  145. package/core/SetUtils.js +1 -1
  146. package/{views/webgl/GLObjectType.js → core/support/jsonUtils.js} +1 -1
  147. package/core/urlUtils.js +1 -1
  148. package/geometry/Mesh.js +1 -1
  149. package/geometry/operators/extendOperator.js +1 -1
  150. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  151. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  152. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  153. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  154. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  155. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  156. package/geometry/operators/gx/operatorSimplifyOGC.js +5 -0
  157. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  158. package/geometry/operators/reshapeOperator.js +1 -1
  159. package/geometry/operators/simplifyOGCOperator.d.ts +6 -0
  160. package/geometry/operators/simplifyOGCOperator.js +5 -0
  161. package/geometry/operators/support/jsonConverter.js +1 -1
  162. package/geometry/support/normalizeUtilsSync.js +1 -1
  163. package/geometry/support/sphere.js +1 -1
  164. package/interfaces.d.ts +442 -113
  165. package/layers/DimensionLayer.js +1 -1
  166. package/layers/RouteLayer.js +1 -1
  167. package/layers/SubtypeGroupLayer.js +1 -1
  168. package/layers/ViewshedLayer.js +1 -1
  169. package/layers/graphics/data/QueryEngine.js +1 -1
  170. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  171. package/layers/orientedImagery/transformations/utils.js +1 -1
  172. package/layers/support/FieldsIndex.js +1 -1
  173. package/layers/support/VideoElement.js +1 -1
  174. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  175. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  176. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  177. package/layers/support/rasterFormats/{TiffTags.js → tiffTag.js} +1 -1
  178. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  179. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  180. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  181. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  182. package/layers/support/rasterFunctions/RemapFunction.js +1 -1
  183. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  184. package/layers/support/videoUtils.js +5 -0
  185. package/package.json +2 -2
  186. package/portal/schemas/definitions.js +1 -1
  187. package/renderers/UniqueValueRenderer.js +1 -1
  188. package/renderers/support/colorRampUtils.js +1 -1
  189. package/support/revision.js +1 -1
  190. package/symbols/IconSymbol3DLayer.js +1 -1
  191. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  192. package/versionManagement/utils.js +1 -1
  193. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  195. package/views/2d/engine/webgl/textureUtils.js +1 -1
  196. package/views/2d/layers/MediaLayerView2D.js +1 -1
  197. package/views/2d/layers/TileLayerView2D.js +1 -1
  198. package/views/2d/layers/support/DebugOverlay.js +1 -1
  199. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  200. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  201. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  202. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  203. package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +1 -1
  204. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  205. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  206. package/views/3d/camera/constraintUtils/distance.js +1 -1
  207. package/views/3d/camera/intersectionUtils.js +1 -1
  208. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  209. package/views/3d/environment/atmosphereUtils.js +1 -1
  210. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  211. package/views/3d/interactive/visualElements/EngineVisualElement.js +1 -1
  212. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  213. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  214. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  215. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  216. package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
  217. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  218. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  219. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  220. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  221. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  222. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  223. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  224. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  225. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +1 -1
  226. package/views/3d/interactive/visualElements/VisualElement.js +1 -1
  227. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  228. package/views/3d/layers/I3SMeshView3D.js +1 -1
  229. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  230. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  231. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  232. package/views/3d/layers/graphics/pipeline/PipelineCommand.js +1 -1
  233. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  234. package/views/3d/layers/graphics/pipeline/TileActionSynchronizer.js +5 -0
  235. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  236. package/views/3d/state/ConstraintsManager.js +1 -1
  237. package/views/3d/state/NearFarHeuristic.js +1 -1
  238. package/views/3d/state/ViewState.js +1 -1
  239. package/views/3d/state/ViewStateManager.js +1 -1
  240. package/views/3d/state/utils/navigationUtils.js +1 -1
  241. package/views/3d/support/cameraUtilsSpherical.js +1 -1
  242. package/views/3d/support/geometryUtils/sphere.js +1 -1
  243. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  244. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  245. package/views/3d/webgl/ManagedFBO.js +1 -1
  246. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  247. package/views/3d/webgl-engine/core/FBOCacheFormats.js +5 -0
  248. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +12 -14
  249. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +1 -1
  250. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  251. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  252. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  253. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  254. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  255. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  256. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  257. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  258. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  259. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  260. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  261. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  262. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  263. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  264. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  265. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  266. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  267. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  268. package/views/SceneView.js +1 -1
  269. package/views/VideoView.js +1 -1
  270. package/views/interactive/Tooltip.js +1 -1
  271. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  272. package/views/layers/LineOfSightLayerView.d.ts +4 -0
  273. package/views/layers/LineOfSightLayerView.js +5 -0
  274. package/views/webgl/FBOAttachmentType.js +5 -0
  275. package/views/webgl/FramebufferObject.js +1 -1
  276. package/views/webgl/Renderbuffer.js +1 -1
  277. package/views/webgl/RenderbufferDescriptor.js +1 -1
  278. package/views/webgl/Texture.js +1 -1
  279. package/views/webgl/TextureDescriptor.js +1 -1
  280. package/webscene/InitialViewProperties.js +1 -1
  281. package/webscene/Presentation.js +1 -1
  282. package/webscene/Slide.js +1 -1
  283. package/webscene/SlideLegendInfo.js +1 -1
  284. package/webscene/background/ColorBackground.js +1 -1
  285. package/webscene/spec-certification/api.js +1 -1
  286. package/webscene/spec-certification/compare.js +1 -1
  287. package/webscene/spec-certification/index.js +1 -1
  288. package/webscene/spec-certification/spec.js +1 -1
  289. package/webscene/spec-certification/utils.js +1 -1
  290. package/webscene/support/Description.js +1 -1
  291. package/webscene/support/SlideElements.js +1 -1
  292. package/webscene/support/SlideEnvironment.js +1 -1
  293. package/webscene/support/SlideGround.js +1 -1
  294. package/webscene/support/SlideVisibleLayer.js +1 -1
  295. package/webscene/support/Title.js +1 -1
  296. package/webscene/support/analysisUtils.js +5 -0
  297. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  298. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  299. package/widgets/Editor/EditorViewModel.js +1 -1
  300. package/widgets/Editor/UpdateWorkflow.js +1 -1
  301. package/widgets/Editor/support/SketchController.js +5 -0
  302. package/widgets/Editor/workflowUtils.js +1 -1
  303. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  304. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  305. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  306. package/widgets/FeatureTable.js +1 -1
  307. package/widgets/LayerList/LayerListItem.js +1 -1
  308. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  309. package/widgets/Widget.js +1 -1
  310. package/widgets/support/SelectionList.js +1 -1
  311. package/widgets/support/SnappingControls.js +1 -1
  312. package/assets/esri/core/workers/chunks/02176f84d6d57f1bc1c8.js +0 -2
  313. package/assets/esri/core/workers/chunks/244d2196bac5ef279436.js +0 -1
  314. package/assets/esri/core/workers/chunks/32f2e0c88046b39916cc.js +0 -1
  315. package/assets/esri/core/workers/chunks/388a763da712ca71ccf4.js +0 -1
  316. package/assets/esri/core/workers/chunks/5ffc3ca6c6a4d32e1282.js +0 -1
  317. package/assets/esri/core/workers/chunks/642a595353a86f3717e3.js +0 -1
  318. package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +0 -1
  319. package/assets/esri/core/workers/chunks/873327fc41edd3830afa.js +0 -319
  320. package/assets/esri/core/workers/chunks/93e9dfd1ba8f393c6c47.js +0 -1
  321. package/assets/esri/core/workers/chunks/95379fdd6917c8a84c71.js +0 -1
  322. package/assets/esri/core/workers/chunks/9b21dc4659922cc577cb.js +0 -1
  323. package/assets/esri/core/workers/chunks/a197c86d42cc9ce21924.js +0 -1
  324. package/assets/esri/core/workers/chunks/d81bebbb6fe000200d35.js +0 -1
  325. package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +0 -1
  326. package/assets/esri/core/workers/chunks/dd8e72d6784a8ebc115d.js +0 -1
  327. package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +0 -1
  328. package/assets/esri/core/workers/chunks/e9fba86036b8fe700a41.js +0 -1
  329. package/views/3d/webgl/formats.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{clone as s}from"../core/lang.js";import i from"../core/Logger.js";import{deepMerge as o}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import{cast as u}from"../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../core/accessorSupport/decorators/enumeration.js";import{reader as a}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as f}from"../core/accessorSupport/decorators/writer.js";import{diff as d}from"../core/accessorSupport/diffUtils.js";import{ensureType as c,ensureString as h}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as m,collectField as y}from"../layers/support/fieldUtils.js";import b from"../portal/Portal.js";import v from"./Renderer.js";import{VisualVariablesMixin as _}from"./mixins/VisualVariablesMixin.js";import{rendererSymbolProperty as V,rendererBackgroundFillSymbolProperty as q}from"./support/commonProperties.js";import g from"./support/RendererLegendOptions.js";import I from"./support/UniqueValue.js";import S from"./support/UniqueValueClass.js";import w from"./support/UniqueValueGroup.js";import U from"./support/UniqueValueInfo.js";import{loadArcade as j}from"../support/loadArcade.js";import{f as F,t as O}from"../chunks/persistableUrlUtils.js";import G from"../symbols/WebStyleSymbol.js";import{fetchStyle as D}from"../symbols/support/styleUtils.js";import{ensureType as x}from"../symbols/support/typeUtils.js";var E;const M="esri.renderers.UniqueValueRenderer",R=()=>i.getLogger(M),N="uvInfos-watcher",P="uvGroups-watcher",C=",",$=c(U);function z(e){const{field1:t,field2:s,field3:i,fieldDelimiter:o,uniqueValueInfos:l,valueExpression:r}=e,u=!(!t||!s);return[{classes:(l??[]).map((e=>{const{symbol:l,label:n,value:a,description:p}=e,[f,d,c]=u?a?.toString()?.split(o||"")||[]:[a],h=[];return(t||r)&&h.push(f),s&&h.push(d),i&&h.push(c),{symbol:l,label:n,values:[h],description:p}}))}]}function A(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let L=E=class extends(_(v)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let o=0;o<t.length;o++){const l=e.find((e=>e.value===t[o].value));l?d(l,t[o])?(i.changed.push({type:"complete",oldValue:l,newValue:t[o]}),s=!0):i.unchanged.push({oldValue:l,newValue:t[o]}):(i.added.push(t[o]),s=!0)}for(let o=0;o<e.length;o++){t.find((t=>t.value===e[o].value))||(i.removed.push(e[o]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:h(e)}writeField(e,s,i,o){"string"==typeof e?s[i]=e:o?.messages?o.messages.push(new t("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):R().error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||b.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=F(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=O(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?R().error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?R().error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void R().error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let s;s="object"==typeof e?$(e):new U({value:e,symbol:x(t)}),this.uniqueValueInfos?.push(s),this._valueInfoMap[A(s.value)]=s,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void R().error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[A(e)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await j()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void R().error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const s=this._getUniqueValueInfo(e,t);return s?.symbol||this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await j(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,s);return i?.symbol||this.defaultSymbol}get symbols(){const e=[];for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol);return this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables?.reduce(((e,t)=>e+t.getAttributeHash()),"")??""}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),s=this.uniqueValueInfos?.reduce(((e,t)=>e+t.getMeshHash()),"");return`${e}.${t}.${s}.${`${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}`}.${this.valueExpression}`}clone(){const e=new E({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:s(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:s(this.visualVariables),legendOptions:s(this.legendOptions),authoringInfo:s(this.authoringInfo),backgroundFillSymbol:s(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const t=s(this.uniqueValueInfos),i=s(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(s(this.styleOrigin))),Object.freeze(t),Object.freeze(i)),e._set("uniqueValueInfos",t),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map((s=>s.collectRequiredFields(e,t))),m(e,t,this.valueExpression)];y(e,t,this.field),y(e,t,this.field2),y(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return D(this.styleOrigin,{portal:this.portal}).then((e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach((s=>{const i=new G({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const o=new U({value:s.name,symbol:i});t.push(o),this._valueInfoMap[A(s.name)]=o})),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this}))}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",C)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[A(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(N);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l((()=>({symbol:s.symbol,value:s.value,label:s.label,description:s.description})),((e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)}),{sync:!0}));this.addHandles(t,N)}}_watchUniqueValueGroups(){this.removeHandles(P);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l((()=>({classes:s.classes})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}));for(const e of s.classes??[])t.push(l((()=>({symbol:e.symbol,values:e.values,label:e.label,description:e.description})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}))}this.addHandles(t,P)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:o,uniqueValueGroups:l,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of l)for(const t of n.classes??[]){const{symbol:l,label:r,values:n,description:a}=t;for(const t of n??[]){const{value:n,value2:p,value3:f}=t,d=[n];s&&d.push(p),i&&d.push(f);const c=u?d.join(o||""):d[0]??void 0;e.push(new U({symbol:l,label:r,value:c,description:a}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:o,uniqueValueInfos:l}=this;if(!t&&!i||!l.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=l.map((e=>{const{symbol:t,label:s,value:i,description:l}=e,[u,n,a]=r?i?.toString()?.split(o||"")||[]:[i];return new S({symbol:t,label:s,description:l,values:[new I({value:u,value2:n,value3:a})]})})),n=[new w({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:o,arcade:l,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=l.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:o}),r));return this._valueInfoMap[A(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,o=this.field3,l=[];t&&l.push(s[t]),e&&l.push(s[e]),o&&l.push(s[o]),i=l.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[A(i)]}static fromPortalStyle(e,t){const s=new E(t?.properties);s._set("styleOrigin",Object.freeze({styleName:e})),s._set("portal",t?.portal||b.getDefault());const i=s.populateFromStyle();return i.catch((t=>{R().error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)})),i}static fromStyleUrl(e,t){const s=new E(t?.properties);s._set("styleOrigin",Object.freeze({styleUrl:e}));const i=s.populateFromStyle();return i.catch((t=>{R().error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)})),i}};e([r({readOnly:!0})],L.prototype,"_cache",null),e([n({uniqueValue:"unique-value"})],L.prototype,"type",void 0),e([r(q)],L.prototype,"backgroundFillSymbol",void 0),e([r({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],L.prototype,"field",null),e([u("field")],L.prototype,"castField",null),e([f("field")],L.prototype,"writeField",null),e([r({type:String,value:null,json:{write:!0}})],L.prototype,"field2",null),e([r({type:String,value:null,json:{write:!0}})],L.prototype,"field3",null),e([r({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],L.prototype,"orderByClassesEnabled",void 0),e([r({type:String,value:null,json:{write:!0}})],L.prototype,"valueExpression",null),e([r({type:String,json:{write:!0}})],L.prototype,"valueExpressionTitle",void 0),e([r({type:g,json:{write:!0}})],L.prototype,"legendOptions",void 0),e([r({type:String,json:{write:!0}})],L.prototype,"defaultLabel",void 0),e([r(o({...V},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],L.prototype,"defaultSymbol",null),e([r({type:String,value:null,json:{write:!0}})],L.prototype,"fieldDelimiter",null),e([r({type:b,readOnly:!0})],L.prototype,"portal",void 0),e([a("portal",["styleName"])],L.prototype,"readPortal",null),e([r({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],L.prototype,"styleOrigin",void 0),e([a("styleOrigin",["styleName","styleUrl"])],L.prototype,"readStyleOrigin",null),e([f("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],L.prototype,"writeStyleOrigin",null),e([r({type:[w],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||z(t)).map((e=>w.fromJSON(e,s)))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],L.prototype,"uniqueValueGroups",null),e([r({type:[U],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],L.prototype,"uniqueValueInfos",null),L=E=e([p(M)],L);const k=L;export{k as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{clone as s}from"../core/lang.js";import i from"../core/Logger.js";import{deepMerge as o}from"../core/object.js";import{watch as l}from"../core/reactiveUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import{cast as u}from"../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../core/accessorSupport/decorators/enumeration.js";import{reader as a}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as f}from"../core/accessorSupport/decorators/writer.js";import{diff as d}from"../core/accessorSupport/diffUtils.js";import{ensureType as c,ensureString as h}from"../core/accessorSupport/ensureType.js";import{collectArcadeFieldNames as m,collectField as y}from"../layers/support/fieldUtils.js";import b from"../portal/Portal.js";import g from"./Renderer.js";import{VisualVariablesMixin as v}from"./mixins/VisualVariablesMixin.js";import{rendererSymbolProperty as _,rendererBackgroundFillSymbolProperty as V}from"./support/commonProperties.js";import q from"./support/RendererLegendOptions.js";import I from"./support/UniqueValue.js";import S from"./support/UniqueValueClass.js";import w from"./support/UniqueValueGroup.js";import U from"./support/UniqueValueInfo.js";import{loadArcade as j}from"../support/loadArcade.js";import{f as F,t as O}from"../chunks/persistableUrlUtils.js";import G from"../symbols/WebStyleSymbol.js";import{fetchStyle as D}from"../symbols/support/styleUtils.js";import{ensureType as x}from"../symbols/support/typeUtils.js";var E;const M="uvInfos-watcher",R="uvGroups-watcher",N=",",L=c(U);function P(e){const{field1:t,field2:s,field3:i,fieldDelimiter:o,uniqueValueInfos:l,valueExpression:r}=e,u=!(!t||!s);return[{classes:(l??[]).map((e=>{const{symbol:l,label:n,value:a,description:p}=e,[f,d,c]=u?a?.toString()?.split(o||"")||[]:[a],h=[];return(t||r)&&h.push(f),s&&h.push(d),i&&h.push(c),{symbol:l,label:n,values:[h],description:p}}))}]}function C(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let $=E=class extends(v(g)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let s=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let o=0;o<t.length;o++){const l=e.find((e=>e.value===t[o].value));l?d(l,t[o])?(i.changed.push({type:"complete",oldValue:l,newValue:t[o]}),s=!0):i.unchanged.push({oldValue:l,newValue:t[o]}):(i.added.push(t[o]),s=!0)}for(let o=0;o<e.length;o++){t.find((t=>t.value===e[o].value))||(i.removed.push(e[o]),s=!0)}return s?i:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:h(e)}writeField(e,s,o,l){"string"==typeof e?s[o]=e:l?.messages?l.messages.push(new t("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):i.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,s){return s.portal||b.getDefault()}readStyleOrigin(e,t,s){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=F(t.styleUrl,s);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,s,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=O(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?i.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?i.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void i.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let s;s="object"==typeof e?L(e):new U({value:e,symbol:x(t)}),this.uniqueValueInfos?.push(s),this._valueInfoMap[C(s.value)]=s,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void i.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let s=0;s<t.length;s++){const i=t[s];if(String(i.value)===String(e)){delete this._valueInfoMap[C(e)],t.splice(s,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let s=t;return this.valueExpression&&null==t?.arcade&&(s={...s,arcade:await j()}),this._getUniqueValueInfo(e,s)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void i.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const s=this._getUniqueValueInfo(e,t);return s?.symbol||this.defaultSymbol}async getSymbolAsync(e,t){let s=t;if(this.valueExpression&&null==s?.arcade){const e=await j(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),s={...s,arcade:e}}const i=this._getUniqueValueInfo(e,s);return i?.symbol||this.defaultSymbol}get symbols(){const e=[];for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol);return this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables?.reduce(((e,t)=>e+t.getAttributeHash()),"")??""}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),s=this.uniqueValueInfos?.reduce(((e,t)=>e+t.getMeshHash()),"");return`${e}.${t}.${s}.${`${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}`}.${this.valueExpression}`}clone(){const e=new E({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:s(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:s(this.visualVariables),legendOptions:s(this.legendOptions),authoringInfo:s(this.authoringInfo),backgroundFillSymbol:s(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const t=s(this.uniqueValueInfos),i=s(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(s(this.styleOrigin))),Object.freeze(t),Object.freeze(i)),e._set("uniqueValueInfos",t),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const s=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(s)}async collectSymbolFields(e,t){const s=[...this.symbols.map((s=>s.collectRequiredFields(e,t))),m(e,t,this.valueExpression)];y(e,t,this.field),y(e,t,this.field2),y(e,t,this.field3),await Promise.all(s)}populateFromStyle(){return D(this.styleOrigin,{portal:this.portal}).then((e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach((s=>{const i=new G({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:s.name});this.defaultSymbol||s.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const o=new U({value:s.name,symbol:i});t.push(o),this._valueInfoMap[C(s.name)]=o})),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this}))}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",N)}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[C(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(M);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const s of e)t.push(l((()=>({symbol:s.symbol,value:s.value,label:s.label,description:s.description})),((e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)}),{sync:!0}));this.addHandles(t,M)}}_watchUniqueValueGroups(){this.removeHandles(R);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const s of e){t.push(l((()=>({classes:s.classes})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}));for(const e of s.classes??[])t.push(l((()=>({symbol:e.symbol,values:e.values,label:e.label,description:e.description})),((e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)}),{sync:!0}))}this.addHandles(t,R)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:s,field3:i,fieldDelimiter:o,uniqueValueGroups:l,valueExpression:r}=this;if(!t&&!r)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const u=!(!t||!s);for(const n of l)for(const t of n.classes??[]){const{symbol:l,label:r,values:n,description:a}=t;for(const t of n??[]){const{value:n,value2:p,value3:f}=t,d=[n];s&&d.push(p),i&&d.push(f);const c=u?d.join(o||""):d[0]??void 0;e.push(new U({symbol:l,label:r,value:c,description:a}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:s,valueExpression:i,fieldDelimiter:o,uniqueValueInfos:l}=this;if(!t&&!i||!l.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const r=!(!t||!s),u=l.map((e=>{const{symbol:t,label:s,value:i,description:l}=e,[u,n,a]=r?i?.toString()?.split(o||"")||[]:[i];return new S({symbol:t,label:s,description:l,values:[new I({value:u,value2:n,value3:a})]})})),n=[new w({classes:u})];e&&Object.freeze(n),this._set("uniqueValueGroups",n),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:s,scale:i,spatialReference:o,arcade:l,timeZone:r}=t??{};let u=this._cache.compiledFunc;const n=l.arcadeUtils;if(!u){const e=n.createSyntaxTree(this.valueExpression);u=n.createFunction(e),this._cache.compiledFunc=u}const a=n.executeFunction(u,n.createExecContext(e,n.getViewInfo({viewingMode:s,scale:i,spatialReference:o}),r));return this._valueInfoMap[C(a)]}_getUnqiueValueInfoForFields(e){const t=this.field,s=e.attributes;let i;if(this.field2){const e=this.field2,o=this.field3,l=[];t&&l.push(s[t]),e&&l.push(s[e]),o&&l.push(s[o]),i=l.join(this.fieldDelimiter||"")}else t&&(i=s[t]);return this._valueInfoMap[C(i)]}static fromPortalStyle(e,t){const s=new E(t?.properties);s._set("styleOrigin",Object.freeze({styleName:e})),s._set("portal",t?.portal||b.getDefault());const o=s.populateFromStyle();return o.catch((t=>{i.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)})),o}static fromStyleUrl(e,t){const s=new E(t?.properties);s._set("styleOrigin",Object.freeze({styleUrl:e}));const o=s.populateFromStyle();return o.catch((t=>{i.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)})),o}};e([r({readOnly:!0})],$.prototype,"_cache",null),e([n({uniqueValue:"unique-value"})],$.prototype,"type",void 0),e([r(V)],$.prototype,"backgroundFillSymbol",void 0),e([r({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],$.prototype,"field",null),e([u("field")],$.prototype,"castField",null),e([f("field")],$.prototype,"writeField",null),e([r({type:String,value:null,json:{write:!0}})],$.prototype,"field2",null),e([r({type:String,value:null,json:{write:!0}})],$.prototype,"field3",null),e([r({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],$.prototype,"orderByClassesEnabled",void 0),e([r({type:String,value:null,json:{write:!0}})],$.prototype,"valueExpression",null),e([r({type:String,json:{write:!0}})],$.prototype,"valueExpressionTitle",void 0),e([r({type:q,json:{write:!0}})],$.prototype,"legendOptions",void 0),e([r({type:String,json:{write:!0}})],$.prototype,"defaultLabel",void 0),e([r(o({..._},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],$.prototype,"defaultSymbol",null),e([r({type:String,value:null,json:{write:!0}})],$.prototype,"fieldDelimiter",null),e([r({type:b,readOnly:!0})],$.prototype,"portal",void 0),e([a("portal",["styleName"])],$.prototype,"readPortal",null),e([r({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],$.prototype,"styleOrigin",void 0),e([a("styleOrigin",["styleName","styleUrl"])],$.prototype,"readStyleOrigin",null),e([f("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],$.prototype,"writeStyleOrigin",null),e([r({type:[w],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,s)=>(t.uniqueValueGroups||P(t)).map((e=>w.fromJSON(e,s)))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],$.prototype,"uniqueValueGroups",null),e([r({type:[U],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],$.prototype,"uniqueValueInfos",null),$=E=e([p("esri.renderers.UniqueValueRenderer")],$);const z=$;export{z 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.33/esri/copyright.txt for details.
4
4
  */
5
- import o from"../../Color.js";import{toHSV as r,toLAB as t,toLCH as l,toRGB as e}from"../../core/colorUtils.js";import{JSONMap as i}from"../../core/jsonMap.js";import n from"../../core/JSONSupport.js";const C=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],a=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],m=new i({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function g(o,r){if(!o||!r||o.length!==r.length)return!1;for(let t=0;t<o.length;t++)if(o[t]>r[t]+2||o[t]<r[t]-2)return!1;return!0}function p(o){const r=o.clone();return r.fromColor=o.toColor,r.toColor=o.fromColor,r.algorithm=o.algorithm,r}function u(o){if("multipart"===o.type){const r=o.clone();return r.colorRamps?.length?(r.colorRamps=r.colorRamps.reverse().map((o=>p(o))),r):r}return p(o)}function f(r,t){if(!r)return;const l=t??a;let e=null;return"algorithmic"===r.type?l.some((o=>{if(g(r.fromColor.toRgb(),o.fromColor)&&g(r.toColor.toRgb(),o.toColor))return e=o.id,!0})):"multipart"===r.type&&l.some((t=>{const l=r.colorRamps,i=t.colorRamps;if(l&&i&&l.length===i.length&&!i.some(((r,t)=>{if(!g(l[t].fromColor.toRgb(),new o(r.fromColor).toRgb())||!g(l[t].toColor.toRgb(),new o(r.toColor).toRgb()))return!0}))){if(e)return!0;e=t.id}})),e}function s(o,r,t=!1){if(!o)return;let l=!1,e=f(o,r);return null!=e||t||(l=!0,e=f(o=u(o),r)),e?{id:e,inverted:l}:void 0}function c(o,r=!1){const t="string"==typeof o?o:s(o,void 0,r)?.id;return t?m.toJSON(t):null}function d(o,r="esriCIELabAlgorithm"){const t=a.find((({id:r})=>r===o));return t?t.colorRamps?{type:"multipart",colorRamps:t.colorRamps.map((o=>({type:"algorithmic",algorithm:r,fromColor:[...o.fromColor],toColor:[...o.toColor]})))}:{type:"algorithmic",algorithm:r,fromColor:[...t.fromColor],toColor:[...t.toColor]}:null}function h(o){const r=(o=o||{}).numColors||256,t=o.distanceOffset||0,l=null!=o.isCustomInterval?o.isCustomInterval:null!==o.distanceInterval&&o.distanceInterval!==1/(r-1),e=o.distanceInterval||1/(r-1);return{...o,numColors:r,distanceOffset:t,interpolateAlpha:!!o.interpolateAlpha,distanceInterval:e,isCustomInterval:l,weights:o.weights}}function b(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=0===o.s,a=0===r.s;let m=o.h,g=r.h;C&&!a?m=g:a&&!C&&(r={...r,h:m},g=m);let p,u=Math.abs(g-m);const f=360;u<f/2?p=(g-m)*i:(u=f-u,p=m>g?u*i:-u*i);const s=(r.s-o.s)*i,c=(r.v-o.v)*i;let{s:d,v:h}=o,b=m;if(e){const o=e/i;b=(b+o*p+f)%f,d+=o*s,h+=o*c}const v=[];for(let k=0;k<l-1;k++)v.push({h:b,s:d,v:h}),b=(b+p+f)%f,d+=s,h+=c;return v.push(n?{h:b,s:d,v:h}:r),v}function v(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t;let{l:C,a,b:m}=o;const g=(r.l-C)*i,p=(r.a-a)*i,u=(r.b-m)*i,f=[];if(e){const o=e/i;C+=o*g,a+=o*p,m+=o*u}for(let s=0;s<l-1;s++)f.push({l:C,a,b:m}),C+=g,a+=p,m+=u;return f.push(n?{l:C,a,b:m}:r),f}function k(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=o.h,a=r.h,m=2*Math.PI;let g;if(C<=a){const o=a-C,r=a-C-m;g=Math.abs(r)<Math.abs(o)?r:o}else{const o=a+m-C,r=a-C;g=Math.abs(r)<Math.abs(o)?r:o}const p=g*i,u=(r.l-o.l)*i,f=(r.c-o.c)*i;let{l:s,c,h:d}=o;if(e){const o=e/i;s+=o*u,c+=o*f,d=(d+o*p+m)%m}const h=[];for(let b=0;b<l-1;b++)h.push({l:s,c,h:d}),s+=u,c+=f,d=(d+p+m)%m;return h.push(n?{l:s,c,h:d}:r),h}function y(o,i){let{fromColor:n,toColor:C}=o;n=[...n],C=[...C],3===n.length&&(n=n.concat([255])),3===C.length&&(C=C.concat([255]));const a=o.algorithm||"esriCIELabAlgorithm",m=h(i),{numColors:g,distanceOffset:p,isCustomInterval:u,interpolateAlpha:f}=m;if(1===g&&0===p)return[n];if(2===g&&0===p&&!u)return[n,C];const s={r:n[0],g:n[1],b:n[2]},c={r:C[0],g:C[1],b:C[2]},d="esriCIELabAlgorithm"===a?v(t(s),t(c),m):"esriHSVAlgorithm"===a?b(r(s),r(c),m):k(l(s),l(c),m),y=[],R=n[3]??255,w=((C[3]??255)-R)/(g-1);for(let r=0;r<g;r++){const{r:o,g:t,b:l}=e(d[r]),i=f?Math.round(R+w*r):255;y.push([o,t,l,i])}return y}function R(o,r){const{numColors:t,interpolateAlpha:l}=h(r);let e=r?.weights;const{colorRamps:i}=o;if(e){const o=e.reduce(((o,r)=>o+r));e=e.map((r=>r/o))}else{e=[];for(let o=0;o<i.length;o++)e[o]=1/i.length}const n=[],C=1/(t-1);let a=0,m=!1;for(let p=0;p<i.length;p++){const o=n.length,r=m?0:o*C-a;a+=e[p];let g=p===i.length-1?t-1-o:(e[p]-r)/C;if(m=Math.ceil(g)===g,g=Math.ceil(g),0===g)continue;const u=y(i[p],{numColors:g,interpolateAlpha:l,distanceOffset:r/e[p],distanceInterval:C/e[p]});n.push(...u)}const g=[...i[i.length-1].toColor];return 3===g.length&&g.push(255),n.push(g),n}function w(o,r){const t=n.isSerializable(o)?o.toJSON():o;return"multipart"===t.type?R(t,r):y(t,r)}function B(o,r){const t=w(o,r),l=r?.interpolateAlpha;return t.forEach(((o,r)=>{o.unshift(r),l||o.pop()})),t}function D(o){const t=[];for(let l=0;l<o.length;l+=4){const e=r({r:o[l],g:o[l+1],b:o[l+2]});t.push([e.h/60,e.s/100,255*e.v/100])}return t}function I(o){const t=r(o);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function G(o){const r=o.toJSON();return{Algorithm:r?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:I(o.fromColor),ToColor:I(o.toColor)}}function S(o){const r=c(o);if(!r)return null;if("algorithmic"===o.type)return{...G(o),Name:r};if(o.colorRamps){const t=o.colorRamps.map(G);return{type:"MultiPartColorRamp",NumColorRamps:t.length,ArrayOfColorRamp:t,Name:r}}return null}function A(o){const r=o.reverse().map((o=>{const r=o.toString(16);return r.length<2?"0"+r:r}));return 4294967295&Number.parseInt(r.join(""),16)}export{m as colorRampDict,B as convertColorRampToColormap,w as convertColorRampToColors,A as convertRGBATo32Bit,D as createHsvMap,s as getColorRampId,d as getColorRampJSON,c as getColorRampName,S as getRFxArgColorRampValue,a as predefinedJsonColorRamps,C as rasterColormapNames};
5
+ import o from"../../Color.js";import{toHSV as r,toLAB as t,toLCH as l,toRGB as e}from"../../core/colorUtils.js";import{JSONMap as i}from"../../core/jsonMap.js";import{isSerializable as n}from"../../core/support/jsonUtils.js";const C=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],m=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],a=new i({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function g(o,r){if(!o||!r||o.length!==r.length)return!1;for(let t=0;t<o.length;t++)if(o[t]>r[t]+2||o[t]<r[t]-2)return!1;return!0}function p(o){const r=o.clone();return r.fromColor=o.toColor,r.toColor=o.fromColor,r.algorithm=o.algorithm,r}function u(o){if("multipart"===o.type){const r=o.clone();return r.colorRamps?.length?(r.colorRamps=r.colorRamps.reverse().map((o=>p(o))),r):r}return p(o)}function f(r,t){if(!r)return;const l=t??m;let e=null;return"algorithmic"===r.type?l.some((o=>{if(g(r.fromColor.toRgb(),o.fromColor)&&g(r.toColor.toRgb(),o.toColor))return e=o.id,!0})):"multipart"===r.type&&l.some((t=>{const l=r.colorRamps,i=t.colorRamps;if(l&&i&&l.length===i.length&&!i.some(((r,t)=>{if(!g(l[t].fromColor.toRgb(),new o(r.fromColor).toRgb())||!g(l[t].toColor.toRgb(),new o(r.toColor).toRgb()))return!0}))){if(e)return!0;e=t.id}})),e}function s(o,r,t=!1){if(!o)return;let l=!1,e=f(o,r);return null!=e||t||(l=!0,e=f(o=u(o),r)),e?{id:e,inverted:l}:void 0}function c(o,r=!1){const t="string"==typeof o?o:s(o,void 0,r)?.id;return t?a.toJSON(t):null}function d(o,r="esriCIELabAlgorithm"){const t=m.find((({id:r})=>r===o));return t?t.colorRamps?{type:"multipart",colorRamps:t.colorRamps.map((o=>({type:"algorithmic",algorithm:r,fromColor:[...o.fromColor],toColor:[...o.toColor]})))}:{type:"algorithmic",algorithm:r,fromColor:[...t.fromColor],toColor:[...t.toColor]}:null}function h(o){const r=(o=o||{}).numColors||256,t=o.distanceOffset||0,l=null!=o.isCustomInterval?o.isCustomInterval:null!==o.distanceInterval&&o.distanceInterval!==1/(r-1),e=o.distanceInterval||1/(r-1);return{...o,numColors:r,distanceOffset:t,interpolateAlpha:!!o.interpolateAlpha,distanceInterval:e,isCustomInterval:l,weights:o.weights}}function b(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=0===o.s,m=0===r.s;let a=o.h,g=r.h;C&&!m?a=g:m&&!C&&(r={...r,h:a},g=a);let p,u=Math.abs(g-a);const f=360;u<f/2?p=(g-a)*i:(u=f-u,p=a>g?u*i:-u*i);const s=(r.s-o.s)*i,c=(r.v-o.v)*i;let{s:d,v:h}=o,b=a;if(e){const o=e/i;b=(b+o*p+f)%f,d+=o*s,h+=o*c}const v=[];for(let k=0;k<l-1;k++)v.push({h:b,s:d,v:h}),b=(b+p+f)%f,d+=s,h+=c;return v.push(n?{h:b,s:d,v:h}:r),v}function v(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t;let{l:C,a:m,b:a}=o;const g=(r.l-C)*i,p=(r.a-m)*i,u=(r.b-a)*i,f=[];if(e){const o=e/i;C+=o*g,m+=o*p,a+=o*u}for(let s=0;s<l-1;s++)f.push({l:C,a:m,b:a}),C+=g,m+=p,a+=u;return f.push(n?{l:C,a:m,b:a}:r),f}function k(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=o.h,m=r.h,a=2*Math.PI;let g;if(C<=m){const o=m-C,r=m-C-a;g=Math.abs(r)<Math.abs(o)?r:o}else{const o=m+a-C,r=m-C;g=Math.abs(r)<Math.abs(o)?r:o}const p=g*i,u=(r.l-o.l)*i,f=(r.c-o.c)*i;let{l:s,c,h:d}=o;if(e){const o=e/i;s+=o*u,c+=o*f,d=(d+o*p+a)%a}const h=[];for(let b=0;b<l-1;b++)h.push({l:s,c,h:d}),s+=u,c+=f,d=(d+p+a)%a;return h.push(n?{l:s,c,h:d}:r),h}function y(o,i){let{fromColor:n,toColor:C}=o;n=[...n],C=[...C],3===n.length&&(n=n.concat([255])),3===C.length&&(C=C.concat([255]));const m=o.algorithm||"esriCIELabAlgorithm",a=h(i),{numColors:g,distanceOffset:p,isCustomInterval:u,interpolateAlpha:f}=a;if(1===g&&0===p)return[n];if(2===g&&0===p&&!u)return[n,C];const s={r:n[0],g:n[1],b:n[2]},c={r:C[0],g:C[1],b:C[2]},d="esriCIELabAlgorithm"===m?v(t(s),t(c),a):"esriHSVAlgorithm"===m?b(r(s),r(c),a):k(l(s),l(c),a),y=[],R=n[3]??255,w=((C[3]??255)-R)/(g-1);for(let r=0;r<g;r++){const{r:o,g:t,b:l}=e(d[r]),i=f?Math.round(R+w*r):255;y.push([o,t,l,i])}return y}function R(o,r){const{numColors:t,interpolateAlpha:l}=h(r);let e=r?.weights;const{colorRamps:i}=o;if(e){const o=e.reduce(((o,r)=>o+r));e=e.map((r=>r/o))}else{e=[];for(let o=0;o<i.length;o++)e[o]=1/i.length}const n=[],C=1/(t-1);let m=0,a=!1;for(let p=0;p<i.length;p++){const o=n.length,r=a?0:o*C-m;m+=e[p];let g=p===i.length-1?t-1-o:(e[p]-r)/C;if(a=Math.ceil(g)===g,g=Math.ceil(g),0===g)continue;const u=y(i[p],{numColors:g,interpolateAlpha:l,distanceOffset:r/e[p],distanceInterval:C/e[p]});n.push(...u)}const g=[...i[i.length-1].toColor];return 3===g.length&&g.push(255),n.push(g),n}function w(o,r){const t=n(o)?o.toJSON():o;return"multipart"===t.type?R(t,r):y(t,r)}function B(o,r){const t=w(o,r),l=r?.interpolateAlpha;return t.forEach(((o,r)=>{o.unshift(r),l||o.pop()})),t}function D(o){const t=[];for(let l=0;l<o.length;l+=4){const e=r({r:o[l],g:o[l+1],b:o[l+2]});t.push([e.h/60,e.s/100,255*e.v/100])}return t}function I(o){const t=r(o);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function G(o){const r=o.toJSON();return{Algorithm:r?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:I(o.fromColor),ToColor:I(o.toColor)}}function A(o){const r=c(o);if(!r)return null;if("algorithmic"===o.type)return{...G(o),Name:r};if(o.colorRamps){const t=o.colorRamps.map(G);return{type:"MultiPartColorRamp",NumColorRamps:t.length,ArrayOfColorRamp:t,Name:r}}return null}function P(o){const r=o.reverse().map((o=>{const r=o.toString(16);return r.length<2?"0"+r:r}));return 4294967295&Number.parseInt(r.join(""),16)}export{a as colorRampDict,B as convertColorRampToColormap,w as convertColorRampToColors,P as convertRGBATo32Bit,D as createHsvMap,s as getColorRampId,d as getColorRampJSON,c as getColorRampName,A as getRFxArgColorRampValue,m as predefinedJsonColorRamps,C as rasterColormapNames};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const e="20250422",a="183e2c218e38733657b538bd23e8882a81d061a6";export{e as buildDate,a as commitHash};
5
+ const b="20250424",a="0381b1480547c57a17136852873b53ba0e4b21d2";export{b as buildDate,a as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../chunks/tslib.es6.js";import{clone as t}from"../core/lang.js";import r from"../core/Logger.js";import{makeData as e}from"../core/urlUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{enumeration as s}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import l from"./Symbol3DLayer.js";import{white as c,isBlack as a}from"./support/colors.js";import{IconSymbol3DLayerResource as p}from"./support/IconSymbol3DLayerResource.js";import{screenSizeProperty as m}from"./support/materialUtils.js";import{Symbol3DAnchorPosition2D as u}from"./support/Symbol3DAnchorPosition2D.js";import{Symbol3DIconOutline as h}from"./support/Symbol3DIconOutline.js";import{Symbol3DMaterial as y}from"./support/Symbol3DMaterial.js";var d;const f="esri.symbols.IconSymbol3DLayer";let g=class extends l{static{d=this}constructor(o){super(o),this.material=null,this.resource=null,this.type="icon",this.size=12,this.anchor="center",this.anchorPosition=null,this.outline=null,this.angle=0}clone(){return new d({anchor:this.anchor,anchorPosition:t(this.anchorPosition),enabled:this.enabled,material:t(this.material),outline:t(this.outline),resource:t(this.resource),angle:this.angle,size:this.size})}static fromSimpleMarkerSymbol(o){const t=o.color||c,r=j(o),e=o.outline&&o.outline.width>0?{size:o.outline.width,color:(o.outline.color||c).clone()}:null;return new d({size:o.size,angle:o.angle,resource:{primitive:S(o.style)},material:{color:t},outline:e,anchor:r?"relative":void 0,anchorPosition:r})}static fromPictureMarkerSymbol(o){const t=!o.color||a(o.color)?c:o.color,r=j(o);return new d({size:o.width<=o.height?o.height:o.width,angle:o.angle,resource:{href:o.url},material:{color:t.clone()},anchor:r?"relative":void 0,anchorPosition:r})}static fromCIMSymbol(o){return new d({resource:{href:e({mediaType:"application/json",data:JSON.stringify(o.data)})}})}};o([i({type:y,json:{write:!0}})],g.prototype,"material",void 0),o([i({type:p,json:{write:!0}})],g.prototype,"resource",void 0),o([s({Icon:"icon"},{readOnly:!0})],g.prototype,"type",void 0),o([i({...m,json:{write:{isRequired:!0}}})],g.prototype,"size",void 0),o([s({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"},{default:"center"})],g.prototype,"anchor",void 0),o([i({type:u,json:{type:[Number],read:{reader:o=>new u({x:o[0],y:o[1]})},write:{writer:(o,t)=>{t.anchorPosition=[o.x,o.y]},overridePolicy(){return{enabled:"relative"===this.anchor}}}}})],g.prototype,"anchorPosition",void 0),o([i({type:h,json:{write:!0}})],g.prototype,"outline",void 0),o([i({type:Number,json:{write:!0,default:0}})],g.prototype,"angle",void 0),g=d=o([n(f)],g);const b=g;function j(o){const t="width"in o?o.width:o.size,r="height"in o?o.height:o.size,e=w(o.xoffset),i=w(o.yoffset);return(e||i)&&t&&r?{x:-e/t,y:i/r}:null}function w(o){return isFinite(o)?o:0}const v={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};function S(o){const t=v[o];return t||(r.getLogger(f).warn(`${o} cannot be mapped to Icon symbol. Fallback to "circle"`),"circle")}export{b as default};
5
+ import{_ as o}from"../chunks/tslib.es6.js";import{clone as t}from"../core/lang.js";import r from"../core/Logger.js";import{makeData as e}from"../core/urlUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{enumeration as s}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import l from"./Symbol3DLayer.js";import{white as c,isBlack as a}from"./support/colors.js";import{IconSymbol3DLayerResource as p}from"./support/IconSymbol3DLayerResource.js";import{screenSizeProperty as m}from"./support/materialUtils.js";import{Symbol3DAnchorPosition2D as u}from"./support/Symbol3DAnchorPosition2D.js";import{Symbol3DIconOutline as h}from"./support/Symbol3DIconOutline.js";import{Symbol3DMaterial as y}from"./support/Symbol3DMaterial.js";var d;let f=class extends l{static{d=this}constructor(o){super(o),this.material=null,this.resource=null,this.type="icon",this.size=12,this.anchor="center",this.anchorPosition=null,this.outline=null,this.angle=0}clone(){return new d({anchor:this.anchor,anchorPosition:t(this.anchorPosition),enabled:this.enabled,material:t(this.material),outline:t(this.outline),resource:t(this.resource),angle:this.angle,size:this.size})}static fromSimpleMarkerSymbol(o){const t=o.color||c,e=b(o),i=o.outline&&o.outline.width>0?{size:o.outline.width,color:(o.outline.color||c).clone()}:null;return new d({size:o.size,angle:o.angle,resource:{primitive:v((()=>r.getLogger(this.prototype)),o.style)},material:{color:t},outline:i,anchor:e?"relative":void 0,anchorPosition:e})}static fromPictureMarkerSymbol(o){const t=!o.color||a(o.color)?c:o.color,r=b(o);return new d({size:o.width<=o.height?o.height:o.width,angle:o.angle,resource:{href:o.url},material:{color:t.clone()},anchor:r?"relative":void 0,anchorPosition:r})}static fromCIMSymbol(o){return new d({resource:{href:e({mediaType:"application/json",data:JSON.stringify(o.data)})}})}};o([i({type:y,json:{write:!0}})],f.prototype,"material",void 0),o([i({type:p,json:{write:!0}})],f.prototype,"resource",void 0),o([s({Icon:"icon"},{readOnly:!0})],f.prototype,"type",void 0),o([i({...m,json:{write:{isRequired:!0}}})],f.prototype,"size",void 0),o([s({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"},{default:"center"})],f.prototype,"anchor",void 0),o([i({type:u,json:{type:[Number],read:{reader:o=>new u({x:o[0],y:o[1]})},write:{writer:(o,t)=>{t.anchorPosition=[o.x,o.y]},overridePolicy(){return{enabled:"relative"===this.anchor}}}}})],f.prototype,"anchorPosition",void 0),o([i({type:h,json:{write:!0}})],f.prototype,"outline",void 0),o([i({type:Number,json:{write:!0,default:0}})],f.prototype,"angle",void 0),f=d=o([n("esri.symbols.IconSymbol3DLayer")],f);const g=f;function b(o){const t="width"in o?o.width:o.size,r="height"in o?o.height:o.size,e=j(o.xoffset),i=j(o.yoffset);return(e||i)&&t&&r?{x:-e/t,y:i/r}:null}function j(o){return isFinite(o)?o:0}const w={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};function v(o,t){const r=w[t];return r||(o().warn(`${t} cannot be mapped to Icon symbol. Fallback to "circle"`),"circle")}export{g 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.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Error.js";import e from"../../../core/Logger.js";import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import o from"../../../geometry/SpatialReference.js";import{getPathLength as r,closeRingsAndFixWinding as n}from"../../../geometry/support/coordsUtils.js";import{isPolygon as i,isPolyline as l}from"../../../geometry/support/jsonUtils.js";import a from"../../../geometry/support/PolylineBuilder.js";import{Point as h}from"../../../geometry/support/TileClipper.js";import{PathEffectCursor as c}from"../CIMCursor.js";import{SegmentCursor as y}from"../../../views/2d/engine/webgl/mesh/templates/segmentUtils.js";const p=()=>e.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class x{static{this.instance=null}static local(){return null===x.instance&&(x.instance=new x),x.instance}execute(t,e,s,o,r){return new _(t,e,s,r)}}class _ extends c{constructor(t,e,s,o){super(t,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new h(NaN,NaN),this._lastWidth=0,this._halfFromWidth=Math.abs(void 0!==e.fromWidth?e.fromWidth:0)*s*.5,this._halfToWidth=Math.abs(void 0!==e.toWidth?e.toWidth:1)*s*.5,this._originalLength=(void 0!==e.length?e.length:0)*s,this._length=0,this._geometryEngine=o}processPath(e){if(e.totalSize<=0)return null;if(this._halfFromWidth<=0&&this._halfToWidth<=0){const t=s.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,e.yFactor);for(e.seekPathEnd();e.prevPoint();)t.pushXY(e.x,e.y);for(e.seekPathStart();e.nextPoint();)t.pushXY(e.x,e.y);return t}const h=[];e.seekPathStart();let c=0,x=0;for(;e.nextPoint();)h.push([e.x-c,e.y-x]),c=e.x,x=e.y;const _=this._geometryEngine?.simplify(o.WebMercator,{paths:[h]});if(!_)return p().error(new t("mapview-bad-resource","Unable to simplify geometry")),null;const f=i(_)?_.rings:l(_)?_.paths:null;if(!f)return p().error(new t("mapview-bad-resource","Unable to process geometry")),null;const d=new a,m=new a;let g=0;for(const t of f)g+=r(t);if(0===this._originalLength||this._originalLength>g){this._length=g;const t=(this._halfToWidth-this._halfFromWidth)/this._length;if(Math.abs(t)<1){const e=t*t;this._slopeC=Math.sqrt(1/(1+e)),this._slopeS=Math.sqrt(e/(1+e)),t<0&&(this._slopeS=-this._slopeS)}else this._slopeC=this._slopeS=.7071}else this._length=this._originalLength,this._slopeC=1,this._slopeS=0;let u=0;const S=[];for(const t of f){const e=y.create(t),s=y.create(t);this._setFromOffset(s,d,m);let o=s.next(),r=e;for(;o&&r;)u=this._setOffset(r,o,u,d,m),r=e.next(),o=s.next();r=e,r&&this._setToOffset(r,u,d,m);const n=d.getGeometry(),i=m.getGeometry(),l=[];for(const t of n)l.push(...t);for(let t=i.length-1;t>=0;t--){const e=i[t];for(let t=e.length-1;t>=0;t--)l.push(e[t])}S.push(l)}const T={rings:S};n(T);const w=this._geometryEngine?.simplify(o.WebMercator,T);return w?s.fromJSONCIM(T):null}_setFromOffset(t,e,s){const o=this._halfFromWidth,r=new h(t.xEnd-t.xStart,t.yEnd-t.yStart);r.normalize(),r.scale(o),e.beginPath([t.xStart-r.y,t.yStart+r.x]),s.beginPath([t.xStart+r.y,t.yStart-r.x])}_setToOffset(t,e,s,o){let r;r=(e+=Math.sqrt((t.xEnd-t.xStart)*(t.xEnd-t.xStart)+(t.yEnd-t.yStart)*(t.yEnd-t.yStart)))>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*e/this._length;const n=new h(t.xEnd-t.xStart,t.yEnd-t.yStart);n.normalize(),n.scale(r),s.lineTo([t.xEnd-n.y,t.yEnd+n.x]),o.lineTo([t.xEnd+n.y,t.yEnd-n.x])}_setOffset(e,s,o,r,n){const i=Math.sqrt((e.xEnd-e.xStart)*(e.xEnd-e.xStart)+(e.yEnd-e.yStart)*(e.yEnd-e.yStart));let l;l=o+i>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*(o+i)/this._length,o+=i;const a=new h(e.xEnd,e.yEnd),c=new h(e.xEnd-e.xStart,e.yEnd-e.yStart);c.normalize();const y=new h(s.xEnd-s.xStart,s.yEnd-s.yStart);y.normalize();const x=c.x*y.y-c.y*y.x;0===x&&p().error(new t("mapview-bad-resource","Unable to process geometry"));const _=new h((y.x-c.x)/x,(y.y-c.y)/x),f=r.getPointCount(),d=n.getPointCount();c.leftPerpendicular(),y.leftPerpendicular();const m=c.x*y.x+c.y*y.y;if(m>.99){const t=new h((c.x+y.x)*l/2,(c.y+y.y)*l/2),e=t.clone();e.rotate(this._slopeC,this._slopeS),r.lineTo([a.x+e.x,a.y+e.y]);const s=t.clone();s.rotateReverse(this._slopeC,this._slopeS),n.lineTo([a.x-s.x,a.y-s.y])}else{if(x<0){const e=_.clone().scale(-l);e.rotateReverse(this._slopeC,this._slopeS);const s=n.getXY(d-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,e),r=h.sub(o,h.fromArray(s));if(c.x*r.y-c.y*r.x>0){const t=new h(-c.x*l,-c.y*l);t.rotateReverse(this._slopeC,this._slopeS);const e=new h(-y.x*l,-y.y*l);e.rotateReverse(this._slopeC,this._slopeS),n.lineTo([a.x+t.x,a.y+t.y]),n.lineTo([a.x,a.y]),n.lineTo([a.x+e.x,a.y+e.y])}else n.lineTo([a.x+e.x,a.y+e.y])}else{const e=_.clone().scale(l);e.rotate(this._slopeC,this._slopeS);const s=r.getXY(f-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,e),n=h.sub(o,h.fromArray(s));if(c.x*n.y-c.y*n.x>0){const t=c.clone().scale(l);t.rotate(this._slopeC,this._slopeS);const e=y.clone().scale(l);e.rotate(this._slopeC,this._slopeS),r.lineTo([a.x+t.x,a.y+t.y]),r.lineTo([a.x,a.y]),r.lineTo([a.x+e.x,a.y+e.y])}else r.lineTo([a.x+e.x,a.y+e.y])}const s=Math.acos(m);let o=1;if(l>.25){const t=2*Math.acos(1-.25/l);t<s&&(o=Math.round(s/t))}const i=Math.cos(s/o),g=Math.sin(s/o),u=c.clone();if(x<0){u.rotate(this._slopeC,this._slopeS);const s=r.getXY(f-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,u.clone().scale(this._lastWidth)),n=h.sub(o,h.fromArray(s)),i=c.x*n.y-c.y*n.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&i>0){const t=new h(e.xStart,e.yStart),s=this._lastTangent1.clone().scale(this._lastWidth);s.rotate(this._slopeC,this._slopeS);const o=c.clone().scale(this._lastWidth);o.rotate(this._slopeC,this._slopeS),r.lineTo([t.x+s.x,t.y+s.y]),r.lineTo([t.x,t.y]),r.lineTo([t.x+o.x,t.y+o.y])}}else{u.scale(-1).rotateReverse(this._slopeC,this._slopeS);const s=n.getXY(d-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,u.clone().scale(this._lastWidth)),r=h.sub(o,h.fromArray(s)),i=c.x*r.y-c.y*r.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&i>0){const t=new h(e.xStart,e.yStart),s=this._lastTangent1.clone().scale(-this._lastWidth);s.rotateReverse(this._slopeC,this._slopeS);const o=c.clone().scale(-this._lastWidth);o.rotateReverse(this._slopeC,this._slopeS),n.lineTo([t.x+s.x,t.y+s.y]),n.lineTo([t.x,t.y]),n.lineTo([t.x+o.x,t.y+o.y])}}u.scale(l);for(let t=0;t<=o;t++)x<0?(r.lineTo([a.x+u.x,a.y+u.y]),u.rotateReverse(i,g)):(n.lineTo([a.x+u.x,a.y+u.y]),u.rotate(i,g))}return this._lastTangent1.setCoords(c.x,c.y),this._lastWidth=l,o}}export{x as EffectTaperedPolygon};
5
+ import t from"../../../core/Error.js";import e from"../../../core/Logger.js";import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import o from"../../../geometry/SpatialReference.js";import{getPathLength as i,closeRingsAndFixWinding as n}from"../../../geometry/support/coordsUtils.js";import{isPolygon as r,isPolyline as l}from"../../../geometry/support/jsonUtils.js";import a from"../../../geometry/support/PolylineBuilder.js";import{Point as h}from"../../../geometry/support/TileClipper.js";import{PathEffectCursor as c}from"../CIMCursor.js";import{SegmentCursor as y}from"../../../views/2d/engine/webgl/mesh/templates/segmentUtils.js";const p=()=>e.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class x{static{this.instance=null}static local(){return null===x.instance&&(x.instance=new x),x.instance}execute(t,e,s,o,i){return new _(t,e,s,o,i)}}class _ extends c{constructor(t,e,s,o,i){super(t,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new h(NaN,NaN),this._lastWidth=0,this._tileKey=null,this._halfFromWidth=Math.abs(void 0!==e.fromWidth?e.fromWidth:0)*s*.5,this._halfToWidth=Math.abs(void 0!==e.toWidth?e.toWidth:1)*s*.5,this._originalLength=(void 0!==e.length?e.length:0)*s,this._length=0,this._tileKey=o,this._geometryEngine=i}processPath(e){if(e.totalSize<=0)return null;if(this._halfFromWidth<=0&&this._halfToWidth<=0){const t=s.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,e.yFactor);for(e.seekPathEnd();e.prevPoint();)t.pushXY(e.x,e.y);for(e.seekPathStart();e.nextPoint();)t.pushXY(e.x,e.y);return t}const h=[];e.seekPathStart();let c=0,x=0;for(;e.nextPoint();)h.push([e.x-c,e.y-x]),c=e.x,x=e.y;let _=this._geometryEngine?.simplify(o.WebMercator,{paths:[h]});_||null!=this._tileKey||(_={paths:[h]});const f=r(_)?_.rings:l(_)?_.paths:null;if(!f)return p().error(new t("mapview-bad-resource","Unable to process geometry")),null;const d=new a,m=new a;let g=0;for(const t of f)g+=i(t);if(0===this._originalLength||this._originalLength>g){this._length=g;const t=(this._halfToWidth-this._halfFromWidth)/this._length;if(Math.abs(t)<1){const e=t*t;this._slopeC=Math.sqrt(1/(1+e)),this._slopeS=Math.sqrt(e/(1+e)),t<0&&(this._slopeS=-this._slopeS)}else this._slopeC=this._slopeS=.7071}else this._length=this._originalLength,this._slopeC=1,this._slopeS=0;let u=0;const S=[];for(const t of f){const e=y.create(t),s=y.create(t);this._setFromOffset(s,d,m);let o=s.next(),i=e;for(;o&&i;)u=this._setOffset(i,o,u,d,m),i=e.next(),o=s.next();i=e,i&&this._setToOffset(i,u,d,m);const n=d.getGeometry(),r=m.getGeometry(),l=[];for(const t of n)l.push(...t);for(let t=r.length-1;t>=0;t--){const e=r[t];for(let t=e.length-1;t>=0;t--)l.push(e[t])}S.push(l)}const T={rings:S};n(T);let w=this._geometryEngine?.simplify(o.WebMercator,T);if(!w){if(null!=this._tileKey)return null;w=T}return s.fromJSONCIM(w)}_setFromOffset(t,e,s){const o=this._halfFromWidth,i=new h(t.xEnd-t.xStart,t.yEnd-t.yStart);i.normalize(),i.scale(o),e.beginPath([t.xStart-i.y,t.yStart+i.x]),s.beginPath([t.xStart+i.y,t.yStart-i.x])}_setToOffset(t,e,s,o){let i;i=(e+=Math.sqrt((t.xEnd-t.xStart)*(t.xEnd-t.xStart)+(t.yEnd-t.yStart)*(t.yEnd-t.yStart)))>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*e/this._length;const n=new h(t.xEnd-t.xStart,t.yEnd-t.yStart);n.normalize(),n.scale(i),s.lineTo([t.xEnd-n.y,t.yEnd+n.x]),o.lineTo([t.xEnd+n.y,t.yEnd-n.x])}_setOffset(e,s,o,i,n){const r=Math.sqrt((e.xEnd-e.xStart)*(e.xEnd-e.xStart)+(e.yEnd-e.yStart)*(e.yEnd-e.yStart));let l;l=o+r>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*(o+r)/this._length,o+=r;const a=new h(e.xEnd,e.yEnd),c=new h(e.xEnd-e.xStart,e.yEnd-e.yStart);c.normalize();const y=new h(s.xEnd-s.xStart,s.yEnd-s.yStart);y.normalize();const x=c.x*y.y-c.y*y.x;0===x&&p().error(new t("mapview-bad-resource","Unable to process geometry"));const _=new h((y.x-c.x)/x,(y.y-c.y)/x),f=i.getPointCount(),d=n.getPointCount();c.leftPerpendicular(),y.leftPerpendicular();const m=c.x*y.x+c.y*y.y;if(m>.99){const t=new h((c.x+y.x)*l/2,(c.y+y.y)*l/2),e=t.clone();e.rotate(this._slopeC,this._slopeS),i.lineTo([a.x+e.x,a.y+e.y]);const s=t.clone();s.rotateReverse(this._slopeC,this._slopeS),n.lineTo([a.x-s.x,a.y-s.y])}else{if(x<0){const e=_.clone().scale(-l);e.rotateReverse(this._slopeC,this._slopeS);const s=n.getXY(d-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,e),i=h.sub(o,h.fromArray(s));if(c.x*i.y-c.y*i.x>0){const t=new h(-c.x*l,-c.y*l);t.rotateReverse(this._slopeC,this._slopeS);const e=new h(-y.x*l,-y.y*l);e.rotateReverse(this._slopeC,this._slopeS),n.lineTo([a.x+t.x,a.y+t.y]),n.lineTo([a.x,a.y]),n.lineTo([a.x+e.x,a.y+e.y])}else n.lineTo([a.x+e.x,a.y+e.y])}else{const e=_.clone().scale(l);e.rotate(this._slopeC,this._slopeS);const s=i.getXY(f-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,e),n=h.sub(o,h.fromArray(s));if(c.x*n.y-c.y*n.x>0){const t=c.clone().scale(l);t.rotate(this._slopeC,this._slopeS);const e=y.clone().scale(l);e.rotate(this._slopeC,this._slopeS),i.lineTo([a.x+t.x,a.y+t.y]),i.lineTo([a.x,a.y]),i.lineTo([a.x+e.x,a.y+e.y])}else i.lineTo([a.x+e.x,a.y+e.y])}const s=Math.acos(m);let o=1;if(l>.25){const t=2*Math.acos(1-.25/l);t<s&&(o=Math.round(s/t))}const r=Math.cos(s/o),g=Math.sin(s/o),u=c.clone();if(x<0){u.rotate(this._slopeC,this._slopeS);const s=i.getXY(f-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,u.clone().scale(this._lastWidth)),n=h.sub(o,h.fromArray(s)),r=c.x*n.y-c.y*n.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const t=new h(e.xStart,e.yStart),s=this._lastTangent1.clone().scale(this._lastWidth);s.rotate(this._slopeC,this._slopeS);const o=c.clone().scale(this._lastWidth);o.rotate(this._slopeC,this._slopeS),i.lineTo([t.x+s.x,t.y+s.y]),i.lineTo([t.x,t.y]),i.lineTo([t.x+o.x,t.y+o.y])}}else{u.scale(-1).rotateReverse(this._slopeC,this._slopeS);const s=n.getXY(d-1);s||p().error(new t("mapview-bad-resource","Unable to process geometry, index out of scope"));const o=h.add(a,u.clone().scale(this._lastWidth)),i=h.sub(o,h.fromArray(s)),r=c.x*i.y-c.y*i.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const t=new h(e.xStart,e.yStart),s=this._lastTangent1.clone().scale(-this._lastWidth);s.rotateReverse(this._slopeC,this._slopeS);const o=c.clone().scale(-this._lastWidth);o.rotateReverse(this._slopeC,this._slopeS),n.lineTo([t.x+s.x,t.y+s.y]),n.lineTo([t.x,t.y]),n.lineTo([t.x+o.x,t.y+o.y])}}u.scale(l);for(let t=0;t<=o;t++)x<0?(i.lineTo([a.x+u.x,a.y+u.y]),u.rotateReverse(r,g)):(n.lineTo([a.x+u.x,a.y+u.y]),u.rotate(r,g))}return this._lastTangent1.setCoords(c.x,c.y),this._lastWidth=l,o}}export{x as EffectTaperedPolygon};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../core/Collection.js";import{makeHandle as r}from"../core/handleUtils.js";import t from"../core/Logger.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import n from"../rest/featureService/FeatureService.js";import s from"./VersioningState.js";import i from"./VersionManagementService.js";import{createVersionAdapters as a}from"./versionAdapters/utils.js";async function c(r,t){let o;if("layers"in r){const e=a(r.allTables.concat(r.allLayers).filter((e=>"group"!==e.type)).toArray());r.utilityNetworks&&r.utilityNetworks.forEach((r=>{const t=a([r]);e.push(...t)})),o=e}else o=new e(r);const c=new Map;for(const n of o){const r=c.get(n.featureServiceUrl);r?r.push(n):c.set(n.featureServiceUrl,new e([n]))}const l=new e;for(const[e,a]of c){const r=new n({url:e});if(await r.load(),!r.versionManagementServiceUrl)continue;const o=new i({url:r.versionManagementServiceUrl});l.push(new s({versionManagementService:o,versionableItems:a,usePersistentReadSessions:t}))}return l}const l=new Map;async function f(e,n=!1){const s=await c(e.map,n);return o(l,e,(()=>(e.addHandles(r((()=>{l.delete(e),s.forEach((e=>e.destroy()))}))),s.forEach((e=>e.load().catch((e=>{t.getLogger("esri.versionManagement.VersioningState").error("Failed to load Versioning State",e)})))),s)))}export{c as createVersioningStates,f as getVersioningStates};
5
+ import e from"../core/Collection.js";import{makeHandle as r}from"../core/handleUtils.js";import o from"../core/Logger.js";import{getOrCreateMapValue as t}from"../core/MapUtils.js";import n from"../rest/featureService/FeatureService.js";import s from"./VersioningState.js";import a from"./VersionManagementService.js";import{createVersionAdapters as i}from"./versionAdapters/utils.js";async function c(r,o){let t;if("layers"in r){const e=i(r.allTables.concat(r.allLayers).filter((e=>"group"!==e.type)).toArray());r.utilityNetworks&&r.utilityNetworks.forEach((r=>{const o=i([r]);e.push(...o)})),t=e}else t=new e(r);const c=new Map;for(const n of t){const r=c.get(n.featureServiceUrl);r?r.push(n):c.set(n.featureServiceUrl,new e([n]))}const l=new e;for(const[e,i]of c){const r=new n({url:e});if(await r.load(),!r.versionManagementServiceUrl)continue;const t=new a({url:r.versionManagementServiceUrl});l.push(new s({versionManagementService:t,versionableItems:i,usePersistentReadSessions:o}))}return l}const l=new Map;async function f(e,n=!1){const s=e.map;s.loaded||await s.load();const a=await c(s,n);return t(l,e,(()=>(e.addHandles(r((()=>{l.delete(e),a.forEach((e=>e.destroy()))}))),a.forEach((e=>e.load().catch((e=>{o.getLogger("esri.versionManagement.VersioningState").error("Failed to load Versioning State",e)})))),a)))}export{c as createVersioningStates,f as getVersioningStates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{BufferObject as e}from"../../../../webgl/BufferObject.js";import"../../../../webgl/FramebufferObject.js";import"../../../../../core/has.js";import"../../../../webgl/checkWebGLError.js";import{Usage as r}from"../../../../webgl/enums.js";import"../../../../webgl/GLObjectType.js";import"../../../../webgl/Texture.js";import{VertexArrayObject as t}from"../../../../webgl/VertexArrayObject.js";import{dataSizeInBytes as s}from"./definitions.js";class o{constructor(t,s){this._boundPart=null,this.vertexBuffers=new Map,this.indexBuffers=new Map,this.groups=[];for(const o in s.vertex){const{data:i,attributes:n}=s.vertex[o],f=e.createVertex(t,r.STATIC_DRAW,i);this.vertexBuffers.set(o,{buffer:f,attributes:n})}for(const o in s.index){const{data:i}=s.index[o],n=e.createIndex(t,r.STATIC_DRAW,i);this.indexBuffers.set(o,{buffer:n})}for(const e of s.groups)this.groups.push({...e,vertexArrays:new Map});this.parts=s.parts}bind(e,r,s){this._boundPart=s;const{group:o}=this.parts[this._boundPart],i=this.groups[o];if(!i)throw new Error(`Missing group ${o}.`);let n=i.vertexArrays.get(r.stringHash);if(!n){const s=new Set(r.locations.keys()),o=i.index?this.indexBuffers.get(i.index)?.buffer:null,f=new Map,u=new Map;for(const[e,{buffer:r,attributes:t}]of this.vertexBuffers){const o=t.filter((e=>s.has(e.name)));o.length>0&&(f.set(e,o),u.set(e,r))}n=new t(e,r.locations,f,u,o),i.vertexArrays.set(r.stringHash,n)}e.bindVAO(n)}draw(e){if(null==this._boundPart)throw new Error("Mesh.bind() has not been called.");const{start:r,count:t}=this.parts[this._boundPart],{group:o}=this.parts[this._boundPart],{primitive:i,index:n}=this.groups[o];if(n){const o=this.indexBuffers.get(n);if(!o)throw new Error(`Missing index buffer "${n}".`);const{indexType:f}=o.buffer;if(!f)throw new Error("Buffer type error.");e.drawElements(i,t,f,r*s[f])}else e.drawArrays(i,r,t)}unbind(e){this._boundPart=null,e.bindVAO(null)}destroy(){for(const{vertexArrays:e}of this.groups)for(const[r,t]of e)t.disposeVAOOnly();for(const{buffer:e}of this.vertexBuffers.values())e.dispose();for(const{buffer:e}of this.indexBuffers.values())e.dispose()}}export{o as Mesh};
5
+ import{BufferObject as e}from"../../../../webgl/BufferObject.js";import"../../../../webgl/FramebufferObject.js";import"../../../../../core/has.js";import"../../../../webgl/checkWebGLError.js";import{Usage as r}from"../../../../webgl/enums.js";import"../../../../webgl/FBOAttachmentType.js";import"../../../../webgl/Texture.js";import{VertexArrayObject as t}from"../../../../webgl/VertexArrayObject.js";import{dataSizeInBytes as s}from"./definitions.js";class o{constructor(t,s){this._boundPart=null,this.vertexBuffers=new Map,this.indexBuffers=new Map,this.groups=[];for(const o in s.vertex){const{data:i,attributes:n}=s.vertex[o],f=e.createVertex(t,r.STATIC_DRAW,i);this.vertexBuffers.set(o,{buffer:f,attributes:n})}for(const o in s.index){const{data:i}=s.index[o],n=e.createIndex(t,r.STATIC_DRAW,i);this.indexBuffers.set(o,{buffer:n})}for(const e of s.groups)this.groups.push({...e,vertexArrays:new Map});this.parts=s.parts}bind(e,r,s){this._boundPart=s;const{group:o}=this.parts[this._boundPart],i=this.groups[o];if(!i)throw new Error(`Missing group ${o}.`);let n=i.vertexArrays.get(r.stringHash);if(!n){const s=new Set(r.locations.keys()),o=i.index?this.indexBuffers.get(i.index)?.buffer:null,f=new Map,a=new Map;for(const[e,{buffer:r,attributes:t}]of this.vertexBuffers){const o=t.filter((e=>s.has(e.name)));o.length>0&&(f.set(e,o),a.set(e,r))}n=new t(e,r.locations,f,a,o),i.vertexArrays.set(r.stringHash,n)}e.bindVAO(n)}draw(e){if(null==this._boundPart)throw new Error("Mesh.bind() has not been called.");const{start:r,count:t}=this.parts[this._boundPart],{group:o}=this.parts[this._boundPart],{primitive:i,index:n}=this.groups[o];if(n){const o=this.indexBuffers.get(n);if(!o)throw new Error(`Missing index buffer "${n}".`);const{indexType:f}=o.buffer;if(!f)throw new Error("Buffer type error.");e.drawElements(i,t,f,r*s[f])}else e.drawArrays(i,r,t)}unbind(e){this._boundPart=null,e.bindVAO(null)}destroy(){for(const{vertexArrays:e}of this.groups)for(const[r,t]of e)t.disposeVAOOnly();for(const{buffer:e}of this.vertexBuffers.values())e.dispose();for(const{buffer:e}of this.indexBuffers.values())e.dispose()}}export{o as Mesh};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import r from"../../../../../../core/Error.js";import e from"../../../../../../core/Logger.js";import{getDeepValue as t}from"../../../../../../core/object.js";import"../../../../../../core/has.js";import"../../../../../../core/RandomLCG.js";import"../../../../../webgl/checkWebGLError.js";import"../../../../../webgl/enums.js";import"../../../../../webgl/FramebufferObject.js";import{Program as o}from"../../../../../webgl/Program.js";import"../../../../../webgl/GLObjectType.js";import"../../../../../webgl/Texture.js";import{createTexture as i}from"../../textureUtils.js";const s=()=>e.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function n(e,t,o){const i=t.length;if(i!==o){const n=new r("Invalid Uniform",`Invalid length, expected ${o} but got ${i}`,{uniformName:e,values:t});s().errorOnce(n)}}class a{constructor(r,e,t,o,i,s){this._program=null,this._vao=null,this._temporaryTextures=[],this.vertexShader=r,this.fragmentShader=e,this._locations=t,this._locationInfo=o,this._uniformBindings=i,this._transformFeedbackBindings=s}destroy(){this._program&&this._program.dispose(),this.cleanupTemporaryTextures()}get locations(){return this._locations}get locationInfo(){return this._locationInfo}setUniforms(r){this._uniforms=r}cleanupTemporaryTextures(){for(const r of this._temporaryTextures)r.dispose();this._temporaryTextures=[]}bind(r){const e=this._uniforms;if(!this._program){const e=new Map;for(const[r,o]of this._locations)e.set(r,o);const t=[];for(const r of this._transformFeedbackBindings??[]){const{index:e,propertyKey:o}=r;t[e]=`v_${o}`}this._program=new o(r,this.vertexShader,this.fragmentShader,e,new Map,t)}const s=this._program;r.useProgram(s);for(const o of this._uniformBindings){const{shaderModulePath:a,uniformName:f,uniformType:m,uniformArrayLength:c}=o,u=t(a,e);if(null==u){if("sampler2D"===m)continue;throw new Error(`Failed to find uniform value for ${a}`)}switch("array"===m||"array-2d"===m?o.uniformArrayElementType:m){case"sampler2D":{const{unit:e,texture:t}=u;if(s.setUniform1i(f,e),"type"in t)r.bindTexture(t,e);else{const o=i(r,t.descriptor,t.data);r.bindTexture(o,e)}break}case"int":if(!c){s.setUniform1i(f,u);break}n(o.uniformName,u,c),s.setUniform1iv(f,u);break;case"float":if(!c){s.setUniform1f(f,u);break}n(o.uniformName,u,c),s.setUniform1fv(f,u);break;case"vec2":if(!c){s.setUniform2f(f,u[0],u[1]);break}n(o.uniformName,u,c),s.setUniform2fv(f,u.flat());break;case"vec3":if(!c){s.setUniform3f(f,u[0],u[1],u[2]);break}n(o.uniformName,u,c),s.setUniform3fv(f,u.flat());break;case"vec4":if(!c){s.setUniform4f(f,u[0],u[1],u[2],u[3]);break}n(o.uniformName,u,c),s.setUniform4fv(f,u.flat());break;case"mat3":s.setUniformMatrix3fv(f,u);break;case"mat4":s.setUniformMatrix4fv(f,u);break;default:throw new Error(`Unable to set uniform for type ${m}`)}}}}export{a as TypedShaderProgram};
5
+ import r from"../../../../../../core/Error.js";import e from"../../../../../../core/Logger.js";import{getDeepValue as t}from"../../../../../../core/object.js";import"../../../../../../core/has.js";import"../../../../../../core/RandomLCG.js";import"../../../../../webgl/checkWebGLError.js";import"../../../../../webgl/enums.js";import"../../../../../webgl/FramebufferObject.js";import{Program as o}from"../../../../../webgl/Program.js";import"../../../../../webgl/FBOAttachmentType.js";import"../../../../../webgl/Texture.js";import{createTexture as i}from"../../textureUtils.js";const s=()=>e.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function n(e,t,o){const i=t.length;if(i!==o){const n=new r("Invalid Uniform",`Invalid length, expected ${o} but got ${i}`,{uniformName:e,values:t});s().errorOnce(n)}}class a{constructor(r,e,t,o,i,s){this._program=null,this._vao=null,this._temporaryTextures=[],this.vertexShader=r,this.fragmentShader=e,this._locations=t,this._locationInfo=o,this._uniformBindings=i,this._transformFeedbackBindings=s}destroy(){this._program&&this._program.dispose(),this.cleanupTemporaryTextures()}get locations(){return this._locations}get locationInfo(){return this._locationInfo}setUniforms(r){this._uniforms=r}cleanupTemporaryTextures(){for(const r of this._temporaryTextures)r.dispose();this._temporaryTextures=[]}bind(r){const e=this._uniforms;if(!this._program){const e=new Map;for(const[r,o]of this._locations)e.set(r,o);const t=[];for(const r of this._transformFeedbackBindings??[]){const{index:e,propertyKey:o}=r;t[e]=`v_${o}`}this._program=new o(r,this.vertexShader,this.fragmentShader,e,new Map,t)}const s=this._program;r.useProgram(s);for(const o of this._uniformBindings){const{shaderModulePath:a,uniformName:f,uniformType:m,uniformArrayLength:c}=o,u=t(a,e);if(null==u){if("sampler2D"===m)continue;throw new Error(`Failed to find uniform value for ${a}`)}switch("array"===m||"array-2d"===m?o.uniformArrayElementType:m){case"sampler2D":{const{unit:e,texture:t}=u;if(s.setUniform1i(f,e),"type"in t)r.bindTexture(t,e);else{const o=i(r,t.descriptor,t.data);r.bindTexture(o,e)}break}case"int":if(!c){s.setUniform1i(f,u);break}n(o.uniformName,u,c),s.setUniform1iv(f,u);break;case"float":if(!c){s.setUniform1f(f,u);break}n(o.uniformName,u,c),s.setUniform1fv(f,u);break;case"vec2":if(!c){s.setUniform2f(f,u[0],u[1]);break}n(o.uniformName,u,c),s.setUniform2fv(f,u.flat());break;case"vec3":if(!c){s.setUniform3f(f,u[0],u[1],u[2]);break}n(o.uniformName,u,c),s.setUniform3fv(f,u.flat());break;case"vec4":if(!c){s.setUniform4f(f,u[0],u[1],u[2],u[3]);break}n(o.uniformName,u,c),s.setUniform4fv(f,u.flat());break;case"mat3":s.setUniformMatrix3fv(f,u);break;case"mat4":s.setUniformMatrix4fv(f,u);break;default:throw new Error(`Unable to set uniform for type ${m}`)}}}}export{a as TypedShaderProgram};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Logger.js";import"../../../webgl/checkWebGLError.js";import"../../../webgl/enums.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/GLObjectType.js";import{Texture as e}from"../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";function t(t,r,a){const i=new p(r.width,r.height);return i.dataType=r.dataType,r.depth&&(i.depth=r.depth),r.flipped&&(i.flipped=r.flipped),r.hasMipmap&&(i.hasMipmap=r.hasMipmap),i.internalFormat=r.internalFormat,r.isImmutable&&(i.isImmutable=r.isImmutable),r.isOpaque&&(i.isOpaque=r.isOpaque),r.maxAnisotropy&&(i.maxAnisotropy=r.maxAnisotropy),i.pixelFormat=r.pixelFormat,r.preMultiplyAlpha&&(i.preMultiplyAlpha=r.preMultiplyAlpha),r.samplingMode&&(i.samplingMode=r.samplingMode),r.target&&(i.target=r.target),i.uniform=r.uniform,r.unpackAlignment&&(i.unpackAlignment=r.unpackAlignment),r.wrapMode&&(i.wrapMode=r.wrapMode),new e(t,i,a)}export{t as createTexture};
5
+ import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Logger.js";import"../../../webgl/checkWebGLError.js";import"../../../webgl/enums.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/FBOAttachmentType.js";import{Texture as e}from"../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";function t(t,r,a){const i=new p(r.width,r.height);return i.dataType=r.dataType,r.depth&&(i.depth=r.depth),r.flipped&&(i.flipped=r.flipped),r.hasMipmap&&(i.hasMipmap=r.hasMipmap),i.internalFormat=r.internalFormat,r.isImmutable&&(i.isImmutable=r.isImmutable),r.isOpaque&&(i.isOpaque=r.isOpaque),r.maxAnisotropy&&(i.maxAnisotropy=r.maxAnisotropy),i.pixelFormat=r.pixelFormat,r.preMultiplyAlpha&&(i.preMultiplyAlpha=r.preMultiplyAlpha),r.samplingMode&&(i.samplingMode=r.samplingMode),r.target&&(i.target=r.target),i.uniform=r.uniform,r.unpackAlignment&&(i.unpackAlignment=r.unpackAlignment),r.wrapMode&&(i.wrapMode=r.wrapMode),new e(t,i,a)}export{t as createTexture};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,on as l,syncAndInitial as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as g}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as f}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../symbols/Font.js";import"../../../core/mathUtils.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/GLObjectType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/JSONSupport.js";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import y from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n((()=>[this.interactive,this.suspended]),(async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)}),m),n((()=>this.interactionOptions),(e=>{this._interaction&&(this._interaction.options=e)}),m),n((()=>this.selectedElement),(e=>{this._interaction&&(this._interaction.selectedElement=e)}),m)])}attach(){this.addAttachHandles([l((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),l((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new u({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new j({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const t=new M(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{o(e)||s.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new c({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,(()=>{const e=new f({element:t,spatialReference:this.view.spatialReference}),r=new y(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch((e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))}))),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}})).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=T(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new f({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){T(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([p("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function T(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],g(q,i)}class M{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const C=G;export{C as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,on as l,syncAndInitial as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as g}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as f}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../symbols/Font.js";import"../../../core/mathUtils.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/FBOAttachmentType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import y from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n((()=>[this.interactive,this.suspended]),(async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)}),m),n((()=>this.interactionOptions),(e=>{this._interaction&&(this._interaction.options=e)}),m),n((()=>this.selectedElement),(e=>{this._interaction&&(this._interaction.selectedElement=e)}),m)])}attach(){this.addAttachHandles([l((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),l((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new u({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new j({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const t=new M(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{o(e)||s.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new c({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,(()=>{const e=new f({element:t,spatialReference:this.view.spatialReference}),r=new y(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch((e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))}))),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}})).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=T(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new f({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){T(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([p("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function T(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],g(q,i)}class M{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const C=G;export{C 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/GLObjectType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/JSONSupport.js";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import b from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{defaultHighlightName as V}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=t?.name??V;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const C=P;export{C as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/FBOAttachmentType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import b from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{defaultHighlightName as V}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=t?.name??V;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const C=P;export{C 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as e}from"../../../../core/maybe.js";import{identity as t,translate as r,scale as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{BufferObject as i}from"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../../core/has.js";import"../../../webgl/checkWebGLError.js";import{DataType as o,BlendFactor as n,PrimitiveType as m,Usage as f}from"../../../webgl/enums.js";import"../../../webgl/GLObjectType.js";import"../../../webgl/Texture.js";import{VertexArrayObject as c}from"../../../webgl/VertexArrayObject.js";import{DisplayObject as h}from"../../engine/DisplayObject.js";import{VertexElementDescriptor as l}from"../../../webgl/VertexElementDescriptor.js";const p=new Map([["geometry",[new l("a_PositionAndFlags",3,o.SHORT,0,6)]]]),_=new Map;_.set("a_PositionAndFlags",0);const g={vsPath:"debug/overlay",fsPath:"debug/overlay",attributes:_};class d extends h{constructor(e){super(),this._conf=e}static makeFlags(e,t){return e|t<<2}_createTransforms(){return{displayViewScreenMat3:a()}}doRender(e){this._updateTransforms(e),this._ensureResources(e);const{context:t}=e;t.useProgram(this._program),this._program.setUniformMatrix3fv("u_dvsMat3",this.transforms.displayViewScreenMat3),this._program.setUniform4fv("u_colors",this._conf.getColors(e)),this._program.setUniform1fv("u_opacities",this._conf.getOpacities(e));const{vertexData:r,indexData:s}=this._conf.getMesh(e);this._vertexBuffer.setData(r),this._indexBuffer.setData(s),t.bindVAO(this._vertexArray),t.setBlendingEnabled(!0),t.setBlendFunction(n.ONE,n.ONE_MINUS_SRC_ALPHA),t.setDepthTestEnabled(!1),t.setStencilTestEnabled(!1),t.setColorMask(!0,!0,!0,!0),t.drawElements(m.TRIANGLES,s.length,o.UNSIGNED_INT,0)}onDetach(){this._vertexArray=e(this._vertexArray)}_updateTransforms(e){t(this.transforms.displayViewScreenMat3),r(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[-1,1]),s(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[2/e.state.size[0],-2/e.state.size[1],1])}_ensureResources(e){const{context:t}=e;this._program||(this._program=e.painter.materialManager.getProgram(g)),this._vertexBuffer||(this._vertexBuffer=i.createVertex(t,f.STREAM_DRAW)),this._indexBuffer||(this._indexBuffer=i.createIndex(t,f.STREAM_DRAW)),this._vertexArray||(this._vertexArray=new c(t,_,p,new Map([["geometry",this._vertexBuffer]]),this._indexBuffer))}}export{d as default};
5
+ import{disposeMaybe as e}from"../../../../core/maybe.js";import{identity as t,translate as r,scale as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{BufferObject as i}from"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../../core/has.js";import"../../../webgl/checkWebGLError.js";import{DataType as o,BlendFactor as n,PrimitiveType as m,Usage as f}from"../../../webgl/enums.js";import"../../../webgl/FBOAttachmentType.js";import"../../../webgl/Texture.js";import{VertexArrayObject as c}from"../../../webgl/VertexArrayObject.js";import{DisplayObject as h}from"../../engine/DisplayObject.js";import{VertexElementDescriptor as l}from"../../../webgl/VertexElementDescriptor.js";const p=new Map([["geometry",[new l("a_PositionAndFlags",3,o.SHORT,0,6)]]]),_=new Map;_.set("a_PositionAndFlags",0);const g={vsPath:"debug/overlay",fsPath:"debug/overlay",attributes:_};class d extends h{constructor(e){super(),this._conf=e}static makeFlags(e,t){return e|t<<2}_createTransforms(){return{displayViewScreenMat3:a()}}doRender(e){this._updateTransforms(e),this._ensureResources(e);const{context:t}=e;t.useProgram(this._program),this._program.setUniformMatrix3fv("u_dvsMat3",this.transforms.displayViewScreenMat3),this._program.setUniform4fv("u_colors",this._conf.getColors(e)),this._program.setUniform1fv("u_opacities",this._conf.getOpacities(e));const{vertexData:r,indexData:s}=this._conf.getMesh(e);this._vertexBuffer.setData(r),this._indexBuffer.setData(s),t.bindVAO(this._vertexArray),t.setBlendingEnabled(!0),t.setBlendFunction(n.ONE,n.ONE_MINUS_SRC_ALPHA),t.setDepthTestEnabled(!1),t.setStencilTestEnabled(!1),t.setColorMask(!0,!0,!0,!0),t.drawElements(m.TRIANGLES,s.length,o.UNSIGNED_INT,0)}onDetach(){this._vertexArray=e(this._vertexArray)}_updateTransforms(e){t(this.transforms.displayViewScreenMat3),r(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[-1,1]),s(this.transforms.displayViewScreenMat3,this.transforms.displayViewScreenMat3,[2/e.state.size[0],-2/e.state.size[1],1])}_ensureResources(e){const{context:t}=e;this._program||(this._program=e.painter.materialManager.getProgram(g)),this._vertexBuffer||(this._vertexBuffer=i.createVertex(t,f.STREAM_DRAW)),this._indexBuffer||(this._indexBuffer=i.createIndex(t,f.STREAM_DRAW)),this._vertexArray||(this._vertexArray=new c(t,_,p,new Map([["geometry",this._vertexBuffer]]),this._indexBuffer))}}export{d 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import i from"../../../core/Accessor.js";import s from"../../../core/Collection.js";import o from"../../../core/Evented.js";import"../../../core/has.js";import{abortMaybe as r,destroyMaybe as e}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{AnalysisView3D as p}from"./AnalysisView3D.js";import{LineOfSightController as u}from"./LineOfSight/LineOfSightController.js";import{LineOfSightTool as y}from"./LineOfSight/LineOfSightTool.js";import{LineOfSightVisualization as h}from"./LineOfSight/LineOfSightVisualization.js";import{connectAnalysisViewToTool as c,removeAnalysisViewTool as m,startExclusiveInteractiveOperation as d}from"../../analysis/analysisViewUtils.js";let g=class extends(p(o.EventedMixin(i))){constructor(t){super(t),this.type="line-of-sight-view-3d",this.analysis=null,this.tool=null,this.computations=new s,this.elevationAlignedObserver=null,this.observerEngineLocation=l(),this.cursorTarget=null,this.editable=!0,this.userOperation=null}initialize(){const t=this.view,i=this.analysis;this._analysisController=new u({analysis:i,analysisViewData:this,view:t}),this._analysisVisualization=new h({analysis:i,analysisViewData:this,view:t,isDecoration:!this.parent}),this.addHandles([this._analysisController.on("result-changed",(t=>{t.target!==this.cursorTarget&&this.emit("result-changed",t)})),c(this,y)])}destroy(){m(this),this.userOperation=r(this.userOperation),this._analysisController=e(this._analysisController),this._analysisVisualization=e(this._analysisVisualization)}get results(){return this.computations.map((t=>t.result))}get priority(){return this._analysisController.priority}set priority(t){this._analysisController.priority=t}get updating(){return null!=this._analysisController&&this._analysisController.updating||null!=this._analysisVisualization&&this._analysisVisualization.updating}async place(t){return this.userOperation=d(this,t),await this.userOperation.promise}getResultForTarget(t){return this.computations.find((i=>i.target===t))?.result}get testInfo(){}};t([a({readOnly:!0})],g.prototype,"type",void 0),t([a({constructOnly:!0,nonNullable:!0})],g.prototype,"analysis",void 0),t([a()],g.prototype,"tool",void 0),t([a({readOnly:!0})],g.prototype,"results",null),t([a()],g.prototype,"priority",null),t([a()],g.prototype,"computations",void 0),t([a()],g.prototype,"elevationAlignedObserver",void 0),t([a()],g.prototype,"observerEngineLocation",void 0),t([a()],g.prototype,"cursorTarget",void 0),t([a()],g.prototype,"updating",null),t([a()],g.prototype,"editable",void 0),t([a()],g.prototype,"userOperation",void 0),t([a()],g.prototype,"_analysisController",void 0),t([a()],g.prototype,"_analysisVisualization",void 0),g=t([n("esri.views.3d.analysis.LineOfSightAnalysisView3D")],g);const f=g;export{f as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import i from"../../../core/Accessor.js";import s from"../../../core/Collection.js";import o from"../../../core/Evented.js";import"../../../core/has.js";import{abortMaybe as r,destroyMaybe as e}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{AnalysisView3D as p}from"./AnalysisView3D.js";import{LineOfSightController as y}from"./LineOfSight/LineOfSightController.js";import{LineOfSightTool as u}from"./LineOfSight/LineOfSightTool.js";import{LineOfSightVisualization as h}from"./LineOfSight/LineOfSightVisualization.js";import{connectAnalysisViewToTool as c,removeAnalysisViewTool as m,startExclusiveInteractiveOperation as d}from"../../analysis/analysisViewUtils.js";let g=class extends(p(o.EventedMixin(i))){constructor(t){super(t),this.type="line-of-sight-view-3d",this.analysis=null,this.tool=null,this.computations=new s,this.cursorTarget=null,this.editable=!0,this.elevationAlignedObserver=null,this.observerEngineLocation=l(),this.userOperation=null}initialize(){const t=this.view,i=this.analysis;this._analysisController=new y({analysis:i,analysisViewData:this,view:t}),this._analysisVisualization=new h({analysis:i,analysisViewData:this,view:t,isDecoration:!this.parent}),this.addHandles([this._analysisController.on("result-changed",(t=>{t.target!==this.cursorTarget&&this.emit("result-changed",t)})),c(this,u)])}destroy(){m(this),this.userOperation=r(this.userOperation),this._analysisController=e(this._analysisController),this._analysisVisualization=e(this._analysisVisualization)}get results(){return this.computations.map((t=>t.result))}get priority(){return this._analysisController.priority}set priority(t){this._analysisController.priority=t}get updating(){return null!=this._analysisController&&this._analysisController.updating||null!=this._analysisVisualization&&this._analysisVisualization.updating}async place(t){this.userOperation=d(this,t),await this.userOperation.promise}getResultForTarget(t){return this.computations.find((i=>i.target===t))?.result}get testInfo(){}};t([a({readOnly:!0})],g.prototype,"type",void 0),t([a({constructOnly:!0,nonNullable:!0})],g.prototype,"analysis",void 0),t([a()],g.prototype,"tool",void 0),t([a({readOnly:!0})],g.prototype,"results",null),t([a()],g.prototype,"priority",null),t([a()],g.prototype,"computations",void 0),t([a()],g.prototype,"cursorTarget",void 0),t([a()],g.prototype,"editable",void 0),t([a()],g.prototype,"elevationAlignedObserver",void 0),t([a()],g.prototype,"observerEngineLocation",void 0),t([a()],g.prototype,"updating",null),t([a()],g.prototype,"userOperation",void 0),t([a()],g.prototype,"_analysisController",void 0),t([a()],g.prototype,"_analysisVisualization",void 0),g=t([n("esri.views.3d.analysis.LineOfSightAnalysisView3D")],g);const f=g;export{f as default};