@arcgis/core 4.33.0-next.20250210 → 4.33.0-next.20250212

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 (562) hide show
  1. package/AttributeBinsGraphic.js +1 -1
  2. package/Graphic.js +1 -1
  3. package/Ground.js +1 -1
  4. package/WebMap.js +1 -1
  5. package/WebScene.js +1 -1
  6. package/arcade/ArcadeModuleResolver.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/support/FeatureSet.js +1 -1
  9. package/arcade/featureset/support/Guid.js +1 -1
  10. package/arcade/featureset/support/cache.js +1 -1
  11. package/assets/esri/core/workers/RemoteClient.js +1 -1
  12. package/assets/esri/core/workers/chunks/{d31f7598629f7cc50233.js → 004853abf357f865b4fa.js} +1 -1
  13. package/assets/esri/core/workers/chunks/00e374e3b4781c4f9a3e.js +1 -0
  14. package/assets/esri/core/workers/chunks/{746c964cf07e4306f21f.js → 03f51ea011ffbcfb7c7d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{ad3e692681b50bd1acc2.js → 03fac4c79641603d8cba.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{0167cf867d8e46c818b0.js → 09260bbe1fd6ce5a53e6.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{3c23e567cfb7372c44ba.js → 0a5689348d544090006d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/0b8bf1966653c326e95a.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d1718ad93e3271b0525e.js → 0e4350fda5328862f2fb.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{c26ffbff1115e76bcb0f.js → 1249fd2f83caeaefd8ce.js} +1 -1
  21. package/assets/esri/core/workers/chunks/135fb580d8afd8d60811.js +1 -0
  22. package/assets/esri/core/workers/chunks/{946a9890f3621d1dfbc5.js → 144e534d4ac1aafab60d.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{cee3a38b92a48a58c4d0.js → 152becae48572299b07f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{f200dca22f9f9bbb8670.js → 17213c3fc63f580e5b73.js} +1 -1
  25. package/assets/esri/core/workers/chunks/1a286d43daa3b811c30d.js +1 -0
  26. package/assets/esri/core/workers/chunks/{e5e3b6d00d27b5bb354f.js → 1d282700e76285a1684c.js} +1 -1
  27. package/assets/esri/core/workers/chunks/2130e0c8d2410c87f880.js +1 -0
  28. package/assets/esri/core/workers/chunks/24e6476f32ad2014d39d.js +1 -0
  29. package/assets/esri/core/workers/chunks/2530e5d1f438db8a7b5c.js +1 -0
  30. package/assets/esri/core/workers/chunks/272662e4e28341419b4f.js +1 -0
  31. package/assets/esri/core/workers/chunks/{dfaf1da323906ee60549.js → 2876419a32537e24b7da.js} +1 -1
  32. package/assets/esri/core/workers/chunks/2b733e8043659466e194.js +1 -0
  33. package/assets/esri/core/workers/chunks/{5fbdb5fea7d6676fcf19.js → 2c1a85a801cb4d9d737e.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{7f87cf3d6a365d987f69.js → 30bd5b3204e09f516ea2.js} +1 -1
  35. package/assets/esri/core/workers/chunks/311c85bd94d5fb28e272.js +1 -0
  36. package/assets/esri/core/workers/chunks/33c6fd524711efd8ef13.js +1 -0
  37. package/assets/esri/core/workers/chunks/{594d923400fd74881833.js → 35392bf8f21005ad6170.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{c04091eea7089dc2e864.js → 35bcb0622234b38d85b4.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{92984981afcbb95828cd.js → 37cfd102b6ab5b959f9d.js} +1 -1
  40. package/assets/esri/core/workers/chunks/3835c2884c55e73dc202.js +1 -0
  41. package/assets/esri/core/workers/chunks/{de1f3c4b8000c2d73013.js → 39dca492cc5f089e1609.js} +1 -1
  42. package/assets/esri/core/workers/chunks/3ba85f1d660b8887f963.js +314 -0
  43. package/assets/esri/core/workers/chunks/{1d51c064045e9c47bd2e.js → 3bad184751fcb26c003c.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{5b85f9da022742f602e2.js → 3c8e5b5fb52611e30ed6.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{e468bf4ec7402942ad8c.js → 3ebdd0701e77bb28c75d.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{a559db8654b4f83fd79b.js → 3f6516af411256d90a03.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{c83b26ff96e39266adc2.js → 4300c80fa10c5d9141e8.js} +1 -1
  48. package/assets/esri/core/workers/chunks/4848a3e31632d15dc4ce.js +1 -0
  49. package/assets/esri/core/workers/chunks/{77764ca90bdd13ee2167.js → 486df1e042204b90b0dd.js} +2 -2
  50. package/assets/esri/core/workers/chunks/{77764ca90bdd13ee2167.js.LICENSE.txt → 486df1e042204b90b0dd.js.LICENSE.txt} +1 -1
  51. package/assets/esri/core/workers/chunks/491effb2c681493cc3a6.js +1 -0
  52. package/assets/esri/core/workers/chunks/{e93dea6b112ce8e2779b.js → 4b47549614d53ce1e384.js} +1 -1
  53. package/assets/esri/core/workers/chunks/52f61e1f5972a72b6b54.js +1 -0
  54. package/assets/esri/core/workers/chunks/{354531dc2f0dea2ad96f.js → 5693d9ce4472a4c5959f.js} +2 -2
  55. package/assets/esri/core/workers/chunks/{354531dc2f0dea2ad96f.js.LICENSE.txt → 5693d9ce4472a4c5959f.js.LICENSE.txt} +1 -1
  56. package/assets/esri/core/workers/chunks/{e56647e61296643c5f84.js → 5719471414810b6a9aec.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{1accbc048b74857269e4.js → 57924f4909f2cbe5d64c.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{b21b152fa15896577242.js → 5b56b271afb0fadf48b4.js} +2 -2
  59. package/assets/esri/core/workers/chunks/{b21b152fa15896577242.js.LICENSE.txt → 5b56b271afb0fadf48b4.js.LICENSE.txt} +1 -1
  60. package/assets/esri/core/workers/chunks/{b3aeda290470dcb2bdd2.js → 5cf08ee5114273163e09.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{2971266a49226e769360.js → 5e5045add6567588b90a.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{5721557a1d8eab23a55b.js → 5eceedac9b2b4d1ef133.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{76794184ba8c2e66745e.js → 629f4621ba6ffdcaa2f9.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{32d3657dcae89b740f8b.js → 6518954889df2e781c47.js} +2 -2
  65. package/assets/esri/core/workers/chunks/{32d3657dcae89b740f8b.js.LICENSE.txt → 6518954889df2e781c47.js.LICENSE.txt} +1 -1
  66. package/assets/esri/core/workers/chunks/6a9a1cd8134a903dd05a.js +1 -0
  67. package/assets/esri/core/workers/chunks/{220b12654b94c94f8d8a.js → 6fa1f1e431aae1794ce3.js} +1 -1
  68. package/assets/esri/core/workers/chunks/7485588bd24217669578.js +1 -0
  69. package/assets/esri/core/workers/chunks/74e0116ae84def626c87.js +1 -0
  70. package/assets/esri/core/workers/chunks/{c4374b6bc5c8dc6435c7.js → 7c81e08fc8a67dcd9dad.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{433576983754f690bcc7.js → 7e3b374f906441cd7fb0.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{8c32cee395da0a7b9a8e.js → 80d3aa3f27ad5b2b969b.js} +1 -1
  73. package/assets/esri/core/workers/chunks/82facb23dfaba2819bc7.js +1 -0
  74. package/assets/esri/core/workers/chunks/{de4384b5833a60e88e31.js → 84c1c3336011a1b79669.js} +1 -1
  75. package/assets/esri/core/workers/chunks/8722d05ae9b0aa5162a4.js +1 -0
  76. package/assets/esri/core/workers/chunks/8939479cd433cc53f6c1.js +1 -0
  77. package/assets/esri/core/workers/chunks/{28dd172faa85080511c5.js → 8a2f3ce46eeac853b3a9.js} +1 -1
  78. package/assets/esri/core/workers/chunks/8b6580329e1e35ea4190.js +1 -0
  79. package/assets/esri/core/workers/chunks/8bfeef7cffe1e65c9dab.js +1 -0
  80. package/assets/esri/core/workers/chunks/8de4280080296adb1757.js +1 -0
  81. package/assets/esri/core/workers/chunks/{b44cf0e4c2f93408cabc.js → 9205115bdb5bc03d0c02.js} +1 -1
  82. package/assets/esri/core/workers/chunks/92d76d59113b4139befe.js +1 -0
  83. package/assets/esri/core/workers/chunks/9421ae38fdf986b9b107.js +1 -0
  84. package/assets/esri/core/workers/chunks/{1f443b99653708470f31.js → 96d7f47ea8fbf345101c.js} +1 -1
  85. package/assets/esri/core/workers/chunks/99c136b800e5fc7e04f4.js +1 -0
  86. package/assets/esri/core/workers/chunks/{d339dee99c4820b63f39.js → 9b74635d80d029498da1.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{c2336d1f5b2b7bf6e7a7.js → 9bd6a4bf8150a6f618ea.js} +1 -1
  88. package/assets/esri/core/workers/chunks/9e7895e8201127ffe0a8.js +1 -0
  89. package/assets/esri/core/workers/chunks/{e6087eda5e3b7e5ad3e1.js → a12afed58acff17708ca.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{7b367bb0ed9c218ca595.js → a52690a27f8732739c02.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{cdd8983cf3a301805680.js → a52c282609a7e9c8ca9e.js} +1 -1
  92. package/assets/esri/core/workers/chunks/a56b3dffd9f38973f350.js +1 -0
  93. package/assets/esri/core/workers/chunks/{95ad76e58452b60fb79f.js → a864ef9b584c83ebf6ae.js} +1 -1
  94. package/assets/esri/core/workers/chunks/a9274c9132e7a2691abb.js +1 -0
  95. package/assets/esri/core/workers/chunks/{df3d1a8d3f11d52eb30d.js → afdbdc1569b56489c14d.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{308ec51ff4a66f7fcb0d.js → b0952b81d5be214262dd.js} +2 -2
  97. package/assets/esri/core/workers/chunks/{308ec51ff4a66f7fcb0d.js.LICENSE.txt → b0952b81d5be214262dd.js.LICENSE.txt} +1 -1
  98. package/assets/esri/core/workers/chunks/b253cf42e53f957b4b4e.js +1 -0
  99. package/assets/esri/core/workers/chunks/{89e3f7880abd014a62c0.js → b42d26123784997c66e8.js} +1 -1
  100. package/assets/esri/core/workers/chunks/b50176897ffadc53573e.js +1 -0
  101. package/assets/esri/core/workers/chunks/{4040158835f9036967cd.js → b83151b03bbeba466f82.js} +2 -2
  102. package/assets/esri/core/workers/chunks/{4040158835f9036967cd.js.LICENSE.txt → b83151b03bbeba466f82.js.LICENSE.txt} +1 -1
  103. package/assets/esri/core/workers/chunks/bf0bf2b912d668575a9b.js +1 -0
  104. package/assets/esri/core/workers/chunks/{94490937dca566fe2640.js → c061cad8323f0469e7e4.js} +1 -1
  105. package/assets/esri/core/workers/chunks/c3dc355d0f8d89b9b7b8.js +1 -0
  106. package/assets/esri/core/workers/chunks/{fef135e55706d84d1947.js → c4ce3c35b52b7999e877.js} +1 -1
  107. package/assets/esri/core/workers/chunks/c77ade444aa2f3f2b599.js +1 -0
  108. package/assets/esri/core/workers/chunks/ca6180e572e69540c183.js +1 -0
  109. package/assets/esri/core/workers/chunks/{16f82e9d98371431b46d.js → cc085918c63da416e59d.js} +1 -1
  110. package/assets/esri/core/workers/chunks/cc8eb975a543556f88ae.js +1 -0
  111. package/assets/esri/core/workers/chunks/{8e90c5fee4ad7c7275dc.js → cccd215b0a4890551957.js} +1 -1
  112. package/assets/esri/core/workers/chunks/ce88224af357957dd83a.js +1 -0
  113. package/assets/esri/core/workers/chunks/{07c5f3fc475c57f5a7a7.js → cf00df122df3db3b0c23.js} +1 -1
  114. package/assets/esri/core/workers/chunks/d074c916b414432a7b6a.js +1 -0
  115. package/assets/esri/core/workers/chunks/d342c56558f164e9e786.js +1 -0
  116. package/assets/esri/core/workers/chunks/{3c591f76e7d6204b7780.js → d3f7ff03ab5b40062d89.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{6e6422eda398774acbc7.js → d60da671aba70485050e.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{9d61590c4d21c7421925.js → d7b260d6187f29e0c136.js} +1 -1
  119. package/assets/esri/core/workers/chunks/de638753a30c9aa41bad.js +1 -0
  120. package/assets/esri/core/workers/chunks/de87009542886fad9a2f.js +2 -0
  121. package/assets/esri/core/workers/chunks/{b765670b47d209d7655a.js.LICENSE.txt → de87009542886fad9a2f.js.LICENSE.txt} +1 -1
  122. package/assets/esri/core/workers/chunks/{bb73cd34fbae935ccbcc.js → dff4a9d656b84fe3e052.js} +1 -1
  123. package/assets/esri/core/workers/chunks/e03e237e7e6ffc8b7f0d.js +1 -0
  124. package/assets/esri/core/workers/chunks/{0b62871b89dcb4c70457.js → e21941260bae30061c2c.js} +1 -1
  125. package/assets/esri/core/workers/chunks/e490f70f192780d7ad50.js +1 -0
  126. package/assets/esri/core/workers/chunks/e6633f0326a44477f630.js +1 -0
  127. package/assets/esri/core/workers/chunks/e71b780d1e6a32f303b7.js +1 -0
  128. package/assets/esri/core/workers/chunks/eac28b0f6fccfabcc3ca.js +1 -0
  129. package/assets/esri/core/workers/chunks/{01c3507d78398baaf61b.js → eb0ce7937813d1be1284.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{f198f4ba7d3d52882d98.js → efded84870064c3d8210.js} +1 -1
  131. package/assets/esri/core/workers/chunks/f088e7db4e7ac85aaff1.js +1 -0
  132. package/assets/esri/core/workers/chunks/{15e08e8a8a72b177d74c.js → f0d28fe4deb7cd894765.js} +1 -1
  133. package/assets/esri/core/workers/chunks/{c8a0089e080140db9076.js → f285ed5425b31123d2bc.js} +1 -1
  134. package/assets/esri/core/workers/chunks/f4ba823c8acd60c7c82d.js +1 -0
  135. package/assets/esri/core/workers/chunks/f52ed527b46c316eb369.js +1 -0
  136. package/assets/esri/core/workers/chunks/{140d0c4285c6978103ea.js → f5ce6af342c02a4b0d15.js} +7 -7
  137. package/assets/esri/core/workers/chunks/{1cbeac3301b6943bb28a.js → fc07d47d44c04f123650.js} +1 -1
  138. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  139. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  140. package/assets/esri/themes/base/_core.scss +4 -0
  141. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +0 -5
  142. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +80 -0
  143. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +14 -0
  144. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +41 -0
  145. package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -6
  146. package/assets/esri/themes/dark/main.css +1 -1
  147. package/assets/esri/themes/light/main.css +1 -1
  148. package/assets/esri/themes/light/view.css +1 -1
  149. package/chunks/Bufferer-B-V7yYm-.js +5 -0
  150. package/chunks/Distance2DCalculator-Coa0qAFt.js +5 -0
  151. package/chunks/Envelope.js +1 -1
  152. package/chunks/{GeodeticDistanceCalculator-BsWHOuqE.js → GeodeticDistanceCalculator-D4iQ-_NX.js} +1 -1
  153. package/chunks/Geometry.js +1 -1
  154. package/chunks/OperatorClip.js +1 -1
  155. package/chunks/OperatorCut.js +1 -1
  156. package/chunks/OperatorGeneralize.js +1 -1
  157. package/chunks/OperatorGeodesicBuffer.js +1 -1
  158. package/chunks/OperatorGeodeticArea.js +1 -1
  159. package/chunks/OperatorGeodeticDistance.js +1 -1
  160. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  161. package/chunks/OperatorProximity.js +1 -1
  162. package/chunks/OperatorProximityGeodesic.js +1 -1
  163. package/chunks/OperatorShapePreservingLength.js +1 -1
  164. package/chunks/OperatorShapePreservingProject.js +1 -1
  165. package/chunks/Point2D.js +1 -1
  166. package/chunks/ProjectionTransformation.js +1 -1
  167. package/chunks/QuadraticBezier.js +1 -1
  168. package/chunks/ShadowHighlight.glsl.js +2 -4
  169. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  170. package/chunks/disjointOperator.js +1 -1
  171. package/chunks/distanceOperator.js +1 -1
  172. package/chunks/lyr3DWorker.js +1 -1
  173. package/core/Accessor.js +1 -1
  174. package/core/Collection.js +1 -1
  175. package/core/Logger.js +1 -1
  176. package/core/ObjectPool.js +1 -1
  177. package/core/RandomLCG.js +1 -1
  178. package/core/XHRAdapter.js +1 -1
  179. package/core/accessorSupport/watch.js +1 -1
  180. package/core/pbf.js +1 -1
  181. package/core/sql/UnknownTimeZone.js +1 -1
  182. package/core/sql.js +1 -1
  183. package/core/workers/RemoteClient.js +1 -1
  184. package/editing/sharedTemplates/SharedTemplate.d.ts +4 -0
  185. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  186. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  187. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  188. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  189. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  190. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  191. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  192. package/editing/sharedTemplates/executor/builders/offsetLine.js +1 -1
  193. package/editing/sharedTemplates/executor/builders/offsetPrimaryLine.js +1 -1
  194. package/editing/sharedTemplates/executor/builders/pointAtAllVerticesOfLine.js +1 -1
  195. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfLine.js +1 -1
  196. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfRadial.js +1 -1
  197. package/editing/sharedTemplates/executor/builders/pointAtEndOfLine.js +1 -1
  198. package/editing/sharedTemplates/executor/builders/pointAtInteriorVertices.js +1 -1
  199. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  200. package/editing/sharedTemplates/executor/builders/pointAtNotBeginningOfLine.js +1 -1
  201. package/editing/sharedTemplates/executor/builders/pointAtNotEndOfLine.js +1 -1
  202. package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
  203. package/editing/sharedTemplates/executor/builders/pointAtPolygonNotStart.js +1 -1
  204. package/editing/sharedTemplates/executor/builders/pointAtPolygonStart.js +1 -1
  205. package/editing/sharedTemplates/executor/builders/pointIdentity.js +1 -1
  206. package/editing/sharedTemplates/executor/builders/pointPrimaryIdentity.js +1 -1
  207. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  208. package/editing/sharedTemplates/executor/builders/polygonBoundaryTwoPoint.js +1 -1
  209. package/editing/sharedTemplates/executor/builders/polygonIdentity.js +1 -1
  210. package/editing/sharedTemplates/executor/builders/polygonPrimaryIdentity.js +1 -1
  211. package/editing/sharedTemplates/executor/builders/polygonVertices.js +1 -1
  212. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  213. package/editing/sharedTemplates/executor/builders/twoPointLines.js +1 -1
  214. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  215. package/editing/sharedTemplates/executor/support/createServiceEdit.js +1 -1
  216. package/editing/sharedTemplates/executor/support/executorUtils.js +1 -1
  217. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  218. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  219. package/editing/sharedTemplates/templateDefinitions/parts/builders/builderUtils.js +1 -1
  220. package/editing/templateUtils.js +1 -1
  221. package/geometry/SpatialReference.js +1 -1
  222. package/geometry/operators/extendOperator.js +1 -1
  223. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  224. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  225. package/geometry/operators/gx/operatorBuffer.js +1 -1
  226. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  227. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  228. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  229. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  230. package/geometry/operators/gx/operatorOffset.js +1 -1
  231. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  232. package/geometry/operators/gx/operatorSimplify.js +1 -1
  233. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  234. package/geometry/operators/gx/operatorUnion.js +1 -1
  235. package/geometry/operators/isNearOperator.js +1 -1
  236. package/geometry/operators/json/disjointOperator.js +1 -1
  237. package/geometry/operators/projectOperator.js +1 -1
  238. package/geometry/operators/reshapeOperator.js +1 -1
  239. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  240. package/geometry/operators/support/apiConverter.js +1 -1
  241. package/geometry/operators/support/initNoPeFactory.js +1 -1
  242. package/geometry/operators/support/jsonConverter.js +1 -1
  243. package/geometry/support/DoubleArray.js +1 -1
  244. package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
  245. package/geometry/support/MeshTexture.js +1 -1
  246. package/geometry/support/MeshTransform.js +1 -1
  247. package/geometry/support/UCharArray.js +5 -0
  248. package/geometry/support/UShortArray.js +5 -0
  249. package/geometry/support/buffer/BufferPool.js +1 -1
  250. package/geometry/support/buffer/BufferView.js +1 -1
  251. package/geometry/support/buffer/internals/Mat3.js +1 -1
  252. package/geometry/support/buffer/internals/Mat4.js +1 -1
  253. package/geometry/support/buffer/internals/Scalar.js +1 -1
  254. package/geometry/support/buffer/internals/Vec2.js +1 -1
  255. package/geometry/support/buffer/internals/Vec3.js +1 -1
  256. package/geometry/support/buffer/internals/Vec4.js +1 -1
  257. package/geometry/support/meshUtils/exporters/gltf/glb.js +1 -1
  258. package/identity/OAuthInfo.js +1 -1
  259. package/interfaces.d.ts +124 -68
  260. package/layers/VectorTileLayer.js +1 -1
  261. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  262. package/layers/mixins/EditBusLayer.js +1 -1
  263. package/layers/mixins/PublishableLayer.js +1 -1
  264. package/layers/mixins/operationalLayers.js +1 -1
  265. package/layers/save/featureLayerUtils.js +1 -1
  266. package/layers/save/utils.js +1 -1
  267. package/layers/support/AggregateField.js +1 -1
  268. package/layers/support/CodedValueDomain.js +1 -1
  269. package/layers/support/Field.js +1 -1
  270. package/layers/support/ImageElement.js +1 -1
  271. package/layers/support/InheritedDomain.js +1 -1
  272. package/layers/support/LOD.js +1 -1
  273. package/layers/support/LabelClass.js +1 -1
  274. package/layers/support/LabelExpressionInfo.js +1 -1
  275. package/layers/support/OrderByInfo.js +1 -1
  276. package/layers/support/PurgeOptions.js +1 -1
  277. package/layers/support/RangeDomain.js +1 -1
  278. package/layers/support/Sublayer.js +1 -1
  279. package/layers/support/SubtypeSublayer.js +1 -1
  280. package/layers/support/TileInfo.js +1 -1
  281. package/layers/support/TilemapCache.js +1 -1
  282. package/layers/support/VideoElement.js +1 -1
  283. package/layers/support/commonProperties.js +1 -1
  284. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  285. package/layers/support/source/DataLayerSource.js +1 -1
  286. package/layers/support/wmsUtils.js +1 -1
  287. package/networks/Network.js +1 -1
  288. package/networks/RulesTable.js +1 -1
  289. package/networks/UtilityNetwork.js +1 -1
  290. package/networks/support/typeUtils.js +1 -1
  291. package/package.json +3 -3
  292. package/portal/Portal.js +1 -1
  293. package/renderers/support/RasterSymbolizer.js +1 -1
  294. package/rest/print.js +1 -1
  295. package/rest/support/AttachmentQuery.js +1 -1
  296. package/rest/support/ClosestFacilityParameters.js +1 -1
  297. package/rest/support/DirectionLine.js +1 -1
  298. package/rest/support/DirectionPoint.js +1 -1
  299. package/rest/support/JobInfo.js +1 -1
  300. package/rest/support/NetworkFeatureSet.js +1 -1
  301. package/rest/support/PointBarrier.js +1 -1
  302. package/rest/support/PolygonBarrier.js +1 -1
  303. package/rest/support/PolylineBarrier.js +1 -1
  304. package/rest/support/Query.js +1 -1
  305. package/rest/support/RelationshipQuery.js +1 -1
  306. package/rest/support/RouteInfo.js +1 -1
  307. package/rest/support/RouteParameters.js +1 -1
  308. package/rest/support/ServiceAreaParameters.js +1 -1
  309. package/rest/support/Stop.js +1 -1
  310. package/rest/support/TopFeaturesQuery.js +1 -1
  311. package/support/revision.js +1 -1
  312. package/symbols/ExtrudeSymbol3DLayer.js +1 -1
  313. package/symbols/FillSymbol3DLayer.js +1 -1
  314. package/symbols/IconSymbol3DLayer.js +1 -1
  315. package/symbols/LineSymbol3DLayer.js +1 -1
  316. package/symbols/ObjectSymbol3DLayer.js +1 -1
  317. package/symbols/PathSymbol3DLayer.js +1 -1
  318. package/symbols/TextSymbol3DLayer.js +1 -1
  319. package/symbols/WaterSymbol3DLayer.js +1 -1
  320. package/symbols/cim/OverrideHelper.js +1 -1
  321. package/symbols/cim/effects/EffectAddControlPoints.js +1 -1
  322. package/symbols/cim/effects/EffectArrow.js +1 -1
  323. package/symbols/cim/effects/EffectBuffer.js +1 -1
  324. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  325. package/symbols/cim/effects/EffectCut.js +1 -1
  326. package/symbols/cim/effects/EffectDashes.js +1 -1
  327. package/symbols/cim/effects/EffectDonut.js +1 -1
  328. package/symbols/cim/effects/EffectJog.js +1 -1
  329. package/symbols/cim/effects/EffectMove.js +1 -1
  330. package/symbols/cim/effects/EffectOffset.js +1 -1
  331. package/symbols/cim/effects/EffectReverse.js +1 -1
  332. package/symbols/cim/effects/EffectRotate.js +1 -1
  333. package/symbols/cim/effects/EffectScale.js +1 -1
  334. package/symbols/cim/effects/EffectWave.js +1 -1
  335. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  336. package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
  337. package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
  338. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  339. package/symbols/cim/placements/PlacementOnLine.js +1 -1
  340. package/symbols/cim/placements/PlacementOnVertices.js +1 -1
  341. package/symbols/cim/placements/PlacementPolygonCenter.js +1 -1
  342. package/symbols/support/ElevationInfo.js +1 -1
  343. package/time/TimeExtent.js +1 -1
  344. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  345. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  346. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  347. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  348. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  349. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  350. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  351. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  352. package/views/2d/engine/vectorTiles/style/StyleDefinition.js +1 -1
  353. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  354. package/views/2d/engine/webgl/DisplayEntity.js +1 -1
  355. package/views/2d/engine/webgl/DisplayRecord.js +1 -1
  356. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  357. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  358. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
  359. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  360. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  361. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  362. package/views/2d/layers/LayerView2D.js +1 -1
  363. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  364. package/views/2d/layers/RouteLayerView2D.js +1 -1
  365. package/views/2d/layers/features/FeatureContainer.js +1 -1
  366. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  367. package/views/2d/layers/features/FeatureStoreQueryAdapter.js +1 -1
  368. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  369. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  370. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  371. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  372. package/views/2d/layers/support/HighlightCounter.js +1 -1
  373. package/views/2d/tiling/TileCoverage.js +1 -1
  374. package/views/2d/tiling/TileKey.js +1 -1
  375. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  376. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  377. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  378. package/views/3d/layers/I3SMeshView3D.js +1 -1
  379. package/views/3d/layers/MediaLayerView3D.js +1 -1
  380. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  381. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  382. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  383. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  384. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  385. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  386. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  387. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  388. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  389. package/views/3d/layers/graphics/GraphicsCorePerformanceInfo.js +1 -1
  390. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  391. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  392. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  393. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  394. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandEncoder.js +1 -1
  395. package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
  396. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  397. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  398. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  399. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  400. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  401. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  402. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  403. package/views/3d/state/Frustum.js +1 -1
  404. package/views/3d/support/DisplayQualityProfile.js +1 -1
  405. package/views/3d/support/QualitySettings.js +1 -1
  406. package/views/3d/terrain/OverlayManager.js +1 -1
  407. package/views/3d/terrain/TerrainSurface.js +1 -1
  408. package/views/3d/terrain/TextureFader.js +1 -1
  409. package/views/3d/terrain/TilingScheme.js +1 -1
  410. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  411. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  412. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  413. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  414. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  415. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  416. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  417. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  418. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  419. package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
  420. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  421. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  422. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  423. package/views/SceneView.js +1 -1
  424. package/views/View.js +1 -1
  425. package/views/View2D.js +1 -1
  426. package/views/draw/DrawAction.js +1 -1
  427. package/views/draw/drawSurfaces.js +1 -1
  428. package/views/input/BrowserEventSource.js +1 -1
  429. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  430. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  431. package/views/layers/LayerView.js +1 -1
  432. package/views/support/Scheduler.js +1 -1
  433. package/views/support/imageReprojection.js +1 -1
  434. package/views/webgl/FramebufferObject.js +1 -1
  435. package/views/webgl/Parameters.js +1 -1
  436. package/views/webgl/RenderingContext.js +1 -1
  437. package/views/webgl/ShaderBuilder.js +1 -1
  438. package/views/webgl/Texture.js +1 -1
  439. package/webscene/Environment.js +1 -1
  440. package/webscene/SunLighting.js +1 -1
  441. package/webscene/VirtualLighting.js +1 -1
  442. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  443. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  444. package/widgets/AreaMeasurement2D.js +1 -1
  445. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  446. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  447. package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
  448. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  449. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  450. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  451. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  452. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  453. package/widgets/BatchAttributeForm.js +1 -1
  454. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  455. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  456. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  457. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  458. package/widgets/DistanceMeasurement2D.js +1 -1
  459. package/widgets/Editor/AddAssociationWorkflow.js +5 -0
  460. package/widgets/Editor/AddAssociationWorkflowData.js +5 -0
  461. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  462. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  463. package/widgets/Editor/EditorViewModel.js +1 -1
  464. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  465. package/widgets/Editor/UpdateWorkflow.js +1 -1
  466. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  467. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  468. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  469. package/widgets/Editor/modelUploadUtils.js +1 -1
  470. package/widgets/Editor/workflowUtils.js +1 -1
  471. package/widgets/Editor.js +1 -1
  472. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  473. package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
  474. package/widgets/Feature/FeatureViewModel.js +1 -1
  475. package/widgets/Feature/support/featureUtils.js +1 -1
  476. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  477. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +5 -0
  478. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +5 -0
  479. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  480. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +5 -0
  481. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  482. package/widgets/FeatureForm.js +1 -1
  483. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  484. package/widgets/LayerList/LayerListItem.js +1 -1
  485. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  486. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  487. package/widgets/OrientedImageryViewer/constants.js +1 -1
  488. package/widgets/OrientedImageryViewer/galleryUtils.js +5 -0
  489. package/widgets/OrientedImageryViewer/utils.js +1 -1
  490. package/widgets/OrientedImageryViewer.js +1 -1
  491. package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
  492. package/widgets/Search/SearchViewModel.js +1 -1
  493. package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
  494. package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
  495. package/widgets/Sketch/support/sketchUtils.js +1 -1
  496. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +2 -2
  497. package/widgets/Widget.js +1 -1
  498. package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
  499. package/widgets/support/FilterBuilder.js +1 -1
  500. package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
  501. package/widgets/support/FilterCondition.js +1 -1
  502. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +5 -0
  503. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  504. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
  505. package/widgets/support/forms/expressions/FormExpressionArcadeExecutor.js +1 -1
  506. package/assets/esri/core/workers/chunks/00e0c53d89e074399f04.js +0 -1
  507. package/assets/esri/core/workers/chunks/08c4b585290efc98ca5d.js +0 -1
  508. package/assets/esri/core/workers/chunks/117e7a12af77c761efb5.js +0 -1
  509. package/assets/esri/core/workers/chunks/12d6baeffd55a98a7c75.js +0 -1
  510. package/assets/esri/core/workers/chunks/207c040b0e42358a5389.js +0 -1
  511. package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +0 -1
  512. package/assets/esri/core/workers/chunks/24c94f97a76646d415ae.js +0 -1
  513. package/assets/esri/core/workers/chunks/2611adb4f328f95ee508.js +0 -1
  514. package/assets/esri/core/workers/chunks/26a2bd432e7a1b3870c3.js +0 -1
  515. package/assets/esri/core/workers/chunks/2def7db73a776e759dae.js +0 -1
  516. package/assets/esri/core/workers/chunks/2ff63a71213f618377d6.js +0 -1
  517. package/assets/esri/core/workers/chunks/324a5547c64a3bae670d.js +0 -1
  518. package/assets/esri/core/workers/chunks/369a2b8484a8807bde38.js +0 -1
  519. package/assets/esri/core/workers/chunks/44abd2cd17aae3299ede.js +0 -1
  520. package/assets/esri/core/workers/chunks/4b56c0c109e10d7409b8.js +0 -1
  521. package/assets/esri/core/workers/chunks/5660f13d78e9e4240034.js +0 -1
  522. package/assets/esri/core/workers/chunks/568bcf809fcfd4d9c713.js +0 -1
  523. package/assets/esri/core/workers/chunks/5be7cf1564e756c24066.js +0 -1
  524. package/assets/esri/core/workers/chunks/5e889a675cbaff03ad5a.js +0 -1
  525. package/assets/esri/core/workers/chunks/61795bde00f2e16d04f1.js +0 -1
  526. package/assets/esri/core/workers/chunks/62a1d60ad4bf6469c4dd.js +0 -1
  527. package/assets/esri/core/workers/chunks/6d79ec15d1858839f576.js +0 -1
  528. package/assets/esri/core/workers/chunks/6ea02ff25f051c08e6c3.js +0 -1
  529. package/assets/esri/core/workers/chunks/7966c245a073c85f04b1.js +0 -1
  530. package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +0 -1
  531. package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +0 -1
  532. package/assets/esri/core/workers/chunks/8bd51b5b392dfacc922f.js +0 -1
  533. package/assets/esri/core/workers/chunks/9b2fab133786e5d47631.js +0 -1
  534. package/assets/esri/core/workers/chunks/9bfb091cec7eed6c8111.js +0 -1
  535. package/assets/esri/core/workers/chunks/9c6380af3bc3130658e1.js +0 -1
  536. package/assets/esri/core/workers/chunks/a2409d4921c02614169a.js +0 -1
  537. package/assets/esri/core/workers/chunks/b18620fc15707e4413a1.js +0 -1
  538. package/assets/esri/core/workers/chunks/b1baf39daf5725404be5.js +0 -1
  539. package/assets/esri/core/workers/chunks/b43d88b6e7dc4ab13599.js +0 -1
  540. package/assets/esri/core/workers/chunks/b765670b47d209d7655a.js +0 -2
  541. package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +0 -1
  542. package/assets/esri/core/workers/chunks/c1970657a287ec96001e.js +0 -1
  543. package/assets/esri/core/workers/chunks/c249ad935f54d3b49ae3.js +0 -1
  544. package/assets/esri/core/workers/chunks/cc75bbfd779f409943a3.js +0 -1
  545. package/assets/esri/core/workers/chunks/d27a199fd8e2ade69254.js +0 -1
  546. package/assets/esri/core/workers/chunks/d35efcbe439500bf18bc.js +0 -1
  547. package/assets/esri/core/workers/chunks/d599ba865da87b487b1b.js +0 -1
  548. package/assets/esri/core/workers/chunks/da1157e288dbc6ba842a.js +0 -1
  549. package/assets/esri/core/workers/chunks/ddc30044f61a2c2df3fe.js +0 -1
  550. package/assets/esri/core/workers/chunks/e37e5d2e233d7f6ccd52.js +0 -314
  551. package/assets/esri/core/workers/chunks/f14b318bab5efcf43419.js +0 -1
  552. package/assets/esri/core/workers/chunks/f29715459ecd46180829.js +0 -1
  553. package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +0 -1
  554. package/assets/esri/core/workers/chunks/f62f657f9fef28f492e0.js +0 -1
  555. package/assets/esri/core/workers/chunks/f9070edd8e0b2a57af79.js +0 -1
  556. package/assets/esri/core/workers/chunks/faf9063420262ea40fd8.js +0 -1
  557. package/chunks/Bufferer-DjC-SKTJ.js +0 -5
  558. package/chunks/Distance2DCalculator-8-JrFGHH.js +0 -5
  559. package/editing/sharedTemplates/support/sharedTemplateUtils.js +0 -5
  560. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationSettings.js +0 -5
  561. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +0 -4
  562. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../chunks/tslib.es6.js";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderPropertyAccessNode as r,ShaderPropertyAccess2DNode as c,ShaderBlockNode as i,ShaderScopeNode as u,ShaderConditionNode as s,ShaderFunctionNode as o}from"./ShaderGraphNode.js";var l,h,a,f,p,d,w,y,m,v,b,x,I,g;function E(t){switch(t.type){case"uint":return _;case"uvec2":return C;case"uvec3":return X;case"uvec4":return Y;default:throw new Error("Found unexpected type")}}function $(t){switch(t.type){case"float":return G;case"vec2":return H;case"vec3":return A;case"vec4":return V;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"int":return _;case"ivec2":return C;case"ivec3":return X;case"ivec4":return Y;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function D(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return _;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return G;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*F(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map((t=>it[t]));throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return dt(t,n,e[n.length-1])}}})}function S(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function j(t){return new Proxy(t,{get(e,n){if(n in e)return e[n];if("string"==typeof n){const e=parseInt(n,10);if(!isNaN(e))return dt(t,`[${e}]`,t.elementType.constructor)}}})}function R(t){return new Proxy(t,{construct:(t,e,n)=>j(new t(...e))})}class P extends Error{}let B=l=class extends e{constructor(t,e){super(),this.elementType=t,this.size=e,this.children=[],this.type="array"}clone(){const t=new l(this.elementType,this.size);return super.cloneInto(t),t}get(t,e){const n=new W(t),r=null!=e?new W(e):null;if(null!=r){return wt(this,n,r,D(this.elementType.constructor))}return dt(this,n,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return Et(this,t,e,n)}glslFindIndex(t,e,n){return $t(this,t,e,n)}static ofType(t,e){const n={construct:(n,r)=>new l(new t,e)};return new Proxy(l,n)}};B.type="array",B=l=t([R],B);class q extends e{constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.children=[],this.type="array-2d"}clone(){const t=new q(this.elementType,this.xSize,this.ySize,this.isRowMajor);return super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(B,{construct:(c,i)=>new q(new t,e,n,r)})}}q.type="array-2d";class U extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}clone(){const t=new U;return t.children=this.children.map(n),super.cloneInto(t),t}}U.type="sampler2D";class _ extends e{constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new _(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}}_.type="float";let C=h=class extends e{constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter((t=>null!=t))}clone(){const t=new h(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",_)}get 1(){return dt(this,"[1]",_)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}};C.type="vec2",C=h=t([S],C);let X=a=class extends e{constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter((t=>null!=t))}get 0(){return dt(this,"[0]",_)}get 1(){return dt(this,"[1]",_)}get 2(){return dt(this,"[2]",_)}get 3(){throw new P}clone(){const t=new a(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}};X.type="vec3",X=a=t([S],X);let Y=f=class extends e{constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter((t=>null!=t))}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",_)}get 1(){return dt(this,"[1]",_)}get 2(){return dt(this,"[2]",_)}get 3(){return dt(this,"[3]",_)}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}};Y.type="vec4",Y=f=t([S],Y);let G=p=class extends e{constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new p(n(this.children[0]));return super.cloneInto(t),t}};G.type="uint",G=p=t([S],G);let H=d=class extends e{constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter((t=>null!=t))}clone(){const t=new d(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};H.type="uvec2",H=d=t([S],H);let A=w=class extends e{constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter((t=>null!=t))}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};A.type="uvec3",A=w=t([S],A);let V=y=class extends e{constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter((t=>null!=t))}clone(){const t=new y(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};V.type="uvec4",V=y=t([S],V);class J extends e{constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Lt(this,t)}or(t){return At(this,t)}xor(t){return Jt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}J.type="bool";let K=m=class extends e{constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter((t=>null!=t))}all(){return te(this)}any(){return ee(this)}clone(){const t=new m(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K.type="bvec2",K=m=t([S],K);let L=v=class extends e{constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter((t=>null!=t))}all(){return te(this)}any(){return ee(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L.type="bvec3",L=v=t([S],L);let Q=b=class extends e{constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter((t=>null!=t))}all(){return te(this)}any(){return ee(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q.type="bvec4",Q=b=t([S],Q);class W extends e{constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Dt(this,O(t,W))}add(t){return kt(this,O(t,W))}subtract(t){return Mt(this,O(t,W))}divide(t){return Ft(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}W.type="int";let Z=x=class extends e{constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter((t=>null!=t))}clone(){const t=new x(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};Z.type="ivec2",Z=x=t([S],Z);let tt=I=class extends e{constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter((t=>null!=t))}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};tt.type="ivec3",tt=I=t([S],tt);let et=g=class extends e{constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter((t=>null!=t))}clone(){const t=new g(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};et.type="ivec4",et=g=t([S],et);class nt extends e{constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return wt(this,new W(t),new W(e),_)}multiply(t){return Dt(this,t)}}nt.type="mat2";class rt extends e{static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=un(t),n=oe(t);return new rt(n,e,0,xt(e),n,0,0,0,1)}constructor(t,e,n,r,c,i,u,s,o){super(),this.type="mat3",this.children=[t,e,n,r,c,i,u,s,o]}add(t){return kt(this,t)}multiply(t){return Dt(this,t)}get(t,e){return wt(this,new W(t),new W(e),_)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}rt.type="mat3";class ct extends e{static identity(){return new ct(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,c,i,u,s,o,l,h,a,f,p,d,w){super(),this.type="mat4",this.children=[t,e,n,r,c,i,u,s,o,l,h,a,f,p,d,w]}static fromColumns(t,e,n,r){return new ct(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Dt(this,t)}get(t,e){return wt(this,new W(t),new W(e),_)}clone(){const t=new ct(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}ct.type="mat4";const it={float:_,vec2:C,vec3:X,vec4:Y,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:G,uvec2:H,uvec3:A,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},ut=(...t)=>new W(...t),st=(...t)=>new _(...t),ot=(...t)=>new C(...t),lt=(...t)=>new X(...t),ht=(...t)=>new Y(...t),at=(...t)=>new nt(...t),ft=(...t)=>new rt(...t),pt=(...t)=>new ct(...t);function dt(t,e,n){const c=new n(new r(e,t,n));return c.isImplicit=!0,c}function wt(t,e,n,r){const i=new r(new c(e,n,t,r));return i.isImplicit=!0,i}function yt(t,e,n,r=null){if(r){const c=new r,i=new r(new o(t,[e,n],!0,!1,c));return i.isImplicit=!0,i}if("float"===e.type||"int"===e.type){const r=new n.constructor(new o(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new o(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const c=new e.constructor(new o(t,[e,n],!0,!1,e.constructor));return c.isImplicit=!0,c}function mt(t,e,n=e.constructor){const r=new n(new o(t,[e],!1,!1,n));return r.isImplicit=!0,r}function vt(t,e,n,r=e.constructor){const c=new r(new o(t,[e,n],!1,!1,r));return c.isImplicit=!0,c}function bt(t,e,n,r,c=e.constructor){const i=new c(new o(t,[e,n,r],!1,!1,c));return i.isImplicit=!0,i}function xt(t){return Dt(t,st(-1))}function It(t,e,n,r){return new e(new i(t,e,n,r))}function gt(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new u(n).setDebugName(e));return r.isImplicit=!0,r}function Et(t,e,n=0,r=t.size){const c=new W(n).setMutable().setDebugName("FindIndexIterator"),i=e(t.get(c)).setDebugName("FindIndexPredicate"),u=It({iter:c},W,i,(({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`)).setDebugName("FindIndexBlock");return u}function $t(t,e,n=0,r=t.size){const c=It({array:t},W,null,(({out:t,array:c})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:c,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`)).setDebugName("GlslFindIndexBlock");return c}function zt(t,e,n){const r="function"==typeof e?e():e,c="function"==typeof n?n():n,i=new r.constructor(new s(t,r,c));return i.isImplicit=!0,i}function Tt(...t){const e=t.map((([t,e])=>"function"==typeof e?[t,e()]:[t,e])),n=e[0][1].constructor,r=e.findIndex((t=>!0===t[0]));if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const c=e.slice(0,r),i=e[r][1],u=new n(c.reduceRight(((t,e)=>zt(e[0],e[1],t)),i));return u.isImplicit=!0,u}function Nt(t,e){const n=new e.constructor(new s(t,e,null));return n.isImplicit=!0,n}function Dt(t,e){return yt("*",t,e)}function Ft(t,e){return yt("/",t,e)}function kt(t,e){return yt("+",t,e)}function Mt(t,e){return yt("-",t,e)}function St(t,e){return yt("%",t,e)}function jt(t,e){return yt("<<",t,e)}function Rt(t,e){return yt(">>",t,e)}function Pt(t,e){return yt("&",t,e)}function Bt(t,e){return yt("|",t,e)}function qt(t,e){return yt("^",t,e)}function Ut(t){return mt("~",t)}function _t(t,e){return yt("==",t,e,J)}function Ct(t,e){return yt("!=",t,e,J)}function Xt(t,e){return yt("<",t,e,J)}function Yt(t,e){return yt("<=",t,e,J)}function Gt(t,e){return yt(">",t,e,J)}function Ht(t,e){return yt(">=",t,e,J)}function At(...t){return t.length<=1?t[0]:t.slice(1).reduce(((t,e)=>Vt(t,e)),t[0])}function Vt(t,e){return yt("||",t,e,J)}function Jt(...t){return t.length<=1?t[0]:t.slice(1).reduce(((t,e)=>Kt(t,e)),t[0])}function Kt(t,e){return yt("^^",t,e,J)}function Lt(...t){return t.length<=1?t[0]:t.slice(1).reduce(((t,e)=>Ot(t,e)),t[0])}function Ot(t,e){return yt("&&",t,e,J)}function Qt(t){return mt("abs",t)}function Wt(t){return mt("acos",t)}function Zt(t){return mt("acosh",t)}function te(t){return mt("all",t,J)}function ee(t){return mt("any",t,J)}function ne(t){return mt("asin",t)}function re(t){return mt("asinh",t)}function ce(t,e){return null==e?mt("atan",t):vt("atan",t,e,t.constructor)}function ie(t){return mt("atanh",t)}function ue(t){return mt("ceil",t)}function se(t,e,n){return bt("clamp",t,e,n,t.constructor)}function oe(t){return mt("cos",t)}function le(t){return mt("cosh",t)}function he(t,e){return vt("cross",t,e,t.constructor)}function ae(t){return mt("dFdX",t)}function fe(t){return mt("dFdY",t)}function pe(t){return mt("degrees",t)}function de(t){return mt("determinant",t,_)}function we(t,e){return vt("distance",t,e,_)}function ye(t,e){return vt("dot",t,e,_)}function me(t,e){return vt("equal",t,e,N(t))}function ve(t,e){return vt("greaterThan",t,e,N(t))}function be(t,e){return vt("greaterThanEqual",t,e,N(t))}function xe(t){return mt("exp",t)}function Ie(t){return mt("exp2",t)}function ge(t,e,n){return bt("faceforward",t,e,n)}function Ee(t){return mt("floatBitsToInt",t,T(t))}function $e(t){return mt("floatBitsToUint",t,$(t))}function ze(t){return mt("floor",t)}function Te(t){return mt("fract",t)}function Ne(t){return mt("fwidth",t)}function De(t){return mt("intBitsToFloat",t,z(t))}function Fe(t){return mt("uintBitsToFloat",t,E(t))}function ke(t){return mt("inverse",t,_)}function Me(t){return mt("inversesqrt",t)}function Se(t){return mt("isinf",t,N(t))}function je(t){return mt("isnan",t,N(t))}function Re(t){return mt("length",t,_)}function Pe(t,e){return vt("lessThan",t,e,N(t))}function Be(t,e){return vt("lessThanEqual",t,e,N(t))}function qe(t){return mt("log",t)}function Ue(t){return mt("log2",t)}function _e(t,e){return vt("matrixCompMult",t,e)}function Ce(t,e){return vt("max",t,e)}function Xe(t,e){return vt("min",t,e)}function Ye(t,e,n){return bt("mix",t,e,n)}function Ge(t,e){return vt("mod",t,e)}function He(t,e){throw new Error("modf not implemented")}function Ae(t){return mt("normalize",t)}function Ve(t){return"bool"===t.type?mt("!",t):mt("not",t)}function Je(t,e){return vt("notEqual",t,e,N(t))}function Ke(t,e){throw new Error("Impl type?")}function Le(t){return mt("packHalf2x16",t,G)}function Oe(t){return mt("packUnorm2x16",t,G)}function Qe(t){return mt("packSnorm2x16",t,G)}function We(t,e){return vt("pow",t,e)}function Ze(t){return mt("radians",t)}function tn(t,e){return vt("reflect",t,e)}function en(t,e,n){return bt("refract",t,e,n)}function nn(t){return mt("round",t)}function rn(t){return mt("roundEven",t)}function cn(t){return mt("sign",t)}function un(t){return mt("sin",t)}function sn(t){return mt("sinh",t)}function on(t,e,n){return bt("smoothstep",t,e,n)}function ln(t){return mt("sqrt",t)}function hn(t,e){return vt("step",t,e,e.constructor)}function an(t){return mt("tan",t)}function fn(t){return mt("tanh",t)}function pn(t,e,n){return bt("texelFetch",t,e,n,Y)}function dn(t,e,n,r){throw new Error("Impl type")}function wn(t,e,n){throw new Error("Impl type")}function yn(t,e){return vt("texture",t,e,Y)}function mn(t,e,n,r){throw new Error("Impl type")}function vn(t,e,n,r,c){throw new Error("Impl type")}function bn(t,e,n){throw new Error("Impl type")}function xn(t,e,n,r){throw new Error("Impl type")}function In(t,e,n,r){throw new Error("Impl type")}function gn(t,e,n){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n,r,c){throw new Error("Impl type")}function zn(t,e,n){throw new Error("Impl type")}function Tn(t,e,n,r){throw new Error("Impl type")}function Nn(t,e,n,r){throw new Error("Impl type")}function Dn(t,e){throw new Error("Impl type")}function Fn(t){return mt("transpose",t)}function kn(t){return mt("trunc",t)}function Mn(t){return mt("unpackHalf2x16",t,C)}function Sn(t){return mt("unpackUnorm2x16",t,C)}function jn(t){return mt("unpackSnorm2x16",t,C)}function Rn(t,e){const{initialValue:n,xRange:r,yRange:c,callback:i}=e,[u,s]=r,[o,l]=c,h=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=i(f,t.get(h,a),h,a).setDebugName("callback"),d=It({iterX:h,iterY:a,accumulator:f},n.constructor,p,(({out:t,iterX:e,iterY:n,accumulator:r,subgraph:c})=>`\nfor (${n} = ${o}; ${n} < ${l}; ${n}++) {\n for (${e} = ${u}; ${e} < ${s}; ${e}++) {\n\n ${c.body}\n\n ${r} = ${c.varName};\n }\n}\n${t} = ${r};\n`)).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,B as FixedArray,q as FixedArray2D,_ as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,ct as Mat4,U as Sampler2D,G as UInt,H as UVec2,A as UVec3,V as UVec4,C as Vec2,X as Vec3,Y as Vec4,Vt as _or,Kt as _xor,Qt as abs,Wt as acos,Zt as acosh,kt as add,te as all,Lt as and,ee as any,ne as asin,re as asinh,ce as atan,ie as atanh,Pt as bitAnd,Ut as bitNot,Bt as bitOr,Rt as bitRShift,jt as bitShift,qt as bitXor,It as block,ue as ceil,se as clamp,Tt as cond,oe as cos,le as cosh,he as cross,ae as dFdx,fe as dFdy,dt as definePropertyAccess,wt as definePropertyAccess2D,pe as degrees,de as determinant,we as distance,Ft as divide,ye as dot,_t as equal,me as equalComponent,xe as exp,Ie as exp2,ge as faceforward,Et as findIndex,st as float,Ee as floatBitsToInt,$e as floatBitsToUint,ze as floor,Te as fract,Ne as fwidth,F as getTypeElementLengthForType,$t as glslFindIndex,Gt as greaterThan,ve as greaterThanComponent,Ht as greaterThanEqual,be as greaterThanEqualComponent,zt as ifElse,ut as int,De as intBitsToFloat,St as intMod,ke as inverse,Me as inversesqrt,Se as isinf,je as isnan,Re as length,Xt as lessThan,Pe as lessThanComponent,Yt as lessThanEqual,Be as lessThanEqualComponent,qe as log,Ue as log2,at as mat2,ft as mat3,pt as mat4,_e as matrixCompMult,Ce as max,Xe as min,Ye as mix,Ge as mod,He as modf,Dt as multiply,gt as namedScope,xt as negate,Ae as normalize,Ve as not,Ct as notEqual,Je as notEqualComponent,At as or,Ke as outerProduct,Le as packHalf2x16,Qe as packSnorm2x16,Oe as packUnorm2x16,We as pow,Ze as radians,Rn as reduce2D,tn as reflect,en as refract,nn as round,rn as roundEven,cn as sign,un as sin,sn as sinh,on as smoothstep,ln as sqrt,hn as step,Mt as subtract,an as tan,fn as tanh,pn as texelFetch,dn as texelFetchOffset,wn as texture,yn as texture2D,mn as textureGrad,vn as textureGradOffset,bn as textureLod,xn as textureLodOffset,In as textureOffset,gn as textureProj,En as textureProjGrad,$n as textureProjGradOffset,zn as textureProjLod,Tn as textureProjLodOffset,Nn as textureProjOffset,Dn as textureSize,T as transformFloatToInt,$ as transformFloatToUInt,z as transformIntToFloat,N as transformTypeToBooleanType,E as transformUIntToFloat,Fn as transpose,kn as trunc,Fe as uintBitsToFloat,Mn as unpackHalf2x16,jn as unpackSnorm2x16,Sn as unpackUnorm2x16,ot as vec2,lt as vec3,ht as vec4,Nt as when,Jt as xor};
5
+ import{_ as t}from"../../../../../../chunks/tslib.es6.js";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderPropertyAccessNode as r,ShaderPropertyAccess2DNode as c,ShaderFunctionNode as i,ShaderBlockNode as s,ShaderScopeNode as u,ShaderConditionNode as o}from"./ShaderGraphNode.js";var h,l,a,f,p,d,w,y,m,v,b,x,I,g;function E(t){switch(t.type){case"uint":return _;case"uvec2":return C;case"uvec3":return X;case"uvec4":return Y;default:throw new Error("Found unexpected type")}}function $(t){switch(t.type){case"float":return G;case"vec2":return H;case"vec3":return A;case"vec4":return V;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"int":return _;case"ivec2":return C;case"ivec3":return X;case"ivec4":return Y;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function D(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return _;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return G;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*F(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map((t=>it[t]));throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return dt(t,n,e[n.length-1])}}})}function S(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function j(t){return new Proxy(t,{get(e,n){if(n in e)return e[n];if("string"==typeof n){const e=parseInt(n,10);if(!isNaN(e))return dt(t,`[${e}]`,t.elementType.constructor)}}})}function R(t){return new Proxy(t,{construct:(t,e,n)=>j(new t(...e))})}class P extends Error{}let B=class extends e{static{h=this}static{this.type="array"}constructor(t,e){super(),this.elementType=t,this.size=e,this.children=[],this.type="array"}clone(){const t=new h(this.elementType,this.size);return super.cloneInto(t),t}get(t,e){const n=new W(t),r=null!=e?new W(e):null;if(null!=r){return wt(this,n,r,D(this.elementType.constructor))}return dt(this,n,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return Et(this,t,e,n)}glslFindIndex(t,e,n){return $t(this,t,e,n)}static ofType(t,e){const n={construct:(n,r)=>new h(new t,e)};return new Proxy(h,n)}};B=h=t([R],B);class q extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.children=[],this.type="array-2d"}clone(){const t=new q(this.elementType,this.xSize,this.ySize,this.isRowMajor);return super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(B,{construct:(c,i)=>new q(new t,e,n,r)})}}class U extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new U;return t.children=this.children.map(n),super.cloneInto(t),t}}class _ extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new _(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}}let C=class extends e{static{l=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter((t=>null!=t))}clone(){const t=new l(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",_)}get 1(){return dt(this,"[1]",_)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}};C=l=t([S],C);let X=class extends e{static{a=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter((t=>null!=t))}get 0(){return dt(this,"[0]",_)}get 1(){return dt(this,"[1]",_)}get 2(){return dt(this,"[2]",_)}get 3(){throw new P}clone(){const t=new a(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}};X=a=t([S],X);let Y=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter((t=>null!=t))}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",_)}get 1(){return dt(this,"[1]",_)}get 2(){return dt(this,"[2]",_)}get 3(){return dt(this,"[3]",_)}multiply(t){return Dt(this,"number"==typeof t?O(t,_):t)}divide(t){return Ft(this,"number"==typeof t?O(t,_):t)}add(t){return kt(this,"number"==typeof t?O(t,_):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,_):t)}};Y=f=t([S],Y);let G=class extends e{static{p=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new p(n(this.children[0]));return super.cloneInto(t),t}};G=p=t([S],G);let H=class extends e{static{d=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter((t=>null!=t))}clone(){const t=new d(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};H=d=t([S],H);let A=class extends e{static{w=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter((t=>null!=t))}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};A=w=t([S],A);let V=class extends e{static{y=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter((t=>null!=t))}clone(){const t=new y(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};V=y=t([S],V);class J extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Lt(this,t)}or(t){return At(this,t)}xor(t){return Jt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}let K=class extends e{static{m=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter((t=>null!=t))}all(){return te(this)}any(){return ee(this)}clone(){const t=new m(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K=m=t([S],K);let L=class extends e{static{v=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter((t=>null!=t))}all(){return te(this)}any(){return ee(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L=v=t([S],L);let Q=class extends e{static{b=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter((t=>null!=t))}all(){return te(this)}any(){return ee(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q=b=t([S],Q);class W extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Dt(this,O(t,W))}add(t){return kt(this,O(t,W))}subtract(t){return Mt(this,O(t,W))}divide(t){return Ft(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}let Z=class extends e{static{x=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter((t=>null!=t))}clone(){const t=new x(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};Z=x=t([S],Z);let tt=class extends e{static{I=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter((t=>null!=t))}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};tt=I=t([S],tt);let et=class extends e{static{g=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter((t=>null!=t))}clone(){const t=new g(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};et=g=t([S],et);class nt extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return wt(this,new W(t),new W(e),_)}multiply(t){return Dt(this,t)}}class rt extends e{static{this.type="mat3"}static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=sn(t),n=oe(t);return new rt(n,e,0,xt(e),n,0,0,0,1)}constructor(t,e,n,r,c,i,s,u,o){super(),this.type="mat3",this.children=[t,e,n,r,c,i,s,u,o]}add(t){return kt(this,t)}multiply(t){return Dt(this,t)}get(t,e){return wt(this,new W(t),new W(e),_)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class ct extends e{static{this.type="mat4"}static identity(){return new ct(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,c,i,s,u,o,h,l,a,f,p,d,w){super(),this.type="mat4",this.children=[t,e,n,r,c,i,s,u,o,h,l,a,f,p,d,w]}static fromColumns(t,e,n,r){return new ct(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Dt(this,t)}get(t,e){return wt(this,new W(t),new W(e),_)}clone(){const t=new ct(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const it={float:_,vec2:C,vec3:X,vec4:Y,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:G,uvec2:H,uvec3:A,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},st=(...t)=>new W(...t),ut=(...t)=>new _(...t),ot=(...t)=>new C(...t),ht=(...t)=>new X(...t),lt=(...t)=>new Y(...t),at=(...t)=>new nt(...t),ft=(...t)=>new rt(...t),pt=(...t)=>new ct(...t);function dt(t,e,n){const c=new n(new r(e,t,n));return c.isImplicit=!0,c}function wt(t,e,n,r){const i=new r(new c(e,n,t,r));return i.isImplicit=!0,i}function yt(t,e,n,r=null){if(r){const c=new r,s=new r(new i(t,[e,n],!0,!1,c));return s.isImplicit=!0,s}if("float"===e.type||"int"===e.type){const r=new n.constructor(new i(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new i(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const c=new e.constructor(new i(t,[e,n],!0,!1,e.constructor));return c.isImplicit=!0,c}function mt(t,e,n=e.constructor){const r=new n(new i(t,[e],!1,!1,n));return r.isImplicit=!0,r}function vt(t,e,n,r=e.constructor){const c=new r(new i(t,[e,n],!1,!1,r));return c.isImplicit=!0,c}function bt(t,e,n,r,c=e.constructor){const s=new c(new i(t,[e,n,r],!1,!1,c));return s.isImplicit=!0,s}function xt(t){return Dt(t,ut(-1))}function It(t,e,n,r){return new e(new s(t,e,n,r))}function gt(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new u(n).setDebugName(e));return r.isImplicit=!0,r}function Et(t,e,n=0,r=t.size){const c=new W(n).setMutable().setDebugName("FindIndexIterator"),i=e(t.get(c)).setDebugName("FindIndexPredicate"),s=It({iter:c},W,i,(({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`)).setDebugName("FindIndexBlock");return s}function $t(t,e,n=0,r=t.size){const c=It({array:t},W,null,(({out:t,array:c})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:c,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`)).setDebugName("GlslFindIndexBlock");return c}function zt(t,e,n){const r="function"==typeof e?e():e,c="function"==typeof n?n():n,i=new r.constructor(new o(t,r,c));return i.isImplicit=!0,i}function Tt(...t){const e=t.map((([t,e])=>"function"==typeof e?[t,e()]:[t,e])),n=e[0][1].constructor,r=e.findIndex((t=>!0===t[0]));if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const c=e.slice(0,r),i=e[r][1],s=new n(c.reduceRight(((t,e)=>zt(e[0],e[1],t)),i));return s.isImplicit=!0,s}function Nt(t,e){const n=new e.constructor(new o(t,e,null));return n.isImplicit=!0,n}function Dt(t,e){return yt("*",t,e)}function Ft(t,e){return yt("/",t,e)}function kt(t,e){return yt("+",t,e)}function Mt(t,e){return yt("-",t,e)}function St(t,e){return yt("%",t,e)}function jt(t,e){return yt("<<",t,e)}function Rt(t,e){return yt(">>",t,e)}function Pt(t,e){return yt("&",t,e)}function Bt(t,e){return yt("|",t,e)}function qt(t,e){return yt("^",t,e)}function Ut(t){return mt("~",t)}function _t(t,e){return yt("==",t,e,J)}function Ct(t,e){return yt("!=",t,e,J)}function Xt(t,e){return yt("<",t,e,J)}function Yt(t,e){return yt("<=",t,e,J)}function Gt(t,e){return yt(">",t,e,J)}function Ht(t,e){return yt(">=",t,e,J)}function At(...t){return t.length<=1?t[0]:t.slice(1).reduce(((t,e)=>Vt(t,e)),t[0])}function Vt(t,e){return yt("||",t,e,J)}function Jt(...t){return t.length<=1?t[0]:t.slice(1).reduce(((t,e)=>Kt(t,e)),t[0])}function Kt(t,e){return yt("^^",t,e,J)}function Lt(...t){return t.length<=1?t[0]:t.slice(1).reduce(((t,e)=>Ot(t,e)),t[0])}function Ot(t,e){return yt("&&",t,e,J)}function Qt(t){return mt("abs",t)}function Wt(t){return mt("acos",t)}function Zt(t){return mt("acosh",t)}function te(t){return mt("all",t,J)}function ee(t){return mt("any",t,J)}function ne(t){return mt("asin",t)}function re(t){return mt("asinh",t)}function ce(t,e){return null==e?mt("atan",t):vt("atan",t,e,t.constructor)}function ie(t){return mt("atanh",t)}function se(t){return mt("ceil",t)}function ue(t,e,n){return bt("clamp",t,e,n,t.constructor)}function oe(t){return mt("cos",t)}function he(t){return mt("cosh",t)}function le(t,e){return vt("cross",t,e,t.constructor)}function ae(t){return mt("dFdX",t)}function fe(t){return mt("dFdY",t)}function pe(t){return mt("degrees",t)}function de(t){return mt("determinant",t,_)}function we(t,e){return vt("distance",t,e,_)}function ye(t,e){return vt("dot",t,e,_)}function me(t,e){return vt("equal",t,e,N(t))}function ve(t,e){return vt("greaterThan",t,e,N(t))}function be(t,e){return vt("greaterThanEqual",t,e,N(t))}function xe(t){return mt("exp",t)}function Ie(t){return mt("exp2",t)}function ge(t,e,n){return bt("faceforward",t,e,n)}function Ee(t){return mt("floatBitsToInt",t,T(t))}function $e(t){return mt("floatBitsToUint",t,$(t))}function ze(t){return mt("floor",t)}function Te(t){return mt("fract",t)}function Ne(t){return mt("fwidth",t)}function De(t){return mt("intBitsToFloat",t,z(t))}function Fe(t){return mt("uintBitsToFloat",t,E(t))}function ke(t){return mt("inverse",t,_)}function Me(t){return mt("inversesqrt",t)}function Se(t){return mt("isinf",t,N(t))}function je(t){return mt("isnan",t,N(t))}function Re(t){return mt("length",t,_)}function Pe(t,e){return vt("lessThan",t,e,N(t))}function Be(t,e){return vt("lessThanEqual",t,e,N(t))}function qe(t){return mt("log",t)}function Ue(t){return mt("log2",t)}function _e(t,e){return vt("matrixCompMult",t,e)}function Ce(t,e){return vt("max",t,e)}function Xe(t,e){return vt("min",t,e)}function Ye(t,e,n){return bt("mix",t,e,n)}function Ge(t,e){return vt("mod",t,e)}function He(t,e){throw new Error("modf not implemented")}function Ae(t){return mt("normalize",t)}function Ve(t){return"bool"===t.type?mt("!",t):mt("not",t)}function Je(t,e){return vt("notEqual",t,e,N(t))}function Ke(t,e){throw new Error("Impl type?")}function Le(t){return mt("packHalf2x16",t,G)}function Oe(t){return mt("packUnorm2x16",t,G)}function Qe(t){return mt("packSnorm2x16",t,G)}function We(t,e){return vt("pow",t,e)}function Ze(t){return mt("radians",t)}function tn(t,e){return vt("reflect",t,e)}function en(t,e,n){return bt("refract",t,e,n)}function nn(t){return mt("round",t)}function rn(t){return mt("roundEven",t)}function cn(t){return mt("sign",t)}function sn(t){return mt("sin",t)}function un(t){return mt("sinh",t)}function on(t,e,n){return bt("smoothstep",t,e,n)}function hn(t){return mt("sqrt",t)}function ln(t,e){return vt("step",t,e,e.constructor)}function an(t){return mt("tan",t)}function fn(t){return mt("tanh",t)}function pn(t,e,n){return bt("texelFetch",t,e,n,Y)}function dn(t,e,n,r){throw new Error("Impl type")}function wn(t,e,n){throw new Error("Impl type")}function yn(t,e){return vt("texture",t,e,Y)}function mn(t,e,n,r){throw new Error("Impl type")}function vn(t,e,n,r,c){throw new Error("Impl type")}function bn(t,e,n){throw new Error("Impl type")}function xn(t,e,n,r){throw new Error("Impl type")}function In(t,e,n,r){throw new Error("Impl type")}function gn(t,e,n){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n,r,c){throw new Error("Impl type")}function zn(t,e,n){throw new Error("Impl type")}function Tn(t,e,n,r){throw new Error("Impl type")}function Nn(t,e,n,r){throw new Error("Impl type")}function Dn(t,e){throw new Error("Impl type")}function Fn(t){return mt("transpose",t)}function kn(t){return mt("trunc",t)}function Mn(t){return mt("unpackHalf2x16",t,C)}function Sn(t){return mt("unpackUnorm2x16",t,C)}function jn(t){return mt("unpackSnorm2x16",t,C)}function Rn(t,e){const{initialValue:n,xRange:r,yRange:c,callback:i}=e,[s,u]=r,[o,h]=c,l=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=i(f,t.get(l,a),l,a).setDebugName("callback"),d=It({iterX:l,iterY:a,accumulator:f},n.constructor,p,(({out:t,iterX:e,iterY:n,accumulator:r,subgraph:c})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${s}; ${e} < ${u}; ${e}++) {\n\n ${c.body}\n\n ${r} = ${c.varName};\n }\n}\n${t} = ${r};\n`)).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,B as FixedArray,q as FixedArray2D,_ as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,ct as Mat4,U as Sampler2D,G as UInt,H as UVec2,A as UVec3,V as UVec4,C as Vec2,X as Vec3,Y as Vec4,Vt as _or,Kt as _xor,Qt as abs,Wt as acos,Zt as acosh,kt as add,te as all,Lt as and,ee as any,ne as asin,re as asinh,ce as atan,ie as atanh,Pt as bitAnd,Ut as bitNot,Bt as bitOr,Rt as bitRShift,jt as bitShift,qt as bitXor,It as block,se as ceil,ue as clamp,Tt as cond,oe as cos,he as cosh,le as cross,ae as dFdx,fe as dFdy,dt as definePropertyAccess,wt as definePropertyAccess2D,pe as degrees,de as determinant,we as distance,Ft as divide,ye as dot,_t as equal,me as equalComponent,xe as exp,Ie as exp2,ge as faceforward,Et as findIndex,ut as float,Ee as floatBitsToInt,$e as floatBitsToUint,ze as floor,Te as fract,Ne as fwidth,F as getTypeElementLengthForType,$t as glslFindIndex,Gt as greaterThan,ve as greaterThanComponent,Ht as greaterThanEqual,be as greaterThanEqualComponent,zt as ifElse,st as int,De as intBitsToFloat,St as intMod,ke as inverse,Me as inversesqrt,Se as isinf,je as isnan,Re as length,Xt as lessThan,Pe as lessThanComponent,Yt as lessThanEqual,Be as lessThanEqualComponent,qe as log,Ue as log2,at as mat2,ft as mat3,pt as mat4,_e as matrixCompMult,Ce as max,Xe as min,Ye as mix,Ge as mod,He as modf,Dt as multiply,gt as namedScope,xt as negate,Ae as normalize,Ve as not,Ct as notEqual,Je as notEqualComponent,At as or,Ke as outerProduct,Le as packHalf2x16,Qe as packSnorm2x16,Oe as packUnorm2x16,We as pow,Ze as radians,Rn as reduce2D,tn as reflect,en as refract,nn as round,rn as roundEven,cn as sign,sn as sin,un as sinh,on as smoothstep,hn as sqrt,ln as step,Mt as subtract,an as tan,fn as tanh,pn as texelFetch,dn as texelFetchOffset,wn as texture,yn as texture2D,mn as textureGrad,vn as textureGradOffset,bn as textureLod,xn as textureLodOffset,In as textureOffset,gn as textureProj,En as textureProjGrad,$n as textureProjGradOffset,zn as textureProjLod,Tn as textureProjLodOffset,Nn as textureProjOffset,Dn as textureSize,T as transformFloatToInt,$ as transformFloatToUInt,z as transformIntToFloat,N as transformTypeToBooleanType,E as transformUIntToFloat,Fn as transpose,kn as trunc,Fe as uintBitsToFloat,Mn as unpackHalf2x16,jn as unpackSnorm2x16,Sn as unpackUnorm2x16,ot as vec2,ht as vec3,lt as vec4,Nt as when,Jt as xor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{FeatureSymbologyDrawOrder as e}from"../../../enums.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as s,isHighlight as r,getFeaturePipelineState as i,resolveDynamicUniforms as o,getFeatureUniforms as a,getSelectionDefines as n}from"../featureTechniqueUtils.js";import{TechniqueType as m}from"../TechniqueType.js";import{getAntialiasingControls as u}from"./utils.js";import{GradientStrokeShader as l}from"../shaders/GradientStrokeShader.js";import{FramebufferBit as p,CompareFunction as c,StencilOperation as f}from"../../../../../../webgl/enums.js";class h extends t{constructor(){super(...arguments),this.type=m.GradientStroke,this.shaders={geometry:new l},this.symbologyPlane=e.LINE}render(e,t){const{context:m,painter:l,pixelRatio:h}=e,d=t.instance.getInput();if(s(e)||r(e)){const s=i(e);return l.setPipelineState(s),void l.submitDraw(e,t)}e.context.setClearDepth(1),e.context.clear(p.DEPTH);const E={color:!1,depth:{write:{zNear:0,zFar:1},test:c.LESS},stencil:{write:!1,test:{ref:e=>e.stencilRef,compare:c.EQUAL,mask:255,op:{fail:f.KEEP,zFail:f.KEEP,zPass:f.KEEP}}}};l.setShader({shader:this.shaders.geometry,uniforms:{...o(e,t.target,d.uniforms),...a(e,t.target),antialiasingControls:u(h),mosaicInfo:l.textureManager.getMosaicInfo(m,t.textureKey),technique:{isColorPass:0}},defines:{...n(e)},optionalAttributes:d.optionalAttributes,useComputeBuffer:s(e)}),l.setPipelineState(E),l.submitDraw(e,t);const g={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:c.LEQUAL},stencil:{write:!1,test:{ref:e=>e.stencilRef,compare:c.EQUAL,mask:255,op:{fail:f.KEEP,zFail:f.KEEP,zPass:f.KEEP}}}};l.setShader({shader:this.shaders.geometry,uniforms:{...o(e,t.target,d.uniforms),...a(e,t.target),antialiasingControls:u(h),mosaicInfo:l.textureManager.getMosaicInfo(m,t.textureKey),technique:{isColorPass:1}},defines:{...n(e)},optionalAttributes:d.optionalAttributes,useComputeBuffer:s(e)}),l.setPipelineState(g),l.submitDraw(e,t)}}export{h as GradientStrokeTechnique};
5
+ import{FeatureSymbologyDrawOrder as e}from"../../../enums.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{resolveDynamicUniforms as s,getFeatureUniforms as r,getSelectionDefines as i,isHittest as o,isHighlight as a,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{TechniqueType as p}from"../TechniqueType.js";import{getAntialiasingControls as m}from"./utils.js";import{GradientStrokeShader as c}from"../shaders/GradientStrokeShader.js";import{FramebufferBit as l,CompareFunction as h,StencilOperation as u}from"../../../../../../webgl/enums.js";class d extends t{constructor(){super(...arguments),this.type=p.GradientStroke,this.shaders={geometry:new c},this.symbologyPlane=e.LINE}_getShaderOptions(e,t,a){const{context:n,painter:p,pixelRatio:c}=e,l=t.instance.getInput();return{shader:this.shaders.geometry,uniforms:{...s(e,t.target,l.uniforms),...r(e,t.target),antialiasingControls:m(c),mosaicInfo:p.textureManager.getMosaicInfo(n,t.textureKey),technique:{isColorPass:a}},defines:{...i(e)},optionalAttributes:l.optionalAttributes,useComputeBuffer:o(e)}}render(e,t){const{painter:s}=e;if(o(e)||a(e)){const r=n(e);return s.setPipelineState(r),s.setShader(this._getShaderOptions(e,t,1)),void s.submitDraw(e,t)}e.context.setClearDepth(1),e.context.clear(l.DEPTH);const r={color:!1,depth:{write:{zNear:0,zFar:1},test:h.LESS},stencil:{write:!1,test:{ref:e=>e.stencilRef,compare:h.EQUAL,mask:255,op:{fail:u.KEEP,zFail:u.KEEP,zPass:u.KEEP}}}};s.setShader(this._getShaderOptions(e,t,0)),s.setPipelineState(r),s.submitDraw(e,t);const i={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:h.LEQUAL},stencil:{write:!1,test:{ref:e=>e.stencilRef,compare:h.EQUAL,mask:255,op:{fail:u.KEEP,zFail:u.KEEP,zPass:u.KEEP}}}};s.setShader(this._getShaderOptions(e,t,1)),s.setPipelineState(i),s.submitDraw(e,t)}}export{d as GradientStrokeTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import i from"../../../TrackGraphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import{neverReached as o}from"../../../core/compilerUtils.js";import n from"../../../core/Error.js";import{makeHandle as u,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import h from"../../../core/Logger.js";import{destroyMaybe as c}from"../../../core/maybe.js";import{notDeepEqual as p}from"../../../core/object.js";import{createAbortError as d,createResolver as y,ignoreAbortErrors as f,throwIfNotAbortError as g,isAbortError as m}from"../../../core/promiseUtils.js";import{watch as w}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as v}from"../../../core/accessorSupport/decorators/property.js";import{subclass as b}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as A}from"../../../core/support/UpdatingHandles.js";import F from"../../../geometry/Extent.js";import S from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as j}from"../../../layers/graphics/featureConversionUtils.js";import U from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as x}from"../../../layers/support/featureLayerUtils.js";import{packFields as I}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as E}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as k}from"../../../layers/support/timeSupport.js";import V from"../../../rest/support/AggregateFeatureSet.js";import q from"../../../rest/support/AttributeBinsFeatureSet.js";import R from"../../../rest/support/AttributeBinsQuery.js";import C from"../../../rest/support/FeatureSet.js";import Q from"../../../rest/support/Query.js";import{LayerView2DMixin as O}from"./LayerView2D.js";import{FeatureContainer as L}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as T}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as W}from"./features/FeatureSourceEventLog.js";import{CatalogFootprintLayerAdapter as P}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{FeatureLayerAdapter as D}from"./features/layerAdapters/FeatureLayerAdapter.js";import{InMemoryLayerAdapter as H}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as M}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as N}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as J}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as G}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as $}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as B}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as z}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import Z from"./support/FeatureCommandQueue.js";import{handleNoEngineError as K}from"./support/handleNoEngineError.js";import{toJSONGeometryType as X}from"./support/util.js";import{FeatureTileSubscriptionManager as Y}from"../tiling/FeatureTileSubscriptionManager.js";import ee from"../../layers/FeatureLayerView.js";import te from"../../layers/LayerView.js";import re from"../../layers/RefreshableLayerView.js";import{defaultHighlightName as ie}from"../../support/HighlightDefaults.js";function se(e,t){const r=new Set;return e&&e.forEach((e=>r.add(e))),t&&t.forEach((e=>r.add(e))),r.has("*")?["*"]:Array.from(r)}const ae=4294967294;function oe(e,t){return l(e.map((e=>w((()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t}),t))))}let ne=class extends(ee(re(O(te)))){constructor(){super(...arguments),this._commandsQueue=new Z({process:e=>{switch(e.type){case"override":return this._doOverride(e.message);case"update":return this._doUpdate();case"highlight":return this._updateHighlights()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this.eventLog=new W,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new A,this._fields=null,this._sourceUpdating=!1,this.featureEffectView=new S}destroy(){this._workerProxy?.destroy(),this._workerAttached.reject(d()),this._commandsQueue.destroy()}initialize(){this._workerAttached=y(),f(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new n("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===E(e)?.operations.supportsQuery)throw new n("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await T(t)}async _attachProxy(){const e={service:await this.layerAdapter.createServiceOptions(this.view),tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON()};let t=[];Array.isArray(e.service.source)&&(t=e.service.source);try{await this._workerProxy.pipeline.onAttach(e,{transferList:t}),this._workerAttached.resolve()}catch(r){this._workerAttached.reject(d()),g(r)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get labelingCollisionInfos(){const e=this.layerAdapter.getLabelingDeconflictionInfo(this.view),t=this.layer.geometryType,r=!this.suspended;return e.map((({vvEvaluators:e,deconflictionEnabled:i})=>({container:this.featureContainer,vvEvaluators:e,deconflictionEnabled:i,geometryType:t,visible:r})))}get layerAdapter(){switch(this.layer.type){case"feature":return"memory"===this.layer.source.type?new H(this.layer):new D(this.layer);case"geojson":case"csv":case"wfs":return new H(this.layer);case"parquet":return new G(this.layer);case"subtype-group":return new B(this.layer);case"ogc-feature":return new N(this.layer);case"stream":return new $(this.layer);case"oriented-imagery":return new J(this.layer);case"knowledge-graph-sublayer":return new M(this.layer);case"catalog-footprint":return new P(this.layer);default:o(this.layer)}return null}get timeExtent(){return k(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}highlight(e,t){let i;e instanceof r?i=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?i=[e]:a.isCollection(e)&&e.length>0?i=e.map((e=>e?.getObjectId())).toArray():Array.isArray(e)&&e.length>0&&(i="number"==typeof e[0]||"string"==typeof e[0]?e:e.map((e=>e?.getObjectId())));const o=i?.filter(s);if(!o?.length)return u();const n=t?.name??ie;return this._addHighlights(o,n),u((()=>!this.destroyed&&this._removeHighlights(o,n)))}async hitTest(e,s){const a=await this.featureContainer.hitTest(s);if(0===a.length)return null;const o=await this.getWorker(),{features:n,aggregates:u,tracks:l}=await o.pipeline.getDisplayFeatures(a),h=this.featureContainer.getSortKeys(a),c=({displayId:e},{displayId:t})=>h.has(e)&&h.has(t)?h.get(e)-h.get(t):e-t;return n.sort(c).reverse(),u.sort(c).reverse(),[...u.map((r=>this._createGraphicHit(e,t.fromJSON(r)))),...l.map((t=>this._createGraphicHit(e,i.fromJSON(t)))),...n.map((t=>this._createGraphicHit(e,r.fromJSON(t))))]}async queryStatistics(){const e=await this.getWorker();return K(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),s,r);return K(a,{})}async queryAggregateSummaryStatistics(e,t,r){const i={...t,scale:this.view.scale},s=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),i,r);return K(s,{})}async queryUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForUniqueValues(this._cleanUpQuery(e),s,r);return K(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),s,r);return K(a,{uniqueValueInfos:[]})}async queryClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForClassBreaks(this._cleanUpQuery(e),s,r);return K(a,{classBreakInfos:[]})}async queryAggregateClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),s,r);return K(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForHistogram(this._cleanUpQuery(e),s,r);return K(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),s,r);return K(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then((e=>{const t=C.fromJSON(e);return t.features.forEach((e=>this._setLayersForFeature(e))),t}))}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),i=await K(r,{features:[]}),s=C.fromJSON(i);return s.features.forEach((e=>this._setLayersForFeature(e))),s}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),i=await K(r,{features:[]}),s=V.fromJSON(i);return s.features.forEach((e=>this._setLayersForFeature(e))),s}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return K(r,[])}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return K(r,0)}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return K(r,{features:[]})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return K(r,{features:[]})}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return K(r,[])}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return K(r,0)}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),i=await K(r,{count:0,extent:null});return{count:i.count,extent:F.fromJSON(i.extent)}}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),i=await K(r,{features:[]});return q.fromJSON(i)}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){if(!this._subscriptionManager)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const t=this._subscriptionManager.update(e.targetState,this._lastTargetState);this.featureContainer.setVisibleTiles(t)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),f(this._updatingHandles.addPromise(this._workerAttached.promise)),f(this._attachProxy()),this.featureContainer=new L(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this._subscriptionManager=new Y({tileInfoView:this.view.featuresTilingScheme,updateSubscriptions:e=>{this.featureContainer.updateSubscriptions(e),f(this._updatingHandles.addPromise(this.getWorker().then((t=>t.pipeline.updateSubscriptions(e)))))},isDone:e=>this.featureContainer.isDone(e)}),this.requestUpdate(),this.addAttachHandles([oe([()=>this._displayRefreshVersion,()=>this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilter?.where||null,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],(()=>this._update())),w((()=>this.updateSuspended),(e=>{e||(this._subscriptionManager.resume(),this.view.labelManager.requestUpdate())})),w((()=>this.visible),(e=>{this.view.labelManager.requestUpdate()}))]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",(e=>this._editUpdatingHandles.addPromise(this._edit(e)))))}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this._subscriptionManager=c(this._subscriptionManager),this._workerProxy.pipeline.onDetach(),this._workerAttached=y(),f(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}isUpdating(){const e="renderer"in this.layer&&null!=this.layer.renderer,t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,i=this.featureContainer.updatingHandles.updating,s=this.updateRequested||e&&(t||r)||i||this._pipelineUpdating||this.dataUpdating;if(has("esri-2d-log-updating")){console.log(`Updating FLV2D (${this.layer.id}): ${s}\n -> updateRequested ${this.updateRequested}\n -> hasRenderer ${e}\n -> updatingRequiredFields ${r}\n -> hasPendingCommand ${t}\n -> dataUpdating ${this.dataUpdating}\n -> processing ${this._pipelineUpdating}\n -> updatingContainer ${i}\n`);for(const e of this.featureContainer.subscriptions())console.log(` -> Tile[${e.id}] Done: ${e.done}`)}return s}_createClientOptions(){const e=this;return{get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.emit(e.name,e.event)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const i of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(i));return r}return Promise.all(t.map((t=>e.view.stage.painter.textureManager.rasterizeItem(t))))},fetchDictionary:e=>Promise.all(e.map((e=>this._fetchDictionaryRequest(e))))}}async _fetchDictionaryRequest(e){try{if("subtype-group"===this.layer.type)throw new Error("InternalError: SubtypeGroupLayer does not support dictionary renderer");const t=this.layer.renderer;if(!t||"dictionary"!==t.type)throw new Error("InternalError: Expected layer to have a DictionaryRenderer");const r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const i={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression};this._fields||(this._fields=this.layer.fields.map((e=>e.toJSON())));const s=r.visualVariableUniforms,a=await t.getSymbolAsync(e.feature,{fields:this._fields});if(!a||!a.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await z(a.data,{uniforms:s,path:"renderer",schemaOptions:i})}}catch(t){return{type:"dictionary-response",meshes:[]}}}_cleanUpQuery(e){const t=Q.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=R.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=Q.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const i of t.aggregateIds??[])r.push(i);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}async _edit(e){if(this.updateSuspended)return void this._subscriptionManager.suspend();const t=this.layer,r=e.historicMoment?.getTime()??null,i="layerId"in t&&e.editedFeatures?.find((e=>e.layerId===t.layerId));if(i&&this._canEditByFeature(i)){const{adds:e,deletes:t,updates:s}=i.editedFeatures,a=this.layer.objectIdField,o=s.map((e=>e.current)),n=t.map((e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e)),u=await this._resolveIdenifiers(n);return this.addOverrides({added:e,updated:o,removed:u,historicMoment:r,isWeak:!0})}const[s,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]),n=[...s,...a];return this._commandsQueue.push({type:"override-by-id",updates:n,removed:o,historicMoment:r,isWeak:!0}).catch(g)}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ae+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ae+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?h.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const i="globalIdField"in this.layer&&this.layer.globalIdField,s=i&&this.availableFields.includes(i);if(r.length&&!s)return h.getLogger(this).error(new n("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${i} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}async addOverrides(e){const t=!1,r=!1,i=X(this.layer.geometryType),s=this.layer.objectIdField,a=[];for(const o of e.added){const e=j(o,i,t,r,s);if(null==e.objectId)throw new n("featurelayerview:bad-override","Feature does not have an objectId",{feature:o});a.push(e)}for(const o of e.updated){const e=j(o,i,t,r,s);if(null==e.objectId)throw new n("featurelayerview:bad-override","Feature does not have an objectId",{feature:o});a.push(e)}for(const o of e.removed)if(null==o)throw new n("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:o});return this._commandsQueue.push({type:"override",updates:a,removed:e.removed,release:[],isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null})}async removeOverrides(e){for(const t of e)if(null==t)throw new n("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:t});return this._commandsQueue.push({type:"override",updates:[],removed:[],release:e,isWeak:!1,historicMoment:null})}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every((e=>this.view.spatialReference.equals(e.geometry?.spatialReference)))&&r.every((e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference)))}async _doUpdate(){"featureReduction"in this.layer&&this.layer.featureReduction&&this.layer.featureReduction!==this._lastFeatureReduction&&(this.layer.featureReduction=this.layer.featureReduction?.clone(),this._lastFeatureReduction=this.layer.featureReduction);try{if(await Promise.allSettled([this._handleChange(),x(this.layer)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this._subscriptionManager)return;const e=this.featureContainer.instanceStore;this.featureContainer.attributeView.lockTextureUploads(),e.updateStart();const t=this.featureEffect,r={store:e,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0},i=await this._createViewSchemaConfig(),s={source:this.layerAdapter.createSourceSchema(i,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(r,i,this._displayRefreshVersion)},a=p(this._lastSchema?.source.mutable,s.source.mutable)||p(this._lastSchema?.processor,s.processor);if(!a)return this.featureContainer.requestRender(),this.featureContainer.attributeView.unlockTextureUploads(),e.updateEnd(),void(this.featureEffectView.featureEffect=t);this._lastSchema=s,this._fields=null;const o=Math.round(performance.now());has("esri-2d-update-debug")&&console.debug(`Id[${this.layer.uid}] Version[${o}] FeatureLayerView2D._doUpdate`,{changes:a});const n=await this.getWorker();await n.pipeline.updateSchema(s,o),e.updateEnd(),this.featureEffectView.featureEffect=t,this.featureEffectView.endTransition(),this.featureContainer.restartAllAnimations(),this.featureContainer.attributeView.unlockTextureUploads(),this.featureContainer.trySwapRenderState(),this.featureContainer.requestRender(),has("esri-2d-update-debug")&&console.debug(`Version[${o}] FeatureLayerView2D.updateEnd`),this.requestUpdate()}catch(e){has("esri-2d-update-debug")&&console.error("Encountered an error during update",e)}}async _doOverride(e){const t=await this.getWorker();try{this.featureContainer.editStart(),await t.pipeline.onOverride(e),this.featureContainer.editEnd()}catch(r){m(r),0}}_getEffectiveAvailableFields(e){const t=se(this._lastAvailableFields,e);return this._lastAvailableFields=t,I(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=[ue(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilter?.where),this.featureEffect?.filter?.toJSON()??null];return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:t,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e}}_processHighlight(){this._commandsQueue.push({type:"highlight"})}async _updateHighlights(){const e=this._getHighlights(),t=await this.getWorker();if(this.destroyed)return;const r=t.pipeline.updateHighlight({highlights:e}).catch((e=>{m(e)||h.getLogger(this).error(e)}));this._updatingHandles.addPromise(r)}_setLayersForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin&&this.layerAdapter.setGraphicOrigin(e)}_createGraphicHit(e,t){return this._setLayersForFeature(t),null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function ue(e,t,r,i,s,a){s&&(s=s.clone());const o=null!=s?s.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(s??=new U,s.timeExtent=n),s=t.addFilters?.(s,e)??s,a&&(s??=new U,s.where=_(s.where,a));let u=s?.toJSON()??null;return i.size&&(u??=(new U).toJSON(),u.hiddenIds=Array.from(i)),u}e([v()],ne.prototype,"_commandsQueue",void 0),e([v()],ne.prototype,"_sourceRefreshVersion",void 0),e([v()],ne.prototype,"_displayRefreshVersion",void 0),e([v({readOnly:!0})],ne.prototype,"_pipelineUpdating",void 0),e([v()],ne.prototype,"_sourceUpdating",void 0),e([v({readOnly:!0})],ne.prototype,"dataUpdating",null),e([v({readOnly:!0})],ne.prototype,"hasAllFeatures",null),e([v({readOnly:!0})],ne.prototype,"hasAllFeaturesInView",null),e([v({readOnly:!0})],ne.prototype,"hasFullGeometries",null),e([v()],ne.prototype,"featureEffectView",void 0),e([v()],ne.prototype,"labelingCollisionInfos",null),e([v()],ne.prototype,"layerAdapter",null),e([v({readOnly:!0})],ne.prototype,"timeExtent",null),e([v()],ne.prototype,"updating",void 0),ne=e([b("esri.views.2d.layers.FeatureLayerView2D")],ne);const le=ne;export{le as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import i from"../../../TrackGraphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import{neverReached as o}from"../../../core/compilerUtils.js";import n from"../../../core/Error.js";import{makeHandle as u,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import h from"../../../core/Logger.js";import{destroyMaybe as c}from"../../../core/maybe.js";import{notDeepEqual as p}from"../../../core/object.js";import{createAbortError as d,createResolver as y,ignoreAbortErrors as f,throwIfNotAbortError as g,isAbortError as m}from"../../../core/promiseUtils.js";import{watch as w}from"../../../core/reactiveUtils.js";import{sqlOr as _,sqlIn as v,sqlAnd as b}from"../../../core/sql.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import{subclass as A}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as S}from"../../../core/support/UpdatingHandles.js";import j from"../../../geometry/Extent.js";import U from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as I}from"../../../layers/graphics/featureConversionUtils.js";import x from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as E}from"../../../layers/support/featureLayerUtils.js";import{packFields as k}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as C}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as V}from"../../../layers/support/timeSupport.js";import q from"../../../rest/support/AggregateFeatureSet.js";import R from"../../../rest/support/AttributeBinsFeatureSet.js";import Q from"../../../rest/support/AttributeBinsQuery.js";import O from"../../../rest/support/FeatureSet.js";import L from"../../../rest/support/Query.js";import{LayerView2DMixin as T}from"./LayerView2D.js";import{FeatureContainer as W}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as D}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as P}from"./features/FeatureSourceEventLog.js";import{CatalogFootprintLayerAdapter as H}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{FeatureLayerAdapter as M}from"./features/layerAdapters/FeatureLayerAdapter.js";import{InMemoryLayerAdapter as N}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as J}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as G}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as $}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as B}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as z}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as Z}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as K}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import X from"./support/FeatureCommandQueue.js";import{handleNoEngineError as Y}from"./support/handleNoEngineError.js";import{toJSONGeometryType as ee}from"./support/util.js";import{FeatureTileSubscriptionManager as te}from"../tiling/FeatureTileSubscriptionManager.js";import re from"../../layers/FeatureLayerView.js";import ie from"../../layers/LayerView.js";import se from"../../layers/RefreshableLayerView.js";import{defaultHighlightName as ae}from"../../support/HighlightDefaults.js";function oe(e,t){const r=new Set;return e&&e.forEach((e=>r.add(e))),t&&t.forEach((e=>r.add(e))),r.has("*")?["*"]:Array.from(r)}const ne=4294967294;function ue(e,t){return l(e.map((e=>w((()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t}),t))))}let le=class extends(re(se(T(ie)))){constructor(){super(...arguments),this._commandsQueue=new X({process:e=>{switch(e.type){case"override":return this._doOverride(e.message);case"update":return this._doUpdate();case"highlight":return this._updateHighlights()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this.eventLog=new P,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new S,this._fields=null,this._sourceUpdating=!1,this.featureEffectView=new U}destroy(){this._workerProxy?.destroy(),this._workerAttached.reject(d()),this._commandsQueue.destroy()}initialize(){this._workerAttached=y(),f(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new n("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===C(e)?.operations.supportsQuery)throw new n("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await D(t)}async _attachProxy(){const e={service:await this.layerAdapter.createServiceOptions(this.view),tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON()};let t=[];Array.isArray(e.service.source)&&(t=e.service.source);try{await this._workerProxy.pipeline.onAttach(e,{transferList:t}),this._workerAttached.resolve()}catch(r){this._workerAttached.reject(d()),g(r)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?_(e,v(this.layer.objectIdField,this.highlightIds)):e}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get labelingCollisionInfos(){const e=this.layerAdapter.getLabelingDeconflictionInfo(this.view),t=this.layer.geometryType,r=!this.suspended;return e.map((({vvEvaluators:e,deconflictionEnabled:i})=>({container:this.featureContainer,vvEvaluators:e,deconflictionEnabled:i,geometryType:t,visible:r})))}get layerAdapter(){switch(this.layer.type){case"feature":return"memory"===this.layer.source.type?new N(this.layer):new M(this.layer);case"geojson":case"csv":case"wfs":return new N(this.layer);case"parquet":return new B(this.layer);case"subtype-group":return new Z(this.layer);case"ogc-feature":return new G(this.layer);case"stream":return new z(this.layer);case"oriented-imagery":return new $(this.layer);case"knowledge-graph-sublayer":return new J(this.layer);case"catalog-footprint":return new H(this.layer);default:o(this.layer)}return null}get timeExtent(){return V(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}highlight(e,t){let i;e instanceof r?i=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?i=[e]:a.isCollection(e)&&e.length>0?i=e.map((e=>e?.getObjectId())).toArray():Array.isArray(e)&&e.length>0&&(i="number"==typeof e[0]||"string"==typeof e[0]?e:e.map((e=>e?.getObjectId())));const o=i?.filter(s);if(!o?.length)return u();const n=t?.name??ae;return this._addHighlights(o,n),u((()=>!this.destroyed&&this._removeHighlights(o,n)))}async hitTest(e,s){const a=await this.featureContainer.hitTest(s);if(0===a.length)return null;const o=await this.getWorker(),{features:n,aggregates:u,tracks:l}=await o.pipeline.getDisplayFeatures(a),h=this.featureContainer.getSortKeys(a),c=({displayId:e},{displayId:t})=>h.has(e)&&h.has(t)?h.get(e)-h.get(t):e-t;return n.sort(c).reverse(),u.sort(c).reverse(),[...u.map((r=>this._createGraphicHit(e,t.fromJSON(r)))),...l.map((t=>this._createGraphicHit(e,i.fromJSON(t)))),...n.map((t=>this._createGraphicHit(e,r.fromJSON(t))))]}async queryStatistics(){const e=await this.getWorker();return Y(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),s,r);return Y(a,{})}async queryAggregateSummaryStatistics(e,t,r){const i={...t,scale:this.view.scale},s=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),i,r);return Y(s,{})}async queryUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForUniqueValues(this._cleanUpQuery(e),s,r);return Y(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),s,r);return Y(a,{uniqueValueInfos:[]})}async queryClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForClassBreaks(this._cleanUpQuery(e),s,r);return Y(a,{classBreakInfos:[]})}async queryAggregateClassBreaks(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),s,r);return Y(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.features.executeQueryForHistogram(this._cleanUpQuery(e),s,r);return Y(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateHistogram(e,t,r){const i=await this.getWorker(),s={...t,scale:this.view.scale},a=i.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),s,r);return Y(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then((e=>{const t=O.fromJSON(e);return t.features.forEach((e=>this._setLayersForFeature(e))),t}))}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),i=await Y(r,{features:[]}),s=O.fromJSON(i);return s.features.forEach((e=>this._setLayersForFeature(e))),s}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),i=await Y(r,{features:[]}),s=q.fromJSON(i);return s.features.forEach((e=>this._setLayersForFeature(e))),s}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return Y(r,[])}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return Y(r,0)}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return Y(r,{features:[]})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return Y(r,{features:[]})}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return Y(r,[])}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return Y(r,0)}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),i=await Y(r,{count:0,extent:null});return{count:i.count,extent:j.fromJSON(i.extent)}}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),i=await Y(r,{features:[]});return R.fromJSON(i)}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){if(!this._subscriptionManager)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const t=this._subscriptionManager.update(e.targetState,this._lastTargetState);this.featureContainer.setVisibleTiles(t)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),f(this._updatingHandles.addPromise(this._workerAttached.promise)),f(this._attachProxy()),this.featureContainer=new W(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this._subscriptionManager=new te({tileInfoView:this.view.featuresTilingScheme,updateSubscriptions:e=>{this.featureContainer.updateSubscriptions(e),f(this._updatingHandles.addPromise(this.getWorker().then((t=>t.pipeline.updateSubscriptions(e)))))},isDone:e=>this.featureContainer.isDone(e)}),this.requestUpdate(),this.addAttachHandles([ue([()=>this._displayRefreshVersion,()=>this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilterClause,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],(()=>this._update())),w((()=>this.updateSuspended),(e=>{e||(this._subscriptionManager.resume(),this.view.labelManager.requestUpdate())})),w((()=>this.visible),(e=>{this.view.labelManager.requestUpdate()}))]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",(e=>this._editUpdatingHandles.addPromise(this._edit(e)))))}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this._subscriptionManager=c(this._subscriptionManager),this._workerProxy.pipeline.onDetach(),this._workerAttached=y(),f(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}isUpdating(){const e="renderer"in this.layer&&null!=this.layer.renderer,t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,i=this.featureContainer.updatingHandles.updating,s=this.updateRequested||e&&(t||r)||i||this._pipelineUpdating||this.dataUpdating;if(has("esri-2d-log-updating")){console.log(`Updating FLV2D (${this.layer.id}): ${s}\n -> updateRequested ${this.updateRequested}\n -> hasRenderer ${e}\n -> updatingRequiredFields ${r}\n -> hasPendingCommand ${t}\n -> dataUpdating ${this.dataUpdating}\n -> processing ${this._pipelineUpdating}\n -> updatingContainer ${i}\n`);for(const e of this.featureContainer.subscriptions())console.log(` -> Tile[${e.id}] Done: ${e.done}`)}return s}_createClientOptions(){const e=this;return{get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.emit(e.name,e.event)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const i of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(i));return r}return Promise.all(t.map((t=>e.view.stage.painter.textureManager.rasterizeItem(t))))},fetchDictionary:e=>Promise.all(e.map((e=>this._fetchDictionaryRequest(e))))}}async _fetchDictionaryRequest(e){try{if("subtype-group"===this.layer.type)throw new Error("InternalError: SubtypeGroupLayer does not support dictionary renderer");const t=this.layer.renderer;if(!t||"dictionary"!==t.type)throw new Error("InternalError: Expected layer to have a DictionaryRenderer");const r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const i={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression};this._fields||(this._fields=this.layer.fields.map((e=>e.toJSON())));const s=r.visualVariableUniforms,a=await t.getSymbolAsync(e.feature,{fields:this._fields});if(!a||!a.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await K(a.data,{uniforms:s,path:"renderer",schemaOptions:i})}}catch(t){return{type:"dictionary-response",meshes:[]}}}_cleanUpQuery(e){const t=L.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=Q.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=L.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const i of t.aggregateIds??[])r.push(i);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}async _edit(e){if(this.updateSuspended)return void this._subscriptionManager.suspend();const t=this.layer,r=e.historicMoment?.getTime()??null,i="layerId"in t&&e.editedFeatures?.find((e=>e.layerId===t.layerId));if(i&&this._canEditByFeature(i)){const{adds:e,deletes:t,updates:s}=i.editedFeatures,a=this.layer.objectIdField,o=s.map((e=>e.current)),n=t.map((e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e)),u=await this._resolveIdenifiers(n);return this.addOverrides({added:e,updated:o,removed:u,historicMoment:r,isWeak:!0})}const[s,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]),n=[...s,...a];return this._commandsQueue.push({type:"override-by-id",updates:n,removed:o,historicMoment:r,isWeak:!0}).catch(g)}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ne+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ne+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?h.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const i="globalIdField"in this.layer&&this.layer.globalIdField,s=i&&this.availableFields.includes(i);if(r.length&&!s)return h.getLogger(this).error(new n("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${i} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}async addOverrides(e){const t=!1,r=!1,i=ee(this.layer.geometryType),s=this.layer.objectIdField,a=[];for(const o of e.added){const e=I(o,i,t,r,s);if(null==e.objectId)throw new n("featurelayerview:bad-override","Feature does not have an objectId",{feature:o});a.push(e)}for(const o of e.updated){const e=I(o,i,t,r,s);if(null==e.objectId)throw new n("featurelayerview:bad-override","Feature does not have an objectId",{feature:o});a.push(e)}for(const o of e.removed)if(null==o)throw new n("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:o});return this._commandsQueue.push({type:"override",updates:a,removed:e.removed,release:[],isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null})}async removeOverrides(e){for(const t of e)if(null==t)throw new n("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:t});return this._commandsQueue.push({type:"override",updates:[],removed:[],release:e,isWeak:!1,historicMoment:null})}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every((e=>this.view.spatialReference.equals(e.geometry?.spatialReference)))&&r.every((e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference)))}async _doUpdate(){"featureReduction"in this.layer&&this.layer.featureReduction&&this.layer.featureReduction!==this._lastFeatureReduction&&(this.layer.featureReduction=this.layer.featureReduction?.clone(),this._lastFeatureReduction=this.layer.featureReduction);try{if(await Promise.allSettled([this._handleChange(),E(this.layer)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this._subscriptionManager)return;const e=this.featureContainer.instanceStore;this.featureContainer.attributeView.lockTextureUploads(),e.updateStart();const t=this.featureEffect,r={store:e,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0},i=await this._createViewSchemaConfig(),s={source:this.layerAdapter.createSourceSchema(i,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(r,i,this._displayRefreshVersion)},a=p(this._lastSchema?.source.mutable,s.source.mutable)||p(this._lastSchema?.processor,s.processor);if(!a)return this.featureContainer.requestRender(),this.featureContainer.attributeView.unlockTextureUploads(),e.updateEnd(),void(this.featureEffectView.featureEffect=t);this._lastSchema=s,this._fields=null;const o=Math.round(performance.now());has("esri-2d-update-debug")&&console.debug(`Id[${this.layer.uid}] Version[${o}] FeatureLayerView2D._doUpdate`,{changes:a});const n=await this.getWorker();await n.pipeline.updateSchema(s,o),e.updateEnd(),this.featureEffectView.featureEffect=t,this.featureEffectView.endTransition(),this.featureContainer.restartAllAnimations(),this.featureContainer.attributeView.unlockTextureUploads(),this.featureContainer.trySwapRenderState(),this.featureContainer.requestRender(),has("esri-2d-update-debug")&&console.debug(`Version[${o}] FeatureLayerView2D.updateEnd`),this.requestUpdate()}catch(e){has("esri-2d-update-debug")&&console.error("Encountered an error during update",e)}}async _doOverride(e){const t=await this.getWorker();try{await t.pipeline.onOverride(e)}catch(r){m(r),0}}_getEffectiveAvailableFields(e){const t=oe(this._lastAvailableFields,e);return this._lastAvailableFields=t,k(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=[he(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilterClause),this.featureEffect?.filter?.toJSON()??null];return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:t,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e}}_processHighlight(){this._commandsQueue.push({type:"highlight"})}async _updateHighlights(){const e=this._getHighlights(),t=await this.getWorker();if(this.destroyed)return;const r=t.pipeline.updateHighlight({highlights:e}).catch((e=>{m(e)||h.getLogger(this).error(e)}));this._updatingHandles.addPromise(r)}_setLayersForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin&&this.layerAdapter.setGraphicOrigin(e)}_createGraphicHit(e,t){return this._setLayersForFeature(t),null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function he(e,t,r,i,s,a){s&&(s=s.clone());const o=null!=s?s.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(s??=new x,s.timeExtent=n),s=t.addFilters?.(s,e)??s,a&&(s??=new x,s.where=b(s.where,a));let u=s?.toJSON()??null;return i.size&&(u??=(new x).toJSON(),u.hiddenIds=Array.from(i)),u}e([F()],le.prototype,"_commandsQueue",void 0),e([F()],le.prototype,"_sourceRefreshVersion",void 0),e([F()],le.prototype,"_displayRefreshVersion",void 0),e([F({readOnly:!0})],le.prototype,"_pipelineUpdating",void 0),e([F()],le.prototype,"_sourceUpdating",void 0),e([F({readOnly:!0})],le.prototype,"dataUpdating",null),e([F({readOnly:!0})],le.prototype,"effectiveDisplayFilterClause",null),e([F({readOnly:!0})],le.prototype,"hasAllFeatures",null),e([F({readOnly:!0})],le.prototype,"hasAllFeaturesInView",null),e([F({readOnly:!0})],le.prototype,"hasFullGeometries",null),e([F()],le.prototype,"featureEffectView",void 0),e([F()],le.prototype,"labelingCollisionInfos",null),e([F()],le.prototype,"layerAdapter",null),e([F({readOnly:!0})],le.prototype,"timeExtent",null),e([F()],le.prototype,"updating",void 0),le=e([A("esri.views.2d.layers.FeatureLayerView2D")],le);const ce=le;export{ce as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import s from"../../../core/Error.js";import r from"../../../core/Logger.js";import{watch as h,syncAndInitial as o,on as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{isLinkChartView as p}from"../../../linkChart/utils.js";import{Container as c}from"../engine/Container.js";import{HighlightCounter as d}from"./support/HighlightCounter.js";import{createOrReuseHighlightGradient as u}from"./support/util.js";import{getDefaultHighlightOptions as g,setDefaultHighlightOptions as m}from"../support/highlightOptionsUtils.js";import f from"../../layers/support/ClipRect.js";import y from"../../layers/support/Geometry.js";import v from"../../layers/support/Path.js";import w from"../../support/HighlightOptions.js";import{isInEffectiveScaleRange as R}from"../../support/layerViewUtils.js";const _=e.ofType({key:"type",base:null,typeMap:{rect:f,path:v,geometry:y}}),S=new(e.ofType(w)),H=f=>{let y=class extends f{constructor(){super(...arguments),this._highlightCounter=new d,this.attached=!1,this.clips=new _,this.highlights=null,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1,this._visibleAtCurrentScale=!0}initialize(){const t=this.view?.spatialReferenceLocked??!0,e=this.view?.spatialReference;e&&t&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new s("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new c),this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([h((()=>this.suspended),(t=>{this.container&&(this.container.visible=!t)}),o),h((()=>this.updateSuspended),(t=>{this.view&&!t&&this.updateRequested&&this.view.requestUpdate()}),o),h((()=>this.layer?.opacity??1),(t=>{this.container&&(this.container.opacity=t)}),o),h((()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal"),(t=>{this.container&&(this.container.blendMode=t)}),o),h((()=>this.layer&&"effect"in this.layer?this.layer.effect:null),(t=>{this.container&&(this.container.effect=t)}),o),h((()=>this._mergedHighlights.items.map((t=>({name:t.name,options:{fillColor:t.color,haloColor:t.haloColor,fillOpacity:t.fillOpacity,haloOpacity:t.haloOpacity,haloWidth:t.haloWidth,haloBlur:t.haloBlur}})))),(()=>{this.container.highlightGradient=u(this.container.highlightGradient,this._mergedHighlights.items)}),o),h((()=>this._mergedHighlights.items.map((t=>t.name))),(()=>{this._processHighlight()})),a((()=>this.clips),"change",(()=>{this.container&&(this.container.clips=this.clips)}),o),h((()=>({scale:this.view?.scale,scaleRange:this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null})),(({scale:t,scaleRange:e})=>{const i=R(e,t);i!==this._visibleAtCurrentScale&&(this._visibleAtCurrentScale=i)}),o)],"constructor"),this.view?.whenLayerView?this.view.whenLayerView(this.layer).then((t=>{t===this&&this.processAttach()}),(()=>{})):this.when().then((()=>{this.processAttach()}),(()=>{})))}destroy(){this.processDetach(),this.updateRequested=!1}get highlightOptions(){return g(this)}set highlightOptions(t){m(this,t)}get _mergedHighlights(){if(!this.view)return S;if(!this.highlights)return this.view.highlights;const t=this.view.highlights.clone();for(const e of this.highlights){const i=t.find((t=>t.name===e.name));i&&i.assignFrom(e)}return t}get scheduler(){return this.view.scheduler}get spatialReferenceSupported(){const t=this.view?.spatialReference;return null==t||this.supportsSpatialReference(t)}get updating(){return this.spatialReferenceSupported&&(!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!!this._updatingHandles?.updating||this.container.transitioning)}get visibleAtCurrentScale(){return this._visibleAtCurrentScale}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.removeHandles("attach"),this.detach(),this.updateRequested=!1)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.updateSuspended||this.view.requestUpdate())}processUpdate(t){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",t),this.updateRequested&&!this.updateSuspended&&(this.updateRequested=!1,this.update(t))):this.updateRequested=!1}hitTest(t,e){return Promise.resolve(null)}supportsSpatialReference(t){return!0}canResume(){if(!this.spatialReferenceSupported)return!1;switch(this.layer?.type){case"link-chart":case"knowledge-graph-sublayer":case"graphics":break;default:if(p(this.view)&&!this.view.inGeographicLayout)return!1}return!!super.canResume()&&this.visibleAtCurrentScale}getSuspendInfo(){const t=super.getSuspendInfo(),e=!this.spatialReferenceSupported;return e&&(t.spatialReferenceNotSupported=e),t}addAttachHandles(t){this.addHandles(t,"attach")}_addHighlights(t,e){this._highlightCounter.addGroup(t,e)&&this._processHighlight()}_removeHighlights(t,e){this._highlightCounter.deleteGroup(t,e)&&this._processHighlight()}_processHighlight(){r.getLogger(`Highlights are not implemented for ${this.layer.type}.`)}_getHighlights(){const t=[];for(const e of this._highlightCounter.ids()){const i=this._highlightCounter.getHighlightNames(e),s=this._getHighlightBits(i);t.push({objectId:e,highlightFlags:s})}return t}_getHighlightBits(t){t=new Set(t);let e=1,i=0;if(!this.view)return 0;const s=this._mergedHighlights;for(const{name:r}of s)t.delete(r)&&(i=e),e<<=1;return i}getHighlightIds(){return Array.from(this._highlightCounter.ids())}hasHighlight(){return!this._highlightCounter.empty}};return t([n()],y.prototype,"attached",void 0),t([n({type:_,set(t){const e=i(t,this._get("clips"),_);this._set("clips",e)}})],y.prototype,"clips",void 0),t([n()],y.prototype,"container",void 0),t([n({type:w})],y.prototype,"highlightOptions",null),t([n({type:e.ofType(w)})],y.prototype,"highlights",void 0),t([n()],y.prototype,"_mergedHighlights",null),t([n()],y.prototype,"moving",void 0),t([n({readOnly:!0})],y.prototype,"spatialReferenceSupported",null),t([n({readOnly:!0})],y.prototype,"updateParameters",void 0),t([n()],y.prototype,"updateRequested",void 0),t([n()],y.prototype,"updating",null),t([n()],y.prototype,"view",void 0),t([n()],y.prototype,"_visibleAtCurrentScale",void 0),t([n({readOnly:!0})],y.prototype,"visibleAtCurrentScale",null),y=t([l("esri.views.2d.layers.LayerView2D")],y),y};export{H as LayerView2DMixin};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import s from"../../../core/Error.js";import r from"../../../core/Logger.js";import{watch as h,syncAndInitial as o,on as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{isLinkChartView as p}from"../../../linkChart/utils.js";import{Container as c}from"../engine/Container.js";import{HighlightCounter as d}from"./support/HighlightCounter.js";import{createOrReuseHighlightGradient as u}from"./support/util.js";import{getDefaultHighlightOptions as g,setDefaultHighlightOptions as m}from"../support/highlightOptionsUtils.js";import f from"../../layers/support/ClipRect.js";import y from"../../layers/support/Geometry.js";import v from"../../layers/support/Path.js";import w from"../../support/HighlightOptions.js";import{isInEffectiveScaleRange as R}from"../../support/layerViewUtils.js";const _=e.ofType({key:"type",base:null,typeMap:{rect:f,path:v,geometry:y}}),S=new(e.ofType(w)),j=f=>{let y=class extends f{constructor(){super(...arguments),this._highlightCounter=new d,this.attached=!1,this.clips=new _,this.highlights=null,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1,this._visibleAtCurrentScale=!0}initialize(){const t=this.view?.spatialReferenceLocked??!0,e=this.view?.spatialReference;e&&t&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new s("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new c),this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([h((()=>this.suspended),(t=>{this.container&&(this.container.visible=!t)}),o),h((()=>this.updateSuspended),(t=>{this.view&&!t&&this.updateRequested&&this.view.requestUpdate()}),o),h((()=>this.layer?.opacity??1),(t=>{this.container&&(this.container.opacity=t)}),o),h((()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal"),(t=>{this.container&&(this.container.blendMode=t)}),o),h((()=>this.layer&&"effect"in this.layer?this.layer.effect:null),(t=>{this.container&&(this.container.effect=t)}),o),h((()=>this._mergedHighlights.items.map((t=>({name:t.name,options:{fillColor:t.color,haloColor:t.haloColor,fillOpacity:t.fillOpacity,haloOpacity:t.haloOpacity,haloWidth:t.haloWidth,haloBlur:t.haloBlur}})))),(()=>{this.container.highlightGradient=u(this.container.highlightGradient,this._mergedHighlights.items)}),o),h((()=>this._mergedHighlights.items.map((t=>t.name))),(()=>{this._processHighlight()})),a((()=>this.clips),"change",(()=>{this.container&&(this.container.clips=this.clips)}),o),h((()=>({scale:this.view?.scale,scaleRange:this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null})),(({scale:t,scaleRange:e})=>{const i=R(e,t);i!==this._visibleAtCurrentScale&&(this._visibleAtCurrentScale=i)}),o)],"constructor"),this.view?.whenLayerView?this.view.whenLayerView(this.layer).then((t=>{t===this&&this.processAttach()}),(()=>{})):this.when().then((()=>{this.processAttach()}),(()=>{})))}destroy(){this.processDetach(),this.updateRequested=!1}get highlightOptions(){return g(this)}set highlightOptions(t){m(this,t)}get hasHighlight(){return this._highlightCounter.size>0}get _mergedHighlights(){if(!this.view)return S;if(!this.highlights)return this.view.highlights;const t=this.view.highlights.clone();for(const e of this.highlights){const i=t.find((t=>t.name===e.name));i&&i.assignFrom(e)}return t}get highlightIds(){return Array.from(this._highlightCounter.objectIds)}get scheduler(){return this.view.scheduler}get spatialReferenceSupported(){const t=this.view?.spatialReference;return null==t||this.supportsSpatialReference(t)}get updating(){return this.spatialReferenceSupported&&(!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!!this._updatingHandles?.updating||this.container.transitioning)}get visibleAtCurrentScale(){return this._visibleAtCurrentScale}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.removeHandles("attach"),this.detach(),this.updateRequested=!1)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.updateSuspended||this.view.requestUpdate())}processUpdate(t){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",t),this.updateRequested&&!this.updateSuspended&&(this.updateRequested=!1,this.update(t))):this.updateRequested=!1}hitTest(t,e){return Promise.resolve(null)}supportsSpatialReference(t){return!0}canResume(){if(!this.spatialReferenceSupported)return!1;switch(this.layer?.type){case"link-chart":case"knowledge-graph-sublayer":case"graphics":break;default:if(p(this.view)&&!this.view.inGeographicLayout)return!1}return!!super.canResume()&&this.visibleAtCurrentScale}getSuspendInfo(){const t=super.getSuspendInfo(),e=!this.spatialReferenceSupported;return e&&(t.spatialReferenceNotSupported=e),t}addAttachHandles(t){this.addHandles(t,"attach")}_addHighlights(t,e){this._highlightCounter.add(t,e)&&this._processHighlight()}_removeHighlights(t,e){this._highlightCounter.delete(t,e)&&this._processHighlight()}_processHighlight(){r.getLogger(`Highlights are not implemented for ${this.layer.type}.`)}_getHighlights(){const t=[];for(const[e,i]of this._highlightCounter.highlightNamesByObjectId){const s=this._getHighlightBits(i);t.push({objectId:e,highlightFlags:s})}return t}_getHighlightBits(t){const e=new Set(t);let i=1,s=0;if(!this.view)return 0;const r=this._mergedHighlights;for(const{name:h}of r)e.delete(h)&&(s=i),i<<=1;return s}};return t([n()],y.prototype,"attached",void 0),t([n({type:_,set(t){const e=i(t,this._get("clips"),_);this._set("clips",e)}})],y.prototype,"clips",void 0),t([n()],y.prototype,"container",void 0),t([n({type:w})],y.prototype,"highlightOptions",null),t([n({type:e.ofType(w)})],y.prototype,"highlights",void 0),t([n()],y.prototype,"_mergedHighlights",null),t([n()],y.prototype,"moving",void 0),t([n({readOnly:!0})],y.prototype,"spatialReferenceSupported",null),t([n({readOnly:!0})],y.prototype,"updateParameters",void 0),t([n()],y.prototype,"updateRequested",void 0),t([n()],y.prototype,"updating",null),t([n()],y.prototype,"view",void 0),t([n()],y.prototype,"_visibleAtCurrentScale",void 0),t([n({readOnly:!0})],y.prototype,"visibleAtCurrentScale",null),y=t([l("esri.views.2d.layers.LayerView2D")],y),y};export{j as LayerView2DMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as i}from"../../../chunks/tslib.es6.js";import e from"../../../Graphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import t from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import{watch as h,on as a,initial as o}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/Error.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as n}from"./LayerView2D.js";import c from"./graphics/GraphicContainer.js";import p from"./graphics/GraphicsView2D.js";import g from"../../layers/LayerView.js";const d="sublayers",u="layerView",f=new Set(["default"]);let m=class extends(n(g)){constructor(){super(...arguments),this._highlightIds=new Map}*graphicsViews(){null==this._graphicsViewsFeatureCollectionMap?null==this._graphicsViews?yield*[]:yield*this._graphicsViews:yield*this._graphicsViewsFeatureCollectionMap.keys()}async hitTest(i,e){return Array.from(this.graphicsViews(),(e=>{const s=e.hitTest(i);if(null!=this._graphicsViewsFeatureCollectionMap){const i=this._graphicsViewsFeatureCollectionMap.get(e);for(const e of s)!e.popupTemplate&&i.popupTemplate&&(e.popupTemplate=i.popupTemplate),e.sourceLayer=e.layer=this.layer}return s})).flat().map((e=>({type:"graphic",graphic:e,layer:this.layer,mapPoint:i})))}highlight(i,h="default"){let a;"number"==typeof i?a=[i]:i instanceof e?a=[i.uid]:Array.isArray(i)&&i.length>0?a="number"==typeof i[0]?i:i.map((i=>i&&i.uid)):t.isCollection(i)&&(a=i.map((i=>i&&i.uid)).toArray());const o=a?.filter(s);return o?.length?(this._addHighlight(o),r((()=>this._removeHighlight(o)))):r()}update(i){for(const e of this.graphicsViews())e.processUpdate(i)}attach(){const i=this.view,e=()=>this.requestUpdate(),s=this.layer.featureCollections;if(null!=s&&s.length){this._graphicsViewsFeatureCollectionMap=new Map;for(const t of s){const s=new c(this.view.featuresTilingScheme),r=new p({view:i,graphics:t.source,renderer:t.renderer,requestUpdateCallback:e,container:s});this._graphicsViewsFeatureCollectionMap.set(r,t),this.container.addChild(r.container),this.addHandles([h((()=>t.visible),(i=>r.container.visible=i),o),h((()=>r.updating),(()=>this.notifyChange("updating")),o)],u)}this._updateHighlight()}else null!=this.layer.sublayers&&this.addHandles(a((()=>this.layer.sublayers),"change",(()=>this._createGraphicsViews()),{onListenerAdd:()=>this._createGraphicsViews(),onListenerRemove:()=>this._destroyGraphicsViews()}),d)}detach(){this._destroyGraphicsViews(),this.removeHandles(d)}moveEnd(){}viewChange(){for(const i of this.graphicsViews())i.viewChange()}isUpdating(){for(const i of this.graphicsViews())if(i.updating)return!0;return!1}_destroyGraphicsViews(){this.container.removeAllChildren(),this.removeHandles(u);for(const i of this.graphicsViews())i.destroy();this._graphicsViews=null,this._graphicsViewsFeatureCollectionMap=null}_createGraphicsViews(){if(this._destroyGraphicsViews(),null==this.layer.sublayers)return;const i=[],e=this.view,s=()=>this.requestUpdate();for(const t of this.layer.sublayers){const r=new c(this.view.featuresTilingScheme);r.fadeTransitionEnabled=!0;const a=new p({view:e,graphics:t.graphics,requestUpdateCallback:s,container:r});this.addHandles([t.on("graphic-update",a.graphicUpdateHandler),h((()=>t.visible),(i=>a.container.visible=i),o),h((()=>a.updating),(()=>this.notifyChange("updating")),o)],u),this.container.addChild(a.container),i.push(a)}this._graphicsViews=i,this._updateHighlight()}_addHighlight(i){for(const e of i)if(this._highlightIds.has(e)){const i=this._highlightIds.get(e);this._highlightIds.set(e,i+1)}else this._highlightIds.set(e,1);this._updateHighlight()}_removeHighlight(i){for(const e of i)if(this._highlightIds.has(e)){const i=this._highlightIds.get(e)-1;0===i?this._highlightIds.delete(e):this._highlightIds.set(e,i)}this._updateHighlight()}_updateHighlight(){const i=Array.from(this._highlightIds.keys()),e=this._getHighlightBits(f);for(const s of this.graphicsViews())s.setHighlight(i.map((i=>({objectId:i,highlightFlags:e}))))}};m=i([l("esri.views.2d.layers.MapNotesLayerView2D")],m);const w=m;export{w as default};
5
+ import{_ as i}from"../../../chunks/tslib.es6.js";import e from"../../../Graphic.js";import{isSome as s}from"../../../core/arrayUtils.js";import t from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import{watch as h,on as a,initial as o}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/Error.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as n}from"./LayerView2D.js";import c from"./graphics/GraphicContainer.js";import p from"./graphics/GraphicsView2D.js";import g from"../../layers/LayerView.js";const d="sublayers",u="layerView",f=new Set(["default"]);let m=class extends(n(g)){constructor(){super(...arguments),this._highlightIds=new Map}*graphicsViews(){null==this._graphicsViewsFeatureCollectionMap?null==this._graphicsViews?yield*[]:yield*this._graphicsViews:yield*this._graphicsViewsFeatureCollectionMap.keys()}async hitTest(i,e){return Array.from(this.graphicsViews(),(e=>{const s=e.hitTest(i);if(null!=this._graphicsViewsFeatureCollectionMap){const i=this._graphicsViewsFeatureCollectionMap.get(e);for(const e of s)!e.popupTemplate&&i.popupTemplate&&(e.popupTemplate=i.popupTemplate),e.sourceLayer=e.layer=this.layer}return s})).flat().map((e=>({type:"graphic",graphic:e,layer:this.layer,mapPoint:i})))}highlight(i,h="default"){let a;"number"==typeof i?a=[i]:i instanceof e?a=[i.uid]:Array.isArray(i)&&i.length>0?a="number"==typeof i[0]?i:i.map((i=>i&&i.uid)):t.isCollection(i)&&(a=i.map((i=>i&&i.uid)).toArray());const o=a?.filter(s);return o?.length?(this._addHighlight(o),r((()=>this._removeHighlight(o)))):r()}update(i){for(const e of this.graphicsViews())e.processUpdate(i)}attach(){const i=this.view,e=()=>this.requestUpdate(),s=this.layer.featureCollections;if(null!=s&&s.length){this._graphicsViewsFeatureCollectionMap=new Map;for(const t of s){const s=new c(this.view.featuresTilingScheme),r=new p({view:i,graphics:t.source,renderer:t.renderer,requestUpdateCallback:e,container:s});this._graphicsViewsFeatureCollectionMap.set(r,t),this.container.addChild(r.container),this.addHandles([h((()=>t.visible),(i=>r.container.visible=i),o),h((()=>r.updating),(()=>this.notifyChange("updating")),o)],u)}this._updateHighlight()}else null!=this.layer.sublayers&&this.addHandles(a((()=>this.layer.sublayers),"change",(()=>this._createGraphicsViews()),{onListenerAdd:()=>this._createGraphicsViews(),onListenerRemove:()=>this._destroyGraphicsViews()}),d)}detach(){this._destroyGraphicsViews(),this.removeHandles(d)}moveEnd(){}viewChange(){for(const i of this.graphicsViews())i.viewChange()}isUpdating(){for(const i of this.graphicsViews())if(i.updating)return!0;return!1}_destroyGraphicsViews(){this.container.removeAllChildren(),this.removeHandles(u);for(const i of this.graphicsViews())i.destroy();this._graphicsViews=null,this._graphicsViewsFeatureCollectionMap=null}_createGraphicsViews(){if(this._destroyGraphicsViews(),null==this.layer.sublayers)return;const i=[],e=this.view,s=()=>this.requestUpdate();for(const t of this.layer.sublayers){const r=new c(this.view.featuresTilingScheme);r.fadeTransitionEnabled=!0;const a=new p({view:e,graphics:t.graphics,requestUpdateCallback:s,container:r});this.addHandles([t.on("graphic-update",a.graphicUpdateHandler),h((()=>t.visible),(i=>a.container.visible=i),o),h((()=>a.updating),(()=>this.notifyChange("updating")),o)],u),this.container.addChild(a.container),i.push(a)}this._graphicsViews=i,this._updateHighlight()}_addHighlight(i){for(const e of i)if(this._highlightIds.has(e)){const i=this._highlightIds.get(e);this._highlightIds.set(e,i+1)}else this._highlightIds.set(e,1);this._updateHighlight()}_removeHighlight(i){for(const e of i)if(this._highlightIds.has(e)){const i=this._highlightIds.get(e)-1;0===i?this._highlightIds.delete(e):this._highlightIds.set(e,i)}this._updateHighlight()}_updateHighlight(){const i=Array.from(this._highlightIds.keys()),e=this._getHighlightBits(f.values());for(const s of this.graphicsViews())s.setHighlight(i.map((i=>({objectId:i,highlightFlags:e}))))}};m=i([l("esri.views.2d.layers.MapNotesLayerView2D")],m);const w=m;export{w as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import{isSome as e}from"../../../core/arrayUtils.js";import i from"../../../core/Collection.js";import r from"../../../core/CollectionFlattener.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{watch as o,initial as a,syncAndInitial as n}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../rest/support/DirectionLine.js";import l from"../../../rest/support/DirectionPoint.js";import d from"../../../rest/support/PointBarrier.js";import u from"../../../rest/support/PolygonBarrier.js";import g from"../../../rest/support/PolylineBarrier.js";import _ from"../../../rest/support/RouteInfo.js";import m from"../../../rest/support/Stop.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import y from"./graphics/GraphicContainer.js";import f from"./graphics/GraphicsView2D.js";import I from"../../layers/LayerView.js";const v=["route-info","direction-line","direction-point","polygon-barrier","polyline-barrier","point-barrier","stop"],k={graphic:null,property:null,oldValue:null,newValue:null};function j(t){return t instanceof c||t instanceof l||t instanceof d||t instanceof u||t instanceof g||t instanceof _||t instanceof m}function M(t){return i.isCollection(t)&&t.length&&j(t.at(0))}function V(t){return Array.isArray(t)&&t.length>0&&j(t[0])}const F=new Set(["default"]);let G=class extends(w(I)){constructor(){super(...arguments),this._graphics=new i,this._highlightIds=new Map,this._networkFeatureMap=new Map,this._networkGraphicMap=new Map,this._interaction=null,this._loadInteractionPromise=null,this.interactive=!1}get _routeItems(){return new r({getCollections:()=>null==this.layer||this.destroyed?[]:[null!=this.layer.routeInfo?new i([this.layer.routeInfo]):null,this.layer.directionLines,this.layer.directionPoints,this.layer.polygonBarriers,this.layer.polylineBarriers,this.layer.pointBarriers,this.layer.stops]})}initialize(){this.addHandles(o((()=>{const{interactive:t,suspended:e}=this;return{interactive:t,suspended:e}}),(({interactive:t,suspended:e})=>{const i=t&&!e;i&&this._getInteractionLoadPromise().then((t=>{t.enabled=this.interactive&&!this.suspended})),this._interaction&&(this._interaction.enabled=i)}),n)),this._updatingHandles.addOnCollectionChange((()=>this._routeItems),(t=>this._routeItemsChanged(t)),a)}destroy(){this._networkFeatureMap.clear(),this._networkGraphicMap.clear(),this._graphics.removeAll(),this._get("_routeItems")?.destroy()}attach(){this._createGraphicsView()}detach(){this._destroyGraphicsView()}get selectedNetworkFeatures(){return this._interaction?.selectedNetworkFeatures??null}async create(t){if(!this.interactive)return;return(await this._getInteractionLoadPromise()).create(t)}delete(){this._interaction?.delete()}async fetchPopupFeaturesAtLocation(t,e){return this._graphicsView.hitTest(t).filter((({popupTemplate:t})=>!!t))}highlight(t){let i;i=j(t)?[this._getNetworkFeatureUid(t)]:V(t)?t.map((t=>this._getNetworkFeatureUid(t))):M(t)?t.map((t=>this._getNetworkFeatureUid(t))).toArray():[t.uid];const r=i.filter(e);return r.length?(this._addHighlight(r),s((()=>this._removeHighlight(r)))):s()}async hitTest(t,i){if(this.suspended)return null;const r=this._graphicsView.hitTest(t).filter(e).map((t=>this._networkGraphicMap.get(t)));if(!r.length)return null;const{layer:s}=this;return r.reverse().map((e=>({type:"route",layer:s,mapPoint:t,networkFeature:e})))}isUpdating(){return this._graphicsView.updating}moveEnd(){}update(t){this._graphicsView.processUpdate(t)}viewChange(){this._graphicsView.viewChange()}_addHighlight(t){for(const e of t)if(this._highlightIds.has(e)){const t=this._highlightIds.get(e);this._highlightIds.set(e,t+1)}else this._highlightIds.set(e,1);this._updateHighlight()}_createGraphic(t){const e=t.toGraphic();return e.layer=this.layer,e.sourceLayer=this.layer,e}_createGraphicsView(){const t=this.view,e=()=>this.requestUpdate(),i=new y(t.featuresTilingScheme);this._graphicsView=new f({container:i,graphics:this._graphics,requestUpdateCallback:e,view:t}),this.container.addChild(i),this._updateHighlight()}_destroyGraphicsView(){this.container.removeChild(this._graphicsView.container),this._graphicsView.destroy()}_getDrawOrder(t){const e=this._networkGraphicMap.get(t);return v.indexOf(e.type)}_getInteractionLoadPromise(){return this._loadInteractionPromise||(this._loadInteractionPromise=this._loadInteraction(),this._updatingHandles.addPromise(this._loadInteractionPromise)),this._loadInteractionPromise}_getNetworkFeatureUid(t){return this._networkFeatureMap.has(t)?this._networkFeatureMap.get(t).uid:null}async _loadInteraction(){const{layer:t,view:e}=this,{RouteLayerInteraction:i}=await import("./support/RouteLayerInteraction.js");return this._interaction=new i({view:e,layer:t}),this._interaction}_removeHighlight(t){for(const e of t)if(this._highlightIds.has(e)){const t=this._highlightIds.get(e)-1;0===t?this._highlightIds.delete(e):this._highlightIds.set(e,t)}this._updateHighlight()}_routeItemsChanged(t){if(t.removed.length){this._graphics.removeMany(t.removed.map((t=>{const e=this._networkFeatureMap.get(t);return this._networkFeatureMap.delete(t),this._networkGraphicMap.delete(e),e})));for(const e of t.removed)this.removeHandles(e)}if(t.added.length){this._graphics.addMany(t.added.map((t=>{const e=this._createGraphic(t);return null==e.symbol?null:(this._networkFeatureMap.set(t,e),this._networkGraphicMap.set(e,t),e)})).filter(e));for(const e of t.added)this.addHandles([o((()=>e.geometry),((t,i)=>{this._updateGraphic(e,"geometry",t,i)})),o((()=>e.symbol),((t,i)=>{this._updateGraphic(e,"symbol",t,i)}))],e);this._graphics.sort(((t,e)=>this._getDrawOrder(t)-this._getDrawOrder(e)))}}_updateGraphic(t,e,i,r){if(!this._networkFeatureMap.has(t)){const e=this._createGraphic(t);return this._networkFeatureMap.set(t,e),this._networkGraphicMap.set(e,t),void this._graphics.add(e)}const s=this._networkFeatureMap.get(t);s[e]=i,k.graphic=s,k.property=e,k.oldValue=r,k.newValue=i,this._graphicsView.graphicUpdateHandler(k)}_updateHighlight(){const t=Array.from(this._highlightIds.keys()),e=this._getHighlightBits(F);this._graphicsView.setHighlight(t.map((t=>({objectId:t,highlightFlags:e}))))}};t([h()],G.prototype,"_graphics",void 0),t([h()],G.prototype,"_routeItems",null),t([h()],G.prototype,"_interaction",void 0),t([h()],G.prototype,"interactive",void 0),t([h({readOnly:!0})],G.prototype,"selectedNetworkFeatures",null),G=t([p("esri.views.2d.layers.RouteLayerView2D")],G);const H=G;export{H as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{isSome as e}from"../../../core/arrayUtils.js";import i from"../../../core/Collection.js";import r from"../../../core/CollectionFlattener.js";import{makeHandle as s}from"../../../core/handleUtils.js";import{watch as o,initial as a,syncAndInitial as n}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../rest/support/DirectionLine.js";import l from"../../../rest/support/DirectionPoint.js";import d from"../../../rest/support/PointBarrier.js";import u from"../../../rest/support/PolygonBarrier.js";import g from"../../../rest/support/PolylineBarrier.js";import _ from"../../../rest/support/RouteInfo.js";import m from"../../../rest/support/Stop.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import y from"./graphics/GraphicContainer.js";import f from"./graphics/GraphicsView2D.js";import I from"../../layers/LayerView.js";const v=["route-info","direction-line","direction-point","polygon-barrier","polyline-barrier","point-barrier","stop"],k={graphic:null,property:null,oldValue:null,newValue:null};function j(t){return t instanceof c||t instanceof l||t instanceof d||t instanceof u||t instanceof g||t instanceof _||t instanceof m}function M(t){return i.isCollection(t)&&t.length&&j(t.at(0))}function V(t){return Array.isArray(t)&&t.length>0&&j(t[0])}const F=new Set(["default"]);let G=class extends(w(I)){constructor(){super(...arguments),this._graphics=new i,this._highlightIds=new Map,this._networkFeatureMap=new Map,this._networkGraphicMap=new Map,this._interaction=null,this._loadInteractionPromise=null,this.interactive=!1}get _routeItems(){return new r({getCollections:()=>null==this.layer||this.destroyed?[]:[null!=this.layer.routeInfo?new i([this.layer.routeInfo]):null,this.layer.directionLines,this.layer.directionPoints,this.layer.polygonBarriers,this.layer.polylineBarriers,this.layer.pointBarriers,this.layer.stops]})}initialize(){this.addHandles(o((()=>{const{interactive:t,suspended:e}=this;return{interactive:t,suspended:e}}),(({interactive:t,suspended:e})=>{const i=t&&!e;i&&this._getInteractionLoadPromise().then((t=>{t.enabled=this.interactive&&!this.suspended})),this._interaction&&(this._interaction.enabled=i)}),n)),this._updatingHandles.addOnCollectionChange((()=>this._routeItems),(t=>this._routeItemsChanged(t)),a)}destroy(){this._networkFeatureMap.clear(),this._networkGraphicMap.clear(),this._graphics.removeAll(),this._get("_routeItems")?.destroy()}attach(){this._createGraphicsView()}detach(){this._destroyGraphicsView()}get selectedNetworkFeatures(){return this._interaction?.selectedNetworkFeatures??null}async create(t){if(!this.interactive)return;return(await this._getInteractionLoadPromise()).create(t)}delete(){this._interaction?.delete()}async fetchPopupFeaturesAtLocation(t,e){return this._graphicsView.hitTest(t).filter((({popupTemplate:t})=>!!t))}highlight(t){let i;i=j(t)?[this._getNetworkFeatureUid(t)]:V(t)?t.map((t=>this._getNetworkFeatureUid(t))):M(t)?t.map((t=>this._getNetworkFeatureUid(t))).toArray():[t.uid];const r=i.filter(e);return r.length?(this._addHighlight(r),s((()=>this._removeHighlight(r)))):s()}async hitTest(t,i){if(this.suspended)return null;const r=this._graphicsView.hitTest(t).filter(e).map((t=>this._networkGraphicMap.get(t)));if(!r.length)return null;const{layer:s}=this;return r.reverse().map((e=>({type:"route",layer:s,mapPoint:t,networkFeature:e})))}isUpdating(){return this._graphicsView.updating}moveEnd(){}update(t){this._graphicsView.processUpdate(t)}viewChange(){this._graphicsView.viewChange()}_addHighlight(t){for(const e of t)if(this._highlightIds.has(e)){const t=this._highlightIds.get(e);this._highlightIds.set(e,t+1)}else this._highlightIds.set(e,1);this._updateHighlight()}_createGraphic(t){const e=t.toGraphic();return e.layer=this.layer,e.sourceLayer=this.layer,e}_createGraphicsView(){const t=this.view,e=()=>this.requestUpdate(),i=new y(t.featuresTilingScheme);this._graphicsView=new f({container:i,graphics:this._graphics,requestUpdateCallback:e,view:t}),this.container.addChild(i),this._updateHighlight()}_destroyGraphicsView(){this.container.removeChild(this._graphicsView.container),this._graphicsView.destroy()}_getDrawOrder(t){const e=this._networkGraphicMap.get(t);return v.indexOf(e.type)}_getInteractionLoadPromise(){return this._loadInteractionPromise||(this._loadInteractionPromise=this._loadInteraction(),this._updatingHandles.addPromise(this._loadInteractionPromise)),this._loadInteractionPromise}_getNetworkFeatureUid(t){return this._networkFeatureMap.has(t)?this._networkFeatureMap.get(t).uid:null}async _loadInteraction(){const{layer:t,view:e}=this,{RouteLayerInteraction:i}=await import("./support/RouteLayerInteraction.js");return this._interaction=new i({view:e,layer:t}),this._interaction}_removeHighlight(t){for(const e of t)if(this._highlightIds.has(e)){const t=this._highlightIds.get(e)-1;0===t?this._highlightIds.delete(e):this._highlightIds.set(e,t)}this._updateHighlight()}_routeItemsChanged(t){if(t.removed.length){this._graphics.removeMany(t.removed.map((t=>{const e=this._networkFeatureMap.get(t);return this._networkFeatureMap.delete(t),this._networkGraphicMap.delete(e),e})));for(const e of t.removed)this.removeHandles(e)}if(t.added.length){this._graphics.addMany(t.added.map((t=>{const e=this._createGraphic(t);return null==e.symbol?null:(this._networkFeatureMap.set(t,e),this._networkGraphicMap.set(e,t),e)})).filter(e));for(const e of t.added)this.addHandles([o((()=>e.geometry),((t,i)=>{this._updateGraphic(e,"geometry",t,i)})),o((()=>e.symbol),((t,i)=>{this._updateGraphic(e,"symbol",t,i)}))],e);this._graphics.sort(((t,e)=>this._getDrawOrder(t)-this._getDrawOrder(e)))}}_updateGraphic(t,e,i,r){if(!this._networkFeatureMap.has(t)){const e=this._createGraphic(t);return this._networkFeatureMap.set(t,e),this._networkGraphicMap.set(e,t),void this._graphics.add(e)}const s=this._networkFeatureMap.get(t);s[e]=i,k.graphic=s,k.property=e,k.oldValue=r,k.newValue=i,this._graphicsView.graphicUpdateHandler(k)}_updateHighlight(){const t=Array.from(this._highlightIds.keys()),e=this._getHighlightBits(F.values());this._graphicsView.setHighlight(t.map((t=>({objectId:t,highlightFlags:e}))))}};t([h()],G.prototype,"_graphics",void 0),t([h()],G.prototype,"_routeItems",null),t([h()],G.prototype,"_interaction",void 0),t([h()],G.prototype,"interactive",void 0),t([h({readOnly:!0})],G.prototype,"selectedNetworkFeatures",null),G=t([p("esri.views.2d.layers.RouteLayerView2D")],G);const H=G;export{H as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import{throwIfAborted as e,createResolver as t}from"../../../../core/promiseUtils.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as r}from"../../engine/AFeatureContainer.js";import{WGLDrawPhase as i,FeatureSelection as n,FeatureBatchingStrategy as a}from"../../engine/webgl/enums.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as h}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{TechniqueType as d}from"../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{RenderState as l}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";class c{constructor(e,s){this.id=e,this.version=s,this._resolver=t(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class p extends r{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new s,this._hitTestsRequests=[],this._store=new o,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._renderState){const e=Array.from(this._renderState.tiles()).filter((e=>e.needsUpload));if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this.requestRender())}for(const t of this.children)t.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case i.MAP:return this._renderMapPhase(e);case i.HIGHLIGHT:return this._renderHighlightPhase(e);case i.LABEL:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get _instanceStore(){return this._store}get instanceStore(){return this._store}get layerView(){return this._layerView}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight()}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&h.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(_(t))return t;return null}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter((e=>this._visibleTiles.has(e.key.id))):[]}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&this._layerView.view.labelManager.requestUpdate()}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe)if(this._subscriptions.has(t))this._subscriptions.get(t).version=s;else{const e=new c(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise)}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new l((()=>this._stage),(e=>this._subscriptions.get(e)?.version),e,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}editStart(){this._renderState?.lockUploads(),this.attributeView.lockTextureUploads(),this._lockStatisticUpdates=!0}editEnd(){this._renderState?.unlockUploads(),this.attributeView.unlockTextureUploads(),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){this._renderStateNext&&(has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`),this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush(),this._renderStateNext=null),this.requestRender()}setVisibleTiles(e){this._visibleTiles=e}async onMessage(t,s){e(s);const r=t.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(t),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let s=this._hitTestsRequests.find((({x:t,y:s})=>t===e.x&&s===e.y));const r=t();return s?s.resolvers.push(r):(s={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(s)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach(((e,t)=>s.set(t,e))),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=h.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,n.All),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&u(e,!1,(e=>{this._renderFeatures(e,n.Highlight)}))}_renderLabelPhase(e){this._renderFeatures(e,n.All)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,n.InsideEffect),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,n.OutsideEffect),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),a=t.getViewport(),o=e.passOptions,h=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=i.HITTEST;const{distance:d,smallSymbolDistance:l}=e.passOptions,u=Math.max(d,l);for(const i of this.children)i.visible&&i.containsScreenPoint(e.state,e.passOptions.position,2*u)&&this._renderTile(i,e,n.All);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(a),e.passOptions=o,e.drawPhase=h}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,d.Heatmap);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?a.STRICT_ORDER:has("featurelayer-force-marker-text-draw-order")?a.STRICT_MARKERS_AND_TEXT:a.BATCHING,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function _(e){return e.techniqueRef.type===d.Heatmap}export{p as FeatureContainer};
5
+ import has from"../../../../core/has.js";import{throwIfAborted as e,createResolver as t}from"../../../../core/promiseUtils.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as r}from"../../engine/AFeatureContainer.js";import{WGLDrawPhase as i,FeatureSelection as n,FeatureBatchingStrategy as a}from"../../engine/webgl/enums.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as h}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{TechniqueType as d}from"../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{RenderState as l}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";class c{constructor(e,s){this.id=e,this.version=s,this._resolver=t(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class _ extends r{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new s,this._hitTestsRequests=[],this._store=new o,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._renderState){const e=Array.from(this._renderState.tiles()).filter((e=>e.needsUpload));if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this.requestRender())}for(const t of this.children)t.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case i.MAP:return this._renderMapPhase(e);case i.HIGHLIGHT:return this._renderHighlightPhase(e);case i.LABEL:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get _instanceStore(){return this._store}get instanceStore(){return this._store}get layerView(){return this._layerView}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&h.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(p(t))return t;return null}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter((e=>this._visibleTiles.has(e.key.id))):[]}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&this._layerView.view.labelManager.requestUpdate()}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe)if(this._subscriptions.has(t))this._subscriptions.get(t).version=s;else{const e=new c(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise)}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new l((()=>this._stage),(e=>this._subscriptions.get(e)?.version),e,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){this._renderStateNext&&(has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`),this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush(),this._renderStateNext=null),this.requestRender()}setVisibleTiles(e){this._visibleTiles=e}async onMessage(t,s){e(s);const r=t.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(t),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let s=this._hitTestsRequests.find((({x:t,y:s})=>t===e.x&&s===e.y));const r=t();return s?s.resolvers.push(r):(s={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(s)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach(((e,t)=>s.set(t,e))),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=h.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,n.All),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&u(e,!1,(e=>{this._renderFeatures(e,n.Highlight)}))}_renderLabelPhase(e){this._renderFeatures(e,n.All)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,n.InsideEffect),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,n.OutsideEffect),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),a=t.getViewport(),o=e.passOptions,h=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=i.HITTEST;const{distance:d,smallSymbolDistance:l}=e.passOptions,u=Math.max(d,l);for(const i of this.children)i.visible&&i.containsScreenPoint(e.state,e.passOptions.position,2*u)&&this._renderTile(i,e,n.All);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(a),e.passOptions=o,e.drawPhase=h}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,d.Heatmap);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?a.STRICT_ORDER:has("featurelayer-force-marker-text-draw-order")?a.STRICT_MARKERS_AND_TEXT:a.BATCHING,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function p(e){return e.techniqueRef.type===d.Heatmap}export{_ as FeatureContainer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Error.js";import{handlesGroup as t}from"../../../../core/handleUtils.js";import has from"../../../../core/has.js";import{nextTick as s}from"../../../../core/nextTick.js";import{throwIfNotAbortError as i,createResolver as r,ignoreAbortErrors as o}from"../../../../core/promiseUtils.js";import n from"../../../../core/RandomLCG.js";import{watch as u}from"../../../../core/reactiveUtils.js";import{pt2px as a}from"../../../../core/screenUtils.js";import{ignoreConnectionErrors as d}from"../../../../core/workers/utils.js";import c from"../../../../layers/support/TileInfo.js";import p from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{tileSize as h}from"../../engine/webgl/definitions.js";import{PipelineConnectionHandlers as l}from"./PipelineConnectionHandlers.js";import g from"./Processor.js";import{FeatureSource as _}from"./sources/FeatureSource.js";import{FeatureTileSubscription as b}from"./sources/FeatureTileSubscription.js";import{Tile as f}from"./support/Tile.js";class m{constructor(e){this.inner=e,this.resolver=r()}}class y{constructor(){this._aggregateAdapter={getFeatureObjectIds:e=>this._processor.getFeatureObjectIdsForAggregate(e)},this._subscriptions=new Map,this._updateRequested=!1,this._didSourceRefresh=!1,this._updateSubscriptionRequests=[],this._updateHighlightRequests=[]}destroy(){this._subscriptions.clear(),this._processor?.destroy(),this._source?.destroy(),this._handles?.remove(),this._updateOverridesRequest=null,this._tileInfoView=null}onAttach(e){has("esri-2d-update-debug")&&console.debug("Pipeline.onAttach");const s=this._connection,i=c.fromJSON(e.tileInfoJSON);this._tileInfoView=new p(i),this._source=new _(e.service,this._aggregateAdapter,this._subscriptions,s),this._processor=new g(s,this._source),this._handles=t([this._source.store.events.on("changed",(()=>this._requestUpdate())),this._source.store.events.on("refresh",(()=>this._requestRefresh())),u((()=>this._source.updateTracking.updating),(()=>{this._requestUpdate(),o(this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}))}))])}onDetach(){has("esri-2d-update-debug")&&console.debug("Pipeline.onDetach"),this.destroy()}set remoteClient(e){this._connection=new l(e)}get features(){const t=this._source?.queryEngine;if(!t)throw new e("no-queryEngine","No query engine defined");return t}get aggregates(){const t=this._processor?.aggregateQueryEngine;if(!t)throw new e("no-queryEngine","No aggregate query engine defined");return t}get processor(){return this._processor}get streamMessenger(){return this._source.streamMessenger}getDisplayFeatures(e){return this._processor.getDisplayFeatures(e)}getDisplayIds(e){return this._processor.getDisplayIds(e)}getObjectIdsFromGlobalIds(e){return this._source.getObjectIdsFromGlobalIds(e)}async updateSchema(e,t){return has("esri-2d-update-debug")&&this._updateSchemaRequest&&console.error("InternalError: Schema already updating"),this._updateSchemaRequest=new m({schema:e,version:t}),this._requestUpdate(),this._updateSchemaRequest.resolver.promise}updateSubscriptions(e){const t=new m(e);return this._updateSubscriptionRequests.push(t),this._requestUpdate(),t.resolver.promise}updateHighlight(e){const t=new m(e);return this._updateHighlightRequests.push(t),this._requestUpdate(),t.resolver.promise}async addParquetFile(e){return this._source.addParquetFile(e)}async onOverride(t){if(null!=this._updateOverridesRequest)throw new e("InternalError - Already processing an edit");this._updateOverridesRequest=new m(t);const s=this._updateOverridesRequest.resolver.promise;return this._requestUpdate(),s}queryStatistics(){return this._source.statistics.toJSON()}async queryVisibleFeatures(e,t){return this.features.executeQuery(e,t)}async queryHeatmapStatistics(e){const t=Math.round(a(e.radius));let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const r="string"==typeof e.fieldOffset,o=e.fieldOffset??0,n=Array.from(this._subscriptions.values()),u=this._source.chunks(),d=t**2,c=3/(Math.PI*d),p=2*t,l=Math.ceil(h/p);for(const a of n){const t=a.tile,n=new Float64Array(l*l);for(const s of u){const i=s.getTileReader(t);if(!i)continue;const u=i.getCursor();for(;u.next();){let t=1;if(null!=e.field){const s=u.readAttribute(e.field);t=r?-1*+s:+s+o}const s=u.readXForDisplay()/p,i=u.readYForDisplay()/p,a=Math.floor(s),h=Math.floor(i);if(a<0||h<0||a>=l||h>=l)continue;const g=((.5+a-s)*p)**2+((.5+h-i)*p)**2;if(g>d)continue;const _=t*(c*(1-g/d)**2);n[h+a*l]+=_}}for(let e=0;e<n.length;e++)s=Math.min(s,n[e]),i=Math.max(i,n[e])}return{max:i,min:s}}async getSampleFeatures(e){const t=this._source.chunks();if(t.reduce(((e,t)=>e+t.size()),0)<=e.minFeatureCount){if(!this._source.updateTracking.updating){const e=[];return this._source.store.forEachUnsafe((t=>e.push(t.readLegacyFeatureWorldSpace()))),e}return null}const s=new Set,i=[],r=t.map((e=>e.reader.getCursor())),o=new n,u=3*e.sampleSize;for(let n=0;n<u&&i.length<e.sampleSize;n++){const e=r[o.getIntRange(0,t.length-1)];if(0===e.getSize())continue;const n=o.getIntRange(0,e.getSize()-1);e.setIndex(n);const u=e.getObjectId();s.has(u)||(s.add(u),i.push(e.readLegacyFeatureWorldSpace()))}return i.length>=e.sampleSize?i:null}_requestUpdate(){this._updateRequested||(this._updateRequested=!0,s((()=>this._scheduleNextUpdate())))}_requestRefresh(){this._didSourceRefresh=!0,this._requestUpdate()}_scheduleNextUpdate(){this._updateRequested&&(this._ongoingUpdate||(this._ongoingUpdate=d(this._doUpdate()).finally((()=>{this._ongoingUpdate=null,this._scheduleNextUpdate()})),this._updateRequested=!1))}_subscribe(e){const t=e.tileId;if(this._subscriptions.has(t))return;has("esri-2d-update-debug")&&console.debug(`Tile[${t}] Pipeline.subscribe`);const s=new f(this._tileInfoView,t),i=new b(s,e.version);this._subscriptions.set(t,i),this._source.onSubscribe(i),this._processor.onSubscribe(i)}_unsubscribe(e){const t=this._subscriptions.get(e);t&&(has("esri-2d-update-debug")&&console.debug(`Tile[${e}] Pipeline.unsubscribe`),t.abort(),this._source.onUnsubscribe(t),this._processor.onUnsubscribe(t),this._subscriptions.delete(t.key.id))}async _doUpdate(){if(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateStart"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}),this._updateSubscriptionRequests.length){const e=this._updateSubscriptionRequests;this._updateSubscriptionRequests=[];for(const t of e)this._doUpdateSubscriptions(t.inner),t.resolver.resolve()}const e=this._updateSchemaRequest;this._updateSchemaRequest=null;let t=!1;if(null!=e){const{schema:s,version:i}=e.inner;t=await this._doUpdateSchema(s,i)}this._didSourceRefresh&&(t=!0,this._didSourceRefresh=!1),t&&(this._processor.invalidate(),await this._connection.container.updateRenderState(this._processor.version));const s=this._updateOverridesRequest;if(this._updateOverridesRequest=null,null!=s){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverride",s.inner);const e=await this._source.normalizeOverrides(s.inner);null!=e.historicMoment&&this._source.unsafeSetQueryHistoricMoment(e.historicMoment),this._source.applyOverride(e),has("esri-2d-update-debug")&&console.debug("Pipeline.endOverride",s.inner)}if(this._updateHighlightRequests.length){const e=this._updateHighlightRequests;this._updateHighlightRequests=[];for(const t of e)this._processor.updateHighlight(t.inner),t.resolver.resolve()}const r=this._source.cleanupRemovedChunks();this._processor.removeChunks(r);try{const e=this._source.takeOverrideUpdate();null!=e&&this._subscriptions.size&&(has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesStart"),await this._processor.applyOverrideUpdate(e),has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesEnd")),this._subscriptions.size&&(has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksStart"),await this._processor.updateChunks(),has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksEnd"))}catch(o){i(o)}null!=s&&s.resolver.resolve(),null!=e&&e.resolver.resolve(),null==e&&t&&await this._connection.container.trySwapRenderState(),this._updateRequested?(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=true]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0})):(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=false, After flush]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:this._updateRequested}))}async _doUpdateSchema(e,t){has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateStart`,{schema:e});const s={tileInfo:this._tileInfoView?.tileInfo},i=await this._source.update(e,t),r=Array.from(this._subscriptions.values()),o=this._processor.update(e,t,s,i,r);return has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateEnd`),o}_doUpdateSubscriptions(e){has("esri-2d-update-debug")&&console.debug("Pipeline.updateSubscriptions",e);for(const t of e.subscribe)this._subscribe(t);for(const t of e.unsubscribe)this._unsubscribe(t)}}export{y as default};
5
+ import e from"../../../../core/Error.js";import{handlesGroup as t}from"../../../../core/handleUtils.js";import has from"../../../../core/has.js";import{nextTick as s}from"../../../../core/nextTick.js";import{throwIfNotAbortError as i,createResolver as r,ignoreAbortErrors as o}from"../../../../core/promiseUtils.js";import n from"../../../../core/RandomLCG.js";import{watch as u}from"../../../../core/reactiveUtils.js";import{pt2px as a}from"../../../../core/screenUtils.js";import{ignoreConnectionErrors as d}from"../../../../core/workers/utils.js";import c from"../../../../layers/support/TileInfo.js";import p from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{tileSize as h}from"../../engine/webgl/definitions.js";import{PipelineConnectionHandlers as l}from"./PipelineConnectionHandlers.js";import g from"./Processor.js";import{FeatureSource as _}from"./sources/FeatureSource.js";import{FeatureTileSubscription as b}from"./sources/FeatureTileSubscription.js";import{Tile as f}from"./support/Tile.js";class m{constructor(e){this.inner=e,this.resolver=r()}}class y{constructor(){this._aggregateAdapter={getFeatureObjectIds:e=>this._processor.getFeatureObjectIdsForAggregate(e)},this._subscriptions=new Map,this._updateRequested=!1,this._didSourceRefresh=!1,this._updateSubscriptionRequests=[],this._updateHighlightRequests=[]}destroy(){this._subscriptions.clear(),this._processor?.destroy(),this._source?.destroy(),this._handles?.remove(),this._updateOverridesRequest=null,this._tileInfoView=null}onAttach(e){has("esri-2d-update-debug")&&console.debug("Pipeline.onAttach");const s=this._connection,i=c.fromJSON(e.tileInfoJSON);this._tileInfoView=new p(i),this._source=new _(e.service,this._aggregateAdapter,this._subscriptions,s),this._processor=new g(s,this._source),this._handles=t([this._source.store.events.on("changed",(()=>this._requestUpdate())),this._source.store.events.on("refresh",(()=>this._requestRefresh())),u((()=>this._source.updateTracking.updating),(()=>{this._requestUpdate(),o(this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}))}))])}onDetach(){has("esri-2d-update-debug")&&console.debug("Pipeline.onDetach"),this.destroy()}set remoteClient(e){this._connection=new l(e)}get features(){const t=this._source?.queryEngine;if(!t)throw new e("no-queryEngine","No query engine defined");return t}get aggregates(){const t=this._processor?.aggregateQueryEngine;if(!t)throw new e("no-queryEngine","No aggregate query engine defined");return t}get processor(){return this._processor}get streamMessenger(){return this._source.streamMessenger}getDisplayFeatures(e){return this._processor.getDisplayFeatures(e)}getDisplayIds(e){return this._processor.getDisplayIds(e)}getObjectIdsFromGlobalIds(e){return this._source.getObjectIdsFromGlobalIds(e)}async updateSchema(e,t){return has("esri-2d-update-debug")&&this._updateSchemaRequest&&console.error("InternalError: Schema already updating"),this._updateSchemaRequest=new m({schema:e,version:t}),this._requestUpdate(),this._updateSchemaRequest.resolver.promise}updateSubscriptions(e){const t=new m(e);return this._updateSubscriptionRequests.push(t),this._requestUpdate(),t.resolver.promise}updateHighlight(e){const t=new m(e);return this._updateHighlightRequests.push(t),this._requestUpdate(),t.resolver.promise}async addParquetFile(e){return this._source.addParquetFile(e)}async onOverride(t){if(null!=this._updateOverridesRequest)throw new e("InternalError - Already processing an edit");this._updateOverridesRequest=new m(t);const s=this._updateOverridesRequest.resolver.promise;return this._requestUpdate(),s}queryStatistics(){return this._source.statistics.toJSON()}async queryVisibleFeatures(e,t){return this.features.executeQuery(e,t)}async queryHeatmapStatistics(e){const t=Math.round(a(e.radius));let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const r="string"==typeof e.fieldOffset,o=e.fieldOffset??0,n=Array.from(this._subscriptions.values()),u=this._source.chunks(),d=t**2,c=3/(Math.PI*d),p=2*t,l=Math.ceil(h/p);for(const a of n){const t=a.tile,n=new Float64Array(l*l);for(const s of u){const i=s.getTileReader(t);if(!i)continue;const u=i.getCursor();for(;u.next();){let t=1;if(null!=e.field){const s=u.readAttribute(e.field);t=r?-1*+s:+s+o}const s=u.readXForDisplay()/p,i=u.readYForDisplay()/p,a=Math.floor(s),h=Math.floor(i);if(a<0||h<0||a>=l||h>=l)continue;const g=((.5+a-s)*p)**2+((.5+h-i)*p)**2;if(g>d)continue;const _=t*(c*(1-g/d)**2);n[h+a*l]+=_}}for(let e=0;e<n.length;e++)s=Math.min(s,n[e]),i=Math.max(i,n[e])}return{max:i,min:s}}async getSampleFeatures(e){const t=this._source.chunks();if(t.reduce(((e,t)=>e+t.size()),0)<=e.minFeatureCount){if(!this._source.updateTracking.updating){const e=[];return this._source.store.forEachUnsafe((t=>e.push(t.readLegacyFeatureWorldSpace()))),e}return null}const s=new Set,i=[],r=t.map((e=>e.reader.getCursor())),o=new n,u=3*e.sampleSize;for(let n=0;n<u&&i.length<e.sampleSize;n++){const e=r[o.getIntRange(0,t.length-1)];if(0===e.getSize())continue;const n=o.getIntRange(0,e.getSize()-1);e.setIndex(n);const u=e.getObjectId();s.has(u)||(s.add(u),i.push(e.readLegacyFeatureWorldSpace()))}return i.length>=e.sampleSize?i:null}_requestUpdate(){this._updateRequested||(this._updateRequested=!0,s((()=>this._scheduleNextUpdate())))}_requestRefresh(){this._didSourceRefresh=!0,this._requestUpdate()}_scheduleNextUpdate(){this._updateRequested&&(this._ongoingUpdate||(this._ongoingUpdate=d(this._doUpdate()).finally((()=>{this._ongoingUpdate=null,this._scheduleNextUpdate()})),this._updateRequested=!1))}_subscribe(e){const t=e.tileId;if(this._subscriptions.has(t))return;has("esri-2d-update-debug")&&console.debug(`Tile[${t}] Pipeline.subscribe`);const s=new f(this._tileInfoView,t),i=new b(s,e.version);this._subscriptions.set(t,i),this._source.onSubscribe(i),this._processor.onSubscribe(i)}_unsubscribe(e){const t=this._subscriptions.get(e);t&&(has("esri-2d-update-debug")&&console.debug(`Tile[${e}] Pipeline.unsubscribe`),t.abort(),this._source.onUnsubscribe(t),this._processor.onUnsubscribe(t),this._subscriptions.delete(t.key.id))}async _doUpdate(){if(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateStart"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}),this._updateSubscriptionRequests.length){const e=this._updateSubscriptionRequests;this._updateSubscriptionRequests=[];for(const t of e)this._doUpdateSubscriptions(t.inner),t.resolver.resolve()}const e=this._updateSchemaRequest;this._updateSchemaRequest=null;let t=!1;if(null!=e){const{schema:s,version:i}=e.inner;t=await this._doUpdateSchema(s,i)}this._didSourceRefresh&&(t=!0,this._didSourceRefresh=!1),t&&(this._processor.invalidate(),await this._connection.container.updateRenderState(this._processor.version));const s=this._updateOverridesRequest;if(this._updateOverridesRequest=null,null!=s){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverride",s.inner);const e=await this._source.normalizeOverrides(s.inner);null!=e.historicMoment&&this._source.unsafeSetQueryHistoricMoment(e.historicMoment),this._source.applyOverride(e),has("esri-2d-update-debug")&&console.debug("Pipeline.endOverride",s.inner)}if(this._updateHighlightRequests.length){const e=this._updateHighlightRequests;this._updateHighlightRequests=[];for(const t of e)this._processor.updateHighlight(t.inner),t.resolver.resolve()}const r=this._source.cleanup();this._processor.removeChunks(r);try{const e=this._source.takeOverrideUpdate();if(null!=e&&this._subscriptions.size){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesStart"),await this._connection.container.lockForOverrides();try{await this._processor.applyOverrideUpdate(e)}catch(o){has("esri-2d-update-debug")&&console.debug("InternalError",o)}await this._connection.container.unlockForOverrides(),has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesEnd")}this._subscriptions.size&&(has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksStart"),await this._processor.updateChunks(),has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksEnd"))}catch(o){i(o)}null!=s&&s.resolver.resolve(),null!=e&&e.resolver.resolve(),null==e&&t&&await this._connection.container.trySwapRenderState(),this._updateRequested?(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=true]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0})):(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=false, After flush]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:this._updateRequested}))}async _doUpdateSchema(e,t){has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateStart`,{schema:e});const s={tileInfo:this._tileInfoView?.tileInfo},i=await this._source.update(e,t),r=Array.from(this._subscriptions.values()),o=this._processor.update(e,t,s,i,r);return has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateEnd`),o}_doUpdateSubscriptions(e){has("esri-2d-update-debug")&&console.debug("Pipeline.updateSubscriptions",e);for(const t of e.subscribe)this._subscribe(t);for(const t of e.unsubscribe)this._unsubscribe(t)}}export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- class t{getObjectId(t){return t.getObjectId()}getAttributes(t){return t.readAttributes()}getAttribute(t,e){return t.readAttribute(e)}getAttributeAsTimestamp(t,e){return t.readAttributeAsTimestamp(e)}cloneWithGeometry(t,e){return t}getGeometry(t){return t.readGeometryWorldSpace()}getCentroid(t,e){return t.readCentroidForDisplay()}}t.Shared=new t;export{t as FeatureStoreQueryAdapter};
5
+ class t{static{this.Shared=new t}getObjectId(t){return t.getObjectId()}getAttributes(t){return t.readAttributes()}getAttribute(t,e){return t.readAttribute(e)}getAttributeAsTimestamp(t,e){return t.readAttributeAsTimestamp(e)}cloneWithGeometry(t,e){return t}getGeometry(t){return t.readGeometryWorldSpace()}getCentroid(t,e){return t.readCentroidForDisplay()}}export{t as FeatureStoreQueryAdapter};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../request.js";import has from"../../../../../core/has.js";import{ignoreAbortErrors as t,throwIfNotAbortError as s}from"../../../../../core/promiseUtils.js";import{diff as r,hasRootDiffOnly as a,hasRootDiff as i}from"../../../../../core/accessorSupport/diffUtils.js";import{OptimizedFeature as n}from"../../../../../layers/graphics/OptimizedFeature.js";import{QueryEngine as o}from"../../../../../layers/graphics/data/QueryEngine.js";import{executeQueryForCount as d}from"../../../../../rest/query/operations/query.js";import{FeatureStoreStatistics as h}from"../FeatureStoreStatistics.js";import{FeatureSourceQueryInfo as u}from"./FeatureSourceQueryInfo.js";import{StreamMessenger as c}from"./StreamMessenger.js";import{DrillDownTileLoadStrategy as m}from"./strategies/DrillDownTileLoadStrategy.js";import{PagedTileLoadStrategy as p}from"./strategies/PagedTileLoadStrategy.js";import{ParquetLoadStrategy as l}from"./strategies/ParquetLoadStrategy.js";import{SnapshotLoadStrategy as y}from"./strategies/SnapshotLoadStrategy.js";import{StreamLoadStrategy as _}from"./strategies/StreamLoadStrategy.js";import{FeatureSourceChunkStore as g}from"./strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as f}from"../support/FeatureMetadata.js";import{UpdateTracking2D as v}from"../../support/UpdateTracking2D.js";class S{constructor(e,t,s,r){this.service=e,this._aggregateAdapter=t,this._subscriptions=s,this._connection=r,this._updateTracking=new v({debugName:"FeatureSource"}),this._didInvalidateData=!1,this._metadata=f.createFeature(e.metadata),this._store=new g(this._metadata)}destroy(){this._strategy?.destroy(),this._store.destroy(),this._streamMessenger?.destroy(),"memory"===this.service.type&&this.service.source.map((e=>e.close()))}get metadata(){if(!this._metadata)throw new Error("InternalError: Metadata not defined. Was update called?");return this._metadata}get store(){return this._store}get streamMessenger(){return null==this._streamMessenger&&this._initStreamMessenger(),this._streamMessenger}get statistics(){return h.from(this._store)}get updateTracking(){return this._updateTracking}get queryEngine(){if(!this._queryEngine){if(!this._schema)return null;const{dataFilter:e}=this._schema.mutable,t=this._schema.mutable.availableFields,s=this._metadata;this._queryEngine=new o({featureStore:this._store,fieldsIndex:s.fieldsIndex,geometryType:s.geometryType,objectIdField:s.objectIdField,hasM:!1,hasZ:!1,spatialReference:this.service.outSpatialReference,aggregateAdapter:this._aggregateAdapter,timeInfo:s.timeInfo,definitionExpression:e.definitionExpression,availableFields:t})}return this._queryEngine}get isStream(){return"stream"===this._schema.type}chunks(){return Array.from(this._store.chunks())}cleanupRemovedChunks(){return this._store.cleanupRemovedChunks()}onSubscribe(e){this._connection.onEvent({type:"subscribe",tile:e.tile.id});const t=this._strategy?.load(e);t&&(t.then((()=>this._connection.onEvent({type:"loaded",tile:e.tile.id}))).catch((t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t}))),this._updateTracking.addPromise(t))}onResume(e){this._updateTracking.addPromise(t(this._strategy?.load(e)))}onUnsubscribe(e){this._connection.onEvent({type:"unsubscribe",tile:e.tile.id}),this._strategy?.unload(e)}applyOverride(e){this._didInvalidateData=!0,this._store.applyOverride(e)}takeOverrideUpdate(){return this._store.takeOverrideUpdate()}async update(e,t){const s=e.source,n=r(this._schema?.mutable,s.mutable);if(!n)return!1;if(has("esri-2d-update-debug")&&console.debug(`Version[${t}] FeatureSource.update`,{changes:n}),this._schema=s,this._queryEngine?.destroy(),this._queryEngine=null,"feature-service"===this.service.type&&null!=this.service.queryMetadata.lastEditDate&&(this._lastEditDate=this.service.queryMetadata.lastEditDate),null==this._streamMessenger&&"stream"===this._schema.type&&this._initStreamMessenger(),a(n,"sourceRefreshVersion")&&this._strategy?.refresh)return await this._strategy.refresh(),!0;if(("feature"===s.type||"parquet"===s.type)&&a(n,"availableFields")){if(await this._queryLastEditDateChanged()||this._didInvalidateData)this._didInvalidateData=!1,await this._updateStrategy(t);else{this._connection.onEvent({type:"updateFieldsStart"});try{await this._strategy.updateFields(s.mutable.availableFields),this._connection.onEvent({type:"updateFieldsEnd"})}catch(o){this._connection.onEvent({type:"updateFieldsError",error:o})}}return!1}return!!(i(n,"dataFilter")||i(n,"sourceRefreshVersion")||this._strategy.about.supportsDisplayFilter&&i(n,"displayFilter"))&&(await this._updateStrategy(t),!0)}async addParquetFile(e){this._strategy.addParquetFile(e)}unsafeSetQueryHistoricMoment(e){"feature"===this._schema.type&&(this._schema.mutable.dataFilter.historicMoment=e,this._strategy.unsafeSetQueryHistoricMoment(new Date(e)))}_initStreamMessenger(){null==this._streamMessenger&&(this._streamMessenger=new c(this._connection))}async normalizeOverrides(e){const t={historicMoment:e.historicMoment,commands:{updateWeak:e.commands.updateWeak.map(n.fromJSON),removeWeak:e.commands.removeWeak,update:e.commands.update.map(n.fromJSON),remove:e.commands.remove,release:e.commands.release}},s=e.commands.updateByIdWeak,r=await this._queryOptimizedFeatures(s);return t.commands.updateWeak.push(...r),t}async _queryOptimizedFeatures(e){if(0===e.length)return[];const t=[],s=(await this._strategy.queryByObjectId(e)).getCursor();for(;s.next();)t.push(s.readOptimizedFeatureWorldSpace());return t}getObjectIdsFromGlobalIds(e){const t=new Set(e),s=this.metadata.globalIdField;if(null==s)throw new Error("InternalError: Recieved an edit with globalIds, but not supported by the service");const r=[];return this._store.forEachUnsafe((e=>{const a=e.readAttribute(s);if(t.has(a)){const t=e.getObjectId();null!=t&&r.push(t)}})),r}async _queryLastEditDateChanged(){if(null==this._lastEditDate)return!1;const t=this.service.source,s={...t.query,f:"json"},r=(await e(t.path,{query:s,responseType:"json"})).data.editingInfo.lastEditDate;return r!==this._lastEditDate&&(this._lastEditDate=r,!0)}async _createStrategy(){const e="isSourceHosted"in this.service&&this.service.isSourceHosted,t=Array.isArray(this.service.source),s=this.service.source&&"collection"in this.service.source,r=e||t||s;if("stream"===this._schema.type){const e=new _(this.service,this._schema.mutable.dataFilter,this._store,{outSR:this.service.outSpatialReference},this.metadata);return this._streamMessenger.strategy=e,e}if("parquet"===this._schema.type){const e=this.service;return new l(e,this._metadata,this._schema,this._store)}const a=this.service,i=u.fromSchema(a,this._schema,this._metadata),n=await this._supportSnapshotMode(a,i);return n?new y(a,i,this._store,n.featureCount,this.metadata,this._connection):r?new p(a,i,this._store,this.metadata,this._connection):new m(a,i,this._store,this.metadata,this._connection)}async _updateStrategy(e){const t=await this._createStrategy();this._connection.onEvent({type:"updateStrategyStart",about:t.about});const r=!!this._strategy;this._store.clear(),this._strategy?.destroy(),this._strategy=t,has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategy`,{strategy:t});const a=Array.from(this._subscriptions.values());if(!a.length)return void this._connection.onEvent({type:"updateStrategyEnd"});const i=Promise.all(a.map((e=>this._strategy.load(e).then((()=>this._connection.onEvent({type:"loaded",tile:e.tile.id}))).catch((t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t}))))));this._updateTracking.addPromise(i);try{r&&await i}catch(n){s(n)}this._connection.onEvent({type:"updateStrategyEnd"}),has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategyEnd`,{strategy:t})}async _supportSnapshotMode(e,t){const{queryMetadata:s}=e,r=s.snapshotInfo;if(!r||!r.supportsSnapshotMinThreshold||!r.snapshotCountThresholds)return null;const a=e.source,i=t.createQuery();i.inner.orderByFields=[],i.inner.returnGeometry=!1;const n=(await d(a,i.inner,{query:i.customParameters})).data.count,{min:o,max:h}=r.snapshotCountThresholds;return n<=o||r.supportsSnapshotMaxThreshold&&n<h?{featureCount:n}:null}}export{S as FeatureSource};
5
+ import e from"../../../../../request.js";import has from"../../../../../core/has.js";import{ignoreAbortErrors as t,throwIfNotAbortError as s}from"../../../../../core/promiseUtils.js";import{diff as r,hasRootDiffOnly as a,hasRootDiff as i}from"../../../../../core/accessorSupport/diffUtils.js";import{OptimizedFeature as n}from"../../../../../layers/graphics/OptimizedFeature.js";import{QueryEngine as o}from"../../../../../layers/graphics/data/QueryEngine.js";import{executeQueryForCount as d}from"../../../../../rest/query/operations/query.js";import{FeatureStoreStatistics as h}from"../FeatureStoreStatistics.js";import{FeatureSourceQueryInfo as u}from"./FeatureSourceQueryInfo.js";import{StreamMessenger as c}from"./StreamMessenger.js";import{DrillDownTileLoadStrategy as m}from"./strategies/DrillDownTileLoadStrategy.js";import{PagedTileLoadStrategy as p}from"./strategies/PagedTileLoadStrategy.js";import{ParquetLoadStrategy as l}from"./strategies/ParquetLoadStrategy.js";import{SnapshotLoadStrategy as y}from"./strategies/SnapshotLoadStrategy.js";import{StreamLoadStrategy as _}from"./strategies/StreamLoadStrategy.js";import{FeatureSourceChunkStore as g}from"./strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as f}from"../support/FeatureMetadata.js";import{UpdateTracking2D as S}from"../../support/UpdateTracking2D.js";class v{constructor(e,t,s,r){this.service=e,this._aggregateAdapter=t,this._subscriptions=s,this._connection=r,this._updateTracking=new S({debugName:"FeatureSource"}),this._didInvalidateData=!1,this._metadata=f.createFeature(e.metadata),this._store=new g(this._metadata)}destroy(){this._strategy?.destroy(),this._store.destroy(),this._streamMessenger?.destroy(),"memory"===this.service.type&&this.service.source.map((e=>e.close()))}get metadata(){if(!this._metadata)throw new Error("InternalError: Metadata not defined. Was update called?");return this._metadata}get store(){return this._store}get streamMessenger(){return null==this._streamMessenger&&this._initStreamMessenger(),this._streamMessenger}get statistics(){return h.from(this._store)}get updateTracking(){return this._updateTracking}get queryEngine(){if(!this._queryEngine){if(!this._schema)return null;const{dataFilter:e}=this._schema.mutable,t=this._schema.mutable.availableFields,s=this._metadata;this._queryEngine=new o({featureStore:this._store,fieldsIndex:s.fieldsIndex,geometryType:s.geometryType,objectIdField:s.objectIdField,hasM:!1,hasZ:!1,spatialReference:this.service.outSpatialReference,aggregateAdapter:this._aggregateAdapter,timeInfo:s.timeInfo,definitionExpression:e.definitionExpression,availableFields:t})}return this._queryEngine}get isStream(){return"stream"===this._schema.type}chunks(){return Array.from(this._store.chunks())}cleanup(){return this._store.cleanup()}onSubscribe(e){this._connection.onEvent({type:"subscribe",tile:e.tile.id});const t=this._strategy?.load(e);t&&(t.then((()=>this._connection.onEvent({type:"loaded",tile:e.tile.id}))).catch((t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t}))),this._updateTracking.addPromise(t))}onResume(e){this._updateTracking.addPromise(t(this._strategy?.load(e)))}onUnsubscribe(e){this._connection.onEvent({type:"unsubscribe",tile:e.tile.id}),this._strategy?.unload(e)}applyOverride(e){this._didInvalidateData=!0,this._store.applyOverride(e)}takeOverrideUpdate(){return this._store.takeOverrideUpdate()}async update(e,t){const s=e.source,n=r(this._schema?.mutable,s.mutable);if(!n)return!1;if(has("esri-2d-update-debug")&&console.debug(`Version[${t}] FeatureSource.update`,{changes:n}),this._schema=s,this._queryEngine?.destroy(),this._queryEngine=null,"feature-service"===this.service.type&&null!=this.service.queryMetadata.lastEditDate&&(this._lastEditDate=this.service.queryMetadata.lastEditDate),null==this._streamMessenger&&"stream"===this._schema.type&&this._initStreamMessenger(),a(n,"sourceRefreshVersion")&&this._strategy?.refresh)return await this._strategy.refresh(),!0;if(("feature"===s.type||"parquet"===s.type)&&a(n,"availableFields")){if(await this._queryLastEditDateChanged()||this._didInvalidateData)this._didInvalidateData=!1,await this._updateStrategy(t);else{this._connection.onEvent({type:"updateFieldsStart"});try{await this._strategy.updateFields(s.mutable.availableFields),this._connection.onEvent({type:"updateFieldsEnd"})}catch(o){this._connection.onEvent({type:"updateFieldsError",error:o})}}return!1}return!!(i(n,"dataFilter")||i(n,"sourceRefreshVersion")||this._strategy.about.supportsDisplayFilter&&i(n,"displayFilter"))&&(await this._updateStrategy(t),!0)}async addParquetFile(e){this._strategy.addParquetFile(e)}unsafeSetQueryHistoricMoment(e){"feature"===this._schema.type&&(this._schema.mutable.dataFilter.historicMoment=e,this._strategy.unsafeSetQueryHistoricMoment(new Date(e)))}_initStreamMessenger(){null==this._streamMessenger&&(this._streamMessenger=new c(this._connection))}async normalizeOverrides(e){const t={historicMoment:e.historicMoment,commands:{updateWeak:e.commands.updateWeak.map(n.fromJSON),removeWeak:e.commands.removeWeak,update:e.commands.update.map(n.fromJSON),remove:e.commands.remove,release:e.commands.release}},s=e.commands.updateByIdWeak,r=await this._queryOptimizedFeatures(s);return t.commands.updateWeak.push(...r),t}async _queryOptimizedFeatures(e){if(0===e.length)return[];const t=[],s=(await this._strategy.queryByObjectId(e)).getCursor();for(;s.next();)t.push(s.readOptimizedFeatureWorldSpace());return t}getObjectIdsFromGlobalIds(e){const t=new Set(e),s=this.metadata.globalIdField;if(null==s)throw new Error("InternalError: Recieved an edit with globalIds, but not supported by the service");const r=[];return this._store.forEachUnsafe((e=>{const a=e.readAttribute(s);if(t.has(a)){const t=e.getObjectId();null!=t&&r.push(t)}})),r}async _queryLastEditDateChanged(){if(null==this._lastEditDate)return!1;const t=this.service.source,s={...t.query,f:"json"},r=(await e(t.path,{query:s,responseType:"json"})).data.editingInfo.lastEditDate;return r!==this._lastEditDate&&(this._lastEditDate=r,!0)}async _createStrategy(){const e="isSourceHosted"in this.service&&this.service.isSourceHosted,t=Array.isArray(this.service.source),s=this.service.source&&"collection"in this.service.source,r=e||t||s;if("stream"===this._schema.type){const e=new _(this.service,this._schema.mutable.dataFilter,this._store,{outSR:this.service.outSpatialReference},this.metadata);return this._streamMessenger.strategy=e,e}if("parquet"===this._schema.type){const e=this.service;return new l(e,this._metadata,this._schema,this._store)}const a=this.service,i=u.fromSchema(a,this._schema,this._metadata),n=await this._supportSnapshotMode(a,i);return n?new y(a,i,this._store,n.featureCount,this.metadata,this._connection):r?new p(a,i,this._store,this.metadata,this._connection):new m(a,i,this._store,this.metadata,this._connection)}async _updateStrategy(e){const t=await this._createStrategy();this._connection.onEvent({type:"updateStrategyStart",about:t.about});const r=!!this._strategy;this._store.clear(),this._strategy?.destroy(),this._strategy=t,has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategy`,{strategy:t});const a=Array.from(this._subscriptions.values());if(!a.length)return void this._connection.onEvent({type:"updateStrategyEnd"});const i=Promise.all(a.map((e=>this._strategy.load(e).then((()=>this._connection.onEvent({type:"loaded",tile:e.tile.id}))).catch((t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t}))))));this._updateTracking.addPromise(i);try{r&&await i}catch(n){s(n)}this._connection.onEvent({type:"updateStrategyEnd"}),has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureSource.updateStrategyEnd`,{strategy:t})}async _supportSnapshotMode(e,t){const{queryMetadata:s}=e,r=s.snapshotInfo;if(!r||!r.supportsSnapshotMinThreshold||!r.snapshotCountThresholds)return null;const a=e.source,i=t.createQuery();i.inner.orderByFields=[],i.inner.returnGeometry=!1;const n=(await d(a,i.inner,{query:i.customParameters})).data.count,{min:o,max:h}=r.snapshotCountThresholds;return n<=o||r.supportsSnapshotMaxThreshold&&n<h?{featureCount:n}:null}}export{v as FeatureSource};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ASourceChunk as e}from"./ASourceChunk.js";import{FeatureSetReaderJSON as t}from"../../../support/FeatureSetReaderJSON.js";class s{constructor(){this.modified=[],this.removed=[]}modify(e){this.modified.push(e)}remove(e){this.removed.push(e)}get isEmpty(){return 0===this.modified.length&&0===this.removed.length}}class r extends e{constructor(e){super(),this._reader=e,this.chunkId="override",this.normalizedChunkId="override"}static fromFeatures(e,s){const i=t.fromOptimizedFeatures(e,s);return new r(i)}get reader(){return this._reader}get queryInfo(){return{}}get first(){return!1}get end(){return!1}get isTiled(){return!1}getTileReader(e){if(!this._reader.getSize())return null;const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}class i{constructor(e,t){this.inner=e,this.isWeak=t,this.lastWeak=null}}class o{constructor(){this._overrides=new Map,this._update=new s}hasOverride(e){return this._overrides.has(e)}onChunkInsert(e){if(this._overrides.size){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId(),s=this._overrides.get(e);s?.lastWeak&&(s.lastWeak=null),s?.isWeak&&(this._overrides.delete(e),this._update.remove(e),this.invalidate())}}e.registerOverrides(this)}apply(e,t){const{updateWeak:s,removeWeak:r,update:o,remove:n,release:d}=e.commands;this.invalidate();for(const a of s)this._overrides.set(a.objectId,new i(a,!0)),this._update.modify(a);for(const a of o){const e=new i(a,!1),t=this._overrides.get(a.objectId);t?.isWeak&&(e.lastWeak=t),this._overrides.set(a.objectId,e),this._update.modify(a)}for(const a of r)this._overrides.set(a,new i(null,!0)),this._update.remove(a);for(const a of n){const e=new i(null,!1),t=this._overrides.get(a);t?.isWeak&&(e.lastWeak=t),this._overrides.set(a,e),this._update.remove(a)}if(d.length){const e=new Set;for(const t of d){const s=this._overrides.get(t);s?.lastWeak?this._overrides.set(t,s.lastWeak):s&&!s.isWeak&&(this._overrides.delete(t),e.add(t))}t.forEachUnsafe((t=>{const s=t.getObjectId();e.has(s)&&(this._update.modify(t.readOptimizedFeatureWorldSpace()),e.delete(s))}));for(const t of e.values())this._update.remove(t)}}takeOverrideUpdate(){const e=this._update;return e.isEmpty?null:(this._update=new s,e)}asChunk(e){if(!this._chunk){const t=[];for(const e of this._overrides.values())null!=e.inner&&t.push(e.inner);this._chunk=r.fromFeatures(t,e)}return this._chunk}invalidate(){this._chunk=null}}export{r as OverrideChunk,o as OverrideState,s as OverrideUpdate};
5
+ import{ASourceChunk as e}from"./ASourceChunk.js";import{FeatureSetReaderJSON as t}from"../../../support/FeatureSetReaderJSON.js";const s=1e4,r=1e3;class i{constructor(){this.modified=[],this.removed=[]}modify(e){this.modified.push(e)}remove(e){this.removed.push(e)}get isEmpty(){return 0===this.modified.length&&0===this.removed.length}}class o extends e{constructor(e){super(),this._reader=e,this.chunkId="override",this.normalizedChunkId="override"}static fromFeatures(e,s){const r=t.fromOptimizedFeatures(e,s);return new o(r)}get reader(){return this._reader}get queryInfo(){return{}}get first(){return!1}get end(){return!1}get isTiled(){return!1}getTileReader(e){if(!this._reader.getSize())return null;const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}class n{constructor(e,t){this.inner=e,this.isWeak=t,this.lastWeak=null}}class a{constructor(){this._overrides=new Map,this._update=new i,this._lastCleanup=0}hasOverride(e){return this._overrides.has(e)}onChunkInsert(e){if(this._overrides.size){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId(),s=this._overrides.get(e);if(s?.lastWeak&&(s.lastWeak=null),s?.isWeak){const e=t.readOptimizedFeatureWorldSpace();s.inner=e,this._update.modify(e),this.invalidate()}}}e.registerOverrides(this)}apply(e,t){const{updateWeak:s,removeWeak:r,update:i,remove:o,release:a}=e.commands;this.invalidate();for(const d of s)this._overrides.set(d.objectId,new n(d,!0)),this._update.modify(d);for(const d of i){const e=new n(d,!1),t=this._overrides.get(d.objectId);t?.isWeak&&(e.lastWeak=t),this._overrides.set(d.objectId,e),this._update.modify(d)}for(const d of r)this._overrides.set(d,new n(null,!0)),this._update.remove(d);for(const d of o){const e=new n(null,!1),t=this._overrides.get(d);t?.isWeak&&(e.lastWeak=t),this._overrides.set(d,e),this._update.remove(d)}if(a.length){const e=new Set;for(const t of a){const s=this._overrides.get(t);s?.lastWeak?this._overrides.set(t,s.lastWeak):s&&!s.isWeak&&(this._overrides.delete(t),e.add(t))}t.forEachUnsafe((t=>{const s=t.getObjectId();e.has(s)&&(this._update.modify(t.readOptimizedFeatureWorldSpace()),e.delete(s))}));for(const t of e.values())this._update.remove(t)}}cleanup(e){if(this._overrides.size<s)return;const t=performance.now();if(t-this._lastCleanup<r)return;this._lastCleanup=t;const i=this._getWeakDeletions();if(!(i.size<s)){for(const t of e){const e=t.reader.withoutOverrides().getCursor();for(;e.next();){const t=e.getObjectId();i.delete(t)}}for(const e of i)this._overrides.delete(e)}}takeOverrideUpdate(){const e=this._update;return e.isEmpty?null:(this._update=new i,e)}asChunk(e){if(!this._chunk){const t=[];for(const e of this._overrides.values())null!=e.inner&&t.push(e.inner);this._chunk=o.fromFeatures(t,e)}return this._chunk}invalidate(){this._chunk=null}_getWeakDeletions(){const e=new Set;for(const[t,s]of this._overrides.entries())s.isWeak&&null==s.inner&&e.add(t);return e}}export{o as OverrideChunk,a as OverrideState,i as OverrideUpdate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../../../core/Evented.js";import has from"../../../../../../../core/has.js";import{create as s}from"../../../../../../../geometry/support/aaBoundingBox.js";import{FeatureStoreQueryAdapter as t}from"../../../FeatureStoreQueryAdapter.js";import{OverrideState as o}from"./Overrides.js";class r{constructor(s){this._metadata=s,this._chunks=new Map,this._chunksToRemove=[],this._overrides=new o,this.events=new e,this.featureAdapter=new t}destroy(){this.clear()}clear(){for(const e of this._chunks.values())this._chunksToRemove.push(e);this._chunks.clear()}*chunks(){this._overrides&&(yield this._overrides.asChunk(this._metadata)),yield*this._chunks.values()}insert(e){has("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.insert`),this._overrides.onChunkInsert(e),this._chunks.set(e.chunkId,e),this.events.emit("changed")}remove(e){has("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.remove`),this._chunks.delete(e.chunkId),this._chunksToRemove.push(e)}cleanupRemovedChunks(){const e=this._chunksToRemove;return this._chunksToRemove=[],e}applyOverride(e){this._overrides.apply(e,this),this.events.emit("changed");for(const s of this._chunks.values())s.invalidate()}takeOverrideUpdate(){return this._overrides.takeOverrideUpdate()}refresh(){this.events.emit("refresh")}forEach(e){const s=new Set;for(const t of this.chunks()){const o=t.reader.getCursor();for(;o.next();){const t=o.getObjectId();s.has(t)||(e(o.copy()),s.add(t))}}}forEachUnsafe(e){const s=new Set;for(const t of this.chunks()){const o=t.reader.getCursor();for(;o.next();){const t=o.getObjectId();s.has(t)||(e(o),s.add(t))}}}forEachInBounds(e,s){const t=new Set;for(const o of this.chunks()){const r=o.queryFeaturesInBounds(e);for(;r.next();){const e=r.getObjectId();t.has(e)||(s(r.copy()),t.add(e))}}}forEachBounds(e,t){const o=s();for(const s of e){s.getBounds(o)&&t(o)}}}export{r as FeatureSourceChunkStore};
5
+ import e from"../../../../../../../core/Evented.js";import has from"../../../../../../../core/has.js";import{create as s}from"../../../../../../../geometry/support/aaBoundingBox.js";import{FeatureStoreQueryAdapter as t}from"../../../FeatureStoreQueryAdapter.js";import{OverrideState as o}from"./Overrides.js";class r{constructor(s){this._metadata=s,this._chunks=new Map,this._chunksToRemove=[],this._overrides=new o,this.events=new e,this.featureAdapter=new t}destroy(){this.clear()}clear(){for(const e of this._chunks.values())this._chunksToRemove.push(e);this._chunks.clear()}*chunks(){this._overrides&&(yield this._overrides.asChunk(this._metadata)),yield*this._chunks.values()}insert(e){has("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.insert`),this._overrides.onChunkInsert(e),this._chunks.set(e.chunkId,e),this.events.emit("changed")}remove(e){has("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.remove`),this._chunks.delete(e.chunkId),this._chunksToRemove.push(e)}cleanup(){const e=this._chunksToRemove;return this._chunksToRemove=[],this._overrides.cleanup(this._chunks.values()),e}applyOverride(e){this._overrides.apply(e,this),this.events.emit("changed");for(const s of this._chunks.values())s.invalidate()}takeOverrideUpdate(){return this._overrides.takeOverrideUpdate()}refresh(){this.events.emit("refresh")}forEach(e){const s=new Set;for(const t of this.chunks()){const o=t.reader.getCursor();for(;o.next();){const t=o.getObjectId();s.has(t)||(e(o.copy()),s.add(t))}}}forEachUnsafe(e){const s=new Set;for(const t of this.chunks()){const o=t.reader.getCursor();for(;o.next();){const t=o.getObjectId();s.has(t)||(e(o),s.add(t))}}}forEachInBounds(e,s){const t=new Set;for(const o of this.chunks()){const r=o.queryFeaturesInBounds(e);for(;r.next();){const e=r.getObjectId();t.has(e)||(s(r.copy()),t.add(e))}}}forEachBounds(e,t){const o=s();for(const s of e){s.getBounds(o)&&t(o)}}}export{r as FeatureSourceChunkStore};