@arcgis/core 4.34.0-next.99 → 4.34.1

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 (637) hide show
  1. package/analysis/ElevationProfile/ElevationProfileLineInput.js +1 -1
  2. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  3. package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/00c77f03dd511c6dbff2.js +1 -0
  6. package/assets/esri/core/workers/chunks/{e5bcc44f3dc6fc90835a.js → 0461ac6ddd44f8da2eec.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0638a36eaacb56cf89fa.js +1 -0
  8. package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
  9. package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
  10. package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 1847e8ac559085949f6d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/1ae3d331da5baa8e4b6a.js +1 -0
  12. package/assets/esri/core/workers/chunks/1d807057327ba90ab770.js +1 -0
  13. package/assets/esri/core/workers/chunks/1dfca37f95f2b968aa54.js +1 -0
  14. package/assets/esri/core/workers/chunks/{651b9144abb1895cc510.js → 1e848d9da1c61a27cf18.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{2c72e185b780bbbb1c9f.js → 21f1e12d4e703b59c31c.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{f5d89b48f62fba78fd10.js → 222c2ae818353539cab2.js} +1 -1
  17. package/assets/esri/core/workers/chunks/2248c3040e2f9a8b5cbc.js +1 -0
  18. package/assets/esri/core/workers/chunks/297b11752f9c251cd7be.js +1 -0
  19. package/assets/esri/core/workers/chunks/2d834d33b73a55a98ba8.js +1 -0
  20. package/assets/esri/core/workers/chunks/2dce02d199a9625abbd9.js +1 -0
  21. package/assets/esri/core/workers/chunks/{5d3998e15df273a89078.js → 37897186bfbfa1319ff5.js} +1 -1
  22. package/assets/esri/core/workers/chunks/378bed624605fe8f62b1.js +1 -0
  23. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
  24. package/assets/esri/core/workers/chunks/{06e60fc7715d08ede59d.js → 3edffdb0e282ed562ac7.js} +1 -1
  25. package/assets/esri/core/workers/chunks/4470a3fff217f2bfeec5.js +1 -0
  26. package/assets/esri/core/workers/chunks/44e40484acb577039c82.js +1 -0
  27. package/assets/esri/core/workers/chunks/{8f3503b2fb6cd38757b9.js → 458e87902abc24b375da.js} +1 -1
  28. package/assets/esri/core/workers/chunks/4a38b1402cd48ced5d0f.js +1 -0
  29. package/assets/esri/core/workers/chunks/524293f92791c55f6e2c.js +1 -0
  30. package/assets/esri/core/workers/chunks/594761a526629f9aa165.js +1 -0
  31. package/assets/esri/core/workers/chunks/5e60542f80bdacb6e7af.js +1 -0
  32. package/assets/esri/core/workers/chunks/616e3d1947eda575a25a.js +1 -0
  33. package/assets/esri/core/workers/chunks/{86b978a48b539e9fc5b8.js → 618ccc5d922f40fb6597.js} +1 -1
  34. package/assets/esri/core/workers/chunks/6c96997ca5ea1affa7af.js +1 -0
  35. package/assets/esri/core/workers/chunks/6d5f36fdd6ff081f30e8.js +1 -0
  36. package/assets/esri/core/workers/chunks/7010d1eb303a13c72f81.js +1 -0
  37. package/assets/esri/core/workers/chunks/70c7d3128c9242d10873.js +1 -0
  38. package/assets/esri/core/workers/chunks/740e6d2831dcb01ee96a.js +1 -0
  39. package/assets/esri/core/workers/chunks/75535e2e487ed2616acf.js +1 -0
  40. package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
  41. package/assets/esri/core/workers/chunks/{24921d31efa8d222ad2d.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
  42. package/assets/esri/core/workers/chunks/{40b81d1c2d53cf598b8e.js → 7786fc1b3779df832e0a.js} +1 -1
  43. package/assets/esri/core/workers/chunks/7a5c276652e7edf42e73.js +1 -0
  44. package/assets/esri/core/workers/chunks/{c941d15190fc08523d0d.js → 7a9a0fcf78a1863c5dea.js} +1 -1
  45. package/assets/esri/core/workers/chunks/80d2182dac1a49cfd923.js +1 -0
  46. package/assets/esri/core/workers/chunks/81501abaabf10e9bef1b.js +1 -0
  47. package/assets/esri/core/workers/chunks/{e032f3d2ee19790f8c79.js → 881df4fd1dc594576457.js} +1 -1
  48. package/assets/esri/core/workers/chunks/8862e6ceabc990ca0031.js +1 -0
  49. package/assets/esri/core/workers/chunks/8cf2669900bb45cb094a.js +1 -0
  50. package/assets/esri/core/workers/chunks/98739414c107ad78e4d8.js +1 -0
  51. package/assets/esri/core/workers/chunks/98ccd88bdb9cb96a7610.js +1 -0
  52. package/assets/esri/core/workers/chunks/9dc6eeaac94aff385cf9.js +1 -0
  53. package/assets/esri/core/workers/chunks/9e09b5fd04ff1fb18888.js +1 -0
  54. package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
  55. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
  56. package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
  57. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  58. package/assets/esri/core/workers/chunks/af0f82f7efa6e983eca5.js +1 -0
  59. package/assets/esri/core/workers/chunks/b113d4f6a014863aaf66.js +1 -0
  60. package/assets/esri/core/workers/chunks/bcf2bda17bda0210f898.js +1 -0
  61. package/assets/esri/core/workers/chunks/{773d76253588bcf14eaa.js → bd02e9d6c7ba491dd35f.js} +1 -1
  62. package/assets/esri/core/workers/chunks/be1b8e5ff2b1be26845a.js +1 -0
  63. package/assets/esri/core/workers/chunks/{142c45ad68eecaf3fc7c.js → bf9b2949894cc2a1e6b3.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{dfc37c2ce51e6a34fd87.js → c0d787297d2128fe3c38.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c91ce5fcdd4d0a6514d3.js +1 -0
  66. package/assets/esri/core/workers/chunks/{ad3e18c4c65aa2cd1ceb.js → cd3b843ffd4010038c74.js} +1 -1
  67. package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
  68. package/assets/esri/core/workers/chunks/d0767001601412f17ada.js +1 -0
  69. package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js → d391bfbaf0e790cd10d6.js} +2 -2
  70. package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
  71. package/assets/esri/core/workers/chunks/d5fa879de92da4441771.js +1 -0
  72. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  73. package/assets/esri/core/workers/chunks/d9aee7ee4ab75b446ef1.js +1 -0
  74. package/assets/esri/core/workers/chunks/{9027f22a04ac2076ff0e.js → dd37db3f2d1072e250d9.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
  76. package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
  77. package/assets/esri/core/workers/chunks/e97bffa614ad89105f38.js +1 -0
  78. package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
  79. package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
  80. package/assets/esri/core/workers/chunks/f06d185e7defc4272ae7.js +1 -0
  81. package/assets/esri/core/workers/chunks/f18fdfcb3d5d7851e6fc.js +1 -0
  82. package/assets/esri/core/workers/chunks/f2f3ce7a0f3e394d27c4.js +1 -0
  83. package/assets/esri/core/workers/chunks/{b2add7338258ca7c24dd.js → f619ab4a3ff3036641a9.js} +1 -1
  84. package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
  85. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  86. package/assets/esri/core/workers/chunks/{fe3f95fda29e4844b153.js → fa6e59e72c6e1fa79cf8.js} +1 -1
  87. package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
  88. package/assets/esri/core/workers/chunks/{4a2bf3c8da24abd8b9e2.js → fd410a56286f9b8a5903.js} +1 -1
  89. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  90. package/assets/esri/themes/base/widgets/_Directions.scss +17 -18
  91. package/assets/esri/themes/base/widgets/_Editor.scss +36 -2
  92. package/assets/esri/themes/base/widgets/_FeatureForm.scss +1 -1
  93. package/assets/esri/themes/base/widgets/_FeatureTable.scss +2 -0
  94. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
  95. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  96. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +17 -4
  97. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  98. package/assets/esri/themes/dark/main.css +1 -1
  99. package/assets/esri/themes/light/main.css +1 -1
  100. package/assets/esri/themes/light/view.css +1 -1
  101. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -1
  102. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -1
  103. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -1
  104. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -1
  105. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -1
  106. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -1
  107. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -1
  108. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -1
  109. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -1
  110. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -1
  111. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -1
  112. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -1
  113. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -1
  114. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -1
  115. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -1
  116. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -1
  117. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -1
  118. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -1
  119. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -1
  120. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -1
  121. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -1
  122. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -1
  123. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -1
  124. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -1
  125. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -1
  126. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -1
  127. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -1
  128. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -1
  129. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -1
  130. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -1
  131. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -1
  132. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -1
  133. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -1
  134. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -1
  135. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -1
  136. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -1
  137. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -1
  138. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -1
  139. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -1
  140. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  141. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  142. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  143. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  144. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  145. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  146. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  147. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  148. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  149. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  150. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  151. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  152. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  153. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  154. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  185. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  186. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  187. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  188. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  189. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  190. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  191. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  192. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  193. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  194. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  195. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  196. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  197. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  198. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  199. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  200. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  217. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  218. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  219. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  220. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  221. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  222. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  223. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  224. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  225. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  226. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  227. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  228. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  229. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  230. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  231. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  232. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  233. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  234. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  235. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  236. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  237. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  238. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  239. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  240. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  241. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  242. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  243. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  244. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  245. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  246. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  247. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  248. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  249. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  250. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  251. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  252. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  253. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  254. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  255. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  256. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  257. package/chunks/GlowComposition.glsl.js +46 -46
  258. package/chunks/MultiPathImpl.js +1 -1
  259. package/chunks/Point2D.js +1 -1
  260. package/chunks/ShadedColorMaterial.glsl.js +10 -10
  261. package/chunks/UnitFactory.js +1 -1
  262. package/chunks/bundle.js +1 -1
  263. package/config.js +1 -1
  264. package/copyright.txt +0 -60
  265. package/core/has.js +1 -1
  266. package/core/sanitizerUtils.js +1 -1
  267. package/core/workers/workerFactory.js +1 -1
  268. package/editing/fieldUtils.js +5 -0
  269. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  270. package/editing/templateUtils.js +1 -1
  271. package/form/FormTemplate.js +1 -1
  272. package/form/elements/Element.js +1 -1
  273. package/form/elements/FieldElement.js +1 -1
  274. package/form/elements/GroupElement.js +1 -1
  275. package/geometry/operators/gx/operatorOffset.js +1 -1
  276. package/geometry/operators/support/jsonConverter.js +1 -1
  277. package/graphic/graphicOriginUtils.js +1 -1
  278. package/interfaces.d.ts +2075 -256
  279. package/intl/date.js +1 -1
  280. package/intl.d.ts +2 -0
  281. package/intl.js +1 -1
  282. package/kernel.js +1 -1
  283. package/layers/FeatureLayer.js +1 -1
  284. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  285. package/layers/OrientedImageryLayer.js +1 -1
  286. package/layers/ParquetLayer.js +1 -1
  287. package/layers/PointCloudLayer.js +1 -1
  288. package/layers/SceneLayer.js +1 -1
  289. package/layers/VideoLayer.js +1 -1
  290. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  291. package/layers/graphics/data/QueryEngineResult.js +1 -1
  292. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  293. package/layers/graphics/sources/ParquetSource.js +1 -1
  294. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  295. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  296. package/layers/knowledgeGraph/layerUtils.js +1 -1
  297. package/layers/mixins/ImageryTileMixin.js +1 -1
  298. package/layers/mixins/SceneService.js +1 -1
  299. package/layers/ogc/ogcFeatureUtils.js +1 -1
  300. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  301. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  302. package/layers/support/NumberFieldFormat.js +1 -1
  303. package/layers/support/SubtypeSublayer.js +1 -1
  304. package/layers/support/TitleCreator.js +1 -1
  305. package/layers/support/fieldConfigUtils.js +1 -1
  306. package/layers/support/fieldFormatUtils.js +1 -1
  307. package/layers/support/fieldUtils.js +1 -1
  308. package/layers/support/rasterDatasets/pixelReader.js +1 -1
  309. package/layers/support/rasterFieldUtils.js +1 -1
  310. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  311. package/layers/video/VideoController.js +1 -1
  312. package/libs/parquet/parquet.js +1 -1
  313. package/networks/CircuitManager.d.ts +4 -0
  314. package/networks/UnitIdentifierManager.d.ts +4 -0
  315. package/networks/support/Circuit.d.ts +4 -0
  316. package/networks/support/CircuitLocation.d.ts +4 -0
  317. package/networks/support/CircuitPath.d.ts +4 -0
  318. package/networks/support/CircuitPathConnectivityElement.d.ts +4 -0
  319. package/networks/support/CircuitSection.d.ts +4 -0
  320. package/networks/support/Subcircuit.d.ts +4 -0
  321. package/package.json +5 -5
  322. package/popup/FieldInfo.js +1 -1
  323. package/portal/Portal.js +1 -1
  324. package/portal/schemas/definitions.js +1 -1
  325. package/renderers/support/RasterSymbolizer.js +1 -1
  326. package/rest/knowledgeGraphService.d.ts +1 -0
  327. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +4 -0
  328. package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +4 -0
  329. package/rest/networks/support/TelecomNetworkElement.d.ts +4 -0
  330. package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +4 -0
  331. package/rest/print.js +1 -1
  332. package/rest/versionManagement/getVersionInfos.js +1 -1
  333. package/smartMapping/renderers/size.js +1 -1
  334. package/smartMapping/statistics/histogram.js +1 -1
  335. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  336. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  337. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  338. package/smartMapping/support/adapters/support/utils.js +1 -1
  339. package/smartMapping/support/utils.js +1 -1
  340. package/support/basemapDefinitions.js +1 -1
  341. package/support/popupUtils.js +1 -1
  342. package/support/revision.js +1 -1
  343. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  344. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  345. package/symbols/support/symbolUtils.js +1 -1
  346. package/symbols/support/utils.js +1 -1
  347. package/time/timeZoneUtils.js +1 -1
  348. package/undoredo/support/ServiceVersionInfo.js +1 -1
  349. package/undoredo/support/Services.js +1 -1
  350. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  351. package/views/2d/engine/Bitmap.js +1 -1
  352. package/views/2d/engine/flow/dataUtils.js +1 -1
  353. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  354. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
  355. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  356. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  357. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  358. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  359. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  360. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  361. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  362. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  363. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  364. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  365. package/views/2d/layers/features/Processor.js +1 -1
  366. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  367. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  368. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  369. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  370. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  371. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  372. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  373. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  374. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  375. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  376. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  377. package/views/2d/layers/features/schema/ExceedsLimitCache.js +5 -0
  378. package/views/2d/layers/features/schema/SourceSchema.js +1 -1
  379. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  380. package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
  381. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  382. package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
  383. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  384. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  385. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  386. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  387. package/views/2d/layers/features/sources/strategies/constants.js +5 -0
  388. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  389. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  390. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  391. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  392. package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +1 -1
  393. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  394. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  395. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  396. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  397. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  398. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +1 -1
  399. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  400. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  401. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  402. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  403. package/views/3d/layers/FlowSubView3D.js +1 -1
  404. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  405. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  406. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  407. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  408. package/views/3d/layers/TiledLayerView3D.js +1 -1
  409. package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
  410. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  411. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  412. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  413. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  414. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  415. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  416. package/views/3d/layers/support/FeatureTile.js +1 -1
  417. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  418. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  419. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  420. package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
  421. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  422. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  423. package/views/3d/state/controllers/RotateController.js +1 -1
  424. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  425. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  426. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  427. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  428. package/views/3d/state/utils/navigationUtils.js +1 -1
  429. package/views/3d/support/DisplayQualityProfile.js +1 -1
  430. package/views/3d/support/QualitySettings.js +1 -1
  431. package/views/3d/support/engineContent/line.js +1 -1
  432. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  433. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  434. package/views/3d/support/flow/FlowWorker.js +1 -1
  435. package/views/3d/support/flow/FlowWorkerHandle.js +1 -1
  436. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  437. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  438. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  439. package/views/3d/support/flow/constants.js +1 -1
  440. package/views/3d/support/flow/geometryUtils.js +1 -1
  441. package/views/3d/support/flow/loadUtils.js +1 -1
  442. package/views/3d/support/hitTest.js +1 -1
  443. package/views/3d/support/popupHitTest.js +1 -1
  444. package/views/3d/terrain/OverlayRenderer.js +1 -1
  445. package/views/3d/terrain/TerrainSurface.js +1 -1
  446. package/views/3d/terrain/TileAgent.js +1 -1
  447. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  448. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  449. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  450. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  451. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  452. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  453. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  454. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  455. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  456. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  457. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +10 -4
  458. package/views/SceneView.js +1 -1
  459. package/views/VideoView.js +1 -1
  460. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  461. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
  462. package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
  463. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  464. package/views/analysis/ElevationProfile/constants.js +1 -1
  465. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  466. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  467. package/views/analysis/ElevationProfile/types.d.ts +5 -0
  468. package/views/analysis/ElevationProfile/types.js +5 -0
  469. package/views/draw/support/Reshape.js +1 -1
  470. package/views/interactive/dragEventPipeline.js +1 -1
  471. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  472. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  473. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
  474. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  475. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
  476. package/views/layers/FeatureLayerView.js +1 -1
  477. package/views/popupAdapter.js +1 -1
  478. package/views/support/LayerViewManager.js +1 -1
  479. package/views/support/PromiseQueue.js +1 -1
  480. package/views/support/Scheduler.js +1 -1
  481. package/views/support/TextureCompressionWorker.js +1 -1
  482. package/views/ui/UI.js +1 -1
  483. package/views/webgl/Texture.js +1 -1
  484. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  485. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  486. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  487. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  488. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  489. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  490. package/widgets/BatchAttributeForm.js +1 -1
  491. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  492. package/widgets/CoordinateConversion.js +1 -1
  493. package/widgets/Directions/css.js +1 -1
  494. package/widgets/Directions.js +1 -1
  495. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  496. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  497. package/widgets/Editor/EditorViewModel.js +1 -1
  498. package/widgets/Editor/Edits.js +1 -1
  499. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +4 -0
  500. package/widgets/Editor/MergeFeaturesWorkflow.js +5 -0
  501. package/widgets/Editor/MergeFeaturesWorkflowData.d.ts +4 -0
  502. package/widgets/Editor/MergeFeaturesWorkflowData.js +5 -0
  503. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  504. package/widgets/Editor/SplitFeatureWorkflowData.js +1 -1
  505. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  506. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  507. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  508. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  509. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  510. package/widgets/Editor/UpdateWorkflow.js +1 -1
  511. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  512. package/widgets/Editor/VisibleElements.js +1 -1
  513. package/widgets/Editor/Workflow.js +1 -1
  514. package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
  515. package/widgets/Editor/components/FeatureList.js +1 -1
  516. package/widgets/Editor/components/MergeFeaturesList.js +5 -0
  517. package/widgets/Editor/components/Notices.js +1 -1
  518. package/widgets/Editor/components/PanelContent.js +1 -1
  519. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  520. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  521. package/widgets/Editor/components/workflowAdapters/pendingFeatureList/SplitFeatureWorkflowPendingFeatureListAdapter.js +1 -1
  522. package/widgets/Editor/css.js +1 -1
  523. package/widgets/Editor/support/EditorItem.js +1 -1
  524. package/widgets/Editor/support/SketchController.js +1 -1
  525. package/widgets/Editor/support/errors.js +5 -0
  526. package/widgets/Editor/support/mergeFeaturesUtils.js +5 -0
  527. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  528. package/widgets/Editor/workflowUtils.js +1 -1
  529. package/widgets/Editor.js +1 -1
  530. package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
  531. package/widgets/Feature/FeatureFields.js +1 -1
  532. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  533. package/widgets/Feature/FeatureMedia.js +1 -1
  534. package/widgets/Feature/FeatureViewModel.js +1 -1
  535. package/widgets/Feature/support/featureUtils.js +1 -1
  536. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  537. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  538. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  539. package/widgets/FeatureForm/FieldInput.js +1 -1
  540. package/widgets/FeatureForm/InputBase.js +1 -1
  541. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  542. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  543. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  544. package/widgets/FeatureTable/FieldColumn.js +1 -1
  545. package/widgets/FeatureTable/Grid/Column.js +1 -1
  546. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  547. package/widgets/Legend/LegendViewModel.js +1 -1
  548. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  549. package/widgets/Legend/support/utils.js +1 -1
  550. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  551. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  552. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  553. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  554. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  555. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  556. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  557. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  558. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  559. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  560. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  561. package/widgets/OrientedImageryViewer.js +1 -1
  562. package/widgets/PanoramicVideoViewer.js +1 -1
  563. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  564. package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
  565. package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
  566. package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
  567. package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
  568. package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
  569. package/widgets/Print.js +1 -1
  570. package/widgets/Search/LayerSearchSource.js +1 -1
  571. package/widgets/Sketch/SketchViewModel.js +1 -1
  572. package/widgets/Sketch.js +1 -1
  573. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  574. package/widgets/UtilityNetworkTrace.js +1 -1
  575. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  576. package/widgets/support/ColorPicker.js +1 -1
  577. package/widgets/support/FilterCondition.js +1 -1
  578. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  579. package/widgets/support/SelectionList/LayerItem.js +1 -1
  580. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  581. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  582. package/widgets/support/SelectionList/selectionListUtils.js +1 -1
  583. package/widgets/support/SelectionList.js +1 -1
  584. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  585. package/widgets/support/iconUtils.js +1 -1
  586. package/widgets/support/jsxWidgetSupport.js +1 -1
  587. package/assets/esri/core/workers/chunks/02bc183e30e3392bb76d.js +0 -1
  588. package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
  589. package/assets/esri/core/workers/chunks/14ace5dc4b8984212a57.js +0 -1
  590. package/assets/esri/core/workers/chunks/1762ff76350065750c75.js +0 -1
  591. package/assets/esri/core/workers/chunks/1b85967d1178956ee36b.js +0 -1
  592. package/assets/esri/core/workers/chunks/1fd459234917a51b6ae1.js +0 -1
  593. package/assets/esri/core/workers/chunks/22bb877b85ae250d7819.js +0 -1
  594. package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +0 -2
  595. package/assets/esri/core/workers/chunks/24b97ba933324aea6a07.js +0 -1
  596. package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +0 -1
  597. package/assets/esri/core/workers/chunks/2795a2817ebe3298c350.js +0 -1
  598. package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
  599. package/assets/esri/core/workers/chunks/3b65d6a78fbffca37fbd.js +0 -1
  600. package/assets/esri/core/workers/chunks/456161a323be7d640c61.js +0 -1
  601. package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
  602. package/assets/esri/core/workers/chunks/48646f3d95a3f2b17e78.js +0 -1
  603. package/assets/esri/core/workers/chunks/50a5caa96c111dda5c60.js +0 -1
  604. package/assets/esri/core/workers/chunks/5713f96bade5ebb54c81.js +0 -1
  605. package/assets/esri/core/workers/chunks/5a527a47285a5995cff9.js +0 -1
  606. package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +0 -1
  607. package/assets/esri/core/workers/chunks/5cb92abb1f0f38bd0eab.js +0 -1
  608. package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
  609. package/assets/esri/core/workers/chunks/63019a7eb5222dc5e420.js +0 -1
  610. package/assets/esri/core/workers/chunks/630efe10c871425b6a95.js +0 -1
  611. package/assets/esri/core/workers/chunks/65111858957f43eacd8c.js +0 -1
  612. package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
  613. package/assets/esri/core/workers/chunks/701a1835684cf815bcb7.js +0 -1
  614. package/assets/esri/core/workers/chunks/7421f9575487cdc9e28e.js +0 -1
  615. package/assets/esri/core/workers/chunks/7633537dc0c65d655baf.js +0 -1
  616. package/assets/esri/core/workers/chunks/78b35a19332e58c8c279.js +0 -1
  617. package/assets/esri/core/workers/chunks/7fa324900c147ba51019.js +0 -1
  618. package/assets/esri/core/workers/chunks/83ab8c8bc9e6990114a8.js +0 -1
  619. package/assets/esri/core/workers/chunks/9c6fc4fe2c46f40d63d9.js +0 -1
  620. package/assets/esri/core/workers/chunks/a19063456ce21b471b69.js +0 -1
  621. package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
  622. package/assets/esri/core/workers/chunks/ae8c387d59be87457567.js +0 -1
  623. package/assets/esri/core/workers/chunks/b1f667006cba60ef4aa7.js +0 -1
  624. package/assets/esri/core/workers/chunks/b2d9f4e057af26a538fb.js +0 -1
  625. package/assets/esri/core/workers/chunks/b54202dcab8df080e991.js +0 -1
  626. package/assets/esri/core/workers/chunks/ba212ba895ccf573eedf.js +0 -1
  627. package/assets/esri/core/workers/chunks/bcff6178e9d16b1b6191.js +0 -1
  628. package/assets/esri/core/workers/chunks/cf13625a033f9903655f.js +0 -1
  629. package/assets/esri/core/workers/chunks/deb2854bb7d082a26f52.js +0 -1
  630. package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
  631. package/assets/esri/core/workers/chunks/eb1a7bb8b14e651bc241.js +0 -1
  632. package/assets/esri/core/workers/chunks/ed5f5852983bf3070fe6.js +0 -1
  633. package/assets/esri/core/workers/chunks/f09242e97196ad177c10.js +0 -1
  634. package/assets/esri/core/workers/chunks/f154336b4af011cd0c56.js +0 -1
  635. package/assets/esri/core/workers/chunks/f1be3a177328a169128f.js +0 -1
  636. package/assets/esri/core/workers/chunks/f7846523adacbfe5047e.js +0 -1
  637. package/assets/esri/core/workers/chunks/f7a9d2da07196a0989ae.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../request.js";import r from"../../../../core/Accessor.js";import{splitIntoChunks as s}from"../../../../core/arrayUtils.js";import{createTask as i,resultOrAbort as o,result as n}from"../../../../core/asyncUtils.js";import a from"../../../../core/Collection.js";import{makeHandle as d}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import c from"../../../../core/Logger.js";import{abortMaybe as h,destroyMaybe as l}from"../../../../core/maybe.js";import{estimateStringMemory as u,estimateNumberMemory as m}from"../../../../core/memoryEstimations.js";import{whenOrAbort as p,createResolver as g}from"../../../../core/promiseUtils.js";import y from"../../../../core/ReactiveSet.js";import{watch as f,sync as _}from"../../../../core/reactiveUtils.js";import{property as b}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as v}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as O}from"../../../../geometry/support/spatialReferenceUtils.js";import{formatNumber as j}from"../../../../intl/number.js";import{getMaximumQuerySize as C,queryAllJSON as w}from"../../../../layers/support/featureQueryAll.js";import{isTimeoutError as I}from"../../../../support/requestUtils.js";let F=class extends r{constructor(e){super(e),this._warnMaximumChangedObjectsExceeded=!1,this._maximumNumberOfEditOVerrides=E,this._definitionExpressionDirty=!0,this._interactiveEditingSessions=new a,this.geometryOverrides=new a,this._clientGeometryCache=new Map,this._attributeChangedObjectIds=new y,this._geometryChangedObjectIds=new y,this._pendingFetchChangedObjectIds=null,this._pendingFetchAbortController=new AbortController,this._applyGeometryOverridesTask=null,this._featureIdLocks=new Map}initialize(){this._memCache=new x(this.memoryController.newCache(`i3s-attribute-overrides-${this.layer.uid}`)),this.addHandles(f(()=>this.layer.definitionExpression,async()=>{this._definitionExpressionDirty=!0,this._pendingFetchChangedObjectIds||(this._applyGeometryOverridesTask=h(this._applyGeometryOverridesTask),this._applyGeometryOverridesTask=i(e=>this._queryAndAddGeometryOverrides(e)),await this._applyGeometryOverridesTask.promise)},_)),this._pendingFetchChangedObjectIds=this._fetchChangedObjectIds(this._pendingFetchAbortController?.signal),this._pendingFetchChangedObjectIds.finally(()=>{this._pendingFetchAbortController=null,this._pendingFetchChangedObjectIds=null})}destroy(){this._set("layer",null),this._memCache=l(this._memCache),this._pendingFetchAbortController=h(this._pendingFetchAbortController),this._pendingFetchChangedObjectIds=null,this._featureIdLocks.clear()}get is3DOFL(){return null!=this._associatedLayer?.infoFor3D}get sortedGeometryChangedObjectIds(){return this.is3DOFL?[...this._geometryChangedObjectIds].sort((e,t)=>e-t):[]}get _associatedLayer(){return null==this.layer?null:this.layer.associatedLayer}get hasGeometryChanges(){return this._geometryChangedObjectIds.size>0}get updating(){return!!this.is3DOFL&&!!(this._pendingFetchChangedObjectIds||this._applyGeometryOverridesTask&&!this._applyGeometryOverridesTask.finished)}get isEmpty(){return null==this._pendingFetchChangedObjectIds&&0===this._attributeChangedObjectIds.size&&0===this._geometryChangedObjectIds.size}featureHasGeometryChanges(e){return this._geometryChangedObjectIds.has(e)}featureHasAttributeChanges(e){return this._attributeChangedObjectIds.has(e)}createInteractiveEditSession(e){this._attributeChangedObjectIds.add(e);const t=this._interactiveEditingSessions,r=new A(e,()=>{t.remove(r)});return t.unshift(r),r}async applyAttributeOverrides(e,t,r,s=[]){if(this._pendingFetchChangedObjectIds&&await p(this._pendingFetchChangedObjectIds,r),null==t)return;const{attributeData:i,loadedAttributes:o}=t;if(null==o||null==i||0===this._attributeChangedObjectIds.size)return;const n=new Set;for(const d of o)n.add(d.index);for(const d of s)n.has(d.index)||(o.push(d),i[d.name]=new Array(e.length));const a=await this._lockFeatureIds(e);try{const t={attributeData:i,loadedAttributes:o},s=this._getOverridesFromCache(e,t,this._attributeChangedObjectIds),{objectIds:n,fieldNames:a}=s;if(0===n.length||0===a.length)return;const d=await this._queryAttributeOverridesFromAssociatedLayer(n,a,r);if(null==d)return;this._processOverridesFromAssociatedLayer(e,d,a,t)}finally{a.remove()}}updateGeometry(e,t){this._geometryChangedObjectIds.add(e);const r=this._clientGeometryCache.get(e);if(null!=r&&(this.geometryOverrides.remove(r),this._clientGeometryCache.delete(e)),null!=t){const r={oid:e,mesh:t};this.geometryOverrides.add(r),this._clientGeometryCache.set(e,r)}}updateAttributeValue(e,t,r){this._attributeChangedObjectIds.add(e),this._cacheAttributeValue(e,t,r)}featureAdded(e){this.is3DOFL&&this._geometryChangedObjectIds.add(e),this._attributeChangedObjectIds.add(e)}_cacheAttributeValue(e,t,r){this._memCache.put(e,t,r)}_getOverridesFromCache(e,{loadedAttributes:t,attributeData:r},s){const i=new Array;for(const a of t)i[a.index]=r[a.name];const o=new Set,n=new Set;for(let a=0;a<e.length;a++){const r=e[a];if(s.has(r))for(const e of t){const t=this._attributeFromCache(r,e.index);void 0===t?(o.add(r),n.add(e.name)):i[e.index][a]=t}}return{objectIds:Array.from(o),fieldNames:Array.from(n)}}_attributeFromCache(e,t){const r=this._fromInteractiveEditingSession(e,t);return void 0!==r?r:this._memCache.get(e,t)}_fromInteractiveEditingSession(e,t){if(null!=this._interactiveEditingSessions)for(const r of this._interactiveEditingSessions){if(r.objectId!==e)continue;const s=r.getAttribute(t);if(void 0!==s)return s}}async _queryAttributeOverridesFromAssociatedLayer(e,t,r){if(0===e.length)return null;this._logWarningIfMaximumObjectsExceeded();const{associatedLayer:s}=this.layer;if(null==s)return null;const i=s.createQuery(),{objectIdField:o}=s,n=[o,...t];i.where=this.layer.definitionExpression||"1=1",i.returnGeometry=!1,i.outFields=n,i.cacheHint=!0;const a=await this._executeBatchQuery(s,e,i,r),d=[];for(const c of a)if(c.ok)for(const e of c.value.features)d.push(e);return d}async _queryGeometryOverridesFromAssociatedLayer(e,t){if(0===e.length||!this.is3DOFL)return null;const r=this.layer.associatedLayer,s=r.infoFor3D,{spatialReference:i}=r,{state:{viewingMode:o},spatialReference:n}=this.view,a=1===o,d=i.isGeographic;if(a&&!d)return c.getLogger(this).warn("unsupported-pcs-edits-in-global-view",this.layer.title,S(i,n,this.view.viewingMode,0)),null;if(!a&&d)return c.getLogger(this).warn("unsupported-gcs-edits-in-local-view",this.layer.title,S(i,n,this.view.viewingMode,0)),null;if(!(O(i,n)||a&&n.isWebMercator&&i.isWGS84))return c.getLogger(this).warn("unsupported-mismatched-spatial-reference-edits",this.layer.title,S(i,n,this.view.viewingMode,1)),null;this._logWarningIfMaximumObjectsExceeded();const{objectIdField:h,globalIdField:l}=r,u=[h,...null!=l?[l]:[]],m=r.createQuery();m.where=this.layer.definitionExpression||"1=1",m.returnGeometry=!0,m.outFields=u,m.cacheHint=!0,m.returnZ=r.hasZ,m.returnM=r.hasM;const{assetMapFromAssetMapsJSON:p,extractMesh:g}=await import("../../../../rest/support/meshFeatureSet.js"),y=await this._executeBatchQuery(r,e,m,t),f=[];for(const c of y){if(!c.ok)continue;const e=c.value,{assetMaps:t,features:r,globalIdFieldName:o}=e;if(null==t)continue;const n=p(s,t);for(const a of r){const e=g(a,o,i,s,n),t=a;null!=e?(t.geometry=e,f.push(t)):t.geometry=null}}return f}_logWarningIfMaximumObjectsExceeded(){if(!this._warnMaximumChangedObjectsExceeded)return;this._warnMaximumChangedObjectsExceeded=!1;let e=`The number of edited objects that are not yet cached in the scene service exceeds the maximum limit. Attribute changes will only be available for the first ${j(this._maximumNumberOfEditOVerrides)} objects. Please consider re-caching the scene service`;const t=this.layer.portalItem;e+=t?.loaded?` (${t.portal.url}/home/item.html?id=${t.id}#settings)`:` (${this.layer.parsedUrl.path})`,c.getLogger(this).warn("#queryOverrides()",this.layer.title,`${e}.`)}async _executeBatchQuery(e,t,r,i){if(0===t.length)return[];const n=C(e);t=[...t].sort((e,t)=>e-t);const a=s(t,n).map(t=>{const s=r.clone();return s.objectIds=t,o(w(e,s,{signal:i}))});return Promise.all(a)}_processOverridesFromAssociatedLayer(e,t,r,{loadedAttributes:s,attributeData:i}){const o=this._associatedLayer;if(null==o)return;const n=o.objectIdField,a=r.map(t=>(t in i||(i[t]=new Array(e.length)),i[t])),d=new Map(s.map(e=>[e.name,e.index])),c=r.map(e=>d.get(e)),h=new Map(Array.from(e,(e,t)=>[e,t]));for(const l of t){const e=l.attributes[n];for(let t=0;t<r.length;t++){const s=c[t],i=h.get(e),o=l.attributes[r[t]];a[t][i]=o,this._cacheAttributeValue(e,s,o)}}}async _fetchChangedObjectIds(e){const r=this.layer;await r.load({signal:e}),this._geometryChangedObjectIds.clear(),this._attributeChangedObjectIds.clear();const{associatedLayer:s}=r;if(null==s||!s.capabilities?.operations?.supportsChangeTracking)return;const i=this._getFetchChangedObjectIdsServerGen();if(null==i)return;const o=s.layerId,a=this.is3DOFL,d={...s.customParameters,f:"json",returnIdsOnly:!0,layers:`[${o}]`,returnUpdates:!0,returnDeletes:a,returnInserts:a,layerServerGens:JSON.stringify([{id:o,serverGen:i}])};if(null!=s.apiKey&&(d.token=s.apiKey),a){const e=s.infoFor3D;d.fieldsToCompare=JSON.stringify({fields:[...Object.values(e.transformFieldRoles),e.sourceHashField]})}const h=await n(t(`${s.url}/extractChanges`,{method:"post",query:d,timeout:L,signal:e}));if(!h.ok&&I(h.error)){const e=this.layer.title;c.getLogger(this).warn("extractChanges:timeout",e,`${e} could not obtain edited features that are not cached in the scene service. Display of features may not be up to date with the latest edits. Consider re-caching the scene service.`)}if(h.ok&&1===h.value.data?.edits?.length){const t=h.value.data.edits[0],r=t?.objectIds,s=t?.fieldUpdates,i=r?.adds??[],o=r?.updates??[],n=r?.deletes??[],d=[...i,...o,...n],c=a?[...i,...s??o,...n]:[],l=Math.min(this._maximumNumberOfEditOVerrides,d.length);l<d.length&&(this._warnMaximumChangedObjectsExceeded=!0);const u=d.sort((e,t)=>e-t);for(let e=0;e<l;++e){const t=u[e];this._attributeChangedObjectIds.add(t)}for(const e of c)this._geometryChangedObjectIds.add(e);for(;this._definitionExpressionDirty;)await this._queryAndAddGeometryOverrides(e)}}async _queryAndAddGeometryOverrides(e){this._definitionExpressionDirty=!1;const t=this.layer,{associatedLayer:r}=t;if(null!=r&&r.capabilities?.operations?.supportsChangeTracking&&this.is3DOFL&&this._geometryChangedObjectIds.size>0){const t=await this._queryGeometryOverridesFromAssociatedLayer(Array.from(this._geometryChangedObjectIds),e);if(null!=t)for(const e of t)null!=e.geometry&&this.updateGeometry(e.attributes[r.objectIdField],e.geometry)}}_getFetchChangedObjectIdsServerGen(){const e=this.layer;if(null!=e.serviceUpdateTimeStamp?.lastUpdate)return e.serviceUpdateTimeStamp.lastUpdate;const t=e.associatedLayer;return null!=t?.serverGens?.minServerGen?t.serverGens.minServerGen:null}async _lockFeatureIds(e){const t=this._featureIdLocks;let r=!0;for(;r;){const s=new Array;for(const r of e){const e=t.get(r);e&&s.push(e)}0===s.length?r=!1:await Promise.all(s)}const s=g(),i=s.promise;for(const o of e)t.set(o,i);return d(()=>{for(const r of e)t.delete(r);s.resolve()})}get test(){}};e([b({constructOnly:!0})],F.prototype,"view",void 0),e([b({constructOnly:!0})],F.prototype,"layer",void 0),e([b({readOnly:!0})],F.prototype,"is3DOFL",null),e([b()],F.prototype,"_interactiveEditingSessions",void 0),e([b({readOnly:!0})],F.prototype,"sortedGeometryChangedObjectIds",null),e([b({readOnly:!0})],F.prototype,"geometryOverrides",void 0),e([b()],F.prototype,"_clientGeometryCache",void 0),e([b()],F.prototype,"_associatedLayer",null),e([b({constructOnly:!0})],F.prototype,"memoryController",void 0),e([b()],F.prototype,"_attributeChangedObjectIds",void 0),e([b()],F.prototype,"_geometryChangedObjectIds",void 0),e([b()],F.prototype,"hasGeometryChanges",null),e([b()],F.prototype,"_pendingFetchChangedObjectIds",void 0),e([b()],F.prototype,"_pendingFetchAbortController",void 0),e([b()],F.prototype,"_applyGeometryOverridesTask",void 0),e([b()],F.prototype,"updating",null),e([b()],F.prototype,"isEmpty",null),F=e([v("esri.views.3d.layers.i3s.I3SOverrides")],F);class A{constructor(e,t){this.objectId=e,this._remove=t,this._updates=new Map,this._isActive=!0}getAttribute(e){return this._updates.get(e)}setAttribute(e,t){this.isActive&&this._updates.set(e,t)}remove(){this.isActive&&(this._isActive=!1,this._remove())}get isActive(){return this._isActive}}class x{constructor(e){this._cache=e}destroy(){this._cache.destroy()}put(e,t,r){this._cache.put(this._getKey(e,t),new G(r))}get(e,t){return this._cache.get(this._getKey(e,t))?.value}_getKey(e,t){return`${e}-${t}`}}class G{constructor(e){this.value=e,this.usedMemory="string"==typeof e?u(e):m}}const L=1e4,E=5e4;function S(e,t,r,s){return`Displaying the edits of a SceneLayer with a${0===s?e.isGeographic?" geographic ":" projected ":" "}spatial reference (wkid:${e.wkid}) in ${r} viewing mode${1===s?` with spatial reference (wkid:${t.wkid}) `:" "}is not supported. No geometry edits will be displayed for this layer.\nPlease consider re-caching the scene service or changing the ${0===s?"viewing mode":"view spatial reference"} to display edits.`}export{F as I3SOverrides};
5
+ import{__decorate as e}from"tslib";import t from"../../../../request.js";import r from"../../../../core/Accessor.js";import{splitIntoChunks as s}from"../../../../core/arrayUtils.js";import{createTask as i,resultOrAbort as o,result as n}from"../../../../core/asyncUtils.js";import a from"../../../../core/Collection.js";import{makeHandle as d}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import c from"../../../../core/Logger.js";import{abortMaybe as h,destroyMaybe as l}from"../../../../core/maybe.js";import{estimateStringMemory as u,estimateNumberMemory as m}from"../../../../core/memoryEstimations.js";import{whenOrAbort as p,createResolver as g}from"../../../../core/promiseUtils.js";import y from"../../../../core/ReactiveSet.js";import{watch as f,sync as _}from"../../../../core/reactiveUtils.js";import{property as b}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as v}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as O}from"../../../../geometry/support/spatialReferenceUtils.js";import{formatNumber as j}from"../../../../intl/number.js";import{getMaximumQuerySize as C,queryAllJSON as w}from"../../../../layers/support/featureQueryAll.js";let I=class extends r{constructor(e){super(e),this._warnMaximumChangedObjectsExceeded=!1,this._maximumNumberOfEditOVerrides=L,this._definitionExpressionDirty=!0,this._interactiveEditingSessions=new a,this.geometryOverrides=new a,this._clientGeometryCache=new Map,this._attributeChangedObjectIds=new y,this._geometryChangedObjectIds=new y,this._pendingFetchChangedObjectIds=null,this._pendingFetchAbortController=new AbortController,this._applyGeometryOverridesTask=null,this._featureIdLocks=new Map}initialize(){this._memCache=new A(this.memoryController.newCache(`i3s-attribute-overrides-${this.layer.uid}`)),this.addHandles(f(()=>this.layer.definitionExpression,async()=>{this._definitionExpressionDirty=!0,this._pendingFetchChangedObjectIds||(this._applyGeometryOverridesTask=h(this._applyGeometryOverridesTask),this._applyGeometryOverridesTask=i(e=>this._queryAndAddGeometryOverrides(e)),await this._applyGeometryOverridesTask.promise)},_)),this._pendingFetchChangedObjectIds=this._fetchChangedObjectIds(this._pendingFetchAbortController?.signal),this._pendingFetchChangedObjectIds.finally(()=>{this._pendingFetchAbortController=null,this._pendingFetchChangedObjectIds=null})}destroy(){this._set("layer",null),this._memCache=l(this._memCache),this._pendingFetchAbortController=h(this._pendingFetchAbortController),this._pendingFetchChangedObjectIds=null,this._featureIdLocks.clear()}get is3DOFL(){return null!=this._associatedLayer?.infoFor3D}get sortedGeometryChangedObjectIds(){return this.is3DOFL?[...this._geometryChangedObjectIds].sort((e,t)=>e-t):[]}get _associatedLayer(){return null==this.layer?null:this.layer.associatedLayer}get hasGeometryChanges(){return this._geometryChangedObjectIds.size>0}get updating(){return!!this.is3DOFL&&!!(this._pendingFetchChangedObjectIds||this._applyGeometryOverridesTask&&!this._applyGeometryOverridesTask.finished)}get isEmpty(){return null==this._pendingFetchChangedObjectIds&&0===this._attributeChangedObjectIds.size&&0===this._geometryChangedObjectIds.size}featureHasGeometryChanges(e){return this._geometryChangedObjectIds.has(e)}featureHasAttributeChanges(e){return this._attributeChangedObjectIds.has(e)}createInteractiveEditSession(e){this._attributeChangedObjectIds.add(e);const t=this._interactiveEditingSessions,r=new F(e,()=>{t.remove(r)});return t.unshift(r),r}async applyAttributeOverrides(e,t,r,s=[]){if(this._pendingFetchChangedObjectIds&&await p(this._pendingFetchChangedObjectIds,r),null==t)return;const{attributeData:i,loadedAttributes:o}=t;if(null==o||null==i||0===this._attributeChangedObjectIds.size)return;const n=new Set;for(const d of o)n.add(d.index);for(const d of s)n.has(d.index)||(o.push(d),i[d.name]=new Array(e.length));const a=await this._lockFeatureIds(e);try{const t={attributeData:i,loadedAttributes:o},s=this._getOverridesFromCache(e,t,this._attributeChangedObjectIds),{objectIds:n,fieldNames:a}=s;if(0===n.length||0===a.length)return;const d=await this._queryAttributeOverridesFromAssociatedLayer(n,a,r);if(null==d)return;this._processOverridesFromAssociatedLayer(e,d,a,t)}finally{a.remove()}}updateGeometry(e,t){this._geometryChangedObjectIds.add(e);const r=this._clientGeometryCache.get(e);if(null!=r&&(this.geometryOverrides.remove(r),this._clientGeometryCache.delete(e)),null!=t){const r={oid:e,mesh:t};this.geometryOverrides.add(r),this._clientGeometryCache.set(e,r)}}updateAttributeValue(e,t,r){this._attributeChangedObjectIds.add(e),this._cacheAttributeValue(e,t,r)}featureAdded(e){this.is3DOFL&&this._geometryChangedObjectIds.add(e),this._attributeChangedObjectIds.add(e)}_cacheAttributeValue(e,t,r){this._memCache.put(e,t,r)}_getOverridesFromCache(e,{loadedAttributes:t,attributeData:r},s){const i=new Array;for(const a of t)i[a.index]=r[a.name];const o=new Set,n=new Set;for(let a=0;a<e.length;a++){const r=e[a];if(s.has(r))for(const e of t){const t=this._attributeFromCache(r,e.index);void 0===t?(o.add(r),n.add(e.name)):i[e.index][a]=t}}return{objectIds:Array.from(o),fieldNames:Array.from(n)}}_attributeFromCache(e,t){const r=this._fromInteractiveEditingSession(e,t);return void 0!==r?r:this._memCache.get(e,t)}_fromInteractiveEditingSession(e,t){if(null!=this._interactiveEditingSessions)for(const r of this._interactiveEditingSessions){if(r.objectId!==e)continue;const s=r.getAttribute(t);if(void 0!==s)return s}}async _queryAttributeOverridesFromAssociatedLayer(e,t,r){if(0===e.length)return null;this._logWarningIfMaximumObjectsExceeded();const{associatedLayer:s}=this.layer;if(null==s)return null;const i=s.createQuery(),{objectIdField:o}=s,n=[o,...t];i.where=this.layer.definitionExpression||"1=1",i.returnGeometry=!1,i.outFields=n,i.cacheHint=!0;const a=await this._executeBatchQuery(s,e,i,r),d=[];for(const c of a)if(c.ok)for(const e of c.value.features)d.push(e);return d}async _queryGeometryOverridesFromAssociatedLayer(e,t){if(0===e.length||!this.is3DOFL)return null;const r=this.layer.associatedLayer,s=r.infoFor3D,{spatialReference:i}=r,{state:{viewingMode:o},spatialReference:n}=this.view,a=1===o,d=i.isGeographic;if(a&&!d)return c.getLogger(this).warn("unsupported-pcs-edits-in-global-view",this.layer.title,E(i,n,this.view.viewingMode,0)),null;if(!a&&d)return c.getLogger(this).warn("unsupported-gcs-edits-in-local-view",this.layer.title,E(i,n,this.view.viewingMode,0)),null;if(!(O(i,n)||a&&n.isWebMercator&&i.isWGS84))return c.getLogger(this).warn("unsupported-mismatched-spatial-reference-edits",this.layer.title,E(i,n,this.view.viewingMode,1)),null;this._logWarningIfMaximumObjectsExceeded();const{objectIdField:h,globalIdField:l}=r,u=[h,...null!=l?[l]:[]],m=r.createQuery();m.where=this.layer.definitionExpression||"1=1",m.returnGeometry=!0,m.outFields=u,m.cacheHint=!0,m.returnZ=r.hasZ,m.returnM=r.hasM;const{assetMapFromAssetMapsJSON:p,extractMesh:g}=await import("../../../../rest/support/meshFeatureSet.js"),y=await this._executeBatchQuery(r,e,m,t),f=[];for(const c of y){if(!c.ok)continue;const e=c.value,{assetMaps:t,features:r,globalIdFieldName:o}=e;if(null==t)continue;const n=p(s,t);for(const a of r){const e=g(a,o,i,s,n),t=a;null!=e?(t.geometry=e,f.push(t)):t.geometry=null}}return f}_logWarningIfMaximumObjectsExceeded(){if(!this._warnMaximumChangedObjectsExceeded)return;this._warnMaximumChangedObjectsExceeded=!1;let e=`The number of edited objects that are not yet cached in the scene service exceeds the maximum limit. Attribute changes will only be available for the first ${j(this._maximumNumberOfEditOVerrides)} objects. Please consider re-caching the scene service`;const t=this.layer.portalItem;e+=t?.loaded?` (${t.portal.url}/home/item.html?id=${t.id}#settings)`:` (${this.layer.parsedUrl.path})`,c.getLogger(this).warn("#queryOverrides()",this.layer.title,`${e}.`)}async _executeBatchQuery(e,t,r,i){if(0===t.length)return[];const n=C(e);t=[...t].sort((e,t)=>e-t);const a=s(t,n).map(t=>{const s=r.clone();return s.objectIds=t,o(w(e,s,{signal:i}))});return Promise.all(a)}_processOverridesFromAssociatedLayer(e,t,r,{loadedAttributes:s,attributeData:i}){const o=this._associatedLayer;if(null==o)return;const n=o.objectIdField,a=r.map(t=>(t in i||(i[t]=new Array(e.length)),i[t])),d=new Map(s.map(e=>[e.name,e.index])),c=r.map(e=>d.get(e)),h=new Map(Array.from(e,(e,t)=>[e,t]));for(const l of t){const e=l.attributes[n];for(let t=0;t<r.length;t++){const s=c[t],i=h.get(e),o=l.attributes[r[t]];a[t][i]=o,this._cacheAttributeValue(e,s,o)}}}async _fetchChangedObjectIds(e){const r=this.layer;await r.load({signal:e}),this._geometryChangedObjectIds.clear(),this._attributeChangedObjectIds.clear();const{associatedLayer:s}=r;if(null==s||!s.capabilities?.operations?.supportsChangeTracking)return;const i=this._getFetchChangedObjectIdsServerGen();if(null==i)return;const o=s.layerId,a=this.is3DOFL,d={...s.customParameters,f:"json",returnIdsOnly:!0,layers:`[${o}]`,returnUpdates:!0,returnDeletes:a,returnInserts:a,layerServerGens:JSON.stringify([{id:o,serverGen:i}])};if(null!=s.apiKey&&(d.token=s.apiKey),a){const e=s.infoFor3D;d.fieldsToCompare=JSON.stringify({fields:[...Object.values(e.transformFieldRoles),e.sourceHashField]})}const h=await n(t(`${s.url}/extractChanges`,{method:"post",query:d,timeout:G,signal:e}));if(!h.ok){const e=this.layer.title;c.getLogger(this).warn("extractChanges:timeout",e,": could not obtain edited features that are not cached in the scene service. Display of features may not be up to date with the latest edits. Consider re-caching the scene service.")}if(h.ok&&1===h.value.data?.edits?.length){const t=h.value.data.edits[0],r=t?.objectIds,s=t?.fieldUpdates,i=r?.adds??[],o=r?.updates??[],n=r?.deletes??[],d=[...i,...o,...n],c=a?[...i,...s??o,...n]:[],l=Math.min(this._maximumNumberOfEditOVerrides,d.length);l<d.length&&(this._warnMaximumChangedObjectsExceeded=!0);const u=d.sort((e,t)=>e-t);for(let e=0;e<l;++e){const t=u[e];this._attributeChangedObjectIds.add(t)}for(const e of c)this._geometryChangedObjectIds.add(e);for(;this._definitionExpressionDirty;)await this._queryAndAddGeometryOverrides(e)}}async _queryAndAddGeometryOverrides(e){this._definitionExpressionDirty=!1;const t=this.layer,{associatedLayer:r}=t;if(null!=r&&r.capabilities?.operations?.supportsChangeTracking&&this.is3DOFL&&this._geometryChangedObjectIds.size>0){const t=await this._queryGeometryOverridesFromAssociatedLayer(Array.from(this._geometryChangedObjectIds),e);if(null!=t)for(const e of t)null!=e.geometry&&this.updateGeometry(e.attributes[r.objectIdField],e.geometry)}}_getFetchChangedObjectIdsServerGen(){const e=this.layer;if(null!=e.serviceUpdateTimeStamp?.lastUpdate)return e.serviceUpdateTimeStamp.lastUpdate;const t=e.associatedLayer;return null!=t?.serverGens?.minServerGen?t.serverGens.minServerGen:null}async _lockFeatureIds(e){const t=this._featureIdLocks;let r=!0;for(;r;){const s=new Array;for(const r of e){const e=t.get(r);e&&s.push(e)}0===s.length?r=!1:await Promise.all(s)}const s=g(),i=s.promise;for(const o of e)t.set(o,i);return d(()=>{for(const r of e)t.delete(r);s.resolve()})}get test(){}};e([b({constructOnly:!0})],I.prototype,"view",void 0),e([b({constructOnly:!0})],I.prototype,"layer",void 0),e([b({readOnly:!0})],I.prototype,"is3DOFL",null),e([b()],I.prototype,"_interactiveEditingSessions",void 0),e([b({readOnly:!0})],I.prototype,"sortedGeometryChangedObjectIds",null),e([b({readOnly:!0})],I.prototype,"geometryOverrides",void 0),e([b()],I.prototype,"_clientGeometryCache",void 0),e([b()],I.prototype,"_associatedLayer",null),e([b({constructOnly:!0})],I.prototype,"memoryController",void 0),e([b()],I.prototype,"_attributeChangedObjectIds",void 0),e([b()],I.prototype,"_geometryChangedObjectIds",void 0),e([b()],I.prototype,"hasGeometryChanges",null),e([b()],I.prototype,"_pendingFetchChangedObjectIds",void 0),e([b()],I.prototype,"_pendingFetchAbortController",void 0),e([b()],I.prototype,"_applyGeometryOverridesTask",void 0),e([b()],I.prototype,"updating",null),e([b()],I.prototype,"isEmpty",null),I=e([v("esri.views.3d.layers.i3s.I3SOverrides")],I);class F{constructor(e,t){this.objectId=e,this._remove=t,this._updates=new Map,this._isActive=!0}getAttribute(e){return this._updates.get(e)}setAttribute(e,t){this.isActive&&this._updates.set(e,t)}remove(){this.isActive&&(this._isActive=!1,this._remove())}get isActive(){return this._isActive}}class A{constructor(e){this._cache=e}destroy(){this._cache.destroy()}put(e,t,r){this._cache.put(this._getKey(e,t),new x(r))}get(e,t){return this._cache.get(this._getKey(e,t))?.value}_getKey(e,t){return`${e}-${t}`}}class x{constructor(e){this.value=e,this.usedMemory="string"==typeof e?u(e):m}}const G=1e4,L=5e4;function E(e,t,r,s){return`Displaying the edits of a SceneLayer with a${0===s?e.isGeographic?" geographic ":" projected ":" "}spatial reference (wkid:${e.wkid}) in ${r} viewing mode${1===s?` with spatial reference (wkid:${t.wkid}) `:" "}is not supported. No geometry edits will be displayed for this layer.\nPlease consider re-caching the scene service or changing the ${0===s?"viewing mode":"view spatial reference"} to display edits.`}export{I as I3SOverrides};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{shuffle as t}from"../../../../core/arrayUtils.js";import{baseObjectMemory as e}from"../../../../core/memoryEstimations.js";import{signal as s}from"../../../../core/signal.js";import{diameter as i,create as r}from"../../../../geometry/support/aaBoundingBox.js";import{fromExtent as a,create as u,intersects as h,copy as n,positiveInfinity as f,intersection as l}from"../../../../geometry/support/aaBoundingRect.js";import{numVertices as d,estimateSize as m,getObjectId as c,computeAABB as o}from"../../../../layers/graphics/dehydratedFeatures.js";import{computeMaxZ as _}from"../graphics/graphicUtils.js";const g=16438;class F{constructor(t){this.descriptor=t,this._numVertices=0,this.exceededTransferLimit=s(!1),this._fetchFailed=s(!1),this._sorted=!1,this._numFeatures=s(S),this._emptyFeatureRatio=s(0),this._estimatedSize=-1,this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._displayingFeatures=null,this.alive=!0,this.filtered=!1,this._features=null,this._featuresLength=s(0),this._featureLimit=s(0),this._fetchStatus=0,this.fetchInformation=s(""),this.fetchingResolution=this.displayingResolution=t.resolution}get featuresMissing(){return this.fetchFailed||(this.hasPreciseFeatureCount?this._featuresLength.value<this.numFeatures:this.exceededTransferLimit.value)}get showsAllFeatures(){return!this.fetchFailed&&null!=this.displayingFeatures&&(this.hasPreciseFeatureCount?this.displayingFeatures.length===this.numFeatures:!this.exceededTransferLimit.value)}get missingAttributes(){return this._missingAttributes}get fetchFailed(){return this._fetchFailed.value}set fetchFailed(t){this._fetchFailed.value=t}get displayingFeatures(){return this._displayingFeatures}set displayingFeatures(t){this._displayingFeatures=t,this.extentIncludingBorrowedFeatures=null}get perTileMaximumNumberOfFeaturesExceeded(){const t=this.isFetched&&this.featuresMissing;return!this.filtered&&(t||this.hasFeatureLimit)}get features(){return this._features}get featureLimit(){return this._featureLimit.value}set featureLimit(t){this._featureLimit.value!==t&&(this._featureLimit.value=t,this._estimatedUnusedSizeDirty=!0)}get hasFeatureLimit(){return this.featureLimit!==this._featuresLength.value}get availableFields(){return this._availableFields}setFeatures(t,e,s,i){this._availableFields=s,this._features=t,this._featuresLength.value=t?.length??0,this._sorted=!1,this._estimatedSize=-1,this._estimatedUnusedSizeDirty=!0,this._missingAttributes=i,t&&t.length>0?(this._emptyFeatureRatio.value=e/(t.length+e),this._numVertices=t.reduce((t,e)=>t+d(e.geometry),0)):(this._emptyFeatureRatio.value=0,this._numVertices=0)}computeZQuantizationFactor(){if(this._features&&this._features.length>0){const t=this._features.reduce((t,{geometry:e})=>Math.max(t,_(e)??0),0);return Math.floor(t/this.descriptor.planetRadius)+1}return 1}get emptyFeatureRatio(){return this._emptyFeatureRatio.value}get numFeatures(){return this.hasPreciseFeatureCount?this._numFeatures.value:this._features?this._featuresLength.value:0}set numFeatures(t){this._numFeatures.value=t}get hasPreciseFeatureCount(){return this._numFeatures.value>S}get needsFeatureCount(){return this._numFeatures.value===S}get numVertices(){return this._numVertices}get id(){return this.descriptor.id}get estimatedSize(){return this.updateMemoryEstimates(),this._estimatedSize}get estimatedUnusedSize(){return this._estimatedUnusedSize}updateMemoryEstimates(){if(this._estimatedSize<0){if(this._estimatedSize=0,this._estimatedUnusedSize=0,this._features)for(let t=0;t<this._features.length;++t){const e=m(this._features[t]);this._estimatedSize+=e,t>=this.featureLimit&&(this._estimatedUnusedSize+=e)}return!0}if(this._estimatedUnusedSizeDirty){if(this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._features)for(let t=this.featureLimit;t<this._features.length;++t)this._estimatedUnusedSize+=m(this._features[t]);return!0}return!1}get fetchStatus(){return this._fetchStatus}requestFetch(){this._fetchStatus=0}requestRefetch(){this._fetchStatus=1}startFetch(){this._fetchStatus=this.needsRefetch?3:2}fetchDone(t){this._fetchStatus=t}get isFetching(){return 2===this._fetchStatus||3===this._fetchStatus}get isRefetching(){return 3===this._fetchStatus}get needsFetch(){return 0===this._fetchStatus||1===this._fetchStatus}get needsRefetch(){return 1===this._fetchStatus}get isFetched(){return 4===this._fetchStatus||5===this._fetchStatus}isFullyFetched(t){return!!this.features&&(this.features.length>=t||5===this.fetchStatus)}resetFetching(){this._fetchStatus=this.isRefetching?1:0}get needsDisplayUpdate(){return!!this._features&&!v(this._features,this.displayingFeatures,this.featureLimit)}intersects(t){return null==t||!this.descriptor.extent||(a(t,L),h(this.descriptor.extent,L))}intersectionIncludingBorrowed(t,e){const s=null!=this.extentIncludingBorrowedFeatures?this.extentIncludingBorrowedFeatures:this.descriptor.extent;return t||s?(null!=t?(a(t,e),l(e,s,e)):n(e,s),e):(n(e,f),e)}_shuffle(e){this._features?.sort((t,s)=>c(t,e)-c(s,e)),t(this._features,g)}_sortBySize(t){this._features?.sort((e,s)=>i(o(s.geometry,z))-i(o(e.geometry,z))||c(e,t)-c(s,t))}reduceFeatures(t,e,s,i){if(t<=0)return!1;if(!this._features)return this.featureLimit=0,!1;let r=!1;this.featureLimit=Math.ceil(this.numFeatures*t),this.featureLimit>this._features.length&&4===this._fetchStatus&&this._features.length>0&&(this._fetchStatus=1,r=!0),!this._sorted&&t<1&&(1===i?this._shuffle(s):this._sortBySize(s),this._sorted=!0,this._estimatedUnusedSizeDirty=!0);const a=Math.max(this.featureLimit,Math.ceil(e*this.numFeatures));return this._features.length>a&&(this._features.length=this._featuresLength.value=a,this.exceededTransferLimit.value=!1,5===this._fetchStatus&&(this._fetchStatus=4)),r}get cache(){return new y(this,this._features,this._numFeatures.value,this._emptyFeatureRatio.value)}set cache(t){this.requestController=null,this._availableFields=t.availableFields,this._features=t.features,this._featuresLength.value=t.features?.length??0,this._numFeatures.value=t.numFeatures,this._emptyFeatureRatio.value=t.emptyFeatureRatio,this._fetchStatus=t.fetchStatus,this.exceededTransferLimit.value=t.exceededTransferLimit,this._estimatedSize=-1,this._estimatedUnusedSizeDirty=!0,this.fetchInformation.value=t.fetchInformation}}const S=-1,p=-2;class y{constructor(t,s,i,r){this.features=s,this.numFeatures=i,this.emptyFeatureRatio=r,this.usedMemory=e+t.estimatedSize,this.resolution=t.displayingResolution,this.availableFields=t.availableFields,this.fetchStatus=t.fetchStatus,this.exceededTransferLimit=t.exceededTransferLimit.value,this.fetchInformation=t.fetchInformation.value}}function v(t,e,s){if(null==e||null==t||s!==e.length||s>t.length)return!1;for(let i=0;i<s;++i)if(t[i]!==e[i])return!1;return!0}const L=u(),z=r();export{F as FeatureTile,y as FeatureTileCacheItem,p as failedFeatureCount};
5
+ import{shuffle as t}from"../../../../core/arrayUtils.js";import{baseObjectMemory as e}from"../../../../core/memoryEstimations.js";import{signal as s}from"../../../../core/signal.js";import{diameter as i,create as r}from"../../../../geometry/support/aaBoundingBox.js";import{fromExtent as a,create as u,intersects as h,copy as n,positiveInfinity as l,intersection as m}from"../../../../geometry/support/aaBoundingRect.js";import{numVertices as f,estimateSize as o,getObjectId as d,computeAABB as c}from"../../../../layers/graphics/dehydratedFeatures.js";import{computeMaxZ as _}from"../graphics/graphicUtils.js";import{SampledGeometryMaxDistanceRatio as g}from"./SampledGeometryMaxDistanceRatio.js";const F=16438;class p{constructor(t){this.descriptor=t,this._numVertices=0,this.exceededTransferLimit=s(!1),this._fetchFailed=s(!1),this._sorted=!1,this._numFeatures=s(y),this._emptyFeatureRatio=s(0),this._estimatedSize=-1,this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._sampledDensityEstimate=-1,this._displayingFeatures=null,this.alive=!0,this.filtered=!1,this._features=null,this._featuresLength=s(0),this._featureLimit=s(0),this._fetchStatus=0,this.fetchInformation=s(""),this.fetchingResolution=this.displayingResolution=t.resolution}get featuresMissing(){return this.fetchFailed||(this.hasPreciseFeatureCount?this._featuresLength.value<this.numFeatures:this.exceededTransferLimit.value)}get showsAllFeatures(){return!this.fetchFailed&&null!=this.displayingFeatures&&(this.hasPreciseFeatureCount?this.displayingFeatures.length===this.numFeatures:!this.exceededTransferLimit.value)}get missingAttributes(){return this._missingAttributes}get fetchFailed(){return this._fetchFailed.value}set fetchFailed(t){this._fetchFailed.value=t}get displayingFeatures(){return this._displayingFeatures}set displayingFeatures(t){this._displayingFeatures=t,this.extentIncludingBorrowedFeatures=null}get perTileMaximumNumberOfFeaturesExceeded(){const t=this.isFetched&&this.featuresMissing;return!this.filtered&&(t||this.hasFeatureLimit)}get features(){return this._features}get featureLimit(){return this._featureLimit.value}set featureLimit(t){this._featureLimit.value!==t&&(this._featureLimit.value=t,this._estimatedUnusedSizeDirty=!0)}get hasFeatureLimit(){return this.featureLimit!==this._featuresLength.value}get availableFields(){return this._availableFields}setFeatures(t,e,s,i){this._availableFields=s,this._features=t,this._featuresLength.value=t?.length??0,this._sorted=!1,this._estimatedSize=-1,this._estimatedUnusedSizeDirty=!0,this._sampledDensityEstimate=-1,this._missingAttributes=i,t&&t.length>0?(this._emptyFeatureRatio.value=e/(t.length+e),this._numVertices=t.reduce((t,e)=>t+f(e.geometry),0)):(this._emptyFeatureRatio.value=0,this._numVertices=0)}computeZQuantizationFactor(){if(this._features&&this._features.length>0){const t=this._features.reduce((t,{geometry:e})=>Math.max(t,_(e)??0),0);return Math.floor(t/this.descriptor.planetRadius)+1}return 1}get emptyFeatureRatio(){return this._emptyFeatureRatio.value}get numFeatures(){return this.hasPreciseFeatureCount?this._numFeatures.value:this._features?this._featuresLength.value:0}set numFeatures(t){this._numFeatures.value=t}get hasPreciseFeatureCount(){return this._numFeatures.value>y}get needsFeatureCount(){return this._numFeatures.value===y}get numVertices(){return this._numVertices}get id(){return this.descriptor.id}get estimatedSize(){return this.updateEstimates(),this._estimatedSize}get sampledDensityEstimate(){return this._sampledDensityEstimate}get estimatedUnusedSize(){return this._estimatedUnusedSize}updateEstimates(){if(this._estimatedSize<0||this._sampledDensityEstimate<0){this._estimatedSize=0,this._estimatedUnusedSize=0,this._sampledDensityEstimate=0;const t=Math.floor(Math.sqrt(z));if(this._features){let e=null;const s=new g(z,R*this.fetchingResolution),i=this._features.length;for(let r=0;r<i;++r){const a=this._features[r],u=o(a);if(this._estimatedSize+=u,r>=this.featureLimit&&(this._estimatedUnusedSize+=u),!s.done){const u=i-r;if(r%Math.ceil(u/Math.max(1,Math.floor(Math.sqrt(s.numRemainingSamples))))===0){const i=Math.max(Math.floor(s.numRemainingSamples/u),t);s.sampleGeometry(a.geometry,e,i)}}e=a.geometry}s.numSamples>=x?this._sampledDensityEstimate=s.ratio:this._sampledDensityEstimate=0}return!0}if(this._estimatedUnusedSizeDirty){if(this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._features)for(let t=this.featureLimit;t<this._features.length;++t)this._estimatedUnusedSize+=o(this._features[t]);return!0}return!1}get fetchStatus(){return this._fetchStatus}requestFetch(){this._fetchStatus=0}requestRefetch(){this._fetchStatus=1}startFetch(){this._fetchStatus=this.needsRefetch?3:2}fetchDone(t){this._fetchStatus=t}get isFetching(){return 2===this._fetchStatus||3===this._fetchStatus}get isRefetching(){return 3===this._fetchStatus}get needsFetch(){return 0===this._fetchStatus||1===this._fetchStatus}get needsRefetch(){return 1===this._fetchStatus}get isFetched(){return 4===this._fetchStatus||5===this._fetchStatus}isFullyFetched(t){return!!this.features&&(this.features.length>=t||5===this.fetchStatus)}resetFetching(){this._fetchStatus=this.isRefetching?1:0}get needsDisplayUpdate(){return!!this._features&&!L(this._features,this.displayingFeatures,this.featureLimit)}intersects(t){return null==t||!this.descriptor.extent||(a(t,D),h(this.descriptor.extent,D))}intersectionIncludingBorrowed(t,e){const s=null!=this.extentIncludingBorrowedFeatures?this.extentIncludingBorrowedFeatures:this.descriptor.extent;return t||s?(null!=t?(a(t,e),m(e,s,e)):n(e,s),e):(n(e,l),e)}_shuffle(e){this._features?.sort((t,s)=>d(t,e)-d(s,e)),t(this._features,F)}_sortBySize(t){this._features?.sort((e,s)=>i(c(s.geometry,M))-i(c(e.geometry,M))||d(e,t)-d(s,t))}reduceFeatures(t,e,s,i){if(t<=0)return!1;if(!this._features)return this.featureLimit=0,!1;let r=!1;this.featureLimit=Math.ceil(this.numFeatures*t),this.featureLimit>this._features.length&&4===this._fetchStatus&&this._features.length>0&&(this._fetchStatus=1,r=!0),!this._sorted&&t<1&&(1===i?this._shuffle(s):this._sortBySize(s),this._sorted=!0,this._estimatedUnusedSizeDirty=!0);const a=Math.max(this.featureLimit,Math.ceil(e*this.numFeatures));return this._features.length>a&&(this._features.length=this._featuresLength.value=a,this.exceededTransferLimit.value=!1,5===this._fetchStatus&&(this._fetchStatus=4)),r}get cache(){return new v(this,this._features,this._numFeatures.value,this._emptyFeatureRatio.value)}set cache(t){this.requestController=null,this._availableFields=t.availableFields,this._features=t.features,this._featuresLength.value=t.features?.length??0,this._numFeatures.value=t.numFeatures,this._emptyFeatureRatio.value=t.emptyFeatureRatio,this._fetchStatus=t.fetchStatus,this.exceededTransferLimit.value=t.exceededTransferLimit,this._estimatedSize=-1,this._sampledDensityEstimate=-1,this._estimatedUnusedSizeDirty=!0,this.fetchInformation.value=t.fetchInformation}}const y=-1,S=-2;class v{constructor(t,s,i,r){this.features=s,this.numFeatures=i,this.emptyFeatureRatio=r,this.usedMemory=e+t.estimatedSize,this.resolution=t.displayingResolution,this.availableFields=t.availableFields,this.fetchStatus=t.fetchStatus,this.exceededTransferLimit=t.exceededTransferLimit.value,this.fetchInformation=t.fetchInformation.value}}function L(t,e,s){if(null==e||null==t||s!==e.length||s>t.length)return!1;for(let i=0;i<s;++i)if(t[i]!==e[i])return!1;return!0}const z=150,x=100,R=2,D=u(),M=r();export{p as FeatureTile,v as FeatureTileCacheItem,S as failedFeatureCount};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{filterInPlace as s}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import i from"../../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../../core/MapUtils.js";import{isAbortError as a,throwIfAborted as n}from"../../../../core/promiseUtils.js";import o from"../../../../core/ReactiveMap.js";import{on as l,watch as u}from"../../../../core/reactiveUtils.js";import{schedule as h}from"../../../../core/scheduling.js";import{signal as d}from"../../../../core/signal.js";import{sqlAnd as c}from"../../../../core/sql.js";import{property as p}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as f}from"../../../../core/accessorSupport/decorators/subclass.js";import{getEpsilon as _}from"../../../../core/libs/gl-matrix-2/math/common.js";import{create as m,equals as g,clone as y,expand as F,toExtent as T,width as x,height as v}from"../../../../geometry/support/aaBoundingRect.js";import{getObjectId as R,hasVertices as b,computeAABR as E}from"../../../../layers/graphics/dehydratedFeatures.js";import C from"../../../../rest/support/QuantizationParameters.js";import D from"../../../../rest/support/Query.js";import{MultiFeatureReference as w,SingleFeatureReference as M}from"./featureReference.js";import{failedFeatureCount as U,FeatureTile as j}from"./FeatureTile.js";import{virtualDisplayFilterHighlightTileId as A,virtualSnapshotTileId as I}from"./FeatureTileDescriptor.js";import{tilesAreRelated as O}from"../../terrain/tileUtils.js";import{ImmediateTask as P,TaskPriority as z}from"../../../support/Scheduler.js";let q=class extends t{set maximumNumberOfFeatures(e){e=e||1/0;const t=this._get("maximumNumberOfFeatures");e===t||e<1||(this._set("maximumNumberOfFeatures",e),this._maximumFeaturesUpdated(t,e))}set memoryFactor(e){this.memoryFactor!==e&&(this._set("memoryFactor",e),this._setDirty())}set lodFactor(e){this.lodFactor!==e&&(this._set("lodFactor",e),this._supportsResolution&&this.refetch())}get useTileCount(){return this._useTileCount&&null!=this.context.query.queryFeatureCount}set useTileCount(e){this._useTileCount=e,this.notifyChange("useTileCount")}get updating(){return this._dirty||!!this._pendingEdits||this._isFetching||(this.tileDescriptors?.updating??!1)}get readyToRun(){return this._dirty}get memoryForUnusedFeatures(){let e=0;return this._featureTiles.forEach(t=>e+=t.estimatedUnusedSize),e}get totalVertices(){let e=0;return this._featureTiles.forEach(t=>e+=t.numVertices),e}get totalFeatures(){let e=0;return this._featureTiles.forEach(t=>e+=t.numFeatures),e}get showsAllFeatures(){if(this._paused||this.dataUpdating)return!1;for(const e of this._featureTiles.values())if(!this.hasFullGeometries&&0!==e.emptyFeatureRatio||!e.showsAllFeatures)return!1;return!0}get hasFullGeometries(){if(!this._supportsResolution)return!0;const e=this.tileDescriptors?.some(Q);return e||!this.context.capabilities.supportsQuantization&&"polyline"!==this.context.geometryType}set filterExtent(e){if(null!=e&&this.context.tilingScheme&&!e.spatialReference.equals(this.context.tilingScheme.spatialReference))return void i.getLogger(this).error("#filterExtent=","extent needs to be in the same spatial reference as the tiling scheme");const t=this._get("filterExtent");if(t===e||null!=t&&e&&t.equals(e))return;const s=null!=e?e.clone():null;this._set("filterExtent",s),this._reclip(s,t)}_updateTileZQuantization(e){if(1===this.context.viewingMode){const t=e.computeZQuantizationFactor();this._zQuantizationFactor.value<t&&(this._zQuantizationFactor.value=t)}}get _tileZQuantization(){return this.context.isDraped?1:this._zQuantizationFactor.value}constructor(e){super(e),this._useTileCount=!1,this.dataUpdating=!1,this.updatingTotal=0,this.updatingRemaining=0,this.expectedFeatureDiff=0,this.maximumNumberOfFeaturesExceeded=!1,this._fullRatio=1,this._farRatio=1,this._zQuantizationFactor=d(1),this._changes={updates:{adds:new Array,removes:new Array},adds:new Array,removes:new Array},this._featureTiles=new o,this._displayingFeatureReferences=new Map,this._numDisplayingFeatureReferences=0,this._dirty=!1,this._suspended=!0,this._pendingEdits=null,this._applyEditsTilesUpdated=!1,this._isFetching=!1;const t=e.context;this._frameTask=t.scheduler?.registerTask(z.FEATURE_TILE_FETCHER,this)??P,this.FeatureReferenceClass=t.capabilities.supportsMultipleResolutions?w:M,this._objectIdField=t.objectIdField}initialize(){this.addHandles([l(()=>this.tileDescriptors,"change",()=>this._setDirty(),{onListenerAdd:()=>this._setDirty(),onListenerRemove:()=>this._setDirty()}),u(()=>this._tileZQuantization,()=>this.refetch())]),this._setDirty()}destroy(){this._frameTask.remove(),this._featureTiles.forEach(e=>{this._cancelFetchTile(e),this._removeTile(e)}),this._featureTiles.clear(),this._displayingFeatureReferences.clear(),this._pendingEdits?.controller.abort(),this._pendingEdits=null}get _paused(){return this._suspended||!!this._pendingEdits}restart(){this._featureTiles.forEach(e=>{this._cancelFetchTile(e),this._clearTile(e),this._resetFetchTile(e)}),null!=this.context.memoryCache&&this.context.memoryCache.clear(),this._setDirty()}refetch(){this._featureTiles.forEach(e=>{this._cancelFetchTile(e),this._resetFetchTile(e)}),null!=this.context.memoryCache&&this.context.memoryCache.clear(),this._setDirty()}refetchDisplayFilterHighlightTile(){const e=this._featureTiles.get(A);e&&(this._cancelFetchTile(e),this._resetFetchTile(e),this._setDirty())}suspend(){this._suspended||(this._suspended=!0,this._pause(),this._setDirty())}resume(){this._suspended&&(this._suspended=!1,this._unpause())}getMissingAttributesForFeature(e){for(const t of this._featureTiles.values()){const s=t.missingAttributes?.get(e);if(null!=s)return s}}_pause(){this._paused&&(this._featureTiles.forEach(e=>this._cancelFetchTile(e)),this._updated())}_unpause(){this._paused||this._setDirty()}get availableFields(){let e=null;return this._featureTiles.forEach(t=>{null!=t.displayingFeatures&&0!==t.displayingFeatures.length&&(null==e?e=new Set(t.availableFields):e.forEach(s=>{t.availableFields?.has(s)||e.delete(s)}))}),null!=e?e:new Set}applyEdits(e){this._pendingEdits||(this._pendingEdits={edits:Promise.resolve(),count:0,controller:new AbortController},this._pause());const t=this._pendingEdits;t.count++;const s=t.edits.then(()=>e.result.catch(e=>{if(a(e))throw e;return null}).then(e=>e?(this._applyEditsDeleteFeatures(e.deletedFeatures),this._applyEditsAddUpdateFeatures(e.addedFeatures,e.updatedFeatures,t.controller.signal).then(()=>e)):e).then(e=>(0===--t.count&&(this._pendingEdits===t&&(this._pendingEdits=null),null!=this.context.memoryCache&&this.context.memoryCache.clear(),this._applyEditsTilesUpdated=!1,this._unpause()),e)));return t.edits=s,this._updated(),s}_applyEditsDeleteFeatures(e){if(0===e.length)return;const t=this.context.globalIdField,s=t&&this.availableFields.has(t),r=new Set,a=this._objectIdField;e.forEach(({objectId:e,globalId:n})=>{(!e||e<0)&&t&&n&&(s||i.getLogger(this).errorOncePerTick(`Editing the specified service requires the layer's globalIdField, ${t} to be included the layer's outFields for updates to be reflected in the view`),e=this._objectIdFromGlobalId(n,a,t)),null!=e&&e>=0&&r.add(e)}),this._featureTiles.forEach(e=>{if(!e.features)return;const t=e.features.filter(e=>!r.has(R(e,this._objectIdField)));t.length!==e.features.length&&(this._applyEditsTileUpdated(),e.setFeatures(t,0,e.availableFields,e.missingAttributes),this._updateTileZQuantization(e),this._invalidateCounts())})}_objectIdFromGlobalId(e,t,s){if(null==e)return null;const i=this.features.find(t=>t.attributes?.[s]===e);return i?R(i,t):null}async _applyEditsAddUpdateFeatures(e,t,s){const{objectIdField:r,globalIdField:a}=this.context,n=a&&this.availableFields.has(a),o=new Set,l=new Set;for(const i of e){const e=i.objectId;null!=e&&o.add(e)}for(const{objectId:h,globalId:d}of t){let e=h;(null==e||e<0)&&a&&(n||i.getLogger(this).errorOncePerTick(`Editing the specified service requires the layer's globalIdField, ${a} to be included the layer's outFields for updates to be reflected in the view`),e=this._objectIdFromGlobalId(d,r,a)),null!=e&&e>=0&&(o.add(e),l.add(e))}if(0===o.size)return;const u=[];this._featureTiles.forEach(e=>{const t=this._applyEditsAddUpdateTile(e,o,l,s);u.push(t)}),this._updated(),await Promise.allSettled(u)}async _applyEditsAddUpdateTile(e,t,s,i){if(!e.features)return;e.fetchingResolution=e.descriptor.resolution;const r=this._createQuery(e);r.resultType=void 0,r.cacheHint=!1,r.objectIds=Array.from(t);const a=await this._queryFeatures(r,i);let n=null;if(s.size>0){const t=e.features.filter(e=>!s.has(R(e,this._objectIdField)));t.length!==e.features.length&&(n=t)}if(a.features.length>0){n||(n=e.features.slice());for(const e of a.features)n.push(e)}n&&(e.hasPreciseFeatureCount&&(e.numFeatures=Math.max(e.numFeatures,n.length)),this._applyEditsTileUpdated(),e.setFeatures(n,0,Z(e.availableFields,a.fields),V(e.missingAttributes,a.missingAttributes)),this._updateTileZQuantization(e),this._invalidateCounts())}_applyEditsTileUpdated(){this._applyEditsTilesUpdated||(this._applyEditsTilesUpdated=!0,this._updated())}_queryFeatures(e,t){return this.context.query.queryFeaturesDehydrated(e,{signal:t,timeout:J})}_setDirty(){this._dirty=!0,this._updated()}runTask(e){const t=this._frameTask.processQueue(e);if(!this._dirty||!this.initialized)return t;this._dirty=!1;const s=this._featureTilesArray;if(this._markTilesNotAlive(s),!e.run(()=>this._addTiles(s,e))||!e.run(()=>this._filterExtentTiles(s,e))||!e.run(()=>this._removeTiles(s,e))||e.done)return void this._setDirty();const i=this._sortTiles(s);e.run(()=>this._showTiles(i,e))&&e.run(()=>this._fetchTiles(i,e))&&e.run(()=>this._updateMemoryEstimates(i,e))||this._setDirty(),this._updated(),this.updating||this._updateMaximumNumberOfFeaturesExceeded()}_markTilesNotAlive(e){for(const t of e)t.alive=!1}_addTiles(e,t){return!(this._suspended||!this.tileDescriptors)&&(this.tileDescriptors.forEach(s=>{const i=this._featureTiles.get(s.id);i?i.alive=!0:t.done||(e.push(this._addTile(s)),t.madeProgress())}),t.hasProgressed)}_filterExtentTiles(e,t){for(const s of e){if(t.done)break;s.alive&&(s.filtered=!s.intersects(this.filterExtent),s.filtered&&(this._clearTile(s),t.madeProgress()))}return t.hasProgressed}_removeTiles(e,t){for(let s=e.length-1;s>=0&&!t.done;s--){const i=e[s];i.alive||(this._removeTile(i),s!==e.length-1&&(e[s]=e[e.length-1]),e.pop(),t.madeProgress())}return t.hasProgressed}_sortTiles(e){return e.sort((e,t)=>e.descriptor.loadPriority-t.descriptor.loadPriority),e}_showTiles(e,t){const s=this._updateRatio(e),i=e=>{const t=this._fullRatio<1?s(e)*this._farRatio:1;e.reduceFeatures(t,this.memoryFactor,this._objectIdField,this._reduceMode)&&this._setDirty();const{numFeatures:i,fetchingResolution:r,descriptor:a,isFetched:n}=e;return this._supportsResolution&&i>0&&r!==a.resolution&&n&&(e.requestRefetch(),this._setDirty()),this._showTile(e)};for(const r of e)if(!t.run(()=>i(r))){this._setDirty();break}return t.hasProgressed}_fetchTiles(e,t){if(this._paused)return!1;let s=!1;for(const i of e){if(!i.needsFetch)continue;const e=null!=this.context.memoryCache?this.context.memoryCache.pop(i.id):null;if(e?.resolution!==i.displayingResolution){if(this._needsNumFeatures(i)){const e=new AbortController,r=this._fetchTileCount(i,e.signal);this._handleRequest(i,r,e,()=>i.resetFetching(),()=>i.numFeatures=U),s=!0,t.madeProgress()}if(t.done)return!0}else i.cache=e,i.numFeatures&&this._notifyDataUpdating(),this._setDirty(),this._scheduleUpdated(),t.madeProgress()}if(s)return t.hasProgressed;for(const r of e){if(!r.needsFetch)continue;const e=new AbortController,s=this._fetchTile(r,e.signal);if(this._handleRequest(r,s,e,e=>r.fetchDone(e),e=>{r.fetchFailed=!0,this.context.logFetchError(i.getLogger(this),e)}),t.madeProgress(),t.done)return!0}return t.hasProgressed}_updateMemoryEstimates(e,t){return e.some(e=>!t.run(()=>e.updateMemoryEstimates())&&(this._setDirty(),!0)),t.hasProgressed}_reclip(e,t){if(!this.initialized)return;const s=new Array;this._featureTiles.forEach(i=>{null!=i.displayingFeatures&&0!==i.displayingFeatures.length&&(i.intersectionIncludingBorrowed(t,B),i.intersectionIncludingBorrowed(e,G),g(B,G)||s.push(i))}),this._refreshDisplayingFeatures(s),this._updated()}_refreshDisplayingFeatures(e){const t=new Set,s=this._changes.updates;for(const i of e)if(null!=i.displayingFeatures)for(const e of i.displayingFeatures){const i=R(e,this._objectIdField);if(t.has(i))continue;t.add(i);const r=this._displayingFeatureReferences.get(i).feature;s.removes.push(r),s.adds.push(r)}this._applyChanges()}_updated(){let e=0;if(this._paused||this._featureTiles.forEach(t=>t.isFetching?++e:0),this._isFetching=e>0,e>0||this._applyEditsTilesUpdated?this._notifyDataUpdating():this._dirty||this._set("dataUpdating",!1),this.updating){let t=0,s=0,i=0,r=0,a=0;const n=this._displayingFeatureReferences.size/this._numDisplayingFeatureReferences;this._featureTiles.forEach(e=>{if(++s,e.isFetching&&e.hasPreciseFeatureCount){const t=this._maximumFeaturesForTile(e)*(1-e.emptyFeatureRatio),s=null!=e.displayingFeatures?e.displayingFeatures.length*n:0;a+=t-s}e.needsFetch?++r:e.numFeatures>0&&(++i,t+=e.numFeatures)}),r+=e;let o=0,l=0;t?(l=t,o=Math.min(r*t/i,t)):(l=s,o=r),a=Math.min(this.maximumNumberOfFeatures-this.features.length,a),this._set("updatingTotal",l),this._set("updatingRemaining",o),this._set("expectedFeatureDiff",a)}else this._set("updatingTotal",0),this._set("updatingRemaining",0),this._set("expectedFeatureDiff",0);this.debugger?.update()}_updateMaximumNumberOfFeaturesExceeded(){for(const{perTileMaximumNumberOfFeaturesExceeded:e}of this._featureTiles.values())if(e)return void this._set("maximumNumberOfFeaturesExceeded",!0);this._set("maximumNumberOfFeaturesExceeded",!1)}_updateRatio(e){const t=L(e),s=e=>1/(1<<Math.max(0,t-e.descriptor.lij[0]));let i=0,r=0;for(const a of e){const e=a.numFeatures;i+=e,r+=e*s(a)}return this._fullRatio=Math.min(1,this.maximumNumberOfFeatures/i),this._farRatio=this.maximumNumberOfFeatures/r,this._scheduleUpdated(),s}_maximumFeaturesUpdated(e,t){e!==t&&(t>e&&this._featureTiles.forEach(e=>{if(!e.featuresMissing)return;const t=this._maximumFeaturesForTile(e);e.isFullyFetched(t)||(this._cancelFetchTile(e),this._resetFetchTile(e))}),this._setDirty())}_addTile(e){const t=new j(e);return this._featureTiles.set(t.id,t),this._resetFetchTile(t),this._referenceDisplayingFeaturesFromRelatedTiles(t),t}_referenceDisplayingFeaturesFromRelatedTiles(e){const t=e.displayingResolution;this._featureTiles.forEach(s=>{if(null!=s.displayingFeatures&&e!==s&&O(e.descriptor.lij,s.descriptor.lij)){null==e.displayingFeatures&&(e.displayingFeatures=[]),e.descriptor.extent&&s.descriptor.extent&&(e.extentIncludingBorrowedFeatures??=y(e.descriptor.extent),F(e.extentIncludingBorrowedFeatures,s.descriptor.extent,e.extentIncludingBorrowedFeatures));for(const i of s.displayingFeatures){e.displayingFeatures.push(i);const s=this._displayingFeatureReferences.get(R(i,this._objectIdField));s.ref(s.feature,t),this._numDisplayingFeatureReferences++}}})}_removeTile(e){this._clearTile(e),this._featureTiles.delete(e.id)}_resetFetchTile(e){e.filtered=!e.intersects(this.filterExtent),e.filtered?e.needsFetch&&e.fetchDone(4):e.requestFetch()}_cancelFetchTile(e){const t=e.requestController;null!=t&&(e.requestController=null,e.resetFetching(),t.abort())}async _fetchTileCount(e,t){e.numFeatures=await this._fetchCount(e,t),this._updateRatio(this._featureTilesArray)}async _fetchTile(e,t){e.fetchFailed=!1;const s=this._maximumFeaturesForTile(e);if(s<=0)return e.hasPreciseFeatureCount&&0===e.numFeatures||(e.fetchFailed=!0),k(e),e.fetchInformation.value="Empty tile",4;const i=this._getMaxRecordCount(e),r=Math.ceil(s/i);if(e.fetchingResolution=e.descriptor.resolution,N(e)||!this.context.capabilities.supportsMaxRecordCountFactor||e.numFeatures<=s&&r>D.MAX_MAX_RECORD_COUNT_FACTOR)return this._fetchPagedTile(e,t);const a=this._createQuery(e);if(a.maxRecordCountFactor=r,e.isRefetching&&e.features&&e.features.length>0){const t=Math.ceil(e.features.length/(1-e.emptyFeatureRatio)/i);a.maxRecordCountFactor=Math.max(t+1,a.maxRecordCountFactor)}e.fetchInformation.value=`Single fetch\n${s} features`;const{features:o,exceededTransferLimit:l,fields:u,missingAttributes:h}=await this._queryFeatures(a,t),d=l||a.maxRecordCountFactor>=D.MAX_MAX_RECORD_COUNT_FACTOR||s===this._totalFeaturesForTile(e)?5:4,c=await this._frameTask.schedule(()=>{e.exceededTransferLimit.value=!!l;const t=this._removeEmptyFeatures(o,this._getEffectiveTileResolution(e));return e.fetchInformation.value=`Single fetch\n${o.length}/${s} features`,e.setFeatures(o,t,H(u),V(void 0,h)),this._updateTileZQuantization(e),this._maximumFeaturesForTile(e)>s?1:d},t);return n(t),this._invalidateCounts(),c}async _fetchCount(e,t){return this.context.query.queryFeatureCount(this._createFeatureCountQuery(e),{signal:t})}async _fetchPagedTile(e,t){let s,i=0,r=0,a=0,o=this._maximumFeaturesForTile(e)-a;const l=this._getMaxRecordCount(e);let u,h=null;for(;;){const d=this._createQuery(e),c=this._setPagingParameters(d,i,o,l);e.fetchInformation.value=`Paged fetch\n${e.features?.length}/${o} features`;const{features:p,exceededTransferLimit:f,fields:_,missingAttributes:m}=await this._queryFeatures(d,t);if(await this._frameTask.schedule(()=>{c&&(i+=d.num),a+=p.length,r+=this._removeEmptyFeatures(p,this._getEffectiveTileResolution(e)),e.exceededTransferLimit.value=!!f,s=s?.concat(p)??p,h=Z(h,_),u=V(u,m),e.setFeatures(s,r,h,u),this._updateTileZQuantization(e),this._invalidateCounts(),this._setDirty()},t),n(t),o=this._maximumFeaturesForTile(e)-(s?.length??0),!c||!f||o<=0)return f?4:5}}_createFeatureCountQuery(e){const t=this._createQuery(e);return this.context.capabilities.supportsCacheHint&&(t.resultType=void 0,t.cacheHint=!0),t}_createQuery(e){const t=this.context.createQuery();if(t.resultType=this._resultType(e),!N(e)&&e.descriptor.extent&&this.context.tilingScheme&&(t.geometry=T(e.descriptor.extent,this.context.tilingScheme.spatialReference)),this._setResolutionParams(t,e),"tile"!==t.resultType&&this.context.capabilities.supportsCacheHint&&(t.cacheHint=!0),S(e)){const{highlightIds:e}=this.context;e&&e.length>$&&i.getLogger(this).warn("highlight-too-many-features",`highlight is limited to ${$} features on large layers configured with a display filter to avoid performance issues`),t.objectIds=e?.slice(0,$)}else!Q(e)&&this.context.effectiveDisplayFilter&&(t.where=c(t.where,this.context.effectiveDisplayFilter.where));return t}_setPagingParameters(e,t,s,i){return!!this.context.capabilities.supportsPagination&&(e.start=t,s>0&&this.context.capabilities.supportsMaxRecordCountFactor?(e.maxRecordCountFactor=Math.ceil(s/i),e.num=Math.min(e.maxRecordCountFactor*i,s)):e.num=Math.min(i),!0)}_getEffectiveTileResolution(e){if(N(e)||!this._supportsResolution)return null;const t=1===this.context.viewingMode&&this.context.tilingScheme?this.context.tilingScheme.resolutionAtLevel(3):1/0;return Math.min(e.fetchingResolution,t)/this.lodFactor/this._tileZQuantization}get _supportsResolution(){return this.context.capabilities.supportsMultipleResolutions&&"point"!==this.context.geometryType}_setResolutionParams(e,t){const s=this._getEffectiveTileResolution(t);null!=s&&(this.context.capabilities.supportsQuantization?e.quantizationParameters=new C({mode:"view",originPosition:"upper-left",tolerance:s,extent:this.context.fullExtent}):"polyline"===this.context.geometryType&&(e.maxAllowableOffset=s))}_removeEmptyFeatures(e,t){const i=e.length;if(t&&this._supportsResolution){const i=t*(1+_());s(e,({geometry:e})=>!(!e||!b(e))&&(E(e,X),x(X)>i||v(X)>i))}else s(e,({geometry:e})=>b(e));return i-e.length}_needsNumFeatures(e){return this.useTileCount&&e.needsFeatureCount&&!Q(e)}_getMaxRecordCount(e){switch(this._resultType(e)){case"tile":if(this.context.tileMaxRecordCount)return this.context.tileMaxRecordCount;break;case"standard":if(this.context.standardMaxRecordCount)return this.context.standardMaxRecordCount}return this.context.maxRecordCount||$}_resultType(e){if(this.context.capabilities.supportsResultType)return Q(e)?"standard":"tile"}get _reduceMode(){const e=this.context.geometryType;return"polygon"===e||"polyline"===e?0:1}_handleRequest(e,t,s,i,r){e.startFetch(),e.requestController=s;let n=!1;t.then(t=>{e.requestController=null,i(t)}).catch(t=>{e.requestController===s&&(e.requestController=null,e.fetchDone(4)),a(t)?n=!0:r(t)}).then(()=>{n||this._setDirty(),this._scheduleUpdated()})}_scheduleUpdated(){this.hasHandles("scheduleUpdated")||this.addHandles(h(()=>{this.removeHandles("scheduleUpdated"),this._updated()}),"scheduleUpdated")}_showTile(e){if(e.displayingFeatures&&!e.needsDisplayUpdate)return!1;const t=e.features;if(0===e.featureLimit||!t){const t=null!=e.displayingFeatures&&e.displayingFeatures.length>0;return this._hideTileFeatures(e),e.displayingFeatures=[],t}const s=e.fetchingResolution,{adds:i,updates:r}=this._changes,a=Math.min(e.featureLimit,t.length);for(let n=0;n<a;++n){const e=t[n],a=R(e,this._objectIdField),o=this._displayingFeatureReferences.get(a);if(o){const{oldVersion:t,newVersion:i}=o.ref(e,s);t!==i&&(t&&r.removes.push(t),i&&r.adds.push(i))}else this._displayingFeatureReferences.set(a,new this.FeatureReferenceClass(e,s)),i.push(e);this._numDisplayingFeatureReferences++}return this._hideTileFeatures(e),e.displayingResolution=e.fetchingResolution,this._applyChanges(),e.displayingFeatures=t.slice(0,a),!0}_hideTile(e){this._cancelFetchTile(e),this._hideTileFeatures(e)}_hideTileFeatures(e){if(null==e.displayingFeatures)return;const{updates:t,removes:s}=this._changes;for(const i of e.displayingFeatures){const r=R(i,this._objectIdField),a=this._displayingFeatureReferences.get(r);if(!a)continue;const{oldVersion:n,newVersion:o}=a.unref(e.displayingResolution);this._numDisplayingFeatureReferences--,n!==o&&(null==o?(this._displayingFeatureReferences.delete(r),n&&s.push(n)):(t.adds.push(o),n&&t.removes.push(n)))}this._applyChanges(),e.displayingFeatures=null}_notifyDataUpdating(){this._get("dataUpdating")||this._set("dataUpdating",!0)}_applyChanges(){const e=this._changes.updates;e.removes.length>0&&(this._notifyDataUpdating(),this.features.removeMany(e.removes),e.removes.length=0),e.adds.length>0&&(this._notifyDataUpdating(),this.features.addMany(e.adds),e.adds.length=0);const t=this._changes.adds,s=this._changes.removes,i=Math.min(t.length,s.length);let r=0;for(;r<i;){const e=Math.min(r+K,i);this._notifyDataUpdating(),this.features.addMany(t.slice(r,e)),this.features.removeMany(s.slice(r,e)),r=e}t.length>i&&(this._notifyDataUpdating(),this.features.addMany(0===r?t:t.slice(r))),s.length>i&&(this._notifyDataUpdating(),this.features.removeMany(0===r?s:s.slice(r))),t.length=0,s.length=0}_clearTile(e){this._hideTile(e),e.features&&null!=this.context.memoryCache&&this.context.memoryCache.put(e.id,e.cache),e.setFeatures(null,0,null,void 0),this._invalidateCounts()}_invalidateCounts(){this.notifyChange("totalVertices"),this.notifyChange("totalFeatures"),this.notifyChange("memoryForUnusedFeatures")}get _featureTilesArray(){return Array.from(this._featureTiles.values())}get featureTiles(){return this._featureTiles}get storedFeatures(){return this._featureTilesArray.reduce((e,t)=>e+(t.features?t.features.length:0),0)}get missingTiles(){return Array.from(this._featureTiles.values()).reduce((e,t)=>e+(t.needsFetch||t.isFetching?1:0),0)}_totalFeaturesForTile(e){return e.hasPreciseFeatureCount?e.numFeatures:this.maximumNumberOfFeatures}_maximumFeaturesForTile(e){const t=this._totalFeaturesForTile(e),s=this._fullRatio<1?this._farRatio:1;return Math.min(Math.ceil(t*s/(1-e.emptyFeatureRatio)),t)}get test(){}};function Q(e){return e.id===I}function S(e){return e.id===A}function N(e){return Q(e)||S(e)}function L(e){let t=0;for(const s of e)s.features&&s.features.length>0&&s.alive&&(t=Math.max(t,s.descriptor.lij[0]));return t}function k(e){e.setFeatures([],0,null,void 0)}function H(e){return null==e?new Set:new Set(e.map(e=>e.name))}function Z(e,t){if(null==e||null==t)return H(t);const s=new Set;for(const{name:i}of t)e.has(i)&&s.add(i);return s}function V(e,t){if(!t?.length)return e;e??=new Map;const s=()=>new Set;for(const{objectId:i,attribute:a}of t)r(e,i,s).add(a);return e}e([p({constructOnly:!0})],q.prototype,"features",void 0),e([p()],q.prototype,"tileDescriptors",void 0),e([p({value:1/0})],q.prototype,"maximumNumberOfFeatures",null),e([p({value:1})],q.prototype,"memoryFactor",null),e([p({value:1})],q.prototype,"lodFactor",null),e([p()],q.prototype,"useTileCount",null),e([p({readOnly:!0})],q.prototype,"updating",null),e([p({readOnly:!0})],q.prototype,"dataUpdating",void 0),e([p({readOnly:!0})],q.prototype,"updatingTotal",void 0),e([p({readOnly:!0})],q.prototype,"updatingRemaining",void 0),e([p({readOnly:!0})],q.prototype,"expectedFeatureDiff",void 0),e([p({readOnly:!0})],q.prototype,"memoryForUnusedFeatures",null),e([p({readOnly:!0})],q.prototype,"maximumNumberOfFeaturesExceeded",void 0),e([p({readOnly:!0})],q.prototype,"totalVertices",null),e([p({readOnly:!0})],q.prototype,"totalFeatures",null),e([p({readOnly:!0})],q.prototype,"showsAllFeatures",null),e([p({readOnly:!0})],q.prototype,"hasFullGeometries",null),e([p()],q.prototype,"filterExtent",null),e([p({constructOnly:!0})],q.prototype,"context",void 0),e([p()],q.prototype,"_dirty",void 0),e([p()],q.prototype,"_suspended",void 0),e([p()],q.prototype,"_pendingEdits",void 0),e([p()],q.prototype,"_applyEditsTilesUpdated",void 0),e([p()],q.prototype,"_paused",null),e([p()],q.prototype,"_isFetching",void 0),q=e([f("esri.views.3d.layers.support.FeatureTileFetcher3D")],q);const $=2e3,B=m(),G=m(),X=m(),J=6e5,K=200;export{q as FeatureTileFetcher3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{filterInPlace as s}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import i from"../../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../../core/MapUtils.js";import{isAbortError as a,throwIfAborted as n}from"../../../../core/promiseUtils.js";import o from"../../../../core/ReactiveMap.js";import{on as l,watch as u}from"../../../../core/reactiveUtils.js";import{schedule as h}from"../../../../core/scheduling.js";import{signal as d}from"../../../../core/signal.js";import{sqlAnd as c}from"../../../../core/sql.js";import{property as p}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as f}from"../../../../core/accessorSupport/decorators/subclass.js";import{getEpsilon as _}from"../../../../core/libs/gl-matrix-2/math/common.js";import{create as m,equals as g,clone as y,expand as F,toExtent as T,width as x,height as v}from"../../../../geometry/support/aaBoundingRect.js";import{getObjectId as R,hasVertices as E,computeAABR as b}from"../../../../layers/graphics/dehydratedFeatures.js";import C from"../../../../rest/support/QuantizationParameters.js";import D from"../../../../rest/support/Query.js";import{MultiFeatureReference as w,SingleFeatureReference as M}from"./featureReference.js";import{failedFeatureCount as U,FeatureTile as j}from"./FeatureTile.js";import{virtualDisplayFilterHighlightTileId as A,virtualSnapshotTileId as I}from"./FeatureTileDescriptor.js";import{tilesAreRelated as O}from"../../terrain/tileUtils.js";import{ImmediateTask as P,TaskPriority as z}from"../../../support/Scheduler.js";let q=class extends t{set maximumNumberOfFeatures(e){e=e||1/0;const t=this._get("maximumNumberOfFeatures");e===t||e<1||(this._set("maximumNumberOfFeatures",e),this._maximumFeaturesUpdated(t,e))}set memoryFactor(e){this.memoryFactor!==e&&(this._set("memoryFactor",e),this._setDirty())}set lodFactor(e){this.lodFactor!==e&&(this._set("lodFactor",e),this._supportsResolution&&this.refetch())}get useTileCount(){return this._useTileCount&&null!=this.context.query.queryFeatureCount}set useTileCount(e){this._useTileCount=e,this.notifyChange("useTileCount")}get updating(){return this._dirty||!!this._pendingEdits||this._isFetching||(this.tileDescriptors?.updating??!1)}get readyToRun(){return this._dirty}get memoryForUnusedFeatures(){let e=0;return this._featureTiles.forEach(t=>e+=t.estimatedUnusedSize),e}get totalVertices(){let e=0;return this._featureTiles.forEach(t=>e+=t.numVertices),e}get totalFeatures(){let e=0;return this._featureTiles.forEach(t=>e+=t.numFeatures),e}get showsAllFeatures(){if(this._paused||this.dataUpdating)return!1;for(const e of this._featureTiles.values())if(!this.hasFullGeometries&&0!==e.emptyFeatureRatio||!e.showsAllFeatures)return!1;return!0}get hasFullGeometries(){if(!this._supportsResolution)return!0;const e=this.tileDescriptors?.some(Q);return e||!this.context.capabilities.supportsQuantization&&"polyline"!==this.context.geometryType}set filterExtent(e){if(null!=e&&this.context.tilingScheme&&!e.spatialReference.equals(this.context.tilingScheme.spatialReference))return void i.getLogger(this).error("#filterExtent=","extent needs to be in the same spatial reference as the tiling scheme");const t=this._get("filterExtent");if(t===e||null!=t&&e&&t.equals(e))return;const s=null!=e?e.clone():null;this._set("filterExtent",s),this._reclip(s,t)}_updateTileZQuantization(e){if(1===this.context.viewingMode){const t=e.computeZQuantizationFactor();this._zQuantizationFactor.value<t&&(this._zQuantizationFactor.value=t)}}get _tileZQuantization(){return this.context.isDraped?1:this._zQuantizationFactor.value}constructor(e){super(e),this._useTileCount=!1,this.dataUpdating=!1,this.updatingTotal=0,this.updatingRemaining=0,this.expectedFeatureDiff=0,this.maximumNumberOfFeaturesExceeded=!1,this._fullRatio=1,this._farRatio=1,this._zQuantizationFactor=d(1),this._changes={updates:{adds:new Array,removes:new Array},adds:new Array,removes:new Array},this._featureTiles=new o,this._displayingFeatureReferences=new Map,this._numDisplayingFeatureReferences=0,this._dirty=!1,this._suspended=!0,this._pendingEdits=null,this._applyEditsTilesUpdated=!1,this.snappingComplexityExceeded=!0,this._isFetching=!1;const t=e.context;this._frameTask=t.scheduler?.registerTask(z.FEATURE_TILE_FETCHER,this)??P,this.FeatureReferenceClass=t.capabilities.supportsMultipleResolutions?w:M,this._objectIdField=t.objectIdField}initialize(){this.addHandles([l(()=>this.tileDescriptors,"change",()=>this._setDirty(),{onListenerAdd:()=>this._setDirty(),onListenerRemove:()=>this._setDirty()}),u(()=>this._tileZQuantization,()=>this.refetch())]),this._setDirty()}destroy(){this._frameTask.remove(),this._featureTiles.forEach(e=>{this._cancelFetchTile(e),this._removeTile(e)}),this._featureTiles.clear(),this._displayingFeatureReferences.clear(),this._pendingEdits?.controller.abort(),this._pendingEdits=null}get _paused(){return this._suspended||!!this._pendingEdits}restart(){this._featureTiles.forEach(e=>{this._cancelFetchTile(e),this._clearTile(e),this._resetFetchTile(e)}),null!=this.context.memoryCache&&this.context.memoryCache.clear(),this._setDirty()}refetch(){this._featureTiles.forEach(e=>{this._cancelFetchTile(e),this._resetFetchTile(e)}),null!=this.context.memoryCache&&this.context.memoryCache.clear(),this._setDirty()}refetchDisplayFilterHighlightTile(){const e=this._featureTiles.get(A);e&&(this._cancelFetchTile(e),this._resetFetchTile(e),this._setDirty())}suspend(){this._suspended||(this._suspended=!0,this._pause(),this._setDirty())}resume(){this._suspended&&(this._suspended=!1,this._unpause())}getMissingAttributesForFeature(e){for(const t of this._featureTiles.values()){const s=t.missingAttributes?.get(e);if(null!=s)return s}}_pause(){this._paused&&(this._featureTiles.forEach(e=>this._cancelFetchTile(e)),this._updated())}_unpause(){this._paused||this._setDirty()}get availableFields(){let e=null;return this._featureTiles.forEach(t=>{null!=t.displayingFeatures&&0!==t.displayingFeatures.length&&(null==e?e=new Set(t.availableFields):e.forEach(s=>{t.availableFields?.has(s)||e.delete(s)}))}),null!=e?e:new Set}applyEdits(e){this._pendingEdits||(this._pendingEdits={edits:Promise.resolve(),count:0,controller:new AbortController},this._pause());const t=this._pendingEdits;t.count++;const s=t.edits.then(()=>e.result.catch(e=>{if(a(e))throw e;return null}).then(e=>e?(this._applyEditsDeleteFeatures(e.deletedFeatures),this._applyEditsAddUpdateFeatures(e.addedFeatures,e.updatedFeatures,t.controller.signal).then(()=>e)):e).then(e=>(0===--t.count&&(this._pendingEdits===t&&(this._pendingEdits=null),null!=this.context.memoryCache&&this.context.memoryCache.clear(),this._applyEditsTilesUpdated=!1,this._unpause()),e)));return t.edits=s,this._updated(),s}_applyEditsDeleteFeatures(e){if(0===e.length)return;const t=this.context.globalIdField,s=t&&this.availableFields.has(t),r=new Set,a=this._objectIdField;e.forEach(({objectId:e,globalId:n})=>{(!e||e<0)&&t&&n&&(s||i.getLogger(this).errorOncePerTick(`Editing the specified service requires the layer's globalIdField, ${t} to be included the layer's outFields for updates to be reflected in the view`),e=this._objectIdFromGlobalId(n,a,t)),null!=e&&e>=0&&r.add(e)}),this._featureTiles.forEach(e=>{if(!e.features)return;const t=e.features.filter(e=>!r.has(R(e,this._objectIdField)));t.length!==e.features.length&&(this._applyEditsTileUpdated(),e.setFeatures(t,0,e.availableFields,e.missingAttributes),this._updateTileZQuantization(e),this._invalidateCounts())})}_objectIdFromGlobalId(e,t,s){if(null==e)return null;const i=this.features.find(t=>t.attributes?.[s]===e);return i?R(i,t):null}async _applyEditsAddUpdateFeatures(e,t,s){const{objectIdField:r,globalIdField:a}=this.context,n=a&&this.availableFields.has(a),o=new Set,l=new Set;for(const i of e){const e=i.objectId;null!=e&&o.add(e)}for(const{objectId:h,globalId:d}of t){let e=h;(null==e||e<0)&&a&&(n||i.getLogger(this).errorOncePerTick(`Editing the specified service requires the layer's globalIdField, ${a} to be included the layer's outFields for updates to be reflected in the view`),e=this._objectIdFromGlobalId(d,r,a)),null!=e&&e>=0&&(o.add(e),l.add(e))}if(0===o.size)return;const u=[];this._featureTiles.forEach(e=>{const t=this._applyEditsAddUpdateTile(e,o,l,s);u.push(t)}),this._updated(),await Promise.allSettled(u)}async _applyEditsAddUpdateTile(e,t,s,i){if(!e.features)return;e.fetchingResolution=e.descriptor.resolution;const r=this._createQuery(e);r.resultType=void 0,r.cacheHint=!1,r.objectIds=Array.from(t);const a=await this._queryFeatures(r,i);let n=null;if(s.size>0){const t=e.features.filter(e=>!s.has(R(e,this._objectIdField)));t.length!==e.features.length&&(n=t)}if(a.features.length>0){n||(n=e.features.slice());for(const e of a.features)n.push(e)}n&&(e.hasPreciseFeatureCount&&(e.numFeatures=Math.max(e.numFeatures,n.length)),this._applyEditsTileUpdated(),e.setFeatures(n,0,Z(e.availableFields,a.fields),V(e.missingAttributes,a.missingAttributes)),this._updateTileZQuantization(e),this._invalidateCounts())}_applyEditsTileUpdated(){this._applyEditsTilesUpdated||(this._applyEditsTilesUpdated=!0,this._updated())}_queryFeatures(e,t){return this.context.query.queryFeaturesDehydrated(e,{signal:t,timeout:J})}_setDirty(){this._dirty=!0,this._updated()}runTask(e){const t=this._frameTask.processQueue(e);if(!this._dirty||!this.initialized)return t;this._dirty=!1;const s=this._featureTilesArray;if(this._markTilesNotAlive(s),!e.run(()=>this._addTiles(s,e))||!e.run(()=>this._filterExtentTiles(s,e))||!e.run(()=>this._removeTiles(s,e))||e.done)return void this._setDirty();const i=this._sortTiles(s);e.run(()=>this._showTiles(i,e))&&e.run(()=>this._fetchTiles(i,e))&&e.run(()=>this._updateMemoryEstimates(i,e))||this._setDirty(),this._updated(),this.updating||(this._updateMaximumNumberOfFeaturesExceeded(),this._updateSnappingComplexityExceeded(i))}_updateSnappingComplexityExceeded(e){let t=Y;for(const s of e){if(Q(s)||t<=0)break;if(!S(s)&&(t--,s.sampledDensityEstimate>W))return void(this.snappingComplexityExceeded=!0)}this.snappingComplexityExceeded=0===this._featureTiles.size}_markTilesNotAlive(e){for(const t of e)t.alive=!1}_addTiles(e,t){return!(this._suspended||!this.tileDescriptors)&&(this.tileDescriptors.forEach(s=>{const i=this._featureTiles.get(s.id);i?i.alive=!0:t.done||(e.push(this._addTile(s)),t.madeProgress())}),t.hasProgressed)}_filterExtentTiles(e,t){for(const s of e){if(t.done)break;s.alive&&(s.filtered=!s.intersects(this.filterExtent),s.filtered&&(this._clearTile(s),t.madeProgress()))}return t.hasProgressed}_removeTiles(e,t){for(let s=e.length-1;s>=0&&!t.done;s--){const i=e[s];i.alive||(this._removeTile(i),s!==e.length-1&&(e[s]=e[e.length-1]),e.pop(),t.madeProgress())}return t.hasProgressed}_sortTiles(e){return e.sort((e,t)=>e.descriptor.loadPriority-t.descriptor.loadPriority),e}_showTiles(e,t){const s=this._updateRatio(e),i=e=>{const t=this._fullRatio<1?s(e)*this._farRatio:1;e.reduceFeatures(t,this.memoryFactor,this._objectIdField,this._reduceMode)&&this._setDirty();const{numFeatures:i,fetchingResolution:r,descriptor:a,isFetched:n}=e;return this._supportsResolution&&i>0&&r!==a.resolution&&n&&(e.requestRefetch(),this._setDirty()),this._showTile(e)};for(const r of e)if(!t.run(()=>i(r))){this._setDirty();break}return t.hasProgressed}_fetchTiles(e,t){if(this._paused)return!1;let s=!1;for(const i of e){if(!i.needsFetch)continue;const e=null!=this.context.memoryCache?this.context.memoryCache.pop(i.id):null;if(e?.resolution!==i.displayingResolution){if(this._needsNumFeatures(i)){const e=new AbortController,r=this._fetchTileCount(i,e.signal);this._handleRequest(i,r,e,()=>i.resetFetching(),()=>i.numFeatures=U),s=!0,t.madeProgress()}if(t.done)return!0}else i.cache=e,i.numFeatures&&this._notifyDataUpdating(),this._setDirty(),this._scheduleUpdated(),t.madeProgress()}if(s)return t.hasProgressed;for(const r of e){if(!r.needsFetch)continue;const e=new AbortController,s=this._fetchTile(r,e.signal);if(this._handleRequest(r,s,e,e=>r.fetchDone(e),e=>{r.fetchFailed=!0,this.context.logFetchError(i.getLogger(this),e)}),t.madeProgress(),t.done)return!0}return t.hasProgressed}_updateMemoryEstimates(e,t){return e.some(e=>!t.run(()=>e.updateEstimates())&&(this._setDirty(),!0)),t.hasProgressed}_reclip(e,t){if(!this.initialized)return;const s=new Array;this._featureTiles.forEach(i=>{null!=i.displayingFeatures&&0!==i.displayingFeatures.length&&(i.intersectionIncludingBorrowed(t,B),i.intersectionIncludingBorrowed(e,G),g(B,G)||s.push(i))}),this._refreshDisplayingFeatures(s),this._updated()}_refreshDisplayingFeatures(e){const t=new Set,s=this._changes.updates;for(const i of e)if(null!=i.displayingFeatures)for(const e of i.displayingFeatures){const i=R(e,this._objectIdField);if(t.has(i))continue;t.add(i);const r=this._displayingFeatureReferences.get(i).feature;s.removes.push(r),s.adds.push(r)}this._applyChanges()}_updated(){let e=0;if(this._paused||this._featureTiles.forEach(t=>t.isFetching?++e:0),this._isFetching=e>0,e>0||this._applyEditsTilesUpdated?this._notifyDataUpdating():this._dirty||this._set("dataUpdating",!1),this.updating){let t=0,s=0,i=0,r=0,a=0;const n=this._displayingFeatureReferences.size/this._numDisplayingFeatureReferences;this._featureTiles.forEach(e=>{if(++s,e.isFetching&&e.hasPreciseFeatureCount){const t=this._maximumFeaturesForTile(e)*(1-e.emptyFeatureRatio),s=null!=e.displayingFeatures?e.displayingFeatures.length*n:0;a+=t-s}e.needsFetch?++r:e.numFeatures>0&&(++i,t+=e.numFeatures)}),r+=e;let o=0,l=0;t?(l=t,o=Math.min(r*t/i,t)):(l=s,o=r),a=Math.min(this.maximumNumberOfFeatures-this.features.length,a),this._set("updatingTotal",l),this._set("updatingRemaining",o),this._set("expectedFeatureDiff",a)}else this._set("updatingTotal",0),this._set("updatingRemaining",0),this._set("expectedFeatureDiff",0);this.debugger?.update()}_updateMaximumNumberOfFeaturesExceeded(){for(const{perTileMaximumNumberOfFeaturesExceeded:e}of this._featureTiles.values())if(e)return void this._set("maximumNumberOfFeaturesExceeded",!0);this._set("maximumNumberOfFeaturesExceeded",!1)}_updateRatio(e){const t=L(e),s=e=>1/(1<<Math.max(0,t-e.descriptor.lij[0]));let i=0,r=0;for(const a of e){const e=a.numFeatures;i+=e,r+=e*s(a)}return this._fullRatio=Math.min(1,this.maximumNumberOfFeatures/i),this._farRatio=this.maximumNumberOfFeatures/r,this._scheduleUpdated(),s}_maximumFeaturesUpdated(e,t){e!==t&&(t>e&&this._featureTiles.forEach(e=>{if(!e.featuresMissing)return;const t=this._maximumFeaturesForTile(e);e.isFullyFetched(t)||(this._cancelFetchTile(e),this._resetFetchTile(e))}),this._setDirty())}_addTile(e){const t=new j(e);return this._featureTiles.set(t.id,t),this._resetFetchTile(t),this._referenceDisplayingFeaturesFromRelatedTiles(t),t}_referenceDisplayingFeaturesFromRelatedTiles(e){const t=e.displayingResolution;this._featureTiles.forEach(s=>{if(null!=s.displayingFeatures&&e!==s&&O(e.descriptor.lij,s.descriptor.lij)){null==e.displayingFeatures&&(e.displayingFeatures=[]),e.descriptor.extent&&s.descriptor.extent&&(e.extentIncludingBorrowedFeatures??=y(e.descriptor.extent),F(e.extentIncludingBorrowedFeatures,s.descriptor.extent,e.extentIncludingBorrowedFeatures));for(const i of s.displayingFeatures){e.displayingFeatures.push(i);const s=this._displayingFeatureReferences.get(R(i,this._objectIdField));s.ref(s.feature,t),this._numDisplayingFeatureReferences++}}})}_removeTile(e){this._clearTile(e),this._featureTiles.delete(e.id)}_resetFetchTile(e){e.filtered=!e.intersects(this.filterExtent),e.filtered?e.needsFetch&&e.fetchDone(4):e.requestFetch()}_cancelFetchTile(e){const t=e.requestController;null!=t&&(e.requestController=null,e.resetFetching(),t.abort())}async _fetchTileCount(e,t){e.numFeatures=await this._fetchCount(e,t),this._updateRatio(this._featureTilesArray)}async _fetchTile(e,t){e.fetchFailed=!1;const s=this._maximumFeaturesForTile(e);if(s<=0)return e.hasPreciseFeatureCount&&0===e.numFeatures||(e.fetchFailed=!0),k(e),e.fetchInformation.value="Empty tile",4;const i=this._getMaxRecordCount(e),r=Math.ceil(s/i);if(e.fetchingResolution=e.descriptor.resolution,N(e)||!this.context.capabilities.supportsMaxRecordCountFactor||e.numFeatures<=s&&r>D.MAX_MAX_RECORD_COUNT_FACTOR)return this._fetchPagedTile(e,t);const a=this._createQuery(e);if(a.maxRecordCountFactor=r,e.isRefetching&&e.features&&e.features.length>0){const t=Math.ceil(e.features.length/(1-e.emptyFeatureRatio)/i);a.maxRecordCountFactor=Math.max(t+1,a.maxRecordCountFactor)}e.fetchInformation.value=`Single fetch\n${s} features`;const{features:o,exceededTransferLimit:l,fields:u,missingAttributes:h}=await this._queryFeatures(a,t),d=l||a.maxRecordCountFactor>=D.MAX_MAX_RECORD_COUNT_FACTOR||s===this._totalFeaturesForTile(e)?5:4,c=await this._frameTask.schedule(()=>{e.exceededTransferLimit.value=!!l;const t=this._removeEmptyFeatures(o,this._getEffectiveTileResolution(e));return e.fetchInformation.value=`Single fetch\n${o.length}/${s} features`,e.setFeatures(o,t,H(u),V(void 0,h)),this._updateTileZQuantization(e),this._maximumFeaturesForTile(e)>s?1:d},t);return n(t),this._invalidateCounts(),c}async _fetchCount(e,t){return this.context.query.queryFeatureCount(this._createFeatureCountQuery(e),{signal:t})}async _fetchPagedTile(e,t){let s,i=0,r=0,a=0,o=this._maximumFeaturesForTile(e)-a;const l=this._getMaxRecordCount(e);let u,h=null;for(;;){const d=this._createQuery(e),c=this._setPagingParameters(d,i,o,l);e.fetchInformation.value=`Paged fetch\n${e.features?.length}/${o} features`;const{features:p,exceededTransferLimit:f,fields:_,missingAttributes:m}=await this._queryFeatures(d,t);if(await this._frameTask.schedule(()=>{c&&(i+=d.num),a+=p.length,r+=this._removeEmptyFeatures(p,this._getEffectiveTileResolution(e)),e.exceededTransferLimit.value=!!f,s=s?.concat(p)??p,h=Z(h,_),u=V(u,m),e.setFeatures(s,r,h,u),this._updateTileZQuantization(e),this._invalidateCounts(),this._setDirty()},t),n(t),o=this._maximumFeaturesForTile(e)-(s?.length??0),!c||!f||o<=0)return f?4:5}}_createFeatureCountQuery(e){const t=this._createQuery(e);return this.context.capabilities.supportsCacheHint&&(t.resultType=void 0,t.cacheHint=!0),t}_createQuery(e){const t=this.context.createQuery();if(t.resultType=this._resultType(e),!N(e)&&e.descriptor.extent&&this.context.tilingScheme&&(t.geometry=T(e.descriptor.extent,this.context.tilingScheme.spatialReference)),this._setResolutionParams(t,e),"tile"!==t.resultType&&this.context.capabilities.supportsCacheHint&&(t.cacheHint=!0),S(e)){const{highlightIds:e}=this.context;e&&e.length>$&&i.getLogger(this).warn("highlight-too-many-features",`highlight is limited to ${$} features on large layers configured with a display filter to avoid performance issues`),t.objectIds=e?.slice(0,$)}else!Q(e)&&this.context.effectiveDisplayFilter&&(t.where=c(t.where,this.context.effectiveDisplayFilter.where));return t}_setPagingParameters(e,t,s,i){return!!this.context.capabilities.supportsPagination&&(e.start=t,s>0&&this.context.capabilities.supportsMaxRecordCountFactor?(e.maxRecordCountFactor=Math.ceil(s/i),e.num=Math.min(e.maxRecordCountFactor*i,s)):e.num=Math.min(i),!0)}_getEffectiveTileResolution(e){if(N(e)||!this._supportsResolution)return null;const t=1===this.context.viewingMode&&this.context.tilingScheme?this.context.tilingScheme.resolutionAtLevel(3):1/0;return Math.min(e.fetchingResolution,t)/this.lodFactor/this._tileZQuantization}get _supportsResolution(){return this.context.capabilities.supportsMultipleResolutions&&"point"!==this.context.geometryType}_setResolutionParams(e,t){const s=this._getEffectiveTileResolution(t);null!=s&&(this.context.capabilities.supportsQuantization?e.quantizationParameters=new C({mode:"view",originPosition:"upper-left",tolerance:s,extent:this.context.fullExtent}):"polyline"===this.context.geometryType&&(e.maxAllowableOffset=s))}_removeEmptyFeatures(e,t){const i=e.length;if(t&&this._supportsResolution){const i=t*(1+_());s(e,({geometry:e})=>!(!e||!E(e))&&(b(e,X),x(X)>i||v(X)>i))}else s(e,({geometry:e})=>E(e));return i-e.length}_needsNumFeatures(e){return this.useTileCount&&e.needsFeatureCount&&!Q(e)}_getMaxRecordCount(e){switch(this._resultType(e)){case"tile":if(this.context.tileMaxRecordCount)return this.context.tileMaxRecordCount;break;case"standard":if(this.context.standardMaxRecordCount)return this.context.standardMaxRecordCount}return this.context.maxRecordCount||$}_resultType(e){if(this.context.capabilities.supportsResultType)return Q(e)?"standard":"tile"}get _reduceMode(){const e=this.context.geometryType;return"polygon"===e||"polyline"===e?0:1}_handleRequest(e,t,s,i,r){e.startFetch(),e.requestController=s;let n=!1;t.then(t=>{e.requestController=null,i(t)}).catch(t=>{e.requestController===s&&(e.requestController=null,e.fetchDone(4)),a(t)?n=!0:r(t)}).then(()=>{n||this._setDirty(),this._scheduleUpdated()})}_scheduleUpdated(){this.hasHandles("scheduleUpdated")||this.addHandles(h(()=>{this.removeHandles("scheduleUpdated"),this._updated()}),"scheduleUpdated")}_showTile(e){if(e.displayingFeatures&&!e.needsDisplayUpdate)return!1;const t=e.features;if(0===e.featureLimit||!t){const t=null!=e.displayingFeatures&&e.displayingFeatures.length>0;return this._hideTileFeatures(e),e.displayingFeatures=[],t}const s=e.fetchingResolution,{adds:i,updates:r}=this._changes,a=Math.min(e.featureLimit,t.length);for(let n=0;n<a;++n){const e=t[n],a=R(e,this._objectIdField),o=this._displayingFeatureReferences.get(a);if(o){const{oldVersion:t,newVersion:i}=o.ref(e,s);t!==i&&(t&&r.removes.push(t),i&&r.adds.push(i))}else this._displayingFeatureReferences.set(a,new this.FeatureReferenceClass(e,s)),i.push(e);this._numDisplayingFeatureReferences++}return this._hideTileFeatures(e),e.displayingResolution=e.fetchingResolution,this._applyChanges(),e.displayingFeatures=t.slice(0,a),!0}_hideTile(e){this._cancelFetchTile(e),this._hideTileFeatures(e)}_hideTileFeatures(e){if(null==e.displayingFeatures)return;const{updates:t,removes:s}=this._changes;for(const i of e.displayingFeatures){const r=R(i,this._objectIdField),a=this._displayingFeatureReferences.get(r);if(!a)continue;const{oldVersion:n,newVersion:o}=a.unref(e.displayingResolution);this._numDisplayingFeatureReferences--,n!==o&&(null==o?(this._displayingFeatureReferences.delete(r),n&&s.push(n)):(t.adds.push(o),n&&t.removes.push(n)))}this._applyChanges(),e.displayingFeatures=null}_notifyDataUpdating(){this._get("dataUpdating")||this._set("dataUpdating",!0)}_applyChanges(){const e=this._changes.updates;e.removes.length>0&&(this._notifyDataUpdating(),this.features.removeMany(e.removes),e.removes.length=0),e.adds.length>0&&(this._notifyDataUpdating(),this.features.addMany(e.adds),e.adds.length=0);const t=this._changes.adds,s=this._changes.removes,i=Math.min(t.length,s.length);let r=0;for(;r<i;){const e=Math.min(r+K,i);this._notifyDataUpdating(),this.features.addMany(t.slice(r,e)),this.features.removeMany(s.slice(r,e)),r=e}t.length>i&&(this._notifyDataUpdating(),this.features.addMany(0===r?t:t.slice(r))),s.length>i&&(this._notifyDataUpdating(),this.features.removeMany(0===r?s:s.slice(r))),t.length=0,s.length=0}_clearTile(e){this._hideTile(e),e.features&&null!=this.context.memoryCache&&this.context.memoryCache.put(e.id,e.cache),e.setFeatures(null,0,null,void 0),this._invalidateCounts()}_invalidateCounts(){this.notifyChange("totalVertices"),this.notifyChange("totalFeatures"),this.notifyChange("memoryForUnusedFeatures")}get _featureTilesArray(){return Array.from(this._featureTiles.values())}get featureTiles(){return this._featureTiles}get storedFeatures(){return this._featureTilesArray.reduce((e,t)=>e+(t.features?t.features.length:0),0)}get missingTiles(){return Array.from(this._featureTiles.values()).reduce((e,t)=>e+(t.needsFetch||t.isFetching?1:0),0)}_totalFeaturesForTile(e){return e.hasPreciseFeatureCount?e.numFeatures:this.maximumNumberOfFeatures}_maximumFeaturesForTile(e){const t=this._totalFeaturesForTile(e),s=this._fullRatio<1?this._farRatio:1;return Math.min(Math.ceil(t*s/(1-e.emptyFeatureRatio)),t)}get test(){}};function Q(e){return e.id===I}function S(e){return e.id===A}function N(e){return Q(e)||S(e)}function L(e){let t=0;for(const s of e)s.features&&s.features.length>0&&s.alive&&(t=Math.max(t,s.descriptor.lij[0]));return t}function k(e){e.setFeatures([],0,null,void 0)}function H(e){return null==e?new Set:new Set(e.map(e=>e.name))}function Z(e,t){if(null==e||null==t)return H(t);const s=new Set;for(const{name:i}of t)e.has(i)&&s.add(i);return s}function V(e,t){if(!t?.length)return e;e??=new Map;const s=()=>new Set;for(const{objectId:i,attribute:a}of t)r(e,i,s).add(a);return e}e([p({constructOnly:!0})],q.prototype,"features",void 0),e([p()],q.prototype,"tileDescriptors",void 0),e([p({value:1/0})],q.prototype,"maximumNumberOfFeatures",null),e([p({value:1})],q.prototype,"memoryFactor",null),e([p({value:1})],q.prototype,"lodFactor",null),e([p()],q.prototype,"useTileCount",null),e([p({readOnly:!0})],q.prototype,"updating",null),e([p({readOnly:!0})],q.prototype,"dataUpdating",void 0),e([p({readOnly:!0})],q.prototype,"updatingTotal",void 0),e([p({readOnly:!0})],q.prototype,"updatingRemaining",void 0),e([p({readOnly:!0})],q.prototype,"expectedFeatureDiff",void 0),e([p({readOnly:!0})],q.prototype,"memoryForUnusedFeatures",null),e([p({readOnly:!0})],q.prototype,"maximumNumberOfFeaturesExceeded",void 0),e([p({readOnly:!0})],q.prototype,"totalVertices",null),e([p({readOnly:!0})],q.prototype,"totalFeatures",null),e([p({readOnly:!0})],q.prototype,"showsAllFeatures",null),e([p({readOnly:!0})],q.prototype,"hasFullGeometries",null),e([p()],q.prototype,"filterExtent",null),e([p({constructOnly:!0})],q.prototype,"context",void 0),e([p()],q.prototype,"_dirty",void 0),e([p()],q.prototype,"_suspended",void 0),e([p()],q.prototype,"_pendingEdits",void 0),e([p()],q.prototype,"_applyEditsTilesUpdated",void 0),e([p()],q.prototype,"_paused",null),e([p()],q.prototype,"snappingComplexityExceeded",void 0),e([p()],q.prototype,"_isFetching",void 0),q=e([f("esri.views.3d.layers.support.FeatureTileFetcher3D")],q);const $=2e3,B=m(),G=m(),X=m(),J=6e5,K=200,W=.95,Y=10;export{q as FeatureTileFetcher3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{destroyMaybe as e}from"../../../../core/maybe.js";import{createFeatureTileQuery3D as t}from"./featureTileQuery3D.js";class r{constructor(e){this._memoryCache=null;const r=e.layerView.layer;this._layerView=e.layerView,this.objectIdField=r.objectIdField,this.globalIdField="globalIdField"in r?r.globalIdField:null,this._returnZ=e.returnZ,this._returnM=e.returnM;const i=this._layerView.view.resourceController;this.query=t(this._layerView,i.normal),i&&this._memoryCacheEnabled&&(this._memoryCache=i.memoryController.newCache(`fl-${r.uid}`))}get _memoryCacheEnabled(){switch(this._layerView.layer.source.type){case"feature-layer":case"ogc-feature":case"oriented-imagery":return!0;case"csv":case"parquet":case"geojson":case"memory":case"wfs":return!1}}destroy(){this._memoryCache=e(this._memoryCache),this.query.destroy()}createQuery(){const e=this._layerView.layer.createQuery();return e.outFields=this._layerView.availableFields,e.returnZ=this._returnZ,e.returnM=this._returnM,e.outSpatialReference=this.tilingScheme?.spatialReference??this._layerView.view.spatialReference,e}get memoryCache(){return this._memoryCache}get viewingMode(){return this._layerView.view.state.viewingMode}get tilingScheme(){return this._layerView.view.featureTiles?.tilingScheme}get scheduler(){return this._layerView.view.resourceController?.scheduler}get geometryType(){return this._layerView.layer.geometryType}get fullExtent(){return this._layerView.layer.fullExtent}get tileMaxRecordCount(){return this._layerView.layer.capabilities.query.tileMaxRecordCount}get standardMaxRecordCount(){return this._layerView.layer.capabilities.query.standardMaxRecordCount}get maxRecordCount(){return this._layerView.layer.capabilities.query.maxRecordCount}get isDraped(){return"on-the-ground"===this._layerView.layer.elevationInfo?.mode}get effectiveDisplayFilter(){return this._layerView.displayFilterEnabled?this._layerView.effectiveDisplayFilter:null}get highlightIds(){return this._layerView.displayFilterEnabled?this._layerView.highlightIds:null}get capabilities(){return this._capabilities??=i(this._layerView.layer),this._capabilities}logFetchError(e,t){e.error("#fetchTile()",this._layerView.layer,t?.message??t)}}function i(e){const t=e.capabilities.query;return{supportsMultipleResolutions:a(e),supportsPagination:!(!t||!t.supportsPagination),supportsResultType:!(!t||!t.supportsResultType),supportsCacheHint:!(!t||!t.supportsCacheHint),supportsQuantization:!(!t||!t.supportsQuantization),supportsQuantizationEditMode:!(!t||!t.supportsQuantizationEditMode),supportsMaxRecordCountFactor:!(!t||!t.supportsMaxRecordCountFactor),supportsFormatPBF:!(!t||!t.supportsFormatPBF)}}function a(e){switch(e.geometryType){case"polyline":return!0;case"polygon":return e.capabilities&&e.capabilities.query&&e.capabilities.query.supportsQuantization;default:return!1}}export{r as FeatureTileFetcher3DContext,i as contextCapabilitiesFromLayer};
5
+ import{destroyMaybe as e}from"../../../../core/maybe.js";import{createFeatureTileQuery3D as t}from"./featureTileQuery3D.js";class r{constructor(e){this._memoryCache=null;const r=e.layerView.layer;this._layerView=e.layerView,this.objectIdField=r.objectIdField,this.globalIdField="globalIdField"in r?r.globalIdField:null,this._returnZ=e.returnZ,this._returnM=e.returnM;const i=this._layerView.view.resourceController;this.query=t(this._layerView,i.normal),i&&this._memoryCacheEnabled&&(this._memoryCache=i.memoryController.newCache(`fl-${r.uid}`))}get _memoryCacheEnabled(){switch(this._layerView.layer.source.type){case"feature-layer":case"ogc-feature":case"oriented-imagery":return!0;case"csv":case"parquet":case"geojson":case"memory":case"wfs":return!1}}destroy(){this._memoryCache=e(this._memoryCache),this.query.destroy()}createQuery(){const e=this._layerView.layer.createQuery();return e.outFields=this._layerView.availableFieldsForQuery,e.returnZ=this._returnZ,e.returnM=this._returnM,e.outSpatialReference=this.tilingScheme?.spatialReference??this._layerView.view.spatialReference,e}get memoryCache(){return this._memoryCache}get viewingMode(){return this._layerView.view.state.viewingMode}get tilingScheme(){return this._layerView.view.featureTiles?.tilingScheme}get scheduler(){return this._layerView.view.resourceController?.scheduler}get geometryType(){return this._layerView.layer.geometryType}get fullExtent(){return this._layerView.layer.fullExtent}get tileMaxRecordCount(){return this._layerView.layer.capabilities.query.tileMaxRecordCount}get standardMaxRecordCount(){return this._layerView.layer.capabilities.query.standardMaxRecordCount}get maxRecordCount(){return this._layerView.layer.capabilities.query.maxRecordCount}get isDraped(){return"on-the-ground"===this._layerView.layer.elevationInfo?.mode}get effectiveDisplayFilter(){return this._layerView.displayFilterEnabled?this._layerView.effectiveDisplayFilter:null}get highlightIds(){return this._layerView.displayFilterEnabled?this._layerView.highlightIds:null}get capabilities(){return this._capabilities??=i(this._layerView.layer),this._capabilities}logFetchError(e,t){e.error("#fetchTile()",this._layerView.layer,t?.message??t)}}function i(e){const t=e.capabilities.query;return{supportsMultipleResolutions:a(e),supportsPagination:!(!t||!t.supportsPagination),supportsResultType:!(!t||!t.supportsResultType),supportsCacheHint:!(!t||!t.supportsCacheHint),supportsQuantization:!(!t||!t.supportsQuantization),supportsQuantizationEditMode:!(!t||!t.supportsQuantizationEditMode),supportsMaxRecordCountFactor:!(!t||!t.supportsMaxRecordCountFactor),supportsFormatPBF:!(!t||!t.supportsFormatPBF)}}function a(e){switch(e.geometryType){case"polyline":return!0;case"polygon":return e.capabilities&&e.capabilities.query&&e.capabilities.query.supportsQuantization;default:return!1}}export{r as FeatureTileFetcher3DContext,i as contextCapabilitiesFromLayer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import i from"../../../../Color.js";import e from"../../../../core/Accessor.js";import{isSome as r}from"../../../../core/arrayUtils.js";import{makeHandle as s,destroyHandle as o}from"../../../../core/handleUtils.js";import{watch as h,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{initializeProjection as c,project as n}from"../../../../geometry/projectionUtils.js";import{GraphicsCollection as g}from"../../../../support/GraphicsCollection.js";import m from"../../../../symbols/SimpleFillSymbol.js";import u from"../../../../symbols/SimpleLineSymbol.js";import d from"../../../../symbols/SimpleMarkerSymbol.js";import{getHighlightGraphics as y}from"../../../layers/support/highlightUtils.js";let w=class extends e{get updating(){return this.graphicsView?.updating??!1}constructor(t){super(t),this._highlightCounts=new Map,this._graphicsViewLoader=null,this.graphics=new g,this.graphicsView=null,this.suspended=!1;const e=new i([255,255,255,1/255]);this._symbols=new Map([["point",new d({size:"2px",style:"square",color:e})],["polyline",new u({width:"2px",color:e})],["polygon",new m({outline:null,color:e})]])}highlight(t,i){const e=y(t);if(0===e.length)return s();let r,o=!1;return this.updatingHandles.addPromise(Promise.all([this._createHighlightGraphics(e),this._ensureGraphicsView3D()]).then(([t,e])=>{!o&&e&&(r=this._addHighlightGraphics(e,t,i))})),s(()=>{o=!0,r?.remove()})}preload(){this._ensureGraphicsView3D()}_addHighlightGraphics(t,i,e){for(const s of i)this._highlightCounts.set(s,(this._highlightCounts.get(s)??0)+1);this.graphics.addMany(i);const r=t.highlight(i,e);return s(()=>{this._removeHighlightGraphics(i),r.remove()})}_removeHighlightGraphics(t){this.graphics.removeMany(t.filter(t=>{const i=Math.max(0,(this._highlightCounts.get(t)??0)-1);return 0===i?(this._highlightCounts.delete(t),!0):(this._highlightCounts.set(t,i),!1)}))}async _ensureGraphicsView3D(){if(this.graphicsView)return this.graphicsView;this._graphicsViewLoader||(this._graphicsViewLoader=import("../GraphicsView3D.js"));const{default:t}=await this._graphicsViewLoader;if(this.destroyed)return null;const i=new t({view:this.view,layer:this.layer,getGraphics:()=>this.graphics,drapeSourcePriorityOffset:.5});return this._set("graphicsView",i),this.addHandles([o(this.graphicsView),h(()=>this.suspended,t=>{i.suspended=t},p)]),i}async _createHighlightGraphics(t){const i=t.map(({geometry:t})=>t?.spatialReference).filter(r).reduce((t,i)=>(0!==t.length&&t.at(-1)?.equals(i)||t.push(i),t),[]),e=this.view.spatialReference,s=i.map(t=>({source:t,dest:e}));try{await c(s)}catch{return[]}return t.map(t=>{const{geometry:i}=t;try{const r=i?n(i,e):null,s=t.cloneShallow();return s.geometry=r,s.symbol=this._symbols.get(r?.type),s}catch{return t}})}};t([a()],w.prototype,"graphics",void 0),t([a()],w.prototype,"graphicsView",void 0),t([a()],w.prototype,"view",void 0),t([a()],w.prototype,"layer",void 0),t([a()],w.prototype,"updatingHandles",void 0),t([a()],w.prototype,"suspended",void 0),t([a()],w.prototype,"updating",null),w=t([l("esri.views.3d.layers.support.ImageHighlightHelper3D")],w);export{w as ImageHighlightHelper3D};
5
+ import{__decorate as i}from"tslib";import e from"../../../../Color.js";import t from"../../../../core/Accessor.js";import{isSome as r}from"../../../../core/arrayUtils.js";import{makeHandle as s,destroyHandle as o}from"../../../../core/handleUtils.js";import{watch as h,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{initializeProjection as n,project as c}from"../../../../geometry/projectionUtils.js";import{GraphicsCollection as g}from"../../../../support/GraphicsCollection.js";import m from"../../../../symbols/SimpleFillSymbol.js";import d from"../../../../symbols/SimpleLineSymbol.js";import u from"../../../../symbols/SimpleMarkerSymbol.js";import{getHighlightGraphics as y}from"../../../layers/support/highlightUtils.js";let w=class extends t{get updating(){return this.graphicsView?.updating??!1}constructor(i){super(i),this._highlightCounts=new Map,this._graphicsViewLoader=null,this.graphics=new g,this.graphicsView=null,this.suspended=!1;const t=new e([255,255,255,1/255]);this._symbols=new Map([["point",new u({size:"2px",style:"square",color:t})],["polyline",new d({width:"2px",color:t})],["polygon",new m({outline:null,color:t})]])}highlight(i,e){const t=y(i);if(0===t.length)return s();let r,o=!1;return this.updatingHandles.addPromise(Promise.all([this._createHighlightGraphics(t),this._ensureGraphicsView3D()]).then(([i,t])=>{!o&&t&&(r=this._addHighlightGraphics(t,i,e))})),s(()=>{o=!0,r?.remove()})}preload(){this._ensureGraphicsView3D()}_addHighlightGraphics(i,e,t){for(const s of e)this._highlightCounts.set(s,(this._highlightCounts.get(s)??0)+1);this.graphics.addMany(e);const r=i.highlight(e,t);return s(()=>{this._removeHighlightGraphics(e),r.remove()})}_removeHighlightGraphics(i){this.graphics.removeMany(i.filter(i=>{const e=Math.max(0,(this._highlightCounts.get(i)??0)-1);return 0===e?(this._highlightCounts.delete(i),!0):(this._highlightCounts.set(i,e),!1)}))}async _ensureGraphicsView3D(){if(this.graphicsView)return this.graphicsView;this._graphicsViewLoader||(this._graphicsViewLoader=import("../GraphicsView3D.js"));const{default:i}=await this._graphicsViewLoader;if(this.destroyed)return null;const e=new i({view:this.view,layer:{type:"graphics-view-3d-dummy",id:this.layer.id,uid:this.layer.uid,elevationInfo:{mode:"on-the-ground"}},getGraphics:()=>this.graphics,drapeSourcePriorityOffset:.5});return this._set("graphicsView",e),this.addHandles([o(this.graphicsView),h(()=>this.suspended,i=>{e.suspended=i},p)]),e}async _createHighlightGraphics(i){const e=i.map(({geometry:i})=>i?.spatialReference).filter(r).reduce((i,e)=>(0!==i.length&&i.at(-1)?.equals(e)||i.push(e),i),[]),t=this.view.spatialReference,s=e.map(i=>({source:i,dest:t}));try{await n(s)}catch{return[]}return i.map(i=>{const{geometry:e}=i;try{const r=e?c(e,t):null,s=i.cloneShallow();return s.geometry=r,s.symbol=this._symbols.get(r?.type),s}catch{return i}})}};i([a()],w.prototype,"graphics",void 0),i([a()],w.prototype,"graphicsView",void 0),i([a()],w.prototype,"view",void 0),i([a()],w.prototype,"layer",void 0),i([a()],w.prototype,"updatingHandles",void 0),i([a()],w.prototype,"suspended",void 0),i([a()],w.prototype,"updating",null),w=i([l("esri.views.3d.layers.support.ImageHighlightHelper3D")],w);export{w as ImageHighlightHelper3D};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ class t{constructor(t,s){this._maxTotalSamples=t,this._maxDistance=s,this.count=0,this.numSamples=0}get done(){return 0===this.numRemainingSamples}get numRemainingSamples(){return Math.max(0,this._maxTotalSamples-this.numSamples)}get ratio(){return this.numSamples?this.count/this.numSamples:0}sampleGeometry(t,s,e){switch(t?.type){case"point":if("point"!==s?.type)return;this._withinDistance(t.x-s.x,t.y-s.y)&&this.count++,this.numSamples++;break;case"polyline":case"polygon":{const s="polyline"===t.type?t.paths:t.rings;for(let t=0;t<s.length;t++){const a=s[t],n=e/(s.length-t),i=Math.max(1,Math.ceil(a.length/n));for(let t=Math.floor(i/2);t<a.length-1;t+=i){const s=a[t],n=a[t+1],i=n[0]-s[0],h=n[1]-s[1];if(this._withinDistance(i,h)&&this.count++,this.numSamples++,--e<=0||this.numSamples>=this._maxTotalSamples)return}}}}}_withinDistance(t,s){return Math.abs(t)<=this._maxDistance||Math.abs(s)<=this._maxDistance}}export{t as SampledGeometryMaxDistanceRatio};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{cyclicalPI as i}from"../../../../core/Cyclical.js";import{deg2rad as e}from"../../../../core/mathUtils.js";import{createScreenPointArray as n,screenPointObjectToArray as s}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{copy as r,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{d as m,u as h,b as c,e as _,n as p,g as u,h as l,f as d}from"../../../../chunks/vec32.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as P}from"../../../../geometry/ellipsoidUtils.js";import{wrapAxisAngle as v}from"../../../../geometry/support/axisAngle.js";import{create as C,fromPositionAndNormal as w,getNormal as M}from"../../../../geometry/support/plane.js";import{c as b,n as S,a as f}from"../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as j,applyAll as E}from"../../camera/constraintUtils.js";import{ConstraintOptions as y}from"../../camera/constraintUtils/ConstraintOptions.js";import{ExponentialFalloff as A}from"../../input/util.js";import{InteractiveController as O}from"./InteractiveController.js";import{PanPlanarMomentumController as R}from"./momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as x}from"./momentum/PanSphericalMomentumController.js";import{RotationMomentumController as k}from"./momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as z}from"./momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as F}from"./momentum/ZoomSphericalMomentumController.js";import{pickPointAndInitSphere as H,excludeTerrain as D,navigationMode as T,sphereOrPlanePointFromScreenPoint as U,maxPanDistanceModifier as G,minPinchAndPanCameraHeight as I,pivotSearchAreaSize as Z,intersectPlaneFromScreenPointAtEye as L,applyZoomOnSphere as V,shouldPreserveHeading as q,applyPanSphericalPreserveHeading as B,applyPanSphericalDirectRotation as J,normalizeRotationDelta as K,applyRotation as N,applyPanPlanar as Q,applyZoomToPoint as W}from"../utils/navigationUtils.js";import X from"../../webgl/RenderCamera.js";import{PanPlanarMomentumEstimator as Y}from"../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as $}from"../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as tt}from"../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as it}from"../../../navigation/ZoomMomentumEstimator.js";let et=class extends O{constructor(){super(...arguments),this._smoothRotation=new A(.05),this._rotationAxis=g(),this._beginAngle=0,this._beginHeading=0,this._panningPlane=C(),this._beginRadius=0,this._smoothScaling=new A(.05),this._zoomCenterScreen=n(),this._zoomMomentumEstimator=new it,this._rotationMomentumEstimator=new tt,this._panSphericalMomentumEstimator=new $,this._panPlanarMomentumEstimator=new Y,this._adjustedSphere=b(),this._tmp3d=g(),this._tmpScreenPointArray=n(),this._beginScreenPoint=n(),this._beginScenePoint=g(),this._screenPickPoint=n(),this._scenePickPoint=g(),this._navMode=1,this._sphere=b(),this._pointerCount=0,this._tmpInteractionDirection=g(),this._beginCamera=new X,this._constraintOptions=new y(15,0,0,this._beginCamera)}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;this._zoomMomentumEstimator.enabled=this._rotationMomentumEstimator.enabled=this._panPlanarMomentumEstimator.enabled=this._panSphericalMomentumEstimator.enabled=this.view.navigation.momentumEnabled,this._beginHeading=-i.normalize(e(this.view.camera.heading)),this._beginRadius=t.radius,this._pointerCount=t.pointers.size,this._beginAngle=t.angle,this._smoothRotation.reset(),s(t.center,this._screenPickPoint),r(this._beginScreenPoint,this._screenPickPoint);const n=H(this._intersectionHelper,this.startCamera,this._screenPickPoint,P(this.view.spatialReference).radius,1,this.view.basemapTerrain.invisible?D:{});null!=n.scenePickPoint&&(this._scenePickPoint=n.scenePickPoint,this._sphere=n.sphere,m(this._beginScenePoint,this._scenePickPoint),this._navMode=T(this.startCamera,this._screenPickPoint,this.view.renderCoordsHelper,this.view.viewingMode),0===this._navMode&&this._preparePlanarPanMode(t,n.hasGeometryIntersection),this._beginCamera.copyFrom(this.startCamera))}update(t){if(!this.running)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;1===this._navMode?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t)),this.commitCamera()}end(t){t.pointers.size===this._pointerCount&&this.update(t),this.finishController();const i=this._zoomMomentumEstimator.evaluateMomentum();if(i)return 1===this._navMode?new F({view:this.view,momentum:i,screenCenter:this._zoomCenterScreen,sceneCenter:this._beginScenePoint,radius:this._sphere[3]}):new z({view:this.view,momentum:i,zoomCenter:this._beginScenePoint});const e=this._rotationMomentumEstimator.evaluateMomentum();if(e)return new k({view:this.view,momentum:e,center:S(this._sphere,g()),axis:this._rotationAxis});if(1===this._navMode){const t=this._panSphericalMomentumEstimator.evaluateMomentum();if(t)return new x({view:this.view,momentum:t})}else{const t=this._panPlanarMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}return null}_preparePlanarPanMode(t,i){const e=h(this._tmp3d,this.startCamera.viewForward);w(this._scenePickPoint,e,this._panningPlane);const o=n(this._screenPickPoint[0],0),r=g(),a=c(this.startCamera.eye);this._adjustedSphere[3]=a<this._sphere[3]?a-100:this._sphere[3],U(this._adjustedSphere,this.startCamera,o,r);const P=g(),v=g(),C=g();_(P,this._scenePickPoint,this.currentCamera.eye);const b=c(P);p(P,P);const S=G*Math.max(Math.abs(this.view.camera.position.z),I),f=this.view.stage.renderView.getMinimalDepthForArea(null,this._screenPickPoint[0],this._screenPickPoint[1],this.view.state.camera,Z);let j=null!=f?f:S;i&&(j=Math.min(j,b)),m(C,u(v,this.currentCamera.eye,l(v,P,j))),this._panningPlane[3]=-d(M(this._panningPlane),C),this.startCamera.center=u(v,this.startCamera.eye,l(v,this.startCamera.viewForward,j));const E=s(t.center,this._tmpScreenPointArray);L(this._panningPlane,this.startCamera,E,this._beginScenePoint)}_zoomSpherical(t){const i=this._beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this._smoothScaling.gain=e,this._smoothScaling.update(i),V(this._sphere,this.currentCamera,this._smoothScaling.value),s(t.center,this._zoomCenterScreen),this._zoomMomentumEstimator.add(this._smoothScaling.value,.001*t.timestamp),this._constraintOptions.interactionType=1,this._constraintOptions.interactionFactor=j(t.radius-this._beginRadius),E(this.view,this.currentCamera,this._constraintOptions)}_panningSpherical(t){const i=s(t.center,this._tmpScreenPointArray);U(this._sphere,this.currentCamera,i,this._tmp3d),q(this._beginScenePoint,d(this.currentCamera.up,this._beginScenePoint),this._sphere[3],this._beginHeading,this.view.camera.tilt,this.startCamera.aboveGround)?(B(this._sphere,this.currentCamera,this._beginScenePoint,this._tmp3d,this._beginHeading,this.view.camera.tilt,!1),this._panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this._tmp3d,.001*t.timestamp,this.startCamera,this._sphere,this._beginHeading,this.view.camera.tilt)):(J(this._sphere,this.currentCamera,this._beginScenePoint,this._tmp3d,this.view.camera.tilt,!1),this._panSphericalMomentumEstimator.addMomentumDirectRotation(i,this._tmp3d,.001*t.timestamp,this.startCamera,this._sphere[3],this.view.camera.tilt)),this._constraintOptions.interactionType=4,this._constraintOptions.interactionFactor=j(a(this._screenPickPoint,i)),E(this.view,this.currentCamera,this._constraintOptions)}_rotateSpherical(t){p(this._rotationAxis,this._scenePickPoint),this.currentCamera.aboveGround||h(this._rotationAxis,this._rotationAxis);const i=this._smoothRotation.value,e=i+K(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this._smoothRotation.gain=n,this._smoothRotation.update(e);const s=this._smoothRotation.value-this._beginAngle;this._rotationMomentumEstimator.add(s,.001*t.timestamp),N(this.currentCamera,f(this._sphere),v(this._rotationAxis,s)),this._constraintOptions.interactionType=2,this._constraintOptions.interactionFactor=j(t.radius*e),E(this.view,this.currentCamera,this._constraintOptions)}_panningPlanar(t){const i=s(t.center,this._tmpScreenPointArray);L(this._panningPlane,this.currentCamera,i,this._tmp3d)&&(Q(this.currentCamera,this._beginScenePoint,this._tmp3d),this._panPlanarMomentumEstimator.add(i,this._tmp3d,.001*t.timestamp),this._constraintOptions.interactionType=4,this._constraintOptions.interactionFactor=j(a(this._beginScreenPoint,i)),this._constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this._tmpInteractionDirection),E(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this._beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this._smoothScaling.gain=e,this._smoothScaling.update(i),this._zoomMomentumEstimator.add(this._smoothScaling.value,.001*t.timestamp),W(this.currentCamera,this._beginScenePoint,this._smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this._constraintOptions.interactionType=1,this._constraintOptions.interactionFactor=j(t.radius-this._beginRadius),E(this.view,this.currentCamera,this._constraintOptions)}_rotatePlanar(t){m(this._rotationAxis,this._beginScenePoint),this.currentCamera.aboveGround||h(this._rotationAxis,this._rotationAxis);const i=this._smoothRotation.value;let e=t.angle-i;e=K(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this._smoothRotation.gain=s,this._smoothRotation.update(n);const o=this._smoothRotation.value-this._beginAngle;this._rotationMomentumEstimator.add(o,.001*t.timestamp),N(this.currentCamera,f(this._sphere),v(this._rotationAxis,o)),this._constraintOptions.interactionType=2,this._constraintOptions.interactionFactor=j(t.radius*o),E(this.view,this.currentCamera,this._constraintOptions)}};et=t([o("esri.views.3d.state.controllers.PinchAndPanControllerGlobal")],et);export{et as PinchAndPanControllerGlobal};
5
+ import{__decorate as t}from"tslib";import{cyclicalPI as i}from"../../../../core/Cyclical.js";import{deg2rad as e}from"../../../../core/mathUtils.js";import{createScreenPointArray as n,screenPointObjectToArray as s}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{copy as r,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{d as m,u as h,b as c,e as _,n as p,g as u,h as l,f as g}from"../../../../chunks/vec32.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as P}from"../../../../geometry/ellipsoidUtils.js";import{wrapAxisAngle as v}from"../../../../geometry/support/axisAngle.js";import{create as C,fromPositionAndNormal as w,getNormal as M}from"../../../../geometry/support/plane.js";import{c as b,n as S,a as f}from"../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as j,applyAll as E}from"../../camera/constraintUtils.js";import{ConstraintOptions as y}from"../../camera/constraintUtils/ConstraintOptions.js";import{ExponentialFalloff as A}from"../../input/util.js";import{InteractiveController as O}from"./InteractiveController.js";import{PanPlanarMomentumController as R}from"./momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as x}from"./momentum/PanSphericalMomentumController.js";import{RotationMomentumController as k}from"./momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as z}from"./momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as F}from"./momentum/ZoomSphericalMomentumController.js";import{pickPointAndInitSphere as H,excludeTerrain as D,inferNavigationMode as T,sphereOrPlanePointFromScreenPoint as U,maxPanDistanceModifier as G,minPinchAndPanCameraHeight as I,pivotSearchAreaSize as Z,intersectPlaneFromScreenPointAtEye as L,applyZoomOnSphere as V,shouldPreserveHeading as q,applyPanSphericalPreserveHeading as B,applyPanSphericalDirectRotation as J,normalizeRotationDelta as K,applyRotation as N,applyPanPlanar as Q,applyZoomToPoint as W}from"../utils/navigationUtils.js";import X from"../../webgl/RenderCamera.js";import{PanPlanarMomentumEstimator as Y}from"../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as $}from"../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as tt}from"../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as it}from"../../../navigation/ZoomMomentumEstimator.js";let et=class extends O{constructor(){super(...arguments),this._smoothRotation=new A(.05),this._rotationAxis=d(),this._beginAngle=0,this._beginHeading=0,this._panningPlane=C(),this._beginRadius=0,this._smoothScaling=new A(.05),this._zoomCenterScreen=n(),this._zoomMomentumEstimator=new it,this._rotationMomentumEstimator=new tt,this._panSphericalMomentumEstimator=new $,this._panPlanarMomentumEstimator=new Y,this._adjustedSphere=b(),this._tmp3d=d(),this._tmpScreenPointArray=n(),this._beginScreenPoint=n(),this._beginScenePoint=d(),this._screenPickPoint=n(),this._scenePickPoint=d(),this._navigationMode=1,this._sphere=b(),this._pointerCount=0,this._tmpInteractionDirection=d(),this._beginCamera=new X,this._constraintOptions=new y(15,0,0,this._beginCamera)}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;this._zoomMomentumEstimator.enabled=this._rotationMomentumEstimator.enabled=this._panPlanarMomentumEstimator.enabled=this._panSphericalMomentumEstimator.enabled=this.view.navigation.momentumEnabled,this._beginHeading=-i.normalize(e(this.view.camera.heading)),this._beginRadius=t.radius,this._pointerCount=t.pointers.size,this._beginAngle=t.angle,this._smoothRotation.reset(),s(t.center,this._screenPickPoint),r(this._beginScreenPoint,this._screenPickPoint);const n=H(this._intersectionHelper,this.startCamera,this._screenPickPoint,P(this.view.spatialReference).radius,1,this.view.basemapTerrain.invisible?D:{});null!=n.scenePickPoint&&(this._scenePickPoint=n.scenePickPoint,this._sphere=n.sphere,m(this._beginScenePoint,this._scenePickPoint),this._navigationMode=T(this.startCamera,this._screenPickPoint,this.view.renderCoordsHelper,this.view.viewingMode),0===this._navigationMode&&this._preparePlanarPanMode(t,n.hasGeometryIntersection),this._beginCamera.copyFrom(this.startCamera))}update(t){if(!this.running)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;1===this._navigationMode?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t)),this.commitCamera()}end(t){t.pointers.size===this._pointerCount&&this.update(t),this.finishController();const i=this._zoomMomentumEstimator.evaluateMomentum();if(i)return 1===this._navigationMode?new F({view:this.view,momentum:i,screenCenter:this._zoomCenterScreen,sceneCenter:this._beginScenePoint,radius:this._sphere[3]}):new z({view:this.view,momentum:i,zoomCenter:this._beginScenePoint});const e=this._rotationMomentumEstimator.evaluateMomentum();if(e)return new k({view:this.view,momentum:e,center:S(this._sphere,d()),axis:this._rotationAxis});if(1===this._navigationMode){const t=this._panSphericalMomentumEstimator.evaluateMomentum();if(t)return new x({view:this.view,momentum:t})}else{const t=this._panPlanarMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}return null}_preparePlanarPanMode(t,i){const e=h(this._tmp3d,this.startCamera.viewForward);w(this._scenePickPoint,e,this._panningPlane);const o=n(this._screenPickPoint[0],0),r=d(),a=c(this.startCamera.eye);this._adjustedSphere[3]=a<this._sphere[3]?a-100:this._sphere[3],U(this._adjustedSphere,this.startCamera,o,r);const P=d(),v=d(),C=d();_(P,this._scenePickPoint,this.currentCamera.eye);const b=c(P);p(P,P);const S=G*Math.max(Math.abs(this.view.camera.position.z),I),f=this.view.stage.renderView.getMinimalDepthForArea(null,this._screenPickPoint[0],this._screenPickPoint[1],this.view.state.camera,Z);let j=null!=f?f:S;i&&(j=Math.min(j,b)),m(C,u(v,this.currentCamera.eye,l(v,P,j))),this._panningPlane[3]=-g(M(this._panningPlane),C),this.startCamera.center=u(v,this.startCamera.eye,l(v,this.startCamera.viewForward,j));const E=s(t.center,this._tmpScreenPointArray);L(this._panningPlane,this.startCamera,E,this._beginScenePoint)}_zoomSpherical(t){const i=this._beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this._smoothScaling.gain=e,this._smoothScaling.update(i),V(this._sphere,this.currentCamera,this._smoothScaling.value),s(t.center,this._zoomCenterScreen),this._zoomMomentumEstimator.add(this._smoothScaling.value,.001*t.timestamp),this._constraintOptions.interactionType=1,this._constraintOptions.interactionFactor=j(t.radius-this._beginRadius),E(this.view,this.currentCamera,this._constraintOptions)}_panningSpherical(t){const i=s(t.center,this._tmpScreenPointArray);U(this._sphere,this.currentCamera,i,this._tmp3d),q(this._beginScenePoint,g(this.currentCamera.up,this._beginScenePoint),this._sphere[3],this._beginHeading,this.view.camera.tilt,this.startCamera.aboveGround)?(B(this._sphere,this.currentCamera,this._beginScenePoint,this._tmp3d,this._beginHeading,this.view.camera.tilt,!1),this._panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this._tmp3d,.001*t.timestamp,this.startCamera,this._sphere,this._beginHeading,this.view.camera.tilt)):(J(this._sphere,this.currentCamera,this._beginScenePoint,this._tmp3d,this.view.camera.tilt,!1),this._panSphericalMomentumEstimator.addMomentumDirectRotation(i,this._tmp3d,.001*t.timestamp,this.startCamera,this._sphere[3],this.view.camera.tilt)),this._constraintOptions.interactionType=4,this._constraintOptions.interactionFactor=j(a(this._screenPickPoint,i)),E(this.view,this.currentCamera,this._constraintOptions)}_rotateSpherical(t){p(this._rotationAxis,this._scenePickPoint),this.currentCamera.aboveGround||h(this._rotationAxis,this._rotationAxis);const i=this._smoothRotation.value,e=i+K(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this._smoothRotation.gain=n,this._smoothRotation.update(e);const s=this._smoothRotation.value-this._beginAngle;this._rotationMomentumEstimator.add(s,.001*t.timestamp),N(this.currentCamera,f(this._sphere),v(this._rotationAxis,s)),this._constraintOptions.interactionType=2,this._constraintOptions.interactionFactor=j(t.radius*e),E(this.view,this.currentCamera,this._constraintOptions)}_panningPlanar(t){const i=s(t.center,this._tmpScreenPointArray);L(this._panningPlane,this.currentCamera,i,this._tmp3d)&&(Q(this.currentCamera,this._beginScenePoint,this._tmp3d),this._panPlanarMomentumEstimator.add(i,this._tmp3d,.001*t.timestamp),this._constraintOptions.interactionType=4,this._constraintOptions.interactionFactor=j(a(this._beginScreenPoint,i)),this._constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this._tmpInteractionDirection),E(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this._beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this._smoothScaling.gain=e,this._smoothScaling.update(i),this._zoomMomentumEstimator.add(this._smoothScaling.value,.001*t.timestamp),W(this.currentCamera,this._beginScenePoint,this._smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this._constraintOptions.interactionType=1,this._constraintOptions.interactionFactor=j(t.radius-this._beginRadius),E(this.view,this.currentCamera,this._constraintOptions)}_rotatePlanar(t){m(this._rotationAxis,this._beginScenePoint),this.currentCamera.aboveGround||h(this._rotationAxis,this._rotationAxis);const i=this._smoothRotation.value;let e=t.angle-i;e=K(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this._smoothRotation.gain=s,this._smoothRotation.update(n);const o=this._smoothRotation.value-this._beginAngle;this._rotationMomentumEstimator.add(o,.001*t.timestamp),N(this.currentCamera,f(this._sphere),v(this._rotationAxis,o)),this._constraintOptions.interactionType=2,this._constraintOptions.interactionFactor=j(t.radius*o),E(this.view,this.currentCamera,this._constraintOptions)}};et=t([o("esri.views.3d.state.controllers.PinchAndPanControllerGlobal")],et);export{et as PinchAndPanControllerGlobal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{createScreenPointArray as i,screenPointObjectToArray as e}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{distance as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{u as o,d as r,f as a,e as m,b as h,n as l,h as c,g as p}from"../../../../chunks/vec32.js";import{create as _,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{wrapAxisAngle as d}from"../../../../geometry/support/axisAngle.js";import{create as g,fromNormalAndOffset as C,setOffsetFromPoint as v,negate as b,getNormal as w}from"../../../../geometry/support/plane.js";import{pixelDistanceToInteractionFactor as M,applyAll as f}from"../../camera/constraintUtils.js";import{ConstraintOptions as j}from"../../camera/constraintUtils/ConstraintOptions.js";import{ExponentialFalloff as P}from"../../input/util.js";import{getVoxelWasm as V}from"../../layers/VoxelWasm.js";import{InteractiveController as z}from"./InteractiveController.js";import{PanPlanarMomentumController as S}from"./momentum/PanPlanarMomentumController.js";import{RotationMomentumController as E}from"./momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as H}from"./momentum/ZoomPlanarMomentumController.js";import{excludeTerrain as y,navigationMode as x,getTiltScaleFactor as O,maxPanDistanceModifier as F,minPinchAndPanCameraHeight as R,pivotSearchAreaSize as A,centroid as T,applyZoomToPoint as U,applyPanPlanar as L,normalizeRotationDelta as k,applyRotation as D,intersectPlaneFromScreenPointAtEye as G}from"../utils/navigationUtils.js";import I from"../../webgl/RenderCamera.js";import{PanPlanarMomentumEstimator as Z}from"../../../navigation/PanPlanarMomentumEstimator.js";import{RotationMomentumEstimator as W}from"../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as q}from"../../../navigation/ZoomMomentumEstimator.js";const B=u(0,0,1);let J=class extends z{constructor(){super(...arguments),this._rotationValueSmooth=new P(.05),this._scalingValueSmooth=new P(.05),this._planeHorizontal=g(),this._planeVertical=g(),this._rotationMomentumEstimator=new W,this._panMomentumEstimator=new Z(300,12,.9),this._zoomMomentumEstimator=new q,this._beginRadius=0,this._beginCenter=_(),this._beginAngle=0,this._tmpPoints=[],this._navMode=1,this._beginCenterScreen=i(),this._tmpCentroid3d=_(),this._tmpCentroid2d=i(),this._tmp2d=i(),this._pointerCount=0,this._beginCamera=new I,this._constraintOptions=new j(15,0,0,this._beginCamera)}begin(t){if(!this.running)return;const i=this.view.navigation.momentumEnabled;this._zoomMomentumEstimator.enabled=i,this._rotationMomentumEstimator.enabled=i,this._panMomentumEstimator.enabled=i,this._beginRadius=t.radius,this._pointerCount=t.pointers.size,this._beginAngle=t.angle,this._rotationValueSmooth.reset(),this._scalingValueSmooth.reset(),e(t.center,this._beginCenterScreen),C(B,0,this._planeHorizontal);const n=_(),s=this._intersectionHelper.intersectScreenFreePointFallback(this._beginCenterScreen,n,this.view.basemapTerrain.invisible?y:{}),u=_();o(u,this.startCamera.viewForward);const d=_();r(d,B);const g=a(u,d);this._navMode=x(this.startCamera,this._beginCenterScreen,this.view.renderCoordsHelper,this.view.viewingMode);const M=O(d,this.startCamera.viewForward,F)*Math.max(Math.abs(this.view.camera.position.z),R);v(this._planeHorizontal,this._planeHorizontal,n),this.startCamera.aboveGround||b(this._planeHorizontal,this._planeHorizontal);const f=_(),j=_(),P=_();m(f,n,this.currentCamera.eye);const z=h(f);if(l(f,f),0===this._navMode){c(d,d,g),m(w(this._planeVertical),u,d),l(w(this._planeVertical),w(this._planeVertical)),v(this._planeVertical,this._planeVertical,n);const i=this.view.stage.renderView.getMinimalDepthForArea(V(this.view),this._beginCenterScreen[0],this._beginCenterScreen[1],this.view.state.camera,A);let e=null!=i?i:M;s&&(e=Math.min(e,z)),r(P,p(j,this.currentCamera.eye,c(j,f,e))),this._planeVertical[3]=-a(w(this._planeVertical),P),this._computePlanePoints(t.pointers,this._planeVertical,this.startCamera,this._tmpPoints),T(this._tmpPoints,this._beginCenter)}else{const i=s?z:M;r(P,p(j,this.currentCamera.eye,c(j,f,i))),this._planeHorizontal[3]=-a(w(this._planeHorizontal),P),this._computePlanePoints(t.pointers,this._planeHorizontal,this.startCamera,this._tmpPoints),T(this._tmpPoints,this._beginCenter)}this._beginCamera.copyFrom(this.startCamera)}update(t){if(!this.running)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1,n=1===this._navMode?this._planeHorizontal:this._planeVertical,o=this._beginCenter;if(i){const i=this._beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this._scalingValueSmooth.gain=e,this._scalingValueSmooth.update(i),U(this.currentCamera,o,this._scalingValueSmooth.value,this.view.state.constraints.minimumPoiDistance),this._zoomMomentumEstimator.add(this._scalingValueSmooth.value,.001*t.timestamp),this._constraintOptions.interactionType=1,this._constraintOptions.interactionFactor=M(Math.abs(t.radius-this._beginRadius)),f(this.view,this.currentCamera,this._constraintOptions)}if(this._computePlanePoints(t.pointers,n,this.currentCamera,this._tmpPoints),T(this._tmpPoints,this._tmpCentroid3d),e(t.center,this._tmpCentroid2d),L(this.currentCamera,o,this._tmpCentroid3d),this._panMomentumEstimator.add(this._tmpCentroid2d,this._tmpCentroid3d,.001*t.timestamp),this._constraintOptions.interactionType=4,this._constraintOptions.interactionFactor=M(s(this._beginCenterScreen,this._tmpCentroid2d)),f(this.view,this.currentCamera,this._constraintOptions),i){const i=o,e=this._rotationValueSmooth.value,n=e+k(t.angle-e),s=.00125*Math.min(Math.max(t.radius,40),120);this._rotationValueSmooth.gain=s,this._rotationValueSmooth.update(n);const r=this._rotationValueSmooth.value-this._beginAngle;this._rotationMomentumEstimator.add(r,.001*t.timestamp);const a=w(this._planeHorizontal);D(this.currentCamera,i,d(a,r)),this._constraintOptions.interactionType=2,this._constraintOptions.interactionFactor=M(Math.abs(t.radius*r)),f(this.view,this.currentCamera,this._constraintOptions)}this.commitCamera()}end(t){t.pointers.size===this._pointerCount&&this.update(t),this.finishController();const i=this._zoomMomentumEstimator.evaluateMomentum();if(i)return new H({view:this.view,momentum:i,zoomCenter:this._beginCenter});const e=this._rotationMomentumEstimator.evaluateMomentum();if(e)return new E({view:this.view,momentum:e,center:this._beginCenter,axis:w(this._planeHorizontal)});const n=this._panMomentumEstimator.evaluateMomentum();return n?new S({view:this.view,momentum:n}):null}_computePlanePoints(t,i,e,n){n.length=t.size;const s=this._tmp2d;let o=0;return t.forEach(t=>{s[0]=t.x,s[1]=t.y,void 0===n[o]&&(n[o]=_()),G(i,e,s,n[o]),o+=1}),n}get _intersectionHelper(){return this.view.sceneIntersectionHelper}};J=t([n("esri.views.3d.state.controllers.PinchAndPanControllerLocal")],J);export{J as PinchAndPanControllerLocal};
5
+ import{__decorate as t}from"tslib";import{createScreenPointArray as i,screenPointObjectToArray as e}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{distance as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{u as o,d as r,f as a,e as m,b as h,n as l,h as c,g as p}from"../../../../chunks/vec32.js";import{create as _,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{wrapAxisAngle as g}from"../../../../geometry/support/axisAngle.js";import{create as d,fromNormalAndOffset as C,setOffsetFromPoint as v,negate as b,getNormal as w}from"../../../../geometry/support/plane.js";import{pixelDistanceToInteractionFactor as M,applyAll as f}from"../../camera/constraintUtils.js";import{ConstraintOptions as j}from"../../camera/constraintUtils/ConstraintOptions.js";import{ExponentialFalloff as P}from"../../input/util.js";import{getVoxelWasm as V}from"../../layers/VoxelWasm.js";import{InteractiveController as z}from"./InteractiveController.js";import{PanPlanarMomentumController as S}from"./momentum/PanPlanarMomentumController.js";import{RotationMomentumController as E}from"./momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as H}from"./momentum/ZoomPlanarMomentumController.js";import{excludeTerrain as y,inferNavigationMode as x,getTiltScaleFactor as O,maxPanDistanceModifier as F,minPinchAndPanCameraHeight as R,pivotSearchAreaSize as A,centroid as T,applyZoomToPoint as U,applyPanPlanar as L,normalizeRotationDelta as k,applyRotation as D,intersectPlaneFromScreenPointAtEye as G}from"../utils/navigationUtils.js";import I from"../../webgl/RenderCamera.js";import{PanPlanarMomentumEstimator as Z}from"../../../navigation/PanPlanarMomentumEstimator.js";import{RotationMomentumEstimator as W}from"../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as q}from"../../../navigation/ZoomMomentumEstimator.js";const B=u(0,0,1);let J=class extends z{constructor(){super(...arguments),this._rotationValueSmooth=new P(.05),this._scalingValueSmooth=new P(.05),this._planeHorizontal=d(),this._planeVertical=d(),this._rotationMomentumEstimator=new W,this._panMomentumEstimator=new Z(300,12,.9),this._zoomMomentumEstimator=new q,this._beginRadius=0,this._beginCenter=_(),this._beginAngle=0,this._tmpPoints=[],this._navigationMode=1,this._beginCenterScreen=i(),this._tmpCentroid3d=_(),this._tmpCentroid2d=i(),this._tmp2d=i(),this._pointerCount=0,this._beginCamera=new I,this._constraintOptions=new j(15,0,0,this._beginCamera)}begin(t){if(!this.running)return;const i=this.view.navigation.momentumEnabled;this._zoomMomentumEstimator.enabled=i,this._rotationMomentumEstimator.enabled=i,this._panMomentumEstimator.enabled=i,this._beginRadius=t.radius,this._pointerCount=t.pointers.size,this._beginAngle=t.angle,this._rotationValueSmooth.reset(),this._scalingValueSmooth.reset(),e(t.center,this._beginCenterScreen),C(B,0,this._planeHorizontal);const n=_(),s=this._intersectionHelper.intersectScreenFreePointFallback(this._beginCenterScreen,n,this.view.basemapTerrain.invisible?y:{}),u=_();o(u,this.startCamera.viewForward);const g=_();r(g,B);const d=a(u,g);this._navigationMode=x(this.startCamera,this._beginCenterScreen,this.view.renderCoordsHelper,this.view.viewingMode);const M=O(g,this.startCamera.viewForward,F)*Math.max(Math.abs(this.view.camera.position.z),R);v(this._planeHorizontal,this._planeHorizontal,n),this.startCamera.aboveGround||b(this._planeHorizontal,this._planeHorizontal);const f=_(),j=_(),P=_();m(f,n,this.currentCamera.eye);const z=h(f);if(l(f,f),0===this._navigationMode){c(g,g,d),m(w(this._planeVertical),u,g),l(w(this._planeVertical),w(this._planeVertical)),v(this._planeVertical,this._planeVertical,n);const i=this.view.stage.renderView.getMinimalDepthForArea(V(this.view),this._beginCenterScreen[0],this._beginCenterScreen[1],this.view.state.camera,A);let e=null!=i?i:M;s&&(e=Math.min(e,z)),r(P,p(j,this.currentCamera.eye,c(j,f,e))),this._planeVertical[3]=-a(w(this._planeVertical),P),this._computePlanePoints(t.pointers,this._planeVertical,this.startCamera,this._tmpPoints),T(this._tmpPoints,this._beginCenter)}else{const i=s?z:M;r(P,p(j,this.currentCamera.eye,c(j,f,i))),this._planeHorizontal[3]=-a(w(this._planeHorizontal),P),this._computePlanePoints(t.pointers,this._planeHorizontal,this.startCamera,this._tmpPoints),T(this._tmpPoints,this._beginCenter)}this._beginCamera.copyFrom(this.startCamera)}update(t){if(!this.running)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1,n=1===this._navigationMode?this._planeHorizontal:this._planeVertical,o=this._beginCenter;if(i){const i=this._beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this._scalingValueSmooth.gain=e,this._scalingValueSmooth.update(i),U(this.currentCamera,o,this._scalingValueSmooth.value,this.view.state.constraints.minimumPoiDistance),this._zoomMomentumEstimator.add(this._scalingValueSmooth.value,.001*t.timestamp),this._constraintOptions.interactionType=1,this._constraintOptions.interactionFactor=M(Math.abs(t.radius-this._beginRadius)),f(this.view,this.currentCamera,this._constraintOptions)}if(this._computePlanePoints(t.pointers,n,this.currentCamera,this._tmpPoints),T(this._tmpPoints,this._tmpCentroid3d),e(t.center,this._tmpCentroid2d),L(this.currentCamera,o,this._tmpCentroid3d),this._panMomentumEstimator.add(this._tmpCentroid2d,this._tmpCentroid3d,.001*t.timestamp),this._constraintOptions.interactionType=4,this._constraintOptions.interactionFactor=M(s(this._beginCenterScreen,this._tmpCentroid2d)),f(this.view,this.currentCamera,this._constraintOptions),i){const i=o,e=this._rotationValueSmooth.value,n=e+k(t.angle-e),s=.00125*Math.min(Math.max(t.radius,40),120);this._rotationValueSmooth.gain=s,this._rotationValueSmooth.update(n);const r=this._rotationValueSmooth.value-this._beginAngle;this._rotationMomentumEstimator.add(r,.001*t.timestamp);const a=w(this._planeHorizontal);D(this.currentCamera,i,g(a,r)),this._constraintOptions.interactionType=2,this._constraintOptions.interactionFactor=M(Math.abs(t.radius*r)),f(this.view,this.currentCamera,this._constraintOptions)}this.commitCamera()}end(t){t.pointers.size===this._pointerCount&&this.update(t),this.finishController();const i=this._zoomMomentumEstimator.evaluateMomentum();if(i)return new H({view:this.view,momentum:i,zoomCenter:this._beginCenter});const e=this._rotationMomentumEstimator.evaluateMomentum();if(e)return new E({view:this.view,momentum:e,center:this._beginCenter,axis:w(this._planeHorizontal)});const n=this._panMomentumEstimator.evaluateMomentum();return n?new S({view:this.view,momentum:n}):null}_computePlanePoints(t,i,e,n){n.length=t.size;const s=this._tmp2d;let o=0;return t.forEach(t=>{s[0]=t.x,s[1]=t.y,void 0===n[o]&&(n[o]=_()),G(i,e,s,n[o]),o+=1}),n}get _intersectionHelper(){return this.view.sceneIntersectionHelper}};J=t([n("esri.views.3d.state.controllers.PinchAndPanControllerLocal")],J);export{J as PinchAndPanControllerLocal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{acosClamped as i,clamp as s}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as a,rotate as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as p}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as c,e as l,b as _,n as v,g as f,h as P,f as u,i as w,t as C}from"../../../../chunks/vec32.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{applyAll as g}from"../../camera/constraintUtils.js";import{ConstraintOptions as j}from"../../camera/constraintUtils/ConstraintOptions.js";import{getVoxelWasm as x}from"../../layers/VoxelWasm.js";import{TiltRange as y}from"../Constraints.js";import{InteractiveController as b}from"./InteractiveController.js";import{excludeTerrain as R,normalizeCoordinate as M,getTiltScaleFactor as U,maxRotatePivotDistanceModifier as V,minRotatePivotDistance as D,navigationMode as O,rotatePivotSearchAreaSize as T}from"../utils/navigationUtils.js";let A=class extends b{get _intersectionHelper(){return this.view.sceneIntersectionHelper}constructor(t){super(t),this.pivot=0,this._rotScale=0,this._lastPoint=m(),this._tmpWorldUp=d(),this._tmpViewDir=d(),this._tmpRotCurPoint=m(),this._tmpTransf=h(),this._tmpAxis=d(),this._tmpPivotPoint=d(),this._pivotPos=d(),this._constraintOptions=new j(15,2,0,this.startCamera)}initialize(){this._rotScale=0===this.pivot?3:1.5}begin(t){if(this.running){switch(this.pivot){case 1:c(this._pivotPos,this.startCamera.eye),this._constraintOptions.interactionType=3,this._constraintOptions.tiltMode=1,this._constraintOptions.selection=0;break;case 0:{const i=this._intersectionHelper.intersectRayFreePointFallback(this.startCamera.ray,this._pivotPos,this.view.basemapTerrain.invisible?R:{});i||c(this._pivotPos,this.startCamera.center),this._constrainPivotPoint(t,i),this.startCamera.center=this._pivotPos,this._constraintOptions.interactionType=2,this._constraintOptions.tiltMode=0,this._constraintOptions.selection=11;break}}M(this.startCamera,t,this._lastPoint)}}_constrainPivotPoint(t,i){const s=this.startCamera,o=d();l(o,this._pivotPos,s.eye);const e=_(o),a=Math.abs(this.view.camera.position.z);this.view.renderCoordsHelper.worldUpAtPosition(s.eye,S);let n=Math.max(U(S,s.viewForward,V)*a,D);i&&(n=Math.min(e,n));const h=r(s.width/s.pixelRatio*.5,s.height/s.pixelRatio*.5),p=O(this.startCamera,h,this.view.renderCoordsHelper,this.view.viewingMode);let m=this.view.stage.renderView.getMinimalDepthForArea(x(this.view),s.fullWidth/s.pixelRatio*.5,s.fullHeight/s.pixelRatio*.5,s,2.5*T,T),u=this.view.stage.renderView.getMinimalDepthForArea(x(this.view),t[0],t[1],s,T);null==m&&null==u||(m=m??u??0,u=null==u||1===p?m:u,n=m>u?u:m,n=i?Math.min(n,e):n),v(o,o),c(this._pivotPos,f(this._tmpPivotPoint,s.eye,P(this._tmpPivotPoint,o,n)))}update(t){if(this.running){switch(this.pivot){case 1:this.currentCamera.center=this._applyRotation(this.currentCamera,t,this.currentCamera.center,this._pivotPos);break;case 0:this.currentCamera.center=this._pivotPos,this.currentCamera.eye=this._applyRotation(this.currentCamera,t,this.currentCamera.eye,this._pivotPos)}g(this.view,this.currentCamera,this._constraintOptions),this.commitCamera()}}end(){this.running&&this.finishController()}_applyRotation(t,r,o,e){this.view.renderCoordsHelper.worldUpAtPosition(e,this._tmpWorldUp),M(t,r,this._tmpRotCurPoint);let h=(this._lastPoint[1]-this._tmpRotCurPoint[1])*this._rotScale,m=(this._tmpRotCurPoint[0]-this._lastPoint[0])*this._rotScale;l(this._tmpViewDir,o,e);const c=_(this._tmpViewDir),v=i(u(this._tmpViewDir,this._tmpWorldUp)/c);if(1===this.pivot){h*=-.5;const t=.5*Math.PI-v,i=.5*Math.PI*.99;h=t-Math.max(-i,Math.min(i,t+h))}return h=s(h+v,y.min,y.max)-v,w(this._tmpAxis,t.up,this._tmpViewDir),0===this.pivot&&(m=-m),a(this._tmpTransf,m,this._tmpWorldUp),n(this._tmpTransf,this._tmpTransf,h,this._tmpAxis),C(this._tmpViewDir,this._tmpViewDir,this._tmpTransf),t.up=C(H,t.up,this._tmpTransf),f(H,e,this._tmpViewDir),p(this._lastPoint,this._tmpRotCurPoint),H}};t([o()],A.prototype,"pivot",void 0),A=t([e("esri.views.3d.state.controllers.RotateController")],A);const H=d(),S=d();export{A as RotateController};
5
+ import{__decorate as t}from"tslib";import{acosClamped as i,clamp as s}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as a,rotate as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as p}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as c,e as l,b as _,n as v,g as f,h as P,f as u,i as w,t as C}from"../../../../chunks/vec32.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{applyAll as g}from"../../camera/constraintUtils.js";import{ConstraintOptions as j}from"../../camera/constraintUtils/ConstraintOptions.js";import{getVoxelWasm as x}from"../../layers/VoxelWasm.js";import{TiltRange as y}from"../Constraints.js";import{InteractiveController as b}from"./InteractiveController.js";import{excludeTerrain as R,normalizeCoordinate as M,getTiltScaleFactor as U,maxRotatePivotDistanceModifier as V,minRotatePivotDistance as D,inferNavigationMode as O,rotatePivotSearchAreaSize as T}from"../utils/navigationUtils.js";let A=class extends b{get _intersectionHelper(){return this.view.sceneIntersectionHelper}constructor(t){super(t),this.pivot=0,this._rotScale=0,this._lastPoint=m(),this._tmpWorldUp=d(),this._tmpViewDir=d(),this._tmpRotCurPoint=m(),this._tmpTransf=h(),this._tmpAxis=d(),this._tmpPivotPoint=d(),this._pivotPos=d(),this._constraintOptions=new j(15,2,0,this.startCamera)}initialize(){this._rotScale=0===this.pivot?3:1.5}begin(t){if(this.running){switch(this.pivot){case 1:c(this._pivotPos,this.startCamera.eye),this._constraintOptions.interactionType=3,this._constraintOptions.tiltMode=1,this._constraintOptions.selection=0;break;case 0:{const i=this._intersectionHelper.intersectRayFreePointFallback(this.startCamera.ray,this._pivotPos,this.view.basemapTerrain.invisible?R:{});i||c(this._pivotPos,this.startCamera.center),this._constrainPivotPoint(t,i),this.startCamera.center=this._pivotPos,this._constraintOptions.interactionType=2,this._constraintOptions.tiltMode=0,this._constraintOptions.selection=11;break}}M(this.startCamera,t,this._lastPoint)}}_constrainPivotPoint(t,i){const s=this.startCamera,o=d();l(o,this._pivotPos,s.eye);const e=_(o),a=Math.abs(this.view.camera.position.z);this.view.renderCoordsHelper.worldUpAtPosition(s.eye,S);let n=Math.max(U(S,s.viewForward,V)*a,D);i&&(n=Math.min(e,n));const h=r(s.width/s.pixelRatio*.5,s.height/s.pixelRatio*.5),p=O(this.startCamera,h,this.view.renderCoordsHelper,this.view.viewingMode);let m=this.view.stage.renderView.getMinimalDepthForArea(x(this.view),s.fullWidth/s.pixelRatio*.5,s.fullHeight/s.pixelRatio*.5,s,2.5*T,T),u=this.view.stage.renderView.getMinimalDepthForArea(x(this.view),t[0],t[1],s,T);null==m&&null==u||(m=m??u??0,u=null==u||1===p?m:u,n=m>u?u:m,n=i?Math.min(n,e):n),v(o,o),c(this._pivotPos,f(this._tmpPivotPoint,s.eye,P(this._tmpPivotPoint,o,n)))}update(t){if(this.running){switch(this.pivot){case 1:this.currentCamera.center=this._applyRotation(this.currentCamera,t,this.currentCamera.center,this._pivotPos);break;case 0:this.currentCamera.center=this._pivotPos,this.currentCamera.eye=this._applyRotation(this.currentCamera,t,this.currentCamera.eye,this._pivotPos)}g(this.view,this.currentCamera,this._constraintOptions),this.commitCamera()}}end(){this.running&&this.finishController()}_applyRotation(t,r,o,e){this.view.renderCoordsHelper.worldUpAtPosition(e,this._tmpWorldUp),M(t,r,this._tmpRotCurPoint);let h=(this._lastPoint[1]-this._tmpRotCurPoint[1])*this._rotScale,m=(this._tmpRotCurPoint[0]-this._lastPoint[0])*this._rotScale;l(this._tmpViewDir,o,e);const c=_(this._tmpViewDir),v=i(u(this._tmpViewDir,this._tmpWorldUp)/c);if(1===this.pivot){h*=-.5;const t=.5*Math.PI-v,i=.5*Math.PI*.99;h=t-Math.max(-i,Math.min(i,t+h))}return h=s(h+v,y.min,y.max)-v,w(this._tmpAxis,t.up,this._tmpViewDir),0===this.pivot&&(m=-m),a(this._tmpTransf,m,this._tmpWorldUp),n(this._tmpTransf,this._tmpTransf,h,this._tmpAxis),C(this._tmpViewDir,this._tmpViewDir,this._tmpTransf),t.up=C(H,t.up,this._tmpTransf),f(H,e,this._tmpViewDir),p(this._lastPoint,this._tmpRotCurPoint),H}};t([o()],A.prototype,"pivot",void 0),A=t([e("esri.views.3d.state.controllers.RotateController")],A);const H=d(),S=d();export{A as RotateController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{copy as s,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{n as o,e as h,b as c,h as m,g as p}from"../../../../chunks/vec32.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../../geometry/ellipsoidUtils.js";import{create as u,fromPoints as P}from"../../../../geometry/support/axisAngle.js";import{c as g,a as C}from"../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as d,applyAll as y}from"../../camera/constraintUtils.js";import{ConstraintOptions as f}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as v}from"../../camera/constraintUtils/surfaceCollision.js";import{InteractiveController as R}from"./InteractiveController.js";import{normalizeCoordinate as j,pickPointAndInitSphere as k,excludeTerrain as w,navigationMode as D,zoomPivotDistanceClamp as b,getTiltScaleFactor as A,maxZoomPivotDistanceModifier as M,pivotSearchAreaSize as x,sphereOrPlanePointFromScreenPoint as U,applyRotation as O}from"../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../support/geometryUtils/ray.js";let H=class extends R{constructor(){super(...arguments),this._pickPoint=l(),this._tmpP0=n(),this._panAxisAngle=u(),this._tmpRayDir=l(),this._tmpRayDirPick=l(),this._targetOnSphere=l(),this._navigationMode=1,this._tmpRay={origin:l(),direction:l()},this.dragBeginPoint=r(),this._normalizedAnchorPoint=n(),this._constraintOptions=new f(7,1,0,this.startCamera),this._sphere=g(),this._hasPickPoint=!1}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;s(this.dragBeginPoint,t),j(this.startCamera,t,this._normalizedAnchorPoint);const r=_(this.view.spatialReference),e=k(this._intersectionHelper,this.startCamera,t,r.radius,0,this.view.basemapTerrain.invisible?w:{});if(this._navigationMode=D(this.startCamera,t,this.view.renderCoordsHelper,this.view.viewingMode),1===this._navigationMode)this._hasPickPoint=!!e.scenePickPoint,this._pickPoint=e.scenePickPoint??this._pickPoint,this._sphere=e.sphere;else{let r;z(this.startCamera,t,this._tmpRay),o(this._tmpRay.direction,this._tmpRay.direction),null!=e.scenePickPoint&&(h(this._tmpRayDirPick,this.startCamera.eye,e.scenePickPoint),r=c(this._tmpRayDirPick));const s=Math.abs(this.view.camera.position.z);this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,S);const a=i(A(S,this._tmpRay.direction,M)*s,b[0],b[1]),n=this.view.stage.renderView.getMinimalDepthForArea(null,t[0],t[1],this.view.state.camera,x);let l=null!=n?n:a;null!=r&&(l=Math.min(l,r)),this._hasPickPoint=!0,m(this._tmpRay.direction,this._tmpRay.direction,l),p(this._pickPoint,this._tmpRay.origin,this._tmpRay.direction)}}update(t){if(this.running){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,1===this._navigationMode){h(this._tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const i=c(this._tmpRayDir);j(this.currentCamera,t,this._tmpP0);const r=12*(this._normalizedAnchorPoint[1]-this._tmpP0[1]);let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<1e-6)return;if(this._hasPickPoint&&e<i){const t=1-(1-e/i)*(1-this._sphere[3]/c(this.currentCamera.center));this.currentCamera.center=m(B,this.currentCamera.center,t)}m(this._tmpRayDir,this._tmpRayDir,-e/i),this.currentCamera.eye=p(B,this.currentCamera.center,this._tmpRayDir),this._constraintOptions.interactionFactor=d(a(this.dragBeginPoint,t)),y(this.view,this.currentCamera,this._constraintOptions),this._hasPickPoint&&(U(this._sphere,this.currentCamera,this.dragBeginPoint,this._targetOnSphere),P(this._pickPoint,this._targetOnSphere,this._panAxisAngle),O(this.currentCamera,C(this._sphere),this._panAxisAngle))}else{const i=c(this._tmpRay.direction);j(this.currentCamera,t,this._tmpP0);const r=12*(this._normalizedAnchorPoint[1]-this._tmpP0[1]);let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<1e-6)return;m(this._tmpRayDir,this._tmpRay.direction,1-e/i),this.currentCamera.eye=p(B,this.currentCamera.eye,this._tmpRayDir),this.currentCamera.center=p(B,this.currentCamera.center,this._tmpRayDir)}v(this.view,this.currentCamera),this.commitCamera()}}finish(){this.running&&this.finishController()}};H=t([e("esri.views.3d.state.controllers.ZoomControllerGlobal")],H);const B=l(),S=l();export{H as ZoomControllerGlobal};
5
+ import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{copy as e,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{n as o,e as h,b as c,h as m,g as p}from"../../../../chunks/vec32.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../../geometry/ellipsoidUtils.js";import{create as u,fromPoints as P}from"../../../../geometry/support/axisAngle.js";import{c as C,a as g}from"../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as y,applyAll as d}from"../../camera/constraintUtils.js";import{ConstraintOptions as f}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as R}from"../../camera/constraintUtils/surfaceCollision.js";import{InteractiveController as v}from"./InteractiveController.js";import{normalizeCoordinate as j,pickPointAndInitSphere as D,excludeTerrain as k,inferNavigationMode as w,zoomPivotDistanceClamp as b,getTiltScaleFactor as A,maxZoomPivotDistanceModifier as M,pivotSearchAreaSize as O,distanceComparisonTolerance as x,sphereOrPlanePointFromScreenPoint as U,applyRotation as z}from"../utils/navigationUtils.js";import{fromScreenAtEye as H}from"../../support/geometryUtils/ray.js";const B=12;let S=class extends v{constructor(){super(...arguments),this._pickPoint=_(),this._tmpP0=n(),this._panAxisAngle=u(),this._tmpRayDir=_(),this._tmpRayDirPick=_(),this._targetOnSphere=_(),this._navigationMode=1,this._tmpRay={origin:_(),direction:_()},this.dragBeginPoint=r(),this._normalizedAnchorPoint=n(),this._constraintOptions=new f(7,1,0,this.startCamera),this._sphere=C(),this._hasPickPoint=!1}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;e(this.dragBeginPoint,t),j(this.startCamera,t,this._normalizedAnchorPoint);const r=l(this.view.spatialReference),s=D(this._intersectionHelper,this.startCamera,t,r.radius,0,this.view.basemapTerrain.invisible?k:{});if(this._navigationMode=w(this.startCamera,t,this.view.renderCoordsHelper,this.view.viewingMode),1===this._navigationMode)this._hasPickPoint=!!s.scenePickPoint,this._pickPoint=s.scenePickPoint??this._pickPoint,this._sphere=s.sphere;else{let r;H(this.startCamera,t,this._tmpRay),o(this._tmpRay.direction,this._tmpRay.direction),null!=s.scenePickPoint&&(h(this._tmpRayDirPick,this.startCamera.eye,s.scenePickPoint),r=c(this._tmpRayDirPick));const e=Math.abs(this.view.camera.position.z);this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,G);const a=i(A(G,this._tmpRay.direction,M)*e,b[0],b[1]),n=this.view.stage.renderView.getMinimalDepthForArea(null,t[0],t[1],this.view.state.camera,O);let _=null!=n?n:a;null!=r&&(_=Math.min(_,r)),this._hasPickPoint=!0,m(this._tmpRay.direction,this._tmpRay.direction,_),p(this._pickPoint,this._tmpRay.origin,this._tmpRay.direction)}}update(t){if(this.running){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,1===this._navigationMode){h(this._tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const i=c(this._tmpRayDir);j(this.currentCamera,t,this._tmpP0);const r=(this._normalizedAnchorPoint[1]-this._tmpP0[1])*B;let s=i*2**r;const e=this.view.state.constraints.minimumPoiDistance;if(r<0&&s<e&&(s=e),Math.abs(i-s)<x)return;if(this._hasPickPoint&&s<i){const t=1-(1-s/i)*(1-this._sphere[3]/c(this.currentCamera.center));this.currentCamera.center=m(F,this.currentCamera.center,t)}m(this._tmpRayDir,this._tmpRayDir,-s/i),this.currentCamera.eye=p(F,this.currentCamera.center,this._tmpRayDir),this._constraintOptions.interactionFactor=y(a(this.dragBeginPoint,t)),d(this.view,this.currentCamera,this._constraintOptions),this._hasPickPoint&&(U(this._sphere,this.currentCamera,this.dragBeginPoint,this._targetOnSphere),P(this._pickPoint,this._targetOnSphere,this._panAxisAngle),z(this.currentCamera,g(this._sphere),this._panAxisAngle))}else{const i=c(this._tmpRay.direction);j(this.currentCamera,t,this._tmpP0);const r=(this._normalizedAnchorPoint[1]-this._tmpP0[1])*B;let s=i*2**r;const e=this.view.state.constraints.minimumPoiDistance;if(r<0&&s<e&&(s=e),Math.abs(i-s)<x)return;m(this._tmpRayDir,this._tmpRay.direction,1-s/i),this.currentCamera.eye=p(F,this.currentCamera.eye,this._tmpRayDir),this.currentCamera.center=p(F,this.currentCamera.center,this._tmpRayDir),o(this._tmpRayDir,this._tmpRayDir),this._constraintOptions.interactionDirection=this._tmpRayDir,d(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}R(this.view,this.currentCamera),this.commitCamera()}}finish(){this.running&&this.finishController()}};S=t([s("esri.views.3d.state.controllers.ZoomControllerGlobal")],S);const F=_(),G=_();export{S as ZoomControllerGlobal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{copy as e,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{e as o,b as m,n as h,h as c,g as p,u as _,d as l,l as u}from"../../../../chunks/vec32.js";import{create as P,fromValues as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as C,fromPositionAndNormal as f}from"../../../../geometry/support/plane.js";import{pixelDistanceToInteractionFactor as D,applyAll as j}from"../../camera/constraintUtils.js";import{ConstraintOptions as v}from"../../camera/constraintUtils/ConstraintOptions.js";import{getVoxelWasm as d}from"../../layers/VoxelWasm.js";import{InteractiveController as y}from"./InteractiveController.js";import{normalizeCoordinate as b,excludeTerrain as w,zoomPivotDistanceClamp as N,getTiltScaleFactor as O,maxZoomPivotDistanceModifier as R,pivotSearchAreaSize as x,intersectPlaneFromScreenPoint as M}from"../utils/navigationUtils.js";let z=class extends y{constructor(){super(...arguments),this._tmpP=P(),this._tmpDir=P(),this._tmpN=P(),this._tmpP0=n(),this._tmpPoi=P(),this._tmpRayDir=P(),this.dragBeginPoint=r(),this._normalizedAnchorPoint=n(),this._constraintOptions=new v(15,1,0,this.startCamera,P()),this._plane=C()}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;e(this.dragBeginPoint,t),b(this.startCamera,t,this._normalizedAnchorPoint);const r=this._intersectionHelper.intersectScreenFreePointFallback(t,this._tmpP,this.view.basemapTerrain.invisible?w:{});o(this._tmpDir,this._tmpP,this.startCamera.eye);const s=m(this._tmpDir);h(this._tmpDir,this._tmpDir);const a=Math.abs(this.view.camera.position.z),n=i(O(U,this._tmpDir,R)*a,N[0],N[1]),l=this.view.stage.renderView.getMinimalDepthForArea(d(this.view),t[0],t[1],this.view.state.camera,x);let u=null!=l?l:n;r&&(u=Math.min(u,s)),c(this._tmpDir,this._tmpDir,u),p(this._tmpP,this.startCamera.eye,this._tmpDir),o(this._tmpN,this.startCamera.eye,this.startCamera.center),h(this._tmpN,this._tmpN),this._tmpN[1]<0&&_(this._tmpN,this._tmpN),f(this._tmpP,this._tmpN,this._plane)}update(t){if(!this.running)return;M(this._plane,this.currentCamera,this.dragBeginPoint,this._tmpPoi)||l(this._tmpPoi,this.currentCamera.center),b(this.currentCamera,t,this._tmpP0);let i=4*(this._tmpP0[1]-this._normalizedAnchorPoint[1]);e(this._normalizedAnchorPoint,this._tmpP0),o(this._tmpRayDir,this._tmpPoi,this.currentCamera.eye);const r=m(this._tmpRayDir);let s=r*(1-i);this._constraintOptions.interactionDirection&&(l(this._constraintOptions.interactionDirection,this._tmpRayDir),c(this._constraintOptions.interactionDirection,this._constraintOptions.interactionDirection,Math.sign(i)/r));const n=this.view.state.constraints.minimumPoiDistance;i>=0&&s<n&&(s=n,i=-(s-r)/r),Math.abs(r-s)<1e-6||(c(this._tmpRayDir,this._tmpRayDir,i),this.currentCamera.eye=p(A,this.currentCamera.eye,this._tmpRayDir),u(A,this.currentCamera.center,this._tmpPoi,i),this._tmpPoi[2]>this.startCamera.center[2]?A[2]=Math.max(this.startCamera.center[2],A[2]):A[2]=Math.min(this.startCamera.center[2],A[2]),this.currentCamera.center=A,this._constraintOptions.interactionFactor=D(a(this.dragBeginPoint,t)),j(this.view,this.currentCamera,this._constraintOptions),this.commitCamera())}finish(){this.running&&this.finishController()}};z=t([s("esri.views.3d.state.controllers.ZoomControllerLocal")],z);const A=P(),U=g(0,0,1);export{z as ZoomControllerLocal};
5
+ import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{copy as e,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{e as o,b as m,n as h,h as c,g as p,u as _,d as l,l as u}from"../../../../chunks/vec32.js";import{create as P,fromValues as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as C,fromPositionAndNormal as f}from"../../../../geometry/support/plane.js";import{pixelDistanceToInteractionFactor as D,applyAll as j}from"../../camera/constraintUtils.js";import{ConstraintOptions as v}from"../../camera/constraintUtils/ConstraintOptions.js";import{getVoxelWasm as d}from"../../layers/VoxelWasm.js";import{InteractiveController as y}from"./InteractiveController.js";import{normalizeCoordinate as b,excludeTerrain as w,zoomPivotDistanceClamp as N,getTiltScaleFactor as O,maxZoomPivotDistanceModifier as R,pivotSearchAreaSize as x,intersectPlaneFromScreenPoint as M,distanceComparisonTolerance as z}from"../utils/navigationUtils.js";let A=class extends y{constructor(){super(...arguments),this._tmpP=P(),this._tmpDir=P(),this._tmpN=P(),this._tmpP0=n(),this._tmpPoi=P(),this._tmpRayDir=P(),this.dragBeginPoint=r(),this._normalizedAnchorPoint=n(),this._constraintOptions=new v(15,1,0,this.startCamera,P()),this._plane=C()}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;e(this.dragBeginPoint,t),b(this.startCamera,t,this._normalizedAnchorPoint);const r=this._intersectionHelper.intersectScreenFreePointFallback(t,this._tmpP,this.view.basemapTerrain.invisible?w:{});o(this._tmpDir,this._tmpP,this.startCamera.eye);const s=m(this._tmpDir);h(this._tmpDir,this._tmpDir);const a=Math.abs(this.view.camera.position.z),n=i(O(B,this._tmpDir,R)*a,N[0],N[1]),l=this.view.stage.renderView.getMinimalDepthForArea(d(this.view),t[0],t[1],this.view.state.camera,x);let u=null!=l?l:n;r&&(u=Math.min(u,s)),c(this._tmpDir,this._tmpDir,u),p(this._tmpP,this.startCamera.eye,this._tmpDir),o(this._tmpN,this.startCamera.eye,this.startCamera.center),h(this._tmpN,this._tmpN),this._tmpN[1]<0&&_(this._tmpN,this._tmpN),f(this._tmpP,this._tmpN,this._plane)}update(t){if(!this.running)return;M(this._plane,this.currentCamera,this.dragBeginPoint,this._tmpPoi)||l(this._tmpPoi,this.currentCamera.center),b(this.currentCamera,t,this._tmpP0);let i=4*(this._tmpP0[1]-this._normalizedAnchorPoint[1]);e(this._normalizedAnchorPoint,this._tmpP0),o(this._tmpRayDir,this._tmpPoi,this.currentCamera.eye);const r=m(this._tmpRayDir);let s=r*(1-i);this._constraintOptions.interactionDirection&&(l(this._constraintOptions.interactionDirection,this._tmpRayDir),c(this._constraintOptions.interactionDirection,this._constraintOptions.interactionDirection,Math.sign(i)/r));const n=this.view.state.constraints.minimumPoiDistance;i>=0&&s<n&&(s=n,i=-(s-r)/r),Math.abs(r-s)<z||(c(this._tmpRayDir,this._tmpRayDir,i),this.currentCamera.eye=p(U,this.currentCamera.eye,this._tmpRayDir),u(U,this.currentCamera.center,this._tmpPoi,i),this._tmpPoi[2]>this.startCamera.center[2]?U[2]=Math.max(this.startCamera.center[2],U[2]):U[2]=Math.min(this.startCamera.center[2],U[2]),this.currentCamera.center=U,this._constraintOptions.interactionFactor=D(a(this.dragBeginPoint,t)),j(this.view,this.currentCamera,this._constraintOptions),this.commitCamera())}finish(){this.running&&this.finishController()}};A=t([s("esri.views.3d.state.controllers.ZoomControllerLocal")],A);const U=P(),B=g(0,0,1);export{A as ZoomControllerLocal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{Milliseconds as e}from"../../../../core/time.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as s,n as o,h as a,b as n,e as m,g as h,s as p}from"../../../../chunks/vec32.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as _}from"../../../../geometry/support/ray.js";import{c as l}from"../../../../chunks/sphere.js";import{applyAll as y}from"../../camera/constraintUtils.js";import{ConstraintOptions as g}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as w}from"../../camera/constraintUtils/surfaceCollision.js";import{PointToPointAnimationController as d}from"./PointToPointAnimationController.js";import{excludeTerrain as f,navigationMode as C,zoomStepDistanceClamp as u,getTiltScaleFactor as D,panToPosition as j,maxZoomStepDistanceModifier as v}from"../utils/navigationUtils.js";import{fromScreenAtEye as b}from"../../support/geometryUtils/ray.js";import{intersectScreen as R}from"../../support/geometryUtils/sphere.js";import M from"../../webgl/RenderCamera.js";import{Intersector as V}from"../../webgl-engine/lib/Intersector.js";import{outExpo as z}from"../../../animation/easing.js";const L=.6,S=4,U=60;let O=class extends d{constructor(){super(...arguments),this._zoomLocation=c(),this._tmpCamera=new M,this._tmpViewDir=c(),this._tmpRayDir=_(),this._targetOnSphere=c(),this._tmpCenter=c(),this._beginCamera=new M,this._constraintOptions=new g(7,1,null,this._beginCamera),this._sphere=l()}initialize(){this._intersector=new V(this.view.state.viewingMode)}step(t,i){if(!this.running)return;const e=this.view.state;this.animation.finished?this._beginCamera.copyFrom(e.camera):this.animation.cameraAt(1,this._beginCamera);let r=!1,o=!1;this._intersectionHelper.intersectScreen(i,this._zoomLocation,0===this.view.map.ground.opacity?f:{})&&(r=t>0,o=!0),this._tmpCamera.copyFrom(e.camera),r?this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._tmpCenter)&&(this._tmpCamera.center=this._tmpCenter):this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._zoomLocation)?this._tmpCamera.center=this._zoomLocation:s(this._zoomLocation,this._tmpCamera.center),this._updateCamera(this._tmpCamera,t,i,o),this.begin(this._tmpCamera)}animationSettings(){return{duration:e(600),easing:z}}_updateCamera(t,e,r,s){const c=C(t,r,this.view.renderCoordsHelper,this.view.viewingMode),_=Math.abs(this.view.camera.position.z),l=this._zoomLocation;o(F,t.eye),a(F,F,-1),b(t,r,this._tmpRayDir),o(this._tmpRayDir.direction,this._tmpRayDir.direction);const g=i(D(F,this._tmpRayDir.direction,v)*_,u[0],u[1]);if(1===c){let i=L**e;this._sphere[3]=n(l),m(this._tmpViewDir,t.center,t.eye);const s=Math.min(n(this._tmpViewDir),g);let o=s*i;if(i<=1&&o<S&&(o=S,i=o/s),Math.abs(s-o)<1e-6)return;const c=n(t.center);if(this._sphere[3]!==c){const e=this._sphere[3]+i*(c-this._sphere[3]);t.center=a(x,t.center,e/c)}a(this._tmpViewDir,this._tmpViewDir,-i),t.eye=h(x,t.center,this._tmpViewDir),y(this.view,t,this._constraintOptions),p(l,t.center)>1e-12&&R(this._sphere,t,r,this._targetOnSphere)&&j(this._sphere,t,l,this._targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let i=L**Math.abs(e);const o=e>0?1:-1;m(this._tmpViewDir,l,t.eye);const p=n(this._tmpViewDir),c=this.view.stage.renderView.getMinimalDepthForArea(null,r[0],r[1],this.view.state.camera,U);let _=null!=c?c:g;s&&e>0&&(_=Math.min(_,p)),a(this._tmpRayDir.direction,this._tmpRayDir.direction,_),h(l,this._tmpRayDir.origin,this._tmpRayDir.direction);let y=_*i;const w=Math.max(S,1.01*t.nearFar[0]);if(e>0&&y<w&&(y=w,i=y/_),Math.abs(_-y)<1e-6)return;a(this._tmpRayDir.direction,this._tmpRayDir.direction,o*(1-i)),t.eye=h(x,t.eye,this._tmpRayDir.direction),t.center=h(x,t.center,this._tmpRayDir.direction)}w(this.view,t)}};O=t([r("esri.views.3d.state.controllers.ZoomStepControllerGlobal")],O);const x=c(),F=c();export{O as ZoomStepControllerGlobal};
5
+ import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{Milliseconds as e}from"../../../../core/time.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as s,n as o,h as a,b as n,e as m,g as h,s as c}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as _}from"../../../../geometry/support/ray.js";import{c as l}from"../../../../chunks/sphere.js";import{applyAll as y}from"../../camera/constraintUtils.js";import{ConstraintOptions as w}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as d}from"../../camera/constraintUtils/surfaceCollision.js";import{PointToPointAnimationController as g}from"./PointToPointAnimationController.js";import{excludeTerrain as f,inferNavigationMode as D,zoomStepDistanceClamp as C,getTiltScaleFactor as u,distanceComparisonTolerance as j,panToPosition as R,maxZoomStepDistanceModifier as v}from"../utils/navigationUtils.js";import{fromScreenAtEye as b}from"../../support/geometryUtils/ray.js";import{intersectScreen as M}from"../../support/geometryUtils/sphere.js";import O from"../../webgl/RenderCamera.js";import{Intersector as V}from"../../webgl-engine/lib/Intersector.js";import{outExpo as z}from"../../../animation/easing.js";const L=.6,S=4,U=60;let x=class extends g{constructor(){super(...arguments),this._zoomLocation=p(),this._tmpCamera=new O,this._tmpViewDir=p(),this._tmpRayDir=_(),this._targetOnSphere=p(),this._tmpCenter=p(),this._beginCamera=new O,this._constraintOptions=new w(7,1,null,this._beginCamera),this._sphere=l()}initialize(){this._intersector=new V(this.view.state.viewingMode)}step(t,i){if(!this.running)return;const e=this.view.state;this.animation.finished?this._beginCamera.copyFrom(e.camera):this.animation.cameraAt(1,this._beginCamera);let r=!1,o=!1;this._intersectionHelper.intersectScreen(i,this._zoomLocation,0===this.view.map.ground.opacity?f:{})&&(r=t>0,o=!0),this._tmpCamera.copyFrom(e.camera),r?this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._tmpCenter)&&(this._tmpCamera.center=this._tmpCenter):this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._zoomLocation)?this._tmpCamera.center=this._zoomLocation:s(this._zoomLocation,this._tmpCamera.center),this._updateCamera(this._tmpCamera,t,i,o),this.begin(this._tmpCamera)}animationSettings(){return{duration:e(600),easing:z}}_updateCamera(t,e,r,s){const p=D(t,r,this.view.renderCoordsHelper,this.view.viewingMode),_=Math.abs(this.view.camera.position.z),l=this._zoomLocation;o(H,t.eye),a(H,H,-1),b(t,r,this._tmpRayDir),o(this._tmpRayDir.direction,this._tmpRayDir.direction);const w=i(u(H,this._tmpRayDir.direction,v)*_,C[0],C[1]);if(1===p){let i=L**e;this._sphere[3]=n(l),m(this._tmpViewDir,t.center,t.eye);const s=Math.min(n(this._tmpViewDir),w);let o=s*i;if(i<=1&&o<S&&(o=S,i=o/s),Math.abs(s-o)<j)return;const p=n(t.center);if(this._sphere[3]!==p){const e=this._sphere[3]+i*(p-this._sphere[3]);t.center=a(F,t.center,e/p)}a(this._tmpViewDir,this._tmpViewDir,-i),t.eye=h(F,t.center,this._tmpViewDir),y(this.view,t,this._constraintOptions),c(l,t.center)>1e-12&&M(this._sphere,t,r,this._targetOnSphere)&&R(this._sphere,t,l,this._targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let i=L**Math.abs(e);const c=e>0?1:-1;m(this._tmpViewDir,l,t.eye);const p=n(this._tmpViewDir),_=this.view.stage.renderView.getMinimalDepthForArea(null,r[0],r[1],this.view.state.camera,U);let d=null!=_?_:w;s&&e>0&&(d=Math.min(d,p)),a(this._tmpRayDir.direction,this._tmpRayDir.direction,d),h(l,this._tmpRayDir.origin,this._tmpRayDir.direction);let g=d*i;const f=Math.max(S,1.01*t.nearFar[0]);if(e>0&&g<f&&(g=f,i=g/d),Math.abs(d-g)<j)return;a(this._tmpRayDir.direction,this._tmpRayDir.direction,c*(1-i)),t.eye=h(F,t.eye,this._tmpRayDir.direction),t.center=h(F,t.center,this._tmpRayDir.direction),o(this._tmpRayDir.direction,this._tmpRayDir.direction),this._constraintOptions.interactionDirection=this._tmpRayDir.direction,y(this.view,t,this._constraintOptions),this._constraintOptions.interactionDirection=null}d(this.view,t)}};x=t([r("esri.views.3d.state.controllers.ZoomStepControllerGlobal")],x);const F=p(),H=p();export{x as ZoomStepControllerGlobal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{Milliseconds as e}from"../../../../core/time.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as r,e as o,n as a,b as m,g as n,h as c,l as h}from"../../../../chunks/vec32.js";import{create as p,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{applyAll as l}from"../../camera/constraintUtils.js";import{ConstraintOptions as C}from"../../camera/constraintUtils/ConstraintOptions.js";import{getVoxelWasm as g}from"../../layers/VoxelWasm.js";import{PointToPointAnimationController as f}from"./PointToPointAnimationController.js";import{excludeTerrain as y,zoomStepDistanceClamp as b,getTiltScaleFactor as j,maxZoomStepDistanceModifier as w}from"../utils/navigationUtils.js";import u from"../../webgl/RenderCamera.js";import{Intersector as v}from"../../webgl-engine/lib/Intersector.js";import{outExpo as d}from"../../../animation/easing.js";const L=.6,z=4,R=60;let D=class extends f{constructor(){super(...arguments),this._zoomLocation=p(),this._tmpCamera=new u,this._tmpRayDir=p(),this._tmpCenter=p(),this._beginCamera=new u,this._constraintOptions=new C(15,1,null,this._beginCamera)}step(t,e){if(!this.running)return;const s=this.view.state;this.animation.finished?this._beginCamera.copyFrom(s.camera):this.animation.cameraAt(1,this._beginCamera),this._tmpCamera.copyFrom(s.camera);const h=new v(this.view.state.viewingMode);let _=!1;t>0?(_=this._intersectionHelper.intersectScreenFreePointFallback(e,this._zoomLocation,this.view.basemapTerrain.invisible?y:{}),this._intersectionHelper.intersectRay(this._tmpCamera.ray,h,this._tmpCenter)&&(this._tmpCamera.center=this._tmpCenter)):this._intersectionHelper.intersectRay(this._tmpCamera.ray,h,this._zoomLocation)?this._tmpCamera.center=this._zoomLocation:r(this._zoomLocation,this._tmpCamera.center);const l=L**t;let C=this.view.stage.renderView.getMinimalDepthForArea(g(this.view),e[0],e[1],this.view.state.camera,R);o(M,this._tmpCamera.eye,this._zoomLocation),a(M,M);const f=Math.abs(this.view.camera.position.z),u=i(j(x,M,w)*f,b[0],b[1]);C=null!=C?C:u;const d=p();o(d,this._zoomLocation,this._tmpCamera.eye),(C<m(d)||!_)&&(a(d,d),n(this._zoomLocation,this._tmpCamera.eye,c(d,d,C))),this._updateCamera(this._tmpCamera,l,this._zoomLocation),this.begin(this._tmpCamera)}animationSettings(){return{duration:e(600),easing:d}}_updateCamera(t,i,e){o(this._tmpRayDir,e,t.eye);const s=m(this._tmpRayDir);let r=s*i;const a=i<=1,n=Math.max(z,1.01*t.nearFar[0]);0!==r&&(a&&r<n&&(r=n,i=r/s),Math.abs(s-r)<1e-6||(c(this._tmpRayDir,this._tmpRayDir,i),t.eye=o(F,e,this._tmpRayDir),t.center=h(F,t.center,e,1-i),l(this.view,t,this._constraintOptions)))}};D=t([s("esri.views.3d.state.controllers.ZoomStepControllerLocal")],D);const F=p(),x=_(0,0,1),M=p();export{D as ZoomStepControllerLocal};
5
+ import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{Milliseconds as e}from"../../../../core/time.js";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as r,e as o,n as a,b as m,g as n,h as c,l as h}from"../../../../chunks/vec32.js";import{create as p,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{applyAll as l}from"../../camera/constraintUtils.js";import{ConstraintOptions as C}from"../../camera/constraintUtils/ConstraintOptions.js";import{getVoxelWasm as g}from"../../layers/VoxelWasm.js";import{PointToPointAnimationController as f}from"./PointToPointAnimationController.js";import{excludeTerrain as y,zoomStepDistanceClamp as b,getTiltScaleFactor as j,maxZoomStepDistanceModifier as w,distanceComparisonTolerance as u}from"../utils/navigationUtils.js";import v from"../../webgl/RenderCamera.js";import{Intersector as d}from"../../webgl-engine/lib/Intersector.js";import{outExpo as L}from"../../../animation/easing.js";const z=.6,R=4,D=60;let F=class extends f{constructor(){super(...arguments),this._zoomLocation=p(),this._tmpCamera=new v,this._tmpRayDir=p(),this._tmpCenter=p(),this._beginCamera=new v,this._constraintOptions=new C(15,1,null,this._beginCamera)}step(t,e){if(!this.running)return;const s=this.view.state;this.animation.finished?this._beginCamera.copyFrom(s.camera):this.animation.cameraAt(1,this._beginCamera),this._tmpCamera.copyFrom(s.camera);const h=new d(this.view.state.viewingMode);let _=!1;t>0?(_=this._intersectionHelper.intersectScreenFreePointFallback(e,this._zoomLocation,this.view.basemapTerrain.invisible?y:{}),this._intersectionHelper.intersectRay(this._tmpCamera.ray,h,this._tmpCenter)&&(this._tmpCamera.center=this._tmpCenter)):this._intersectionHelper.intersectRay(this._tmpCamera.ray,h,this._zoomLocation)?this._tmpCamera.center=this._zoomLocation:r(this._zoomLocation,this._tmpCamera.center);const l=z**t;let C=this.view.stage.renderView.getMinimalDepthForArea(g(this.view),e[0],e[1],this.view.state.camera,D);o(S,this._tmpCamera.eye,this._zoomLocation),a(S,S);const f=Math.abs(this.view.camera.position.z),u=i(j(M,S,w)*f,b[0],b[1]);C=null!=C?C:u;const v=p();o(v,this._zoomLocation,this._tmpCamera.eye),(C<m(v)||!_)&&(a(v,v),n(this._zoomLocation,this._tmpCamera.eye,c(v,v,C))),this._updateCamera(this._tmpCamera,l,this._zoomLocation),this.begin(this._tmpCamera)}animationSettings(){return{duration:e(600),easing:L}}_updateCamera(t,i,e){o(this._tmpRayDir,e,t.eye);const s=m(this._tmpRayDir);let r=s*i;const a=i<=1,n=Math.max(R,1.01*t.nearFar[0]);0!==r&&(a&&r<n&&(r=n,i=r/s),Math.abs(s-r)<u||(c(this._tmpRayDir,this._tmpRayDir,i),t.eye=o(x,e,this._tmpRayDir),t.center=h(x,t.center,e,1-i),l(this.view,t,this._constraintOptions)))}};F=t([s("esri.views.3d.state.controllers.ZoomStepControllerLocal")],F);const x=p(),M=_(0,0,1),S=p();export{F as ZoomStepControllerLocal};