@arcgis/core 5.2.0-next.33 → 5.2.0-next.35

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 (244) hide show
  1. package/analysis/Viewshed.d.ts +0 -5
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{39c994536ce6c1e5c956.js → 03350a56f840cffe5459.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{2628136bf9f47d238a24.js → 050aba7089318e1c7d53.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{dd5dddf7e422216d3806.js → 0a2f08298a3c932614f2.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a844c4e031e77db11478.js → 0df978697328b6453c94.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0f8fcbd0650b6a924f75.js +1 -0
  8. package/assets/esri/core/workers/chunks/{83ae56c7fa8d84865605.js → 0f976bfb7db98c2c0e05.js} +1 -1
  9. package/assets/esri/core/workers/chunks/10510f76f8538c2dfb84.js +1 -0
  10. package/assets/esri/core/workers/chunks/{9508fa53da5f92a0ab70.js → 155940ef3d1888272d73.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{3f63b14b53b5ca716e3a.js → 18c4c437ded8bfbd3305.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{b60f24a6c777301803f4.js → 1958facb000b6c16bfe4.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{1664434dc7a67c8ce453.js → 1ad5fcae6d6a9801cf58.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{390fda094fa8695d98cf.js → 22c447fcc9a28afeb6e3.js} +1 -1
  15. package/assets/esri/core/workers/chunks/24aa98cb2021ddd789ce.js +1 -0
  16. package/assets/esri/core/workers/chunks/{7656900713e55036c3c1.js → 29542a3d7f3fa8d42380.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{1e386475937e02b3f523.js → 2b669473aa2c7cfb63c7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{c8091e8fd7ca43a4490a.js → 2bb3494659609594c4ca.js} +1 -1
  19. package/assets/esri/core/workers/chunks/2c00f89030c7a4201033.js +2 -0
  20. package/assets/esri/core/workers/chunks/{b75a4753cea6544da8bb.js → 2c61bb25578f73ba49bc.js} +1 -1
  21. package/assets/esri/core/workers/chunks/2d92f0042facb55edcff.js +1 -0
  22. package/assets/esri/core/workers/chunks/2da797ae5af9d2ede42d.js +1 -0
  23. package/assets/esri/core/workers/chunks/{34eb22ee13df24271532.js → 2e495a28494c2351837b.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{a0b78cbeb0e53107d819.js → 367a3031abbeff0c0090.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{aba7a053015a9738d8a0.js → 368db1420b8520beae05.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{92458803531fdfe1557a.js → 38a6a7c56c592f336a12.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{c63b315c6b76b4860fc5.js → 39ff5b2a05a90e1cb214.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{0a52373c4ba652e0ee0f.js → 3b914ca36e7e2b00cfe6.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{f6afc597eaf2afa9a4a0.js → 3dd8145ef89f32920177.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{b289c46ce2dc04d32e81.js → 3e8fa2a7a36881234479.js} +1 -1
  31. package/assets/esri/core/workers/chunks/406c7723e8db470822bf.js +1 -0
  32. package/assets/esri/core/workers/chunks/{5bf01e0eff8a78b65e9e.js → 4656a4bf430d7eed1465.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{43ef6dee2e1d9ed7885e.js → 472ec242cd3070e6acfe.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1bbf5f5da5842b93f638.js → 4f08b69f4a33a114c5f7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{c60b4f2dd5fccdf362a7.js → 514ab968c0d75062e6ab.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{ba1c4a8794ac55942e35.js → 51d7145f748b4865de7f.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{2f40193d1b2e534c5226.js → 570a4725b2a4a19c5148.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{1305690054214a9cf48d.js → 586ca90e46f5cbdfeece.js} +1 -1
  39. package/assets/esri/core/workers/chunks/595401947e74a0a67144.js +1 -0
  40. package/assets/esri/core/workers/chunks/{70cb825bb37f1977d2ab.js → 59c22bab85f9cdbb9948.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{b624796ff4a9d4c406bf.js → 61efc7f5fab1c2b1f764.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{c593539c2cce7a2b9d44.js → 6596b12bb286a0b45a68.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{bb1fad01d9f070e7d795.js → 661f50cb97604453f942.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{51a53011478e0cf96e0b.js → 6c02493a1c1deff49c7e.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{7832d94f35b79e27ee51.js → 6c746ac4bd2e57b8cb41.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{71f09e34d56c9fe5c307.js → 6d72a1bdc2664df62c4c.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{4ea325c829d3b82854b1.js → 7085b4c655a19694da04.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{9f3d37e5f42bf1529673.js → 71b672259bac2befd9c7.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{a536904fe6f3b16fdbdc.js → 757982a73174aa7ab0d1.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{d0321dd4b5b2d863eecd.js → 777b16b76db406c99c69.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{32b5d2537feefe6e94a3.js → 7d65a8ec5e1f871b9321.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{fe42fa2144691b9186fd.js → 828b64624c76156a6416.js} +1 -1
  53. package/assets/esri/core/workers/chunks/857532de88f21e8c3466.js +1 -0
  54. package/assets/esri/core/workers/chunks/85a280ee915010a8da3c.js +1 -0
  55. package/assets/esri/core/workers/chunks/{3d1e5bfd88771d4a0bf6.js → 866950e9ab96aebc6b32.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{8c62e2dabd1f1e13d244.js → 86731e276b31453bc235.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{25932fa010f9a32475c1.js → 88ec63501fa2f6fdadca.js} +1 -1
  58. package/assets/esri/core/workers/chunks/8a9b2efa0603e9fa4e8b.js +1 -0
  59. package/assets/esri/core/workers/chunks/{af3b060fdfa3b6174340.js → 8aa5bbf9a9b09815725a.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{2353fbc1ff4481dcfb1f.js → 8b68a69ab8fb1679e7b2.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{35b3ff25f5fe24fe15e2.js → 96860b6035e0b06672dd.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{e2f33945d838183a2192.js → 98685bd149dee1d6dc99.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{122892f365f5327d290c.js → 9de9cec5c644bc452294.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{456b77b8f13933a75b68.js → 9fb0431b0628dcb53004.js} +54 -54
  65. package/assets/esri/core/workers/chunks/{940ebb13618d38c6b459.js → a2a688dd2ed4565e01ff.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{47f21b65065558d583ca.js → a2e754df3215e8b00a8f.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{f59b76fde2cbd17f64b3.js → a3ae7c41832c7a8b0570.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{6dc60afb0c39bbb001a3.js → a3e86830460e52706a4d.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{c030a974a63155f450e9.js → a58b8903ae17acf117d6.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{c4a2ec2e5897300163ac.js → ab3d1c00ef514b61ce0b.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{b324bdb9c74fc3f956db.js → add79af151e3eb560599.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{3b3f91a61e3f29af1fb2.js → ae5363956b4467208e04.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{38b69fba9ae4ccbae6b7.js → afaf6874a645854c3357.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{36913f0f944a9eb82cd3.js → b24b7411a73d1da87c30.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{a3393780655152102c45.js → b97b83159fec34f383af.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{977e6f589bd266d6067d.js → bbcb213d20693fcad5be.js} +12 -12
  77. package/assets/esri/core/workers/chunks/{8ade399db21938822a7c.js → bec660ee2e7828f965e2.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{6b56971783bf4c31a563.js → c19fe4f31e4ef84bbcf6.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{5cccb8b06014ccef30f8.js → c228b058dd91bf0e1102.js} +1 -1
  80. package/assets/esri/core/workers/chunks/c2a02c33462bcdabd39d.js +1 -0
  81. package/assets/esri/core/workers/chunks/{cb30e8a66d6dcfebd439.js → cda2bae39135e5519d8c.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{414691f7758c78e2a704.js → cfbbfa5edffa57bd3a8e.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{de83c177f8a1234a5b2e.js → cffef41791f0cfa6c26c.js} +1 -1
  84. package/assets/esri/core/workers/chunks/d0217187aed8bb7038f4.js +1 -0
  85. package/assets/esri/core/workers/chunks/{70c94bcfa20453134037.js → d1928a8c86a8966e5582.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{58e0e50b6c3abaa4798f.js → d26b1a9f47b4b2744c89.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{2baee42e1797a709fe4b.js → d4a96f0402172787823a.js} +1 -1
  88. package/assets/esri/core/workers/chunks/d7e17df1c3675bf3633e.js +1 -0
  89. package/assets/esri/core/workers/chunks/dd785e595cd08b2d6284.js +1 -0
  90. package/assets/esri/core/workers/chunks/{bd260798b8de09a1eeb2.js → e3a4695c31d3f9d55213.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{197b9f8483fad2258650.js → e6263e1983e703befe48.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{6991ba1b204668e7d4da.js → e67a9f9298d63026e7f6.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{4e803d12486c8de4c901.js → ee446250a40e5d89bb5a.js} +42 -42
  94. package/assets/esri/core/workers/chunks/{6f240fe78b299e6c4fcc.js → eeee7421f64a52074ff4.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{1e109a521ca8772fdf04.js → eef7e0bee19c4258ba55.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{49a45083a9a155614c1c.js → ef32e454012f3b0e3f77.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{83ce38342796bd6d73ce.js → f137e544076482e348ad.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{4ecc345c3732f7fc130f.js → f1f3fe9d2d96578f4f6b.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{e181d0f5562878b3dc01.js → f72f38e7609756a7f8ea.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{ef5d11581a98fb333ad2.js → f83e3ad67b60744afd6d.js} +1 -1
  101. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  102. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  103. package/chunks/FocusAreaColor.glsl.js +1 -10
  104. package/chunks/GaussianSplatComposition.glsl.js +4 -4
  105. package/chunks/OITAddEmission.glsl.js +6 -0
  106. package/chunks/OITFilterOpaque.glsl.js +4 -0
  107. package/chunks/RibbonLine.glsl.js +22 -22
  108. package/chunks/lerc-wasm.js +1 -1
  109. package/config.js +1 -1
  110. package/core/workers/workerFactory.js +1 -1
  111. package/form/elements/inputs/attachments/AttachmentInput.js +1 -1
  112. package/geometry/support/frustum.js +1 -1
  113. package/geometry/support/plane.js +1 -1
  114. package/geometry/support/triangle.js +1 -1
  115. package/kernel.js +1 -1
  116. package/layers/AnnotationFeatureLayer.d.ts +110 -67
  117. package/layers/CSVLayer.d.ts +144 -175
  118. package/layers/CatalogLayer.d.ts +129 -132
  119. package/layers/DimensionFeatureLayer.d.ts +106 -63
  120. package/layers/FeatureLayer.d.ts +77 -150
  121. package/layers/GeoJSONLayer.d.ts +111 -168
  122. package/layers/OrientedImageryLayer.d.ts +125 -79
  123. package/layers/ParquetLayer.d.ts +116 -75
  124. package/layers/SubtypeGroupLayer.d.ts +86 -111
  125. package/layers/WFSLayer.d.ts +157 -127
  126. package/layers/catalog/CatalogFootprintLayer.d.ts +142 -129
  127. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  128. package/layers/graphics/sources/support/QueryTask.js +1 -1
  129. package/layers/mixins/EditBusLayer.js +1 -1
  130. package/layers/pointCloudFilters/PointCloudBitfieldFilter.d.ts +1 -1
  131. package/layers/raster/datasets/pixelReader.js +1 -1
  132. package/layers/raster/functions/pixelUtils.js +1 -1
  133. package/layers/video/VideoController.js +1 -1
  134. package/package.json +2 -2
  135. package/popup/Features.d.ts +2 -2
  136. package/popup/Features.js +1 -1
  137. package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
  138. package/support/revision.js +1 -1
  139. package/views/2d/engine/webgl/definitions.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  141. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  142. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  143. package/views/2d/input/MapViewInputManager.js +1 -1
  144. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  145. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  146. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  147. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  148. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  149. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  150. package/views/3d/analysis/Viewshed/types.d.ts +17 -0
  151. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +3 -14
  152. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  153. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  154. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  155. package/views/3d/input/SceneInputManager.js +1 -1
  156. package/views/3d/interactive/manipulators/RotateManipulator.js +1 -1
  157. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  158. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  159. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  160. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  161. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  162. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  163. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  164. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  165. package/views/3d/terrain/PatchRenderData.js +1 -1
  166. package/views/3d/webgl/ManagedFBO.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/util/emissionFilter.glsl.js +2 -0
  168. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
  169. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  170. package/views/3d/webgl-engine/effects/focusArea/FocusAreaVisualization.js +1 -1
  171. package/views/3d/webgl-engine/effects/transparency/OITAddEmission.glsl.js +2 -0
  172. package/views/3d/webgl-engine/effects/transparency/OITAddEmissionTechnique.js +2 -0
  173. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  174. package/views/3d/webgl-engine/effects/transparency/OITFilterOpaque.glsl.js +2 -0
  175. package/views/3d/webgl-engine/effects/transparency/OITFilterOpaqueTechnique.js +2 -0
  176. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  177. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  178. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  179. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
  180. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  181. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  182. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  183. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  184. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  185. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  186. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  187. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  189. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  190. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  191. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  192. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  194. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  195. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  196. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  197. package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
  198. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  199. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  200. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  201. package/views/3d/webgl-engine/shaders/GaussianSplatComposition.glsl.js +1 -1
  202. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  203. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  204. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  205. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +3 -3
  206. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
  207. package/views/input/BrowserEventSource.js +1 -1
  208. package/views/input/handlers/PreventTouchSelection.js +2 -0
  209. package/views/layers/FeatureLikeLayerView.d.ts +9 -64
  210. package/views/layers/GraphicsLayerView.d.ts +1 -1
  211. package/views/layers/ViewshedLayerView.d.ts +0 -10
  212. package/views/layers/types.d.ts +8 -1
  213. package/views/support/LayerViewManager.js +1 -1
  214. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  215. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  216. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  217. package/widgets/BatchAttributeForm.js +1 -1
  218. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  219. package/widgets/Editor/VisibleElements.d.ts +14 -1
  220. package/widgets/FeatureForm.js +1 -1
  221. package/assets/esri/core/workers/chunks/209460f8aae3f9f8c9b8.js +0 -1
  222. package/assets/esri/core/workers/chunks/2f02880a7f081eb210cd.js +0 -1
  223. package/assets/esri/core/workers/chunks/4be31fcc5482a2526d2b.js +0 -1
  224. package/assets/esri/core/workers/chunks/58acc18b92533166135d.js +0 -1
  225. package/assets/esri/core/workers/chunks/6162f6735ea4622e54d8.js +0 -1
  226. package/assets/esri/core/workers/chunks/718d2d430c1a5a940b83.js +0 -1
  227. package/assets/esri/core/workers/chunks/a6379a8df8c08b729b9c.js +0 -1
  228. package/assets/esri/core/workers/chunks/b0253fe7b3529bc22270.js +0 -1
  229. package/assets/esri/core/workers/chunks/bd0829eb79efff5b7223.js +0 -1
  230. package/assets/esri/core/workers/chunks/c193b4a175a544c4fcd6.js +0 -1
  231. package/assets/esri/core/workers/chunks/d28169816c768d55aa09.js +0 -1
  232. package/assets/esri/core/workers/chunks/d7c0ab622caf495dbcef.js +0 -1
  233. package/assets/esri/core/workers/chunks/f10a339b16d84b650012.js +0 -2
  234. package/assets/esri/core/workers/chunks/f69d3ff8a69c1985bca3.js +0 -1
  235. package/assets/esri/core/workers/chunks/f847a4846c427f671455.js +0 -1
  236. package/chunks/OITBlendEmission.glsl.js +0 -6
  237. package/chunks/OITDimOpaque.glsl.js +0 -4
  238. package/views/2d/layers/support/annodime/fields.js +0 -2
  239. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +0 -2
  240. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +0 -2
  241. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +0 -2
  242. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +0 -2
  243. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +0 -2
  244. /package/assets/esri/core/workers/chunks/{f10a339b16d84b650012.js.LICENSE.txt → 2c00f89030c7a4201033.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.33",
3
+ "version": "5.2.0-next.35",
4
4
  "type": "module",
5
5
  "homepage": "https://js.arcgis.com",
6
6
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
@@ -20,7 +20,7 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.19.1",
23
- "@arcgis/toolkit": "^5.2.0-next.24",
23
+ "@arcgis/toolkit": "^5.2.0-next.29",
24
24
  "@esri/arcgis-html-sanitizer": "~4.1.0",
25
25
  "@esri/calcite-components": "^5.1.1",
26
26
  "@vaadin/grid": "~25.2.0",
@@ -547,14 +547,14 @@ export default class Features extends FeaturesSuperclass {
547
547
  * @internal
548
548
  * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeatureIndex)
549
549
  */
550
- next(): Features;
550
+ next(): void;
551
551
  /**
552
552
  * Selects the feature at the previous index in relation to the selected feature.
553
553
  *
554
554
  * @internal
555
555
  * @see [selectedFeatureIndex](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeatureIndex)
556
556
  */
557
- previous(): Features;
557
+ previous(): void;
558
558
  /**
559
559
  * Sets the view to a given target. If [goToOverride](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#goToOverride) is set, `goToOverride()` will be called with the current view and specified `params`.
560
560
  * Otherwise, the view will be set using the provided `params`.
package/popup/Features.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import i from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import s from"../core/Logger.js";import{abortMaybe as n}from"../core/maybe.js";import{debounce as o,isAbortError as a}from"../core/promiseUtils.js";import l from"../core/ReactiveSet.js";import{watch as h,when as u,sync as c}from"../core/reactiveUtils.js";import{addMany as p}from"../core/SetUtils.js";import{property as d,subclass as g}from"../core/accessorSupport/decorators.js";import m from"../geometry/Point.js";import{initializeProjection as f,project as y}from"../geometry/projectionUtils.js";import _ from"../geometry/SpatialReference.js";import{geographicToWebMercator as F}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as w}from"../layers/LayerConstants.js";import{ActionsCollection as C,zoomToAggregatedFeatures as b,browseAggregatedFeatures as I,zoomToFeature as P}from"./actions.js";import{getSelectedTarget as A}from"./actionUtils.js";import L from"./Feature.js";import j from"./support/FeatureAbilities.js";import{getDisplayedSymbol as x}from"../symbols/support/symbolUtils.js";import{system as E}from"../time/constants.js";import{highlightsSupported as R}from"../views/support/layerViewUtils.js";import{GoTo as O}from"../widgets/support/GoTo.js";const U="location-scale-handle",S=()=>[P.clone()],T=()=>[b.clone(),I.clone()];let H=null;function M(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let D=class extends(O(r)){constructor(e){super(e),this._pendingPromises=new l,this._fetchFeaturesController=null,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new j,this.actions=new C,this.activeFeature=null,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=o(async e=>{this._cancelLocationUpdate();const t=new AbortController,{signal:i}=t;this._locationUpdateController=t,await this._locationUpdate(e,{signal:i}).catch(()=>{}).finally(()=>{this._locationUpdateController===t&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([h(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),h(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),h(()=>this.location,e=>this._locationChange(e)),h(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),h(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),h(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),h(()=>this.featureItems,()=>this._featureItemsChange()),h(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),u(()=>!this.waitingForResult,()=>this._waitingForResultChange(),c),u(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelFetchingFeatures(),this._cancelCenterAtLocation(),this._pendingPromises.clear(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new C;e.removeAll();const{actions:i,defaultActions:r,defaultPopupTemplateEnabled:s,includeDefaultActions:n,selectedFeature:o}=this,a=n?r.concat(i):i,l=o&&("function"==typeof o.getEffectivePopupTemplate&&o.getEffectivePopupTemplate(s)||o.popupTemplate),h=l?.actions,u=l?.overwriteActions?h:h?.concat(a)??a;return u?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new C;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?T():S()),e}get effectiveHeading(){return this.selectedFeatureItem?.heading??this.heading}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t),this._syncSelectedFeatureIndex(t)}get initialDisplayMode(){return this._get("initialDisplayMode")||"feature"}set initialDisplayMode(e){this._set("initialDisplayMode",e),this._syncSelectedFeatureIndex(this.features)}set location(e){let t=e;const i=this.spatialReference?.isWebMercator,r=e?.spatialReference?.isWGS84;r&&i&&(t=F(e)),this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){this._get("promises")!==e&&(this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),p(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){const{features:e,selectedFeatureIndex:t}=this;if(-1===t)return null;return e[t]||null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){const{view:e,map:t}=this;return e?e.ready?"ready":"disabled":t?"ready":"disabled"}get timeZone(){return this.view?.timeZone??E}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(!!this._fetchFeaturesController||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this.set({promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}fetchFeatures(e,t){const{view:r}=this;if(!r||!e)throw new i("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:r});return r.fetchPopupFeaturesLegacy(e,{pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal})}next(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount),this}previous(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount),this}async handleViewClick(e){return this._fetchFeaturesAndOpen(e)}_syncSelectedFeatureIndex(e){const{pendingPromisesCount:t,promiseCount:i,selectedFeatureIndex:r}=this,s=i&&e.length;"list"!==this.initialDisplayMode?s&&t&&-1===r?this.selectedFeatureIndex=0:s&&-1!==r||(this.selectedFeatureIndex=e.length?0:-1):(!s||s&&t===i)&&(this.selectedFeatureIndex=-1)}_centerAtLocation(){const{view:e}=this,t=A(this);this._cancelCenterAtLocation();const r=new AbortController,{signal:n}=r;return this._centerAtLocationController=r,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:n}}).catch(e=>{a(e)||s.getLogger(this).error(e)}):Promise.reject(new i("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:r}=this;r&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){"list"!==this.initialDisplayMode&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:r,featureItems:s}=this;if(null==i)return;const n=((i-1)*r+t)%t,o=Math.min(n+r,s.length);for(let a=n;a<o;a++){const t=s[a];t&&(t.graphic??=e[a])}}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;const s=v(e)?.type;if("map-image"!==s&&"imagery"!==s&&"imagery-tile"!==s||(e.symbol=await x(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const t=await import("../geometry/operators/labelPointOperator.js");return void(this.location=t.execute(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,r=this.view,s=this.spatialReference,n=this.map,o=this.timeZone,a=this.location,l=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length)return void this._destroyFeatureItems();const h=[],u=new Map,c=new Set;i.forEach(e=>{const t=e?.graphic;e&&t&&u.set(t,e)}),t.forEach((t,p)=>{if(!t)return;const d=i[p];if(d&&!c.has(d)&&(null==d.graphic||d.graphic===t))return d.abilities=l,h[p]=d,void c.add(d);const g=u.get(t);if(g&&!c.has(g))return g.abilities=l,h[p]=g,void c.add(g);const m=new L({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:s,graphic:t===e?t:null,location:a,map:n,view:r,timeZone:o});h[p]=m,c.add(m)}),i.forEach(e=>{!e||c.has(e)||e.destroyed||e.destroy()}),this._set("featureItems",h)}async _getScreenPoint(e,t){const{spatialReference:i,view:r}=this;if(!r)return null;await r.when();const s=e?.spatialReference;return s&&i?(await f(s,i,null,t),r.toScreen(e)):null}_cancelCenterAtLocation(){this._centerAtLocationController=n(this._centerAtLocationController)}_cancelFetchingFeatures(){this._fetchFeaturesController=n(this._fetchFeaturesController)}async _projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,event:i,signal:r}){return this.fetchFeatures(t??await this._getScreenPoint(e??this.location,{signal:r}),{signal:r,event:i})}_fetchFeaturesWithController({mapPoint:e,screenPoint:t,event:i}){this._cancelFetchingFeatures();const r=new AbortController,{signal:s}=r;this._fetchFeaturesController=r;const n=this._projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,signal:s,event:i});return n.catch(()=>{}).finally(()=>{this._fetchFeaturesController===r&&(this._fetchFeaturesController=null)}),n}async _fetchFeaturesAndOpen(e){const{mapPoint:t,screenPoint:i}=e;this.removeHandles(U),this.addHandles([h(()=>this.view?.scale,()=>this._debouncedLocationUpdate(t).catch(e=>{a(e)||s.getLogger(this).error(e)})),u(()=>!this.open,()=>{this.removeHandles(U)},{once:!0})],U);const{pendingFeatures:r}=await this._fetchFeaturesWithController({mapPoint:t,screenPoint:i,event:e});return{location:t??void 0,promises:r}}async _locationUpdate(e,t){const{spatialReference:i}=this,r=this.selectedFeature?.geometry?.type,n=this.location??e;if(r&&"mesh"!==r&&i&&n&&this.selectedFeature){if("point"===r){const e=await import("../geometry/operators/labelPointOperator.js");return void(this.location=e.execute(this.selectedFeature.geometry))}try{const e=this.selectedFeature;let r=e.geometry;const s=this._getHighlightLayer(e),o=e.getObjectId();if(!s||!this.view)return;if(o){const e=this.view?.allLayerViews.find(e=>e.layer.uid===s.uid);if(!e||!("queryFeatures"in e))return;const n=e.createQuery();n.outSpatialReference=i,n.objectIds=[o],n.returnGeometry=!0;const{features:a}=await e.queryFeatures(n,t);r=a[0]?.geometry}if(!r||"mesh"===r.type)return;r=y(r,i),H??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[a,l]=H;if(!a.execute(r,n)){const t=l.getNearestCoordinate(r,n).coordinate??n;this.selectedFeature===e&&(this.location=t)}}catch(o){a(o)||s.getLogger(this).error(o)}}}_cancelLocationUpdate(){this._locationUpdateController=n(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=v(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(M(t.type,i))return e;const r=e.getObjectId();if(null!=r)return r;const s="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||w:null,n=e.attributes;return n&&s&&n[s]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:r,view:s,open:n}=this;if(!s||!r||!n)return;const o=this._getHighlightLayer(i);if(!o)return;const a=this._getHighlightLayerView(s,o);if(!a)return;this._highlightPromises[e]=a;const l=await a;if(!(l&&R(l)&&this._highlightPromises[e]===a&&this[t]&&this.highlightEnabled))return;const h=l.highlight(this._getHighlightTarget(i,o,s.type));this.addHandles(h,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}_updateFeatures(e){const{features:t}=this,i=new Set(t),r=e.filter(e=>!i.has(e));r?.length&&(this.features=t.concat(r))}};e([d()],D.prototype,"_fetchFeaturesController",void 0),e([d({type:C})],D.prototype,"actions",void 0),e([d({readOnly:!0})],D.prototype,"active",null),e([d()],D.prototype,"activeFeature",void 0),e([d({readOnly:!0})],D.prototype,"allActions",null),e([d()],D.prototype,"aggregatedFeaturesEnabled",void 0),e([d({value:null})],D.prototype,"content",null),e([d({type:C,readOnly:!0})],D.prototype,"defaultActions",null),e([d({type:Boolean})],D.prototype,"defaultPopupTemplateEnabled",void 0),e([d({readOnly:!0})],D.prototype,"effectiveHeading",null),e([d({readOnly:!0})],D.prototype,"featureCount",null),e([d()],D.prototype,"featurePage",void 0),e([d({value:[]})],D.prototype,"features",null),e([d()],D.prototype,"featuresPerPage",void 0),e([d()],D.prototype,"featureMenuOpen",void 0),e([d({type:j})],D.prototype,"featureItemAbilities",void 0),e([d({readOnly:!0})],D.prototype,"featureItems",void 0),e([d()],D.prototype,"heading",void 0),e([d()],D.prototype,"highlightEnabled",void 0),e([d()],D.prototype,"includeDefaultActions",void 0),e([d({value:"feature"})],D.prototype,"initialDisplayMode",null),e([d({type:m})],D.prototype,"location",null),e([d()],D.prototype,"map",null),e([d()],D.prototype,"open",void 0),e([d({readOnly:!0})],D.prototype,"pendingPromisesCount",null),e([d({readOnly:!0})],D.prototype,"promiseCount",null),e([d()],D.prototype,"promises",null),e([d({value:null,readOnly:!0})],D.prototype,"selectedFeature",null),e([d({value:-1})],D.prototype,"selectedFeatureIndex",null),e([d({readOnly:!0})],D.prototype,"selectedFeatureItem",null),e([d({type:_})],D.prototype,"spatialReference",null),e([d({readOnly:!0})],D.prototype,"state",null),e([d()],D.prototype,"timeZone",null),e([d()],D.prototype,"updateLocationEnabled",void 0),e([d()],D.prototype,"view",void 0),e([d({readOnly:!0})],D.prototype,"waitingForContents",null),e([d({readOnly:!0})],D.prototype,"waitingForResult",null),e([d()],D.prototype,"zoomFactor",void 0),D=e([g("esri.popup.Features")],D);const V=D;export{V as default};
2
+ import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import i from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import s from"../core/Logger.js";import{abortMaybe as n}from"../core/maybe.js";import{debounce as o,isAbortError as a}from"../core/promiseUtils.js";import l from"../core/ReactiveSet.js";import{watch as h,when as u,sync as c}from"../core/reactiveUtils.js";import{addMany as p}from"../core/SetUtils.js";import{property as d,subclass as g}from"../core/accessorSupport/decorators.js";import m from"../geometry/Point.js";import{initializeProjection as f,project as y}from"../geometry/projectionUtils.js";import _ from"../geometry/SpatialReference.js";import{geographicToWebMercator as F}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as w}from"../layers/LayerConstants.js";import{ActionsCollection as C,zoomToAggregatedFeatures as b,browseAggregatedFeatures as I,zoomToFeature as P}from"./actions.js";import{getSelectedTarget as A}from"./actionUtils.js";import L from"./Feature.js";import j from"./support/FeatureAbilities.js";import{getDisplayedSymbol as x}from"../symbols/support/symbolUtils.js";import{system as E}from"../time/constants.js";import{highlightsSupported as R}from"../views/support/layerViewUtils.js";import{GoTo as O}from"../widgets/support/GoTo.js";const U="location-scale-handle",S=()=>[P.clone()],T=()=>[b.clone(),I.clone()];let H=null;function M(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let D=class extends(O(r)){constructor(e){super(e),this._pendingPromises=new l,this._fetchFeaturesController=null,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new j,this.actions=new C,this.activeFeature=null,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=o(async e=>{this._cancelLocationUpdate();const t=new AbortController,{signal:i}=t;this._locationUpdateController=t,await this._locationUpdate(e,{signal:i}).catch(()=>{}).finally(()=>{this._locationUpdateController===t&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([h(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),h(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),h(()=>this.location,e=>this._locationChange(e)),h(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),h(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),h(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),h(()=>this.featureItems,()=>this._featureItemsChange()),h(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),u(()=>!this.waitingForResult,()=>this._waitingForResultChange(),c),u(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelFetchingFeatures(),this._cancelCenterAtLocation(),this._pendingPromises.clear(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new C;e.removeAll();const{actions:i,defaultActions:r,defaultPopupTemplateEnabled:s,includeDefaultActions:n,selectedFeature:o}=this,a=n?r.concat(i):i,l=o&&("function"==typeof o.getEffectivePopupTemplate&&o.getEffectivePopupTemplate(s)||o.popupTemplate),h=l?.actions,u=l?.overwriteActions?h:h?.concat(a)??a;return u?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new C;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?T():S()),e}get effectiveHeading(){return this.selectedFeatureItem?.heading??this.heading}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t),this._syncSelectedFeatureIndex(t)}get initialDisplayMode(){return this._get("initialDisplayMode")||"feature"}set initialDisplayMode(e){this._set("initialDisplayMode",e),this._syncSelectedFeatureIndex(this.features)}set location(e){let t=e;const i=this.spatialReference?.isWebMercator,r=e?.spatialReference?.isWGS84;r&&i&&(t=F(e)),this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){this._get("promises")!==e&&(this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),p(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){const{features:e,selectedFeatureIndex:t}=this;if(-1===t)return null;return e[t]||null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){const{view:e,map:t}=this;return e?e.ready?"ready":"disabled":t?"ready":"disabled"}get timeZone(){return this.view?.timeZone??E}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(!!this._fetchFeaturesController||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this.set({promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}fetchFeatures(e,t){const{view:r}=this;if(!r||!e)throw new i("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:r});return r.fetchPopupFeaturesLegacy(e,{pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal})}next(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount)}previous(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount)}async handleViewClick(e){return this._fetchFeaturesAndOpen(e)}_syncSelectedFeatureIndex(e){const{pendingPromisesCount:t,promiseCount:i,selectedFeatureIndex:r}=this,s=i&&e.length;"list"!==this.initialDisplayMode?s&&t&&-1===r?this.selectedFeatureIndex=0:s&&-1!==r||(this.selectedFeatureIndex=e.length?0:-1):(!s||s&&t===i)&&(this.selectedFeatureIndex=-1)}_centerAtLocation(){const{view:e}=this,t=A(this);this._cancelCenterAtLocation();const r=new AbortController,{signal:n}=r;return this._centerAtLocationController=r,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:n}}).catch(e=>{a(e)||s.getLogger(this).error(e)}):Promise.reject(new i("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:r}=this;r&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){"list"!==this.initialDisplayMode&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:r,featureItems:s}=this;if(null==i)return;const n=((i-1)*r+t)%t,o=Math.min(n+r,s.length);for(let a=n;a<o;a++){const t=s[a];t&&(t.graphic??=e[a])}}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;const s=v(e)?.type;if("map-image"!==s&&"imagery"!==s&&"imagery-tile"!==s||(e.symbol=await x(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const t=await import("../geometry/operators/labelPointOperator.js");return void(this.location=t.execute(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,r=this.view,s=this.spatialReference,n=this.map,o=this.timeZone,a=this.location,l=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length)return void this._destroyFeatureItems();const h=[],u=new Map,c=new Set;i.forEach(e=>{const t=e?.graphic;e&&t&&u.set(t,e)}),t.forEach((t,p)=>{if(!t)return;const d=i[p];if(d&&!c.has(d)&&(null==d.graphic||d.graphic===t))return d.abilities=l,h[p]=d,void c.add(d);const g=u.get(t);if(g&&!c.has(g))return g.abilities=l,h[p]=g,void c.add(g);const m=new L({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:s,graphic:t===e?t:null,location:a,map:n,view:r,timeZone:o});h[p]=m,c.add(m)}),i.forEach(e=>{!e||c.has(e)||e.destroyed||e.destroy()}),this._set("featureItems",h)}async _getScreenPoint(e,t){const{spatialReference:i,view:r}=this;if(!r)return null;await r.when();const s=e?.spatialReference;return s&&i?(await f(s,i,null,t),r.toScreen(e)):null}_cancelCenterAtLocation(){this._centerAtLocationController=n(this._centerAtLocationController)}_cancelFetchingFeatures(){this._fetchFeaturesController=n(this._fetchFeaturesController)}async _projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,event:i,signal:r}){return this.fetchFeatures(t??await this._getScreenPoint(e??this.location,{signal:r}),{signal:r,event:i})}_fetchFeaturesWithController({mapPoint:e,screenPoint:t,event:i}){this._cancelFetchingFeatures();const r=new AbortController,{signal:s}=r;this._fetchFeaturesController=r;const n=this._projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,signal:s,event:i});return n.catch(()=>{}).finally(()=>{this._fetchFeaturesController===r&&(this._fetchFeaturesController=null)}),n}async _fetchFeaturesAndOpen(e){const{mapPoint:t,screenPoint:i}=e;this.removeHandles(U),this.addHandles([h(()=>this.view?.scale,()=>this._debouncedLocationUpdate(t).catch(e=>{a(e)||s.getLogger(this).error(e)})),u(()=>!this.open,()=>{this.removeHandles(U)},{once:!0})],U);const{pendingFeatures:r}=await this._fetchFeaturesWithController({mapPoint:t,screenPoint:i,event:e});return{location:t??void 0,promises:r}}async _locationUpdate(e,t){const{spatialReference:i}=this,r=this.selectedFeature?.geometry?.type,n=this.location??e;if(r&&"mesh"!==r&&i&&n&&this.selectedFeature){if("point"===r){const e=await import("../geometry/operators/labelPointOperator.js");return void(this.location=e.execute(this.selectedFeature.geometry))}try{const e=this.selectedFeature;let r=e.geometry;const s=this._getHighlightLayer(e),o=e.getObjectId();if(!s||!this.view)return;if(o){const e=this.view?.allLayerViews.find(e=>e.layer.uid===s.uid);if(!e||!("queryFeatures"in e))return;const n=e.createQuery();n.outSpatialReference=i,n.objectIds=[o],n.returnGeometry=!0;const{features:a}=await e.queryFeatures(n,t);r=a[0]?.geometry}if(!r||"mesh"===r.type)return;r=y(r,i),H??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[a,l]=H;if(!a.execute(r,n)){const t=l.getNearestCoordinate(r,n).coordinate??n;this.selectedFeature===e&&(this.location=t)}}catch(o){a(o)||s.getLogger(this).error(o)}}}_cancelLocationUpdate(){this._locationUpdateController=n(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=v(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(M(t.type,i))return e;const r=e.getObjectId();if(null!=r)return r;const s="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||w:null,n=e.attributes;return n&&s&&n[s]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:r,view:s,open:n}=this;if(!s||!r||!n)return;const o=this._getHighlightLayer(i);if(!o)return;const a=this._getHighlightLayerView(s,o);if(!a)return;this._highlightPromises[e]=a;const l=await a;if(!(l&&R(l)&&this._highlightPromises[e]===a&&this[t]&&this.highlightEnabled))return;const h=l.highlight(this._getHighlightTarget(i,o,s.type));this.addHandles(h,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}_updateFeatures(e){const{features:t}=this,i=new Set(t),r=e.filter(e=>!i.has(e));r?.length&&(this.features=t.concat(r))}};e([d()],D.prototype,"_fetchFeaturesController",void 0),e([d({type:C})],D.prototype,"actions",void 0),e([d({readOnly:!0})],D.prototype,"active",null),e([d()],D.prototype,"activeFeature",void 0),e([d({readOnly:!0})],D.prototype,"allActions",null),e([d()],D.prototype,"aggregatedFeaturesEnabled",void 0),e([d({value:null})],D.prototype,"content",null),e([d({type:C,readOnly:!0})],D.prototype,"defaultActions",null),e([d({type:Boolean})],D.prototype,"defaultPopupTemplateEnabled",void 0),e([d({readOnly:!0})],D.prototype,"effectiveHeading",null),e([d({readOnly:!0})],D.prototype,"featureCount",null),e([d()],D.prototype,"featurePage",void 0),e([d({value:[]})],D.prototype,"features",null),e([d()],D.prototype,"featuresPerPage",void 0),e([d()],D.prototype,"featureMenuOpen",void 0),e([d({type:j})],D.prototype,"featureItemAbilities",void 0),e([d({readOnly:!0})],D.prototype,"featureItems",void 0),e([d()],D.prototype,"heading",void 0),e([d()],D.prototype,"highlightEnabled",void 0),e([d()],D.prototype,"includeDefaultActions",void 0),e([d({value:"feature"})],D.prototype,"initialDisplayMode",null),e([d({type:m})],D.prototype,"location",null),e([d()],D.prototype,"map",null),e([d()],D.prototype,"open",void 0),e([d({readOnly:!0})],D.prototype,"pendingPromisesCount",null),e([d({readOnly:!0})],D.prototype,"promiseCount",null),e([d()],D.prototype,"promises",null),e([d({value:null,readOnly:!0})],D.prototype,"selectedFeature",null),e([d({value:-1})],D.prototype,"selectedFeatureIndex",null),e([d({readOnly:!0})],D.prototype,"selectedFeatureItem",null),e([d({type:_})],D.prototype,"spatialReference",null),e([d({readOnly:!0})],D.prototype,"state",null),e([d()],D.prototype,"timeZone",null),e([d()],D.prototype,"updateLocationEnabled",void 0),e([d()],D.prototype,"view",void 0),e([d({readOnly:!0})],D.prototype,"waitingForContents",null),e([d({readOnly:!0})],D.prototype,"waitingForResult",null),e([d()],D.prototype,"zoomFactor",void 0),D=e([g("esri.popup.Features")],D);const V=D;export{V as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../Color.js";import n from"../../../Graphic.js";import t from"../../../core/Logger.js";import{meterIn as i}from"../../support/lengthUtils.js";import{isValidNumber as r,isSizeVariable as a}from"./sizeVariableUtils.js";const s=()=>t.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),o=e=>s().warn(`The visualVariable should be an instance of esri.renderers.visualVariables.${e}`),l=()=>s().error("Use of arcade expressions requires an arcade context"),c=new n,u=Math.PI,f=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function p(e,n,t){return d(e,n,t)?.output}function d(n,t,i){const a="visualVariables"in n?n.visualVariables?.find(e=>"color"===e.type):n;if(!a)return;if("esri.renderers.visualVariables.ColorVariable"!==a.declaredClass)return void o("ColorVariable");const s="number"==typeof t,l=s?null:t,c=l?.attributes,u=a.field,{ipData:f,hasExpression:p}=a.cache;if(!u&&!p){const e=a.stops;return new I(a,e&&e[0]?e[0].color:void 0,void 0)}const d=h(a,t,i),v=a.normalizationField,m=null!=c&&null!=v?parseFloat(c[v]):void 0;let b=d;if(null!=b&&(!v||s||!isNaN(m)&&0!==m)){r(m)&&!s&&(b/=m);const n=Z(b,f);if(n){const t=n[0],r=n[1],s=t===r?a.stops[t].color:e.blendColors(a.stops[t].color,a.stops[r].color,n[2],null!=i?i.color:void 0);return new I(a,s,d)}}return new I(a,void 0,d)}function h(e,n,t){const i="number"==typeof n,r=i?null:n,a=r?.attributes;if(i)return n;const s=e.field,{hasExpression:o}=e.cache;if(!o)return a?.[s];if(null==t?.arcade)return void l();const c={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},u=t.arcade.arcadeUtils,f=u.getViewInfo(c),p=u.createExecContext(r,f,t.timeZone);if(!e.cache.compiledFunc){const n=u.createSyntaxTree(e.valueExpression);e.cache.compiledFunc=u.createFunction(n)}return u.executeFunction(e.cache.compiledFunc,p)}function v(e,n,t){return m(e,n,t)?.output}function m(e,n,t){const i="visualVariables"in e?e.visualVariables?.find(e=>"opacity"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.OpacityVariable"!==i.declaredClass)return void o("OpacityVariable");const a="number"==typeof n,s=a?null:n,l=s?.attributes,c=i.field,{ipData:u,hasExpression:f}=i.cache;if(!c&&!f){const e=i.stops;return new I(i,e&&e[0]?e[0].opacity:void 0,void 0)}const p=b(i,n,t),d=i.normalizationField,h=null!=l&&null!=d?parseFloat(l[d]):void 0;let v=p;if(null!=v&&(!d||a||!isNaN(h)&&0!==h)){r(h)&&!a&&(v/=h);const e=Z(v,u);if(e){const n=e[0],t=e[1];if(n===t)return new I(i,i.stops[n].opacity,p);const r=i.stops[n].opacity,a=i.stops[t].opacity;return new I(i,r+(a-r)*e[2],p)}}return new I(i,void 0,p)}function b(e,n,t){const i="number"==typeof n;if(i)return n;const r=i?null:n,a=r?.attributes,s=e.field,{hasExpression:o}=e.cache;if(!o)return a?.[s];if(null==t?.arcade)return void l();const c={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},u=t.arcade.arcadeUtils,f=u.getViewInfo(c),p=u.createExecContext(r,f,t.timeZone);if(!e.cache.compiledFunc){const n=u.createSyntaxTree(e.valueExpression);e.cache.compiledFunc=u.createFunction(n)}return u.executeFunction(e.cache.compiledFunc,p)}function x(e,n,t){return V(e,n,t)?.output}function V(e,n,t){const i="visualVariables"in e?e.visualVariables?.find(e=>"rotation"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.RotationVariable"!==i.declaredClass)return void o("RotationVariable");const r=i.axis||"heading",a="heading"===r&&"arithmetic"===i.rotationType?90:0,s="heading"===r&&"arithmetic"===i.rotationType?-1:1,l=i.field,{hasExpression:c}=i.cache;if(!l&&!c)return;const u=w(i,n,t);let f=u;return f="number"!=typeof f||isNaN(f)?null:a+s*f,new I(i,f,u)}function w(e,n,t){const{hasExpression:i}=e.cache;if("number"==typeof n)return n;const r=n?.attributes,a=e.field;if(!i)return r?.[a];if(null==t?.arcade)return void l();const s={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},o=t.arcade.arcadeUtils,c=o.getViewInfo(s),u=o.createExecContext(n,c,t.timeZone);if(!e.cache.compiledFunc){const n=o.createSyntaxTree(e.valueExpression);e.cache.compiledFunc=o.createFunction(n)}return o.executeFunction(e.cache.compiledFunc,u)}function y(e,n,t){const i="number"==typeof n,a=i?null:n,s=a?.attributes;let o=i?n:null;const{isScaleDriven:c}=e.cache;let u=e.cache.compiledFunc;if(c){const n=null!=t?t.scale:void 0,i=null!=t?t.view:void 0;o=null==n||"3d"===i?g(e):n}else if(!i)switch(e.inputValueType){case"expression":{if(null==t?.arcade)return void l();const n={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},i=t.arcade.arcadeUtils,r=i.getViewInfo(n),s=i.createExecContext(a,r,t.timeZone);if(!u){const n=i.createSyntaxTree(e.valueExpression);u=i.createFunction(n),e.cache.compiledFunc=u}o=i.executeFunction(u,s);break}case"field":s&&(o=s[e.field]);break;case"unknown":o=null}return r(o)?o:null}function g(e){let n=null,t=null;const i=e.stops;return i?(n=i[0].value,t=i[i.length-1].value):(n=e.minDataValue||0,t=e.maxDataValue||0),(n+t)/2}function z(e,n,t){return F(e,n,t)?.output}function F(e,n,t){const i="visualVariables"in e?e.visualVariables?.find(e=>"size"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.SizeVariable"!==i.declaredClass)return void o("SizeVariable");const a=y(i,n,t);let s=a;if(null!=s&&"number"!=typeof n&&n&&i.normalizationField){const e=n.attributes,t=parseFloat(e?.[i.normalizationField]);if(!r(t)||0===t)return;s/=t}const l=N(s,i,n,t,i.cache.ipData);return new I(i,null==l||isNaN(l)?void 0:l,a)}function S(e,n,t){return null==e?null:a(e)?z(e,n,t):r(e)?e:null}function E(e,n,t){return r(t)&&e>t?t:r(n)&&e<n?n:e}function M(e,n,t,i){const r=S(n.minSize,t,i)||n.minDataValue;return null==e&&null==r?null:(e??0)+(r??0)}function k(e,n,t){const i=e.stops;let r=i?.length&&i[0].size;return null==r&&(r=e.minSize),S(r,n,t)}function C(e,n,t,i){const r=S(n.minSize,t,i);if(null==e)return r;const{minDataValue:a,maxDataValue:s}=n;if(null==a||null==s)return null;const o=(e-a)/(s-a),l=S(n.maxSize,t,i),c=null!=i?i.shape:void 0;if(e<=a)return r;if(e>=s)return l;if(null==r||null==l)return null;if("area"===n.scaleBy&&c){const e="circle"===c,n=e?u*(r/2)**2:r*r,t=n+o*((e?u*(l/2)**2:l*l)-n);return e?2*Math.sqrt(t/u):Math.sqrt(t)}return r+o*(l-r)}function D(e,n,t,i){const r=S(n.minSize,t,i);if(null==e||null==r)return r;const a=null!=i?i.shape:void 0,{minDataValue:s}=n;if(null==s)return null;const o=e/s,l=S(n.maxSize,t,i);let c=null;return c="circle"===a?2*Math.sqrt(o*(r/2)**2):"square"===a||"diamond"===a||"image"===a?Math.sqrt(o*r**2):o*r,E(c,r,l)}function R(e,n,t,i,r){if(null==e)return null;const[a,s,o]=Z(e,r);if(a===s)return S(n.stops?.[a].size,t,i);{const e=S(n.stops?.[a].size,t,i),r=S(n.stops?.[s].size,t,i);return null==e||null==r?null:e+(r-e)*o}}function T(e,n,t,r){const a=(r?.resolution??1)*i[n.valueUnit],s=S(n.minSize,t,r),o=S(n.maxSize,t,r),{valueRepresentation:l}=n;if(null==e)return s;let c=null;return c="area"===l?2*Math.sqrt(e/u)/a:"radius"===l||"distance"===l?2*e/a:e/a,E(c,s,o)}function U(e){return e}function N(e,n,t,i,r){switch(n.transformationType){case"additive":return M(e,n,t,i);case"constant":return k(n,t,i);case"clamped-linear":return C(e,n,t,i);case"proportional":return D(e,n,t,i);case"stops":return R(e,n,t,i,r);case"real-world-size":return T(e,n,t,i);case"identity":return U(e);case"unknown":return null}}function q(e,n,t){const{isScaleDriven:i}=e.cache;if(!(i&&"3d"===t||n))return null;const r={scale:n,view:t};let a=S(e.minSize,c,r),s=S(e.maxSize,c,r);if(null!=a||null!=s){if(a>s){const e=s;s=a,a=e}return{minSize:a,maxSize:s}}}function j(e,n,t){if(!e.visualVariables)return;const i=[],r=[],a=[],s=[],o=[];for(const l of e.visualVariables)switch(l.type){case"color":r.push(l);break;case"opacity":a.push(l);break;case"rotation":o.push(l);break;case"size":s.push(l)}return r.forEach(e=>{const r=d(e,n,t);r&&i.push(r)}),a.forEach(e=>{const r=m(e,n,t);r&&i.push(r)}),o.forEach(e=>{const r=V(e,n,t);r&&i.push(r)}),s.forEach(e=>{const r=F(e,n,t);r&&i.push(r)}),i}class I{get type(){return this.variable.type}constructor(e,n,t){this.variable=e,this.output=n,this.input=t}}function Z(e,n){if(!n)return;let t=0,i=n.length-1;return n.some((n,r)=>e<n?(i=r,!0):(t=r,!1)),[t,i,(e-n[t])/(n[i]-n[t])]}function $(e,n,t){const i=["proportional","proportional","proportional"];for(const r of e){const e=r.useSymbolValue?"symbol-value":z(r,n,t)??"proportional";switch(r.axis){case"width":i[0]=e;break;case"depth":i[1]=e;break;case"height":i[2]=e;break;case"width-and-depth":i[0]=e,i[1]=e;break;case"all":case void 0:case null:i[0]=e,i[1]=e,i[2]=e;break;default:r.axis}}return i}export{I as VisualVariableValueResult,$ as getAllSizes,p as getColor,v as getOpacity,x as getRotationAngle,z as getSize,N as getSizeForValue,S as getSizeFromNumberOrVariable,q as getSizeRangeAtScale,j as getVisualVariableValues,f as viewScaleRE};
2
+ import e from"../../../Color.js";import n from"../../../Graphic.js";import t from"../../../core/Logger.js";import{meterIn as i}from"../../support/lengthUtils.js";import{isValidNumber as r,isSizeVariable as a}from"./sizeVariableUtils.js";const s=()=>t.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),o=e=>s().warn(`The visualVariable should be an instance of esri.renderers.visualVariables.${e}`),l=()=>s().error("Use of arcade expressions requires an arcade context"),c=new n,u=Math.PI,f=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function p(e,n,t){return d(e,n,t)?.output}function d(n,t,i){const a="visualVariables"in n?n.visualVariables?.find(e=>"color"===e.type):n;if(!a)return;if("esri.renderers.visualVariables.ColorVariable"!==a.declaredClass)return void o("ColorVariable");const s="number"==typeof t,l=s?null:t,c=l?.attributes,u=a.field,{ipData:f,hasExpression:p}=a.cache;if(!u&&!p){const e=a.stops;return new Z(a,e&&e[0]?e[0].color:void 0,void 0)}const d=h(a,t,i),v=a.normalizationField,m=null!=c&&null!=v?parseFloat(c[v]):void 0;let b=d;if(null!=b&&(!v||s||!isNaN(m)&&0!==m)){r(m)&&!s&&(b/=m);const n=$(b,f);if(n){const t=n[0],r=n[1],s=t===r?a.stops[t].color:e.blendColors(a.stops[t].color,a.stops[r].color,n[2],null!=i?i.color:void 0);return new Z(a,s,d)}}return new Z(a,void 0,d)}function h(e,n,t){const i="number"==typeof n,r=i?null:n,a=r?.attributes;if(i)return n;const s=e.field,{hasExpression:o}=e.cache;if(!o)return a?.[s];if(null==t?.arcade)return void l();const c={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},u=t.arcade.arcadeUtils,f=u.getViewInfo(c),p=u.createExecContext(r,f,t.timeZone);if(!e.cache.compiledFunc){const n=u.createSyntaxTree(e.valueExpression);e.cache.compiledFunc=u.createFunction(n)}return u.executeFunction(e.cache.compiledFunc,p)}function v(e,n,t){return m(e,n,t)?.output}function m(e,n,t){const i="visualVariables"in e?e.visualVariables?.find(e=>"opacity"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.OpacityVariable"!==i.declaredClass)return void o("OpacityVariable");const a="number"==typeof n,s=a?null:n,l=s?.attributes,c=i.field,{ipData:u,hasExpression:f}=i.cache;if(!c&&!f){const e=i.stops;return new Z(i,e&&e[0]?e[0].opacity:void 0,void 0)}const p=b(i,n,t),d=i.normalizationField,h=null!=l&&null!=d?parseFloat(l[d]):void 0;let v=p;if(null!=v&&(!d||a||!isNaN(h)&&0!==h)){r(h)&&!a&&(v/=h);const e=$(v,u);if(e){const n=e[0],t=e[1];if(n===t)return new Z(i,i.stops[n].opacity,p);const r=i.stops[n].opacity,a=i.stops[t].opacity;return new Z(i,r+(a-r)*e[2],p)}}return new Z(i,void 0,p)}function b(e,n,t){const i="number"==typeof n;if(i)return n;const r=i?null:n,a=r?.attributes,s=e.field,{hasExpression:o}=e.cache;if(!o)return a?.[s];if(null==t?.arcade)return void l();const c={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},u=t.arcade.arcadeUtils,f=u.getViewInfo(c),p=u.createExecContext(r,f,t.timeZone);if(!e.cache.compiledFunc){const n=u.createSyntaxTree(e.valueExpression);e.cache.compiledFunc=u.createFunction(n)}return u.executeFunction(e.cache.compiledFunc,p)}function x(e){return 1===(e.material?.color?.a??1)}function V(e,n,t){return w(e,n,t)?.output}function w(e,n,t){const i="visualVariables"in e?e.visualVariables?.find(e=>"rotation"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.RotationVariable"!==i.declaredClass)return void o("RotationVariable");const r=i.axis||"heading",a="heading"===r&&"arithmetic"===i.rotationType?90:0,s="heading"===r&&"arithmetic"===i.rotationType?-1:1,l=i.field,{hasExpression:c}=i.cache;if(!l&&!c)return;const u=y(i,n,t);let f=u;return f="number"!=typeof f||isNaN(f)?null:a+s*f,new Z(i,f,u)}function y(e,n,t){const{hasExpression:i}=e.cache;if("number"==typeof n)return n;const r=n?.attributes,a=e.field;if(!i)return r?.[a];if(null==t?.arcade)return void l();const s={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},o=t.arcade.arcadeUtils,c=o.getViewInfo(s),u=o.createExecContext(n,c,t.timeZone);if(!e.cache.compiledFunc){const n=o.createSyntaxTree(e.valueExpression);e.cache.compiledFunc=o.createFunction(n)}return o.executeFunction(e.cache.compiledFunc,u)}function g(e,n,t){const i="number"==typeof n,a=i?null:n,s=a?.attributes;let o=i?n:null;const{isScaleDriven:c}=e.cache;let u=e.cache.compiledFunc;if(c){const n=null!=t?t.scale:void 0,i=null!=t?t.view:void 0;o=null==n||"3d"===i?z(e):n}else if(!i)switch(e.inputValueType){case"expression":{if(null==t?.arcade)return void l();const n={viewingMode:t.viewingMode,scale:t.scale,spatialReference:t.spatialReference},i=t.arcade.arcadeUtils,r=i.getViewInfo(n),s=i.createExecContext(a,r,t.timeZone);if(!u){const n=i.createSyntaxTree(e.valueExpression);u=i.createFunction(n),e.cache.compiledFunc=u}o=i.executeFunction(u,s);break}case"field":s&&(o=s[e.field]);break;case"unknown":o=null}return r(o)?o:null}function z(e){let n=null,t=null;const i=e.stops;return i?(n=i[0].value,t=i[i.length-1].value):(n=e.minDataValue||0,t=e.maxDataValue||0),(n+t)/2}function F(e,n,t){return S(e,n,t)?.output}function S(e,n,t){const i="visualVariables"in e?e.visualVariables?.find(e=>"size"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.SizeVariable"!==i.declaredClass)return void o("SizeVariable");const a=g(i,n,t);let s=a;if(null!=s&&"number"!=typeof n&&n&&i.normalizationField){const e=n.attributes,t=parseFloat(e?.[i.normalizationField]);if(!r(t)||0===t)return;s/=t}const l=q(s,i,n,t,i.cache.ipData);return new Z(i,null==l||isNaN(l)?void 0:l,a)}function E(e,n,t){return null==e?null:a(e)?F(e,n,t):r(e)?e:null}function M(e,n,t){return r(t)&&e>t?t:r(n)&&e<n?n:e}function k(e,n,t,i){const r=E(n.minSize,t,i)||n.minDataValue;return null==e&&null==r?null:(e??0)+(r??0)}function C(e,n,t){const i=e.stops;let r=i?.length&&i[0].size;return null==r&&(r=e.minSize),E(r,n,t)}function D(e,n,t,i){const r=E(n.minSize,t,i);if(null==e)return r;const{minDataValue:a,maxDataValue:s}=n;if(null==a||null==s)return null;const o=(e-a)/(s-a),l=E(n.maxSize,t,i),c=null!=i?i.shape:void 0;if(e<=a)return r;if(e>=s)return l;if(null==r||null==l)return null;if("area"===n.scaleBy&&c){const e="circle"===c,n=e?u*(r/2)**2:r*r,t=n+o*((e?u*(l/2)**2:l*l)-n);return e?2*Math.sqrt(t/u):Math.sqrt(t)}return r+o*(l-r)}function R(e,n,t,i){const r=E(n.minSize,t,i);if(null==e||null==r)return r;const a=null!=i?i.shape:void 0,{minDataValue:s}=n;if(null==s)return null;const o=e/s,l=E(n.maxSize,t,i);let c=null;return c="circle"===a?2*Math.sqrt(o*(r/2)**2):"square"===a||"diamond"===a||"image"===a?Math.sqrt(o*r**2):o*r,M(c,r,l)}function T(e,n,t,i,r){if(null==e)return null;const[a,s,o]=$(e,r);if(a===s)return E(n.stops?.[a].size,t,i);{const e=E(n.stops?.[a].size,t,i),r=E(n.stops?.[s].size,t,i);return null==e||null==r?null:e+(r-e)*o}}function U(e,n,t,r){const a=(r?.resolution??1)*i[n.valueUnit],s=E(n.minSize,t,r),o=E(n.maxSize,t,r),{valueRepresentation:l}=n;if(null==e)return s;let c=null;return c="area"===l?2*Math.sqrt(e/u)/a:"radius"===l||"distance"===l?2*e/a:e/a,M(c,s,o)}function N(e){return e}function q(e,n,t,i,r){switch(n.transformationType){case"additive":return k(e,n,t,i);case"constant":return C(n,t,i);case"clamped-linear":return D(e,n,t,i);case"proportional":return R(e,n,t,i);case"stops":return T(e,n,t,i,r);case"real-world-size":return U(e,n,t,i);case"identity":return N(e);case"unknown":return null}}function j(e,n,t){const{isScaleDriven:i}=e.cache;if(!(i&&"3d"===t||n))return null;const r={scale:n,view:t};let a=E(e.minSize,c,r),s=E(e.maxSize,c,r);if(null!=a||null!=s){if(a>s){const e=s;s=a,a=e}return{minSize:a,maxSize:s}}}function I(e,n,t){if(!e.visualVariables)return;const i=[],r=[],a=[],s=[],o=[];for(const l of e.visualVariables)switch(l.type){case"color":r.push(l);break;case"opacity":a.push(l);break;case"rotation":o.push(l);break;case"size":s.push(l)}return r.forEach(e=>{const r=d(e,n,t);r&&i.push(r)}),a.forEach(e=>{const r=m(e,n,t);r&&i.push(r)}),o.forEach(e=>{const r=w(e,n,t);r&&i.push(r)}),s.forEach(e=>{const r=S(e,n,t);r&&i.push(r)}),i}class Z{get type(){return this.variable.type}constructor(e,n,t){this.variable=e,this.output=n,this.input=t}}function $(e,n){if(!n)return;let t=0,i=n.length-1;return n.some((n,r)=>e<n?(i=r,!0):(t=r,!1)),[t,i,(e-n[t])/(n[i]-n[t])]}function L(e,n,t){const i=["proportional","proportional","proportional"];for(const r of e){const e=r.useSymbolValue?"symbol-value":F(r,n,t)??"proportional";switch(r.axis){case"width":i[0]=e;break;case"depth":i[1]=e;break;case"height":i[2]=e;break;case"width-and-depth":i[0]=e,i[1]=e;break;case"all":case void 0:case null:i[0]=e,i[1]=e,i[2]=e;break;default:r.axis}}return i}export{Z as VisualVariableValueResult,L as getAllSizes,p as getColor,v as getOpacity,V as getRotationAngle,F as getSize,q as getSizeForValue,E as getSizeFromNumberOrVariable,j as getSizeRangeAtScale,I as getVisualVariableValues,x as isDrivenOpacityFallbackAlwaysOpaque,f as viewScaleRE};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const a="20260629",c="a37d867710a8ac431623108c354ba7a418b4689a";export{a as buildDate,c as commitHash};
2
+ const e="20260701",a="98fb660903926a7a01ecde5f6e9bc694a51df0d2";export{e as buildDate,a as commitHash};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=1,v=16,w=16,x=o/s,b=8,j=50,k=10,q=24,u=3,y=24,z=8,A=3,B=24,C=8,D=4,E={metrics:{width:15,height:17,left:0,top:-7,advance:14}},F=1024,G=0,H=0,I=0,J=1,K=2,L=3,M=4,N=5,O=6,P=12,Q=13,R=5,S=6,T=5,U=6,V=6,W=1<<V,X=W<<1,Y=!1,Z=1.05,$=3,_=1,tt=3,et=3,ct=5,ht=6,it=1.15,ot=2,at=4,dt=128,nt=256,pt=nt-2*at,rt=2,st=128,ft=1,gt=8,lt=500,mt=4,vt=128,wt=1024,xt=2,bt=0,jt=1,kt=4,qt=8,ut=16,yt=4,zt=1,At=4,Bt=8,Ct=32,Dt=64,Et=128,Ft=4,Gt=1,Ht=1<<20,It=.75,Jt=10,Kt=.75,Lt=12,Mt=256,Nt=32,Ot=512,Pt=0,Qt=1;export{Gt as MAX_TILE_RESHUFFLES_PER_FRAME,Jt as RESHUFFLING_EXEMPT_DRAW_CALLS,Ht as RESHUFFLING_EXEMPT_MEMORY_BYTES,Kt as RESHUFFLING_TARGET_DRAW_EFFICIENCY,It as RESHUFFLING_TARGET_MEMORY_EFFICIENCY,d as angleFactor256,K as animationUnit,Mt as attributeStoreInitialSize,F as attributeStoreTextureSize,E as averageGlyphMosaicItem,Qt as backbufferStencilClipped,Pt as backbufferStencilVisible,Ct as bitsetFillHasPatternHeightPrecisionFactor,Dt as bitsetFillHasPatternWidthPrecisionFactor,Bt as bitsetFillHasUnresolvedReplacementColor,At as bitsetFillRandomPatternOffset,ut as bitsetGenericConsiderAlphaOnly,xt as bitsetGenericLockColor,yt as bitsetLineScaleDash,jt as bitsetMarkerAlignmentMap,bt as bitsetMarkerAlignmentScreen,kt as bitsetMarkerOutlineAllowColorOverride,qt as bitsetMarkerScaleSymbolsProportionally,zt as bitsetTypeFillOutline,vt as bufferDataMinimumSize,mt as bufferDataPoolSize,g as chartMaxFields,w as collisionBoxPadding,s as collisionBucketSize,v as collisionEarlyRejectBucketSize,m as collisionMaxZoomDelta,b as collisionPlacementPadding,x as collisionTileBoxSize,n as compressionFactorForU16,M as dataDrivenUnit0,N as dataDrivenUnit1,O as dataDrivenUnit2,r as debugLabels,dt as defaultSdfTextureSize,gt as displayRecordIntPerElement,f as dotDensityMaxFields,X as effectFlag0,Y as enableEarlyLabelDiscard,h as extrudeScale,W as filterFlag0,J as filterFlagsUnit,q as glyphSize,P as gpgpuUnit,ft as gradientTextureExternalPadding,k as heuristicGlyphsPerFeature,j as heuristicGlyphsPerLine,et as hittestSmallSymbolThreshold,_ as hittestToleranceDesktop,$ as hittestToleranceMobile,tt as hittestToleranceSmallSymbol,D as labelPlacementOffsetPadding,Q as localTimeOriginUnit,l as magicLabelLineHeight,Lt as maxGeohashLevel,ot as maxGpuUploadsPerFrame,V as maxHighlightReasons,p as maxRepresentableInt,Ot as maxTextLineWidth,Nt as minTextLineWidth,c as nanMagicNumber,lt as patchPixelBufferAllocSize,rt as patternFillRasterizationScale,i as pictureFillColor,wt as randomInsidePolygonTextureSize,a as rasterTileSize,st as rasterizedVectorMarkerMinSize,A as sdfBufferGlyphSDFCreator,u as sdfBufferServer,C as sdfRadiusComplex,z as sdfRadiusSimple,B as sdfSizeComplex,y as sdfSizeSimple,at as spritePadding,pt as svgSdfTextureInnerSize,nt as svgSdfTextureSize,I as textureBindingBitmap,H as textureBindingGlyphAtlas,R as textureBindingHighlight0,S as textureBindingHighlight1,T as textureBindingRenderer0,U as textureBindingRenderer1,G as textureBindingSpriteAtlas,Ft as textureUploadManagerBudget,Et as textureUploadManagerChunkSize,Z as thinLineHalfWidthThreshold,o as tileSize,L as visualVariableUnit,it as vtlHighResCutoff,ht as vtlTextureBindingUnitGlyphs,ct as vtlTextureBindingUnitSprites,e as webglMaxInnerStops,t as webglMaxStops};
2
+ const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=1,v=16,w=16,x=o/s,b=8,j=50,k=10,q=24,u=3,y=24,z=8,A=3,B=24,C=8,D=4,E={metrics:{width:15,height:17,left:0,top:-7,advance:14}},F=1024,G=0,H=0,I=0,J=1,K=2,L=3,M=4,N=5,O=6,P=12,Q=13,R=5,S=6,T=5,U=6,V=6,W=1<<V,X=W<<1,Y=!1,Z=1.05,$=3,_=1,tt=3,et=3,ct=5,ht=6,it=1.15,ot=2,at=4,dt=128,nt=256,pt=nt-2*at,rt=2,st=128,ft=1,gt=8,lt=500,mt=4,vt=128,wt=1024,xt=2,bt=0,jt=1,kt=4,qt=8,ut=16,yt=4,zt=1,At=4,Bt=8,Ct=32,Dt=64,Et=128,Ft=4,Gt=1,Ht=1<<20,It=.75,Jt=10,Kt=.75,Lt=12,Mt=256,Nt=32,Ot=512,Pt=0,Qt=1;export{Gt as MAX_TILE_RESHUFFLES_PER_FRAME,Jt as RESHUFFLING_EXEMPT_DRAW_CALLS,Ht as RESHUFFLING_EXEMPT_MEMORY_BYTES,Kt as RESHUFFLING_TARGET_DRAW_EFFICIENCY,It as RESHUFFLING_TARGET_MEMORY_EFFICIENCY,K as animationUnit,Mt as attributeStoreInitialSize,F as attributeStoreTextureSize,E as averageGlyphMosaicItem,Qt as backbufferStencilClipped,Pt as backbufferStencilVisible,Ct as bitsetFillHasPatternHeightPrecisionFactor,Dt as bitsetFillHasPatternWidthPrecisionFactor,Bt as bitsetFillHasUnresolvedReplacementColor,At as bitsetFillRandomPatternOffset,ut as bitsetGenericConsiderAlphaOnly,xt as bitsetGenericLockColor,yt as bitsetLineScaleDash,jt as bitsetMarkerAlignmentMap,bt as bitsetMarkerAlignmentScreen,kt as bitsetMarkerOutlineAllowColorOverride,qt as bitsetMarkerScaleSymbolsProportionally,zt as bitsetTypeFillOutline,vt as bufferDataMinimumSize,mt as bufferDataPoolSize,g as chartMaxFields,w as collisionBoxPadding,s as collisionBucketSize,v as collisionEarlyRejectBucketSize,m as collisionMaxZoomDelta,b as collisionPlacementPadding,x as collisionTileBoxSize,n as compressionFactorForU16,M as dataDrivenUnit0,N as dataDrivenUnit1,O as dataDrivenUnit2,r as debugLabels,dt as defaultSdfTextureSize,gt as displayRecordIntPerElement,f as dotDensityMaxFields,X as effectFlag0,Y as enableEarlyLabelDiscard,h as extrudeScale,W as filterFlag0,J as filterFlagsUnit,q as glyphSize,P as gpgpuUnit,ft as gradientTextureExternalPadding,k as heuristicGlyphsPerFeature,j as heuristicGlyphsPerLine,et as hittestSmallSymbolThreshold,_ as hittestToleranceDesktop,$ as hittestToleranceMobile,tt as hittestToleranceSmallSymbol,D as labelPlacementOffsetPadding,Q as localTimeOriginUnit,l as magicLabelLineHeight,Lt as maxGeohashLevel,ot as maxGpuUploadsPerFrame,V as maxHighlightReasons,p as maxRepresentableInt,Ot as maxTextLineWidth,Nt as minTextLineWidth,c as nanMagicNumber,d as packDegreesU8,lt as patchPixelBufferAllocSize,rt as patternFillRasterizationScale,i as pictureFillColor,wt as randomInsidePolygonTextureSize,a as rasterTileSize,st as rasterizedVectorMarkerMinSize,A as sdfBufferGlyphSDFCreator,u as sdfBufferServer,C as sdfRadiusComplex,z as sdfRadiusSimple,B as sdfSizeComplex,y as sdfSizeSimple,at as spritePadding,pt as svgSdfTextureInnerSize,nt as svgSdfTextureSize,I as textureBindingBitmap,H as textureBindingGlyphAtlas,R as textureBindingHighlight0,S as textureBindingHighlight1,T as textureBindingRenderer0,U as textureBindingRenderer1,G as textureBindingSpriteAtlas,Ft as textureUploadManagerBudget,Et as textureUploadManagerChunkSize,Z as thinLineHalfWidthThreshold,o as tileSize,L as visualVariableUnit,it as vtlHighResCutoff,ht as vtlTextureBindingUnitGlyphs,ct as vtlTextureBindingUnitSprites,e as webglMaxInnerStops,t as webglMaxStops};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{clamp as t}from"../../../../../../../core/mathUtils.js";import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as o}from"../../../../../../../geometry/GeometryCursor.js";import{asCIMGeometryCursor as i}from"../../../../../../../symbols/cim/utils.js";import{CIMMarkerPlacementHelper as r}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as s,getYDirection as n}from"../../../alignmentUtils.js";import{maxTextLineWidth as a,minTextLineWidth as l,magicLabelLineHeight as d}from"../../../definitions.js";import{shapeGlyphs as c,shapeGlyphsForMultipoint as h}from"../../../mesh/templates/shapingUtils.js";import{getMinMaxZoom as f,processColorInput as u,packBitset as m}from"../fill/meshWriterUtils.js";import{MeshWriter as p}from"../mesh/MeshWriter.js";import{bitsetTextIsBackground as g,bitsetTextIsMapAligned as x}from"../shaders/constants.js";import{TextMeshTransformProps as y}from"./TextParams.js";import{DataType as S}from"../../../../../../webgl/enums.js";const z=28,b=[4,4],_=[16,4],P={topLeft:_,topRight:_,bottomLeft:_,bottomRight:_},M=[4,2],L=[4,6],B={topLeft:M,topRight:M,bottomLeft:L,bottomRight:L},R={topLeft:M,topRight:L,bottomLeft:M,bottomRight:L},T={topLeft:L,topRight:L,bottomLeft:b,bottomRight:b},k={topLeft:b,topRight:b,bottomLeft:L,bottomRight:L},A={topLeft:L,topRight:b,bottomLeft:L,bottomRight:b},v={topLeft:b,topRight:L,bottomLeft:b,bottomRight:L};function w(t){return{backgroundColor:t.boxBackgroundColor??t.backgroundColor??null,borderLineColor:t.boxBorderLineColor??t.borderLineColor??null,borderLineSize:t.boxBorderLineSize>0?t.boxBorderLineSize:t.borderLineWidth??0}}const I={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:S.HALF_FLOAT,count:2,packTessellation:({minZoom:t,maxZoom:e})=>[t||0,e||z]},clipAngle:{type:S.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:t})=>G(t||0)},referenceSymbol:{type:S.BYTE,count:4,packTessellation:(t,o)=>{const i=t.isLineLabel||!t.referenceBounds,r=s(i?"center":o.horizontalAlignment),a=n(i?"middle":o.verticalAlignment),{offsetX:l,offsetY:d,size:c}=i?{offsetX:0,offsetY:0,size:0}:t.referenceBounds;return[e(l),-e(d),Math.round(e(c)),r+1<<2|a+1]}},visibility:{type:S.FLOAT,count:1,otherSource:!0}},attributes:{pos:{type:S.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:S.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:S.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:t,mapAligned:e})=>m([[g,t],[x,!!e]])},offset:{type:S.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},textureUV:{type:S.UNSIGNED_SHORT,count:2,packAlternating:{count:4,packTessellation:({texcoords:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},color:{type:S.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:t})=>t},fontAndReferenceSize:{type:S.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,packTessellation:({fontSize:t,sdfSize:o,sdfRadius:i},{referenceSize:r})=>[Math.round(e(t)),Math.round(e(r||t)),o,i]},outlineColor:{type:S.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:t})=>u(t)},haloColor:{type:S.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:t})=>u(t)},outlineAndHaloSize:{type:S.UNSIGNED_SHORT,count:2,packPrecisionFactor:4,packTessellation:({outlineSize:t,haloSize:o})=>[Math.round(e(t)),Math.round(e(o))]}}};class C extends p{constructor(){super(...arguments),this.vertexSpec=I,this._textMeshParamsPropsInitialized=!1}ensurePacked(t,e,o){super.ensurePacked(t,e,o),this._textMeshParamsPropsInitialized&&!this._evaluator.hasDynamicProperties||(this._textMeshTransformProps=new y(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0)}_write(t,{target:e,effectGeometry:o}){const r=this._getShaping();if(!r)return;const s=1===this.evaluatedMeshParams.alignment,n=e.getDisplayId(),{placement:a}=this.evaluatedMeshParams;if(null!=a){if("PrivatePlacementMultipoint"!==a.type)this._writePlacedTextMarkers(t,e,r,i(o));else{const r=this._getMultipointShaping();r&&this._writeMultipointText(t,e,r,i(o))}return}if(o?.nextPath())return o.nextPoint(),this._writeGlyphs(t,n,o.x,o.y,r,0,void 0,{mapAligned:s});if("esriGeometryPolygon"===e.geometryType){const o=e.readCentroidForDisplay();if(!o)return;const[i,a]=o.coords;return this._writeGlyphs(t,n,i,a,r,0,void 0,{mapAligned:s})}if("esriGeometryMultipoint"===e.geometryType){const o=e.readGeometryForDisplay();return void o?.forEachVertex((e,o)=>this._writeGlyphs(t,n,e,o,r,0,void 0,{mapAligned:s}))}const l=e.readXForDisplay(),d=e.readYForDisplay();return this._writeGlyphs(t,n,l,d,r,0,void 0,{mapAligned:s})}_writePlacedTextMarkers(t,i,s,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,d=r.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!d)return;const c=i.getDisplayId();let h=d.next();for(;null!=h;){const e=-h.getAngle(),o=h.tx,i=-h.ty;this._writeGlyphs(t,c,o,i,s,e,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),h=d.next()}}_writeMultipointText(t,i,s,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,d=r.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!d)return;const c=i.getDisplayId();let h=d.next(),f=0;for(;null!=h;){const e=h.tx,o=-h.ty,i=-h.getAngle();if(f>=s.glyphs.length)break;this._writeGlyph(t,c,e,o,s,f,i,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),h=d.next(),f++}}_getShaping(o){const i=this._textMeshTransformProps,r=this.evaluatedMeshParams;if(!r.glyphs?.glyphs.length)return null;const s=e(i.fontSize),n=e(i.offsetX),h=e(i.offsetY),f=r.glyphs.sdfSize,u=t(e(r.lineWidth),l,a),m=f/24*d*t(r.lineHeightRatio,.25,4),{backgroundColor:p,borderLineSize:g}=w(r);return c(r.glyphs,{scale:s/f,angle:i.postAngle,xOffset:n,yOffset:h,horizontalAlignment:r.horizontalAlignment,verticalAlignment:o||r.verticalAlignment,maxLineWidth:u,lineHeight:m,decoration:r.decoration,borderLineSizePx:e(g),hasBackground:!!p,useCIMAngleBehavior:r.useCIMAngleBehavior})}_getMultipointShaping(){const o=this._textMeshTransformProps,i=this.evaluatedMeshParams;if(!i.glyphs?.glyphs.length)return null;const r=e(o.fontSize),s=e(o.offsetX),n=e(o.offsetY),c=i.glyphs.sdfSize,f=t(e(i.lineWidth),l,a),u=c/24*d*t(i.lineHeightRatio,.25,4),{backgroundColor:m,borderLineSize:p}=w(i);return h(i.glyphs,{scale:r/c,angle:o.postAngle,xOffset:s,yOffset:n,horizontalAlignment:i.horizontalAlignment,verticalAlignment:i.verticalAlignment,maxLineWidth:f,lineHeight:u,decoration:i.decoration,borderLineSizePx:e(p),hasBackground:!!m,useCIMAngleBehavior:i.useCIMAngleBehavior})}_writeGlyphs(t,o,i,r,s,n,a,l,d=!0){const c=this.evaluatedMeshParams,h=this._textMeshTransformProps,m=e(h.fontSize),p=h.haloSize,g=h.outlineSize,x=e(h.offsetX),y=e(h.offsetY),{sdfSize:S,sdfRadius:z}=c.glyphs,[b,_]=f(c.scaleInfo,this.getTileInfo());0!==n&&s.setRotation(n);const P=s.bounds,M=i+P.x+x,L=r+P.y-y,B=2*(c.minPixelBuffer?c.minPixelBuffer/m:1),R=Math.max(P.width,P.height)*B;s.textBox&&(t.recordStart(this.instanceId,this.attributeLayout,s.glyphs[0].textureBinding),d&&t.recordBounds(M,L,R,R),this._writeTextBox(t,o,i,r,s.textBox,a,l),t.recordEnd());for(const e of s.glyphs){t.recordStart(this.instanceId,this.attributeLayout,e.textureBinding),d&&t.recordBounds(M,L,R,R);const{texcoords:s,offsets:n}=e;this._writeQuad(t,o,i,r,{texcoords:s,offsets:n,fontSize:m,haloSize:p,outlineSize:g,sdfSize:S,sdfRadius:z,color:u(c.color),isBackground:!1,referenceBounds:a,minZoom:b,maxZoom:_,...l}),t.recordEnd()}0!==n&&s.setRotation(-n)}_writeGlyph(t,o,i,r,s,n,a,l,d,c=!0){const h=this.evaluatedMeshParams,f=this._textMeshTransformProps,m=e(f.fontSize),p=f.haloSize,g=f.outlineSize,x=e(f.offsetX),y=e(f.offsetY),{sdfSize:S,sdfRadius:z}=h.glyphs;0!==a&&s.setRotation(a);const b=s.bounds,_=i+b.x+x,P=r+b.y-y,M=2*(h.minPixelBuffer?h.minPixelBuffer/m:1),L=Math.max(b.width,b.height)*M,B=s.glyphs[n];t.recordStart(this.instanceId,this.attributeLayout,B.textureBinding),c&&t.recordBounds(_,P,L,L);const{texcoords:R,offsets:T}=B;this._writeQuad(t,o,i,r,{texcoords:R,offsets:T,fontSize:m,haloSize:p,outlineSize:g,sdfSize:S,sdfRadius:z,color:u(h.color),isBackground:!1,referenceBounds:l,minZoom:0,maxZoom:30,...d}),t.recordEnd(),0!==a&&s.setRotation(-a)}_writeTextBox(t,e,o,i,r,s,n){const a=this.evaluatedMeshParams,{fontSize:l,haloSize:d,outlineSize:c}=this._textMeshTransformProps,{backgroundColor:h,borderLineColor:f,borderLineSize:m}=w(a),{sdfSize:p,sdfRadius:g}=a.glyphs,x=!!f&&m>0,y={isBackground:!0,fontSize:l,haloSize:d,outlineSize:c,referenceBounds:s,sdfSize:p,sdfRadius:g,...n};h&&(this._writeQuad(t,e,o,i,{texcoords:P,offsets:r.main,color:u(h),...y}),x||(this._writeQuad(t,e,o,i,{texcoords:T,offsets:r.top,color:u(h),...y}),this._writeQuad(t,e,o,i,{texcoords:k,offsets:r.bot,color:u(h),...y}),this._writeQuad(t,e,o,i,{texcoords:A,offsets:r.left,color:u(h),...y}),this._writeQuad(t,e,o,i,{texcoords:v,offsets:r.right,color:u(h),...y}))),x&&(this._writeQuad(t,e,o,i,{texcoords:B,offsets:r.top,color:u(f),...y}),this._writeQuad(t,e,o,i,{texcoords:B,offsets:r.bot,color:u(f),...y}),this._writeQuad(t,e,o,i,{texcoords:R,offsets:r.left,color:u(f),...y}),this._writeQuad(t,e,o,i,{texcoords:R,offsets:r.right,color:u(f),...y}))}_writeQuad(t,e,o,i,r){const s=t.vertexCount();this._writeVertex(t,e,o,i,r),t.indexWrite(s+0),t.indexWrite(s+1),t.indexWrite(s+2),t.indexWrite(s+1),t.indexWrite(s+3),t.indexWrite(s+2)}}const G=t=>Math.round(t*(256/360));export{C as TextMeshWriter,I as TextVertexSpec,w as getTextBoxStyle,z as maxLabelZoom};
2
+ import{clamp as t}from"../../../../../../../core/mathUtils.js";import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as o}from"../../../../../../../geometry/GeometryCursor.js";import{asCIMGeometryCursor as i}from"../../../../../../../symbols/cim/utils.js";import{CIMMarkerPlacementHelper as r}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as s,getYDirection as n}from"../../../alignmentUtils.js";import{maxTextLineWidth as a,minTextLineWidth as l,magicLabelLineHeight as d,packDegreesU8 as c}from"../../../definitions.js";import{shapeGlyphs as h,shapeGlyphsForMultipoint as f}from"../../../mesh/templates/shapingUtils.js";import{getMinMaxZoom as u,processColorInput as m,packBitset as p}from"../fill/meshWriterUtils.js";import{MeshWriter as g}from"../mesh/MeshWriter.js";import{bitsetTextIsBackground as x,bitsetTextIsMapAligned as y}from"../shaders/constants.js";import{TextMeshTransformProps as S}from"./TextParams.js";import{DataType as z}from"../../../../../../webgl/enums.js";const b=28,_=[4,4],P=[16,4],M={topLeft:P,topRight:P,bottomLeft:P,bottomRight:P},L=[4,2],B=[4,6],R={topLeft:L,topRight:L,bottomLeft:B,bottomRight:B},T={topLeft:L,topRight:B,bottomLeft:L,bottomRight:B},k={topLeft:B,topRight:B,bottomLeft:_,bottomRight:_},A={topLeft:_,topRight:_,bottomLeft:B,bottomRight:B},v={topLeft:B,topRight:_,bottomLeft:B,bottomRight:_},w={topLeft:_,topRight:B,bottomLeft:_,bottomRight:B};function I(t){return{backgroundColor:t.boxBackgroundColor??t.backgroundColor??null,borderLineColor:t.boxBorderLineColor??t.borderLineColor??null,borderLineSize:t.boxBorderLineSize>0?t.boxBorderLineSize:t.borderLineWidth??0}}const C={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:z.HALF_FLOAT,count:2,packTessellation:({minZoom:t,maxZoom:e})=>[t||0,e||b]},clipAngle:{type:z.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:t})=>E(t||0)},referenceSymbol:{type:z.BYTE,count:4,packTessellation:(t,o)=>{const i=t.isLineLabel||!t.referenceBounds,r=s(i?"center":o.horizontalAlignment),a=n(i?"middle":o.verticalAlignment),{offsetX:l,offsetY:d,size:c}=i?{offsetX:0,offsetY:0,size:0}:t.referenceBounds;return[e(l),-e(d),Math.round(e(c)),r+1<<2|a+1]}},visibility:{type:z.FLOAT,count:1,otherSource:!0}},attributes:{pos:{type:z.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:z.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:z.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:t,mapAligned:e})=>p([[x,t],[y,!!e]])},offset:{type:z.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},textureUV:{type:z.UNSIGNED_SHORT,count:2,packAlternating:{count:4,packTessellation:({texcoords:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},color:{type:z.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:t})=>t},fontAndReferenceSize:{type:z.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,packTessellation:({fontSize:t,sdfSize:o,sdfRadius:i},{referenceSize:r})=>[Math.round(e(t)),Math.round(e(r||t)),o,i]},outlineColor:{type:z.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:t})=>m(t)},haloColor:{type:z.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:t})=>m(t)},outlineAndHaloSize:{type:z.UNSIGNED_SHORT,count:2,packPrecisionFactor:4,packTessellation:({outlineSize:t,haloSize:o})=>[Math.round(e(t)),Math.round(e(o))]}}};class G extends g{constructor(){super(...arguments),this.vertexSpec=C,this._textMeshParamsPropsInitialized=!1}ensurePacked(t,e,o){super.ensurePacked(t,e,o),this._textMeshParamsPropsInitialized&&!this._evaluator.hasDynamicProperties||(this._textMeshTransformProps=new S(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0)}_write(t,{target:e,effectGeometry:o}){const r=this._getShaping();if(!r)return;const s=1===this.evaluatedMeshParams.alignment,n=e.getDisplayId(),{placement:a}=this.evaluatedMeshParams;if(null!=a){if("PrivatePlacementMultipoint"!==a.type)this._writePlacedTextMarkers(t,e,r,i(o));else{const r=this._getMultipointShaping();r&&this._writeMultipointText(t,e,r,i(o))}return}if(o?.nextPath())return o.nextPoint(),this._writeGlyphs(t,n,o.x,o.y,r,0,void 0,{mapAligned:s});if("esriGeometryPolygon"===e.geometryType){const o=e.readCentroidForDisplay();if(!o)return;const[i,a]=o.coords;return this._writeGlyphs(t,n,i,a,r,0,void 0,{mapAligned:s})}if("esriGeometryMultipoint"===e.geometryType){const o=e.readGeometryForDisplay();return void o?.forEachVertex((e,o)=>this._writeGlyphs(t,n,e,o,r,0,void 0,{mapAligned:s}))}const l=e.readXForDisplay(),d=e.readYForDisplay();return this._writeGlyphs(t,n,l,d,r,0,void 0,{mapAligned:s})}_writePlacedTextMarkers(t,i,s,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,d=r.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!d)return;const c=i.getDisplayId();let h=d.next();for(;null!=h;){const e=-h.getAngle(),o=h.tx,i=-h.ty;this._writeGlyphs(t,c,o,i,s,e,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),h=d.next()}}_writeMultipointText(t,i,s,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,d=r.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!d)return;const c=i.getDisplayId();let h=d.next(),f=0;for(;null!=h;){const e=h.tx,o=-h.ty,i=-h.getAngle();if(f>=s.glyphs.length)break;this._writeGlyph(t,c,e,o,s,f,i,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),h=d.next(),f++}}_getShaping(o){const i=this._textMeshTransformProps,r=this.evaluatedMeshParams;if(!r.glyphs?.glyphs.length)return null;const s=e(i.fontSize),n=e(i.offsetX),c=e(i.offsetY),f=r.glyphs.sdfSize,u=t(e(r.lineWidth),l,a),m=f/24*d*t(r.lineHeightRatio,.25,4),{backgroundColor:p,borderLineSize:g}=I(r);return h(r.glyphs,{scale:s/f,angle:i.postAngle,xOffset:n,yOffset:c,horizontalAlignment:r.horizontalAlignment,verticalAlignment:o||r.verticalAlignment,maxLineWidth:u,lineHeight:m,decoration:r.decoration,borderLineSizePx:e(g),hasBackground:!!p,useCIMAngleBehavior:r.useCIMAngleBehavior})}_getMultipointShaping(){const o=this._textMeshTransformProps,i=this.evaluatedMeshParams;if(!i.glyphs?.glyphs.length)return null;const r=e(o.fontSize),s=e(o.offsetX),n=e(o.offsetY),c=i.glyphs.sdfSize,h=t(e(i.lineWidth),l,a),u=c/24*d*t(i.lineHeightRatio,.25,4),{backgroundColor:m,borderLineSize:p}=I(i);return f(i.glyphs,{scale:r/c,angle:o.postAngle,xOffset:s,yOffset:n,horizontalAlignment:i.horizontalAlignment,verticalAlignment:i.verticalAlignment,maxLineWidth:h,lineHeight:u,decoration:i.decoration,borderLineSizePx:e(p),hasBackground:!!m,useCIMAngleBehavior:i.useCIMAngleBehavior})}_writeGlyphs(t,o,i,r,s,n,a,l,d=!0){const c=this.evaluatedMeshParams,h=this._textMeshTransformProps,f=e(h.fontSize),p=h.haloSize,g=h.outlineSize,x=e(h.offsetX),y=e(h.offsetY),{sdfSize:S,sdfRadius:z}=c.glyphs,[b,_]=u(c.scaleInfo,this.getTileInfo());0!==n&&s.setRotation(n);const P=s.bounds,M=i+P.x+x,L=r+P.y-y,B=2*(c.minPixelBuffer?c.minPixelBuffer/f:1),R=Math.max(P.width,P.height)*B;s.textBox&&(t.recordStart(this.instanceId,this.attributeLayout,s.glyphs[0].textureBinding),d&&t.recordBounds(M,L,R,R),this._writeTextBox(t,o,i,r,s.textBox,a,l),t.recordEnd());for(const e of s.glyphs){t.recordStart(this.instanceId,this.attributeLayout,e.textureBinding),d&&t.recordBounds(M,L,R,R);const{texcoords:s,offsets:n}=e;this._writeQuad(t,o,i,r,{texcoords:s,offsets:n,fontSize:f,haloSize:p,outlineSize:g,sdfSize:S,sdfRadius:z,color:m(c.color),isBackground:!1,referenceBounds:a,minZoom:b,maxZoom:_,...l}),t.recordEnd()}0!==n&&s.setRotation(-n)}_writeGlyph(t,o,i,r,s,n,a,l,d,c=!0){const h=this.evaluatedMeshParams,f=this._textMeshTransformProps,u=e(f.fontSize),p=f.haloSize,g=f.outlineSize,x=e(f.offsetX),y=e(f.offsetY),{sdfSize:S,sdfRadius:z}=h.glyphs;0!==a&&s.setRotation(a);const b=s.bounds,_=i+b.x+x,P=r+b.y-y,M=2*(h.minPixelBuffer?h.minPixelBuffer/u:1),L=Math.max(b.width,b.height)*M,B=s.glyphs[n];t.recordStart(this.instanceId,this.attributeLayout,B.textureBinding),c&&t.recordBounds(_,P,L,L);const{texcoords:R,offsets:T}=B;this._writeQuad(t,o,i,r,{texcoords:R,offsets:T,fontSize:u,haloSize:p,outlineSize:g,sdfSize:S,sdfRadius:z,color:m(h.color),isBackground:!1,referenceBounds:l,minZoom:0,maxZoom:30,...d}),t.recordEnd(),0!==a&&s.setRotation(-a)}_writeTextBox(t,e,o,i,r,s,n){const a=this.evaluatedMeshParams,{fontSize:l,haloSize:d,outlineSize:c}=this._textMeshTransformProps,{backgroundColor:h,borderLineColor:f,borderLineSize:u}=I(a),{sdfSize:p,sdfRadius:g}=a.glyphs,x=!!f&&u>0,y={isBackground:!0,fontSize:l,haloSize:d,outlineSize:c,referenceBounds:s,sdfSize:p,sdfRadius:g,...n};h&&(this._writeQuad(t,e,o,i,{texcoords:M,offsets:r.main,color:m(h),...y}),x||(this._writeQuad(t,e,o,i,{texcoords:k,offsets:r.top,color:m(h),...y}),this._writeQuad(t,e,o,i,{texcoords:A,offsets:r.bot,color:m(h),...y}),this._writeQuad(t,e,o,i,{texcoords:v,offsets:r.left,color:m(h),...y}),this._writeQuad(t,e,o,i,{texcoords:w,offsets:r.right,color:m(h),...y}))),x&&(this._writeQuad(t,e,o,i,{texcoords:R,offsets:r.top,color:m(f),...y}),this._writeQuad(t,e,o,i,{texcoords:R,offsets:r.bot,color:m(f),...y}),this._writeQuad(t,e,o,i,{texcoords:T,offsets:r.left,color:m(f),...y}),this._writeQuad(t,e,o,i,{texcoords:T,offsets:r.right,color:m(f),...y}))}_writeQuad(t,e,o,i,r){const s=t.vertexCount();this._writeVertex(t,e,o,i,r),t.indexWrite(s+0),t.indexWrite(s+1),t.indexWrite(s+2),t.indexWrite(s+1),t.indexWrite(s+3),t.indexWrite(s+2)}}const E=t=>Math.round(t*c);export{G as TextMeshWriter,C as TextVertexSpec,I as getTextBoxStyle,b as maxLabelZoom};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{labelPlacementOffsetPadding as i}from"../../../definitions.js";import{location as o,option as s,uniform as l,texture as a,define as r,input as n,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{Vec4 as d,Vec2 as u,Float as y,Sampler2D as m,mod as c,step as h,and as v,lessThan as f,greaterThanEqual as w,Vec3 as b,Mat3 as x,ifElse as V,equal as S,greaterThan as g,Bool as z,texture2D as R,smoothstep as j,Int as A,bitRShift as M,bitAnd as C}from"../../graph/glsl.js";import{FeatureVertexInput as O,AFeatureShader as T,FeatureFragmentInput as H}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as L,bitsetTextIsMapAligned as P,noHit as F,trueHit as N}from"../shaders/constants.js";import{isRectHittest as U,distPointTriangle as _,hittestScreenRect as k}from"../shaders/hittestUtils.js";import{MosaicInfo as q}from"../shaders/MosaicInfo.js";import{getBit as D}from"../shaders/utils.js";import{VisualVariableColor as I}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as B}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as W}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as G}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Z}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as J}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as K,getVisualVariableRotation as Q}from"../shaders/vvUtils.js";const X=360/254;class Y extends O{}t([o(3,d)],Y.prototype,"color",void 0),t([o(4,u)],Y.prototype,"offset",void 0),t([o(5,u)],Y.prototype,"textureUV",void 0),t([o(6,d)],Y.prototype,"fontAndReferenceSize",void 0),t([o(7,d)],Y.prototype,"outlineColor",void 0),t([o(8,d)],Y.prototype,"haloColor",void 0),t([o(9,u)],Y.prototype,"outlineAndHaloSize",void 0),t([o(10,u)],Y.prototype,"zoomRange",void 0),t([o(11,y)],Y.prototype,"clipAngle",void 0),t([o(12,d)],Y.prototype,"referenceSymbol",void 0),t([o(15,y)],Y.prototype,"visibility",void 0);class $ extends p{}t([o(13,u)],$.prototype,"offsetNextVertex1",void 0),t([o(14,u)],$.prototype,"offsetNextVertex2",void 0);class tt extends H{}class et extends T{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:i,zoomRange:o,visibility:s}=t,l=i.multiply(X),a=c(l.subtract(this.view.rotation),new y(360));let r=new y(0);const n=this.view.currentZoom,p=o.x,d=o.y,u=new y(1).subtract(h(p,n)).multiply(2),m=new y(v(w(a,new y(90)),f(a,new y(270)))).multiply(2),b=new y(2).multiply(new y(1).subtract(h(n,d)));return r=r.add(e.multiply(u)),r=r.add(e.multiply(m)),r=r.add(b),s&&(r=r.add(s)),r}vertex(t,e){const o=D(t.bitset,L),s=new y(1).subtract(o);let l=t.fontAndReferenceSize[0];const a=t.fontAndReferenceSize[1],r=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let p=l.divide(r);const m=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),c=this.view.displayViewScreenMat3.multiply(new b(t.pos,1));let h=t.offset,v=new y(1),f=x.identity(),w=new u(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,o=e.xy,s=e.z,l=this._unpackDirection(e.w),a=K(this,t.id,s).divide(2),r=l.multiply(a.add(i));w=o.add(r),h=h.add(w)}else{v=K(this,t.id,a).divide(a),l=l.multiply(v),p=p.multiply(v),h=h.multiply(v),f=Q(this,t.id),h=f.multiply(new b(h,0)).xy}const R=D(t.bitset,P),j=this._getViewRotationMatrix(R).multiply(new b(h,0)).multiply(this.view.scaleFactor);let A=this.isLabel?this.clipLabel(t,R):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(o.multiply(2));let M=new y(0);if(1===this.textRenderPassType){A=A.add(V(S(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));M=new y(t.outlineAndHaloSize.x).divide(p).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);A=A.add(V(S(i,new y(0)),new y(2),new y(0)));M=i.add(e).divide(p).divide(n)}const C=this.isLabel?g(A,new y(1)):new z(!1);return{glPosition:new d(c.xy.add(j.xy),A,1),color:m,size:p,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.105).multiply(r).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:M,...this.maybeRunHittest(t,e,{vvSizeAdjustment:v,vvRotation:f,labelOffset:w,labelClipped:C,scaleFactor:this.view.scaleFactor})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getHittestAlignmentMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=R(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,a=j(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(a),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,scaleFactor:l}){let a,r,n;this.isLabel?(a=new b(t.offset.multiply(l).add(s),0),r=new b(e.offsetNextVertex1.multiply(l).add(s),0),n=new b(e.offsetNextVertex2.multiply(l).add(s),0)):(a=o.multiply(new b(t.offset.multiply(l).multiply(i),0)),r=o.multiply(new b(e.offsetNextVertex1.multiply(l).multiply(i),0)),n=o.multiply(new b(e.offsetNextVertex2.multiply(l).multiply(i),0)));const{viewMat3:p,tileMat3:d}=this.view,u=p.multiply(d).multiply(new b(t.pos,1)),y=D(t.bitset,P),m=this._getHittestAlignmentMatrix(y);return{pos0:u.add(m.multiply(a)).xy,pos1:u.add(m.multiply(r)).xy,pos2:u.add(m.multiply(n)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:a,scaleFactor:r}=i,n=U(this.hittestRequest),{pos0:p,pos1:d,pos2:u}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,scaleFactor:r});return V(n,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?V(a,new y(F),k(p,d,u,t)):k(p,d,u,t)},()=>{const t=_(this.hittestRequest.position,p,d,u),e=this.isLabel?a:new z(!1);return V(e,new y(F),V(g(t,this.hittestRequest.distance),new y(F),new y(N)))})}_unpackDirection(t){const e=new A(t),i=M(e,new A(2)),o=C(e,new A(3));return new u(new y(i).subtract(1),new y(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new z(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([s(I)],et.prototype,"visualVariableColor",void 0),t([s(B)],et.prototype,"visualVariableOpacity",void 0),t([s(E)],et.prototype,"visualVariableRotation",void 0),t([s(W)],et.prototype,"visualVariableSizeMinMaxValue",void 0),t([s(G)],et.prototype,"visualVariableSizeScaleStops",void 0),t([s(Z)],et.prototype,"visualVariableSizeStops",void 0),t([s(J)],et.prototype,"visualVariableSizeUnitValue",void 0),t([l(q)],et.prototype,"mosaicInfo",void 0),t([a(m)],et.prototype,"mosaicTexture",void 0),t([r],et.prototype,"textRenderPassType",void 0),t([r],et.prototype,"isBackgroundPass",void 0),t([r],et.prototype,"isLabel",void 0),t([e(0,n(Y)),e(1,n($))],et.prototype,"vertex",null),t([e(0,n(tt))],et.prototype,"fragment",null);export{tt as TextFragmentInput,et as TextShader,Y as TextVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{labelPlacementOffsetPadding as i,packDegreesU8 as o}from"../../../definitions.js";import{location as s,option as l,uniform as a,texture as r,define as n,input as p,ComputeVertexInput as d}from"../../GraphShaderModule.js";import{Vec4 as u,Vec2 as y,Float as m,Sampler2D as c,mod as h,step as v,and as f,lessThan as w,greaterThanEqual as b,Vec3 as x,Mat3 as V,ifElse as S,equal as g,greaterThan as z,Bool as R,texture2D as j,smoothstep as A,Int as M,bitRShift as C,bitAnd as O}from"../../graph/glsl.js";import{FeatureVertexInput as T,AFeatureShader as H,FeatureFragmentInput as L}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as P,bitsetTextIsMapAligned as F,noHit as N,trueHit as U}from"../shaders/constants.js";import{isRectHittest as _,distPointTriangle as k,hittestScreenRect as q}from"../shaders/hittestUtils.js";import{MosaicInfo as D}from"../shaders/MosaicInfo.js";import{getBit as I}from"../shaders/utils.js";import{VisualVariableColor as B}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as E}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as W}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as G}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as Z}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as J}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as K}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as Q,getVisualVariableRotation as X}from"../shaders/vvUtils.js";const Y=1/o;class $ extends T{}t([s(3,u)],$.prototype,"color",void 0),t([s(4,y)],$.prototype,"offset",void 0),t([s(5,y)],$.prototype,"textureUV",void 0),t([s(6,u)],$.prototype,"fontAndReferenceSize",void 0),t([s(7,u)],$.prototype,"outlineColor",void 0),t([s(8,u)],$.prototype,"haloColor",void 0),t([s(9,y)],$.prototype,"outlineAndHaloSize",void 0),t([s(10,y)],$.prototype,"zoomRange",void 0),t([s(11,m)],$.prototype,"clipAngle",void 0),t([s(12,u)],$.prototype,"referenceSymbol",void 0),t([s(15,m)],$.prototype,"visibility",void 0);class tt extends d{}t([s(13,y)],tt.prototype,"offsetNextVertex1",void 0),t([s(14,y)],tt.prototype,"offsetNextVertex2",void 0);class et extends L{}class it extends H{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:i,zoomRange:o,visibility:s}=t,l=i.multiply(Y),a=h(l.subtract(this.view.rotation),new m(360));let r=new m(0);const n=this.view.currentZoom,p=o.x,d=o.y,u=new m(1).subtract(v(p,n)).multiply(2),y=new m(f(b(a,new m(90)),w(a,new m(270)))).multiply(2),c=new m(2).multiply(new m(1).subtract(v(n,d)));return r=r.add(e.multiply(u)),r=r.add(e.multiply(y)),r=r.add(c),s&&(r=r.add(s)),r}vertex(t,e){const o=I(t.bitset,P),s=new m(1).subtract(o);let l=t.fontAndReferenceSize[0];const a=t.fontAndReferenceSize[1],r=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let p=l.divide(r);const d=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),c=this.view.displayViewScreenMat3.multiply(new x(t.pos,1));let h=t.offset,v=new m(1),f=V.identity(),w=new y(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,o=e.xy,s=e.z,l=this._unpackDirection(e.w),a=Q(this,t.id,s).divide(2),r=l.multiply(a.add(i));w=o.add(r),h=h.add(w)}else{v=Q(this,t.id,a).divide(a),l=l.multiply(v),p=p.multiply(v),h=h.multiply(v),f=X(this,t.id),h=f.multiply(new x(h,0)).xy}const b=I(t.bitset,F),j=this._getViewRotationMatrix(b).multiply(new x(h,0)).multiply(this.view.scaleFactor);let A=this.isLabel?this.clipLabel(t,b):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(o.multiply(2));let M=new m(0);if(1===this.textRenderPassType){A=A.add(S(g(t.outlineAndHaloSize.x,new m(0)),new m(2),new m(0)));M=new m(t.outlineAndHaloSize.x).divide(p).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new m(t.outlineAndHaloSize.y);A=A.add(S(g(i,new m(0)),new m(2),new m(0)));M=i.add(e).divide(p).divide(n)}const C=this.isLabel?z(A,new m(1)):new R(!1);return{glPosition:new u(c.xy.add(j.xy),A,1),color:d,size:p,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new m(.105).multiply(r).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:M,...this.maybeRunHittest(t,e,{vvSizeAdjustment:v,vvRotation:f,labelOffset:w,labelClipped:C,scaleFactor:this.view.scaleFactor})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new m(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getHittestAlignmentMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new m(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new m(2/8),i=new m(1).subtract(e),o=j(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,a=A(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(a),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,scaleFactor:l}){let a,r,n;this.isLabel?(a=new x(t.offset.multiply(l).add(s),0),r=new x(e.offsetNextVertex1.multiply(l).add(s),0),n=new x(e.offsetNextVertex2.multiply(l).add(s),0)):(a=o.multiply(new x(t.offset.multiply(l).multiply(i),0)),r=o.multiply(new x(e.offsetNextVertex1.multiply(l).multiply(i),0)),n=o.multiply(new x(e.offsetNextVertex2.multiply(l).multiply(i),0)));const{viewMat3:p,tileMat3:d}=this.view,u=p.multiply(d).multiply(new x(t.pos,1)),y=I(t.bitset,F),m=this._getHittestAlignmentMatrix(y);return{pos0:u.add(m.multiply(a)).xy,pos1:u.add(m.multiply(r)).xy,pos2:u.add(m.multiply(n)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:a,scaleFactor:r}=i,n=_(this.hittestRequest),{pos0:p,pos1:d,pos2:u}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,scaleFactor:r});return S(n,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?S(a,new m(N),q(p,d,u,t)):q(p,d,u,t)},()=>{const t=k(this.hittestRequest.position,p,d,u),e=this.isLabel?a:new R(!1);return S(e,new m(N),S(z(t,this.hittestRequest.distance),new m(N),new m(U)))})}_unpackDirection(t){const e=new M(t),i=C(e,new M(2)),o=O(e,new M(3));return new y(new m(i).subtract(1),new m(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new R(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(B)],it.prototype,"visualVariableColor",void 0),t([l(E)],it.prototype,"visualVariableOpacity",void 0),t([l(W)],it.prototype,"visualVariableRotation",void 0),t([l(G)],it.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(Z)],it.prototype,"visualVariableSizeScaleStops",void 0),t([l(J)],it.prototype,"visualVariableSizeStops",void 0),t([l(K)],it.prototype,"visualVariableSizeUnitValue",void 0),t([a(D)],it.prototype,"mosaicInfo",void 0),t([r(c)],it.prototype,"mosaicTexture",void 0),t([n],it.prototype,"textRenderPassType",void 0),t([n],it.prototype,"isBackgroundPass",void 0),t([n],it.prototype,"isLabel",void 0),t([e(0,p($)),e(1,p(tt))],it.prototype,"vertex",null),t([e(0,p(et))],it.prototype,"fragment",null);export{et as TextFragmentInput,it as TextShader,$ as TextVertexInput};