@arcgis/core 5.0.0-next.1 → 5.0.0-next.10

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 (955) hide show
  1. package/Map.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/analysis/ElevationProfileAnalysis.js +1 -1
  4. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.js +1 -1
  5. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +5 -0
  6. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  7. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +4 -0
  8. package/applications/KnowledgeStudio/generalSdkInternalAccess.js +5 -0
  9. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +1 -0
  10. package/applications/KnowledgeStudio/generalSharedKgUtils.js +1 -1
  11. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +2 -0
  12. package/applications/KnowledgeStudio/layerInternalAccessUtils.js +1 -1
  13. package/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
  14. package/arcade/featureset/actions/Adapted.js +1 -1
  15. package/arcade/featureset/actions/AttributeFilter.js +1 -1
  16. package/arcade/featureset/actions/GroupBy.js +1 -1
  17. package/arcade/featureset/actions/OrderBy.js +1 -1
  18. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  19. package/arcade/featureset/actions/Top.js +1 -1
  20. package/arcade/featureset/sources/Empty.js +1 -1
  21. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  22. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  23. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  24. package/arcade/featureset/support/FeatureSet.js +1 -1
  25. package/arcade/featureset/support/sqlUtils.js +1 -1
  26. package/arcade/featureset/support/stats.js +1 -1
  27. package/arcade/functions/featuresetbase.js +1 -1
  28. package/arcade/functions/featuresetstring.js +1 -1
  29. package/arcade/functions/knowledgegraph.js +1 -1
  30. package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
  31. package/assets/esri/core/workers/RemoteClient.js +1 -1
  32. package/assets/esri/core/workers/chunks/{1a713dcc9971e1935401.js → 0030d68d9edf42b4af57.js} +1 -1
  33. package/assets/esri/core/workers/chunks/00c77f03dd511c6dbff2.js +1 -0
  34. package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
  35. package/assets/esri/core/workers/chunks/0200637e0503556a3b97.js +1 -0
  36. package/assets/esri/core/workers/chunks/022c854eff2c2c2aed6b.js +1 -0
  37. package/assets/esri/core/workers/chunks/{14ace5dc4b8984212a57.js → 042cd64e1f4eb326c30f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
  39. package/assets/esri/core/workers/chunks/066a0ea67688361e85a5.js +1 -0
  40. package/assets/esri/core/workers/chunks/06f75c5b6b50934d72a6.js +1 -0
  41. package/assets/esri/core/workers/chunks/{89027f6800e17fab8973.js → 0a5d74414dd02a2fb8e1.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{388482cea4b9fdeaf06e.js → 0f30a9514571c7be9978.js} +1 -1
  44. package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
  45. package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
  46. package/assets/esri/core/workers/chunks/{e032f3d2ee19790f8c79.js → 11e96a312f1294d34c50.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{309c5f69ea06f3081d83.js → 1257c37bf04d39c27b62.js} +1 -1
  48. package/assets/esri/core/workers/chunks/125e71b0e29d1d132777.js +1 -0
  49. package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
  50. package/assets/esri/core/workers/chunks/15f969836d63c7fe2d9d.js +1 -0
  51. package/assets/esri/core/workers/chunks/18c5d79d5ee1136e0a57.js +1 -0
  52. package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{651b9144abb1895cc510.js → 1e848d9da1c61a27cf18.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{8cea114168d849c38b1b.js → 20278683bddc8c2d8136.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{d84373a6ec94dcfec8c2.js → 24cd7b84cd0f3de4bff2.js} +1 -1
  56. package/assets/esri/core/workers/chunks/27e6a6c5610007ac6a54.js +1 -0
  57. package/assets/esri/core/workers/chunks/2857bcb68df874e9aa62.js +1 -0
  58. package/assets/esri/core/workers/chunks/{94c9d3094c93f7760433.js → 29286234be26680245f6.js} +1 -1
  59. package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
  60. package/assets/esri/core/workers/chunks/2ddcf3cea0efe4052618.js +1 -0
  61. package/assets/esri/core/workers/chunks/2e8a4df83c43f86d7361.js +1 -0
  62. package/assets/esri/core/workers/chunks/{4f01be74dd26e639330f.js → 2f24017e72d41c259faa.js} +1 -1
  63. package/assets/esri/core/workers/chunks/2f2e4f81f3daa3fb8527.js +1 -0
  64. package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
  65. package/assets/esri/core/workers/chunks/3109f0a6914e7be088ed.js +1 -0
  66. package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
  67. package/assets/esri/core/workers/chunks/31bb1ee9370c2753ce9d.js +1 -0
  68. package/assets/esri/core/workers/chunks/329fccd7f5cb8401e0c3.js +1 -0
  69. package/assets/esri/core/workers/chunks/37c1f155da14de91565a.js +1 -0
  70. package/assets/esri/core/workers/chunks/37f2ef14399546e697e6.js +1 -0
  71. package/assets/esri/core/workers/chunks/38ee69125da60464d5a1.js +1 -0
  72. package/assets/esri/core/workers/chunks/38f6b9288c82dac9a800.js +1 -0
  73. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
  74. package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 3ac7562ea90f91a9f30c.js} +1 -1
  75. package/assets/esri/core/workers/chunks/3b1848713ee25f750242.js +1 -0
  76. package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
  77. package/assets/esri/core/workers/chunks/442973ff4dda923def62.js +1 -0
  78. package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
  79. package/assets/esri/core/workers/chunks/44f27eac92c5ccc57e12.js +1 -0
  80. package/assets/esri/core/workers/chunks/4941bfd3aae7f6bdac97.js +1 -0
  81. package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
  82. package/assets/esri/core/workers/chunks/4bd2cc65f7db0d261543.js +1 -0
  83. package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
  84. package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
  85. package/assets/esri/core/workers/chunks/4fbe2a8d742065cbaea3.js +1 -0
  86. package/assets/esri/core/workers/chunks/4fe4feeb251f2916a339.js +1 -0
  87. package/assets/esri/core/workers/chunks/509392131ec473d6b988.js +1 -0
  88. package/assets/esri/core/workers/chunks/{2ea6985da4eb0107bb9d.js → 51ab2acac4ecc1ca9c34.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
  91. package/assets/esri/core/workers/chunks/55eb6a0f1e4569a65f2a.js +1 -0
  92. package/assets/esri/core/workers/chunks/57e04e2d8721bbdc029a.js +1 -0
  93. package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
  94. package/assets/esri/core/workers/chunks/591e459f9fce34f519ca.js +1 -0
  95. package/assets/esri/core/workers/chunks/59514624daf188a8030f.js +1 -0
  96. package/assets/esri/core/workers/chunks/5c09d98b41f71a036e2a.js +1 -0
  97. package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{b7a17927e14f502006b4.js → 5ea0c62016d56990787b.js} +1 -1
  99. package/assets/esri/core/workers/chunks/605b9643b1baeff16149.js +1 -0
  100. package/assets/esri/core/workers/chunks/{2ce4a0fe4fae63c43a81.js → 61d970ed75c2c358b1e9.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{00aa85ae6419aad183ea.js → 6293e33f304c4952f88c.js} +1 -1
  103. package/assets/esri/core/workers/chunks/664ae441617afe4b17ec.js +1 -0
  104. package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
  105. package/assets/esri/core/workers/chunks/{ec13053af1999701464a.js → 6826fe54562dcdc054d7.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{8215015f11221a354273.js → 6d049182bec34a22abcd.js} +1 -1
  107. package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
  108. package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
  109. package/assets/esri/core/workers/chunks/6e25ef5ad6d6b3f88343.js +1 -0
  110. package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{c73def15ccfb2a32afa8.js → 7290e7a819eb291b1df2.js} +4 -4
  112. package/assets/esri/core/workers/chunks/731f7b552dde0fb325cd.js +1 -0
  113. package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
  114. package/assets/esri/core/workers/chunks/{24921d31efa8d222ad2d.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
  115. package/assets/esri/core/workers/chunks/759321045c264bc6964e.js +1 -0
  116. package/assets/esri/core/workers/chunks/773f2c6c9d38db76dfed.js +1 -0
  117. package/assets/esri/core/workers/chunks/7803495f8862d9025bcd.js +1 -0
  118. package/assets/esri/core/workers/chunks/79dbfa2b9b332ca0002f.js +1 -0
  119. package/assets/esri/core/workers/chunks/7a23ab84e1144f081c92.js +1 -0
  120. package/assets/esri/core/workers/chunks/7e3f27ebf366d4266350.js +1 -0
  121. package/assets/esri/core/workers/chunks/826072cfc0ac8e36f03c.js +1 -0
  122. package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
  123. package/assets/esri/core/workers/chunks/8372f142c4d7a65c7954.js +1 -0
  124. package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
  125. package/assets/esri/core/workers/chunks/8ce608013b353155ee5a.js +1 -0
  126. package/assets/esri/core/workers/chunks/{24c14e4a1d2a2267097e.js → 8d9d3797c6d62fdfff9d.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{0086a09441627842d34a.js → 8f3503b2fb6cd38757b9.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{de1f75c907152df7e788.js → 9698f36c143953a975d4.js} +1 -1
  130. package/assets/esri/core/workers/chunks/9b0c2f4311fe9bca370a.js +1 -0
  131. package/assets/esri/core/workers/chunks/9c48d8d17831aa57f8a4.js +1 -0
  132. package/assets/esri/core/workers/chunks/9f21436016ff7a899e79.js +1 -0
  133. package/assets/esri/core/workers/chunks/9f28b2800945903bc165.js +1 -0
  134. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
  135. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
  136. package/assets/esri/core/workers/chunks/a091623bbfb3d771c8d8.js +1 -0
  137. package/assets/esri/core/workers/chunks/a27e74117c37f3efcbca.js +1 -0
  138. package/assets/esri/core/workers/chunks/a41ba05c09a59d1eb35f.js +1 -0
  139. package/assets/esri/core/workers/chunks/a470f662d73aa8d5d90f.js +1 -0
  140. package/assets/esri/core/workers/chunks/a93ebd076bc55aa6eab0.js +1 -0
  141. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  142. package/assets/esri/core/workers/chunks/aaed35a6414859233678.js +1 -0
  143. package/assets/esri/core/workers/chunks/acd0564ad1544f452f3f.js +1 -0
  144. package/assets/esri/core/workers/chunks/{135e270b4f03c4270870.js → af47272aaaef0ea57e71.js} +1 -1
  145. package/assets/esri/core/workers/chunks/b0f43191a431c9de16e5.js +1 -0
  146. package/assets/esri/core/workers/chunks/{bc3bcf88b252760e2574.js → b3028b1ff75eafd0c358.js} +1 -1
  147. package/assets/esri/core/workers/chunks/b320bb76c7e9998fe53b.js +1 -0
  148. package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
  149. package/assets/esri/core/workers/chunks/b8a3f1e60e24a13749c1.js +1 -0
  150. package/assets/esri/core/workers/chunks/ba4571d2637a74a59552.js +1 -0
  151. package/assets/esri/core/workers/chunks/bb7976e2f883b544add6.js +1 -0
  152. package/assets/esri/core/workers/chunks/{56916e56c20465428dd4.js → be3b874f86f627f4fa98.js} +1 -1
  153. package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
  154. package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
  155. package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
  156. package/assets/esri/core/workers/chunks/c61c61dac1e8d6188749.js +1 -0
  157. package/assets/esri/core/workers/chunks/c84caf81bfaa4a8b5aa1.js +1 -0
  158. package/assets/esri/core/workers/chunks/c8c8cf43fd640d2f5cb1.js +1 -0
  159. package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
  160. package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
  161. package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
  162. package/assets/esri/core/workers/chunks/d048e4926e78458afa3e.js +1 -0
  163. package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
  164. package/assets/esri/core/workers/chunks/d1ca7c3a32ce00ed8b81.js +1 -0
  165. package/assets/esri/core/workers/chunks/{630efe10c871425b6a95.js → d1e97cce5047f1791e22.js} +1 -1
  166. package/assets/esri/core/workers/chunks/d28670cb11164e318e45.js +1 -0
  167. package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js → d391bfbaf0e790cd10d6.js} +2 -2
  168. package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
  169. package/assets/esri/core/workers/chunks/d56ac52a5288e06365e7.js +1 -0
  170. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  171. package/assets/esri/core/workers/chunks/{d570c75a425aa29672c8.js → da24ad57747714ac5eda.js} +1 -1
  172. package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → dc51438b832551924a9e.js} +1 -1
  173. package/assets/esri/core/workers/chunks/dc66490520f97eef15bf.js +316 -0
  174. package/assets/esri/core/workers/chunks/ddca92e18e96ea1c9d89.js +1 -0
  175. package/assets/esri/core/workers/chunks/{cfa3164e7fa1884dc2b9.js → ddfd01bb9ba8577c3ffc.js} +1 -1
  176. package/assets/esri/core/workers/chunks/ded9747ae04ab889d52a.js +1 -0
  177. package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
  178. package/assets/esri/core/workers/chunks/df8279e1baf378faf85f.js +1 -0
  179. package/assets/esri/core/workers/chunks/dff2df259f140b7d97a9.js +1 -0
  180. package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
  181. package/assets/esri/core/workers/chunks/e3434f91f47f551d9e02.js +1 -0
  182. package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
  183. package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
  184. package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
  185. package/assets/esri/core/workers/chunks/eb6c3dd440ede4adf603.js +1 -0
  186. package/assets/esri/core/workers/chunks/eb9c166db0db6fa60e95.js +1 -0
  187. package/assets/esri/core/workers/chunks/edc671b9b83c8e19cb42.js +1 -0
  188. package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → ee5aa11750c51b220f1e.js} +1 -1
  189. package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
  190. package/assets/esri/core/workers/chunks/f141c9f7f0d9b2322bf6.js +1 -0
  191. package/assets/esri/core/workers/chunks/{5875a51b97ee9bd438a0.js → f34e3fa0c5b28531e289.js} +1 -1
  192. package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
  193. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  194. package/assets/esri/core/workers/chunks/{fa4411e0a5ac3fcba365.js → f65c0102af17390a50ac.js} +1 -1
  195. package/assets/esri/core/workers/chunks/f6c11c8ac687de3ef1ab.js +1 -0
  196. package/assets/esri/core/workers/chunks/f7a1f48c53422c6e2028.js +1 -0
  197. package/assets/esri/core/workers/chunks/f7f002ea5ff5fe7f6249.js +1 -0
  198. package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
  199. package/assets/esri/core/workers/chunks/f8e889be4b45f6f0667e.js +1 -0
  200. package/assets/esri/core/workers/chunks/fbd796c88f07bb6755dc.js +1 -0
  201. package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
  202. package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
  203. package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
  204. package/assets/esri/core/workers/chunks/fec3897ed7e8691387ed.js +1 -0
  205. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  206. package/assets/esri/themes/base/widgets/_Directions.scss +17 -18
  207. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
  208. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  209. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +14 -4
  210. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  211. package/assets/esri/themes/dark/main.css +1 -1
  212. package/assets/esri/themes/light/main.css +1 -1
  213. package/assets/esri/themes/light/view.css +1 -1
  214. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -1
  215. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -1
  216. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -1
  217. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -1
  218. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -1
  219. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -1
  220. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -1
  221. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -1
  222. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -1
  223. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -1
  224. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -1
  225. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -1
  226. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -1
  227. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -1
  228. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -1
  229. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -1
  230. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -1
  231. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -1
  232. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -1
  233. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -1
  234. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -1
  235. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -1
  236. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -1
  237. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -1
  238. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -1
  239. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -1
  240. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -1
  241. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -1
  242. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -1
  243. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -1
  244. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -1
  245. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -1
  246. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -1
  247. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -1
  248. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -1
  249. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -1
  250. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -1
  251. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -1
  252. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -1
  253. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  254. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  255. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  256. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  257. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  258. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  259. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  260. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  261. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  262. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  263. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  264. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  265. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  266. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  267. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  268. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  269. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  270. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  271. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  272. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  273. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  274. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  275. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  276. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  277. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  278. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  279. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  280. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  281. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  282. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  283. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  284. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  285. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  286. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  287. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  288. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  289. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  290. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  291. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  292. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  293. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  294. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  295. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  296. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  297. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  298. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  299. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  300. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  301. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  302. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  303. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  304. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  305. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  306. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  307. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  308. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  309. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  310. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  311. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  312. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  313. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  314. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  315. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  316. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  317. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  318. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  319. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  320. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  321. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  322. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  323. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  324. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  325. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  326. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  327. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  328. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  329. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  330. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  331. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  332. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  333. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  334. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  335. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  336. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  337. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  338. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  339. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  340. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  341. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  342. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  343. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  344. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  345. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  346. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  347. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  348. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  349. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  350. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  351. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  352. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  353. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  354. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  355. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  356. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  357. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  358. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  359. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  360. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  361. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  362. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  363. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  364. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  365. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  366. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  367. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  368. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  369. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  370. package/chunks/ComponentShader.glsl.js +72 -39
  371. package/chunks/Envelope.js +1 -1
  372. package/chunks/Geometry.js +1 -1
  373. package/chunks/MultiPathImpl.js +1 -1
  374. package/chunks/OITBlend.glsl.js +3 -3
  375. package/chunks/Point2D.js +1 -1
  376. package/chunks/UnitFactory.js +1 -1
  377. package/chunks/bundle.js +1 -1
  378. package/chunks/containsOperator.js +1 -1
  379. package/chunks/densifyOperator.js +1 -1
  380. package/chunks/differenceOperator.js +1 -1
  381. package/chunks/intersectsOperator.js +1 -1
  382. package/chunks/persistableUrlUtils.js +1 -1
  383. package/config.js +1 -1
  384. package/core/Identifiable.js +1 -1
  385. package/core/MultiOriginJSONSupport.js +1 -1
  386. package/core/NumericIdentifiable.js +5 -0
  387. package/core/QueueProcessor.js +1 -1
  388. package/core/SetUtils.js +1 -1
  389. package/core/WriteableMultiOriginJSONMixin.js +5 -0
  390. package/core/dedupeResult.js +5 -0
  391. package/core/has.js +1 -1
  392. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  393. package/{views/3d/support/ImageWithType.js → core/performance.js} +1 -1
  394. package/core/sanitizerUtils.js +1 -1
  395. package/core/scheduling.js +1 -1
  396. package/core/unitUtils.js +1 -1
  397. package/core/workers/Connection.js +1 -1
  398. package/core/workers/WorkerHandle.js +1 -1
  399. package/core/workers/utils.js +1 -1
  400. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  401. package/form/FormTemplate.js +1 -1
  402. package/form/elements/Element.js +1 -1
  403. package/form/elements/FieldElement.js +1 -1
  404. package/form/elements/GroupElement.js +1 -1
  405. package/geohash/GeohashCell.js +1 -1
  406. package/geohash/geohashUtils.js +1 -1
  407. package/geometry/Extent.js +1 -1
  408. package/geometry/Geometry.js +1 -1
  409. package/geometry/GeometryCursor.js +1 -1
  410. package/geometry/Point.js +1 -1
  411. package/geometry/SpatialReference.js +1 -1
  412. package/geometry/ellipsoidUtils.js +1 -1
  413. package/geometry/geometryCursorCollectUtils.js +1 -1
  414. package/geometry/libtess.js +1 -1
  415. package/geometry/operators/gx/operatorOffset.js +1 -1
  416. package/geometry/operators/support/jsonConverter.js +1 -1
  417. package/geometry/support/MeshTransform.js +1 -1
  418. package/geometry/support/axisAngleDegrees.js +1 -1
  419. package/geometry/support/jsonUtils.js +1 -1
  420. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  421. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  422. package/geometry/support/meshUtils/rotate.js +1 -1
  423. package/geometry/support/meshUtils/scale.js +1 -1
  424. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  425. package/geometry/support/normalizeUtilsSync.js +1 -1
  426. package/geometry/support/plane.js +1 -1
  427. package/geometry/support/polygonUtils.js +1 -1
  428. package/geometry/support/triangulationUtils.js +1 -1
  429. package/identity/Credential.js +1 -1
  430. package/identity/IdentityManager.js +1 -1
  431. package/identity/IdentityManagerBase.js +1 -1
  432. package/interfaces.d.ts +2067 -458
  433. package/intl/date.js +1 -1
  434. package/intl.d.ts +2 -0
  435. package/intl.js +1 -1
  436. package/kernel.js +1 -1
  437. package/layers/FeatureLayer.js +1 -1
  438. package/layers/KnowledgeGraphLayer.js +1 -1
  439. package/layers/Layer.js +1 -1
  440. package/layers/LinkChartLayer.js +1 -1
  441. package/layers/MapNotesLayer.js +1 -1
  442. package/layers/OrientedImageryLayer.js +1 -1
  443. package/layers/SceneLayer.js +1 -1
  444. package/layers/graphics/OptimizedFeature.js +1 -1
  445. package/layers/graphics/OptimizedGeometry.js +1 -1
  446. package/layers/graphics/centroid.js +1 -1
  447. package/layers/graphics/contains.js +1 -1
  448. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  449. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  450. package/layers/graphics/data/AttributesBuilder.js +1 -1
  451. package/layers/graphics/data/FeatureStore.js +1 -1
  452. package/layers/graphics/data/QueryEngine.js +1 -1
  453. package/layers/graphics/data/QueryEngineResult.js +1 -1
  454. package/layers/graphics/data/geometryUtils.js +1 -1
  455. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  456. package/layers/graphics/featureConversionUtils.js +1 -1
  457. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  458. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  459. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  460. package/layers/graphics/sources/geojson/geojson.js +1 -1
  461. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  462. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  463. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  464. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  465. package/layers/knowledgeGraph/layerUtils.js +1 -1
  466. package/layers/mixins/ArcGISImageService.js +1 -1
  467. package/layers/mixins/ImageryTileMixin.js +1 -1
  468. package/layers/ogc/ogcFeatureUtils.js +1 -1
  469. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  470. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  471. package/layers/save/groupLayerUtils.js +1 -1
  472. package/layers/support/DateTimeFieldFormat.js +1 -1
  473. package/layers/support/FieldFormat.js +1 -1
  474. package/layers/support/MediaElementBase.js +1 -1
  475. package/layers/support/NumberFieldFormat.js +1 -1
  476. package/layers/support/PixelBlock.js +1 -1
  477. package/layers/support/RasterInfo.js +1 -1
  478. package/layers/support/RasterJobHandler.js +1 -1
  479. package/layers/support/RasterSensorInfo.js +1 -1
  480. package/layers/support/RasterStorageInfo.js +1 -1
  481. package/layers/support/RasterWorker.js +1 -1
  482. package/layers/support/Sublayer.js +1 -1
  483. package/layers/support/TitleCreator.js +1 -1
  484. package/layers/support/arcgisLayerUrl.js +1 -1
  485. package/layers/support/capabilities.js +1 -1
  486. package/layers/support/fieldConfigUtils.js +1 -1
  487. package/layers/support/fieldUtils.js +1 -1
  488. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  489. package/layers/support/rasterDatasets/pixelReader.js +1 -1
  490. package/layers/support/rasterFieldUtils.js +1 -1
  491. package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
  492. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  493. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  494. package/layers/support/source/DataLayerSource.js +1 -1
  495. package/networks/CircuitManager.d.ts +4 -0
  496. package/networks/UnitIdentifierManager.d.ts +4 -0
  497. package/networks/support/Circuit.d.ts +4 -0
  498. package/networks/support/CircuitLocation.d.ts +4 -0
  499. package/networks/support/CircuitPath.d.ts +4 -0
  500. package/networks/support/CircuitPathConnectivityElement.d.ts +4 -0
  501. package/networks/support/CircuitSection.d.ts +4 -0
  502. package/networks/support/Subcircuit.d.ts +4 -0
  503. package/package.json +5 -5
  504. package/popup/ExpressionInfo.js +1 -1
  505. package/popup/FieldInfo.js +1 -1
  506. package/popup/content/AttachmentsContent.js +1 -1
  507. package/popup/content/BarChartMediaInfo.js +1 -1
  508. package/popup/content/ColumnChartMediaInfo.js +1 -1
  509. package/popup/content/Content.js +1 -1
  510. package/popup/content/CustomContent.js +1 -1
  511. package/popup/content/ExpressionContent.js +1 -1
  512. package/popup/content/FieldsContent.js +1 -1
  513. package/popup/content/ImageMediaInfo.js +1 -1
  514. package/popup/content/LineChartMediaInfo.js +1 -1
  515. package/popup/content/MediaContent.js +1 -1
  516. package/popup/content/PieChartMediaInfo.js +1 -1
  517. package/popup/content/RelationshipContent.js +1 -1
  518. package/popup/content/TextContent.js +1 -1
  519. package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
  520. package/popup/content/mixins/ChartMediaInfo.js +1 -1
  521. package/popup/content/mixins/MediaInfo.js +1 -1
  522. package/popup/content.js +1 -1
  523. package/popup/support/FieldInfoFormat.js +1 -1
  524. package/processRequest.js +5 -0
  525. package/request.js +1 -1
  526. package/requestConfig.js +5 -0
  527. package/requestQueue.js +5 -0
  528. package/rest/geometryService/utils.js +1 -1
  529. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +4 -0
  530. package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +4 -0
  531. package/rest/networks/support/TelecomNetworkElement.d.ts +4 -0
  532. package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +4 -0
  533. package/rest/print.js +1 -1
  534. package/rest/query/executeForCount.js +1 -1
  535. package/rest/query/executeForExtent.js +1 -1
  536. package/rest/query/executeForIds.js +1 -1
  537. package/rest/query/executeQueryJSON.js +1 -1
  538. package/rest/query/executeQueryPBF.js +1 -1
  539. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  540. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  541. package/rest/query/operations/query.js +1 -1
  542. package/rest/query/operations/queryZScale.js +1 -1
  543. package/rest/support/BaseImageMeasureResultValue.js +5 -0
  544. package/rest/support/ImageAreaResult.js +1 -1
  545. package/rest/support/ImageDistanceResult.js +1 -1
  546. package/rest/support/ImageHeightResult.js +1 -1
  547. package/rest/support/ImageMeasureResultAngleValue.js +5 -0
  548. package/rest/support/ImageMeasureResultAreaValue.js +5 -0
  549. package/rest/support/ImageMeasureResultLengthValue.js +5 -0
  550. package/rest/support/ImageWithType.js +5 -0
  551. package/rest/support/imageMeasureUtils.js +1 -1
  552. package/rest/versionManagement/getVersionInfos.js +1 -1
  553. package/smartMapping/renderers/size.js +1 -1
  554. package/smartMapping/statistics/histogram.js +1 -1
  555. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  556. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  557. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  558. package/smartMapping/support/adapters/support/utils.js +1 -1
  559. package/smartMapping/support/utils.js +1 -1
  560. package/support/basemapDefinitions.js +1 -1
  561. package/support/elevationInfoUtils.js +1 -1
  562. package/support/requestImageUtils.js +1 -1
  563. package/support/revision.js +1 -1
  564. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  565. package/symbols/support/utils.js +1 -1
  566. package/time/TimeExtent.js +1 -1
  567. package/undoredo/support/Services.js +1 -1
  568. package/views/2d/GoToManager.js +1 -1
  569. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  570. package/views/2d/constraints/GeometryConstraint.js +1 -1
  571. package/views/2d/constraints/RotationConstraint.js +1 -1
  572. package/views/2d/constraints/ZoomConstraint.js +1 -1
  573. package/views/2d/engine/Bitmap.js +1 -1
  574. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  575. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  576. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  577. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
  578. package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
  579. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  580. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  581. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  582. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  583. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  584. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  585. package/views/2d/layers/features/aggregation/GridCell.js +1 -1
  586. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  587. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  588. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  589. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  590. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  591. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  592. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  593. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  594. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  595. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  596. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  597. package/views/2d/layers/features/schema/ExceedsLimitCache.js +5 -0
  598. package/views/2d/layers/features/schema/SourceSchema.js +1 -1
  599. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  600. package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
  601. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  602. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  603. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  604. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  605. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  606. package/views/2d/layers/features/sources/strategies/constants.js +5 -0
  607. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  608. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  609. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
  610. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  611. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  612. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  613. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  614. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  615. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  616. package/views/3d/FocusAreasView.js +1 -1
  617. package/views/3d/GroundView3D.js +1 -1
  618. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  619. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  620. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  621. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  622. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  623. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +5 -0
  624. package/views/3d/environment/CloudsRenderer.js +1 -1
  625. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  626. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  627. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  628. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  629. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  630. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  631. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  632. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  633. package/views/3d/layers/FlowSubView3D.js +1 -1
  634. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  635. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  636. package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
  637. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  638. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  639. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  640. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  641. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  642. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  643. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  644. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  645. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  646. package/views/3d/layers/graphics/Labeler.js +1 -1
  647. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  648. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  649. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  650. package/views/3d/layers/graphics/pipeline/featureSet/PBFPointFeatureSetView.js +1 -1
  651. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  652. package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
  653. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  654. package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
  655. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  656. package/views/3d/layers/i3s/I3SNode.js +1 -1
  657. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  658. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  659. package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
  660. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  661. package/views/3d/layers/support/FeatureTile.js +1 -1
  662. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  663. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  664. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  665. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  666. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  667. package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
  668. package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
  669. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  670. package/views/3d/layers/support/fetchTile.js +1 -1
  671. package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
  672. package/views/3d/state/ViewStateManager.js +1 -1
  673. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  674. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  675. package/views/3d/state/controllers/RotateController.js +1 -1
  676. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  677. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  678. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  679. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  680. package/views/3d/state/utils/navigationUtils.js +1 -1
  681. package/views/3d/support/DisplayQualityProfile.js +1 -1
  682. package/views/3d/support/QualitySettings.js +1 -1
  683. package/views/3d/support/ResourceController.js +1 -1
  684. package/views/3d/support/SharedSymbolResources.js +1 -1
  685. package/views/3d/support/StreamTextureCollection.js +1 -1
  686. package/views/3d/support/engineContent/line.js +1 -1
  687. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  688. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  689. package/views/3d/support/flow/FlowWorker.js +1 -1
  690. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  691. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  692. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  693. package/views/3d/support/flow/constants.js +1 -1
  694. package/views/3d/support/hitTest.js +1 -1
  695. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  696. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  697. package/views/3d/terrain/OverlayRenderer.js +1 -1
  698. package/views/3d/terrain/TerrainSurface.js +1 -1
  699. package/views/3d/terrain/Tile.js +1 -1
  700. package/views/3d/terrain/TileOverlayData.js +1 -1
  701. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  702. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  703. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  704. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  705. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  706. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +7 -7
  707. package/views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js +5 -0
  708. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConstructionContext.js +1 -1
  709. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  710. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  711. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  712. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  713. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  714. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  715. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  716. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  717. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  718. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  719. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +10 -4
  720. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  721. package/views/DOMContainer.js +1 -1
  722. package/views/SceneView.js +1 -1
  723. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  724. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  725. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
  726. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  727. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  728. package/views/analysis/ElevationProfile/constants.js +1 -1
  729. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  730. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  731. package/views/analysis/ElevationProfile/elevationProfileLayerUtils.js +5 -0
  732. package/views/draw/DrawOperation.js +1 -1
  733. package/views/draw/MultipointDrawAction.js +1 -1
  734. package/views/draw/PointDrawAction.js +1 -1
  735. package/views/draw/PolygonDrawAction.js +1 -1
  736. package/views/draw/PolylineDrawAction.js +1 -1
  737. package/views/draw/SegmentDrawAction.js +1 -1
  738. package/views/draw/input/CursorUpdateEvents.js +5 -0
  739. package/views/draw/input/DrawCompleteEvent.js +5 -0
  740. package/views/draw/input/VertexAddEvent.js +5 -0
  741. package/views/draw/input/VertexRemoveEvent.js +5 -0
  742. package/views/draw/input/VertexUpdateEvent.js +5 -0
  743. package/views/draw/support/Reshape.js +1 -1
  744. package/views/draw/support/reshapeUtils.js +1 -1
  745. package/views/interactive/dragEventPipeline.js +1 -1
  746. package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
  747. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  748. package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
  749. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  750. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  751. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  752. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  753. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
  754. package/views/layers/FeatureLayerView.js +1 -1
  755. package/views/support/PromiseQueue.js +1 -1
  756. package/views/support/Scheduler.js +1 -1
  757. package/views/support/TextureCompressionWorker.js +1 -1
  758. package/views/webgl/ShaderBuilder.js +1 -1
  759. package/views/webgl/Texture.js +1 -1
  760. package/webdoc/support/webdocSaveUtils.js +1 -1
  761. package/webscene/spec-certification/api.js +1 -1
  762. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  763. package/widgets/BasemapLayerList.js +1 -1
  764. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  765. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  766. package/widgets/BatchAttributeForm.js +1 -1
  767. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  768. package/widgets/CoordinateConversion.js +1 -1
  769. package/widgets/Daylight/DaylightViewModel.js +1 -1
  770. package/widgets/Daylight.js +1 -1
  771. package/widgets/Directions/css.js +1 -1
  772. package/widgets/Directions.js +1 -1
  773. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  774. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  775. package/widgets/Editor/EditorViewModel.js +1 -1
  776. package/widgets/Editor/Edits.js +1 -1
  777. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +4 -0
  778. package/widgets/Editor/MergeFeaturesWorkflow.js +5 -0
  779. package/widgets/Editor/MergeFeaturesWorkflowData.d.ts +4 -0
  780. package/widgets/Editor/MergeFeaturesWorkflowData.js +5 -0
  781. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  782. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  783. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  784. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  785. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  786. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  787. package/widgets/Editor/UpdateWorkflow.js +1 -1
  788. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  789. package/widgets/Editor/components/FeatureList.js +1 -1
  790. package/widgets/Editor/components/UploadDetails.js +1 -1
  791. package/widgets/Editor/support/EditorItem.js +1 -1
  792. package/widgets/Editor/support/SketchController.js +1 -1
  793. package/widgets/Editor/support/errors.js +5 -0
  794. package/widgets/Editor/support/mergeFeaturesUtils.js +5 -0
  795. package/widgets/Editor/workflowUtils.js +1 -1
  796. package/widgets/Editor.js +1 -1
  797. package/widgets/Feature/FeatureExpression.js +1 -1
  798. package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
  799. package/widgets/Feature/FeatureFields.js +1 -1
  800. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  801. package/widgets/Feature/FeatureMedia.js +1 -1
  802. package/widgets/Feature/FeatureViewModel.js +1 -1
  803. package/widgets/Feature/support/featureUtils.js +1 -1
  804. package/widgets/Feature.js +1 -1
  805. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  806. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  807. package/widgets/FeatureForm/FieldInput.js +1 -1
  808. package/widgets/FeatureForm/InputBase.js +1 -1
  809. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  810. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  811. package/widgets/FeatureForm.js +1 -1
  812. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  813. package/widgets/FeatureTable/FieldColumn.js +1 -1
  814. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  815. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  816. package/widgets/LayerList.js +1 -1
  817. package/widgets/Legend/LegendViewModel.js +1 -1
  818. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  819. package/widgets/Legend.js +1 -1
  820. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  821. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  822. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  823. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  824. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  825. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  826. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  827. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  828. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  829. package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
  830. package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
  831. package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
  832. package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
  833. package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
  834. package/widgets/Print.js +1 -1
  835. package/widgets/Search/LayerSearchSource.js +1 -1
  836. package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
  837. package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
  838. package/widgets/Sketch/VisibleElements.js +1 -1
  839. package/widgets/Sketch.js +1 -1
  840. package/widgets/UtilityNetworkTrace.js +1 -1
  841. package/widgets/support/ColorPicker.js +1 -1
  842. package/widgets/support/FilterCondition.js +1 -1
  843. package/widgets/support/SelectionList/LayerItem.js +1 -1
  844. package/widgets/support/jsxWidgetSupport.js +1 -1
  845. package/assets/esri/core/workers/chunks/01642fe19e81bfa33eb5.js +0 -1
  846. package/assets/esri/core/workers/chunks/039ec0fbe3b4b398b8c6.js +0 -1
  847. package/assets/esri/core/workers/chunks/0429c1a3690f20647c9f.js +0 -1
  848. package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
  849. package/assets/esri/core/workers/chunks/065f2bbcaeef1f13fd48.js +0 -1
  850. package/assets/esri/core/workers/chunks/0731e588afd1f561ec3b.js +0 -1
  851. package/assets/esri/core/workers/chunks/09de8be660174a229efb.js +0 -1
  852. package/assets/esri/core/workers/chunks/0eaa4dccba0d844b9da3.js +0 -1
  853. package/assets/esri/core/workers/chunks/0f9bb3187306f89e3d63.js +0 -1
  854. package/assets/esri/core/workers/chunks/1019fa4818624ba292ef.js +0 -1
  855. package/assets/esri/core/workers/chunks/10fb29ba6f3f81353fbc.js +0 -1
  856. package/assets/esri/core/workers/chunks/147ad5fdd02f46b6da24.js +0 -1
  857. package/assets/esri/core/workers/chunks/17103e6542aae53c7301.js +0 -1
  858. package/assets/esri/core/workers/chunks/188272af9a6470ccfe31.js +0 -1
  859. package/assets/esri/core/workers/chunks/18da83afbc324fef9fd8.js +0 -316
  860. package/assets/esri/core/workers/chunks/1a9f544f20f643161a36.js +0 -1
  861. package/assets/esri/core/workers/chunks/1cfcadaa98ac528fea37.js +0 -1
  862. package/assets/esri/core/workers/chunks/1db0bf570a04687b3130.js +0 -1
  863. package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
  864. package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +0 -2
  865. package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +0 -1
  866. package/assets/esri/core/workers/chunks/2a5f331c0f18d8574b4e.js +0 -1
  867. package/assets/esri/core/workers/chunks/2a900a632a1231deb713.js +0 -1
  868. package/assets/esri/core/workers/chunks/31c6e951b99315e8e68a.js +0 -1
  869. package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
  870. package/assets/esri/core/workers/chunks/35491fbdd287470d40a4.js +0 -1
  871. package/assets/esri/core/workers/chunks/36247c6f6fc2891df2cf.js +0 -1
  872. package/assets/esri/core/workers/chunks/36fe6b8228e622407ec2.js +0 -1
  873. package/assets/esri/core/workers/chunks/3d22fe2f2c40abbc246e.js +0 -1
  874. package/assets/esri/core/workers/chunks/3d53307efbc3f07d7bf2.js +0 -1
  875. package/assets/esri/core/workers/chunks/3d65b8a2fbe1df050a25.js +0 -1
  876. package/assets/esri/core/workers/chunks/40b81d1c2d53cf598b8e.js +0 -1
  877. package/assets/esri/core/workers/chunks/42a72e1d963e4636323b.js +0 -1
  878. package/assets/esri/core/workers/chunks/456161a323be7d640c61.js +0 -1
  879. package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
  880. package/assets/esri/core/workers/chunks/4c4227b0ea21a5e429ab.js +0 -1
  881. package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
  882. package/assets/esri/core/workers/chunks/500d09d2191127371081.js +0 -1
  883. package/assets/esri/core/workers/chunks/50864c1924030e62497d.js +0 -1
  884. package/assets/esri/core/workers/chunks/5707713c2f27588b9194.js +0 -1
  885. package/assets/esri/core/workers/chunks/5713f96bade5ebb54c81.js +0 -1
  886. package/assets/esri/core/workers/chunks/5718cf135e105e1e026b.js +0 -1
  887. package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +0 -1
  888. package/assets/esri/core/workers/chunks/5d1d909354c90cb8eb60.js +0 -1
  889. package/assets/esri/core/workers/chunks/5ea03f53d4d64d9e7cae.js +0 -1
  890. package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
  891. package/assets/esri/core/workers/chunks/620a94b54be3ed78350d.js +0 -1
  892. package/assets/esri/core/workers/chunks/63019a7eb5222dc5e420.js +0 -1
  893. package/assets/esri/core/workers/chunks/64629ddcf008349eaf41.js +0 -1
  894. package/assets/esri/core/workers/chunks/64ee8d2acae2d6fce608.js +0 -1
  895. package/assets/esri/core/workers/chunks/650c94c0e8ab9721015e.js +0 -1
  896. package/assets/esri/core/workers/chunks/67f305b0c72e77a6331a.js +0 -1
  897. package/assets/esri/core/workers/chunks/6e5b3bbee054d072b594.js +0 -1
  898. package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
  899. package/assets/esri/core/workers/chunks/72ecf49d03bb24bf0998.js +0 -1
  900. package/assets/esri/core/workers/chunks/7421f9575487cdc9e28e.js +0 -1
  901. package/assets/esri/core/workers/chunks/77a11d7d53325d108ed8.js +0 -1
  902. package/assets/esri/core/workers/chunks/7c5c272612198db83851.js +0 -1
  903. package/assets/esri/core/workers/chunks/7d9882ddfa6495f72baa.js +0 -1
  904. package/assets/esri/core/workers/chunks/7fffad8ff6878fa1fd56.js +0 -1
  905. package/assets/esri/core/workers/chunks/81bbe5251ed13c0d91cc.js +0 -1
  906. package/assets/esri/core/workers/chunks/85622fe99f4d08afe875.js +0 -1
  907. package/assets/esri/core/workers/chunks/8b16aa50d879b92a5375.js +0 -1
  908. package/assets/esri/core/workers/chunks/8bc64fc7c4b9eb8fca4d.js +0 -1
  909. package/assets/esri/core/workers/chunks/8eefa133c36a004c054c.js +0 -1
  910. package/assets/esri/core/workers/chunks/91afee11072471e4eefe.js +0 -1
  911. package/assets/esri/core/workers/chunks/929ece362604dc301229.js +0 -1
  912. package/assets/esri/core/workers/chunks/9834bc11586a2d8d6f35.js +0 -1
  913. package/assets/esri/core/workers/chunks/9a723d739ac44b45432c.js +0 -1
  914. package/assets/esri/core/workers/chunks/9c6fc4fe2c46f40d63d9.js +0 -1
  915. package/assets/esri/core/workers/chunks/a5f25104938ab33e7a85.js +0 -1
  916. package/assets/esri/core/workers/chunks/a7bd294996e6c8b8354a.js +0 -1
  917. package/assets/esri/core/workers/chunks/a87521ebe632bf783ef4.js +0 -1
  918. package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
  919. package/assets/esri/core/workers/chunks/abf4f018c692c18c3320.js +0 -1
  920. package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +0 -1
  921. package/assets/esri/core/workers/chunks/b0b2670596d6d8c32b5e.js +0 -1
  922. package/assets/esri/core/workers/chunks/b1f667006cba60ef4aa7.js +0 -1
  923. package/assets/esri/core/workers/chunks/b2add7338258ca7c24dd.js +0 -1
  924. package/assets/esri/core/workers/chunks/b2d9f4e057af26a538fb.js +0 -1
  925. package/assets/esri/core/workers/chunks/b62807c6fcfb70a87cd4.js +0 -1
  926. package/assets/esri/core/workers/chunks/b8339c1d60847a9eed3e.js +0 -1
  927. package/assets/esri/core/workers/chunks/bc6619307f312f9241bf.js +0 -1
  928. package/assets/esri/core/workers/chunks/bfc1e8aec7aace3ff30e.js +0 -1
  929. package/assets/esri/core/workers/chunks/c0feec6e2f0e45900ae0.js +0 -1
  930. package/assets/esri/core/workers/chunks/c362fbbafec91c44eeb2.js +0 -1
  931. package/assets/esri/core/workers/chunks/c368a8e8d2f1535af446.js +0 -1
  932. package/assets/esri/core/workers/chunks/c55c096669677321a227.js +0 -1
  933. package/assets/esri/core/workers/chunks/c7a3a44cca5a7d52cca9.js +0 -1
  934. package/assets/esri/core/workers/chunks/c941d15190fc08523d0d.js +0 -1
  935. package/assets/esri/core/workers/chunks/cc70a4a915b0b2ccb2a0.js +0 -1
  936. package/assets/esri/core/workers/chunks/d121045cddbe55c2ecb2.js +0 -1
  937. package/assets/esri/core/workers/chunks/d2120a623b1bd91b9ed9.js +0 -1
  938. package/assets/esri/core/workers/chunks/d466f3f0d3824c77da7c.js +0 -1
  939. package/assets/esri/core/workers/chunks/d78c2833cdc4730a88a3.js +0 -1
  940. package/assets/esri/core/workers/chunks/dabc5a38a472c9719df9.js +0 -1
  941. package/assets/esri/core/workers/chunks/dc31865edea480f0ebba.js +0 -1
  942. package/assets/esri/core/workers/chunks/df438b62702007267798.js +0 -1
  943. package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
  944. package/assets/esri/core/workers/chunks/e6fc278e2390d2787345.js +0 -1
  945. package/assets/esri/core/workers/chunks/f4eb090bcc3eca64306a.js +0 -1
  946. package/assets/esri/core/workers/chunks/f7846523adacbfe5047e.js +0 -1
  947. package/assets/esri/core/workers/chunks/f839b86bee15deaf84e4.js +0 -1
  948. package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +0 -1
  949. package/assets/esri/core/workers/chunks/fa5c87889c2f0bef896b.js +0 -1
  950. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +0 -5
  951. package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
  952. package/views/3d/support/StreamDataLoader.js +0 -5
  953. package/views/3d/support/StreamDataRequester.js +0 -5
  954. package/views/3d/support/downloadSlots.js +0 -5
  955. package/views/draw/input/DrawEvents.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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Graphic.js";import{equals as t}from"../../../core/arrayUtils.js";import o from"../../../geometry/Point.js";import r from"../../../geometry/Polyline.js";import{getMidpoint as i}from"../../../geometry/support/coordsUtils.js";import{isMultipoint as n,isPolygon as s,isPolyline as c}from"../../../geometry/support/typeUtils.js";import{interpolateBezierCurve as l,splitBezierCurve as a}from"../../../geometry/support/curves/bezierCurveUtils.js";import{interpolateCircle as p}from"../../../geometry/support/curves/circleUtils.js";import{deriveCircleFromCircularArc as u,splitCircularArc as m}from"../../../geometry/support/curves/circularArcUtils.js";import{getEndpoint as d,isCoordinate as f,isBezierCurve as h,isEllipticArc4 as y,isCircularArc as v,isEllipticArc as g,isEllipticArc7 as x}from"../../../geometry/support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as b,splitEllipticArc4 as w}from"../../../geometry/support/curves/ellipticArc4Utils.js";import{deriveEllipse as z,interpolateEllipse as I,splitEllipticArc7 as j}from"../../../geometry/support/curves/ellipticArc7Utils.js";import P from"../../../symbols/SimpleLineSymbol.js";import S from"../../../symbols/SimpleMarkerSymbol.js";import{settings as C}from"./settings.js";const R={pathIndex:"pathIndex",pointIndex:"pointIndex",pointIndexStart:"pointIndexStart",pointIndexEnd:"pointIndexEnd",controlPointKind:"kind",relatedGraphicIndices:"relatedGraphicIndices",curveFromStraightEdgeFlag:"curveFromStraightEdgeFlag",tool:"esriSketchTool"},U={bezier:{cp1:"bezier-cp-1",cp2:"bezier-cp-2",line1:"bezier-line-1",line2:"bezier-line-2"},circle:{interior:"circle-interior"}},k="box",E=C.reshapeGraphics,T={vertices:{default:new S({style:"circle",size:E.vertex.size,color:E.vertex.color,outline:{color:E.vertex.outlineColor,width:1}}),hover:new S({style:"circle",size:E.vertex.hoverSize,color:E.vertex.hoverColor,outline:{color:E.vertex.hoverOutlineColor,width:1}}),selected:new S({style:"circle",size:E.selected.size,color:E.selected.color,outline:{color:E.selected.outlineColor,width:1}})},controlPoints:{default:new S({style:"circle",size:E.vertex.size,color:E.vertex.outlineColor,outline:{color:E.vertex.color,width:1}}),hover:new S({style:"circle",size:E.vertex.hoverSize,color:E.vertex.hoverOutlineColor,outline:{color:E.vertex.hoverColor,width:1}}),selected:new S({style:"circle",size:E.selected.size,color:E.selected.outlineColor,outline:{color:E.selected.color,width:1}})},midpoints:{default:new S({style:"circle",size:E.midpoint.size,color:E.midpoint.color,outline:{color:E.midpoint.outlineColor,width:1}}),hover:new S({style:"circle",size:E.midpoint.size,color:E.midpoint.color,outline:{color:E.midpoint.outlineColor,width:1}})},constructionLines:new P({style:"solid",width:1,color:E.vertex.color})};function K(t,o,r){const i=[];return t?.forEach((t,n)=>{t.forEach((t,s)=>{i.push(new e({geometry:r.arrayToPoint(d(t)),symbol:o?.vertices?.default,attributes:{[R.tool]:k,[R.pathIndex]:n,[R.pointIndex]:s}}))})}),i}function F(t,o,r){const i=[];for(let n=0;n<t.length;n++){const s=t[n];if(!Z(t,n))for(let t=1;t<s.length;t++){const c=s[t];if(f(c))continue;const l=d(s[t-1]),a={[R.tool]:k,[R.pathIndex]:n,[R.pointIndex]:t};if(h(c)){const t=c.b.slice(1);i.push(...t.map((t,i)=>new e({geometry:r.arrayToPoint(t),symbol:o?.controlPoints?.default,attributes:{...a,[R.controlPointKind]:0===i?U.bezier.cp1:U.bezier.cp2}})))}const m=v(c),g=y(c);if(m||g){const t=m?u(l,c):b(l,c),n=p(t,.25);i.push(new e({geometry:r.arrayToPoint(n),symbol:o?.controlPoints?.default,attributes:{...a,[R.controlPointKind]:U.circle.interior}}))}}}return i}function G(t,o,i){const n=[],{spatialReference:s}=i;for(let c=0;c<t.length;c++){const i=t[c];for(let t=1;t<i.length;t++){const l=i[t];if(!h(l))continue;const[a,p,u]=l.b,m=d(i[t-1]),f={[R.tool]:k,[R.pathIndex]:c,[R.pointIndex]:t};n.push(new e({geometry:new r({paths:[[[m[0],m[1]],p]],spatialReference:s}),symbol:o?.constructionLines,attributes:{...f,[R.controlPointKind]:U.bezier.line1}}),new e({geometry:new r({paths:[[[a[0],a[1]],u]],spatialReference:s}),symbol:o?.constructionLines,attributes:{...f,[R.controlPointKind]:U.bezier.line2}}))}}return n}function L(t,o,r,i){const n=[];for(let s=0;s<t.length;s++){const c=t[s],l=O(t,s);for(let t=0;t<c.length;t++){const a=(t+1)%c.length;if((!i||l)&&0===a)continue;const p=M(c[t],c[a],r);n.push(new e({geometry:p,symbol:o.midpoints.default,attributes:{[R.tool]:k,[R.pathIndex]:s,[R.pointIndexStart]:t,[R.pointIndexEnd]:a}}))}}return n}function M(e,t,r){const n=d(e),s=d(t),{spatialReference:c}=r,a=r.arrayToVector(n),m=r.arrayToVector(s),g=r.toXYZ(a),x=r.toXYZ(m),[w,j,P]=i(g,x),S=r.hasM()?0:void 0;if(f(t))return new o({x:w,y:j,z:P,m:S,spatialReference:c});if(h(t)){const[e,r]=l(n,t,.5);return new o({x:e,y:r,z:P,m:S,spatialReference:c})}if(v(t)){const e=u(n,t),[r,i]=p(e,.5);return new o({x:r,y:i,z:P,m:S,spatialReference:c})}if(y(t)){const e=b(n,t),[r,i]=p(e,.5);return new o({x:r,y:i,z:P,m:S,spatialReference:c})}const C=z(n,t),[R,U]=I(C,.5);return new o({x:R,y:U,z:P,m:S,spatialReference:c})}function Z(e,o){const r=e.at(o);return 2===r?.length&&t(d(r[1]),d(r[0]))&&y(r[1])}function A(e,o){const r=e.at(o);return 2===r?.length&&t(d(r[1]),d(r[0]))&&x(r[1])}function O(e,o){const r=e.at(o);return 2===r?.length&&t(d(r[1]),d(r[0]))&&g(r[1])}function V(e,t){if(n(e))return void(e.points=t.flat());const o=t.some(e=>e.some(e=>!f(e)));s(e)?o?(e.curveRings=t,e.rings=[]):(e.rings=t,e.curveRings=void 0):c(e)&&(o?(e.curvePaths=t,e.paths=[]):(e.curvePaths=void 0,e.paths=t))}function X(e,t,o,r){const i=d(t);let n=[];switch(!0){case h(t):n=a(e,t,o);break;case v(t):{const r=u(e,t);n=m(r,t,o);break}case y(t):{const r=b(e,t);n=w(r,t,o);break}default:{const r=z(e,t);n=j(r,t,o);break}}if(n.length<2)return n;if(r.hasZ()){const t=e.at(2)??0,r=i.at(2)??0,s=t+(r-t)*o;d(n[0])[2]=s,d(n[1])[2]=r}if(r.hasM()){const e=r.hasZ()?3:2;d(n[0])[e]=0,d(n[1])[e]=i.at(-1)??0}return n}export{R as attributeKeys,U as controlPointKinds,G as createCurveConstructionLineGraphics,F as createCurveControlPointGraphics,L as createMidpointGraphics,K as createVertexGraphics,T as defaultSymbols,M as getMidpoint,Z as isSingleSegmentCircle,A as isSingleSegmentEllipse,O as isSingleSegmentPolygon,V as saveUpdatedCurveOrCoordinate,X as splitCurve,k as toolIdAttribute};
5
+ import e from"../../../Graphic.js";import{equals as t}from"../../../core/arrayUtils.js";import o from"../../../geometry/Point.js";import r from"../../../geometry/Polyline.js";import{getMidpoint as n}from"../../../geometry/support/coordsUtils.js";import{isMultipoint as i,isPolygon as s,isPolyline as l}from"../../../geometry/support/typeUtils.js";import{interpolateBezierCurve as c,splitBezierCurve as a}from"../../../geometry/support/curves/bezierCurveUtils.js";import{interpolateCircle as p}from"../../../geometry/support/curves/circleUtils.js";import{deriveCircleFromCircularArc as u,splitCircularArc as m}from"../../../geometry/support/curves/circularArcUtils.js";import{getEndpoint as d,isCoordinate as f,isBezierCurve as h,isEllipticArc4 as y,isCircularArc as v,isEllipticArc as g,isEllipticArc7 as x}from"../../../geometry/support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as b,splitEllipticArc4 as w}from"../../../geometry/support/curves/ellipticArc4Utils.js";import{deriveEllipse as z,interpolateEllipse as I,splitEllipticArc7 as j}from"../../../geometry/support/curves/ellipticArc7Utils.js";import P from"../../../symbols/SimpleLineSymbol.js";import S from"../../../symbols/SimpleMarkerSymbol.js";import{settings as C}from"./settings.js";const R={pathIndex:"pathIndex",pointIndex:"pointIndex",pointIndexStart:"pointIndexStart",pointIndexEnd:"pointIndexEnd",controlPointKind:"kind",relatedGraphicIndices:"relatedGraphicIndices",curveFromStraightEdgeFlag:"curveFromStraightEdgeFlag",tool:"esriSketchTool"},U={bezier:{cp1:"bezier-cp-1",cp2:"bezier-cp-2",line1:"bezier-line-1",line2:"bezier-line-2"},circle:{interior:"circle-interior"}},k="box",E=C.reshapeGraphics,T={vertices:{default:new S({style:"circle",size:E.vertex.size,color:E.vertex.color,outline:{color:E.vertex.outlineColor,width:1}}),hover:new S({style:"circle",size:E.vertex.hoverSize,color:E.vertex.hoverColor,outline:{color:E.vertex.hoverOutlineColor,width:1}}),selected:new S({style:"circle",size:E.selected.size,color:E.selected.color,outline:{color:E.selected.outlineColor,width:1}})},controlPoints:{default:new S({style:"diamond",size:E.vertex.size,color:E.vertex.color,outline:{color:E.vertex.outlineColor,width:1}}),hover:new S({style:"diamond",size:E.vertex.hoverSize,color:E.vertex.hoverColor,outline:{color:E.vertex.hoverOutlineColor,width:1}}),selected:new S({style:"diamond",size:E.selected.size,color:E.selected.color,outline:{color:E.selected.outlineColor,width:1}})},midpoints:{default:new S({style:"circle",size:E.midpoint.size,color:E.midpoint.color,outline:{color:E.midpoint.outlineColor,width:1}}),hover:new S({style:"circle",size:E.midpoint.size,color:E.midpoint.color,outline:{color:E.midpoint.outlineColor,width:1}})},constructionLines:new P({style:"solid",width:1,color:E.vertex.color})};function K(t,o,r){const n=[];return t?.forEach((t,i)=>{t.forEach((t,s)=>{n.push(new e({geometry:r.arrayToPoint(d(t)),symbol:o?.vertices?.default,attributes:{[R.tool]:k,[R.pathIndex]:i,[R.pointIndex]:s}}))})}),n}function F(t,o,r){const n=[];for(let i=0;i<t.length;i++){const s=t[i];if(!Z(t,i))for(let t=1;t<s.length;t++){const l=s[t];if(f(l))continue;const c=d(s[t-1]),a={[R.tool]:k,[R.pathIndex]:i,[R.pointIndex]:t};if(h(l)){const t=l.b.slice(1);n.push(...t.map((t,n)=>new e({geometry:r.arrayToPoint(t),symbol:o?.controlPoints?.default,attributes:{...a,[R.controlPointKind]:0===n?U.bezier.cp1:U.bezier.cp2}})))}const m=v(l),g=y(l);if(m||g){const t=m?u(c,l):b(c,l),i=p(t,.25);n.push(new e({geometry:r.arrayToPoint(i),symbol:o?.controlPoints?.default,attributes:{...a,[R.controlPointKind]:U.circle.interior}}))}}}return n}function G(t,o,n){const i=[],{spatialReference:s}=n;for(let l=0;l<t.length;l++){const n=t[l];for(let t=1;t<n.length;t++){const c=n[t];if(!h(c))continue;const[a,p,u]=c.b,m=d(n[t-1]),f={[R.tool]:k,[R.pathIndex]:l,[R.pointIndex]:t};i.push(new e({geometry:new r({paths:[[[m[0],m[1]],p]],spatialReference:s}),symbol:o?.constructionLines,attributes:{...f,[R.controlPointKind]:U.bezier.line1}}),new e({geometry:new r({paths:[[[a[0],a[1]],u]],spatialReference:s}),symbol:o?.constructionLines,attributes:{...f,[R.controlPointKind]:U.bezier.line2}}))}}return i}function L(t,o,r,n){const i=[];for(let s=0;s<t.length;s++){const l=t[s],c=O(t,s);for(let t=0;t<l.length;t++){const a=(t+1)%l.length;if((!n||c)&&0===a)continue;const p=M(l[t],l[a],r);i.push(new e({geometry:p,symbol:o.midpoints.default,attributes:{[R.tool]:k,[R.pathIndex]:s,[R.pointIndexStart]:t,[R.pointIndexEnd]:a}}))}}return i}function M(e,t,r){const i=d(e),s=d(t),{spatialReference:l}=r,a=r.arrayToVector(i),m=r.arrayToVector(s),g=r.toXYZ(a),x=r.toXYZ(m),[w,j,P]=n(g,x),S=r.hasM()?0:void 0;if(f(t))return new o({x:w,y:j,z:P,m:S,spatialReference:l});if(h(t)){const[e,r]=c(i,t,.5);return new o({x:e,y:r,z:P,m:S,spatialReference:l})}if(v(t)){const e=u(i,t),[r,n]=p(e,.5);return new o({x:r,y:n,z:P,m:S,spatialReference:l})}if(y(t)){const e=b(i,t),[r,n]=p(e,.5);return new o({x:r,y:n,z:P,m:S,spatialReference:l})}const C=z(i,t),[R,U]=I(C,.5);return new o({x:R,y:U,z:P,m:S,spatialReference:l})}function Z(e,o){const r=e.at(o);return 2===r?.length&&t(d(r[1]),d(r[0]))&&y(r[1])}function A(e,o){const r=e.at(o);return 2===r?.length&&t(d(r[1]),d(r[0]))&&x(r[1])}function O(e,o){const r=e.at(o);return 2===r?.length&&t(d(r[1]),d(r[0]))&&g(r[1])}function V(e,t){if(i(e))return void(e.points=t.flat());const o=t.some(e=>e.some(e=>!f(e)));s(e)?o?(e.curveRings=t,e.rings=[]):(e.rings=t,e.curveRings=void 0):l(e)&&(o?(e.curvePaths=t,e.paths=[]):(e.curvePaths=void 0,e.paths=t))}function X(e,t,o,r){const n=d(t);let i=[];switch(!0){case h(t):i=a(e,t,o);break;case v(t):{const r=u(e,t);i=m(r,t,o);break}case y(t):{const r=b(e,t);i=w(r,t,o);break}default:{const r=z(e,t);i=j(r,t,o);break}}if(i.length<2)return i;if(r.hasZ()){const t=e.at(2)??0,r=n.at(2)??0,s=t+(r-t)*o;d(i[0])[2]=s,d(i[1])[2]=r}if(r.hasM()){const e=r.hasZ()?3:2;d(i[0])[e]=0,d(i[1])[e]=n.at(-1)??0}return i}export{R as attributeKeys,U as controlPointKinds,G as createCurveConstructionLineGraphics,F as createCurveControlPointGraphics,L as createMidpointGraphics,K as createVertexGraphics,T as defaultSymbols,M as getMidpoint,Z as isSingleSegmentCircle,A as isSingleSegmentEllipse,O as isSingleSegmentPolygon,V as saveUpdatedCurveOrCoordinate,X as splitCurve,k as toolIdAttribute};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as t}from"../../core/arrayUtils.js";import"../../core/has.js";import{clone as n}from"../../core/lang.js";import{clamp as e}from"../../core/mathUtils.js";import{createScreenPoint as r}from"../../core/screenUtils.js";import{project as o}from"../../geometry/projectionUtils.js";import{isMeshWithRelativeVertexSpace as a}from"../../geometry/support/meshVertexSpaceUtils.js";import{clonePoint as l,hydratedSpatialReference as c}from"../../layers/graphics/hydratedFeatures.js";import{getZForElevationMode as s}from"../../support/elevationInfoUtils.js";import{EditGeometryOperations as u}from"./editGeometry/EditGeometryOperations.js";function i(t,n){let e=null,r=null;return o=>{if("cancel"===o.action)return void(null!=r&&(r.execute({action:"cancel"}),e=null,r=null));const a={action:o.action,screenStart:o.start,screenEnd:o.screenPoint};"start"===o.action&&null==e&&(e=new D,r=new D,n(t,e,r,o.pointerType,a)),null!=e&&e.execute(a),"end"===o.action&&null!=e&&(e=null,r=null)}}function p(t,n){return t.events.on("drag",i(t,n))}function m(t,n){const e=[t.x,t.y,t.z??0],r=n,o=[Math.cos(r),Math.sin(r)],a=Math.sqrt(o[0]*o[0]+o[1]*o[1]);if(0===a)return null;o[0]/=a,o[1]/=a;const l=t=>{const n=(t.x-e[0])*o[0]+(t.y-e[1])*o[1];t.x=e[0]+n*o[0],t.y=e[1]+n*o[1]};return t=>(l(t.mapStart),l(t.mapEnd),{...t,axis:o})}function f(t){let n=null;const e=j();return r=>{if("start"===r.action&&(n=y(t,r.mapStart.spatialReference)),null==n)return null;const o=e(r);if(!o)return null;const{translationX:a,translationY:l,translationZ:c}=o;return n.move(a,l,c,r.action),o}}function d(t,n){return null==t?null:t.spatialReference.equals(n)?t.clone():o(t,n)}function y(t,n){const e=t.operations;if(!e)return null;const r=e.data.geometry,l=c(n);if(r.spatialReference.equals(l))return x(t,e,()=>{});if("mesh"!==r.type){const n=d(r,l);if(null==n)return null;const a=r.spatialReference;return x(t,u.fromGeometry(n,e.viewingMode),()=>{const t=o(r,a);e.trySetGeometry(t)})}if(a(r)){const n=d(r.origin,l);if(!n)return null;const a=r.spatialReference,c=u.fromGeometry(n,e.viewingMode);return x(t,e,()=>{const t=o(c.data.geometry,a),n=t.x-r.origin.x,l=t.y-r.origin.y,s=(t.z??0)-(r.origin.z??0);e.move(n,l,s)})}return null}function x(t,n,e){let r=0,o=0,a=0;return{move:(l,c,s,u)=>{"start"===u&&(r=0,o=0,a=0);const i=l-r,p=c-o,m=s-a;n.move(i,p,m),r+=i,o+=p,a+=m,e(),"end"===u&&t.endInteraction?.()}}}function E(t,n=null,e){let r=null;const a=null==n||t.spatialReference?.equals(n)?t=>t:t=>null!=t?o(t,n):t,l={exclude:[],...e};return n=>{if("start"===n.action&&(r=a(t.toMap(n.screenStart,l))),null==r)return null;const e=a(t.toMap(n.screenEnd,l));return null!=e?{...n,mapStart:r,mapEnd:e}:null}}function S(n){const e=n.map(t=>f(t)).filter(t),r=j();return t=>{const n=r(t);return e.forEach(n=>n(t)),n}}function h(t,e){const r=new Map;for(const o of e)r.set(o,n(t[o]));return n=>(r.forEach((n,e)=>{t[e]=n}),n)}function g(t){const n=t.operations?.createResetState();return t=>(n?.remove(),t)}function v(t){const n=t.map(t=>g(t)).filter(t=>null!=t);return t=>(n.forEach(n=>n(t)),t)}function z(){let t=0,n=0,e=0;return r=>{"start"===r.action&&(t=r.mapStart.x,n=r.mapStart.y,e=r.mapStart.z??0);const o=r.mapEnd.x-t,a=r.mapEnd.y-n,l=(r.mapEnd.z??0)-e;return t=r.mapEnd.x,n=r.mapEnd.y,e=r.mapEnd.z,{...r,mapDeltaX:o,mapDeltaY:a,mapDeltaZ:l,mapDeltaSpatialReference:r.mapStart.spatialReference}}}function j(){let t=0,n=0,e=0;return r=>{"start"===r.action&&(t=r.mapStart.x,n=r.mapStart.y,e=r.mapStart.z??0);const o=r.mapEnd.x-t,a=r.mapEnd.y-n,l=(r.mapEnd.z??0)-e;return{...r,translationX:o,translationY:a,translationZ:l}}}function M(){let t=0,n=0;return e=>{"start"===e.action&&(t=e.screenStart.x,n=e.screenStart.y);const r=e.screenEnd.x-t,o=e.screenEnd.y-n;return t=e.screenEnd.x,n=e.screenEnd.y,{...e,screenDeltaX:r,screenDeltaY:o}}}function R(t,n){let o=null,a=0,l=0;return c=>{if("start"===c.action&&(o=t.toScreen?.(n),null!=o&&(o.x<0||o.x>t.width||o.y<0||o.y>t.height?o=null:(a=c.screenStart.x-o.x,l=c.screenStart.y-o.y))),null==o)return null;const s=e(c.screenEnd.x-a,0,t.width),u=e(c.screenEnd.y-l,0,t.height),i=r(s,u);return c.screenStart=o,c.screenEnd=i,c}}const w=()=>{};class D{constructor(){this.execute=w}next(t,n=new D){return null!=t&&(this.execute=e=>{const r=t(e);null!=r&&n.execute(r)}),n}}function U(t,n,e=[]){if("2d"===t.type)return t=>t;let r=null;return o=>{"start"===o.action&&(r=t.toMap(o.screenStart,{exclude:e}),null!=r&&(r.z=s(r,t,n)));const a=t.toMap(o.screenEnd,{exclude:e});null!=a&&(a.z=s(a,t,n));const l=null!=r&&null!=a?{sceneStart:r,sceneEnd:a}:null;return{...o,scenePoints:l}}}function G(t,n,e){const r=n.elevationProvider.getElevation(t.x,t.y,t.z??0,t.spatialReference,"scene")??0,o=l(t);return o.z=r,o.hasZ=!0,o.z=s(o,n,e),o}function q(t,n){if("2d"===t.type)return t=>t;let e=null;return r=>{"start"===r.action&&(e=G(r.mapStart,t,n));const o=G(r.mapEnd,t,n),a=null!=e&&null!=o?{sceneStart:e,sceneEnd:o}:null;return{...r,scenePoints:a}}}export{D as EventPipeline,z as addMapDelta,j as addMapTranslation,M as addScreenDelta,m as constrainToMapAxis,i as createDragEventPipelineCallback,p as createManipulatorDragEventPipeline,R as dragAtLocation,f as dragManipulatedObject,S as dragManipulatedObjectMany,g as resetManipulatedObject,v as resetManipulatedObjectMany,h as resetProperties,U as sceneSnappingAtLocation,q as sceneSnappingAtProjectedLocation,E as screenToMap};
5
+ import{isSome as t}from"../../core/arrayUtils.js";import"../../core/has.js";import{clone as n}from"../../core/lang.js";import{clamp as e}from"../../core/mathUtils.js";import{createScreenPoint as r}from"../../core/screenUtils.js";import{project as a}from"../../geometry/projectionUtils.js";import{isMeshWithRelativeVertexSpace as o}from"../../geometry/support/meshVertexSpaceUtils.js";import{clonePoint as l,hydratedSpatialReference as c}from"../../layers/graphics/hydratedFeatures.js";import{getZForElevationMode as s}from"../../support/elevationInfoUtils.js";import{EditGeometryOperations as u}from"./editGeometry/EditGeometryOperations.js";function i(t,n){let e=null,r=null;return a=>{if("cancel"===a.action)return void(null!=r&&(r.execute({action:"cancel"}),e=null,r=null));const o={action:a.action,screenStart:a.start,screenEnd:a.screenPoint};"start"===a.action&&null==e&&(e=new D,r=new D,n(t,e,r,a.pointerType,o)),null!=e&&e.execute(o),"end"===a.action&&null!=e&&(e=null,r=null)}}function p(t,n){return t.events.on("drag",i(t,n))}function m(t,n){const e=[t.x,t.y,t.z??0],r=n,a=[Math.cos(r),Math.sin(r)],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]);if(0===o)return null;a[0]/=o,a[1]/=o;const l=t=>{const n=(t.x-e[0])*a[0]+(t.y-e[1])*a[1];t.x=e[0]+n*a[0],t.y=e[1]+n*a[1]};return t=>(l(t.mapStart),l(t.mapEnd),{...t,axis:a})}function f(t){let n=null;const e=j();return r=>{if("start"===r.action&&(n=y(t,r.mapStart.spatialReference)),null==n)return null;const a=e(r);if(!a)return null;const{translationX:o,translationY:l,translationZ:c}=a;return n.move(o,l,c,r.action),a}}function d(t,n){return null==t?null:t.spatialReference.equals(n)?t.clone():a(t,n)}function y(t,n){const e=t.operations;if(!e)return null;const r=e.data.geometry,l=c(n);if(r.spatialReference.equals(l))return x(t,e,()=>{});if("mesh"!==r.type){const n=d(r,l);if(null==n)return null;const o=r.spatialReference,c=u.fromGeometry(n,e.viewingMode);return x(t,c,()=>{const t=c.data.geometry,n=a(t,o);e.trySetGeometry(n)})}if(o(r)){const n=d(r.origin,l);if(!n)return null;const o=r.spatialReference,c=u.fromGeometry(n,e.viewingMode);return x(t,e,()=>{const t=a(c.data.geometry,o),n=t.x-r.origin.x,l=t.y-r.origin.y,s=(t.z??0)-(r.origin.z??0);e.move(n,l,s)})}return null}function x(t,n,e){let r=0,a=0,o=0;return{move:(l,c,s,u)=>{"start"===u&&(r=0,a=0,o=0);const i=l-r,p=c-a,m=s-o;n.move(i,p,m),r+=i,a+=p,o+=m,e(),"end"===u&&t.endInteraction?.()}}}function E(t,n=null,e){let r=null;const o=null==n||t.spatialReference?.equals(n)?t=>t:t=>null!=t?a(t,n):t,l={exclude:[],...e};return n=>{if("start"===n.action&&(r=o(t.toMap(n.screenStart,l))),null==r)return null;const e=o(t.toMap(n.screenEnd,l));return null!=e?{...n,mapStart:r,mapEnd:e}:null}}function S(n){const e=n.map(t=>f(t)).filter(t),r=j();return t=>{const n=r(t);return e.forEach(n=>n(t)),n}}function h(t,e){const r=new Map;for(const a of e)r.set(a,n(t[a]));return n=>(r.forEach((n,e)=>{t[e]=n}),n)}function g(t){const n=t.operations?.createResetState();return t=>(n?.remove(),t)}function v(t){const n=t.map(t=>g(t)).filter(t=>null!=t);return t=>(n.forEach(n=>n(t)),t)}function z(){let t=0,n=0,e=0;return r=>{"start"===r.action&&(t=r.mapStart.x,n=r.mapStart.y,e=r.mapStart.z??0);const a=r.mapEnd.x-t,o=r.mapEnd.y-n,l=(r.mapEnd.z??0)-e;return t=r.mapEnd.x,n=r.mapEnd.y,e=r.mapEnd.z,{...r,mapDeltaX:a,mapDeltaY:o,mapDeltaZ:l,mapDeltaSpatialReference:r.mapStart.spatialReference}}}function j(){let t=0,n=0,e=0;return r=>{"start"===r.action&&(t=r.mapStart.x,n=r.mapStart.y,e=r.mapStart.z??0);const a=r.mapEnd.x-t,o=r.mapEnd.y-n,l=(r.mapEnd.z??0)-e;return{...r,translationX:a,translationY:o,translationZ:l}}}function M(){let t=0,n=0;return e=>{"start"===e.action&&(t=e.screenStart.x,n=e.screenStart.y);const r=e.screenEnd.x-t,a=e.screenEnd.y-n;return t=e.screenEnd.x,n=e.screenEnd.y,{...e,screenDeltaX:r,screenDeltaY:a}}}function R(t,n){let a=null,o=0,l=0;return c=>{if("start"===c.action&&(a=t.toScreen?.(n),null!=a&&(a.x<0||a.x>t.width||a.y<0||a.y>t.height?a=null:(o=c.screenStart.x-a.x,l=c.screenStart.y-a.y))),null==a)return null;const s=e(c.screenEnd.x-o,0,t.width),u=e(c.screenEnd.y-l,0,t.height),i=r(s,u);return c.screenStart=a,c.screenEnd=i,c}}const w=()=>{};class D{constructor(){this.execute=w}next(t,n=new D){return null!=t&&(this.execute=e=>{const r=t(e);null!=r&&n.execute(r)}),n}}function U(t,n,e=[]){if("2d"===t.type)return t=>t;let r=null;return a=>{"start"===a.action&&(r=t.toMap(a.screenStart,{exclude:e}),null!=r&&(r.z=s(r,t,n)));const o=t.toMap(a.screenEnd,{exclude:e});null!=o&&(o.z=s(o,t,n));const l=null!=r&&null!=o?{sceneStart:r,sceneEnd:o}:null;return{...a,scenePoints:l}}}function G(t,n,e){const r=n.elevationProvider.getElevation(t.x,t.y,t.z??0,t.spatialReference,"scene")??0,a=l(t);return a.z=r,a.hasZ=!0,a.z=s(a,n,e),a}function q(t,n){if("2d"===t.type)return t=>t;let e=null;return r=>{"start"===r.action&&(e=G(r.mapStart,t,n));const a=G(r.mapEnd,t,n),o=null!=e&&null!=a?{sceneStart:e,sceneEnd:a}:null;return{...r,scenePoints:o}}}export{D as EventPipeline,z as addMapDelta,j as addMapTranslation,M as addScreenDelta,m as constrainToMapAxis,i as createDragEventPipelineCallback,p as createManipulatorDragEventPipeline,R as dragAtLocation,f as dragManipulatedObject,S as dragManipulatedObjectMany,g as resetManipulatedObject,v as resetManipulatedObjectMany,h as resetProperties,U as sceneSnappingAtLocation,q as sceneSnappingAtProjectedLocation,E as screenToMap};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as t,__addDisposableResource as e,__disposeResources as s}from"tslib";import r from"../../../core/Accessor.js";import{disposable as o}from"../../../core/handleUtils.js";import{addMany as i,deleteMany as n}from"../../../core/SetUtils.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{trackAccess as p}from"../../../core/accessorSupport/tracking.js";import{SimpleObservable as h}from"../../../core/accessorSupport/tracking/SimpleObservable.js";import{Part as l,EditGeometry as d}from"./EditGeometry.js";import{EditGeometryOperations as u}from"./EditGeometryOperations.js";import{ReplayableAppendVertex as y}from"./operations/ReplayableAppendVertex.js";import{UndoGroup as f}from"./operations/UndoGroup.js";class m extends u{constructor(t,e,s){super(t,e,s),this._checkpoints=[],this._observable=new h,this._suppressChangeEvents=!1}createCheckpoint(t,e){const s=new _({data:this.data,status:t,geometryType:e});return this._checkpoints.push(s),s}completeCheckpoint(t){const e=t?this._checkpoints.indexOf(t):-1;if(e<0||!t)return null;this._checkpoints.splice(e,1);const s=e-1,r=s>-1?this._checkpoints.at(s):void 0;return r?.merge(t)??t.destroy(),this._checkpoints.forEach(t=>"committed"===t.status&&t.redoStack?.splice(0)),this._observable.notify(),null}cancelCheckpoint(t){const e=t?this._checkpoints.indexOf(t):-1;if(e<0||!t)return null;this._checkpoints.splice(e,1);return t.close().undo(),this._observable.notify(),null}undo(){const t=this._checkpoints.findLast(t=>"committed"===t.status&&t.undoStack?.length);if(!t)return null;const e=this._checkpoints.filter(t=>"committed"!==t.status).reverse(),s=this._suppressEvents(()=>e.map(t=>({cp:t,ops:t.rewind()})));try{return t?.undo()}finally{s&&this._suppressEvents(()=>{for(const{cp:t,ops:e}of s)t.replay(e)}),this._observable.notify(),this._checkpoints.forEach(t=>t.notify())}}redo(){const t=this._checkpoints.find(t=>"committed"===t.status&&t.redoStack?.length);if(!t)return null;const e=this._checkpoints.filter(t=>"committed"!==t.status).reverse(),s=this._suppressEvents(()=>e.map(t=>({cp:t,ops:t.rewind()})));try{return t?.redo()}finally{s&&this._suppressEvents(()=>{for(const{cp:t,ops:e}of s)t.replay(e)}),this._observable.notify(),this._checkpoints.forEach(t=>t.notify())}}emit(t,e){return!this._suppressChangeEvents&&super.emit(t,e)}appendVertex(t,e){return e??=new l(this.data.spatialReference,this.viewingMode),this._apply(new y(this.data,e,t))}appendVertexToFirstPart(t){const e=this.data.parts.at(0);return e?this._apply(new y(this.data,e,t)):null}get canUndo(){return p(this._observable),this._checkpoints.some(t=>"committed"===t.status&&t.undoStack?.length)}get canRedo(){return p(this._observable),this._checkpoints.some(t=>"committed"===t.status&&t.redoStack?.length)}get lastOperation(){return p(this._observable),this._checkpoints?.findLast(t=>(t.undoStack?.length??0)>0)?.undoStack?.at(-1)}_apply(t,e=1){const s=this._checkpoints.at(-1);if(!s)return t;const r=s.undoStack?.at(-1);try{if(0!==e&&null!=r&&r.accumulate(t))s.notify();else{const e=k(t,this.data,"apply");s.undoStack?.push(t),s.syncOwnVertices(e),s.redoStack?.splice(0)}}finally{this._observable.notify()}return t}get test(){const{_checkpoints:t,_undoStack:e,_redoStack:s}=this;return{checkpoints:t,undoStack:e,redoStack:s}}_suppressEvents(t){this._suppressChangeEvents=!0;try{return t()}finally{this._suppressChangeEvents=!1}}static fromGeometry(t,e,s){return new m(d.fromGeometry(t,e,s),e,!!s?.allowCurves)}}let _=class extends r{constructor(t){super(t),this.undoStack=[],this.redoStack=[],this._ownVertices=new Set,this.data=null,this.status=t.status,this.geometryType=t.geometryType}destroy(){this.undoStack=null,this.redoStack=null,this._ownVertices.clear(),this.data=null}get finalVertex(){return this._finalVertex}get geometry(){const t=this._startingVertex?.leftSegment?.leftVertex??this._startingVertex;return t||this._finalVertex?this.data?.getPartialGeometry(t,this._finalVertex,this.geometryType):null}undo(){const t=this.undoStack?.pop();return t&&this.data&&(this.syncOwnVertices(k(t,this.data,"undo")),this.redoStack?.push(t)),this.notify(),t}redo(){const t=this.redoStack?.pop();return t&&this.data&&(this.syncOwnVertices(k(t,this.data,"redo")),this.undoStack?.push(t)),this.notify(),t}rewind(){const t=[];let e=this.undoStack?.pop();for(;e;)e.undo(),t.push(e),e=this.undoStack?.pop();return t}replay(t){let e=t.pop();for(;e;)e.apply(),this.undoStack?.push(e),e=t.pop();this.notify()}syncOwnVertices(t){const e=this._ownVertices;for(const o of t){const{addedVertices:t,removedVertices:s}=o;i(e,t),n(e,s)}let s=null,r=null;for(const o of e)(!s||o.part.index<s.part.index||o.part.index===s.part.index&&o.index<=s.index)&&(s=o),(!r||o.part.index>r.part.index||o.part.index===r.part.index&&o.index>r.index)&&(r=o);this._startingVertex=s,this._finalVertex=r}close(){const t=new f(this.undoStack??[]);return this.destroy(),t}merge(t){i(this._ownVertices,t._ownVertices),this.undoStack?.push(t.close()),this.redoStack?.splice(0),this.syncOwnVertices([]),this.notify()}notify(){this.notifyChange("geometry")}get test(){const{_finalVertex:t,_startingVertex:e,_ownVertices:s}=this;return{finalVertex:t,startingVertex:e,ownedVertices:s}}};function k(t,r,i){const n={stack:[],error:void 0,hasError:!1};try{const s=[];e(n,o(r.on("change",t=>s.push(t))),!1);switch(i){case"apply":case"redo":t.apply();break;case"undo":t.undo()}return s}catch(c){n.error=c,n.hasError=!0}finally{s(n)}}t([c({constructOnly:!0})],_.prototype,"status",void 0),t([c({constructOnly:!0})],_.prototype,"geometryType",void 0),t([c()],_.prototype,"data",void 0),t([c()],_.prototype,"finalVertex",null),t([c()],_.prototype,"geometry",null),t([c()],_.prototype,"_startingVertex",void 0),t([c()],_.prototype,"_finalVertex",void 0),_=t([a("esri.views.interactive.editGeometry.CheckpointingEditGeometryOperations")],_);export{_ as Checkpoint,m as CheckpointingEditGeometryOperations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{equals as t}from"../../../core/arrayUtils.js";import{neverReached as e}from"../../../core/compilerUtils.js";import{Evented as r}from"../../../core/Evented.js";import i from"../../../geometry/Multipoint.js";import s from"../../../geometry/Polygon.js";import n from"../../../geometry/Polyline.js";import{isCoordinate as o,isBezierCurve as h,isCircularArc as c,isEllipticArc4 as a,getEndpoint as l}from"../../../geometry/support/curves/curveUtils.js";import{createCoordinateHelper as p}from"../coordinateHelper.js";import{unnormalize as u,getUnnormalizationInfo as g}from"./unnormalizationHelper.js";class f{constructor(t){this.part=t,this.leftSegment=null,this.rightSegment=null,this.type="vertex",this.index=null}get pos(){return this._pos}set pos(t){this._pos=t,this.part.unnormalizeVertexPositions()}}class m{constructor(t,e,r){this.part=t,this.leftVertex=e,this.rightVertex=r,this.type="line",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){return[...this.rightVertex.pos]}}class d{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="bezier",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){return{b:[[...this.rightVertex.pos],[...this.curveDefinition.controlPoint1],[...this.curveDefinition.controlPoint2]]}}}class y{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="circular-arc",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{interiorPoint:e}=this.curveDefinition;return{c:[[...t],[...e]]}}}class v{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="elliptic-arc-4",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{centerPoint:e,sweep:r,orientation:i}=this.curveDefinition;return{a:[[...t],[...e],r,i]}}}class x{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="elliptic-arc-7",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{centerPoint:e,sweep:r,orientation:i,rotation:s,semiMajorAxisLength:n,minorMajorAxisRatio:o}=this.curveDefinition;return{a:[[...t],e,r,i,s,n,o]}}}class V{constructor(t,e){this._spatialReference=t,this._viewingMode=e,this.vertices=[],this.segments=[],this.index=null}unnormalizeVertexPositions(){this.vertices.length<=1||u(this.vertices,g(this._spatialReference,this._viewingMode))}updateVertexIndex(t,e){const{vertices:r}=this;if(0===r.length)return;const i=r[0];let s=null,n=t,o=e;do{s=n,s.index=o++,n=s.rightSegment?s.rightSegment.rightVertex:null}while(null!=n&&n!==i);s.leftSegment&&s!==r[r.length-1]&&this.swapVertices(r.indexOf(s),r.length-1)}getFirstVertex(){return this.vertices.at(0)}getLastVertex(){return this.vertices.at(-1)}isClosed(){return null!==this.getFirstVertex()?.leftSegment}swapVertices(t,e){const{vertices:r}=this,i=r[t];r[t]=r[e],r[e]=i}*iterateVertices(){const t=this.getFirstVertex();let e=t;if(e)do{yield e,e=e.rightSegment?.rightVertex}while(e!==t&&null!=e)}}class w extends r{constructor(t,e){super(),this.type=t,this.coordinateHelper=e,this._geometry=null,this._dirty=!0,this.parts=[]}get geometry(){if(this._dirty){switch(this.type){case"point":this._geometry=this._toPoint();break;case"multipoint":this._geometry=this._toMultipoint();break;case"polyline":this._geometry=this._toPolyline();break;case"polygon":this._geometry=this._toPolygon();break;case"mesh":break;default:e(this.type)}this._dirty=!1}return this._geometry}get spatialReference(){return this.coordinateHelper.spatialReference}get allVerticesUnordered(){return Array.from(this.iterateVerticesUnordered())}*iterateVerticesUnordered(){for(const t of this.parts)for(const e of t.vertices)yield e}get allVertices(){return Array.from(this.iterateVertices())}*iterateVertices(){for(const t of this.parts)yield*t.iterateVertices()}notifyChanges(t){this._dirty=!0,this.emit("change",t)}_toPoint(){const{parts:t,coordinateHelper:e}=this;return t.at(0)?.vertices.length?e.vectorToPoint(t[0].vertices[0].pos):null}_toMultipoint(){const t=[],{coordinateHelper:e,parts:r,spatialReference:s}=this;for(const i of r){const r=i.getFirstVertex();r&&t.push(e.arrayToVector(r.pos))}return new i({hasM:e.hasM(),hasZ:e.hasZ(),spatialReference:s,points:t})}_toPolyline(){const t=[];let e=!1;for(const r of this.parts){if(r.vertices.length<1)continue;const i=r.vertices[0],s=[];s.push(i.pos);let n=i.rightSegment;for(;n;)e||="line"!==n.type,s.push(n.toCurveOrCoordinate()),n=n.rightVertex.rightSegment;t.push(s)}return new n({paths:e?void 0:t,curvePaths:e?t:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}_toPolygon(){const t=[];let e=!1;for(const r of this.parts){if(r.vertices.length<1)continue;const i=r.vertices[0],s=[];s.push(i.pos);let n=i.rightSegment;for(;n&&(e||="line"!==n.type,s.push(n.toCurveOrCoordinate()),n=n.rightVertex.rightSegment,n?.leftVertex!==i););t.push(s)}return new s({rings:e?void 0:t,curveRings:e?t:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}static fromGeometry(t,e,r){const i=t.spatialReference,s=p(t.hasZ,t.hasM,i),n=new w(t.type,s);switch(t.type){case"polygon":S(n,t,e,r?.allowCurves??!1);break;case"polyline":R(n,t,e,r?.allowCurves??!1);break;case"point":C(n,t,e);break;case"multipoint":M(n,t,e);break;case"mesh":C(n,t.origin,e),n._geometry=t,n._dirty=!1}return n}}function _(t,e,r,i){const s=new f(t);t.vertices.push(s);const n=l(i);return s.pos=e.arrayToVector(n),s.index=t.vertices.length-1,r&&t.segments.push(P(t,r,s,i)),s}function P(t,e,r,i){if(o(i))return new m(t,e,r);if(h(i)){const[,s,n]=i.b;return new d(t,e,r,{controlPoint1:[...s],controlPoint2:[...n]})}if(c(i)){const[,s]=i.c;return new y(t,e,r,{interiorPoint:[...s]})}if(a(i)){const[,s,n,o]=i.a;return new v(t,e,r,{centerPoint:[...s],sweep:n,orientation:o})}const[,s,n,l,p,u,g]=i.a;return new x(t,e,r,{centerPoint:[...s],sweep:n,orientation:l,rotation:p,semiMajorAxisLength:u,minorMajorAxisRatio:g})}function S(e,r,i,s){const n=r.spatialReference,o=e.coordinateHelper,{rings:h,curveRings:c}=r,a=c&&s?c:h;for(let p=0;p<a.length;++p){const r=a[p],s=new V(n,i);if(s.index=p,e.parts.push(s),r.length<1)continue;let h=null,c=null;for(let t=0;t<r.length-1;++t)c=_(s,o,c,r[t]),h??=c;r.length>1&&t(l(r[r.length-1]),h?.pos)?c&&h&&s.segments.push(P(s,c,h,r[r.length-1])):c=_(s,o,c,r[r.length-1])}}function R(t,e,r,i){const s=e.spatialReference,n=t.coordinateHelper,{curvePaths:o,paths:h}=e,c=o&&i?o:h;for(let a=0;a<c.length;++a){const e=c[a],i=new V(s,r);if(i.index=a,t.parts.push(i),e.length<1)continue;let o=null;for(let t=0;t<e.length;++t)o=_(i,n,o,e[t])}}function C(t,e,r){const i=e.spatialReference,s=t.coordinateHelper,n=new V(i,r);n.index=0;const o=new f(n);o.index=0,o.pos=s.pointToVector(e),n.vertices.push(o),t.parts.push(n)}function M(t,e,r){const i=e.spatialReference,{coordinateHelper:s,parts:n}=t,o=e.points.map(t=>s.arrayToVector(t));for(let h=0;h<o.length;h++){const t=new V(i,r);t.index=h,n.push(t);const e=new f(t);e.pos=o[h],e.index=0,t.vertices.push(e)}}function H(t){return"mesh"===t.type}export{d as BezierSegment,y as CircularArcSegment,w as EditGeometry,v as EllipticArc4Segment,x as EllipticArc7Segment,m as LineSegment,V as Part,f as Vertex,P as createConnectingSegment,H as isMeshEditGeometry};
5
+ import{equals as t,pushIfSome as e}from"../../../core/arrayUtils.js";import{neverReached as r}from"../../../core/compilerUtils.js";import{Evented as i}from"../../../core/Evented.js";import s from"../../../geometry/Multipoint.js";import n from"../../../geometry/Polygon.js";import o from"../../../geometry/Polyline.js";import{getEndpoint as h,isCoordinate as a,isBezierCurve as c,isCircularArc as l,isEllipticArc4 as p}from"../../../geometry/support/curves/curveUtils.js";import{createCoordinateHelper as u}from"../coordinateHelper.js";import{unnormalize as g,getUnnormalizationInfo as f}from"./unnormalizationHelper.js";class m{constructor(t){this.part=t,this.leftSegment=null,this.rightSegment=null,this.type="vertex",this.index=null}get pos(){return this._pos}set pos(t){this._pos=t,this.part.unnormalizeVertexPositions()}}class d{constructor(t,e,r){this.part=t,this.leftVertex=e,this.rightVertex=r,this.type="line",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){return[...this.rightVertex.pos]}}class v{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="bezier",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){return{b:[[...this.rightVertex.pos],[...this.curveDefinition.controlPoint1],[...this.curveDefinition.controlPoint2]]}}}class y{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="circular-arc",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{interiorPoint:e}=this.curveDefinition;return{c:[[...t],[...e]]}}}class x{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="elliptic-arc-4",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{centerPoint:e,sweep:r,orientation:i}=this.curveDefinition;return{a:[[...t],[...e],r,i]}}}class V{constructor(t,e,r,i){this.part=t,this.leftVertex=e,this.rightVertex=r,this.curveDefinition=i,this.type="elliptic-arc-7",e.rightSegment=this,r.leftSegment=this}toCurveOrCoordinate(){const t=this.rightVertex.pos,{centerPoint:e,sweep:r,orientation:i,rotation:s,semiMajorAxisLength:n,minorMajorAxisRatio:o}=this.curveDefinition;return{a:[[...t],e,r,i,s,n,o]}}}class w{constructor(t,e,r=!1){this._spatialReference=t,this._viewingMode=e,this.autoClose=r,this.vertices=[],this.segments=[],this.index=null}unnormalizeVertexPositions(){this.vertices.length<=1||g(this.vertices,f(this._spatialReference,this._viewingMode))}updateVertexIndex(t,e){const{vertices:r}=this;if(0===r.length)return;const i=r[0];let s=null,n=t,o=e;do{s=n,s.index=o++,n=s.rightSegment?s.rightSegment.rightVertex:null}while(null!=n&&n!==i);s.leftSegment&&s!==r[r.length-1]&&this.swapVertices(r.indexOf(s),r.length-1)}getFirstVertex(){return this.vertices.at(0)}getLastVertex(){return this.vertices.at(-1)}isClosed(){return null!=this.getFirstVertex()?.leftSegment}swapVertices(t,e){const{vertices:r}=this,i=r[t];r[t]=r[e],r[e]=i}*iterateVertices(){const t=this.getFirstVertex();let e=t;if(e)do{yield e,e=e.rightSegment?.rightVertex}while(e!==t&&null!=e)}}class P extends i{constructor(t,e){super(),this.type=t,this.coordinateHelper=e,this._geometry=null,this._dirty=!0,this.parts=[]}get geometry(){if(this._dirty){switch(this.type){case"point":this._geometry=this._toPoint();break;case"multipoint":this._geometry=this._toMultipoint();break;case"polyline":this._geometry=this._toPolyline();break;case"polygon":this._geometry=this._toPolygon();break;case"mesh":break;default:r(this.type)}this._dirty=!1}return this._geometry}get spatialReference(){return this.coordinateHelper.spatialReference}get allVerticesUnordered(){return Array.from(this.iterateVerticesUnordered())}*iterateVerticesUnordered(){for(const t of this.parts)for(const e of t.vertices)yield e}get allVertices(){return Array.from(this.iterateVertices())}*iterateVertices(){for(const t of this.parts)yield*t.iterateVertices()}notifyChanges(t){this._dirty=!0,this.emit("change",t)}getPartialGeometry(t,e,r){const{parts:i,hasCurves:s}=M(this,{startingVertex:t,endingVertexInclusive:e,geometryType:r});return R(i,s,r,this.coordinateHelper)}_toPoint(){const{parts:t,coordinateHelper:e}=this;return t.at(0)?.vertices.length?e.vectorToPoint(t[0].vertices[0].pos):null}_toMultipoint(){const t=[],{coordinateHelper:e,parts:r,spatialReference:i}=this;for(const s of r){const r=s.getFirstVertex();r&&t.push(e.arrayToVector(r.pos))}return new s({hasM:e.hasM(),hasZ:e.hasZ(),spatialReference:i,points:t})}_toPolyline(){const t=[];let e=!1;for(const r of this.parts){if(r.vertices.length<1)continue;const i=r.vertices[0],s=[];s.push(i.pos);let n=i.rightSegment;for(;n;)e||="line"!==n.type,s.push(n.toCurveOrCoordinate()),n=n.rightVertex.rightSegment;t.push(s)}return new o({paths:e?void 0:t,curvePaths:e?t:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}_toPolygon(){const e=[];let r=!1;for(const i of this.parts){if(i.vertices.length<1)continue;const s=i.vertices[0],n=[];n.push(s.pos);let o=s.rightSegment;for(;o&&(r||="line"!==o.type,n.push(o.toCurveOrCoordinate()),o=o.rightVertex.rightSegment,o?.leftVertex!==s););if(i.autoClose&&n.length>1){const e=n.at(-1),r=h(n[0]),i=h(e);2===n.length&&a(e)||t(r,i)||n.push(r)}e.push(n)}return new n({rings:r?void 0:e,curveRings:r?e:void 0,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}static fromGeometry(t,e,r){const i=t.spatialReference,s=u(t.hasZ,t.hasM,i),n=new P(t.type,s);switch(t.type){case"polygon":S(n,t,e,r?.allowCurves??!1);break;case"polyline":b(n,t,e,r?.allowCurves??!1);break;case"point":H(n,t,e);break;case"multipoint":j(n,t,e);break;case"mesh":H(n,t.origin,e),n._geometry=t,n._dirty=!1}return n}}function _(t,e,r,i){const s=new m(t);t.vertices.push(s);const n=h(i);return s.pos=e.arrayToVector(n),s.index=t.vertices.length-1,r&&t.segments.push(C(t,r,s,i)),s}function C(t,e,r,i){if(a(i))return new d(t,e,r);if(c(i)){const[,s,n]=i.b;return new v(t,e,r,{controlPoint1:[...s],controlPoint2:[...n]})}if(l(i)){const[,s]=i.c;return new y(t,e,r,{interiorPoint:[...s]})}if(p(i)){const[,s,n,o]=i.a;return new x(t,e,r,{centerPoint:[...s],sweep:n,orientation:o})}const[,s,n,o,h,u,g]=i.a;return new V(t,e,r,{centerPoint:[...s],sweep:n,orientation:o,rotation:h,semiMajorAxisLength:u,minorMajorAxisRatio:g})}function R(t,e,r,i){const{spatialReference:a}=i;if("point"===r){const e=t.at(0)?.at(0);return e?i.arrayToPoint(h(e)):null}return"polygon"===r?new n({rings:e?void 0:t,curveRings:e?t:void 0,spatialReference:a,hasZ:i.hasZ(),hasM:i.hasM()}):"multipoint"===r?new s({spatialReference:a,points:t.flatMap(t=>t.map(t=>h(t))),hasM:i.hasM(),hasZ:i.hasZ()}):new o({paths:e?void 0:t,curvePaths:e?t:void 0,spatialReference:a,hasZ:i.hasZ(),hasM:i.hasM()})}function M(r,i){const s="polygon"===(i?.geometryType??r.type),n=[];let o=!1,c=!1,l=!1;for(const p of r.parts){let r=null;if(l)break;if(p.vertices.length<1)continue;if(i?.startingVertex){if(p!==i.startingVertex.part&&!c)continue;c=!0}const u=p===i?.startingVertex?.part?i.startingVertex:p.vertices.at(0),g=[];if(e(g,u?.pos),u===i?.endingVertexInclusive){l=!0,r=u,n.push(g);break}let f=u?.rightSegment;for(;f;){if(o||="line"!==f.type,g.push(f.toCurveOrCoordinate()),r=f.rightVertex,f.rightVertex===i?.endingVertexInclusive){l=!0;break}if(f=f.rightVertex.rightSegment,f?.leftVertex===u)break}const m=g.at(-1),d=p.getFirstVertex(),v=p.getLastVertex();s&&p.autoClose&&m&&r===v&&u===d&&(g.length>2||2===g.length&&!a(m))&&u?.pos&&!t(h(m),u.pos)&&g.push([...u.pos]),n.push(g)}return{parts:n,hasCurves:o}}function S(e,r,i,s){const n=r.spatialReference,o=e.coordinateHelper,{rings:a,curveRings:c}=r,l=c&&s?c:a;for(let p=0;p<l.length;++p){const r=l[p],s=new w(n,i);if(s.index=p,e.parts.push(s),r.length<1)continue;let a=null,c=null;for(let t=0;t<r.length-1;++t)c=_(s,o,c,r[t]),a??=c;r.length>1&&t(h(r[r.length-1]),a?.pos)?c&&a&&s.segments.push(C(s,c,a,r[r.length-1])):c=_(s,o,c,r[r.length-1])}}function b(t,e,r,i){const s=e.spatialReference,n=t.coordinateHelper,{curvePaths:o,paths:h}=e,a=o&&i?o:h;for(let c=0;c<a.length;++c){const e=a[c],i=new w(s,r);if(i.index=c,t.parts.push(i),e.length<1)continue;let o=null;for(let t=0;t<e.length;++t)o=_(i,n,o,e[t])}}function H(t,e,r){const i=e.spatialReference,s=t.coordinateHelper,n=new w(i,r);n.index=0;const o=new m(n);o.index=0,o.pos=s.pointToVector(e),n.vertices.push(o),t.parts.push(n)}function j(t,e,r){const i=e.spatialReference,{coordinateHelper:s,parts:n}=t,o=e.points.map(t=>s.arrayToVector(t));for(let h=0;h<o.length;h++){const t=new w(i,r);t.index=h,n.push(t);const e=new m(t);e.pos=o[h],e.index=0,t.vertices.push(e)}}function k(t){return"mesh"===t.type}export{v as BezierSegment,y as CircularArcSegment,P as EditGeometry,x as EllipticArc4Segment,V as EllipticArc7Segment,d as LineSegment,w as Part,m as Vertex,C as createConnectingSegment,k as isMeshEditGeometry,R as partialCoordsToGeometry,M as toPartialCoords};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{getEndpoint as e}from"../../../../geometry/support/curves/curveUtils.js";import{Vertex as t,createConnectingSegment as s,LineSegment as i}from"../EditGeometry.js";import{AppendVertex as r}from"./AppendVertex.js";class d extends r{apply(){let r="redo";const{_part:d,_editGeometry:n,_posOrCurveDef:l}=this;if(null==this._addedVertex&&(r="apply",this._addedVertex=new t(d)),!n.parts.includes(d)){this._partAdded=!0;const e=n.parts.at(-1)?.index??-1;d.index=e+1,n.parts.push(d)}const h=d.getLastVertex(),a=n.coordinateHelper.arrayToVector(e(l));if(null==h)this._addedVertex.leftSegment=null,this._addedVertex.rightSegment=null,d.vertices.push(this._addedVertex),this._addedVertex.pos=a,this._addedVertex.index=0;else{let e=null;h.rightSegment&&(this._originalSegment=h.rightSegment,e=this._originalSegment.rightVertex,d.segments.splice(d.segments.indexOf(this._originalSegment),1)),d.vertices.push(this._addedVertex),this._addedVertex.pos=a,this._left=s(d,h,this._addedVertex,l),d.segments.push(this._left),h.rightSegment=this._left,null!=e&&(this._right=new i(this._part,this._addedVertex,e),this._part.segments.push(this._right),e.leftSegment=this._right),d.updateVertexIndex(this._addedVertex,h.index+1)}n.notifyChanges({operation:r,addedVertices:[this._addedVertex]})}undo(){const{_part:e,_addedVertex:t,_left:s,_right:i,_originalSegment:r}=this;if(null!=t){if(e.vertices.splice(e.vertices.indexOf(t),1),null!=s){const t=e.segments.indexOf(s);t>-1&&e.segments.splice(t,1),s.leftVertex.rightSegment=null}if(null!=i){const t=e.segments.indexOf(i);t>-1&&e.segments.splice(t,1),i.rightVertex.leftSegment=null}if(null!=r&&(e.segments.includes(r)||e.segments.push(r),r.leftVertex.rightSegment=r,r.rightVertex.leftSegment=r),null!=s?e.updateVertexIndex(s.leftVertex,s.leftVertex.index):e.updateVertexIndex(t,0),this._partAdded&&0===this._part.vertices.length){const e=this._editGeometry.parts.indexOf(this._part);e>-1&&this._editGeometry.parts.splice(e)}this._editGeometry.notifyChanges({operation:"undo",removedVertices:[t]})}}accumulate(){return!1}}export{d as ReplayableAppendVertex};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{destroyHandle as i}from"../../../../core/handleUtils.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfAborted as o,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{watch as n,on as l,initial as d,sync as u,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{sqlAnd as h}from"../../../../core/sql.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as y}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as f}from"../../../../core/support/UpdatingHandles.js";import{isSubtypeGroupLayer as m}from"../../../../layers/support/layerUtils.js";import{elevationContextAffectsAlignment as _}from"../../../../support/elevationInfoUtils.js";import{FeatureServiceTiles2D as g}from"../../../2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js";import{FeatureServiceTiles3D as w}from"../../../3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js";import{isUtilityNetworkWebMap as S}from"../snappingUtils.js";import{makeGetGroundElevation as v,convertSnappingCandidate as b}from"./queryEngineUtils.js";import{WorkerTileTreeDebugger as I}from"./WorkerTileTreeDebugger.js";import{FeatureServiceSnappingSourceWorkerHandle as H}from"./featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js";import{FeatureServiceTilesSimple as F}from"./featureServiceSource/FeatureServiceTilesSimple.js";import j from"../../../support/debugFlags.js";let O=class extends t{get _updateTilesParameters(){return{tiles:this._tilesOfInterest.tiles,tileInfo:this._tilesOfInterest.tileInfo,tileSize:this._tilesOfInterest.tileSize}}get _layerView(){return this.view?.allLayerViews.find(e=>e.layer===this._layer)}get _isSuspended(){if(m(this._layer)){if(!this.layerSource.sublayerSources.some(e=>e.enabled&&e.layer.visible))return!0}return!!this.view&&(!1!==this._layerView?.suspended||!this.layerSource.enabled)}get updating(){return this._workerHandle?.updating||this._updatingHandles.updating}get _outFields(){const{view:e,_layerView:t,layerSource:r}=this,{layer:i}=r,{fieldsIndex:s,timeInfo:o,floorInfo:a,subtypeField:n}=i,l=t&&"filter"in t?t.filter:null,d=l?.where&&"1=1"!==l.where?this._getOrLoadWhereFields(l.where,s):[];if(l?.timeExtent&&o){const{startField:e,endField:t}=o,r=s.get(e)?.name??e,i=s.get(t)?.name??t;r&&d.push(r),i&&d.push(i)}if(e?.map&&S(e.map)&&e.map.utilityNetworks?.find(e=>e.isUtilityLayer(i))){const e=i.fieldsIndex.get("assetGroup")?.name,t=i.fieldsIndex.get("assetType")?.name;e&&t&&(d.push(e),d.push(t))}if(i&&a?.floorField&&e?.floors?.length){const e=s.get(a.floorField)?.name??a.floorField;e&&d.push(e)}if(n){const e=s.get(n)?.name??n;e&&d.push(e)}return new Set(d)}get configuration(){const{view:e}=this,{apiKey:t,customParameters:r}=this._layer,i=null!=e?e.type:"2d",s=this._layer.createQuery();return this._layerView&&"effectiveDisplayFilter"in this._layerView&&(s.where=h(s.where,this._layerView.effectiveDisplayFilter?.where)),{filter:s,customParameters:t?{...r,token:t}:r,viewType:i}}get availability(){return this._workerHandle?.availability??0}get _layer(){return this.layerSource.layer}constructor(e){super(e),this._updatingHandles=new f,this._workerHandle=null,this._debug=null,this._memoizedMakeGetGroundElevation=s(v)}initialize(){let e;const t=this.view;if(null==t||t.destroyed)this._tilesOfInterest=new F({layer:this._layer}),e=this._workerHandle=new H;else switch(t.type){case"2d":this._tilesOfInterest=new g({view:t,layer:this._layer}),e=this._workerHandle=new H;break;case"3d":{const{resourceController:r}=t,i=this._layer;this._tilesOfInterest=new w({view:t}),e=this._workerHandle=new H({schedule:e=>r.immediate.schedule(e),hasZ:i.hasZ&&(i.returnZ??!0),elevationAlignPointsInFeatures:async(e,r)=>{const s=await t.whenLayerView(i);return o(r),s.elevationAlignPointsInFeatures(e,r)},queryForSymbologySnapping:async(e,r)=>{const s=await t.whenLayerView(i);return o(r),s.queryForSymbologySnapping(e,r)}}),this.addHandles([t.elevationProvider.on("elevation-change",({context:t})=>{const{elevationInfo:r}=i;_(t,r)&&a(e.notifyElevationSourceChange())}),n(()=>i.elevationInfo,()=>a(e.notifyElevationSourceChange()),d),n(()=>this._layerView?.layer?.renderer,()=>a(e.notifySymbologyChange()),d),n(()=>this._layerView?.symbologySnappingSupported??!1,t=>a(e.setSymbologySnappingSupported(t)),d),l(()=>this._layerView?.layer,["edits","apply-edits","graphic-update"],()=>e.notifySymbologyChange())]);break}}this.addHandles([i(e)]),a(e.setup({layer:this._layer,spatialReference:this.spatialReference,configuration:this.configuration},null)),this._updatingHandles.add(()=>this._updateTilesParameters,()=>a(e.updateTiles(this._updateTilesParameters,null)),d),this.addHandles([n(()=>this.configuration,t=>a(e.configure(t,null)),u),n(()=>this._layer.historicMoment,t=>a(e.setHistoricMoment(t)),p),n(()=>this._outFields,t=>a(e.updateOutFields(t)),d),n(()=>this._isSuspended,t=>a(e.setSuspended(t)),p)]),null!=t&&this.addHandles(n(()=>j.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES,r=>{r&&!this._debug?(this._debug=new I({view:t,handle:e}),this.addHandles(i(this._debug),"debug")):!r&&this._debug&&this.removeHandles("debug")},d)),this.addHandles([this.layerSource.layer.on("edits",t=>a(e.handleEdits(t,null))),this.layerSource.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))])}destroy(){this._updatingHandles.destroy(),this._tilesOfInterest.destroy()}refresh(){this._workerHandle?.refresh(null)}async fetchCandidates(e,t){const{coordinateHelper:r,point:i}=e;this._tilesOfInterest.pointOfInterest=r.arrayToPoint(i);const s=this._memoizedMakeGetGroundElevation(this.view,r.spatialReference);return(await this._workerHandle.fetchCandidates({...e},t)).candidates.map(e=>b(e,s))}getDebugInfo(e){return this._workerHandle.getDebugInfo(e)}_getOrLoadWhereFields(e,t){const{_whereModule:i}=this;if(!this._loadWhereModuleTask&&!i){const e=r(async()=>{const e=await import("../../../../core/sql/WhereClause.js");return this._whereModule=e.default,this._whereModule});return this._loadWhereModuleTask=e,this._updatingHandles.addPromise(e.promise),[]}if(!i)return[];try{return i.create(e,{fieldsIndex:t}).fieldNames}catch(s){return[]}}};e([c({constructOnly:!0})],O.prototype,"spatialReference",void 0),e([c({constructOnly:!0})],O.prototype,"layerSource",void 0),e([c({constructOnly:!0})],O.prototype,"view",void 0),e([c()],O.prototype,"_tilesOfInterest",void 0),e([c({readOnly:!0})],O.prototype,"_updateTilesParameters",null),e([c()],O.prototype,"_layerView",null),e([c()],O.prototype,"_isSuspended",null),e([c({readOnly:!0})],O.prototype,"updating",null),e([c()],O.prototype,"_outFields",null),e([c({readOnly:!0})],O.prototype,"configuration",null),e([c({readOnly:!0})],O.prototype,"availability",null),e([c()],O.prototype,"_loadWhereModuleTask",void 0),e([c()],O.prototype,"_whereModule",void 0),O=e([y("esri.views.interactive.snapping.featureSources.FeatureServiceSnappingSource")],O);export{O as FeatureServiceSnappingSource};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import{destroyHandle as r}from"../../../../core/handleUtils.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfAborted as o,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{initial as n,on as l,watch as d,sync as p,syncAndInitial as u}from"../../../../core/reactiveUtils.js";import{sqlAnd as h}from"../../../../core/sql.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as y}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as f}from"../../../../core/support/UpdatingHandles.js";import{isSubtypeGroupLayer as m}from"../../../../layers/support/layerUtils.js";import{elevationContextAffectsAlignment as _}from"../../../../support/elevationInfoUtils.js";import{FeatureServiceTiles2D as g}from"../../../2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js";import{FeatureServiceTiles3D as w}from"../../../3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js";import{isUtilityNetworkWebMap as S}from"../snappingUtils.js";import{makeGetGroundElevation as v,convertSnappingCandidate as H}from"./queryEngineUtils.js";import{WorkerTileTreeDebugger as I}from"./WorkerTileTreeDebugger.js";import{FeatureServiceSnappingSourceWorkerHandle as b}from"./featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js";import{FeatureServiceTilesSimple as F}from"./featureServiceSource/FeatureServiceTilesSimple.js";import j from"../../../support/debugFlags.js";let O=class extends t{get _updateTilesParameters(){return{tiles:this._tilesOfInterest.tiles,tileInfo:this._tilesOfInterest.tileInfo,tileSize:this._tilesOfInterest.tileSize}}get _layerView(){return this.view?.allLayerViews.find(e=>e.layer===this._layer)}get _isSuspended(){if(m(this._layer)){if(!this.layerSource.sublayerSources.some(e=>e.enabled&&e.layer.visible))return!0}return this._snappingComplexityExceeded||!!this.view&&(!1!==this._layerView?.suspended||!this.layerSource.enabled)}get _snappingComplexityExceeded(){return!(!this._layerView||!("snappingComplexityExceeded"in this._layerView))&&this._layerView.snappingComplexityExceeded}get updating(){return this._workerHandle?.updating||this._updatingHandles.updating||this._tilesOfInterest.updating}get _outFields(){const{view:e,_layerView:t,layerSource:i}=this,{layer:r}=i,{fieldsIndex:s,timeInfo:o,floorInfo:a,subtypeField:n}=r,l=t&&"filter"in t?t.filter:null,d=l?.where&&"1=1"!==l.where?this._getOrLoadWhereFields(l.where,s):[];if(l?.timeExtent&&o){const{startField:e,endField:t}=o,i=s.get(e)?.name??e,r=s.get(t)?.name??t;i&&d.push(i),r&&d.push(r)}if(e?.map&&S(e.map)&&e.map.utilityNetworks?.find(e=>e.isUtilityLayer(r))){const e=r.fieldsIndex.get("assetGroup")?.name,t=r.fieldsIndex.get("assetType")?.name;e&&t&&(d.push(e),d.push(t))}if(r&&a?.floorField&&e?.floors?.length){const e=s.get(a.floorField)?.name??a.floorField;e&&d.push(e)}if(n){const e=s.get(n)?.name??n;e&&d.push(e)}return new Set(d)}get configuration(){const{view:e}=this,{apiKey:t,customParameters:i}=this._layer,r=null!=e?e.type:"2d",s=this._layer.createQuery();return this._layerView&&"effectiveDisplayFilter"in this._layerView&&(s.where=h(s.where,this._layerView.effectiveDisplayFilter?.where)),{filter:s,customParameters:t?{...i,token:t}:i,viewType:r}}get availability(){return this._workerHandle?.availability??0}get _layer(){return this.layerSource.layer}constructor(e){super(e),this._updatingHandles=new f,this._workerHandle=null,this._debug=null,this._memoizedMakeGetGroundElevation=s(v)}initialize(){let e;const t=this.view;if(null==t||t.destroyed)this._tilesOfInterest=new F({layer:this._layer}),e=this._workerHandle=new b;else switch(t.type){case"2d":this._tilesOfInterest=new g({view:t,layer:this._layer}),e=this._workerHandle=new b;break;case"3d":{const{resourceController:i}=t,r=this._layer;this._tilesOfInterest=new w({view:t}),e=this._workerHandle=new b({schedule:e=>i.immediate.schedule(e),hasZ:r.hasZ&&(r.returnZ??!0),elevationAlignPointsInFeatures:async(e,i)=>{const s=await t.whenLayerView(r);return o(i),s.elevationAlignPointsInFeatures(e,i)},queryForSymbologySnapping:async(e,i)=>{const s=await t.whenLayerView(r);return o(i),s.queryForSymbologySnapping(e,i)}}),this._updatingHandles.add(()=>r.elevationInfo,()=>a(e.notifyElevationSourceChange()),n),this._updatingHandles.add(()=>this._layerView?.layer?.renderer,()=>a(e.notifySymbologyChange()),n),this._updatingHandles.add(()=>this._layerView?.symbologySnappingSupported??!1,t=>a(e.setSymbologySnappingSupported(t)),n),this.addHandles([t.elevationProvider.on("elevation-change",({context:t})=>{const{elevationInfo:i}=r;_(t,i)&&a(e.notifyElevationSourceChange())}),l(()=>this._layerView?.layer,["edits","apply-edits","graphic-update"],()=>e.notifySymbologyChange())]);break}}this.addHandles([r(e)]),a(e.setup({layer:this._layer,spatialReference:this.spatialReference,configuration:this.configuration},null)),this._updatingHandles.add(()=>this._updateTilesParameters,()=>a(e.updateTiles(this._updateTilesParameters,null)),n),this.addHandles([d(()=>this.configuration,t=>a(e.configure(t,null)),p),d(()=>this._layer.historicMoment,t=>a(e.setHistoricMoment(t)),u),d(()=>this._isSuspended,t=>a(e.setSuspended(t)),u)]),this._updatingHandles.add(()=>this._outFields,t=>a(e.updateOutFields(t)),n),null!=t&&this.addHandles(d(()=>j.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES,i=>{i&&!this._debug?(this._debug=new I({view:t,handle:e}),this.addHandles(r(this._debug),"debug")):!i&&this._debug&&this.removeHandles("debug")},n)),this.addHandles([this.layerSource.layer.on("edits",t=>a(e.handleEdits(t,null))),this.layerSource.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))])}destroy(){this._updatingHandles.destroy(),this._tilesOfInterest.destroy()}refresh(){this._workerHandle?.refresh(null)}async fetchCandidates(e,t){if(this._isSuspended)return[];const{coordinateHelper:i,point:r}=e;this._tilesOfInterest.pointOfInterest=i.arrayToPoint(r);const s=this._memoizedMakeGetGroundElevation(this.view,i.spatialReference);return(await this._workerHandle.fetchCandidates({...e},t)).candidates.map(e=>H(e,s))}getDebugInfo(e){return this._workerHandle.getDebugInfo(e)}_getOrLoadWhereFields(e,t){const{_whereModule:r}=this;if(!this._loadWhereModuleTask&&!r){const e=i(async()=>{const e=await import("../../../../core/sql/WhereClause.js");return this._whereModule=e.default,this._whereModule});return this._loadWhereModuleTask=e,this._updatingHandles.addPromise(e.promise),[]}if(!r)return[];try{return r.create(e,{fieldsIndex:t}).fieldNames}catch(s){return[]}}};e([c({constructOnly:!0})],O.prototype,"spatialReference",void 0),e([c({constructOnly:!0})],O.prototype,"layerSource",void 0),e([c({constructOnly:!0})],O.prototype,"view",void 0),e([c()],O.prototype,"_tilesOfInterest",void 0),e([c({readOnly:!0})],O.prototype,"_updateTilesParameters",null),e([c()],O.prototype,"_layerView",null),e([c()],O.prototype,"_isSuspended",null),e([c()],O.prototype,"_snappingComplexityExceeded",null),e([c({readOnly:!0})],O.prototype,"updating",null),e([c()],O.prototype,"_outFields",null),e([c({readOnly:!0})],O.prototype,"configuration",null),e([c({readOnly:!0})],O.prototype,"availability",null),e([c()],O.prototype,"_loadWhereModuleTask",void 0),e([c()],O.prototype,"_whereModule",void 0),O=e([y("esri.views.interactive.snapping.featureSources.FeatureServiceSnappingSource")],O);export{O as FeatureServiceSnappingSource};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{isSome as o}from"../../../../../core/arrayUtils.js";import{abortMaybe as i}from"../../../../../core/maybe.js";import{debounce as n}from"../../../../../core/promiseUtils.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as s}from"../../../../../core/support/UpdatingHandles.js";import{WorkerHandle as d}from"../../../../../core/workers/WorkerHandle.js";import{featureGeometryTypeKebabDictionary as l}from"../../../../../geometry/support/typeUtils.js";import{makeDehydratedPoint as p}from"../../../../../layers/graphics/dehydratedPoint.js";let u=class extends t{get updating(){return this._updatingHandles.updating||this._workerHandleUpdating}constructor(e){super(e),this._updatingHandles=new s,this._suspendController=null,this.schedule=null,this.hasZ=!1,this.elevationAlignPointsInFeatures=async e=>{const t=[];for(const{points:o}of e.pointsInFeatures)for(const{z:e}of o)t.push(e);return{elevations:t,drapedObjectIds:new Set,failedObjectIds:new Set}},this.queryForSymbologySnapping=async()=>({candidates:[],sourceCandidateIndices:[]}),this.availability=0,this._workerHandleUpdating=!0,this.updateOutFields=n(async(e,t)=>{await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("updateOutFields",[...e],t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))})}destroy(){this._suspendController=i(this._suspendController),this._workerHandle.destroy(),this._updatingHandles.destroy()}initialize(){this._workerHandle=new y(this.schedule,{alignElevation:async(e,{signal:t})=>({result:await this.elevationAlignPointsInFeatures(e.query,t)}),getSymbologyCandidates:async(e,{signal:t})=>({result:await this.queryForSymbologySnapping(e,t)})}),this.addHandles([this._workerHandle.on("notify-updating",({updating:e})=>this._workerHandleUpdating=e),this._workerHandle.on("notify-availability",({availability:e})=>this._set("availability",e))])}async setup(e,t){const o=c(e.layer);if(null==o)return;const i={configuration:h(e.configuration),serviceInfo:o,spatialReference:e.spatialReference.toJSON(),hasZ:this.hasZ,elevationInfo:e.layer.elevationInfo?.toJSON()};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setup",i,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async configure(e,t){const o=h(e);await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("configure",o,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async refresh(e){await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("refresh",{},e)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},e))}async fetchCandidates(e,t){const{point:o,filter:i,coordinateHelper:n}=e,a={...e,point:p(o[0],o[1],o[2],n.spatialReference.toJSON()),filter:i?.toJSON()};return this._workerHandle.invoke(a,t)}async updateTiles(e,t){const o={tiles:e.tiles.map(e=>e.toJSON()),tileInfo:null!=e.tileInfo?e.tileInfo.toJSON():null,tileSize:e.tileSize};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("updateTiles",o,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async handleEdits({historicMoment:e,addedFeatures:t,deletedFeatures:i,updatedFeatures:n},a){const r={historicMoment:e,addedFeatures:t?.map(({objectId:e})=>e).filter(o)??[],deletedFeatures:i?.map(({objectId:e,globalId:t})=>({objectId:e,globalId:t}))??[],updatedFeatures:n?.map(({objectId:e})=>e).filter(o)??[]};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("handleEdits",r,a)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},a))}async setHistoricMoment(e,t){await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setHistoricMoment",{moment:e},t))}getDebugInfo(e){return this._workerHandle.invokeMethod("getDebugInfo",{},e)}async notifyElevationSourceChange(){await this._workerHandle.invokeMethod("notifyElevationSourceChange",{})}async notifySymbologyChange(){await this._workerHandle.invokeMethod("notifySymbologyChange",{})}async setSymbologySnappingSupported(e){await this._workerHandle.invokeMethod("setSymbologySnappingSupported",e)}async setSuspended(e){this._suspendController?.abort(),this._suspendController=new AbortController,await this._workerHandle.invokeMethod("setSuspended",e,this._suspendController.signal)}};function h(e){return{filter:null!=e.filter?e.filter.toJSON():null,customParameters:e.customParameters,viewType:e.viewType}}function c(e){return"multipatch"===e.geometryType||"mesh"===e.geometryType?null:{url:e.parsedUrl?.path??"",fieldsIndex:e.fieldsIndex.toJSON(),geometryType:l.toJSON(e.geometryType),capabilities:e.capabilities,objectIdField:e.objectIdField,globalIdField:e.globalIdField,spatialReference:e.spatialReference.toJSON(),timeInfo:e.timeInfo?.toJSON()}}e([a({constructOnly:!0})],u.prototype,"schedule",void 0),e([a({constructOnly:!0})],u.prototype,"hasZ",void 0),e([a({constructOnly:!0})],u.prototype,"elevationAlignPointsInFeatures",void 0),e([a({constructOnly:!0})],u.prototype,"queryForSymbologySnapping",void 0),e([a({readOnly:!0})],u.prototype,"updating",null),e([a({readOnly:!0})],u.prototype,"availability",void 0),e([a()],u.prototype,"_workerHandleUpdating",void 0),u=e([r("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorkerHandle")],u);class y extends d{constructor(e,t){super("FeatureServiceSnappingSourceWorker","fetchCandidates",{},e,{strategy:"dedicated",client:t})}}export{u as FeatureServiceSnappingSourceWorkerHandle};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{isSome as o}from"../../../../../core/arrayUtils.js";import{abortMaybe as i}from"../../../../../core/maybe.js";import{debounce as n}from"../../../../../core/promiseUtils.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as s}from"../../../../../core/support/UpdatingHandles.js";import{WorkerHandle as d}from"../../../../../core/workers/WorkerHandle.js";import{featureGeometryTypeKebabDictionary as l}from"../../../../../geometry/support/typeUtils.js";import{makeDehydratedPoint as p}from"../../../../../layers/graphics/dehydratedPoint.js";let u=class extends t{get updating(){return this._updatingHandles.updating||this._workerHandleUpdating}constructor(e){super(e),this._updatingHandles=new s,this._suspendController=null,this.schedule=null,this.hasZ=!1,this.elevationAlignPointsInFeatures=async e=>{const t=[];for(const{points:o}of e.pointsInFeatures)for(const{z:e}of o)t.push(e);return{elevations:t,drapedObjectIds:new Set,failedObjectIds:new Set}},this.queryForSymbologySnapping=async()=>({candidates:[],sourceCandidateIndices:[]}),this.availability=0,this._workerHandleUpdating=!0,this.updateOutFields=n(async(e,t)=>{await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("updateOutFields",[...e],t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))})}destroy(){this._suspendController=i(this._suspendController),this._workerHandle.destroy(),this._updatingHandles.destroy()}initialize(){this._workerHandle=new g(this.schedule,{alignElevation:async(e,{signal:t})=>({result:await this.elevationAlignPointsInFeatures(e.query,t)}),getSymbologyCandidates:async(e,{signal:t})=>({result:await this.queryForSymbologySnapping(e,t)})}),this.addHandles([this._workerHandle.on("notify-updating",({updating:e})=>this._workerHandleUpdating=e),this._workerHandle.on("notify-availability",({availability:e})=>this._set("availability",e))])}async setup(e,t){const o=c(e.layer);if(null==o)return;const i={configuration:h(e.configuration),serviceInfo:o,spatialReference:e.spatialReference.toJSON(),hasZ:this.hasZ,elevationInfo:e.layer.elevationInfo?.toJSON()};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setup",i,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async configure(e,t){const o=h(e);await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("configure",o,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async refresh(e){await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("refresh",{},e)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},e))}async fetchCandidates(e,t){const{point:o,filter:i,coordinateHelper:n}=e,a={...e,point:p(o[0],o[1],o[2],n.spatialReference.toJSON()),filter:i?.toJSON()};return this._workerHandle.invoke(a,t)}async updateTiles(e,t){const o={tiles:e.tiles.map(e=>e.toJSON()),tileInfo:null!=e.tileInfo?e.tileInfo.toJSON():null,tileSize:e.tileSize};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("updateTiles",o,t)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},t))}async handleEdits({historicMoment:e,addedFeatures:t,deletedFeatures:i,updatedFeatures:n},a){const r={historicMoment:e,addedFeatures:t?.map(({objectId:e})=>e).filter(o)??[],deletedFeatures:i?.map(({objectId:e,globalId:t})=>({objectId:e,globalId:t}))??[],updatedFeatures:n?.map(({objectId:e})=>e).filter(o)??[]};await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("handleEdits",r,a)),this._updatingHandles.addPromise(this._workerHandle.invokeMethod("whenNotUpdating",{},a))}async setHistoricMoment(e,t){await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setHistoricMoment",{moment:e},t))}getDebugInfo(e){return this._workerHandle.invokeMethod("getDebugInfo",{},e)}async notifyElevationSourceChange(){await this._workerHandle.invokeMethod("notifyElevationSourceChange",{})}async notifySymbologyChange(){await this._workerHandle.invokeMethod("notifySymbologyChange",{})}async setSymbologySnappingSupported(e){await this._workerHandle.invokeMethod("setSymbologySnappingSupported",e)}async setSuspended(e){this._suspendController?.abort(),this._suspendController=new AbortController,await this._updatingHandles.addPromise(this._workerHandle.invokeMethod("setSuspended",e,this._suspendController.signal))}};function h(e){return{filter:null!=e.filter?e.filter.toJSON():null,customParameters:e.customParameters,viewType:e.viewType}}function c(e){return"multipatch"===e.geometryType||"mesh"===e.geometryType?null:{url:e.parsedUrl?.path??"",fieldsIndex:e.fieldsIndex.toJSON(),geometryType:l.toJSON(e.geometryType),capabilities:e.capabilities,objectIdField:e.objectIdField,globalIdField:e.globalIdField,spatialReference:e.spatialReference.toJSON(),timeInfo:e.timeInfo?.toJSON()}}e([a({constructOnly:!0})],u.prototype,"schedule",void 0),e([a({constructOnly:!0})],u.prototype,"hasZ",void 0),e([a({constructOnly:!0})],u.prototype,"elevationAlignPointsInFeatures",void 0),e([a({constructOnly:!0})],u.prototype,"queryForSymbologySnapping",void 0),e([a({readOnly:!0})],u.prototype,"updating",null),e([a({readOnly:!0})],u.prototype,"availability",void 0),e([a()],u.prototype,"_workerHandleUpdating",void 0),u=e([r("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorkerHandle")],u);class g extends d{constructor(e,t){super("FeatureServiceSnappingSourceWorker","fetchCandidates",{},e,{strategy:"dedicated",client:t})}}export{u as FeatureServiceSnappingSourceWorkerHandle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{intersection as s,isSubsetOf as i}from"../../../../../core/SetUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{create as n,intersects as l,fromExtent as u,area as c}from"../../../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as h}from"../../../../../layers/graphics/featureConversionUtils.js";import{BoundsStore as a}from"../../../../../layers/graphics/data/BoundsStore.js";import{TileKey as d}from"../../../../../layers/support/TileKey.js";import{executeQueryForCount as f}from"../../../../../rest/query/operations/query.js";import{FeatureServiceTileCache as _}from"./FeatureServiceTileCache.js";let m=class extends t{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new a,this._tiles=new _,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=n()}add(e,t){for(const s of t)this._referenceFeature(s.objectId);const i=this.featureStore.upsertMany(t),r=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>s(e,t),new Set(Object.keys(i[0]?.attributes??[]))),o=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),r),o&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds){if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}}return t}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new y(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const i=(await t(e,s)).features,{hasZ:r,hasM:o}=this.featureStore;for(const n of i){const e=h(this._tmpBoundingRect,n.geometry,r,o);null!=e&&this._tileBounds.forEachInBounds(e,e=>{const t=this._tiles.get(e);this.featureStore.add(n);const s=n.objectId;t.objectIds.has(s)||(t.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(t.key.id,t.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!l(u(this.extent,this._tmpBoundingRect),e.extent))return new v(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new v(e);const r=this.getAttributesForTile(e.id);if(i(s,r))return new v(e);const o=this._createTileTree(e,this.tileInfo);return this._simplify(o,t,null,0,1),this._collectMissingTiles(e,o,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const r=this._tileFeatureCounts.get(e.id);if(null!=r)return r;const o=await f(t,s,i);return this._tileFeatureCounts.set(e.id,o.data.count),o.data.count}_createTileTree(e,t){const s=new g(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&p(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const o=t.row>>r,n=t.col>>r,l=e.row<<1,u=n-(e.col<<1)+(o-l<<1),c=e.children[u];if(null!=c)this._populateChildren(c,t,s,i);else{const r=new g(e.level+1,o,n);s.updateTileInfo(r,1),e.children[u]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const o=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),o);const n=r/2,l=n*n;let u=0;for(let c=0;c<e.children.length;c++){const s=e.children[c];u+=null!=s?this._simplify(s,t,e,c,n):l}return 0===u?this._mergeChildren(e):1-u/o<S&&(this._purge(e),null!=s&&(s.children[i]=null),u=o),u}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const r=this._tiles.get(e.id);if(r){i=i?s(i,r.attributeKeys):new Set(r.attributeKeys);for(const e of r.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new C(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,r){const o=this.getAttributesForTile(e.id),n=o&&!i(r,o);if(n&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(n||t.addMissing(e.level,e.row,e.col,s));const l=s/2;for(let i=0;i<e.children.length;i++){const s=e.children[i];null==s?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),l):this._collectMissingTilesRecurse(s,t,l,r)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};function p(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,o=1<<r.level-i.level;return Math.floor(r.row/o)===i.row&&Math.floor(r.col/o)===i.col}e([r({constructOnly:!0})],m.prototype,"featureStore",void 0),e([r()],m.prototype,"tileInfo",void 0),e([r()],m.prototype,"extent",void 0),e([r()],m.prototype,"maximumByteSize",void 0),m=e([o("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],m);class y{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class g extends d{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class v{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=c(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class C{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new v(t),null!=s&&(this._extent=u(s))}addMissing(e,t,s,i){const r=new d(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||l(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=c(r.extent))}}const S=.18751;export{m as FeatureServiceTileStore,v as ProcessResult};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{intersection as s,isSubsetOf as i}from"../../../../../core/SetUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{create as n,intersects as l,fromExtent as u,area as c}from"../../../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as h}from"../../../../../layers/graphics/featureConversionUtils.js";import{BoundsStore as a}from"../../../../../layers/graphics/data/BoundsStore.js";import{TileKey as d}from"../../../../../layers/support/TileKey.js";import{executeQueryForCount as f}from"../../../../../rest/query/operations/query.js";import{FeatureServiceTileCache as _}from"./FeatureServiceTileCache.js";let m=class extends t{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new a,this._tiles=new _,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=n()}add(e,t){for(const s of t)this._referenceFeature(s.objectId);const i=this.featureStore.upsertMany(t),r=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>s(e,t),new Set(Object.keys(i[0]?.attributes??[]))),o=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),r),o&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds){if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}}return t}_hasAttributesForTile(e,t){if(e){const s=this._tiles.get(e);if(s)return!s.objectIds.size||i(t,s.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new y(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const{features:i}=await t(e,s);for(const r of i){const e=h(this._tmpBoundingRect,r.geometry);null!=e&&this._tileBounds.forEachInBounds(e,e=>{const t=this._tiles.get(e);this.featureStore.add(r);const s=r.objectId;t.objectIds.has(s)||(t.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(t.key.id,t.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!l(u(this.extent,this._tmpBoundingRect),e.extent))return new v(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new v(e);if(this._hasAttributesForTile(e.id,s))return new v(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await f(t,s,i),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const s=new g(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&p(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const o=t.row>>r,n=t.col>>r,l=e.row<<1,u=n-(e.col<<1)+(o-l<<1),c=e.children[u];if(null!=c)this._populateChildren(c,t,s,i);else{const r=new g(e.level+1,o,n);s.updateTileInfo(r,1),e.children[u]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const o=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),o);const n=r/2,l=n*n;let u=0;for(let c=0;c<e.children.length;c++){const s=e.children[c];u+=null!=s?this._simplify(s,t,e,c,n):l}return 0===u?this._mergeChildren(e):1-u/o<S&&(this._purge(e),null!=s&&(s.children[i]=null),u=o),u}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const r=this._tiles.get(e.id);if(r){i=i?s(i,r.attributeKeys):new Set(r.attributeKeys);for(const e of r.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new C(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,i);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let n=0;n<e.children.length;n++){const s=e.children[n];null==s?t.addMissing(e.level+1,(e.row<<1)+((2&n)>>1),(e.col<<1)+(1&n),o):this._collectMissingTilesRecurse(s,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};function p(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,o=1<<r.level-i.level;return Math.floor(r.row/o)===i.row&&Math.floor(r.col/o)===i.col}e([r({constructOnly:!0})],m.prototype,"featureStore",void 0),e([r()],m.prototype,"tileInfo",void 0),e([r()],m.prototype,"extent",void 0),e([r()],m.prototype,"maximumByteSize",void 0),m=e([o("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],m);class y{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class g extends d{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class v{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=c(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class C{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new v(t),null!=s&&(this._extent=u(s))}addMissing(e,t,s,i){const r=new d(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||l(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=c(r.extent))}}const S=.18751;export{m as FeatureServiceTileStore,v as ProcessResult};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{equals as i}from"../../../../../core/arrayUtils.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Logger.js";import{throwIfAbortError as o}from"../../../../../core/promiseUtils.js";import{when as n}from"../../../../../core/reactiveUtils.js";import{union as a,equals as l,isSubsetOf as u,difference as d}from"../../../../../core/SetUtils.js";import{normalizeGlobalID as c}from"../../../../../core/uuid.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../../../../core/support/UpdatingHandles.js";import f from"../../../../../geometry/Extent.js";import{toExtent as m}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as _,convertFromFeatureSet as g}from"../../../../../layers/graphics/featureConversionUtils.js";import{isHostedAgolService as F}from"../../../../../layers/support/arcgisLayerUrl.js";import{OptimizedFeatureSetParserContext as b}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as T,executeQueryPBF as P,executeQuery as v}from"../../../../../rest/query/operations/query.js";import I from"../../../../../rest/support/Query.js";import{PendingFeatureTile as O}from"./PendingFeatureTile.js";let S=class extends t{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=a(e,this._mandatoryOutFields);l(i,t)||(this._set("outFields",i),u(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new y}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>i(e,t,({id:e},{id:t})=>e===t)}),this.addHandles(n(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const s of this._pendingTiles.values())s.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=s(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(i){o(i),r.getLogger(this).warn("Failed to apply edits",i)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!F(this.url))return;const e=s(async e=>{try{const t=await T(this.url,new I({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=f.fromJSON(t.data?.extent)}catch(t){o(t),r.getLogger(this).warn("Failed to fetch data extent",t)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<x}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(C/(i*i))<q}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new O(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:w,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let o=0,n=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,n),{features:u,exceededTransferLimit:d}=await this._queryFeatures(a,i);l&&(s+=a.num),o+=u.length;for(const e of u)r.push(e);if(n=t-o,!l||!d||n<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?c(e):e;if(this.store.featureStore.forEach(e=>{r===c(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await P(this.url,e,new b({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:w,signal:t});return _(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await v(this.url,e,i,{query:this._configuration.customParameters,timeout:w,signal:t});return g(s,{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=a(d(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new I({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?m(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?I.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||j);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([h({constructOnly:!0})],S.prototype,"url",void 0),e([h({constructOnly:!0})],S.prototype,"objectIdField",void 0),e([h({constructOnly:!0})],S.prototype,"globalIdField",void 0),e([h({constructOnly:!0})],S.prototype,"capabilities",void 0),e([h({constructOnly:!0})],S.prototype,"sourceSpatialReference",void 0),e([h({constructOnly:!0})],S.prototype,"spatialReference",void 0),e([h({constructOnly:!0})],S.prototype,"store",void 0),e([h({readOnly:!0})],S.prototype,"_minimumVerticesPerFeature",null),e([h()],S.prototype,"_mandatoryOutFields",null),e([h()],S.prototype,"outFields",null),e([h()],S.prototype,"suspended",void 0),e([h()],S.prototype,"_historicMoment",void 0),e([h()],S.prototype,"filter",null),e([h()],S.prototype,"customParameters",null),e([h({readOnly:!0})],S.prototype,"_configuration",null),e([h()],S.prototype,"tileInfo",null),e([h()],S.prototype,"tileSize",null),e([h()],S.prototype,"tilesOfInterest",void 0),e([h({readOnly:!0})],S.prototype,"updating",null),e([h({readOnly:!0})],S.prototype,"availability",void 0),e([h()],S.prototype,"hasZ",null),S=e([p("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],S);const j=2e3,w=6e5,x=1e6,C=25,q=1;export{S as FeatureServiceTiledFetcher};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{equals as i}from"../../../../../core/arrayUtils.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Logger.js";import{throwIfAbortError as o}from"../../../../../core/promiseUtils.js";import{when as n}from"../../../../../core/reactiveUtils.js";import{union as a,equals as l,isSubsetOf as u,difference as c}from"../../../../../core/SetUtils.js";import{normalizeGlobalID as d}from"../../../../../core/uuid.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as y}from"../../../../../core/support/UpdatingHandles.js";import f from"../../../../../geometry/Extent.js";import{toExtent as m}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as _,convertFromFeatureSet as g}from"../../../../../layers/graphics/featureConversionUtils.js";import F from"../../../../../layers/graphics/OptimizedFeatureSet.js";import{isHostedAgolService as b}from"../../../../../layers/support/arcgisLayerUrl.js";import{OptimizedFeatureSetParserContext as T}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as P,executeQueryPBF as v,executeQuery as I}from"../../../../../rest/query/operations/query.js";import O from"../../../../../rest/support/Query.js";import{PendingFeatureTile as S}from"./PendingFeatureTile.js";let j=class extends t{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=a(e,this._mandatoryOutFields);l(i,t)||(this._set("outFields",i),u(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new y}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>i(e,t,({id:e},{id:t})=>e===t)}),this.addHandles(n(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const s of this._pendingTiles.values())s.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=s(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(i){o(i),r.getLogger(this).warn("Failed to apply edits",i)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!b(this.url))return;const e=s(async e=>{try{const t=await P(this.url,new O({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=f.fromJSON(t?.extent)}catch(t){o(t),r.getLogger(this).warn("Failed to fetch data extent",t)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<C}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(q/(i*i))<M}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new S(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:x,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let o=0,n=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,n),{features:u,exceededTransferLimit:c}=await this._queryFeatures(a,i);l&&(s+=a.num),o+=u.length;for(const e of u)r.push(e);if(n=t-o,!l||!c||n<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?d(e):e;if(this.store.featureStore.forEach(e=>{r===d(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new F:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,s=await v(this.url,e,new T({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:x,signal:t});return _(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,s=await I(this.url,e,i,{query:this._configuration.customParameters,timeout:x,signal:t});return g(s,{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=a(c(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new O({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?m(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?O.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||w);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([h({constructOnly:!0})],j.prototype,"url",void 0),e([h({constructOnly:!0})],j.prototype,"objectIdField",void 0),e([h({constructOnly:!0})],j.prototype,"globalIdField",void 0),e([h({constructOnly:!0})],j.prototype,"capabilities",void 0),e([h({constructOnly:!0})],j.prototype,"sourceSpatialReference",void 0),e([h({constructOnly:!0})],j.prototype,"spatialReference",void 0),e([h({constructOnly:!0})],j.prototype,"store",void 0),e([h({readOnly:!0})],j.prototype,"_minimumVerticesPerFeature",null),e([h()],j.prototype,"_mandatoryOutFields",null),e([h()],j.prototype,"outFields",null),e([h()],j.prototype,"suspended",void 0),e([h()],j.prototype,"_historicMoment",void 0),e([h()],j.prototype,"filter",null),e([h()],j.prototype,"customParameters",null),e([h({readOnly:!0})],j.prototype,"_configuration",null),e([h()],j.prototype,"tileInfo",null),e([h()],j.prototype,"tileSize",null),e([h()],j.prototype,"tilesOfInterest",void 0),e([h({readOnly:!0})],j.prototype,"updating",null),e([h({readOnly:!0})],j.prototype,"availability",void 0),e([h()],j.prototype,"hasZ",null),j=e([p("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],j);const w=2e3,x=6e5,C=1e6,q=25,M=1;export{j as FeatureServiceTiledFetcher};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../../../core/Accessor.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import s from"../../../../../geometry/Point.js";import{fromValues as i}from"../../../../../geometry/support/aaBoundingRect.js";import p from"../../../../../layers/support/LOD.js";import l from"../../../../../layers/support/TileInfo.js";import{TileKey as n}from"../../../../../layers/support/TileKey.js";let a=class extends r{get tiles(){return[new n(0,0,0,i(-1e8,-1e8,1e8,1e8))]}get tileInfo(){return new l({origin:new s({x:-1e8,y:1e8,spatialReference:this.layer.spatialReference}),size:[512,512],lods:[new p({level:0,scale:1,resolution:390625})],spatialReference:this.layer.spatialReference})}get tileSize(){return this.tileInfo.size[0]}constructor(e){super(e),this.pointOfInterest=null}};e([t({readOnly:!0})],a.prototype,"tiles",null),e([t({readOnly:!0})],a.prototype,"tileInfo",null),e([t({readOnly:!0})],a.prototype,"tileSize",null),e([t({constructOnly:!0})],a.prototype,"layer",void 0),e([t()],a.prototype,"pointOfInterest",void 0),a=e([o("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTilesSimple")],a);export{a as FeatureServiceTilesSimple};
5
+ import{__decorate as e}from"tslib";import r from"../../../../../core/Accessor.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import s from"../../../../../geometry/Point.js";import{fromValues as i}from"../../../../../geometry/support/aaBoundingRect.js";import p from"../../../../../layers/support/LOD.js";import l from"../../../../../layers/support/TileInfo.js";import{TileKey as n}from"../../../../../layers/support/TileKey.js";let a=class extends r{get tiles(){return[new n(0,0,0,i(-1e8,-1e8,1e8,1e8))]}get tileInfo(){return new l({origin:new s({x:-1e8,y:1e8,spatialReference:this.layer.spatialReference}),size:[512,512],lods:[new p({level:0,scale:1,resolution:390625})],spatialReference:this.layer.spatialReference})}get tileSize(){return this.tileInfo.size[0]}constructor(e){super(e),this.pointOfInterest=null,this.updating=!1}};e([t({readOnly:!0})],a.prototype,"tiles",null),e([t({readOnly:!0})],a.prototype,"tileInfo",null),e([t({readOnly:!0})],a.prototype,"tileSize",null),e([t({constructOnly:!0})],a.prototype,"layer",void 0),e([t()],a.prototype,"pointOfInterest",void 0),e([t()],a.prototype,"updating",void 0),a=e([o("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTilesSimple")],a);export{a as FeatureServiceTilesSimple};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,on as l,syncAndInitial as s}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as n,sqlAnd as a}from"../../core/sql.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{getPopupProvider as p}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as f}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as w,unpackFieldNames as b,collectLabelingFields as v,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as q,collectOrderByInfos as R,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as _,collectField as O,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{getUtilityNetworkFields as U}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import{getFetchPopupTemplate as T,getRequiredFields as D}from"./support/popupUtils.js";import{WhereClauseVisitor as N}from"./support/WhereClauseVisitor.js";const Q=Q=>{const G=Q;let A=class extends G{constructor(...e){super(...e),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&U(t,e),e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),s),l(()=>this.view?.floors,"change",()=>this._handleChange()),l(()=>this.layer.displayFilterInfo?.filters,"change",()=>this._handleChange()),l(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?w(t,[...b(t,e.outFields),...i]):w(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,n(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}highlight(e,t){throw new Error("missing implementation")}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}queryFeatures(e,t){throw new Error("missing implementation")}queryObjectIds(e,t){throw new Error("missing implementation")}queryFeatureCount(e,t){throw new Error("missing implementation")}queryExtent(e,t){throw new Error("missing implementation")}async fetchPopupFeaturesFromGraphics(e,t){const i=new Set;for(const s of e){const e=p(s.origin);e&&i.add(e)}const r=Array.from(i,e=>T(e,{...t,checkPopupEnabled:!0})).filter(e=>null!=e),l=await this._createPopupQuery(r,t);return await g(this.layer,e,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._set("_updatingRequiredPromise",e),e.then(()=>{this._updatingRequiredPromise===e&&this._set("_updatingRequiredPromise",null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new N(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,o="featureReduction"in i?i.featureReduction:null,n=new Set,a=[l?l.collectRequiredFields(n,r):null,v(n,i),e&&"elevationInfo"in i?E(n,i):null,null!=this.filter?x(n,i,this.filter):null,e||null==this.featureEffect?null:x(n,i,this.featureEffect.filter),!e&&o?q(n,i,o):null,!e&&s?R(n,i,s):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&j(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(n,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&a.push(_(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){O(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),v(n,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&O(n,r,y);const u=await Promise.allSettled(a);if(e)O(n,r,i.objectIdField);else for(const t of f(S(i)))O(n,r,t);e&&"displayField"in i&&i.displayField&&O(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const o of e){if(!s){const e=await I(o);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(o))??!1}const e=await D(this.layer,o);i(t);for(const t of e)l.add(t)}return r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};return e([u()],A.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],A.prototype,"availableFields",null),e([u({readOnly:!0})],A.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],A.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],A.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],A.prototype,"featureEffect",null),e([u({type:c})],A.prototype,"filter",void 0),e([u()],A.prototype,"layer",void 0),e([u({type:Number})],A.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],A.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],A.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],A.prototype,"requiredFields",void 0),e([u({readOnly:!0})],A.prototype,"signedInUser",null),e([u()],A.prototype,"suspended",void 0),e([u()],A.prototype,"view",void 0),A=e([d("esri.views.layers.FeatureLayerView")],A),A};export{Q as default};
5
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,on as s,syncAndInitial as l}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as n,sqlAnd as a}from"../../core/sql.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{getPopupProvider as p}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as f}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as w,unpackFieldNames as b,collectLabelingFields as v,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as q,collectOrderByInfos as R,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as _,collectField as O,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{getUtilityNetworkFields as U}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import{getFetchPopupTemplate as T,getRequiredFields as D}from"./support/popupUtils.js";import{WhereClauseVisitor as N}from"./support/WhereClauseVisitor.js";const Q=Q=>{const G=Q;let A=class extends G{constructor(...e){super(...e),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&U(t,e),e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),s(()=>this.view?.floors,"change",()=>this._handleChange()),s(()=>this.layer.displayFilterInfo?.filters,"change",()=>this._handleChange()),s(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?w(t,[...b(t,e.outFields),...i]):w(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,n(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}highlight(e,t){throw new Error("missing implementation")}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}queryFeatures(e,t){throw new Error("missing implementation")}queryObjectIds(e,t){throw new Error("missing implementation")}queryFeatureCount(e,t){throw new Error("missing implementation")}queryExtent(e,t){throw new Error("missing implementation")}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const l of e){const e=p(l.origin),s=T(e,{...t,checkPopupEnabled:!0});s&&(i.push(l),r.add(s))}if(0===i.length||0===r.size)return[];const s=await this._createPopupQuery(r,t);return await g(this.layer,i,s,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._set("_updatingRequiredPromise",e),e.then(()=>{this._updatingRequiredPromise===e&&this._set("_updatingRequiredPromise",null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new N(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,o="featureReduction"in i?i.featureReduction:null,n=new Set,a=[s?s.collectRequiredFields(n,r):null,v(n,i),e&&"elevationInfo"in i?E(n,i):null,null!=this.filter?x(n,i,this.filter):null,e||null==this.featureEffect?null:x(n,i,this.featureEffect.filter),!e&&o?q(n,i,o):null,!e&&l?R(n,i,l):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&j(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(n,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&a.push(_(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){O(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),v(n,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&O(n,r,y);const u=await Promise.allSettled(a);if(e)O(n,r,i.objectIdField);else for(const t of f(S(i)))O(n,r,t);e&&"displayField"in i&&i.displayField&&O(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const o of e){if(!l){const e=await I(o);i(t),l=(e&&e.arcadeUtils.hasGeometryOperations(o))??!1}const e=await D(this.layer,o);i(t);for(const t of e)s.add(t)}return r.returnGeometry=l,r.returnZ=l,r.returnM=l,r.outFields=Array.from(s),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};return e([u()],A.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],A.prototype,"availableFields",null),e([u({readOnly:!0})],A.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],A.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],A.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],A.prototype,"featureEffect",null),e([u({type:c})],A.prototype,"filter",void 0),e([u()],A.prototype,"layer",void 0),e([u({type:Number})],A.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],A.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],A.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],A.prototype,"requiredFields",void 0),e([u({readOnly:!0})],A.prototype,"signedInUser",null),e([u()],A.prototype,"suspended",void 0),e([u()],A.prototype,"view",void 0),A=e([d("esri.views.layers.FeatureLayerView")],A),A};export{Q 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as t}from"../../core/compilerUtils.js";import e from"../../core/Logger.js";import{isAborted as s,createAbortError as r,isPromiseLike as o}from"../../core/promiseUtils.js";import{signal as a}from"../../core/signal.js";import{Yield as n}from"./Yield.js";class i{constructor(){this._tasks=new Array,this._numPendingTasks=a(0),this._readyToRun=a(!1)}get length(){return this._tasks.length}get updating(){return this._numPendingTasks.value>0}get readyToRun(){return this._readyToRun.value}_updateReadyToRun(){this._readyToRun.value=this._tasks.length>0}destroy(){this.cancelAll()}runTask(t){if(0===this.length)return n;for(;!t.done&&this._process(t);)t.madeProgress()}push(t,e,s){return this._addTask((r,o)=>new u(r,o,t,e,s),Array.prototype.push)}unshift(t,e,s){return this._addTask((r,o)=>new u(r,o,t,e,s),Array.prototype.unshift)}pushGenerator(t,e,s){return this._addTask((r,o)=>new p(r,o,t,e,s),Array.prototype.push)}_process(e){if(0===this._tasks.length)return!1;const o=this._tasks.shift();this._updateReadyToRun();try{if(s(o.signal))this._cancelTask(o,r());else switch(o.type){case 0:this._processSimple(o,e);break;case 1:this._processGenerator(o,e);break;case 2:this._processIterator(o,e);break;default:t(o)}}catch(a){o.reject(a)}return!0}cancelAll(){const t=r();for(const e of this._tasks)this._cancelTask(e,t);this._tasks.length=0,this._updateReadyToRun()}_cancelTask(t,e){if(t.abortCallback){const s=t.abortCallback(e);2===t.type&&t.iterator.return&&c(t.iterator.return()),o(s)?s.then(t.resolve,t.reject):t.resolve(s)}else 2===t.type&&t.iterator.throw&&c(t.iterator.throw(e)),t.reject(e)}_onIteratorResult(t,e){e.done?t.resolve(e.value):(this._tasks.unshift(t),this._updateReadyToRun())}_processSimple(t,e){const s=t.callback(e);o(s)?s.then(t.resolve,t.reject):t.resolve(s)}_processGenerator(t,e){const s=t.generatorFunction(e),r=new d(t.resolve,t.reject,s,t.signal,t.abortCallback);this._processIterator(r,e)}_processIterator(t,e){const s=t.iterator.next(e);o(s)?s.then(e=>this._onIteratorResult(t,e),t.reject):this._onIteratorResult(t,s)}_addTask(t,e){return new Promise((s,r)=>{const o=t(s,r);e.call(this._tasks,o),++this._numPendingTasks.value,this._updateReadyToRun()}).finally(()=>--this._numPendingTasks.value)}}function c(t){o(t)?t.then(h):h(t)}function h(t){t.done||e.getLogger("esri.layers.support.PromiseQueue").warn("Generator iterator was aborted, but it is not done.")}class l{constructor(t,e,s=void 0,r=void 0){this.resolve=t,this.reject=e,this.signal=s,this.abortCallback=r}}class u extends l{constructor(t,e,s,r,o){super(t,e,r,o),this.callback=s,this.type=0}}class p extends l{constructor(t,e,s,r,o){super(t,e,r,o),this.generatorFunction=s,this.type=1}}class d extends l{constructor(t,e,s,r,o){super(t,e,r,o),this.iterator=s,this.type=2}}export{i as PromiseQueue};
5
+ import{neverReached as t}from"../../core/compilerUtils.js";import e from"../../core/Error.js";import s from"../../core/Logger.js";import{isAborted as r,createAbortError as o,isPromiseLike as a,isAbortError as n}from"../../core/promiseUtils.js";import{signal as i}from"../../core/signal.js";import{Yield as c}from"./Yield.js";class l{constructor(){this._tasks=new Array,this._numPendingTasks=i(0),this._readyToRun=i(!1)}get length(){return this._tasks.length}get updating(){return this._numPendingTasks.value>0}get readyToRun(){return this._readyToRun.value}_updateReadyToRun(){this._readyToRun.value=this._tasks.length>0}destroy(){this.cancelAll()}runTask(t){if(0===this.length)return c;for(;!t.done&&this._process(t);)t.madeProgress()}push(t,e,s){return this._addTask((r,o)=>new d(r,o,t,e,s),Array.prototype.push)}unshift(t,e,s){return this._addTask((r,o)=>new d(r,o,t,e,s),Array.prototype.unshift)}pushGenerator(t,e,s){return this._addTask((r,o)=>new _(r,o,t,e,s),Array.prototype.push)}_process(e){if(0===this._tasks.length)return!1;const s=this._tasks.shift();this._updateReadyToRun();try{if(r(s.signal))this._cancelTask(s,o());else switch(s.type){case 0:this._processSimple(s,e);break;case 1:this._processGenerator(s,e);break;case 2:this._processIterator(s,e);break;default:t(s)}}catch(a){s.reject(a)}return!0}cancelAll(){const t=o();for(const e of this._tasks)this._cancelTask(e,t);this._tasks.length=0,this._updateReadyToRun()}_cancelTask(t,e){if(t.abortCallback){const s=t.abortCallback(e);2===t.type&&t.iterator.return&&h(t.iterator.return()),a(s)?s.then(t.resolve,t.reject):t.resolve(s)}else 2===t.type&&t.iterator.throw&&h(t.iterator.throw(e)),t.reject(e)}_onIteratorResult(t,e){e.done?t.resolve(e.value):(this._tasks.unshift(t),this._updateReadyToRun())}_processSimple(t,e){const s=t.callback(e);a(s)?s.then(t.resolve,t.reject):t.resolve(s)}_processGenerator(t,e){const s=t.generatorFunction(e),r=new k(t.resolve,t.reject,s,t.signal,t.abortCallback);this._processIterator(r,e)}_processIterator(t,e){const s=t.iterator.next(e);a(s)?s.then(e=>this._onIteratorResult(t,e),t.reject):this._onIteratorResult(t,s)}_addTask(t,e){return new Promise((s,r)=>{const o=t(s,r);e.call(this._tasks,o),++this._numPendingTasks.value,this._updateReadyToRun()}).finally(()=>--this._numPendingTasks.value)}}function h(t){a(t)?t.then(u,u):u(t)}function u(t){n(t)||t instanceof Error||t instanceof e||null!=t&&"object"==typeof t&&"done"in t&&t.done||s.getLogger("esri.layers.support.PromiseQueue").warn("Generator iterator was aborted, but it is not done.")}class p{constructor(t,e,s=void 0,r=void 0){this.resolve=t,this.reject=e,this.signal=s,this.abortCallback=r}}class d extends p{constructor(t,e,s,r,o){super(t,e,r,o),this.callback=s,this.type=0}}class _ extends p{constructor(t,e,s,r,o){super(t,e,r,o),this.generatorFunction=s,this.type=1}}class k extends p{constructor(t,e,s,r,o){super(t,e,r,o),this.iterator=s,this.type=2}}export{l as PromiseQueue};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import a from"../../core/PerformanceSampler.js";import{isAborted as n,createAbortError as u,when as _,isPromiseLike as h}from"../../core/promiseUtils.js";import{watch as o,initial as E,when as d}from"../../core/reactiveUtils.js";import{signal as T}from"../../core/signal.js";import{Milliseconds as c}from"../../core/time.js";import m from"./debugFlags.js";import{PromiseQueue as l}from"./PromiseQueue.js";import{Yield as R}from"./Yield.js";function g(){return new U}const I={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S_CONTROLLER:"I3S",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"Graphics3D filter visibility",SCALE_VISIBILITY:"Graphics3D scale visibility",FRUSTUM_VISIBILITY:"Graphics3D frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1},f=0,p=new Map([[I.RESOURCE_CONTROLLER_IMMEDIATE,f],[I.RESOURCE_CONTROLLER,4],[I.SLIDE,f],[I.STREAM_DATA_LOADER,f],[I.ELEVATION_QUERY,f],[I.TERRAIN_SURFACE,1],[I.SURFACE_GEOMETRY_UPDATES,1],[I.LOD_RENDERER,2],[I.GRAPHICS_CORE,2],[I.I3S_CONTROLLER,2],[I.POINT_CLOUD_LAYER,2],[I.FEATURE_TILE_FETCHER,2],[I.STREAM_CONTROLLER,2],[I.CLOUDS_GENERATOR,2],[I.OVERLAY,4],[I.OVERLAY_RENDERER,4],[I.STAGE,4],[I.GRAPHICS_DECONFLICTOR,4],[I.FILTER_VISIBILITY,4],[I.SCALE_VISIBILITY,4],[I.FRUSTUM_VISIBILITY,4],[I.POINT_OF_INTEREST_FREQUENT,6],[I.POINT_OF_INTEREST_INFREQUENT,30],[I.LABELER,8],[I.FEATURE_QUERY_ENGINE,8],[I.FEATURE_TILE_TREE,16],[I.FEATURE_TILE_TREE_ACTIVE,f],[I.ELEVATION_ALIGNMENT,12],[I.ELEVATION_ALIGNMENT_SCENE,14],[I.TEXT_TEXTURE_ATLAS,12],[I.TEXTURE_UNLOAD,12],[I.LINE_OF_SIGHT_TOOL,16],[I.LINE_OF_SIGHT_TOOL_INTERACTIVE,f],[I.SNAPPING,f],[I.SHADOW_ACCUMULATOR,30],[I.FLOW_GENERATOR,12],[I.MAPVIEW_FETCH_QUEUE,f],[I.MAPVIEW_LAYERVIEW_UPDATE,2],[I.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,f]]);function L(e){return p.has(e)?p.get(e):"number"==typeof e?e:1}const A=c(6.5),O=c(1),N=c(30),b=c(1e3/30),k=c(100),P=.9;class U{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=T(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new a("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new C,this.state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=o(()=>m.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,E);for(const e of Object.keys(I))this.performanceInfo.tasks.set(I[e],new a(String(I[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new S(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new a(e)),s}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){const e=this._budget.now();return this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=A,s=e.frameDuration,r=O;switch(this.state){case 2:t=c(0),s=c(Math.max(k,e.frameDuration)),r=N;break;case 1:s=c(Math.max(b,e.frameDuration))}return s=c(s-e.elapsedFrameTime-t),2!==this.state&&s<O&&!this._forceTask?(this._forceTask=!0,!1):(s=c(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case 2:this._runIdle();break;case 1:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(c(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*P+e*(1-P)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===f&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==f&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===R&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,I.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(I))this._frameTaskTimes.set(I[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class S{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new l,this._handles=new s,this._basePriority=L(t),this.schedulePriority=this._basePriority,this._task=T(null!=r?r:this._queue),this._handles.add(d(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(y),this._scheduler.removeTask(this),this.schedule=D.schedule,this.reschedule=D.reschedule,this.scheduleGenerator=D.scheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=L(e);this._basePriority!==f&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class C{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const y=new C;function F(e){const t=new C;return t.reset(e),t}y.enabled=!1;class w{remove(){}processQueue(){}schedule(e,t,s){try{if(n(t)){const e=u();return s?Promise.resolve(s(e)):Promise.reject(e)}return _(e(y))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(n(t)){const e=u();if(s)return s(e);throw e}const r=e(y);for(;;){const e=r.next(y),i=h(e)?await e:e;if(n(t)){const e=u();if(s){const t=s(e);return r.return(null),t}throw r.throw(e),e}if(i.done)return i.value}}}const D=new w;export{D as ImmediateTask,I as TaskPriority,L as getTaskPriority,F as makeBudget,g as newScheduler,y as noBudget,p as taskPriorities};
5
+ import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import{recordPerformance as a}from"../../core/performance.js";import n from"../../core/PerformanceSampler.js";import{isAborted as u,createAbortError as _,when as h,isPromiseLike as o,ignoreAbortErrors as E}from"../../core/promiseUtils.js";import{watch as d,initial as T,when as c}from"../../core/reactiveUtils.js";import{signal as m}from"../../core/signal.js";import{Milliseconds as l}from"../../core/time.js";import g from"./debugFlags.js";import{PromiseQueue as R}from"./PromiseQueue.js";import{Yield as I}from"./Yield.js";function f(){return new C}const p={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S_CONTROLLER:"I3S",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1},L=0,A=new Map([[p.RESOURCE_CONTROLLER_IMMEDIATE,L],[p.RESOURCE_CONTROLLER,4],[p.SLIDE,L],[p.STREAM_DATA_LOADER,L],[p.ELEVATION_QUERY,L],[p.TERRAIN_SURFACE,1],[p.SURFACE_GEOMETRY_UPDATES,1],[p.LOD_RENDERER,2],[p.GRAPHICS_CORE,2],[p.I3S_CONTROLLER,2],[p.POINT_CLOUD_LAYER,2],[p.FEATURE_TILE_FETCHER,2],[p.STREAM_CONTROLLER,2],[p.CLOUDS_GENERATOR,2],[p.OVERLAY,4],[p.OVERLAY_RENDERER,4],[p.STAGE,4],[p.GRAPHICS_DECONFLICTOR,4],[p.FILTER_VISIBILITY,4],[p.SCALE_VISIBILITY,4],[p.FRUSTUM_VISIBILITY,4],[p.POINT_OF_INTEREST_FREQUENT,6],[p.POINT_OF_INTEREST_INFREQUENT,30],[p.LABELER,8],[p.FEATURE_QUERY_ENGINE,8],[p.FEATURE_TILE_TREE,16],[p.FEATURE_TILE_TREE_ACTIVE,L],[p.ELEVATION_ALIGNMENT,12],[p.ELEVATION_ALIGNMENT_SCENE,14],[p.TEXT_TEXTURE_ATLAS,12],[p.TEXTURE_UNLOAD,12],[p.LINE_OF_SIGHT_TOOL,16],[p.LINE_OF_SIGHT_TOOL_INTERACTIVE,L],[p.SNAPPING,L],[p.SHADOW_ACCUMULATOR,30],[p.FLOW_GENERATOR,12],[p.MAPVIEW_FETCH_QUEUE,L],[p.MAPVIEW_LAYERVIEW_UPDATE,2],[p.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,L]]);function O(e){return A.has(e)?A.get(e):"number"==typeof e?e:1}const N=l(6.5),b=l(1),k=l(30),S=l(1e3/30),P=l(100),U=.9;class C{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=m(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new n("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new y,this.state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=d(()=>g.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,T);for(const e of Object.keys(p))this.performanceInfo.tasks.set(p[e],new n(String(p[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new F(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new n(e)),s}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){const e=this._budget.now();this._runFrame();const t=this._budget.now();this._recordFrameTaskTimes(t-e);const s=2===this.state?"Idle":1===this.state?"Interacting":"Animating";return a(`${s} Frame Tasks`,e,t,"Maps SDK","Scheduling"),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=N,s=e.frameDuration,r=b;switch(this.state){case 2:t=l(0),s=l(Math.max(P,e.frameDuration)),r=k;break;case 1:s=l(Math.max(S,e.frameDuration))}return s=l(s-e.elapsedFrameTime-t),2!==this.state&&s<b&&!this._forceTask?(this._forceTask=!0,!1):(s=l(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case 2:this._runIdle();break;case 1:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(l(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*U+e*(1-U)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===L&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==L&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===I&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,p.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now(),n=i-t;if(a(`${s.name}`,t,i,"Maps SDK","Scheduling"),s.runtime+=n,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+n),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(p))this._frameTaskTimes.set(p[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class F{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new R,this._handles=new s,this._basePriority=O(t),this.schedulePriority=this._basePriority,this._task=m(null!=r?r:this._queue),this._handles.add(c(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(w),this._scheduler.removeTask(this),this.schedule=Q.schedule,this.reschedule=Q.reschedule,this.scheduleGenerator=Q.scheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=O(e);this._basePriority!==L&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class y{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const w=new y;function D(e){const t=new y;return t.reset(e),t}w.enabled=!1;class M{remove(){}processQueue(){}schedule(e,t,s){try{if(u(t)){const e=_();return s?Promise.resolve(s(e)):Promise.reject(e)}return h(e(w))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(u(t)){const e=_();if(s)return s(e);throw e}const r=e(w);for(;;){const e=r.next(w),i=o(e)?await e:e;if(u(t)){const e=_();if(s){const t=s(e),i=r.return(null);return o(i)&&await E(i),t}const t=r.throw(e);throw o(t)&&await E(t),e}if(i.done)return i.value}}}const Q=new M;export{Q as ImmediateTask,p as TaskPriority,O as getTaskPriority,D as makeBudget,f as newScheduler,w as noBudget,A as taskPriorities};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{getBasisEncoder as e,destroyBasisEncoder as t}from"../../libs/basisu/BasisUEncoder.js";import{getDXTEncoder as n,destroyDXTEncoder as r}from"../../libs/dxtEncoder/DXTEncoder.js";import{CompressedTextureFormat as a}from"../webgl/enums.js";let l,s,i=null,u=null;class o{constructor(e,t){this.internalFormat=e,this.compressedTexture=t}}function c(){i=null,l=null,u=null,s=null,t(),r()}async function h(e){let t;if(t=e.data instanceof ImageBitmap?w(e.data):y(e.data,e.width,e.height,e.components,e.needsFlip),e.hasS3TC){u||await f();const n=new Uint8Array(t.length);if(u?.encode(t,e.width,e.height,e.preMultiplyAlpha,n)){const e=U(n,!0),t=[n.buffer];return{result:new o(e?.internalFormat??null,e?.textureData??null),transferList:t}}return{result:new o(null,null)}}if(e.hasETC){if(i||await d(),e.preMultiplyAlpha&&!u&&await f(),e.preMultiplyAlpha){const n=new Uint8ClampedArray(t.length);u?.premultiply(new Uint8Array(t),e.width,e.height,n),t=n}const n=p(t,e.width,e.height,e.hasMipmap),r=n?m(n):null,a=r?.compressedTexture?.levels.map(e=>e.buffer)||[];return{result:new o(r?.internalFormat??null,r?.compressedTexture??null),transferList:a}}return{result:new o(null,null)}}async function d(){i||(i=await(l??=e()),l=null)}async function f(){u||(u=await(s??=n()),s=null)}function p(e,t,n,r,a=255,l=0,s=!1,u=!1){if(!i)return null;const o=new i.BasisEncoder;o.setPerceptual(!u),o.setCheckForAlpha(!0),o.setForceAlpha(!1),o.setRenormalize(u),o.setMipGen(r),o.setMipSRGB(!u),o.setCreateKTX2File(!0),o.setKTX2SRGBTransferFunc(!u),o.setQualityLevel(a),o.setCompressionLevel(l);const c=new Uint8Array(e.byteLength);o.setSliceSourceImage(0,new Uint8Array(e),t,n,s);const h=o.encode(c),d=new Uint8Array(c.buffer,0,h),f=new i.KTX2File(new Uint8Array(d));return f.isValid()?(o.delete(),d):(f.close(),f.delete(),o.delete(),null)}function m(e){if(!i)return new o(null,null);const t=new i.KTX2File(new Uint8Array(e));t.startTranscoding();const[n,r]=t.getHasAlpha()?[1,a.COMPRESSED_RGBA8_ETC2_EAC]:[0,a.COMPRESSED_RGB8_ETC2],l=t.getLevels(),s=[];for(let a=0;a<l;a++)s.push(new Uint8Array(t.getImageTranscodedSizeInBytes(a,0,0,n))),t.transcodeImage(s[a],a,0,0,n,0,-1,-1);return t.close(),t.delete(),{internalFormat:r,compressedTexture:{type:"compressed",levels:s}}}function w(e){const t=new OffscreenCanvas(e.width,e.height),n=t.getContext("2d");n.drawImage(e,0,0);return n.getImageData(0,0,t.width,t.height).data}function y(e,t,n,r,a){const l=new Uint8ClampedArray(e).subarray(0,t*n*r);if(!a)return l;const s=new Uint8ClampedArray(l.length),i=t*r;for(let u=0;u<n;u++){const e=u*i,t=(n-u-1)*i;s.set(l.subarray(e,e+i),t)}return s}const T=31,A=1,C=2,g=3,E=4,S=7,b=21,_=131072;function D(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const M=D("DXT1"),X=D("DXT3"),R=D("DXT5");function U(e,t){const n=new Int32Array(e.buffer,e.byteOffset,T);let r,l;switch(n[b]){case M:r=8,l=a.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case X:r=16,l=a.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case R:r=16,l=a.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}let s=1,i=n[E],u=n[g];(3&i||3&u)&&(i=i+3&-4,u=u+3&-4);const o=i,c=u;let h,d;n[C]&_&&!1!==t&&(s=Math.max(1,n[S]));let f=e.byteOffset+n[A]+4;const p=[];for(let a=0;a<s;++a)d=(i+3>>2)*(u+3>>2)*r,h=new Uint8Array(e.buffer,f,d),p.push(h),f+=d,i=Math.max(1,i>>1),u=Math.max(1,u>>1);return{textureData:{type:"compressed",levels:p},internalFormat:l,width:o,height:c}}export{o as TextureCompressionWorkerOutput,h as compress,p as compressRGBADataToKTX2,m as createTextureDataKTX2,c as destroy,d as initializeBasisEncoder,f as initializeDXTEncoder};
5
+ import{getBasisEncoder as e,destroyBasisEncoder as t}from"../../libs/basisu/BasisUEncoder.js";import{getDXTEncoder as n,destroyDXTEncoder as r}from"../../libs/dxtEncoder/DXTEncoder.js";import{CompressedTextureFormat as a}from"../webgl/enums.js";let l,s,i=null,o=null;class u{constructor(e,t){this.internalFormat=e,this.compressedTexture=t}}function c(){i=null,l=null,o=null,s=null,t(),r()}async function h(e){let t;t=e.data instanceof ImageBitmap?w(e.data):y(e.data,e.width,e.height,e.components,e.needsFlip);try{if(e.hasS3TC){o||await d();const n=new Uint8Array(t.length);if(o?.encode(t,e.width,e.height,e.preMultiplyAlpha,n)){const e=U(n,!0),t=[n.buffer];return{result:new u(e?.internalFormat??null,e?.textureData??null),transferList:t}}return{result:new u(null,null)}}if(e.hasETC){if(i||await f(),e.preMultiplyAlpha&&!o&&await d(),e.preMultiplyAlpha){const n=new Uint8ClampedArray(t.length);o?.premultiply(new Uint8Array(t),e.width,e.height,n),t=n}const n=p(t,e.width,e.height,e.hasMipmap),r=n?m(n):null,a=r?.compressedTexture?.levels.map(e=>e.buffer)||[];return{result:new u(r?.internalFormat??null,r?.compressedTexture??null),transferList:a}}return{result:new u(null,null)}}finally{t instanceof ImageBitmap&&t.close()}}async function f(){i||(i=await(l??=e()),l=null)}async function d(){o||(o=await(s??=n()),s=null)}function p(e,t,n,r,a=255,l=0,s=!1,o=!1){if(!i)return null;const u=new i.BasisEncoder;u.setPerceptual(!o),u.setCheckForAlpha(!0),u.setForceAlpha(!1),u.setRenormalize(o),u.setMipGen(r),u.setMipSRGB(!o),u.setCreateKTX2File(!0),u.setKTX2SRGBTransferFunc(!o),u.setQualityLevel(a),u.setCompressionLevel(l);const c=new Uint8Array(e.byteLength);u.setSliceSourceImage(0,new Uint8Array(e),t,n,s);const h=u.encode(c),f=new Uint8Array(c.buffer,0,h),d=new i.KTX2File(new Uint8Array(f));return d.isValid()?(u.delete(),f):(d.close(),d.delete(),u.delete(),null)}function m(e){if(!i)return new u(null,null);const t=new i.KTX2File(new Uint8Array(e));t.startTranscoding();const[n,r]=t.getHasAlpha()?[1,a.COMPRESSED_RGBA8_ETC2_EAC]:[0,a.COMPRESSED_RGB8_ETC2],l=t.getLevels(),s=[];for(let a=0;a<l;a++)s.push(new Uint8Array(t.getImageTranscodedSizeInBytes(a,0,0,n))),t.transcodeImage(s[a],a,0,0,n,0,-1,-1);return t.close(),t.delete(),{internalFormat:r,compressedTexture:{type:"compressed",levels:s}}}function w(e){const t=new OffscreenCanvas(e.width,e.height),n=t.getContext("2d");n.drawImage(e,0,0);return n.getImageData(0,0,t.width,t.height).data}function y(e,t,n,r,a){const l=new Uint8ClampedArray(e).subarray(0,t*n*r);if(!a)return l;const s=new Uint8ClampedArray(l.length),i=t*r;for(let o=0;o<n;o++){const e=o*i,t=(n-o-1)*i;s.set(l.subarray(e,e+i),t)}return s}const T=31,A=1,g=2,C=3,E=4,S=7,b=21,_=131072;function D(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const M=D("DXT1"),X=D("DXT3"),R=D("DXT5");function U(e,t){const n=new Int32Array(e.buffer,e.byteOffset,T);let r,l;switch(n[b]){case M:r=8,l=a.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case X:r=16,l=a.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case R:r=16,l=a.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}let s=1,i=n[E],o=n[C];(3&i||3&o)&&(i=i+3&-4,o=o+3&-4);const u=i,c=o;let h,f;n[g]&_&&!1!==t&&(s=Math.max(1,n[S]));let d=e.byteOffset+n[A]+4;const p=[];for(let a=0;a<s;++a)f=(i+3>>2)*(o+3>>2)*r,h=new Uint8Array(e.buffer,d,f),p.push(h),d+=f,i=Math.max(1,i>>1),o=Math.max(1,o>>1);return{textureData:{type:"compressed",levels:p},internalFormat:l,width:u,height:c}}export{u as TextureCompressionWorkerOutput,h as compress,p as compressRGBADataToKTX2,m as createTextureDataKTX2,c as destroy,f as initializeBasisEncoder,d as initializeDXTEncoder};