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

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 (210) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{4e803d12486c8de4c901.js → 0087ad36f7d38fc7fe11.js} +18 -18
  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/{3f63b14b53b5ca716e3a.js → 18c4c437ded8bfbd3305.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b60f24a6c777301803f4.js → 1958facb000b6c16bfe4.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{1664434dc7a67c8ce453.js → 1ad5fcae6d6a9801cf58.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{390fda094fa8695d98cf.js → 22c447fcc9a28afeb6e3.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{7656900713e55036c3c1.js → 29542a3d7f3fa8d42380.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{1e386475937e02b3f523.js → 2b669473aa2c7cfb63c7.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{c8091e8fd7ca43a4490a.js → 2bb3494659609594c4ca.js} +1 -1
  17. package/assets/esri/core/workers/chunks/2c00f89030c7a4201033.js +2 -0
  18. package/assets/esri/core/workers/chunks/{b75a4753cea6544da8bb.js → 2c61bb25578f73ba49bc.js} +1 -1
  19. package/assets/esri/core/workers/chunks/2d92f0042facb55edcff.js +1 -0
  20. package/assets/esri/core/workers/chunks/2da797ae5af9d2ede42d.js +1 -0
  21. package/assets/esri/core/workers/chunks/{34eb22ee13df24271532.js → 2e495a28494c2351837b.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{a0b78cbeb0e53107d819.js → 367a3031abbeff0c0090.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{aba7a053015a9738d8a0.js → 368db1420b8520beae05.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{7832d94f35b79e27ee51.js → 37dc6a8495f1f44e2d45.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{92458803531fdfe1557a.js → 38a6a7c56c592f336a12.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{c63b315c6b76b4860fc5.js → 39ff5b2a05a90e1cb214.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{0a52373c4ba652e0ee0f.js → 3b914ca36e7e2b00cfe6.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{f6afc597eaf2afa9a4a0.js → 3dd8145ef89f32920177.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{b289c46ce2dc04d32e81.js → 3e8fa2a7a36881234479.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{4ecc345c3732f7fc130f.js → 42b1c526c4c9636a169d.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{9508fa53da5f92a0ab70.js → 4316b78fc36bfd893a90.js} +1 -1
  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/{71f09e34d56c9fe5c307.js → 6d72a1bdc2664df62c4c.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{4ea325c829d3b82854b1.js → 7085b4c655a19694da04.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{9f3d37e5f42bf1529673.js → 71b672259bac2befd9c7.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{a536904fe6f3b16fdbdc.js → 757982a73174aa7ab0d1.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{d0321dd4b5b2d863eecd.js → 777b16b76db406c99c69.js} +1 -1
  50. package/assets/esri/core/workers/chunks/7a59d39010ed33b8fabb.js +1 -0
  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/{977e6f589bd266d6067d.js → 87c7092282214f5b78b8.js} +4 -4
  58. package/assets/esri/core/workers/chunks/{25932fa010f9a32475c1.js → 88ec63501fa2f6fdadca.js} +1 -1
  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/a0f7e37d385fc68b138d.js +1 -0
  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/b7d7bfcb089a3f1a38b6.js +1 -0
  76. package/assets/esri/core/workers/chunks/{a3393780655152102c45.js → b97b83159fec34f383af.js} +1 -1
  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/{de83c177f8a1234a5b2e.js → cffef41791f0cfa6c26c.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{70c94bcfa20453134037.js → d1928a8c86a8966e5582.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{58e0e50b6c3abaa4798f.js → d26b1a9f47b4b2744c89.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{2baee42e1797a709fe4b.js → d4a96f0402172787823a.js} +1 -1
  86. package/assets/esri/core/workers/chunks/d7e17df1c3675bf3633e.js +1 -0
  87. package/assets/esri/core/workers/chunks/dfae4440afe0ca7c5b25.js +1 -0
  88. package/assets/esri/core/workers/chunks/{bd260798b8de09a1eeb2.js → e3a4695c31d3f9d55213.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{197b9f8483fad2258650.js → e6263e1983e703befe48.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{6991ba1b204668e7d4da.js → e67a9f9298d63026e7f6.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{6f240fe78b299e6c4fcc.js → eeee7421f64a52074ff4.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{1e109a521ca8772fdf04.js → eef7e0bee19c4258ba55.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{49a45083a9a155614c1c.js → ef32e454012f3b0e3f77.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{83ce38342796bd6d73ce.js → f137e544076482e348ad.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{e181d0f5562878b3dc01.js → f72f38e7609756a7f8ea.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{ef5d11581a98fb333ad2.js → f83e3ad67b60744afd6d.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{456b77b8f13933a75b68.js → fe8032905992e6574714.js} +3 -3
  98. package/assets/esri/core/workers/chunks/{2f02880a7f081eb210cd.js → fec9ce6ad634c904ffdf.js} +1 -1
  99. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  100. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  101. package/chunks/GaussianSplatComposition.glsl.js +4 -4
  102. package/chunks/OITAddEmission.glsl.js +6 -0
  103. package/chunks/OITFilterOpaque.glsl.js +4 -0
  104. package/chunks/lerc-wasm.js +1 -1
  105. package/config.js +1 -1
  106. package/core/workers/workerFactory.js +1 -1
  107. package/form/elements/inputs/attachments/AttachmentInput.js +1 -1
  108. package/geometry/support/frustum.js +1 -1
  109. package/geometry/support/plane.js +1 -1
  110. package/kernel.js +1 -1
  111. package/layers/AnnotationFeatureLayer.d.ts +110 -67
  112. package/layers/CSVLayer.d.ts +144 -175
  113. package/layers/CatalogLayer.d.ts +129 -132
  114. package/layers/DimensionFeatureLayer.d.ts +106 -63
  115. package/layers/FeatureLayer.d.ts +77 -150
  116. package/layers/GeoJSONLayer.d.ts +111 -168
  117. package/layers/OrientedImageryLayer.d.ts +125 -79
  118. package/layers/ParquetLayer.d.ts +116 -75
  119. package/layers/SubtypeGroupLayer.d.ts +86 -111
  120. package/layers/WFSLayer.d.ts +157 -127
  121. package/layers/catalog/CatalogFootprintLayer.d.ts +142 -129
  122. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  123. package/layers/graphics/sources/support/QueryTask.js +1 -1
  124. package/layers/mixins/EditBusLayer.js +1 -1
  125. package/layers/pointCloudFilters/PointCloudBitfieldFilter.d.ts +1 -1
  126. package/layers/video/VideoController.js +1 -1
  127. package/package.json +2 -2
  128. package/support/revision.js +1 -1
  129. package/views/2d/engine/webgl/definitions.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  132. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  133. package/views/2d/input/MapViewInputManager.js +1 -1
  134. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  135. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  136. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  137. package/views/3d/input/SceneInputManager.js +1 -1
  138. package/views/3d/interactive/manipulators/RotateManipulator.js +1 -1
  139. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  140. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  141. package/views/3d/terrain/PatchRenderData.js +1 -1
  142. package/views/3d/webgl-engine/core/shaderLibrary/util/emissionFilter.glsl.js +2 -0
  143. package/views/3d/webgl-engine/effects/transparency/OITAddEmission.glsl.js +2 -0
  144. package/views/3d/webgl-engine/effects/transparency/OITAddEmissionTechnique.js +2 -0
  145. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  146. package/views/3d/webgl-engine/effects/transparency/OITFilterOpaque.glsl.js +2 -0
  147. package/views/3d/webgl-engine/effects/transparency/OITFilterOpaqueTechnique.js +2 -0
  148. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  149. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  150. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  151. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  152. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  153. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  154. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  155. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  156. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  157. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  158. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  159. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  160. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  161. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  162. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  163. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  164. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  165. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  166. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  167. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  168. package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
  169. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  170. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  171. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  172. package/views/3d/webgl-engine/shaders/GaussianSplatComposition.glsl.js +1 -1
  173. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  174. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  175. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  176. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +3 -3
  177. package/views/input/BrowserEventSource.js +1 -1
  178. package/views/input/handlers/PreventTouchSelection.js +2 -0
  179. package/views/layers/FeatureLikeLayerView.d.ts +9 -64
  180. package/views/layers/GraphicsLayerView.d.ts +1 -1
  181. package/views/layers/types.d.ts +8 -1
  182. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  183. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  184. package/widgets/BatchAttributeForm.js +1 -1
  185. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  186. package/widgets/Editor/VisibleElements.d.ts +14 -1
  187. package/widgets/FeatureForm.js +1 -1
  188. package/assets/esri/core/workers/chunks/209460f8aae3f9f8c9b8.js +0 -1
  189. package/assets/esri/core/workers/chunks/4be31fcc5482a2526d2b.js +0 -1
  190. package/assets/esri/core/workers/chunks/58acc18b92533166135d.js +0 -1
  191. package/assets/esri/core/workers/chunks/6162f6735ea4622e54d8.js +0 -1
  192. package/assets/esri/core/workers/chunks/718d2d430c1a5a940b83.js +0 -1
  193. package/assets/esri/core/workers/chunks/a6379a8df8c08b729b9c.js +0 -1
  194. package/assets/esri/core/workers/chunks/b0253fe7b3529bc22270.js +0 -1
  195. package/assets/esri/core/workers/chunks/bd0829eb79efff5b7223.js +0 -1
  196. package/assets/esri/core/workers/chunks/c193b4a175a544c4fcd6.js +0 -1
  197. package/assets/esri/core/workers/chunks/d28169816c768d55aa09.js +0 -1
  198. package/assets/esri/core/workers/chunks/d7c0ab622caf495dbcef.js +0 -1
  199. package/assets/esri/core/workers/chunks/f10a339b16d84b650012.js +0 -2
  200. package/assets/esri/core/workers/chunks/f69d3ff8a69c1985bca3.js +0 -1
  201. package/assets/esri/core/workers/chunks/f847a4846c427f671455.js +0 -1
  202. package/chunks/OITBlendEmission.glsl.js +0 -6
  203. package/chunks/OITDimOpaque.glsl.js +0 -4
  204. package/views/2d/layers/support/annodime/fields.js +0 -2
  205. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +0 -2
  206. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +0 -2
  207. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +0 -2
  208. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +0 -2
  209. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +0 -2
  210. /package/assets/esri/core/workers/chunks/{f10a339b16d84b650012.js.LICENSE.txt → 2c00f89030c7a4201033.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/util/EmissionDimming.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GaussianSplatCompositionPassParameters,b as build}from"../../../../chunks/GaussianSplatComposition.glsl.js";
2
+ import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/util/emissionFilter.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GaussianSplatCompositionPassParameters,b as build}from"../../../../chunks/GaussianSplatComposition.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as l,depthTest as o,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as a,stencilBaseAllZeros as p,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{PositionUvLayout as m}from"../materials/DefaultLayouts.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{I as d}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as h}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,i(P(t))),this.shader=new r(d,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{output:i,hasOccludees:r,cullFace:s}=e;return f({blending:n(i,!0,e.emissionDimmingPass),culling:h(s),depthTest:o(i),depthWrite:l(e),colorWrite:g,stencilWrite:r?c:null,stencilTest:r?t?a:p:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t,i){return i?this._occludeePipeline:super.getPipeline(e,t,i)}};function P(e){let t=m;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}j=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],j);export{j as ImageMaterialTechnique,P as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthTest as l,blending as o}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as n,stencilBaseAllZeros as a,stencilWriteMaskOn as p}from"../lib/StencilUtils.js";import{PositionUvLayout as c}from"../materials/DefaultLayouts.js";import{polygonOffset as m}from"../materials/PolygonOffset.js";import{I as u}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as d,defaultColorWrite as f,cullingParams as g}from"../../../webgl/renderState.js";let h=class extends s{constructor(e,t){super(e,t,i(j(t))),this.shader=new r(u,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{output:i,hasOccludees:r,cullFace:s}=e;return d({blending:o(i,!0,e.emissionDimmingPass),culling:g(s),depthTest:l(i),colorWrite:f,stencilWrite:r?p:null,stencilTest:r?t?n:a:null,polygonOffset:m(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t,i){return i?this._occludeePipeline:super.getPipeline(e,t,i)}};function j(e){let t=c;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}h=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],h);export{h as ImageMaterialTechnique,j as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as o}from"../materials/TriangleTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.draped=e,this.cullFace=0,this.writeDepth=!0,this.hasOccludees=!1,this.perspectiveInterpolation=!0,this.textureCoordinateType=0,this.emissionSource=0,this.olidColorInstanced=!1,this.snowCover=!1,this.renderOccluded=!1}}e([t({count:3})],i.prototype,"cullFace",void 0),e([t()],i.prototype,"writeDepth",void 0),e([t()],i.prototype,"hasOccludees",void 0),e([t()],i.prototype,"perspectiveInterpolation",void 0);export{i as ImageMaterialTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as o}from"../materials/TriangleTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.draped=e,this.cullFace=0,this.hasOccludees=!1,this.perspectiveInterpolation=!0,this.textureCoordinateType=0,this.emissionSource=0,this.olidColorInstanced=!1,this.snowCover=!1,this.renderOccluded=!1,this.writeDepth=!1}}e([t({count:3})],i.prototype,"cullFace",void 0),e([t()],i.prototype,"hasOccludees",void 0),e([t()],i.prototype,"perspectiveInterpolation",void 0);export{i as ImageMaterialTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.space=1,this.anchor=0,this.occluder=!1,this.writeDepth=!1,this.hideOnShortSegments=!1,this.hasCap=!1,this.hasTip=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.hasScreenSizePerspective=!1,this.textureCoordinateType=0,this.emissionSource=0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.olidColorInstanced=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}get draped(){return 0===this.space}get worldSpace(){return 2===this.space}}e([t({count:3})],i.prototype,"space",void 0),e([t({count:2})],i.prototype,"anchor",void 0),e([t()],i.prototype,"occluder",void 0),e([t()],i.prototype,"writeDepth",void 0),e([t()],i.prototype,"hideOnShortSegments",void 0),e([t()],i.prototype,"hasCap",void 0),e([t()],i.prototype,"hasTip",void 0),e([t()],i.prototype,"hasVVSize",void 0),e([t()],i.prototype,"hasVVColor",void 0),e([t()],i.prototype,"hasVVOpacity",void 0),e([t()],i.prototype,"hasOccludees",void 0),e([t()],i.prototype,"hasScreenSizePerspective",void 0);export{i as LineMarkerTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class s extends o{constructor(e){super(),this.spherical=e,this.space=1,this.anchor=0,this.occluder=!1,this.hideOnShortSegments=!1,this.hasCap=!1,this.hasTip=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.hasScreenSizePerspective=!1,this.textureCoordinateType=0,this.emissionSource=0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.olidColorInstanced=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}get draped(){return 0===this.space}get worldSpace(){return 2===this.space}}e([t({count:3})],s.prototype,"space",void 0),e([t({count:2})],s.prototype,"anchor",void 0),e([t()],s.prototype,"occluder",void 0),e([t()],s.prototype,"hideOnShortSegments",void 0),e([t()],s.prototype,"hasCap",void 0),e([t()],s.prototype,"hasTip",void 0),e([t()],s.prototype,"hasVVSize",void 0),e([t()],s.prototype,"hasVVColor",void 0),e([t()],s.prototype,"hasVVOpacity",void 0),e([t()],s.prototype,"hasOccludees",void 0),e([t()],s.prototype,"hasScreenSizePerspective",void 0);export{s as LineMarkerTechniqueConfiguration};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{isColor as o,isOITColorAlpha as i,isOITFrontFace as l}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as a}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{emissionDimming as e}from"../core/shaderLibrary/util/EmissionDimming.glsl.js";import{If as n,glsl as t}from"../core/shaderModules/glsl.js";import{alphaCutoff as f}from"./alphaCutoff.glsl.js";import{ditherNoise as m}from"./ditherNoise.glsl.js";import{oitResolution as u}from"./oitResolution.glsl.js";function g(g,d){g.include(s,d),g.include(r,d);const{fragment:p,outputs:c}=g;p.include(a);const{output:C,hasEmission:h,oitPremultipliedAlpha:b,snowCover:E,emissionDimmingPass:v,renderOccluded:y}=d,j=11===C,O=i(C),$=l(C),A=o(C)&&!O,L=0!==C||y;let S=0;(A||O)&&c.add("fragColor","vec4",S++),O&&c.add("fragAlpha","float",S++),h&&c.add("fragEmission","vec4",S++),p.include(a),p.include(f),p.include(u,d),p.include(m,d),v&&p.include(e,d),p.code.add(t`
2
+ import{isColor as o,isOITColorAlpha as i,isOITFrontFace as l}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as a}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{emissionFilter as e}from"../core/shaderLibrary/util/emissionFilter.glsl.js";import{If as n,glsl as t}from"../core/shaderModules/glsl.js";import{alphaCutoff as f}from"./alphaCutoff.glsl.js";import{ditherNoise as m}from"./ditherNoise.glsl.js";import{oitResolution as u}from"./oitResolution.glsl.js";function d(d,g){d.include(s,g),d.include(r,g);const{fragment:p,outputs:c}=d;p.include(a);const{output:C,hasEmission:h,oitPremultipliedAlpha:b,snowCover:E,emissionDimmingPass:v,renderOccluded:y}=g,j=11===C,O=i(C),$=l(C),A=o(C)&&!O,L=0!==C||y;let S=0;(A||O)&&c.add("fragColor","vec4",S++),O&&c.add("fragAlpha","float",S++),h&&c.add("fragEmission","vec4",S++),p.include(a),p.include(f),p.include(u,g),p.include(m,g),v&&p.include(e,g),p.code.add(t`
3
3
  void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${n(E,", float snow")}) {
4
4
  ${n(j,"finalColor.a = 1.0;")}
5
5
  ${n(L,"if (finalColor.a < alphaCutoff) discard;")}
@@ -7,8 +7,8 @@ import{isColor as o,isOITColorAlpha as i,isOITFrontFace as l}from"../core/shader
7
7
  ${n(O,`float noise = ditherNoise(finalColor);\n fragColor = ${n(b,"finalColor","premultiplyAlpha(finalColor)")};\n fragColor.rgb = fragColor.rgb * floatBlendOutputScale + noise;\n fragAlpha = finalColor.a * floatBlendOutputScale + noise;\n `)}
8
8
  ${n($&&b,"finalColor.rgb /= finalColor.a;")}
9
9
  ${n(A,"fragColor = finalColor;")}
10
- ${n(h,v?"fragEmission = vec4(emissionDimming(premultiplyAlpha(finalColor).rgb, finalColor.a), 0.0);":`fragEmission = ${n(E,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}\n float emissionNoise = ditherNoise(fragEmission);\n fragEmission.rgb = fragEmission.rgb * floatBlendOutputScale + emissionNoise;\n fragEmission.a = finalColor.a;\n fragEmission = premultiplyAlpha(fragEmission);\n `)}
10
+ ${n(h,v?"fragEmission = vec4(emissionFilter(premultiplyAlpha(finalColor).rgb, finalColor.a), 0.0);":`fragEmission = ${n(E,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}\n float emissionNoise = ditherNoise(fragEmission);\n fragEmission.rgb = fragEmission.rgb * floatBlendOutputScale + emissionNoise;\n fragEmission.a = finalColor.a;\n fragEmission = premultiplyAlpha(fragEmission);\n `)}
11
11
  calculateOcclusionAndOutputHighlight();
12
12
  ${n(j,"outputObjectAndLayerIdColor();")}
13
13
  }
14
- `)}export{g as outputColorHighlightOLID};
14
+ `)}export{d as outputColorHighlightOLID};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../core/has.js";import{destroyMaybe as e}from"../../core/maybe.js";import{GamepadSource as t}from"./gamepad/GamepadSource.js";import{createScreenPointFromNativeEvent as n}from"../support/screenUtils.js";const i=has("edge"),o=has("chrome"),a=has("ff"),s=has("safari"),r="esri-view-surface",h={touchNone:`${r}--touch-none`,touchPan:`${r}--touch-pan`};class l{static{this.test={disableSubpixelCoordinates:!1}}constructor(e,n){this._active={},this._callback=()=>{},this._activePointerCaptures=new Set,this._keyDownState=new Set,this._eventId=1,this._browserTouchPanningEnabled=!1,this._forwardWindowModifierKeyPresses=e=>{document.activeElement!==this._element&&e.isTrusted&&"b"===e.key&&this._forwardKeyboardEvent(e)},this._element=e,e.getAttribute("tabindex")||e.setAttribute("tabindex","0"),this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,"pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"pointer-cancel":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost},this._updateTouchAction(),this._element.addEventListener("keydown",this._preventAltKeyDefault),window.addEventListener("keydown",this._forwardWindowModifierKeyPresses),window.addEventListener("keyup",this._forwardWindowModifierKeyPresses),this._gamepadSource=new t(e,n),this._gamepadSource.onEvent=e=>this._callback("gamepad",e)}destroy(){this._callback=()=>{},this.activeEvents=null,this._activePointerCaptures.forEach(e=>this._releasePointerCaptureSafe(e)),this._activePointerCaptures.clear(),this._gamepadSource=e(this._gamepadSource),this._removeTouchAction(),this._element.removeEventListener("keydown",this._preventAltKeyDefault),window.removeEventListener("keydown",this._forwardWindowModifierKeyPresses),window.removeEventListener("keyup",this._forwardWindowModifierKeyPresses)}get browserTouchPanningEnabled(){return this._browserTouchPanningEnabled}set browserTouchPanningEnabled(e){this._browserTouchPanningEnabled=e,this._updateTouchAction(),this._updateTouchEventHandling()}set onEventReceived(e){this._callback=e}set activeEvents(e){for(const t in this._active)if(!e||!e.has(t)){const e=this._active[t];this._element.removeEventListener(c[t],e),delete this._active[t]}e&&e.forEach(e=>{if(!this._active[e]&&c[e]){const t=(this._eventHandlers[e]||this._handleDefault).bind(this,e);this._element.addEventListener(c[e],t),this._active[e]=t}}),this._gamepadSource&&(this._gamepadSource.hasEventListeners=e?.has("gamepad")??!1)}setPointerCapture(e,t){t?this._setPointerCaptureSafe(e.pointerId):(this._releasePointerCaptureSafe(e.pointerId),this._activePointerCaptures.delete(e.pointerId))}_updateTouchAction(){this._element.classList.remove(this._browserTouchPanningEnabled?h.touchNone:h.touchPan),this._element.classList.add(this._browserTouchPanningEnabled?h.touchPan:h.touchNone)}_updateTouchEventHandling(){this._browserTouchPanningEnabled?this._element.addEventListener("touchmove",this._preventMultiTouchPanning):this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_removeTouchAction(){this._element.classList.remove(h.touchNone),this._element.classList.remove(h.touchPan),this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_setPointerCaptureSafe(e){try{this._element.setPointerCapture(e),this._activePointerCaptures.add(e)}catch{}}_releasePointerCaptureSafe(e){try{if(this._element.hasPointerCapture&&!this._element.hasPointerCapture(e))return;this._element.releasePointerCapture(e)}catch(t){}}_updateNormalizedPointerLikeEvent(e,t){const i=n(this._element,e);return l.test.disableSubpixelCoordinates&&(i.x=Math.round(i.x),i.y=Math.round(i.y)),t.x=i.x,t.y=i.y,t}_handleKey(e,t){const{key:n}=t;n&&"key-up"===e&&this._keyDownState.delete(n);const i={native:t,key:n,repeat:!!n&&this._keyDownState.has(n)};n&&"key-down"===e&&this._keyDownState.add(i.key),this._callback(e,i)}_handlePointer(e,t){const n=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});this._callback(e,n)}_handlePointerPreventDefault(e,t){const n=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});t.preventDefault(),this._callback(e,n)}_getDeltaFromTrackpadOrMouseWheel(e){return e.shiftKey&&has("mac")&&0===e.deltaY?e.deltaX:e.deltaY}_handleMouseWheel(e,t){let n=this._getDeltaFromTrackpadOrMouseWheel(t);switch(t.deltaMode){case 0:i&&(n=n/document.documentElement.clientHeight*600);break;case 1:n*=30;break;case 2:n*=900}i?n*=.7:o||s?n*=.6:a&&(n*=1.375);const r=100,h=Math.abs(n);if(h>r){n=n/h*200/(1+Math.exp(-.02*(h-r)))}const l=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,deltaY:n});this._callback(e,l)}_handlePointerCaptureLost(e,t){this._activePointerCaptures.delete(t.pointerId),this._handleDefault(e,t)}_handleDefault(e,t){const n={native:t};t.preventDefault(),this._callback(e,n)}_preventAltKeyDefault(e){"Alt"===e.key&&e.preventDefault()}_forwardKeyboardEvent(e){const t=new KeyboardEvent(e.type,{key:e.key,code:e.code,location:e.location,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,repeat:e.repeat,bubbles:!0,cancelable:!0,composed:!0});this._element.dispatchEvent(t)}_preventMultiTouchPanning(e){e.touches.length>1&&e.preventDefault()}}const c={"key-down":"keydown","key-up":"keyup","pointer-down":"pointerdown","pointer-up":"pointerup","pointer-move":"pointermove","mouse-wheel":"wheel","pointer-capture-got":"gotpointercapture","pointer-capture-lost":"lostpointercapture","context-menu":"contextmenu","pointer-enter":"pointerenter","pointer-leave":"pointerleave","pointer-cancel":"pointercancel",focus:"focus",blur:"blur"};export{l as BrowserEventSource};
2
+ import has from"../../core/has.js";import{destroyMaybe as e}from"../../core/maybe.js";import{GamepadSource as t}from"./gamepad/GamepadSource.js";import{createScreenPointFromNativeEvent as n}from"../support/screenUtils.js";const i=has("edge"),o=has("chrome"),a=has("ff"),s=has("safari"),r="esri-view-surface",h={touchNone:`${r}--touch-none`,touchPan:`${r}--touch-pan`};class c{static{this.test={disableSubpixelCoordinates:!1}}constructor(e,n){this._active={},this._callback=()=>{},this._activePointerCaptures=new Set,this._keyDownState=new Set,this._eventId=1,this._browserTouchPanningEnabled=!1,this._forwardWindowModifierKeyPresses=e=>{document.activeElement!==this._element&&e.isTrusted&&"b"===e.key&&this._forwardKeyboardEvent(e)},this._element=e,e.getAttribute("tabindex")||e.setAttribute("tabindex","0"),this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,"pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"pointer-cancel":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost},this._updateTouchAction(),this._element.addEventListener("keydown",this._preventAltKeyDefault),window.addEventListener("keydown",this._forwardWindowModifierKeyPresses),window.addEventListener("keyup",this._forwardWindowModifierKeyPresses),this._gamepadSource=new t(e,n),this._gamepadSource.onEvent=e=>this._callback("gamepad",e)}destroy(){this._callback=()=>{},this.activeEvents=null,this._activePointerCaptures.forEach(e=>this._releasePointerCaptureSafe(e)),this._activePointerCaptures.clear(),this._gamepadSource=e(this._gamepadSource),this._removeTouchAction(),this._element.removeEventListener("keydown",this._preventAltKeyDefault),window.removeEventListener("keydown",this._forwardWindowModifierKeyPresses),window.removeEventListener("keyup",this._forwardWindowModifierKeyPresses)}get browserTouchPanningEnabled(){return this._browserTouchPanningEnabled}set browserTouchPanningEnabled(e){this._browserTouchPanningEnabled=e,this._updateTouchAction(),this._updateTouchEventHandling()}set onEventReceived(e){this._callback=e}set activeEvents(e){for(const t in this._active)if(!e||!e.has(t)){const e=this._active[t];this._element.removeEventListener(l[t],e),delete this._active[t]}e&&e.forEach(e=>{if(!this._active[e]&&l[e]){const t=(this._eventHandlers[e]||this._handleDefault).bind(this,e);this._element.addEventListener(l[e],t),this._active[e]=t}}),this._gamepadSource&&(this._gamepadSource.hasEventListeners=e?.has("gamepad")??!1)}setPointerCapture(e,t){t?this._setPointerCaptureSafe(e.pointerId):(this._releasePointerCaptureSafe(e.pointerId),this._activePointerCaptures.delete(e.pointerId))}_updateTouchAction(){this._element.classList.remove(this._browserTouchPanningEnabled?h.touchNone:h.touchPan),this._element.classList.add(this._browserTouchPanningEnabled?h.touchPan:h.touchNone)}_updateTouchEventHandling(){this._browserTouchPanningEnabled?this._element.addEventListener("touchmove",this._preventMultiTouchPanning):this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_removeTouchAction(){this._element.classList.remove(h.touchNone),this._element.classList.remove(h.touchPan),this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_setPointerCaptureSafe(e){try{this._element.setPointerCapture(e),this._activePointerCaptures.add(e)}catch{}}_releasePointerCaptureSafe(e){try{if(this._element.hasPointerCapture&&!this._element.hasPointerCapture(e))return;this._element.releasePointerCapture(e)}catch(t){}}_updateNormalizedPointerLikeEvent(e,t){const i=n(this._element,e);return c.test.disableSubpixelCoordinates&&(i.x=Math.round(i.x),i.y=Math.round(i.y)),t.x=i.x,t.y=i.y,t}_handleKey(e,t){const{key:n}=t;n&&"key-up"===e&&this._keyDownState.delete(n);const i={native:t,key:n,repeat:!!n&&this._keyDownState.has(n)};n&&"key-down"===e&&this._keyDownState.add(i.key),this._callback(e,i)}_handlePointer(e,t){const n=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});this._callback(e,n)}_handlePointerPreventDefault(e,t){const n=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});t.preventDefault(),this._callback(e,n)}_getDeltaFromTrackpadOrMouseWheel(e){return e.shiftKey&&has("mac")&&0===e.deltaY?e.deltaX:e.deltaY}_handleMouseWheel(e,t){let n=this._getDeltaFromTrackpadOrMouseWheel(t);switch(t.deltaMode){case 0:i&&(n=n/document.documentElement.clientHeight*600);break;case 1:n*=30;break;case 2:n*=900}i?n*=.7:o||s?n*=.6:a&&(n*=1.375);const r=100,h=Math.abs(n);if(h>r){n=n/h*200/(1+Math.exp(-.02*(h-r)))}const c=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,deltaY:n});this._callback(e,c)}_handlePointerCaptureLost(e,t){this._activePointerCaptures.delete(t.pointerId),this._handleDefault(e,t)}_handleDefault(e,t){const n={native:t};t.preventDefault(),this._callback(e,n)}_preventAltKeyDefault(e){"Alt"===e.key&&e.preventDefault()}_forwardKeyboardEvent(e){const t=new KeyboardEvent(e.type,{key:e.key,code:e.code,location:e.location,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,repeat:e.repeat,bubbles:!0,cancelable:!0,composed:!0});this._element.dispatchEvent(t)}_preventMultiTouchPanning(e){e.touches.length>1&&e.preventDefault()}}const l={"key-down":"keydown","key-up":"keyup","pointer-down":"pointerdown","pointer-up":"pointerup","pointer-move":"pointermove","mouse-wheel":"wheel","pointer-capture-got":"gotpointercapture","pointer-capture-lost":"lostpointercapture","context-menu":"contextmenu","touch-start":"touchstart","touch-end":"touchend","pointer-enter":"pointerenter","pointer-leave":"pointerleave","pointer-cancel":"pointercancel",focus:"focus",blur:"blur"};export{c as BrowserEventSource};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{InputHandler as t}from"../InputHandler.js";class e extends t{constructor(t){super(!0),this.view=t,this.registerIncoming("touch-start",t=>this._onTouchStart(t)),this.registerIncoming("touch-end",t=>this._onTouchEnd(t))}_onTouchStart(t){t.data.native.preventDefault()}_onTouchEnd(t){t.data.native.preventDefault(),this.view.focus()}}export{e as PreventTouchSelection};
@@ -424,7 +424,7 @@ export default abstract class FeatureLikeLayerView extends LayerView {
424
424
  *
425
425
  * @param target - The feature(s) to highlight. When passing a graphic or an array of graphics, each feature must have a valid `objectID`.
426
426
  * You may alternatively pass one or more objectIDs as a single number, string, or an array of numbers or strings.
427
- * @param options - An object with the following properties.
427
+ * @param options - An additional set of options to customize the highlight behavior.
428
428
  * @returns Returns a highlight handler with a `remove()` method that can be called to remove the highlight.
429
429
  * @see [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights)
430
430
  * @see [Sample: Highlight features by geometry](https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/)
@@ -518,81 +518,26 @@ export default abstract class FeatureLikeLayerView extends LayerView {
518
518
  */
519
519
  abstract queryAggregates(query?: Query, options?: AbortOptions): Promise<FeatureSet>;
520
520
  /**
521
- * Executes a [AttributeBinsQuery](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsQuery/) against features available for drawing, which groups features into bins based on ranges in numeric or date fields, and returns an
521
+ * Executes a [AttributeBinsQuery](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsQuery/) against a [FeatureLikeLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/), which groups features into bins based on ranges in numeric or date fields, and returns a
522
522
  * [AttributeBinsFeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsFeatureSet/) containing the series of bins. Please refer to the [AttributeBinsQuery](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsQuery/) document for more detailed information
523
523
  * on how to configure the bin parameters.
524
524
  *
525
- * Binned data can condense complex information into meaningful insight. This query allows you to classify data into meaningful categories and summarize the data within each bin with summary statistics.
526
- * Binned data can be effectively visualized in histograms (or bar charts), providing clearer insights into data distributions and trends.
527
- * It can reveal underlying patterns that might be obscured in raw data. For example, bins can show concentrations of values in common ranges.
525
+ * Binned data can condense complex information into meaningful insight. This query allows you to classify data into meaningful categories and summarize the data
526
+ * within each bin with summary statistics.
528
527
  *
529
528
  * > [!WARNING]
530
529
  * >
531
530
  * > **Notes**
531
+ * >
532
532
  * > The `queryAttributeBins()` method is unrelated to querying bins in [FeatureReductionBinning](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/).
533
533
  *
534
534
  * @param binsQuery - Specifies the parameters of the `queryAttributeBins()` operation. The [AttributeBinsQuery.binParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsQuery/#binParameters) property must be set.
535
- * @param options - An object with the following properties.
536
- * @returns When resolved, returns a [AttributeBinsFeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsFeatureSet/) containing
537
- * a series of bins. Each feature in the AttributeBinsFeatureSet represents a bin. The attributes of each feature contains statistics summarizing the data in the bin, including count, average, standard deviation, etc.
538
- * @since 4.32
535
+ * @param options - Abort options that can be passed into an asynchronous method to allow termination.
536
+ * @returns When resolved, returns a [AttributeBinsFeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsFeatureSet/) containing a series of bins. Each feature in the AttributeBinsFeatureSet
537
+ * represents a bin. The attributes of each feature contain statistics summarizing the data in the bin, including count, average, standard deviation, etc.
538
+ * @since 4.33
539
539
  * @see [AttributeBinsQuery](https://developers.arcgis.com/javascript/latest/references/core/rest/support/AttributeBinsQuery/)
540
540
  * @see [Sample - Attribute Bins Query](https://developers.arcgis.com/javascript/latest/sample-code/query-attribute-bins/)
541
- * @example
542
- * // Query the temperature field in the feature layer and create a histogram
543
- * // Analyze temperature data over a year, create 100 bins for different temperature ranges
544
- * // to assess frequency and identify patterns.
545
- * const binQuery = new AttributeBinsQuery({
546
- * where: "UnitTop = 0",
547
- * binParameters: new AutoIntervalBinParameters({
548
- * bins: 100,
549
- * field: "temp",
550
- * start: 0, // lowest temp value to be included in the bin query
551
- * end: 30 // highest temp value to be included
552
- * })
553
- * });
554
- *
555
- * layerView.queryAttributeBins(query).then((results) => {
556
- * const bins = results.features.map((bin) => {
557
- * return {
558
- * minValue: bin.attributes.lowerBoundary,
559
- * maxValue: bin.attributes.upperBoundary,
560
- * count: bin.attributes.temperature_count,
561
- * };
562
- * });
563
- *
564
- * // get the lower boundary of the first bin
565
- * const min = results.features[0].attributes.lowerBoundary;
566
- * // get the upper boundary of the last bin
567
- * const max = results.features[results.features.length - 1].attributes.upperBoundary;
568
- * // calculate the average for the bins
569
- * const average = results.features[0].attributes.lowerBoundary + results.features[results.features.length - 1].attributes.upperBoundary) / 2;
570
- *
571
- * const histogram = new Histogram({
572
- * container: "histogramDiv",
573
- * bins: bins,
574
- * min: min,
575
- * max: max,
576
- * average: average,
577
- * barCreatedFunction:(index, element) => {
578
- * element.setAttribute("fill", "#FFA500");
579
- * element.setAttribute("opacity", 0.5);
580
- * },
581
- * labelFormatFunction: (value, type) => {
582
- * return (Math.round(value)).toLocaleString();
583
- * },
584
- * dataLines: [{
585
- * value: histogram.min,
586
- * label: histogram.min.toLocaleString()
587
- * }, {
588
- * value: histogram.average,
589
- * label: histogram.average.toLocaleString()
590
- * }, {
591
- * value: histogram.max,
592
- * label: histogram.max.toLocaleString()
593
- * }]
594
- * });
595
- * });
596
541
  */
597
542
  abstract queryAttributeBins(binsQuery: AttributeBinsQuery, options?: AbortOptions): Promise<AttributeBinsFeatureSet>;
598
543
  /**
@@ -67,7 +67,7 @@ export default abstract class GraphicsLayerView extends LayerView {
67
67
  *
68
68
  * @param target - The feature(s) to highlight. When passing a graphic or an array of graphics, each feature must have a valid `objectID`.
69
69
  * You may alternatively pass one or more objectIDs as a single number, string, or an array of numbers or strings.
70
- * @param options - An object with the following properties.
70
+ * @param options - An additional set of options to customize the highlight behavior.
71
71
  * @returns Returns a highlight handler with a `remove()` method that can be called to remove the highlight.
72
72
  * @see [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights)
73
73
  * @see [Sample: Highlight features by geometry](https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/)
@@ -1,4 +1,11 @@
1
- /** @since 5.0 */
1
+ /**
2
+ * Options for highlighting features in a [FeatureLikeLayerView.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#highlight).
3
+ * It can be used to customize the highlight behavior, such as changing the color or opacity of the highlight.
4
+ *
5
+ * @see [FeatureLikeLayerView.highlight()](https://developers.arcgis.com/javascript/latest/references/core/views/layers/FeatureLikeLayerView/#highlight)
6
+ * @see [HighlightOptions](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/)
7
+ * @since 5.0
8
+ */
2
9
  export interface LayerViewHighlightOptions {
3
10
  /**
4
11
  * The [HighlightOptions.name](https://developers.arcgis.com/javascript/latest/references/core/views/support/HighlightOptions/#name) of the highlight options from the view's [View.highlights](https://developers.arcgis.com/javascript/latest/references/core/views/View/#highlights) collection.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import e from"../../core/Accessor.js";import{property as t,subclass as r}from"../../core/accessorSupport/decorators.js";let l=class extends e{constructor(o){super(o),this.errorsForNonVisibleFields=!0,this.featureInfo=!0,this.featureSwitcher=!0,this.loadingIndicator=!0,this.readOnlyNotice=!0}};o([t({type:Boolean,nonNullable:!0})],l.prototype,"errorsForNonVisibleFields",void 0),o([t({type:Boolean,nonNullable:!0})],l.prototype,"featureInfo",void 0),o([t({type:Boolean,nonNullable:!0})],l.prototype,"featureSwitcher",void 0),o([t({type:Boolean,nonNullable:!0})],l.prototype,"loadingIndicator",void 0),o([t({type:Boolean,nonNullable:!0})],l.prototype,"readOnlyNotice",void 0),l=o([r("esri.widgets.BatchAttributeForm.VisibleElements")],l);const i=l;export{i as default};
2
+ import{__decorate as o}from"tslib";import e from"../../core/Accessor.js";import{property as t,subclass as r}from"../../core/accessorSupport/decorators.js";let i=class extends e{constructor(o){super(o),this.errorsForNonVisibleFields=!0,this.featureInfo=!0,this.featureSwitcher=!0,this.loadingIndicator=!0,this.readOnlyNotice=!0,this.expressionsErrorNotice=!1}};o([t({type:Boolean,nonNullable:!0})],i.prototype,"errorsForNonVisibleFields",void 0),o([t({type:Boolean,nonNullable:!0})],i.prototype,"featureInfo",void 0),o([t({type:Boolean,nonNullable:!0})],i.prototype,"featureSwitcher",void 0),o([t({type:Boolean,nonNullable:!0})],i.prototype,"loadingIndicator",void 0),o([t({type:Boolean,nonNullable:!0})],i.prototype,"readOnlyNotice",void 0),o([t({type:Boolean,nonNullable:!0})],i.prototype,"expressionsErrorNotice",void 0),i=o([r("esri.widgets.BatchAttributeForm.VisibleElements")],i);const l=i;export{l as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{createArcadeProfile as e,createArcadeExecutor as t}from"../../../../arcade.js";import r from"../../../../core/Error.js";import n from"../../../../core/Logger.js";import{getEffectiveFieldAlias as o}from"../../../../editing/fieldUtils.js";import i from"../../../../form/ExpressionInfo.js";import a from"../../../../form/elements/AttachmentElement.js";import{isMultipleChoiceInput as s}from"../../../../form/elements/inputs/inputUtils.js";import l from"../../../../form/elements/inputs/attachments/AttachmentInput.js";import{isAttachmentElement as m,isFieldElement as c,isGroupElement as p,isRelationshipElement as d,isTextElement as f,isUtilityNetworkAssociationsElement as u}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as x,isFieldVisibleByDefault as y}from"../../../../layers/support/fieldUtils.js";import{isNumber as h}from"../../../../support/guards.js";import{layerSupportsQueryAttachments as w,getLayerTimeZone as E}from"../../batchAttributeFormUtils.js";import{makeExpressionInfosMap as T,makeExecutorSetForFormElement as v}from"../../expressions/expressionUtils.js";import{AttachmentElementTemplate as b}from"../AttachmentElementTemplate.js";import I from"../BatchFormTemplate.js";import{FieldElementTemplate as j}from"../FieldElementTemplate.js";import{GroupElementTemplate as P}from"../GroupElementTemplate.js";import{RelationshipElementTemplate as g}from"../RelationshipElementTemplate.js";import{TextElementTemplate as Z}from"../TextElementTemplate.js";import{UtilityNetworkAssociationsElementTemplate as A}from"../UtilityNetworkAssociationsElementTemplate.js";import{isGroupElementTemplate as F}from"./templateUtils.js";import{compileTextElementMarkdownToHTML as U}from"./textElementTemplateUtils.js";const C="expression/dea57012-47ca4b55a000-8df62742ed0c",L=e("form-attachment-filename-calculation"),B=()=>n.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function H(e,t,r=e.formTemplate){return await e.load(),r?.elements&&r.elements.length>0?V(r,e,t):N(e,t)}async function N(e,{arcadeExecutorProvider:t,attachmentsEnabled:r,formTimeZone:n}){const o=new Set(x(e)),i={arcadeExecutorProvider:t,formTimeZone:n,layer:e},a=[];for(const l of e.fields)D(l,e,o)&&a.push(z(l,i));const s=await Promise.all(a);return r&&await S(s,{arcadeExecutorProvider:t,expressionInfos:T(void 0),layer:e}),new I({elements:s,title:e.formTemplate?.title,preserveFieldValuesWhenHidden:!0})}function R(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type&&!1===r.editable&&!r.editableExpression)return!0}else if(R(r.elements??[]))return!0;return!1}async function S(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){if(!w(n))return;const o=await W(new a({displayFilename:!0,input:new l({attachmentAssociationType:"any"})}),{arcadeExecutorProvider:t,expressionInfos:r,layer:n});e.push(o)}async function V(e,t,r){let n=null;R(e.elements??[])&&(n=new i({title:"",name:C,expression:"false"}));const o=T(n?[...e.expressionInfos??[],n]:e.expressionInfos),a={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:s}=e;if(!s)return new I(a);let l=!1;const{arcadeExecutorProvider:m,formTimeZone:c}=r;for(const i of s){const e=await k(i,{arcadeExecutorProvider:m,expressionInfos:o,layer:t,formTimeZone:c});if(e){if(a.elements.push(e),l)continue;"attachment"===e.type&&(l=!0),F(e)&&e.elements.some(e=>("attachment"===e.type&&(l=!0),l))}}return e.supportsAttachmentElements||!r.attachmentsEnabled||l||await S(a.elements,{arcadeExecutorProvider:m,expressionInfos:o,layer:t}),new I(a)}async function W(e,{arcadeExecutorProvider:r,expressionInfos:n,layer:o}){let i=null;if(e.filenameExpression)try{i=await t(e.filenameExpression,L)}catch(l){B().error("Failed to compile attachment filename expression",l)}const a=new b({allowUserRename:e.allowUserRename,attachmentKeyword:e.attachmentKeyword,description:e.description,displayFilename:e.displayFilename,filenameExpressionExecutor:i,input:e.input,label:e.label,maxAttachmentCount:e.maxAttachmentCount,minAttachmentCount:e.minAttachmentCount,useOriginalFilename:e.useOriginalFilename}),s=await v({element:e,expressionInfos:n,provider:r});return a.addLayer(o,s),a}async function k(e,t){return m(e)?W(e,{arcadeExecutorProvider:t.arcadeExecutorProvider,expressionInfos:t.expressionInfos,layer:t.layer}):c(e)?K(e,t):p(e)?O(e,t):d(e)?G(e,t):f(e)?$(e,t):u(e)?q(e,t):null}async function K(e,{arcadeExecutorProvider:t,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:a}=o,{description:l,domain:m,fieldName:c,hint:p,input:d,label:f}=e;if(null==c||!a.has(c))return B().warn(new r("batch-attribute-form:invalid-form-element-field",`Field element with label '${f}' does not refer to a valid field`)),null;if(!1!==e.editable||e.editableExpression||((e=e.clone()).editableExpression=C),d&&s(d)&&d.otherChoice){const e=d.otherChoice.fieldName,t=a.get(e);t&&t.name!==e&&(d.otherChoice=d.otherChoice.clone(),d.otherChoice.fieldName=t.name)}const u=new j({description:l,domain:m,field:a.get(c),hint:p,input:d,formTimeZone:i,layerTimeZone:E(o),label:f}),x=await v({element:e,expressionInfos:n,provider:t});return u.addLayer(o,x),u}async function O(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:a,initialState:s}=e,l=[];for(const p of e.elements){const e=await k(p,t);e&&l.push(e)}const m=new P({description:i,elements:l,label:a,initialState:s??"expanded"}),c=await v({element:e,expressionInfos:n,provider:r});return m.addLayer(o,c),m}async function G(e,t){const{description:r,label:n,displayCount:o,displayType:i,orderByFields:a,relationshipId:s}=e,{arcadeExecutorProvider:l,expressionInfos:m,layer:c,formTimeZone:p}=t,d=new g({description:r,...h(o)&&{displayCount:o},displayType:i,formTimeZone:p,label:n,layerTimeZone:E(c),orderByFields:a,relationshipId:s}),f=await v({element:e,expressionInfos:m,provider:l});return d.addLayer(c,f),d}async function $(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n,formTimeZone:o}){const{description:i,label:a,text:s,textFormat:l}=e,{fieldsIndex:m}=n,c=s&&"markdown"===l?await U(s):s,p=new Z({compiledText:c,description:i,fieldsIndex:m,formTimeZone:o,label:a,layerTimeZone:E(n)}),d=await v({element:e,expressionInfos:r,provider:t}),{expressionParts:f}=p;if(f.length){const e=await Promise.all(f.map(e=>{const n=r.get(e)?.expression??e;return t.getArcadeExecutor(n)}));d.textExpressions=e}return p.addLayer(n,d),p}async function q(e,t){const{associationTypes:r,description:n,label:o}=e,{arcadeExecutorProvider:i,expressionInfos:a,formTimeZone:s,layer:l}=t,m=new A({associationTypes:r,description:n,formTimeZone:s,label:o,layerTimeZone:E(l)}),c=await v({element:e,expressionInfos:a,provider:i});return m.addLayer(l,c),m}async function z(e,{arcadeExecutorProvider:t,layer:r,formTimeZone:n}){const i=o(e,r)||e.name,a=new j({field:e,formTimeZone:n,label:i,layerTimeZone:E(r)}),s={};return e.editable&&r.userHasUpdateItemPrivileges&&(s.editableExpression=await t.getArcadeExecutor("true")),a.addLayer(r,s),a}function D(e,t,r){return!r.has(e.name.toLowerCase())&&y(e,t)}export{H as createBatchFormTemplate,N as createBatchFormTemplateFromFields};
2
+ import{createArcadeProfile as e,createArcadeExecutor as t}from"../../../../arcade.js";import r from"../../../../core/Error.js";import n from"../../../../core/Logger.js";import{getEffectiveFieldAlias as o}from"../../../../editing/fieldUtils.js";import i from"../../../../form/ExpressionInfo.js";import s from"../../../../form/elements/AttachmentElement.js";import{isMultipleChoiceInput as a}from"../../../../form/elements/inputs/inputUtils.js";import m from"../../../../form/elements/inputs/attachments/AttachmentInput.js";import l from"../../../../form/elements/inputs/attachments/AudioInput.js";import p from"../../../../form/elements/inputs/attachments/DocumentInput.js";import c from"../../../../form/elements/inputs/attachments/ImageInput.js";import d from"../../../../form/elements/inputs/attachments/VideoInput.js";import{isAttachmentElement as f,isFieldElement as u,isGroupElement as x,isRelationshipElement as y,isTextElement as h,isUtilityNetworkAssociationsElement as w}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as E,isFieldVisibleByDefault as T}from"../../../../layers/support/fieldUtils.js";import{isNumber as I}from"../../../../support/guards.js";import{layerSupportsQueryAttachments as v,getLayerTimeZone as b}from"../../batchAttributeFormUtils.js";import{makeExpressionInfosMap as j,makeExecutorSetForFormElement as P}from"../../expressions/expressionUtils.js";import{AttachmentElementTemplate as g}from"../AttachmentElementTemplate.js";import Z from"../BatchFormTemplate.js";import{FieldElementTemplate as A}from"../FieldElementTemplate.js";import{GroupElementTemplate as F}from"../GroupElementTemplate.js";import{RelationshipElementTemplate as U}from"../RelationshipElementTemplate.js";import{TextElementTemplate as C}from"../TextElementTemplate.js";import{UtilityNetworkAssociationsElementTemplate as L}from"../UtilityNetworkAssociationsElementTemplate.js";import{isGroupElementTemplate as B}from"./templateUtils.js";import{compileTextElementMarkdownToHTML as H}from"./textElementTemplateUtils.js";const N="expression/dea57012-47ca4b55a000-8df62742ed0c",V=e("form-attachment-filename-calculation"),R=()=>n.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function S(e,t,r=e.formTemplate){return await e.load(),r?.elements&&r.elements.length>0?O(r,e,t):W(e,t)}async function W(e,{arcadeExecutorProvider:t,attachmentsEnabled:r,formTimeZone:n}){const o=new Set(E(e)),i={arcadeExecutorProvider:t,formTimeZone:n,layer:e},s=[];for(const m of e.fields)X(m,e,o)&&s.push(Q(m,i));const a=await Promise.all(s);return r&&await K(a,{arcadeExecutorProvider:t,expressionInfos:j(void 0),layer:e}),new Z({elements:a,title:e.formTemplate?.title,preserveFieldValuesWhenHidden:!0})}function k(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type&&!1===r.editable&&!r.editableExpression)return!0}else if(k(r.elements??[]))return!0;return!1}async function K(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){if(!v(n))return;const o=await D(new s({displayFilename:!0,input:new m({attachmentAssociationType:"any",inputTypes:[new c,new p,new d,new l]})}),{arcadeExecutorProvider:t,expressionInfos:r,layer:n});e.push(o)}async function O(e,t,r){let n=null;k(e.elements??[])&&(n=new i({title:"",name:N,expression:"false"}));const o=j(n?[...e.expressionInfos??[],n]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new Z(s);let m=!1;const{arcadeExecutorProvider:l,formTimeZone:p}=r;for(const i of a){const e=await G(i,{arcadeExecutorProvider:l,expressionInfos:o,layer:t,formTimeZone:p});if(e){if(s.elements.push(e),m)continue;"attachment"===e.type&&(m=!0),B(e)&&e.elements.some(e=>("attachment"===e.type&&(m=!0),m))}}return e.supportsAttachmentElements||!r.attachmentsEnabled||m||await K(s.elements,{arcadeExecutorProvider:l,expressionInfos:o,layer:t}),new Z(s)}async function D(e,{arcadeExecutorProvider:r,expressionInfos:n,layer:o}){let i=null;if(e.filenameExpression)try{i=await t(e.filenameExpression,V)}catch(m){R().error("Failed to compile attachment filename expression",m)}const s=new g({allowUserRename:e.allowUserRename,attachmentKeyword:e.attachmentKeyword,description:e.description,displayFilename:e.displayFilename,filenameExpressionExecutor:i,input:e.input,label:e.label,maxAttachmentCount:e.maxAttachmentCount,minAttachmentCount:e.minAttachmentCount,useOriginalFilename:e.useOriginalFilename}),a=await P({element:e,expressionInfos:n,provider:r});return s.addLayer(o,a),s}async function G(e,t){return f(e)?D(e,{arcadeExecutorProvider:t.arcadeExecutorProvider,expressionInfos:t.expressionInfos,layer:t.layer}):u(e)?$(e,t):x(e)?q(e,t):y(e)?z(e,t):h(e)?J(e,t):w(e)?M(e,t):null}async function $(e,{arcadeExecutorProvider:t,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:s}=o,{description:m,domain:l,fieldName:p,hint:c,input:d,label:f}=e;if(null==p||!s.has(p))return R().warn(new r("batch-attribute-form:invalid-form-element-field",`Field element with label '${f}' does not refer to a valid field`)),null;if(!1!==e.editable||e.editableExpression||((e=e.clone()).editableExpression=N),d&&a(d)&&d.otherChoice){const e=d.otherChoice.fieldName,t=s.get(e);t&&t.name!==e&&(d.otherChoice=d.otherChoice.clone(),d.otherChoice.fieldName=t.name)}const u=new A({description:m,domain:l,field:s.get(p),hint:c,input:d,formTimeZone:i,layerTimeZone:b(o),label:f}),x=await P({element:e,expressionInfos:n,provider:t});return u.addLayer(o,x),u}async function q(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:s,initialState:a}=e,m=[];for(const c of e.elements){const e=await G(c,t);e&&m.push(e)}const l=new F({description:i,elements:m,label:s,initialState:a??"expanded"}),p=await P({element:e,expressionInfos:n,provider:r});return l.addLayer(o,p),l}async function z(e,t){const{description:r,label:n,displayCount:o,displayType:i,orderByFields:s,relationshipId:a}=e,{arcadeExecutorProvider:m,expressionInfos:l,layer:p,formTimeZone:c}=t,d=new U({description:r,...I(o)&&{displayCount:o},displayType:i,formTimeZone:c,label:n,layerTimeZone:b(p),orderByFields:s,relationshipId:a}),f=await P({element:e,expressionInfos:l,provider:m});return d.addLayer(p,f),d}async function J(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n,formTimeZone:o}){const{description:i,label:s,text:a,textFormat:m}=e,{fieldsIndex:l}=n,p=a&&"markdown"===m?await H(a):a,c=new C({compiledText:p,description:i,fieldsIndex:l,formTimeZone:o,label:s,layerTimeZone:b(n)}),d=await P({element:e,expressionInfos:r,provider:t}),{expressionParts:f}=c;if(f.length){const e=await Promise.all(f.map(e=>{const n=r.get(e)?.expression??e;return t.getArcadeExecutor(n)}));d.textExpressions=e}return c.addLayer(n,d),c}async function M(e,t){const{associationTypes:r,description:n,label:o}=e,{arcadeExecutorProvider:i,expressionInfos:s,formTimeZone:a,layer:m}=t,l=new L({associationTypes:r,description:n,formTimeZone:a,label:o,layerTimeZone:b(m)}),p=await P({element:e,expressionInfos:s,provider:i});return l.addLayer(m,p),l}async function Q(e,{arcadeExecutorProvider:t,layer:r,formTimeZone:n}){const i=o(e,r)||e.name,s=new A({field:e,formTimeZone:n,label:i,layerTimeZone:b(r)}),a={};return e.editable&&r.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),s.addLayer(r,a),s}function X(e,t,r){return!r.has(e.name.toLowerCase())&&T(e,t)}export{S as createBatchFormTemplate,W as createBatchFormTemplateFromFields};