@arcgis/core 5.2.0-next.127 → 5.2.0-next.129

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 (405) hide show
  1. package/WebScene.js +1 -1
  2. package/applications/Components/imageryUtils.js +1 -1
  3. package/applications/SceneViewer/sceneViewerUtils.d.ts +14 -1
  4. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  5. package/applications/WebEditor/sketchUtils.js +1 -1
  6. package/arcade/batchExec.js +1 -1
  7. package/arcade/geometry/adapters/dehydrated.js +1 -1
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/06da350b4ea25732f52b.js +1 -0
  10. package/assets/esri/core/workers/chunks/{67dcf9b873cb037b2647.js → 081c9ccaa5884c730a91.js} +1 -1
  11. package/assets/esri/core/workers/chunks/094102031cc77b20db74.js +1 -0
  12. package/assets/esri/core/workers/chunks/0b85c844af97b2fb0ba8.js +1 -0
  13. package/assets/esri/core/workers/chunks/{86d7a3ae672a51b75fcc.js → 0d44f793d3b0d33153ac.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0de140199161fcd15a0c.js +1 -0
  15. package/assets/esri/core/workers/chunks/0deceece4b465f653f58.js +1 -0
  16. package/assets/esri/core/workers/chunks/111dc5653daa7f3e1001.js +1 -0
  17. package/assets/esri/core/workers/chunks/139e3da8ea081e21539e.js +1 -0
  18. package/assets/esri/core/workers/chunks/142bedebd37d747f84ba.js +1 -0
  19. package/assets/esri/core/workers/chunks/15dc28b4fa5b5110472b.js +1 -0
  20. package/assets/esri/core/workers/chunks/{dd02cc18ebebb90778c6.js → 17e2bfc7468c23e43bef.js} +1 -1
  21. package/assets/esri/core/workers/chunks/196d33f4d8e3a256ad94.js +1 -0
  22. package/assets/esri/core/workers/chunks/1a02c68de65a67ab6a67.js +1 -0
  23. package/assets/esri/core/workers/chunks/{4165eb86471ea3bbf364.js → 1aecf7106a21320e054e.js} +1 -1
  24. package/assets/esri/core/workers/chunks/1bc03b8065cbbbb06c87.js +1 -0
  25. package/assets/esri/core/workers/chunks/1beb32170d659bc43977.js +1 -0
  26. package/assets/esri/core/workers/chunks/20ee32fee219afbcfee3.js +1 -0
  27. package/assets/esri/core/workers/chunks/{9467744cb7d094a5067a.js → 21d2f5324db0b199060c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/22abb9a74f6594f9db2a.js +1 -0
  29. package/assets/esri/core/workers/chunks/237795866c075880531b.js +1 -0
  30. package/assets/esri/core/workers/chunks/25e4da9c6837ab0fa585.js +1 -0
  31. package/assets/esri/core/workers/chunks/2a5fde737dc99627142e.js +1 -0
  32. package/assets/esri/core/workers/chunks/3412050ae63ff7dcaf36.js +1 -0
  33. package/assets/esri/core/workers/chunks/35316724c8d3cc39cf80.js +1 -0
  34. package/assets/esri/core/workers/chunks/354cc6cd2a56937f1747.js +1 -0
  35. package/assets/esri/core/workers/chunks/365ae479765ca9e47de4.js +1 -0
  36. package/assets/esri/core/workers/chunks/{8190fcb1dd10ad20feed.js → 36ef86701883a20dd6f6.js} +1 -1
  37. package/assets/esri/core/workers/chunks/3759e272a1d43534a190.js +1 -0
  38. package/assets/esri/core/workers/chunks/397ddcf0b8e858a17b70.js +1 -0
  39. package/assets/esri/core/workers/chunks/3a7a558e30b5cb81c801.js +1 -0
  40. package/assets/esri/core/workers/chunks/3c9405d310a1b08c901e.js +1 -0
  41. package/assets/esri/core/workers/chunks/{e10fe4c77b8dc4492092.js → 3ce53562926b05e71af5.js} +1 -1
  42. package/assets/esri/core/workers/chunks/3d174a84b785fc633a5a.js +1 -0
  43. package/assets/esri/core/workers/chunks/3d67fed3e53993c38b58.js +1 -0
  44. package/assets/esri/core/workers/chunks/42bdeeff55fb1a3f735f.js +1 -0
  45. package/assets/esri/core/workers/chunks/48f1532520b76fa7f0c2.js +1 -0
  46. package/assets/esri/core/workers/chunks/{00d9e41deecf5828975c.js → 4adc3822ed9f498f5653.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{d5f0fed415b5b155d57c.js → 51741ef8225d470716fe.js} +1 -1
  48. package/assets/esri/core/workers/chunks/5191e481d0e19a7f3888.js +1 -0
  49. package/assets/esri/core/workers/chunks/{7fcee3a1b900ddc9a5e3.js → 540acf6abdee9dbd453e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{d9b63cf111035b05cd2e.js → 5484b89adc53430226d5.js} +1 -1
  51. package/assets/esri/core/workers/chunks/55361b50ecfc98db2ffb.js +1 -0
  52. package/assets/esri/core/workers/chunks/58da7c41c1bcef2f4141.js +1 -0
  53. package/assets/esri/core/workers/chunks/5979bbefb09d132c008f.js +1 -0
  54. package/assets/esri/core/workers/chunks/{84db05e872dbf35c80a2.js → 5982c6a8459c1237b298.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{0a20f84b5f004a77a9f9.js → 5abfc4f447b01d6bf287.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{4c0dba437de0969a5b63.js → 5b9f88194433410bad5b.js} +1 -1
  57. package/assets/esri/core/workers/chunks/5f794f4e0113d5dd50ba.js +1 -0
  58. package/assets/esri/core/workers/chunks/62a30692e2a7612bafc1.js +1 -0
  59. package/assets/esri/core/workers/chunks/62aa7daad4ca7332854e.js +1 -0
  60. package/assets/esri/core/workers/chunks/66926c3686d5ef2d4692.js +29 -0
  61. package/assets/esri/core/workers/chunks/6994ba168465b77a36af.js +1 -0
  62. package/assets/esri/core/workers/chunks/6d0c6fda9100fe89f3cb.js +1 -0
  63. package/assets/esri/core/workers/chunks/72a898894438f177cd62.js +1 -0
  64. package/assets/esri/core/workers/chunks/78d4455237120103f639.js +1 -0
  65. package/assets/esri/core/workers/chunks/7fccf53aa751cd9dae57.js +1 -0
  66. package/assets/esri/core/workers/chunks/{26995de0c18bef8db590.js → 81327e10200065a0ccef.js} +1 -1
  67. package/assets/esri/core/workers/chunks/84a3fbe5d85a357f4e82.js +1 -0
  68. package/assets/esri/core/workers/chunks/862479729f2d036f606b.js +1 -0
  69. package/assets/esri/core/workers/chunks/89dad6c1bfd81e4d7f8e.js +1 -0
  70. package/assets/esri/core/workers/chunks/8a9aa6db11d0f643961c.js +1 -0
  71. package/assets/esri/core/workers/chunks/8dfea65341991e13ab71.js +1 -0
  72. package/assets/esri/core/workers/chunks/8e92925043dc49ed1018.js +1 -0
  73. package/assets/esri/core/workers/chunks/8f0b2b0ca239b01f44d0.js +1 -0
  74. package/assets/esri/core/workers/chunks/93a89168c18db88f60e7.js +1 -0
  75. package/assets/esri/core/workers/chunks/991c854a4459c82d4d93.js +1 -0
  76. package/assets/esri/core/workers/chunks/{f90cad9f007a11154c0d.js → 9b080d07699b56f06c5f.js} +1 -1
  77. package/assets/esri/core/workers/chunks/9cd69aa3880838a834f8.js +1 -0
  78. package/assets/esri/core/workers/chunks/{2ca49fb4590cc34a02bd.js → 9d87f38b16dda1ff7978.js} +1 -1
  79. package/assets/esri/core/workers/chunks/9fd1e5a2c0a261ed2a33.js +1 -0
  80. package/assets/esri/core/workers/chunks/a0a9c41400ae98df1912.js +1 -0
  81. package/assets/esri/core/workers/chunks/a189e520da39919cdcca.js +1 -0
  82. package/assets/esri/core/workers/chunks/a3a5cb664bdb1db190dd.js +1 -0
  83. package/assets/esri/core/workers/chunks/a63c456ecf018ec06778.js +1 -0
  84. package/assets/esri/core/workers/chunks/{842f993fa60b410cb613.js → a8322a978e33c7349fdf.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{f479b4a4cee4bb2e046c.js → aa96eea0899757ab38c7.js} +1 -1
  86. package/assets/esri/core/workers/chunks/ab0b2a76247dfd56b92d.js +1 -0
  87. package/assets/esri/core/workers/chunks/ab7337b076d152a8eb9e.js +1 -0
  88. package/assets/esri/core/workers/chunks/ac0de274853a42d518a1.js +1 -0
  89. package/assets/esri/core/workers/chunks/ad372e399e20d5a3262d.js +1 -0
  90. package/assets/esri/core/workers/chunks/ae75b3e5320d03dff64c.js +1 -0
  91. package/assets/esri/core/workers/chunks/ae98530d5816306216b3.js +1 -0
  92. package/assets/esri/core/workers/chunks/afc94c4b9bc007fe310f.js +1 -0
  93. package/assets/esri/core/workers/chunks/afe54923339e957b71b9.js +1 -0
  94. package/assets/esri/core/workers/chunks/bbcac00362fef5e3956d.js +1 -0
  95. package/assets/esri/core/workers/chunks/{1302bf9718747cd9fdd9.js → bcee161dd1c4781d1998.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{d1f54b0079fb71a15612.js → bd231bc0624eb889ac14.js} +1 -1
  97. package/assets/esri/core/workers/chunks/c0075715fbe7bec10fc3.js +1 -0
  98. package/assets/esri/core/workers/chunks/c4e1e864fb8c119b2520.js +1 -0
  99. package/assets/esri/core/workers/chunks/c93cedf9e53da5aaa35b.js +1 -0
  100. package/assets/esri/core/workers/chunks/{2d592c935571de80a2e2.js → c9690810b198a97bc16d.js} +1 -1
  101. package/assets/esri/core/workers/chunks/cada517cc25fa37f778c.js +1 -0
  102. package/assets/esri/core/workers/chunks/cd1821bf601949674e02.js +1 -0
  103. package/assets/esri/core/workers/chunks/{1b42d163ef22e3565bb7.js → cf7b7e54cd87422ca62a.js} +1 -1
  104. package/assets/esri/core/workers/chunks/d1187ad6cc4959683819.js +1 -0
  105. package/assets/esri/core/workers/chunks/d195c57fc6de3560653d.js +1 -0
  106. package/assets/esri/core/workers/chunks/d7f830a06ded11f2fc80.js +1 -0
  107. package/assets/esri/core/workers/chunks/d877783815afd21dbe98.js +1 -0
  108. package/assets/esri/core/workers/chunks/db5181fcea96cc2ede3e.js +1 -0
  109. package/assets/esri/core/workers/chunks/{6e8187a77846239ed112.js → de28a86775235bd5d3c4.js} +2 -2
  110. package/assets/esri/core/workers/chunks/df6992416cba9539f1ed.js +1 -0
  111. package/assets/esri/core/workers/chunks/e4005d95a396e1af9ac2.js +1 -0
  112. package/assets/esri/core/workers/chunks/{668ec0bdfb2095e90c9e.js → e495697860f7207da4c7.js} +1 -1
  113. package/assets/esri/core/workers/chunks/ec187933b42fe65594b7.js +1 -0
  114. package/assets/esri/core/workers/chunks/eec5a93dbc258a90b6de.js +1 -0
  115. package/assets/esri/core/workers/chunks/f163502c513205c892e7.js +1 -0
  116. package/assets/esri/core/workers/chunks/f287ec0fcb611f82ebb0.js +1 -0
  117. package/assets/esri/core/workers/chunks/{37ae52c71bf9c70fbb92.js → f2d45d15d0ba2537a4eb.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{d507d7d7a7282fc38e8d.js → f652d1db26fbdea1a79b.js} +1 -1
  119. package/assets/esri/core/workers/chunks/f6b38ed75baae198c19b.js +1 -0
  120. package/assets/esri/core/workers/chunks/{168b45c5d8233f23793e.js → f6cfc901267a229de7a1.js} +2 -2
  121. package/assets/esri/core/workers/chunks/f6d04d14323b926f1025.js +1 -0
  122. package/assets/esri/core/workers/chunks/f7ab606be37373312ebe.js +1 -0
  123. package/assets/esri/core/workers/chunks/{3b7dff15a0058ea29886.js → f92178ac6dc9abff304f.js} +1 -1
  124. package/assets/esri/core/workers/chunks/fc39593febef74a036f1.js +1 -0
  125. package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
  126. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-arabic.woff2 +0 -0
  127. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-cyrillic.woff2 +0 -0
  128. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-ext.woff2 +0 -0
  129. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-georgian.woff2 +0 -0
  130. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-greek.woff2 +0 -0
  131. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-hebrew.woff2 +0 -0
  132. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-math.woff2 +0 -0
  133. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-thai.woff2 +0 -0
  134. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-vietnamese.woff2 +0 -0
  135. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02.woff2 +0 -0
  136. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-arabic.woff2 +0 -0
  137. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-cyrillic.woff2 +0 -0
  138. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-ext.woff2 +0 -0
  139. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-georgian.woff2 +0 -0
  140. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-greek.woff2 +0 -0
  141. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-hebrew.woff2 +0 -0
  142. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-math.woff2 +0 -0
  143. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-thai.woff2 +0 -0
  144. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-vietnamese.woff2 +0 -0
  145. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7.woff2 +0 -0
  146. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-arabic.woff2 +0 -0
  147. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-cyrillic.woff2 +0 -0
  148. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-ext.woff2 +0 -0
  149. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-georgian.woff2 +0 -0
  150. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-greek.woff2 +0 -0
  151. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-hebrew.woff2 +0 -0
  152. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-math.woff2 +0 -0
  153. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-thai.woff2 +0 -0
  154. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-vietnamese.woff2 +0 -0
  155. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688.woff2 +0 -0
  156. package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
  157. package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
  158. package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
  159. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-arabic.woff2 +0 -0
  160. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-cyrillic.woff2 +0 -0
  161. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-ext.woff2 +0 -0
  162. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-georgian.woff2 +0 -0
  163. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-greek.woff2 +0 -0
  164. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-hebrew.woff2 +0 -0
  165. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-math.woff2 +0 -0
  166. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-thai.woff2 +0 -0
  167. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-vietnamese.woff2 +0 -0
  168. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939.woff2 +0 -0
  169. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-cyrillic.woff2 +0 -0
  170. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-ext.woff2 +0 -0
  171. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-greek.woff2 +0 -0
  172. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-hebrew.woff2 +0 -0
  173. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-math.woff2 +0 -0
  174. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-vietnamese.woff2 +0 -0
  175. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d.woff2 +0 -0
  176. package/assets/esri/themes/base/fonts/fonts.scss +0 -0
  177. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +7 -0
  178. package/assets/esri/themes/base/widgets/_Tooltip.scss +5 -3
  179. package/assets/esri/themes/dark/main.css +1 -1
  180. package/assets/esri/themes/light/main.css +1 -1
  181. package/assets/esri/themes/light/view.css +1 -1
  182. package/assets/esri/views/interactive/tooltip/t9n/messages.ar.json +1 -1
  183. package/assets/esri/views/interactive/tooltip/t9n/messages.bg.json +1 -1
  184. package/assets/esri/views/interactive/tooltip/t9n/messages.bs.json +1 -1
  185. package/assets/esri/views/interactive/tooltip/t9n/messages.ca.json +1 -1
  186. package/assets/esri/views/interactive/tooltip/t9n/messages.cs.json +1 -1
  187. package/assets/esri/views/interactive/tooltip/t9n/messages.da.json +1 -1
  188. package/assets/esri/views/interactive/tooltip/t9n/messages.de.json +1 -1
  189. package/assets/esri/views/interactive/tooltip/t9n/messages.el.json +1 -1
  190. package/assets/esri/views/interactive/tooltip/t9n/messages.es.json +1 -1
  191. package/assets/esri/views/interactive/tooltip/t9n/messages.et.json +1 -1
  192. package/assets/esri/views/interactive/tooltip/t9n/messages.fi.json +1 -1
  193. package/assets/esri/views/interactive/tooltip/t9n/messages.fr.json +1 -1
  194. package/assets/esri/views/interactive/tooltip/t9n/messages.he.json +1 -1
  195. package/assets/esri/views/interactive/tooltip/t9n/messages.hr.json +1 -1
  196. package/assets/esri/views/interactive/tooltip/t9n/messages.hu.json +1 -1
  197. package/assets/esri/views/interactive/tooltip/t9n/messages.id.json +1 -1
  198. package/assets/esri/views/interactive/tooltip/t9n/messages.it.json +1 -1
  199. package/assets/esri/views/interactive/tooltip/t9n/messages.ja.json +1 -1
  200. package/assets/esri/views/interactive/tooltip/t9n/messages.ko.json +1 -1
  201. package/assets/esri/views/interactive/tooltip/t9n/messages.lt.json +1 -1
  202. package/assets/esri/views/interactive/tooltip/t9n/messages.lv.json +1 -1
  203. package/assets/esri/views/interactive/tooltip/t9n/messages.nl.json +1 -1
  204. package/assets/esri/views/interactive/tooltip/t9n/messages.no.json +1 -1
  205. package/assets/esri/views/interactive/tooltip/t9n/messages.pl.json +1 -1
  206. package/assets/esri/views/interactive/tooltip/t9n/messages.pt-BR.json +1 -1
  207. package/assets/esri/views/interactive/tooltip/t9n/messages.pt-PT.json +1 -1
  208. package/assets/esri/views/interactive/tooltip/t9n/messages.ro.json +1 -1
  209. package/assets/esri/views/interactive/tooltip/t9n/messages.ru.json +1 -1
  210. package/assets/esri/views/interactive/tooltip/t9n/messages.sk.json +1 -1
  211. package/assets/esri/views/interactive/tooltip/t9n/messages.sl.json +1 -1
  212. package/assets/esri/views/interactive/tooltip/t9n/messages.sr.json +1 -1
  213. package/assets/esri/views/interactive/tooltip/t9n/messages.sv.json +1 -1
  214. package/assets/esri/views/interactive/tooltip/t9n/messages.th.json +1 -1
  215. package/assets/esri/views/interactive/tooltip/t9n/messages.tr.json +1 -1
  216. package/assets/esri/views/interactive/tooltip/t9n/messages.uk.json +1 -1
  217. package/assets/esri/views/interactive/tooltip/t9n/messages.vi.json +1 -1
  218. package/assets/esri/views/interactive/tooltip/t9n/messages.zh-CN.json +1 -1
  219. package/assets/esri/views/interactive/tooltip/t9n/messages.zh-HK.json +1 -1
  220. package/assets/esri/views/interactive/tooltip/t9n/messages.zh-TW.json +1 -1
  221. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  222. package/chunks/batchExec.js +2 -0
  223. package/config.js +1 -1
  224. package/core/units.js +1 -1
  225. package/geometry/HeightModelInfo.js +1 -1
  226. package/geometry/ellipsoidUtils.js +1 -1
  227. package/geometry/support/heightModelInfoUtils.js +1 -1
  228. package/geometry/support/intersects.js +1 -1
  229. package/geometry/support/intersectsBase.js +1 -1
  230. package/interfaces.d.ts +1 -0
  231. package/kernel.js +1 -1
  232. package/layers/ElevationLayer.js +1 -1
  233. package/layers/GeospatialPDFLayer.js +1 -1
  234. package/layers/ImageryTileLayer.js +1 -1
  235. package/layers/OrientedImageryLayer.js +1 -1
  236. package/layers/graphics/dehydratedFeatures.js +1 -1
  237. package/layers/graphics/hydrateGeometryJSON.js +2 -0
  238. package/layers/graphics/hydratedFeatures.js +1 -1
  239. package/layers/graphics/hydratedSpatialReference.js +2 -0
  240. package/layers/graphics/transferFeatures.js +2 -0
  241. package/layers/mixins/FeatureLayerBase.js +1 -1
  242. package/layers/mixins/HeightModelInfoMixin.js +2 -0
  243. package/layers/mixins/SceneService.js +1 -1
  244. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  245. package/layers/raster/datasets/DBFParser.js +1 -1
  246. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  247. package/layers/raster/datasets/RasterFactory.js +1 -1
  248. package/layers/raster/datasets/TIFFRaster.js +1 -1
  249. package/layers/raster/formats/JpgPlus.js +1 -1
  250. package/layers/raster/formats/RasterCodec.js +1 -1
  251. package/layers/raster/formats/Raw.js +1 -1
  252. package/layers/support/arcadeUtils.js +1 -1
  253. package/package.json +3 -3
  254. package/popup/FeatureContent.js +1 -1
  255. package/popup/FeatureContentCollection.d.ts +2 -0
  256. package/popup/FeatureContentCollection.js +1 -1
  257. package/popup/support/featureUtils.js +1 -1
  258. package/rest/imageService.js +1 -1
  259. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  260. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  261. package/support/arcadeUtils.js +1 -1
  262. package/support/loadArcade.js +1 -1
  263. package/support/revision.js +1 -1
  264. package/symbols/cim/cimAnalyzer.js +1 -1
  265. package/views/2d/engine/vectorTiles/GeometryUtils.js +1 -1
  266. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  267. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  268. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  269. package/views/2d/engine/vectorTiles/decluttering/util.js +1 -1
  270. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  271. package/views/2d/layerViewModuleImportUtils.js +1 -1
  272. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  273. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  274. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  275. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  276. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  277. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  278. package/views/2d/support/hitTestUtils.js +1 -1
  279. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  280. package/views/3d/camera/intersectionUtils.js +1 -1
  281. package/views/3d/interactive/Manipulator3D.js +1 -1
  282. package/views/3d/layers/GeospatialPDFLayerView3D.js +1 -1
  283. package/views/3d/layers/I3SMeshView3D.js +1 -1
  284. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  285. package/views/3d/layers/support/featureReference.js +1 -1
  286. package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
  287. package/views/3d/state/Constraints.js +1 -1
  288. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  289. package/views/3d/support/PBFDecoder.js +1 -1
  290. package/views/3d/support/PBFDecoderWorker.js +1 -1
  291. package/views/3d/support/QualityProfile.js +1 -1
  292. package/views/3d/terrain/TerrainRenderer.js +1 -1
  293. package/views/3d/terrain/TileCompositor.js +1 -1
  294. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  295. package/views/DOMContainer.d.ts +18 -8
  296. package/views/SceneView.js +1 -1
  297. package/views/ToolViewManager.js +1 -1
  298. package/views/VideoView.d.ts +38 -0
  299. package/views/VideoView.js +1 -1
  300. package/views/View.d.ts +20 -2
  301. package/views/View.js +1 -1
  302. package/views/input/types.d.ts +19 -6
  303. package/views/interactive/dragEventPipeline.js +1 -1
  304. package/views/interactive/options/TooltipVisibleElements.d.ts +11 -1
  305. package/views/interactive/options/TooltipVisibleElements.js +1 -1
  306. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  307. package/views/layers/ImageryTileLayerView.js +1 -1
  308. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  309. package/widgets/BatchAttributeForm.js +1 -1
  310. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  311. package/widgets/OrientedImageryViewer/utils.js +1 -1
  312. package/widgets/Search/SearchViewModel.js +1 -1
  313. package/widgets/Search/support/layerSearchUtils.js +1 -1
  314. package/assets/esri/core/workers/chunks/025da54eef112d7e8f66.js +0 -1
  315. package/assets/esri/core/workers/chunks/02f94f9d704f03ddb5c6.js +0 -1
  316. package/assets/esri/core/workers/chunks/04d4cd66485b622403d0.js +0 -1
  317. package/assets/esri/core/workers/chunks/05afa8c2b5929ce0545a.js +0 -1
  318. package/assets/esri/core/workers/chunks/09676cfa99b90fe0cc63.js +0 -1
  319. package/assets/esri/core/workers/chunks/0a2b7c691a577cb3d189.js +0 -1
  320. package/assets/esri/core/workers/chunks/0aadee0437fa061e4ff5.js +0 -1
  321. package/assets/esri/core/workers/chunks/0ccd4200c5a2a5de6e16.js +0 -1
  322. package/assets/esri/core/workers/chunks/1262918b2161d79851c0.js +0 -1
  323. package/assets/esri/core/workers/chunks/1406a884241809b62bff.js +0 -1
  324. package/assets/esri/core/workers/chunks/1c33aa349beea9a3792f.js +0 -1
  325. package/assets/esri/core/workers/chunks/1f135269aea3931e11b2.js +0 -1
  326. package/assets/esri/core/workers/chunks/2146c25c01c9fc11b16c.js +0 -1
  327. package/assets/esri/core/workers/chunks/24014f3701c31ee74bc2.js +0 -1
  328. package/assets/esri/core/workers/chunks/25a2e02677a74834c8b5.js +0 -1
  329. package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +0 -1
  330. package/assets/esri/core/workers/chunks/2c7bb5c9751524687002.js +0 -1
  331. package/assets/esri/core/workers/chunks/2c7fc24649d91552e68a.js +0 -1
  332. package/assets/esri/core/workers/chunks/2ebad7e588b26e74cefe.js +0 -1
  333. package/assets/esri/core/workers/chunks/319434415d2c0561bc59.js +0 -1
  334. package/assets/esri/core/workers/chunks/39d71e83261bff46f6bf.js +0 -1
  335. package/assets/esri/core/workers/chunks/3aceedec9abfb2fdfa18.js +0 -1
  336. package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +0 -1
  337. package/assets/esri/core/workers/chunks/4327d2c39a660bd89da7.js +0 -1
  338. package/assets/esri/core/workers/chunks/462fd57af8ed7921d6ba.js +0 -1
  339. package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +0 -1
  340. package/assets/esri/core/workers/chunks/474d9541d387b31ad275.js +0 -1
  341. package/assets/esri/core/workers/chunks/48a2f68e06a2e90b77d0.js +0 -1
  342. package/assets/esri/core/workers/chunks/4a73f73f1698fad2df20.js +0 -1
  343. package/assets/esri/core/workers/chunks/4f464047c6f6c9486efd.js +0 -1
  344. package/assets/esri/core/workers/chunks/50c29d10ec53f0e48e8a.js +0 -1
  345. package/assets/esri/core/workers/chunks/526cc64ae46dec3fbeda.js +0 -1
  346. package/assets/esri/core/workers/chunks/550d4df0732352fa48b5.js +0 -1
  347. package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +0 -1
  348. package/assets/esri/core/workers/chunks/581285e4d7bbe1b7c27a.js +0 -1
  349. package/assets/esri/core/workers/chunks/58fb92775d668cfd295c.js +0 -1
  350. package/assets/esri/core/workers/chunks/5adf2792416b22cd602f.js +0 -1
  351. package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +0 -1
  352. package/assets/esri/core/workers/chunks/6006bd8a5ed945fa2776.js +0 -1
  353. package/assets/esri/core/workers/chunks/64ee22134fda2f09c094.js +0 -1
  354. package/assets/esri/core/workers/chunks/66ef6c034455abd61f39.js +0 -1
  355. package/assets/esri/core/workers/chunks/67678054342178b601cf.js +0 -1
  356. package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +0 -1
  357. package/assets/esri/core/workers/chunks/6e75f09fb9452bd5f9fb.js +0 -1
  358. package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +0 -1
  359. package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +0 -1
  360. package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +0 -1
  361. package/assets/esri/core/workers/chunks/78085f804969c9282700.js +0 -1
  362. package/assets/esri/core/workers/chunks/7d6da4e89aa951e6523f.js +0 -1
  363. package/assets/esri/core/workers/chunks/80f16f5f15518013f7d0.js +0 -1
  364. package/assets/esri/core/workers/chunks/82ce034b5ba54de9b970.js +0 -29
  365. package/assets/esri/core/workers/chunks/8465e2c7221125fd3cc4.js +0 -1
  366. package/assets/esri/core/workers/chunks/87aaed3dfa903bdf853c.js +0 -1
  367. package/assets/esri/core/workers/chunks/892dc038d569cffd26dc.js +0 -1
  368. package/assets/esri/core/workers/chunks/8daed13400d9e63e65ae.js +0 -1
  369. package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +0 -1
  370. package/assets/esri/core/workers/chunks/9020bd7a0e488d55ef14.js +0 -1
  371. package/assets/esri/core/workers/chunks/9d6a96e4c7ccedcb0c13.js +0 -1
  372. package/assets/esri/core/workers/chunks/9ec04faad97be55309b8.js +0 -1
  373. package/assets/esri/core/workers/chunks/a08385ebf1715414c1a6.js +0 -1
  374. package/assets/esri/core/workers/chunks/a3a33ffa34f4d645ddfe.js +0 -1
  375. package/assets/esri/core/workers/chunks/b396c4b4bb144200acc7.js +0 -1
  376. package/assets/esri/core/workers/chunks/b9c834e3c0701e9b14a2.js +0 -1
  377. package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +0 -1
  378. package/assets/esri/core/workers/chunks/bbfb80a6983574007ce5.js +0 -1
  379. package/assets/esri/core/workers/chunks/bcf2e5cf6b9c6d0442bb.js +0 -1
  380. package/assets/esri/core/workers/chunks/c35e9dee87937f483a3d.js +0 -1
  381. package/assets/esri/core/workers/chunks/c5b733c3a5b2680042a2.js +0 -1
  382. package/assets/esri/core/workers/chunks/c77496c350004ee66eb2.js +0 -1
  383. package/assets/esri/core/workers/chunks/cbeba973ef5593ffbba3.js +0 -1
  384. package/assets/esri/core/workers/chunks/ccaeabc3be07f3c96f50.js +0 -1
  385. package/assets/esri/core/workers/chunks/d25fb32a233d2128afbe.js +0 -1
  386. package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +0 -1
  387. package/assets/esri/core/workers/chunks/d5ef269ab0ee3744b05d.js +0 -1
  388. package/assets/esri/core/workers/chunks/dc92710a8fdfb9135e55.js +0 -1
  389. package/assets/esri/core/workers/chunks/dd4ecf81250cc001d040.js +0 -1
  390. package/assets/esri/core/workers/chunks/e0894a308c84d5c158b0.js +0 -1
  391. package/assets/esri/core/workers/chunks/e4016ae9cb8f16e3efc3.js +0 -1
  392. package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +0 -1
  393. package/assets/esri/core/workers/chunks/e6637f9176566382ed3e.js +0 -1
  394. package/assets/esri/core/workers/chunks/e6a4cef0af9be30ffe3d.js +0 -1
  395. package/assets/esri/core/workers/chunks/eaa7cb3ffa8c11706a09.js +0 -1
  396. package/assets/esri/core/workers/chunks/ed31ec586b754241474d.js +0 -1
  397. package/assets/esri/core/workers/chunks/ef6e52f9b656751eebaf.js +0 -1
  398. package/assets/esri/core/workers/chunks/f2fca9a3a40170996ea2.js +0 -1
  399. package/assets/esri/core/workers/chunks/f5d06cd6d30a5f742f73.js +0 -1
  400. package/assets/esri/core/workers/chunks/f71ec8a260405ed07958.js +0 -1
  401. package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +0 -1
  402. package/assets/esri/core/workers/chunks/fb11ff3f2eae5f072560.js +0 -1
  403. package/assets/esri/core/workers/chunks/ff0e9f8d323eb1729650.js +0 -1
  404. /package/assets/esri/core/workers/chunks/{6e8187a77846239ed112.js.LICENSE.txt → de28a86775235bd5d3c4.js.LICENSE.txt} +0 -0
  405. /package/assets/esri/core/workers/chunks/{168b45c5d8233f23793e.js.LICENSE.txt → f6cfc901267a229de7a1.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{DehydratedFeatureSetParserContext as e}from"../../../rest/query/operations/pbfDehydratedFeatureSet.js";import{parsePBFFeatureQuery as r}from"../../../rest/query/operations/pbfQueryUtils.js";class t{_parseFeatureQuery(t){const s=new e(t.options),i=r(t.buffer,s),o={...i,spatialReference:i.spatialReference?.toJSON(),fields:i.fields?i.fields.map(e=>e.toJSON()):void 0,missingAttributes:s.missingAttributes};return Promise.resolve(o)}}function s(){return new t}export{s as default};
2
+ import{DehydratedFeatureSetParserContext as e}from"../../../rest/query/operations/pbfDehydratedFeatureSet.js";import{parsePBFFeatureQuery as r}from"../../../rest/query/operations/pbfQueryUtils.js";class t{parseFeatureQuery(t){const s=new e(t.options),o=r(t.buffer,s);o.missingAttributes=s.missingAttributes;const n={featureSet:o,coordinates:s.coordinates,queryGeometry:s.queryGeometry()??null,queryCoordinates:s.queryCoordinates()??null};return Promise.resolve({result:n,transferList:s.transferList})}}function s(){return new t}export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";function a(e){return l[e]}function i(){return has("esri-iPhone")?"low":"medium"}const o={reset(){const e=m();for(const a of Object.keys(e))l[a]=e[a]}},t={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430},l=m();function m(){const a=!!has("esri-mobile"),i=!!has("ios"),o=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125},sceneService:{objectLoDFactor:.2,pointLoDFactor:1,meshLoDFactor:.6,pointCloudLoDFactor:.5},gaussianSplat:{minimumPixelRadius:2,minimumOpacity:0,maximumNumberOfGaussians:1e6},flow:{maxTotalNumberOfStreamlines:5e3,maxTracingResolution:1024,transitionEnabled:!1},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),physicallyBasedRenderingEnabled:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+t.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:15e4,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{minimumPixelRadius:1,minimumOpacity:1,maximumNumberOfGaussians:3e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+t.GalaxyS20:750+t.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:3e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{minimumPixelRadius:.5,minimumOpacity:2,maximumNumberOfGaussians:6e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+t.SurfacePro7:1500+t.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}export{o as QualityProfileTest,i as getDefaultQualityProfileName,a as getQualityProfileSettings};
2
+ import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";function a(e){return l[e]}function i(){return has("esri-iPhone")?"low":"medium"}const o={reset(){const e=m();for(const a of Object.keys(e))l[a]=e[a]}},t={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430},l=m();function m(){const a=!!has("esri-mobile"),i=!!has("ios"),o=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125},sceneService:{objectLoDFactor:.2,pointLoDFactor:1,meshLoDFactor:.6,pointCloudLoDFactor:.5},gaussianSplat:{minimumPixelRadius:2,minimumOpacity:0,maximumNumberOfGaussians:1e6},flow:{maxTotalNumberOfStreamlines:5e3,maxTracingResolution:1024,transitionEnabled:!1},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),physicallyBasedRenderingEnabled:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+t.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:15e4,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{minimumPixelRadius:1,minimumOpacity:1,maximumNumberOfGaussians:a?1e6:3e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+t.GalaxyS20:750+t.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:3e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{minimumPixelRadius:.5,minimumOpacity:2,maximumNumberOfGaussians:6e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+t.SurfacePro7:1500+t.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}export{o as QualityProfileTest,i as getDefaultQualityProfileName,a as getQualityProfileSettings};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import has from"../../../core/has.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{MemCachePool as r}from"../../../core/MemCachePool.js";import i from"../../../core/ObjectPool.js";import{watch as s,sync as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{subtract as o,set as c,dot as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as d,fromValues as u,create as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as g,ZEROS as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as p,set as m}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as y}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as b}from"./OverlayRenderer.js";import{PatchRenderData as x}from"./PatchRenderData.js";import{TerrainAttributesCache as T}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as R}from"./terrainUtils.js";import{TileRenderer as v}from"./TileRenderer.js";import{IteratorPreorder as P,fallsWithinLayerView as w,sortTiles as O,compareTiles as D}from"./tileUtils.js";import{getOverlayContentForOutputTerrain as S}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as B}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as E}from"../webgl-engine/lib/Attribute.js";import{IntersectorResultRay as F}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as j,MeshIntersectionOptions as q,intersectTriangles as C}from"../webgl-engine/lib/RayIntersections.js";import{TriangleIntersectionData as A}from"../webgl-engine/lib/TriangleIntersectionData.js";import{terrainId as M,getVerticalOffsetTerrain as G}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as I}from"../webgl-engine/materials/DrawParameters.js";import{hasShadowHighlights as U}from"../webgl-engine/shaders/ReceiveShadowsConfiguration.js";import{T as k}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as N}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as L}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as V}from"../../webgl/enums.js";const H=7,z=10,Q=200,W=p();let Z=class extends B{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}get renderOccludedFlags(){return this._overlayRenderer.renderOccludedFlags}constructor(e,t,s,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=s,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new k,this._drawParameters=new I,this._renderDataPool=new i(()=>new x),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new P,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.produces=new Map([[1,()=>1===this._desiredSlot],[7,()=>7===this._desiredSlot],[9,()=>this._produces()&&this.renderOccludedFlags===b]]),this._tileSize=256,this._configuration=new L(1===t.viewingMode),this._tileTextureCache=new r((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new T(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(s(()=>this._overlayRenderer.renderOccludedFlags,()=>this.setNeedsRender(),n))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get layerViewUid(){return M}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,32)}reuseTextureFromParent(e){const{parent:t}=e;if(!this._canReuseTextureFromParent(t,e))return!1;const r=g(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,r)??!1}_canReuseTextureFromParent(e,t){if(!e)return!1;const{layerInfo:r,surface:i}=t;for(let s=0;s<r[1].length;s++){const r=i.layerViewByIndex(s,1);if(w(e,r)!==w(t,r))return!1}return!0}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const r of e.layerInfo[0])r.pendingUpdates&=-9;e.resetPendingUpdate(8);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=z-H,r=Math.max(0,Math.floor((e.level-t)/H)*H);if(this._isGlobal&&0===r)return d;for(;e.parent&&e.level>r;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new v(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=t(this._tileRenderer)}intersectRay(e,t,r,i){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const s=J,n=K;o(s,i,r),c(n,1/s[0],1/s[1],1/s[2]);const a=e.results.min,l=e.results.max,d=e.results.ground,u=0===e.options.store,_=!!e.results.ground.target,g=G(e.verticalOffset),f=e.tolerance;let p,b=u&&null!=a.distance?a.distance:1/0;const x=e.options,T=x.normalRequired||!x.backfacesTerrain,R=new q(f,!1,T),v=c=>{const _=c.renderData;if(!_?.vao)return;const v=_.geometry;m(W,v.boundingBox);const P=_.localOrigin;null!=g&&(g.localOrigin=P,g.applyToAabb(W));const w=W;if(X[0]=r[0]-P[0],X[1]=r[1]-P[1],X[2]=r[2]-P[2],!j(w,X,n,f,b))return;const O=(e,t,r,i)=>{e.set(this.type,c,t,r,i),b=u&&null!=a.renderDistance?a.renderDistance:1/0},D=(n,o,c)=>{if((!T||null!=c)&&o>=0&&(x.backfacesTerrain||h(c,s)<0)&&(x.invisibleTerrain||!x.selectionMode||null==t||t(r,i,o))){if((null==d.renderDistance||o<d.renderDistance)&&O(d,n,o,c),x.isFiltered)return;2===x.store&&(null==p?(p=new F(e.ray),O(p,n,o,c),e.results.all.push(p)):o<p.renderDistance&&O(p,n,o,c)),(null==a.renderDistance||o<a.renderDistance)&&O(a,n,o,c),0!==x.store&&(null==l.renderDistance||o>l.renderDistance)&&O(l,n,o,c)}},S=Y;o(S,i,P);const{indices:B,indexCount:q}=v,M=v.vertexAttributes,G=M.getField("position",y),I=new E(G.typedBuffer,3,M.stride/4),U=q/3;if(!g&&U>Q){const e=c.renderData;e.intersectionData??=new A(B,U,I),e.intersectionData.intersectRay(X,S,R,D)}else{C(X,S,0,U,(e,t)=>G.getVec(B[t],e),g,R,D)}},P=this._rootTiles;if(null!=P){(()=>{const t=this._tileIterator;t.reset(P);const i=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||i&&e.intersectsClippingArea)||null==g&&!e.intersectsRay(r,s,f,b)||_&&this._useStencilForTile(e)?t.skipSubtree():v(e)})()}}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const r of t)null!=r.renderData?.textureReference&&e.queriesForTile(r);e.process(),t.madeProgress()}}get _desiredSlot(){if(!this._produces())return null;switch(this.transparency){case 0:return 1;case 1:case 2:return 7;case 3:case 4:return null}}acquireTechniques(e){const{shadowMap:t,viewshedEnabled:r,cutFillComputationEnabled:i,slot:s,hasEmission:n,useFloatBlend:a}=e.bind,l=!!has("enable-feature:terrain-shadows")&&t.enabled;if(l!==this._castShadows&&(this._castShadows=l,this._patchesByOriginDirty=!0),this._inViewshed!==r&&(this._inViewshed=r,this._patchesByOriginDirty=!0),this._cutFillEnabled!==i&&(this._cutFillEnabled=i,this._patchesByOriginDirty=!0),3===this.transparency)return null;if(9===s){if(0===(e.renderOccludedMask&b))return null}else if(s!==this._desiredSlot)return null;const o=this._configuration;switch(o.screenSpaceReflections=o.cloudReflections=o.receiveShadows=o.hasShadowHighlights=o.receiveAmbientOcclusion=o.renderOccluded=o.hasHighlightMixTexture=!1,o.hasEmission=n,o.overlayMode=this._overlayRenderer.mode,o.useFloatBlend=a.value,e.output){case 0:case 1:case 2:{const r=e.bind;o.screenSpaceReflections=r.hasScreenSpaceReflections,o.cloudReflections=null!=r.clouds.data;const i=9===s;return o.receiveShadows=t.ready&&!i,o.hasShadowHighlights=U(o,e.bind),o.renderOccluded=i,o.receiveAmbientOcclusion=!i&&null!=r.ssao,o.receiveGlobalIllumination=!i&&r.globalIlluminationEnabled,this._acquireTechnique(e.output)}case 5:case 7:return this._castShadows?this._acquireTechnique(5):null;case 8:return this._inViewshed?this._acquireTechnique(8):null;case 9:return this._cutFillEnabled?this._acquireTechnique(9):null;case 3:case 4:return this._acquireTechnique(e.output);case 11:return this._acquireTechnique(11);case 10:return o.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(10):null}return null}render(e,t){switch(this._updatePatchGroups(),this._passParameters.useStencil=!1,this._passParameters.overlayContent=S(e.output,e.bind),e.output){case 0:case 1:case 2:return this._renderMaterialPass(e,t);case 3:case 4:case 11:return this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);case 10:{const r=e.bind.highlight?.name;r&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(r)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 5:case 7:case 8:case 9:return this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const t=this._tileRenderer;let r;if(null!=e){const t=e.toUnitRGBA();r=u(t[0]||0,t[1]||0,t[2]||0)}t.setBackground(r),this._allTiles.forAll(e=>t.updateTileTexture(e,0)),this._configuration.tileBlendInput=t.backgroundIsGrid?2:null!=t.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const r of e)O(r,t);e.sort((e,t)=>D(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness("render-patch-groups"),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),r=e.renderData;if(!r){this._numTilesCulled++;continue}const i=r.localOrigin;if(this._castShadows||this._inViewshed||this._cutFillEnabled){let t=this._allPatchesByOrigin.get(i);t||(t=[],this._allPatchesByOrigin.set(i,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(i);s||(s=[],this._visiblePatchesByOrigin.set(i,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,r){const{rctx:i,bind:s}=e;i.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;r.forEach(r=>{this._drawParameters.origin=r[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let i=0;i<r.length;i++)this._renderPatch(e,t,r[i],V.TRIANGLES,n,null===this._passParameters.overlayContent)}),i.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:r,bind:i}=e,s=r.bindTechnique(t,i,this._passParameters);this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const n=9===i.slot;n&&(s.bindTexture("tex",r.emptyTexture),s.setUniform3fv("textureOpacities",d),s.setUniform4fv("texOffsetAndScale",f));const a=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:d;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",a);const l=this._stencilEnabledLayerExtents.length>0,o=this.wireframe?V.LINES:V.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",r.emptyTexture);const c=this._visiblePatchesByOrigin;for(const h of c.values()){const r=h[0].renderData.localOrigin;this._drawParameters.origin=r,t.program.bindDraw(i,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const i of h){const r=i.renderData,a=r.textureReference;if(null!=a){if(!n){s.setUniform4fv("texOffsetAndScale",a.offsetAndScale),s.bindTexture("tex",a.texture.texture);const e=r.textureFadeFactor,t=e<1?r.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(s.setUniform1f("fadeFactor",e),s.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),s.setUniform3fv("nextTexOpacities",t.opacities),s.bindTexture("texNext",t.texture.texture)):s.setUniform1f("fadeFactor",1),r.textureIsFading&&this.setNeedsRender(2),s.setUniform3fv("textureOpacities",a.opacities)}this._renderPatch(e,t,i,o,l),i.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}r.bindVAO(null)}_renderPatch(e,t,r,i,s,n=!1){const a=r.renderData,l=a.vao,o=l?.indexBuffer;if(!l||null==o)return void(R&&console.error("Rendered tile with no indices: ",r.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay);const{rctx:h,bind:d}=e;s&&(this._passParameters.useStencil=this._useStencilForTile(r),h.setPipelineState(t.getPipeline(d,this._passParameters)));const u=a.geometry.indexCount;h.bindVAO(l),c.assertCompatibleVertexAttributeLocations(l),h.drawElements(i,u,o.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(N,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([a({readOnly:!0})],Z.prototype,"visibleTiles",null),e([a({readOnly:!0})],Z.prototype,"_isGlobal",null),e([a()],Z.prototype,"renderOccludedFlags",null),e([a({value:!1})],Z.prototype,"renderingDisabled",null),e([a({value:!0})],Z.prototype,"visible",null),e([a()],Z.prototype,"renderPatchBorders",null),e([a()],Z.prototype,"wireframe",null),Z=e([l("esri.views.3d.terrain.TerrainRenderer")],Z);const J=_(),K=_(),X=_(),Y=_();export{Z as TerrainRenderer};
2
+ import{__decorate as e}from"tslib";import has from"../../../core/has.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{MemCachePool as r}from"../../../core/MemCachePool.js";import i from"../../../core/ObjectPool.js";import{watch as s,sync as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{subtract as o,set as c,dot as d}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as h,fromValues as u,create as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as g,ZEROS as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as p,set as m}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as y}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as b}from"./OverlayRenderer.js";import{PatchRenderData as x}from"./PatchRenderData.js";import{TerrainAttributesCache as T}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as R}from"./terrainUtils.js";import{TileRenderer as v}from"./TileRenderer.js";import{IteratorPreorder as P,fallsWithinLayerView as w,sortTiles as O,compareTiles as D}from"./tileUtils.js";import{getOverlayContentForOutputTerrain as S}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as B}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as E}from"../webgl-engine/lib/Attribute.js";import{IntersectorResultRay as F}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as j,MeshIntersectionOptions as C,intersectTriangles as q}from"../webgl-engine/lib/RayIntersections.js";import{TriangleIntersectionData as A}from"../webgl-engine/lib/TriangleIntersectionData.js";import{terrainId as M,getVerticalOffsetTerrain as G}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as I}from"../webgl-engine/materials/DrawParameters.js";import{hasShadowHighlights as U}from"../webgl-engine/shaders/ReceiveShadowsConfiguration.js";import{T as k}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as N}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as L}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as V}from"../../webgl/enums.js";const H=7,z=10,Q=200,W=p();let Z=class extends B{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}get renderOccludedFlags(){return this._overlayRenderer.renderOccludedFlags}constructor(e,t,s,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=s,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new k,this._drawParameters=new I,this._renderDataPool=new i(()=>new x),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new P,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.produces=new Map([[1,()=>1===this._desiredSlot],[7,()=>7===this._desiredSlot],[9,()=>this._produces()&&this.renderOccludedFlags===b]]),this._tileSize=256,this._configuration=new L(1===t.viewingMode),this._tileTextureCache=new r((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new T(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(s(()=>this._overlayRenderer.renderOccludedFlags,()=>this.setNeedsRender(),n))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get layerViewUid(){return M}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,32)}reuseTextureFromParent(e){const{parent:t}=e;if(!this._canReuseTextureFromParent(t,e))return!1;const r=g(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,r)??!1}_canReuseTextureFromParent(e,t){if(!e)return!1;const{layerInfo:r,surface:i}=t;for(let s=0;s<r[1].length;s++){const r=i.layerViewByIndex(s,1);if(w(e,r)!==w(t,r))return!1}return!0}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const r of e.layerInfo[0])r.pendingUpdates&=-9;e.resetPendingUpdate(8);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=z-H,r=Math.max(0,Math.floor((e.level-t)/H)*H);if(this._isGlobal&&0===r)return h;for(;e.parent&&e.level>r;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new v(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=t(this._tileRenderer)}intersectRay(e,t,r,i){const s=this._rootTiles;if(!s||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const n=J,a=K;o(n,i,r),c(a,1/n[0],1/n[1],1/n[2]);const l=e.results.min,h=e.results.max,u=e.results.ground,_=0===e.options.store,g=!!e.results.ground.target,f=G(e.verticalOffset),p=e.tolerance;let b,x=_&&null!=l.distance?l.distance:1/0;const T=e.options,R=T.normalRequired||!T.backfacesTerrain,v=new C(p,!1,R),P=s=>{const c=s.renderData;if(!c?.vao)return;const g=c.geometry;m(W,g.boundingBox);const P=c.localOrigin;if(null!=f&&(f.localOrigin=P,f.applyToAabb(W)),X[0]=r[0]-P[0],X[1]=r[1]-P[1],X[2]=r[2]-P[2],!j(W,X,a,p,x))return;const w=(e,t,r,i)=>{e.set(this.type,s,t,r,i),x=_&&null!=l.renderDistance?l.renderDistance:1/0},O=(s,a,o)=>{(!R||null!=o)&&a>=0&&(T.backfacesTerrain||d(o,n)<0)&&(T.invisibleTerrain||!T.selectionMode||null==t||t(r,i,a))&&((null==u.renderDistance||a<u.renderDistance)&&w(u,s,a,o),T.isFiltered||(2===T.store&&(null==b?(b=new F(e.ray),w(b,s,a,o),e.results.all.push(b)):a<b.renderDistance&&w(b,s,a,o)),(null==l.renderDistance||a<l.renderDistance)&&w(l,s,a,o),0!==T.store&&(null==h.renderDistance||a>h.renderDistance)&&w(h,s,a,o)))},D=Y;o(D,i,P);const{indices:S,indexCount:B}=g,C=g.vertexAttributes,M=C.getField("position",y),G=new E(M.typedBuffer,3,C.stride/4),I=B/3;if(!f&&I>Q)c.intersectionData??=new A(S,I,G),c.intersectionData.intersectRay(X,D,v,O);else{q(X,D,0,I,(e,t)=>M.getVec(S[t],e),f,v,O)}},w=this._tileIterator;w.reset(s);const O=e.options.invisibleTerrain;for(let o=w.next();o;o=w.next())!(o.visible||O&&o.intersectsClippingArea)||null==f&&!o.intersectsRay(r,n,p,x)||g&&this._useStencilForTile(o)?w.skipSubtree():P(o)}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const r of t)null!=r.renderData?.textureReference&&e.queriesForTile(r);e.process(),t.madeProgress()}}get _desiredSlot(){if(!this._produces())return null;switch(this.transparency){case 0:return 1;case 1:case 2:return 7;case 3:case 4:return null}}acquireTechniques(e){const{shadowMap:t,viewshedEnabled:r,cutFillComputationEnabled:i,slot:s,hasEmission:n,useFloatBlend:a}=e.bind,l=!!has("enable-feature:terrain-shadows")&&t.enabled;if(l!==this._castShadows&&(this._castShadows=l,this._patchesByOriginDirty=!0),this._inViewshed!==r&&(this._inViewshed=r,this._patchesByOriginDirty=!0),this._cutFillEnabled!==i&&(this._cutFillEnabled=i,this._patchesByOriginDirty=!0),3===this.transparency)return null;if(9===s){if(0===(e.renderOccludedMask&b))return null}else if(s!==this._desiredSlot)return null;const o=this._configuration;switch(o.screenSpaceReflections=o.cloudReflections=o.receiveShadows=o.hasShadowHighlights=o.receiveAmbientOcclusion=o.renderOccluded=o.hasHighlightMixTexture=!1,o.hasEmission=n,o.overlayMode=this._overlayRenderer.mode,o.useFloatBlend=a.value,e.output){case 0:case 1:case 2:{const r=e.bind;o.screenSpaceReflections=r.hasScreenSpaceReflections,o.cloudReflections=null!=r.clouds.data;const i=9===s;return o.receiveShadows=t.ready&&!i,o.hasShadowHighlights=U(o,e.bind),o.renderOccluded=i,o.receiveAmbientOcclusion=!i&&null!=r.ssao,o.receiveGlobalIllumination=!i&&r.globalIlluminationEnabled,this._acquireTechnique(e.output)}case 5:case 7:return this._castShadows?this._acquireTechnique(5):null;case 8:return this._inViewshed?this._acquireTechnique(8):null;case 9:return this._cutFillEnabled?this._acquireTechnique(9):null;case 3:case 4:case 11:return this._acquireTechnique(e.output);case 10:return o.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(10):null}return null}render(e,t){switch(this._updatePatchGroups(),this._passParameters.useStencil=!1,this._passParameters.overlayContent=S(e.output,e.bind),e.output){case 0:case 1:case 2:return this._renderMaterialPass(e,t);case 3:case 4:case 11:return this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);case 10:{const r=e.bind.highlight?.name;r&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(r)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 5:case 7:case 8:case 9:return this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const t=this._tileRenderer;let r;if(null!=e){const t=e.toUnitRGBA();r=u(t[0]||0,t[1]||0,t[2]||0)}t.setBackground(r),this._allTiles.forAll(e=>t.updateTileTexture(e,0)),this._configuration.tileBlendInput=t.backgroundIsGrid?2:null!=t.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const r of e)O(r,t);e.sort((e,t)=>D(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness("render-patch-groups"),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),r=e.renderData;if(!r){this._numTilesCulled++;continue}const i=r.localOrigin;if(this._castShadows||this._inViewshed||this._cutFillEnabled){let t=this._allPatchesByOrigin.get(i);t||(t=[],this._allPatchesByOrigin.set(i,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(i);s||(s=[],this._visiblePatchesByOrigin.set(i,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,r){const{rctx:i,bind:s}=e;i.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;r.forEach(r=>{this._drawParameters.origin=r[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let i=0;i<r.length;i++)this._renderPatch(e,t,r[i],V.TRIANGLES,n,null===this._passParameters.overlayContent)}),i.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:r,bind:i}=e,s=r.bindTechnique(t,i,this._passParameters);this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const n=9===i.slot;n&&(s.bindTexture("tex",r.emptyTexture),s.setUniform3fv("textureOpacities",h),s.setUniform4fv("texOffsetAndScale",f));const a=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:h;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",a);const l=this._stencilEnabledLayerExtents.length>0,o=this.wireframe?V.LINES:V.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",r.emptyTexture);for(const c of this._visiblePatchesByOrigin.values()){this._drawParameters.origin=c[0].renderData.localOrigin,t.program.bindDraw(i,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const r of c){const i=r.renderData,a=i.textureReference;if(null!=a){if(!n){s.setUniform4fv("texOffsetAndScale",a.offsetAndScale),s.bindTexture("tex",a.texture.texture);const e=i.textureFadeFactor,t=e<1?i.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(s.setUniform1f("fadeFactor",e),s.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),s.setUniform3fv("nextTexOpacities",t.opacities),s.bindTexture("texNext",t.texture.texture)):s.setUniform1f("fadeFactor",1),i.textureIsFading&&this.setNeedsRender(2),s.setUniform3fv("textureOpacities",a.opacities)}this._renderPatch(e,t,r,o,l),r.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}r.bindVAO(null)}_renderPatch(e,t,r,i,s,n=!1){const a=r.renderData,l=a.vao,o=l?.indexBuffer;if(!l||null==o)return void(R&&console.error("Rendered tile with no indices: ",r.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay);const{rctx:d,bind:h}=e;s&&(this._passParameters.useStencil=this._useStencilForTile(r),d.setPipelineState(t.getPipeline(h,this._passParameters)));const u=a.geometry.indexCount;d.bindVAO(l),c.assertCompatibleVertexAttributeLocations(l),d.drawElements(i,u,o.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(N,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([a({readOnly:!0})],Z.prototype,"visibleTiles",null),e([a({readOnly:!0})],Z.prototype,"_isGlobal",null),e([a()],Z.prototype,"renderOccludedFlags",null),e([a({value:!1})],Z.prototype,"renderingDisabled",null),e([a({value:!0})],Z.prototype,"visible",null),e([a()],Z.prototype,"renderPatchBorders",null),e([a()],Z.prototype,"wireframe",null),Z=e([l("esri.views.3d.terrain.TerrainRenderer")],Z);const J=_(),K=_(),X=_(),Y=_();export{Z as TerrainRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../core/Logger.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{ZEROS as r}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{VectorTileRendererHelper3D as i}from"../../2d/engine/vectorTiles/VectorTileRendererHelper3D.js";import{updateUniformBufferObject as s}from"../../2d/engine/webgl/shaderGraph/uniformBufferUtils.js";import{tileInfoUniformBlockBinding as n,getTileInfoUniforms as o}from"../../2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js";import{viewInfoUniformBlockBinding as a,getViewUniforms as h}from"../../2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js";import{BlendLayersTechnique as c}from"./BlendLayersTechnique.js";import{BlendLayersTechniqueConfiguration as l}from"./BlendLayersTechniqueConfiguration.js";import{RasterColorizerTechnique as u}from"./RasterColorizerTechnique.js";import{RasterColorizerTechniqueConfiguration as f}from"./RasterColorizerTechniqueConfiguration.js";import{MultiSizeFramebuffer as d}from"./support/MultiSizeFramebuffer.js";import{BindParameters as _}from"../webgl-engine/lib/BindParameters.js";import{createQuadVAO as p}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as b}from"../../webgl/enums.js";import m from"../../webgl/Texture.js";import{UniformBufferObject as g}from"../../webgl/UniformBufferObject.js";const x=()=>e.getLogger("esri.views.3d.terrain");class T{constructor(e,t){this._rctx=e,this._techniques=t,this._fbos=[],this._vectorTileHelper=new i,this._tileInfoUniformBufferObject=null,this._viewInfoUniformBufferObject=null,this._blendConfiguration=new l,this._current=0,this._lastUsedIds=new Array,this._lastCreatedBufferId=0,this._onHoldIds=new Array,this._vao=p(this._rctx,1),this._bindParameters=new _(null)}dispose(){this._bindParameters.destroy(),this._fbos.forEach(t),this._fbos=null,this._vtFBO=t(this._vtFBO),this._vao=t(this._vao),this._vectorTileHelper=t(this._vectorTileHelper),this._tileInfoUniformBufferObject?.dispose(),this._tileInfoUniformBufferObject=null,this._viewInfoUniformBufferObject?.dispose(),this._viewInfoUniformBufferObject=null}updateHeading(e){this._vectorTileHelper?.updateHeading(e)}_acquireBlendTechnique(e,t,r,i=!1,s=0){return this._blendConfiguration.output=t,this._blendConfiguration.blendMode=e,this._blendConfiguration.applyBaseOpacity=r,this._blendConfiguration.premultipliedAlphaSource=i,this._blendConfiguration.background=s,this._techniques.precompile(c,this._blendConfiguration),this._techniques.get(c,this._blendConfiguration)}drawBackground(e,t){const r=this._acquireBlendTechnique(0,t?2:3,!1,!1,1),i=this._rctx.bindTechnique(r,this._bindParameters,e);this._render(i)}_render(e){this._rctx.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),this._rctx.drawArrays(b.TRIANGLE_STRIP,0,this._vao.vertexCount("geometry"))}drawGroup(e,t,r,i,s=!0){1===t&&(e.fboTexture=this._fbos[this.getLastOnHoldId()].get(r).colorTexture??this._rctx.emptyTexture),e.texture=this.currentFBO(r).colorTexture,this.closeGroup(r);const n=e.baseOpacity<1,o=this._acquireBlendTechnique(i,t,n,s),a=this._rctx.bindTechnique(o,this._bindParameters,e);this._render(a)}drawImageData(e,t,r,i,s=!1){if(null==e.texture)return;const n=e.baseOpacity<1;e.fboTexture=(4===t||0===i&&!n&&!s?null:this.switch(r).colorTexture)??this._rctx.emptyTexture;const o=this._acquireBlendTechnique(i,t,n,s),a=this._rctx.bindTechnique(o,this._bindParameters,e);this._render(a)}drawRasterData(e,t,r,i,s){const n=s.sourceLayerInfo.data;if(!n.source)return;if(s.tile.surface.layerViewByIndex(s.layerIndex,1).ensureSymbolizerParameters(n),!n.bind(this._rctx))return;const o=e.baseOpacity<1;e.fboTexture=(0!==i||o?this.switch(r).colorTexture:null)??this._rctx.emptyTexture;const a=this._acquireRasterTechnique(n,t,i,o);if(!a)return;n.opacity=e.opacity;const h=n.getUniforms(this._rctx);h.scale=s.scale,h.offset=s.offset,h.backgroundColor=e.backgroundColor,h.fboTexture=e.fboTexture,h.baseOpacity=e.baseOpacity;const c=this._rctx.bindTechnique(a,this._bindParameters,h);this._render(c)}_acquireRasterTechnique(e,t,r,i){if(!this._rctx.capabilities.colorBufferFloat)return null;const s=e.symbolizerParameters,n=["stretch","lut","hillshade"].indexOf(s.type);return this._rasterConfiguration??=new f,this._rasterConfiguration.output=t,this._rasterConfiguration.blendMode=r,this._rasterConfiguration.applyBaseOpacity=i,this._rasterConfiguration.colorizerType=n,this._rasterConfiguration.applyColormap=!!s.colormap,this._rasterConfiguration.requireBilinearWithNN=e.isBilinearWithStretchColorRamp,this._rasterConfiguration.stretchType=e.hasStretchTypeNone()?0:1,this._techniques.precompile(u,this._rasterConfiguration),this._techniques.get(u,this._rasterConfiguration)}drawVectorData(e,t,i,s,n,o,a,h){const c=this._rctx,l=n.sourceLayerInfo.data,u=n.tile.surface.layerViewByIndex(n.layerIndex,1),f=u.painter,_=u.layer.styleRepository,p=u.schemaHelper,b=u.tilingScheme,m=Math.round(1/n.scale),g=u.contentZoom,T=e.baseOpacity<1,B=T||e.opacity<1||0!==s||1!==t,I=B,y=this._acquireBlendTechnique(s,t,T,I);c.setPipelineState(y.getPipeline(this._bindParameters,e));let w=null,O=null;B?(O=this.currentFBO(i),null==this._vtFBO&&(this._vtFBO=new d(this._rctx)),w=this._vtFBO.get(i),c.bindFramebuffer(w),this._clearCurrentFBO()):h&&c.clear(256);try{if(l||_.backgroundBucketIds.length>0){const e=this._vectorTileHelper.updateViewRenderParameters(c,n.sourceLod,l,f,p,b,m,n.offset,a,o,g);this._updateViewInfo(e),this._updateTileInfo(e)}this._vectorTileHelper.renderBackground(c,n.sourceLod,l,f,_,p,b),l&&this._vectorTileHelper.renderContent(c,l,n.vtlNeighborInfos,f,_)}catch(C){x().warnOnce("A render call containing vector tiles did not resolve correctly.",C)}return!w||(c.bindFramebuffer(O),e.texture=w.colorTexture,e.offset=r,e.scale=1,this.drawImageData(e,t,i,s,I),h)}_updateTileInfo(e){const t=this._tileInfoUniformBufferObject??(this._tileInfoUniformBufferObject=new g(this._rctx,n.descriptor));s(t,n,o(e)),this._rctx.bindUBO(n.bindingPoint,t)}_updateViewInfo(e){const t=this._viewInfoUniformBufferObject??(this._viewInfoUniformBufferObject=new g(this._rctx,a.descriptor));s(t,a,h(e)),this._rctx.bindUBO(a.bindingPoint,t)}copyFBOToTexture(e){const t=this._rctx,r=t.bindTexture(e.texture,m.TEXTURE_UNIT_FOR_UPDATES),i=e.descriptor;t.gl.copyTexImage2D(3553,0,i.pixelFormat,0,0,i.width,i.height,0),e.generateMipmap(),t.bindTexture(r,m.TEXTURE_UNIT_FOR_UPDATES)}_clearCurrentFBO(){this._rctx.setStencilWriteMask(255),this._rctx.setClearColor(0,0,0,0),this._rctx.setClearDepth(1),this._rctx.setClearStencil(0),this._rctx.clear(17664)}_initFBO(e,t,r){this._rctx.bindFramebuffer(e),r&&(this._rctx.setViewport(0,0,t,t),this._clearCurrentFBO())}ensureBuffer(e){this._lastUsedIds.length=0,this._lastUsedIds.push(1),this._lastCreatedBufferId=1,this._onHoldIds.length=0,this.bind(e)}bind(e,t=0,r=!0){if(this._current=t,t>=this._fbos.length)for(let i=this._fbos.length;i<=t;i++)this._fbos.push(new d(this._rctx));this._initFBO(this._fbos[t].get(e),e,r)}_bindNextFreeBuffer(e){this._lastUsedIds.length>0?this.bind(e,this._lastUsedIds.pop()):(this._lastCreatedBufferId++,this.bind(e,this._lastCreatedBufferId))}openGroup(e){this._onHoldIds.push(this._current),this._bindNextFreeBuffer(e)}switch(e){const t=this.currentFBO(e),r=this._current;return this._bindNextFreeBuffer(e),this._lastUsedIds.push(r),t}getLastOnHoldId(){return this._onHoldIds[this._onHoldIds.length-1]}closeGroup(e){const t=this._current;this._bindNextFreeBuffer(e),this._lastUsedIds.push(t),this._lastUsedIds.push(this._onHoldIds.pop())}unbind(){this._rctx.bindFramebuffer(null)}currentFBO(e){return this._fbos[this._current].get(e)}}export{T as TileCompositor};
2
+ import e from"../../../core/Logger.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{ZEROS as r}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{VectorTileRendererHelper3D as i}from"../../2d/engine/vectorTiles/VectorTileRendererHelper3D.js";import{updateUniformBufferObject as s}from"../../2d/engine/webgl/shaderGraph/uniformBufferUtils.js";import{tileInfoUniformBlockBinding as n,getTileInfoUniforms as o}from"../../2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js";import{viewInfoUniformBlockBinding as a,getViewUniforms as h}from"../../2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js";import{BlendLayersTechnique as c}from"./BlendLayersTechnique.js";import{BlendLayersTechniqueConfiguration as l}from"./BlendLayersTechniqueConfiguration.js";import{RasterColorizerTechnique as u}from"./RasterColorizerTechnique.js";import{RasterColorizerTechniqueConfiguration as f}from"./RasterColorizerTechniqueConfiguration.js";import{MultiSizeFramebuffer as d}from"./support/MultiSizeFramebuffer.js";import{BindParameters as _}from"../webgl-engine/lib/BindParameters.js";import{createQuadVAO as p}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as b}from"../../webgl/enums.js";import m from"../../webgl/Texture.js";import{UniformBufferObject as g}from"../../webgl/UniformBufferObject.js";const x=()=>e.getLogger("esri.views.3d.terrain");class T{constructor(e,t){this._rctx=e,this._techniques=t,this._fbos=[],this._vectorTileHelper=new i,this._tileInfoUniformBufferObject=null,this._viewInfoUniformBufferObject=null,this._blendConfiguration=new l,this._current=0,this._lastUsedIds=new Array,this._lastCreatedBufferId=0,this._onHoldIds=new Array,this._vao=p(this._rctx,1),this._bindParameters=new _(null)}dispose(){this._bindParameters.destroy(),this._fbos.forEach(t),this._fbos=null,this._vtFBO=t(this._vtFBO),this._vao=t(this._vao),this._vectorTileHelper=t(this._vectorTileHelper),this._tileInfoUniformBufferObject?.dispose(),this._tileInfoUniformBufferObject=null,this._viewInfoUniformBufferObject?.dispose(),this._viewInfoUniformBufferObject=null}updateHeading(e){this._vectorTileHelper?.updateHeading(e)}_acquireBlendTechnique(e,t,r,i=!1,s=0){return this._blendConfiguration.output=t,this._blendConfiguration.blendMode=e,this._blendConfiguration.applyBaseOpacity=r,this._blendConfiguration.premultipliedAlphaSource=i,this._blendConfiguration.background=s,this._techniques.precompile(c,this._blendConfiguration),this._techniques.get(c,this._blendConfiguration)}drawBackground(e,t){const r=this._acquireBlendTechnique(0,t?2:3,!1,!1,1),i=this._rctx.bindTechnique(r,this._bindParameters,e);this._render(i)}_render(e){this._rctx.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),this._rctx.drawArrays(b.TRIANGLE_STRIP,0,this._vao.vertexCount("geometry"))}drawGroup(e,t,r,i,s=!0){1===t&&(e.fboTexture=this._fbos[this.getLastOnHoldId()].get(r).colorTexture??this._rctx.emptyTexture),e.texture=this.currentFBO(r).colorTexture,this.closeGroup(r);const n=e.baseOpacity<1,o=this._acquireBlendTechnique(i,t,n,s),a=this._rctx.bindTechnique(o,this._bindParameters,e);this._render(a)}drawImageData(e,t,r,i,s=!1){if(null==e.texture)return;const n=e.baseOpacity<1;e.fboTexture=(4===t||0===i&&!n&&!s?null:this.switch(r).colorTexture)??this._rctx.emptyTexture;const o=this._acquireBlendTechnique(i,t,n,s),a=this._rctx.bindTechnique(o,this._bindParameters,e);this._render(a)}drawRasterData(e,t,r,i,s){const n=s.sourceLayerInfo.data;if(!n.source)return;const o=s.tile.surface.layerViewByIndex(s.layerIndex,1);if("ensureSymbolizerParameters"in o&&o.ensureSymbolizerParameters(n),!n.bind(this._rctx))return;const a=e.baseOpacity<1;e.fboTexture=(0!==i||a?this.switch(r).colorTexture:null)??this._rctx.emptyTexture;const h=this._acquireRasterTechnique(n,t,i,a);if(!h)return;n.opacity=e.opacity;const c=n.getUniforms(this._rctx);c.scale=s.scale,c.offset=s.offset,c.backgroundColor=e.backgroundColor,c.fboTexture=e.fboTexture,c.baseOpacity=e.baseOpacity;const l=this._rctx.bindTechnique(h,this._bindParameters,c);this._render(l)}_acquireRasterTechnique(e,t,r,i){if(!this._rctx.capabilities.colorBufferFloat)return null;const s=e.symbolizerParameters,n=["stretch","lut","hillshade"].indexOf(s.type);return this._rasterConfiguration??=new f,this._rasterConfiguration.output=t,this._rasterConfiguration.blendMode=r,this._rasterConfiguration.applyBaseOpacity=i,this._rasterConfiguration.colorizerType=n,this._rasterConfiguration.applyColormap=!!s.colormap,this._rasterConfiguration.requireBilinearWithNN=e.isBilinearWithStretchColorRamp,this._rasterConfiguration.stretchType=e.hasStretchTypeNone()?0:1,this._techniques.precompile(u,this._rasterConfiguration),this._techniques.get(u,this._rasterConfiguration)}drawVectorData(e,t,i,s,n,o,a,h){const c=this._rctx,l=n.sourceLayerInfo.data,u=n.tile.surface.layerViewByIndex(n.layerIndex,1),f=u.painter,_=u.layer.styleRepository,p=u.schemaHelper,b=u.tilingScheme,m=Math.round(1/n.scale),g=u.contentZoom,T=e.baseOpacity<1,B=T||e.opacity<1||0!==s||1!==t,I=B,y=this._acquireBlendTechnique(s,t,T,I);c.setPipelineState(y.getPipeline(this._bindParameters,e));let w=null,O=null;B?(O=this.currentFBO(i),null==this._vtFBO&&(this._vtFBO=new d(this._rctx)),w=this._vtFBO.get(i),c.bindFramebuffer(w),this._clearCurrentFBO()):h&&c.clear(256);try{if(l||_.backgroundBucketIds.length>0){const e=this._vectorTileHelper.updateViewRenderParameters(c,n.sourceLod,l,f,p,b,m,n.offset,a,o,g);this._updateViewInfo(e),this._updateTileInfo(e)}this._vectorTileHelper.renderBackground(c,n.sourceLod,l,f,_,p,b),l&&this._vectorTileHelper.renderContent(c,l,n.vtlNeighborInfos,f,_)}catch(C){x().warnOnce("A render call containing vector tiles did not resolve correctly.",C)}return!w||(c.bindFramebuffer(O),e.texture=w.colorTexture,e.offset=r,e.scale=1,this.drawImageData(e,t,i,s,I),h)}_updateTileInfo(e){const t=this._tileInfoUniformBufferObject??(this._tileInfoUniformBufferObject=new g(this._rctx,n.descriptor));s(t,n,o(e)),this._rctx.bindUBO(n.bindingPoint,t)}_updateViewInfo(e){const t=this._viewInfoUniformBufferObject??(this._viewInfoUniformBufferObject=new g(this._rctx,a.descriptor));s(t,a,h(e)),this._rctx.bindUBO(a.bindingPoint,t)}copyFBOToTexture(e){const t=this._rctx,r=t.bindTexture(e.texture,m.TEXTURE_UNIT_FOR_UPDATES),i=e.descriptor;t.gl.copyTexImage2D(3553,0,i.pixelFormat,0,0,i.width,i.height,0),e.generateMipmap(),t.bindTexture(r,m.TEXTURE_UNIT_FOR_UPDATES)}_clearCurrentFBO(){this._rctx.setStencilWriteMask(255),this._rctx.setClearColor(0,0,0,0),this._rctx.setClearDepth(1),this._rctx.setClearStencil(0),this._rctx.clear(17664)}_initFBO(e,t,r){this._rctx.bindFramebuffer(e),r&&(this._rctx.setViewport(0,0,t,t),this._clearCurrentFBO())}ensureBuffer(e){this._lastUsedIds.length=0,this._lastUsedIds.push(1),this._lastCreatedBufferId=1,this._onHoldIds.length=0,this.bind(e)}bind(e,t=0,r=!0){if(this._current=t,t>=this._fbos.length)for(let i=this._fbos.length;i<=t;i++)this._fbos.push(new d(this._rctx));this._initFBO(this._fbos[t].get(e),e,r)}_bindNextFreeBuffer(e){this._lastUsedIds.length>0?this.bind(e,this._lastUsedIds.pop()):(this._lastCreatedBufferId++,this.bind(e,this._lastCreatedBufferId))}openGroup(e){this._onHoldIds.push(this._current),this._bindNextFreeBuffer(e)}switch(e){const t=this.currentFBO(e),r=this._current;return this._bindNextFreeBuffer(e),this._lastUsedIds.push(r),t}getLastOnHoldId(){return this._onHoldIds[this._onHoldIds.length-1]}closeGroup(e){const t=this._current;this._bindNextFreeBuffer(e),this._lastUsedIds.push(t),this._lastUsedIds.push(this._onHoldIds.pop())}unbind(){this._rctx.bindFramebuffer(null)}currentFBO(e){return this._fbos[this._current].get(e)}}export{T as TileCompositor};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{clamp as t}from"../../../../core/mathUtils.js";import{estimateNumberArrayMemory as e}from"../../../../core/memoryEstimations.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r,copy as s,nan as o,fromValues as i}from"../../../../geometry/support/aaBoundingBox.js";import{intersectsTransformedAabb as a}from"../../../../geometry/support/frustumPlanes.js";import{newContinuousIndexArray as c}from"../../../../geometry/support/Indices.js";import{createPositionReader as l}from"./PositionReader.js";import{MeshIntersectionOptions as h,intersectRayTriangles as g}from"./RayIntersections.js";import{forEachTriangleRangeScreenPolygonHit as m}from"./screenPolygonTriangleIntersections.js";const d=40,u=.8,y=10,_=1e-6;class p{constructor(e,r,s){this.globalTriangleVertexIndices=e,this.numTriangles=r,this.positions=s,this._rayDirection=n(),this._callback=M,this._intersectionOptions=T,this._screenPolygonCallback=R,this._screenPolygonDisplacement=null,this._screenPolygonIntersector=null,this._screenPolygonQuery=null,this._screenPolygonTransformation=null,this.bspNodeTree=new Array,this.triangleIndexMap=c(r),this._readPosition=l(s.data,e,s.stride);const o=b(e,r,s.data,s.stride),i=t(Math.log2(r/d),2,y),a=(t,e,n)=>{const r=x(this.triangleIndexMap,o,t,e),s=e-t;if(s<=d){const n=new P(r,void 0,0,t,e);return this.bspNodeTree.push(n),n}const{axis:c,midValue:l}=I(r),h=f(this.triangleIndexMap,o,t,e,c,l),g=(t,e)=>{if(n>i)return;const r=e-t;return r<d||r>=u*s?void 0:a(t,e,n+1)},m=new P(r,c,l,h.next,h.mid);return this.bspNodeTree.push(m),m.leftNode=g(t,h.next),m.rightNode=g(h.mid,e),m};a(0,r,0)}intersectRayTriangleRange(t,e){if(t>=e)return;const{data:n,stride:r}=this.positions;g(this._rayFrom,this._rayDirection,t,e,this.globalTriangleVertexIndices,n,r,this._intersectionOptions.normalRequired,this._callback,this.triangleIndexMap),p.numFacesTested+=e-t}forEachScreenPolygonHit(t,e,n,r,s){null!=t.camera&&0!==this.bspNodeTree.length&&(this._screenPolygonIntersector=t,this._screenPolygonTransformation=e,this._screenPolygonQuery=n,this._screenPolygonDisplacement=r,this._screenPolygonCallback=s,this._intersectScreenPolygonBSP(this.bspNodeTree[0],0,this.triangleIndexMap.length),this._screenPolygonCallback=R,this._screenPolygonDisplacement=null,this._screenPolygonQuery=null,this._screenPolygonTransformation=null,this._screenPolygonIntersector=null)}intersectRay(t,e,n,r){p.numFacesTested=0;const s=t,o=e,i=o[0]-s[0],a=o[1]-s[1],c=o[2]-s[2];if(i*i+a*a+c*c<_)return;this._rayFrom=s;const l=this._rayDirection;l[0]=i,l[1]=a,l[2]=c;const h=this.triangleIndexMap.length;this._callback=r,this._intersectionOptions=n,this.intersectRayBSP(this.bspNodeTree[0],0,h),this._callback=M,this._intersectionOptions=T}intersectRayBSP(t,e,n){const r=this._rayFrom,s=this._rayDirection;this._traverseBSP(t,e,n,t=>S(t.aabb,r,s),t=>{const e=t.axis;return r[e]<t.d||s[e]<0},t=>{const e=t.axis;return r[e]>t.d||s[e]>0},(t,e)=>this.intersectRayTriangleRange(t,e))}_intersectScreenPolygonTriangleRange(t,e){if(t>=e)return;const n=this._screenPolygonIntersector,r=this._screenPolygonQuery;if(null!=n&&null!=r)for(const s of m(n,this._screenPolygonTransformation,r,t,e,this._readPosition,this._screenPolygonDisplacement,this.triangleIndexMap))this._screenPolygonCallback(s.distance,s.primitiveIndex,s.point)}_intersectScreenPolygonBSP(t,e,n){const r=this._screenPolygonIntersector,s=this._screenPolygonQuery;null!=r?.camera&&null!=s&&this._traverseBSP(t,e,n,t=>this._nodeIntersectsScreenPolygonBroadPhase(t.aabb),()=>!0,()=>!0,(t,e)=>this._intersectScreenPolygonTriangleRange(t,e))}_traverseBSP(t,e,n,r,s,o,i){const a=[{node:t,rangeStart:e,rangeEnd:n}];for(;a.length>0;){const{node:t,rangeStart:e,rangeEnd:n}=a.pop();r(t)&&(s(t)&&this._traverseBSPRange(a,t.leftNode,e,t.midStartIndex,i),i(t.midStartIndex,t.rightStartIndex),o(t)&&this._traverseBSPRange(a,t.rightNode,t.rightStartIndex,n,i))}}_traverseBSPRange(t,e,n,r,s){n>=r||(void 0!==e?t.push({node:e,rangeStart:n,rangeEnd:r}):s(n,r))}_nodeIntersectsScreenPolygonBroadPhase(t){const e=this._screenPolygonQuery;if(null==e)return!1;const n=this._screenPolygonDisplacement,r=n?n.applyToAabb(s(B,t)):t;return a(e.broadPhaseFrustum,r,this._screenPolygonTransformation)}static{this.numFacesTested=0}get estimatedMemoryUsage(){return e(this.triangleIndexMap)}}class P{constructor(t,e,n,r,s){this.aabb=t,this.axis=e,this.d=n,this.midStartIndex=r,this.rightStartIndex=s}}function f(t,e,n,r,s,o){const i=s+3;let a=n,c=n,l=r;for(;c<l;){const n=t[c],r=6*n;e[r+i]<=o?(t[c]=t[a],t[a]=n,++a,++c):e[r+s]>=o?(--l,t[c]=t[l],t[l]=n):++c}return{next:a,mid:l}}function x(t,e,n,r){if(r<=n)return o;let s=6*t[n],a=e[s++],c=e[s++],l=e[s++],h=e[s++],g=e[s++],m=e[s];for(let o=n+1;o<r;++o)s=6*t[o],a=Math.min(a,e[s++]),c=Math.min(c,e[s++]),l=Math.min(l,e[s++]),h=Math.max(h,e[s++]),g=Math.max(g,e[s++]),m=Math.max(m,e[s]);return i(a,c,l,h,g,m)}function I(t){const e=t[3]-t[0],n=t[4]-t[1],r=t[5]-t[2],s=e>n?e>r?0:n>r?1:2:n>r?1:r>e?2:0;return{axis:s,midValue:(t[s]+t[s+3])/2}}function b(t,e,n,r){const s=new Float64Array(6*e);for(let o=0;o<e;++o){const e=3*o,i=t[e]*r,a=t[e+1]*r,c=t[e+2]*r;for(let t=0;t<3;++t){const e=n[i+t],r=n[a+t],l=n[c+t];s[6*o+t]=Math.min(e,r,l),s[6*o+3+t]=Math.max(e,r,l)}}return s}function S(t,e,n){const r=e,s=n;let o=0,i=1/0;for(let a=0;a<3;++a){{const e=t[a];if(r[a]<e){if(s[a]<=_)return!1;const t=(e-r[a])/s[a];o=Math.max(o,t)}else if(s[a]<=-_){const t=(e-r[a])/s[a];i=Math.min(i,t)}if(o>i)return!1}{const e=t[a+3];if(r[a]>e){if(s[a]>=-_)return!1;const t=(e-r[a])/s[a];o=Math.max(o,t)}else if(s[a]>=_){const t=(e-r[a])/s[a];i=Math.min(i,t)}if(o>i)return!1}}return!0}const T=new h,M=()=>{},R=()=>{},B=r();export{p as TriangleIntersectionData};
2
+ import{clamp as t}from"../../../../core/mathUtils.js";import{estimateNumberArrayMemory as e}from"../../../../core/memoryEstimations.js";import{isFloat32Array as n}from"../../../../core/typedArrayUtil.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s,copy as o,nan as i,fromValues as a}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as c}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as l}from"../../../../geometry/support/FloatArray.js";import{intersectsTransformedAabb as h}from"../../../../geometry/support/frustumPlanes.js";import{newContinuousIndexArray as g}from"../../../../geometry/support/Indices.js";import{createPositionReader as m}from"./PositionReader.js";import{MeshIntersectionOptions as d,intersectRayTriangles as u}from"./RayIntersections.js";import{forEachTriangleRangeScreenPolygonHit as y}from"./screenPolygonTriangleIntersections.js";const p=40,_=.8,f=10,P=1e-6;class x{constructor(e,n,s){this.globalTriangleVertexIndices=e,this.numTriangles=n,this.positions=s,this._rayDirection=r(),this._callback=j,this._intersectionOptions=B,this._screenPolygonCallback=v,this._screenPolygonDisplacement=null,this._screenPolygonIntersector=null,this._screenPolygonQuery=null,this._screenPolygonTransformation=null,this.bspNodeTree=new Array,this.triangleIndexMap=g(n),this._readPosition=m(s.data,e,s.stride);const o=M(e,n,s.data,s.stride),i=t(Math.log2(n/p),2,f),a=(t,e,n)=>{const r=S(this.triangleIndexMap,o,t,e),s=e-t;if(s<=p){const n=new b(r,void 0,0,t,e);return this.bspNodeTree.push(n),n}const{axis:c,midValue:l}=T(r),h=I(this.triangleIndexMap,o,t,e,c,l),g=(t,e)=>{if(n>i)return;const r=e-t;return r<p||r>=_*s?void 0:a(t,e,n+1)},m=new b(r,c,l,h.next,h.mid);return this.bspNodeTree.push(m),m.leftNode=g(t,h.next),m.rightNode=g(h.mid,e),m};a(0,n,0)}intersectRayTriangleRange(t,e){if(t>=e)return;const{data:n,stride:r}=this.positions;u(this._rayFrom,this._rayDirection,t,e,this.globalTriangleVertexIndices,n,r,this._intersectionOptions.normalRequired,this._callback,this.triangleIndexMap),x.numFacesTested+=e-t}forEachScreenPolygonHit(t,e,n,r,s){null!=t.camera&&0!==this.bspNodeTree.length&&(this._screenPolygonIntersector=t,this._screenPolygonTransformation=e,this._screenPolygonQuery=n,this._screenPolygonDisplacement=r,this._screenPolygonCallback=s,this._intersectScreenPolygonBSP(this.bspNodeTree[0],0,this.triangleIndexMap.length),this._screenPolygonCallback=v,this._screenPolygonDisplacement=null,this._screenPolygonQuery=null,this._screenPolygonTransformation=null,this._screenPolygonIntersector=null)}intersectRay(t,e,n,r){x.numFacesTested=0;const s=t,o=e,i=o[0]-s[0],a=o[1]-s[1],c=o[2]-s[2];if(i*i+a*a+c*c<P)return;this._rayFrom=s;const l=this._rayDirection;l[0]=i,l[1]=a,l[2]=c;const h=this.triangleIndexMap.length;this._callback=r,this._intersectionOptions=n,this.intersectRayBSP(this.bspNodeTree[0],0,h),this._callback=j,this._intersectionOptions=B}intersectRayBSP(t,e,n){const r=this._rayFrom,s=this._rayDirection;this._traverseBSP(t,e,n,t=>R(t.aabb,r,s),t=>{const e=t.axis;return r[e]<t.d||s[e]<0},t=>{const e=t.axis;return r[e]>t.d||s[e]>0},(t,e)=>this.intersectRayTriangleRange(t,e))}_intersectScreenPolygonTriangleRange(t,e){if(t>=e)return;const n=this._screenPolygonIntersector,r=this._screenPolygonQuery;if(null!=n&&null!=r)for(const s of y(n,this._screenPolygonTransformation,r,t,e,this._readPosition,this._screenPolygonDisplacement,this.triangleIndexMap))this._screenPolygonCallback(s.distance,s.primitiveIndex,s.point)}_intersectScreenPolygonBSP(t,e,n){const r=this._screenPolygonIntersector,s=this._screenPolygonQuery;null!=r?.camera&&null!=s&&this._traverseBSP(t,e,n,t=>this._nodeIntersectsScreenPolygonBroadPhase(t.aabb),()=>!0,()=>!0,(t,e)=>this._intersectScreenPolygonTriangleRange(t,e))}_traverseBSP(t,e,n,r,s,o,i){const a=[{node:t,rangeStart:e,rangeEnd:n}];for(;a.length>0;){const{node:t,rangeStart:e,rangeEnd:n}=a.pop();r(t)&&(s(t)&&this._traverseBSPRange(a,t.leftNode,e,t.midStartIndex,i),i(t.midStartIndex,t.rightStartIndex),o(t)&&this._traverseBSPRange(a,t.rightNode,t.rightStartIndex,n,i))}}_traverseBSPRange(t,e,n,r,s){n>=r||(void 0!==e?t.push({node:e,rangeStart:n,rangeEnd:r}):s(n,r))}_nodeIntersectsScreenPolygonBroadPhase(t){const e=this._screenPolygonQuery;if(null==e)return!1;const n=this._screenPolygonDisplacement,r=n?n.applyToAabb(o(D,t)):t;return h(e.broadPhaseFrustum,r,this._screenPolygonTransformation)}static{this.numFacesTested=0}get estimatedMemoryUsage(){return e(this.triangleIndexMap)}}class b{constructor(t,e,n,r,s){this.aabb=t,this.axis=e,this.d=n,this.midStartIndex=r,this.rightStartIndex=s}}function I(t,e,n,r,s,o){const i=s+3;let a=n,c=n,l=r;for(;c<l;){const n=t[c],r=6*n;e[r+i]<=o?(t[c]=t[a],t[a]=n,++a,++c):e[r+s]>=o?(--l,t[c]=t[l],t[l]=n):++c}return{next:a,mid:l}}function S(t,e,n,r){if(r<=n)return i;let s=6*t[n],o=e[s++],c=e[s++],l=e[s++],h=e[s++],g=e[s++],m=e[s];for(let i=n+1;i<r;++i)s=6*t[i],o=Math.min(o,e[s++]),c=Math.min(c,e[s++]),l=Math.min(l,e[s++]),h=Math.max(h,e[s++]),g=Math.max(g,e[s++]),m=Math.max(m,e[s]);return a(o,c,l,h,g,m)}function T(t){const e=t[3]-t[0],n=t[4]-t[1],r=t[5]-t[2],s=e>n?e>r?0:n>r?1:2:n>r?1:r>e?2:0;return{axis:s,midValue:(t[s]+t[s+3])/2}}function M(t,e,r,s){const o=n(r)?l(6*e,!0):c(6*e);for(let n=0;n<e;++n){const e=3*n,i=t[e]*s,a=t[e+1]*s,c=t[e+2]*s;for(let t=0;t<3;++t){const e=r[i+t],s=r[a+t],l=r[c+t];o[6*n+t]=Math.min(e,s,l),o[6*n+3+t]=Math.max(e,s,l)}}return o}function R(t,e,n){const r=e,s=n;let o=0,i=1/0;for(let a=0;a<3;++a){{const e=t[a];if(r[a]<e){if(s[a]<=P)return!1;const t=(e-r[a])/s[a];o=Math.max(o,t)}else if(s[a]<=-P){const t=(e-r[a])/s[a];i=Math.min(i,t)}if(o>i)return!1}{const e=t[a+3];if(r[a]>e){if(s[a]>=-P)return!1;const t=(e-r[a])/s[a];o=Math.max(o,t)}else if(s[a]>=P){const t=(e-r[a])/s[a];i=Math.min(i,t)}if(o>i)return!1}}return!0}const B=new d,j=()=>{},v=()=>{},D=s();export{x as TriangleIntersectionData};
@@ -20,12 +20,13 @@ export interface DOMContainerProperties extends Partial<Pick<DOMContainer, "aria
20
20
  */
21
21
  container?: HTMLDivElement | string | null;
22
22
  /**
23
- * Indicates whether the focus region is currently enabled.
24
- *
25
- * Set this property to `true` to show the centered focus region once the view is ready, or `false` to hide it.
23
+ * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
24
+ * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
26
25
  *
27
26
  * @default false
28
27
  * @since 5.2
28
+ * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
29
+ * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
29
30
  */
30
31
  focusRegionEnabled?: boolean;
31
32
  /**
@@ -116,20 +117,29 @@ export abstract class DOMContainer {
116
117
  */
117
118
  get focused(): boolean;
118
119
  /**
119
- * The screen rectangle for the active focus region.
120
+ * The screen rectangle of the active focus region, or `null` when [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) is `false`.
121
+ * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`.
122
+ *
123
+ * | Action | Keyboard Shortcut / Property |
124
+ * |--------|----------------------------|
125
+ * | Enable or disable focus region | Use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view component is in focus or set the [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) property to `true` or `false`. |
126
+ * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. |
120
127
  *
121
- * The value is `null` when [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) is `false`.
128
+ * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
122
129
  *
123
130
  * @since 5.2
131
+ * @see [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled)
132
+ * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
124
133
  */
125
134
  get focusRegion(): ScreenRect | null;
126
135
  /**
127
- * Indicates whether the focus region is currently enabled.
128
- *
129
- * Set this property to `true` to show the centered focus region once the view is ready, or `false` to hide it.
136
+ * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
137
+ * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
130
138
  *
131
139
  * @default false
132
140
  * @since 5.2
141
+ * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
142
+ * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
133
143
  */
134
144
  accessor focusRegionEnabled: boolean;
135
145
  /**
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{throwIfDestroyed as c,throwIfAborted as g,createAbortError as m}from"../core/promiseUtils.js";import y from"../core/ReactiveSet.js";import{on as f,watch as w,initial as v,sync as _,whenOnce as b,syncAndInitial as M}from"../core/reactiveUtils.js";import{setFrameDuration as S,cleanupScheduling as V}from"../core/scheduling.js";import{createScreenPoint as j,createScreenPointArray as C}from"../core/screenUtils.js";import{cleanupWhereClauseCache as T}from"../core/sql.js";import{getMetersPerUnitForSR as R}from"../core/units.js";import{property as x,cast as A,subclass as O}from"../core/accessorSupport/decorators.js";import{ensureType as E,ensureClass as L}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as I}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as H}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as P}from"../core/accessorSupport/trackingUtils.js";import{create as D}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as F}from"../core/libs/rbush/PooledRBush.js";import{initialize as U}from"../core/workers/workers.js";import G from"../geometry/Extent.js";import W from"../geometry/HeightModelInfo.js";import z from"../geometry/Point.js";import{project as q,canProjectWithoutEngine as k}from"../geometry/projectionUtils.js";import B from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as N}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Z}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as Q}from"../geometry/projection/projectPointToVector.js";import{toExtent as Y,create as $}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as J}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as K}from"../geometry/support/scaleUtils.js";import{wgs84 as X,webMercator as ee}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as te}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as ie,isTiledLayer as re,isVoxelLayer as se,isIntegratedMeshLayer as ne,isGaussianSplatLayer as ae}from"../layers/support/layerUtils.js";import{TilemapCache as oe}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as le}from"../portal/portalDefault.js";import{WebSceneTag as pe}from"../support/tagSymbols.js";import{BreakpointsOwner as he}from"./BreakpointsOwner.js";import{DOMContainer as de}from"./DOMContainer.js";import{PopupView as ue}from"./PopupView.js";import ce from"./View.js";import ge from"./ViewAnimation.js";import{stringFromViewingMode as me,viewingModeFromString as ye}from"./ViewingMode.js";import{GroundView3D as fe}from"./3d/GroundView3D.js";import{layerView3DImporter as we}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as ve}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as _e}from"./3d/camera/intersectionUtils.js";import be from"./3d/constraints/Constraints.js";import Me from"./3d/environment/Environment.js";import{EnvironmentManager as Se}from"./3d/environment/EnvironmentManager.js";import Ve from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as je}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Ce}from"./3d/layers/graphics/Labeler.js";import Te from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as Re}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as xe}from"./3d/state/ScreenSizePerspective.js";import Ae from"./3d/state/ViewState.js";import{ViewStateManager as Oe,cleanupViewStateManager as Ee}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Le}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Ie}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as He}from"./3d/state/utils/navigationUtils.js";import Pe from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as De}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Fe}from"./3d/support/debugFlags.js";import{getElevationAtPoint as Ue}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as Ge}from"./3d/support/GroundAndIMSurface.js";import{toMap as We,hitTest as ze}from"./3d/support/hitTest.js";import{popupHitTest as qe}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as ke,getQualityProfileSettings as Be}from"./3d/support/QualityProfile.js";import Ne from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ze}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Qe}from"./3d/support/ResourceController.js";import Ye from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as $e}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Je}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Ke}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Xe from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as et,getTiledLayerInfo as tt,checkIfTileInfoSupportedForView as it}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as rt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as st}from"./3d/terrain/TileRenderer.js";import{Stage as nt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as at}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as ot}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as lt}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as pt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as ht}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as dt}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ut from"./interactive/options/ViewOptions.js";import ct from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as gt}from"./support/drapedUtils.js";import{occludeesSupported as mt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as yt,createScreenPointFromSupportedEvent as ft}from"./support/screenUtils.js";import{isSpatialReferenceSupported as wt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as vt,destroyTextureCompressionWorker as _t}from"./support/TextureCompressionHelper.js";import bt from"./ui/DefaultUI.js";import Mt from"./ui/3d/DefaultUI3D.js";import St from"../webscene/Environment.js";import{clearVNodeCache as Vt}from"../widgets/support/vnodeCache.js";var jt;const Ct=Symbol(),Tt=Symbol();function Rt(e){const t=L(ut,e);return t!==e&&null==e.snapping?.enabled&&(t.snapping.enabled=!0),t}let xt=class extends(he(ue(de(ce)))){static{jt=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new ut({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Qe(this),this.deconflictor=new je({view:this}),this.attribution3D=new Pe({view:this}),this.labeler=new Ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new Re({view:this}),this.basemapTerrain=null,this.elevationProvider=new De({view:this}),this._canvas=null,this.constraints=new be,this._environment=new Me,this.environmentManager=new Se,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ct({importAnalysisViewModule:e=>ve(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new y,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new Ae({view:this}),this.slice=new Je,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Mt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,U();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),w(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Ve({view:this}),this.stateManager=new Oe({view:this}),this.screenSizePerspective=new xe({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=vt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new fe({view:this}),this.groundAndIMSurface=new Ge({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>S(e>0?1e3/Math.ceil(e):0),v),this.addHandles([w(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),_),w(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),_)])}destroy(){this.destroyed||(_t(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=E(z,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof G?this.spatialReference&&(t=At(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:At(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||B.WGS84,i=At(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||B.WGS84;let t;const i=i=>{const r=At(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new G({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof Me?e:e instanceof St?this.environment?.cloneWithWebsceneEnvironment(e)??Me.fromWebsceneEnvironment(e):E(Me,e):new Me}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return jt._layerToLayerview}static{this._layerToLayerview=ce._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&pe in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=Be(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new Ne(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||ke()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?H(()=>K(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?W.deriveUnitFromSR(e,this.spatialReference):null}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||et(r))return;++i,e+=r.updatingProgress}}else++i});const r=.1;for(const n of this._updatingObjects)n?.updating&&(i+=r,e+=.5*r);for(const n of this._updatingObjectsWithProgress)n?.updating&&(++i,e+=n.updatingProgress);const s=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||s||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return Fe.UPDATING&&console.log("Updating:",this._updatingObjectsToDebug.filter(e=>null!=e&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return Fe.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return me(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?me(this.defaultsFromMap.viewingMode):wt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new Ye(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=yt(e)?ft(this,e):e;return We(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=It,t.x=e.x,t.y=e.y,t.z=Ue(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),Q(t,Ot,this.renderSpatialReference),this.state.camera.projectToScreen(Ot,Et),j(Et[0],Et[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;Q(e,Ot,i);const r=this.state.camera.computeScreenPixelSizeAt(Ot);return t&&i!==t?r*R(i)/R(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=yt(e)?ft(this,e):e;return ze(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return qe(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await(import("./support/screenshotUtils.js"));return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await(import("./support/screenshotUtils.js")),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!at())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await(import("./support/screenshotUtils.js")),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return we.importLayerView(e)}hasLayerViewModule(e){return we.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?ye(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,i):null,s=i?r(i):[...r(1)??[],...r(2)??[]];return s?.length?{constraints:s}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!wt(e,i)&&(null==t||(!!ie(t)||(!re(t)||null!=tt(t,e,i))&&(!se(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i,r){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:s,isWGS84:n,vcsWkid:a,latestVcsWkid:o}=e,l=()=>null==a?s?B.WGS84:B.WebMercator:new B({...s?X:ee,vcsWkid:a,latestVcsWkid:o});if(ie(t)&&(s||n)){return!n||2===r||null===it(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]:[{spatialReference:l(),viewingMode:i}]}return re(t)||se(t)||!s&&!n?re(t)&&s&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${me(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&mt(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await b(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Ht[e]();if(t&&(c(this),g(i.signal),await t(i.signal)),this.destroyed)throw m();return g(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Xe({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Ke({view:this})),this.addHandles([this.updatingHandles.add(()=>Fe.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Fe.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},M),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?q(Y(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},M),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},_)],Ct),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Tt),this.removeHandles(Ct),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=J(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ze.create(this.state.viewingMode,i)),t||this.addHandles(w(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Z(e,this.groundView.spatialReference,Lt,t)||(this.renderCoordsHelper.extent=Lt)},_),Tt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(lt/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Tt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(w(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),_),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Ie(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new nt({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(lt/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new $e({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>b(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===ye(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(f(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?I(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(ht);for(const t of this.allLayerViews)(ne(t.layer)&&(!has("enable-feature:im-as-ground")||t.layer.isUsedAsGroundLayer)||ae(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(ht);for(const t of this.allLayerViews)(has("enable-feature:im-as-ground")?ne(t.layer)&&t.layer.isUsedAsGroundLayer:ne(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){Vt(),P(),T(),dt(),Ee(),_e(),N(),gt(),le(),st(),pt(),Le(),He(),F(),V(),ot(),rt(),Te.cleanupI3SLodHandling(),oe.cleanupTilemapCache(),Ae.cleanupViewstate(),Xe.cleanupTerrainSurface()}};function At(e,t){return null!=e&&k(e.spatialReference,t)?q(e,t):null}e([x({nonNullable:!0}),A(Rt)],xt.prototype,"options",void 0),e([x()],xt.prototype,"_userClippingArea",void 0),e([x()],xt.prototype,"_resourceController",void 0),e([x()],xt.prototype,"stage",null),e([x({readOnly:!0})],xt.prototype,"deconflictor",void 0),e([x({readOnly:!0})],xt.prototype,"labeler",void 0),e([x()],xt.prototype,"navigation",void 0),e([x({type:ge,readOnly:!0})],xt.prototype,"animation",null),e([x({readOnly:!0})],xt.prototype,"basemapTerrain",void 0),e([x({readOnly:!0})],xt.prototype,"overlayManager",null),e([x({readOnly:!0})],xt.prototype,"elevationProvider",void 0),e([x()],xt.prototype,"camera",null),e([x({type:t})],xt.prototype,"contentCamera",null),e([x({readOnly:!0})],xt.prototype,"canvas",null),e([x({type:z,useTypeForAutocast:!1})],xt.prototype,"center",null),e([x({type:G})],xt.prototype,"clippingArea",null),e([x({type:be,nonNullable:!0})],xt.prototype,"constraints",void 0),e([x({type:G,readOnly:!0})],xt.prototype,"renderDataExtent",null),e([x({readOnly:!0})],xt.prototype,"tileInfo",null),e([x({type:G,readOnly:!0})],xt.prototype,"dataExtent",null),e([x({type:G,readOnly:!0})],xt.prototype,"_groundAndLayersExtent",null),e([x({type:Me})],xt.prototype,"environment",null),e([A("environment")],xt.prototype,"castEnvironment",null),e([x({readOnly:!0})],xt.prototype,"environmentManager",void 0),e([x({type:G})],xt.prototype,"extent",null),e([x({type:r})],xt.prototype,"floors",void 0),e([x()],xt.prototype,"screenCenter",null),e([x()],xt.prototype,"frustum",null),e([x({type:Number,readOnly:!0})],xt.prototype,"fullOpacity",void 0),e([x({readOnly:!0})],xt.prototype,"graphicsView",void 0),e([x()],xt.prototype,"analysisViewManager",void 0),e([x()],xt.prototype,"groundView",void 0),e([x({readOnly:!0})],xt.prototype,"layerviewCollections",null),e([x({type:Boolean})],xt.prototype,"initialExtentRequired",null),e([x()],xt.prototype,"defaultsFromMapSettings",null),e([x()],xt.prototype,"interacting",null),e([x()],xt.prototype,"stationary",null),e([x()],xt.prototype,"navigating",null),e([x()],xt.prototype,"map",void 0),e([x()],xt.prototype,"padding",null),e([x({type:Ke,readOnly:!0})],xt.prototype,"pointsOfInterest",void 0),e([x()],xt.prototype,"_featureTiles",void 0),e([x()],xt.prototype,"featureTiles",null),e([x()],xt.prototype,"_featureTreeDebugger",void 0),e([x({constructOnly:!0})],xt.prototype,"deactivatedWebGLExtensions",void 0),e([x({constructOnly:!0})],xt.prototype,"debugWebGLExtensions",void 0),e([x({constructOnly:!0})],xt.prototype,"renderCanvas",void 0),e([x({constructOnly:!0})],xt.prototype,"state",void 0),e([x()],xt.prototype,"screenSizePerspective",void 0),e([x({readOnly:!0})],xt.prototype,"inputManager",void 0),e([x({readOnly:!0})],xt.prototype,"stateManager",void 0),e([x({type:["low","medium","high"]})],xt.prototype,"qualityProfile",null),e([x({type:Ne,get(){let e=this._get("qualitySettings");if(!e){const t=Be(this.qualityProfile);e=new Ne(t)}return e}})],xt.prototype,"qualitySettings",void 0),e([x()],xt.prototype,"slice",void 0),e([x({readOnly:!0})],xt.prototype,"typeSpecificPreconditionsReady",null),e([x({readOnly:!0})],xt.prototype,"renderCoordsHelper",void 0),e([x({readOnly:!0})],xt.prototype,"sceneIntersectionHelper",void 0),e([x({type:Number,readOnly:!0})],xt.prototype,"resolution",null),e([x({type:Number})],xt.prototype,"scale",null),e([x({readOnly:!0,type:Number})],xt.prototype,"terrainLevel",null),e([x()],xt.prototype,"heightModelInfo",null),e([x({type:B})],xt.prototype,"spatialReference",void 0),e([x({type:Boolean,value:!1})],xt.prototype,"alphaCompositingEnabled",null),e([x({constructOnly:!0})],xt.prototype,"preserveDrawingBufferEnabled",void 0),e([x({type:Boolean})],xt.prototype,"supersampleScreenshotsEnabled",void 0),e([x({readOnly:!0})],xt.prototype,"type",void 0),e([x(),A(e=>e instanceof bt?e:L(Mt,e))],xt.prototype,"ui",void 0),e([x({type:Boolean,readOnly:!0})],xt.prototype,"updating",null),e([x()],xt.prototype,"_updatingObjects",null),e([x()],xt.prototype,"_updatingObjectsWithProgress",null),e([x()],xt.prototype,"_updatingObjectsToDebug",null),e([x({type:Number,readOnly:!0})],xt.prototype,"updatingProgress",void 0),e([x({type:["global","local"]})],xt.prototype,"viewingMode",null),e([x({type:i})],xt.prototype,"viewpoint",null),e([x({readOnly:!0})],xt.prototype,"visibleArea",null),e([x({type:Number})],xt.prototype,"zoom",null),e([x({readOnly:!0})],xt.prototype,"quality",null),e([x({readOnly:!0})],xt.prototype,"resolutionScale",null),e([x()],xt.prototype,"focusAreasView",void 0),e([x()],xt.prototype,"_defaultToMapOptions",null),e([x()],xt.prototype,"_defaultHitTestOptions",null),xt=jt=e([O("esri.views.SceneView")],xt);const Ot=D(),Et=C(),Lt=$(),It=te(0,0,0,B.WebMercator),Ht={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Pt=xt;export{Pt as default};
2
+ import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{throwIfDestroyed as c,throwIfAborted as g,createAbortError as m}from"../core/promiseUtils.js";import y from"../core/ReactiveSet.js";import{on as f,watch as w,initial as v,sync as _,whenOnce as b,syncAndInitial as M}from"../core/reactiveUtils.js";import{setFrameDuration as S,cleanupScheduling as V}from"../core/scheduling.js";import{createScreenPoint as j,createScreenPointArray as C}from"../core/screenUtils.js";import{cleanupWhereClauseCache as T}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as R,getMetersPerUnitForSR as x}from"../core/units.js";import{property as A,cast as O,subclass as E}from"../core/accessorSupport/decorators.js";import{ensureType as L,ensureClass as I}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as H}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as P}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as D}from"../core/accessorSupport/trackingUtils.js";import{create as F}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as U}from"../core/libs/rbush/PooledRBush.js";import{initialize as G}from"../core/workers/workers.js";import W from"../geometry/Extent.js";import z from"../geometry/HeightModelInfo.js";import q from"../geometry/Point.js";import{project as k,canProjectWithoutEngine as B}from"../geometry/projectionUtils.js";import N from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Z}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Q}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as Y}from"../geometry/projection/projectPointToVector.js";import{toExtent as $,create as J}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as K}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as X}from"../geometry/support/scaleUtils.js";import{wgs84 as ee,webMercator as te}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as ie}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as re,isTiledLayer as se,isVoxelLayer as ne,isIntegratedMeshLayer as ae,isGaussianSplatLayer as oe}from"../layers/support/layerUtils.js";import{TilemapCache as le}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as pe}from"../portal/portalDefault.js";import{WebSceneTag as he}from"../support/tagSymbols.js";import{BreakpointsOwner as de}from"./BreakpointsOwner.js";import{DOMContainer as ue}from"./DOMContainer.js";import{PopupView as ce}from"./PopupView.js";import ge from"./View.js";import me from"./ViewAnimation.js";import{stringFromViewingMode as ye,viewingModeFromString as fe}from"./ViewingMode.js";import{GroundView3D as we}from"./3d/GroundView3D.js";import{layerView3DImporter as ve}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as _e}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as be}from"./3d/camera/intersectionUtils.js";import Me from"./3d/constraints/Constraints.js";import Se from"./3d/environment/Environment.js";import{EnvironmentManager as Ve}from"./3d/environment/EnvironmentManager.js";import je from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ce}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Te}from"./3d/layers/graphics/Labeler.js";import Re from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as xe}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as Ae}from"./3d/state/ScreenSizePerspective.js";import Oe from"./3d/state/ViewState.js";import{ViewStateManager as Ee,cleanupViewStateManager as Le}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ie}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as He}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Pe}from"./3d/state/utils/navigationUtils.js";import De from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Ue}from"./3d/support/debugFlags.js";import{getElevationAtPoint as Ge}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as We}from"./3d/support/GroundAndIMSurface.js";import{toMap as ze,hitTest as qe}from"./3d/support/hitTest.js";import{popupHitTest as ke}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as Be,getQualityProfileSettings as Ne}from"./3d/support/QualityProfile.js";import Ze from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Qe}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ye}from"./3d/support/ResourceController.js";import $e from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Je}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Ke}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Xe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import et from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as tt,getTiledLayerInfo as it,checkIfTileInfoSupportedForView as rt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as st}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as nt}from"./3d/terrain/TileRenderer.js";import{Stage as at}from"./3d/webgl-engine/Stage.js";import{olidEnabled as ot}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as lt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as pt}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as ht}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as dt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as ut}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ct from"./interactive/options/ViewOptions.js";import gt from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as mt}from"./support/drapedUtils.js";import{occludeesSupported as yt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as ft,createScreenPointFromSupportedEvent as wt}from"./support/screenUtils.js";import{isSpatialReferenceSupported as vt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as _t,destroyTextureCompressionWorker as bt}from"./support/TextureCompressionHelper.js";import Mt from"./ui/DefaultUI.js";import St from"./ui/3d/DefaultUI3D.js";import Vt from"../webscene/Environment.js";import{clearVNodeCache as jt}from"../widgets/support/vnodeCache.js";var Ct;const Tt=Symbol(),Rt=Symbol();function xt(e){const t=I(ct,e);return t!==e&&null==e.snapping?.enabled&&(t.snapping.enabled=!0),t}let At=class extends(de(ce(ue(ge)))){static{Ct=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new ct({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ye(this),this.deconflictor=new Ce({view:this}),this.attribution3D=new De({view:this}),this.labeler=new Te({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new xe({view:this}),this.basemapTerrain=null,this.elevationProvider=new Fe({view:this}),this._canvas=null,this.constraints=new Me,this._environment=new Se,this.environmentManager=new Ve,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new gt({importAnalysisViewModule:e=>_e(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new y,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new Oe({view:this}),this.slice=new Ke,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new St,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,G();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),w(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new je({view:this}),this.stateManager=new Ee({view:this}),this.screenSizePerspective=new Ae({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=_t(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new we({view:this}),this.groundAndIMSurface=new We({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>S(e>0?1e3/Math.ceil(e):0),v),this.addHandles([w(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),_),w(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),_)])}destroy(){this.destroyed||(bt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=L(q,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof W?this.spatialReference&&(t=Ot(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ot(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||N.WGS84,i=Ot(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||N.WGS84;let t;const i=i=>{const r=Ot(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new W({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof Se?e:e instanceof Vt?this.environment?.cloneWithWebsceneEnvironment(e)??Se.fromWebsceneEnvironment(e):L(Se,e):new Se}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return Ct._layerToLayerview}static{this._layerToLayerview=ge._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&he in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=Ne(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new Ze(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Be()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?P(()=>X(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();if(!e)return null;const t=R(this.spatialReference);return t&&e.heightUnit!==t?new z({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS}):e}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||tt(r))return;++i,e+=r.updatingProgress}}else++i});const r=.1;for(const n of this._updatingObjects)n?.updating&&(i+=r,e+=.5*r);for(const n of this._updatingObjectsWithProgress)n?.updating&&(++i,e+=n.updatingProgress);const s=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||s||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return Ue.UPDATING&&console.log("Updating:",this._updatingObjectsToDebug.filter(e=>null!=e&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return Ue.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return ye(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?ye(this.defaultsFromMap.viewingMode):vt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new $e(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=ft(e)?wt(this,e):e;return ze(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=Ht,t.x=e.x,t.y=e.y,t.z=Ge(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),Y(t,Et,this.renderSpatialReference),this.state.camera.projectToScreen(Et,Lt),j(Lt[0],Lt[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;Y(e,Et,i);const r=this.state.camera.computeScreenPixelSizeAt(Et);return t&&i!==t?r*x(i)/x(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=ft(e)?wt(this,e):e;return qe(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return ke(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await(import("./support/screenshotUtils.js"));return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await(import("./support/screenshotUtils.js")),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!ot())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await(import("./support/screenshotUtils.js")),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return ve.importLayerView(e)}hasLayerViewModule(e){return ve.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?fe(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,i):null,s=i?r(i):[...r(1)??[],...r(2)??[]];return s?.length?{constraints:s}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!vt(e,i)&&(null==t||(!!re(t)||(!se(t)||null!=it(t,e,i))&&(!ne(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i,r){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:s,isWGS84:n,vcsWkid:a,latestVcsWkid:o}=e,l=()=>null==a?s?N.WGS84:N.WebMercator:new N({...s?ee:te,vcsWkid:a,latestVcsWkid:o});if(re(t)&&(s||n)){return!n||2===r||null===rt(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]:[{spatialReference:l(),viewingMode:i}]}return se(t)||ne(t)||!s&&!n?se(t)&&s&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${ye(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&yt(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await b(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Pt[e]();if(t&&(c(this),g(i.signal),await t(i.signal)),this.destroyed)throw m();return g(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new et({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Xe({view:this})),this.addHandles([this.updatingHandles.add(()=>Ue.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Ue.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},M),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?k($(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},M),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},_)],Tt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Rt),this.removeHandles(Tt),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=K(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Qe.create(this.state.viewingMode,i)),t||this.addHandles(w(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Q(e,this.groundView.spatialReference,It,t)||(this.renderCoordsHelper.extent=It)},_),Rt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(pt/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Rt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(w(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),_),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new He(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new at({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(pt/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Je({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>b(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===fe(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(f(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?H(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(dt);for(const t of this.allLayerViews)(ae(t.layer)&&(!has("enable-feature:im-as-ground")||t.layer.isUsedAsGroundLayer)||oe(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(dt);for(const t of this.allLayerViews)(has("enable-feature:im-as-ground")?ae(t.layer)&&t.layer.isUsedAsGroundLayer:ae(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){jt(),D(),T(),ut(),Le(),be(),Z(),mt(),pe(),nt(),ht(),Ie(),Pe(),U(),V(),lt(),st(),Re.cleanupI3SLodHandling(),le.cleanupTilemapCache(),Oe.cleanupViewstate(),et.cleanupTerrainSurface()}};function Ot(e,t){return null!=e&&B(e.spatialReference,t)?k(e,t):null}e([A({nonNullable:!0}),O(xt)],At.prototype,"options",void 0),e([A()],At.prototype,"_userClippingArea",void 0),e([A()],At.prototype,"_resourceController",void 0),e([A()],At.prototype,"stage",null),e([A({readOnly:!0})],At.prototype,"deconflictor",void 0),e([A({readOnly:!0})],At.prototype,"labeler",void 0),e([A()],At.prototype,"navigation",void 0),e([A({type:me,readOnly:!0})],At.prototype,"animation",null),e([A({readOnly:!0})],At.prototype,"basemapTerrain",void 0),e([A({readOnly:!0})],At.prototype,"overlayManager",null),e([A({readOnly:!0})],At.prototype,"elevationProvider",void 0),e([A()],At.prototype,"camera",null),e([A({type:t})],At.prototype,"contentCamera",null),e([A({readOnly:!0})],At.prototype,"canvas",null),e([A({type:q,useTypeForAutocast:!1})],At.prototype,"center",null),e([A({type:W})],At.prototype,"clippingArea",null),e([A({type:Me,nonNullable:!0})],At.prototype,"constraints",void 0),e([A({type:W,readOnly:!0})],At.prototype,"renderDataExtent",null),e([A({readOnly:!0})],At.prototype,"tileInfo",null),e([A({type:W,readOnly:!0})],At.prototype,"dataExtent",null),e([A({type:W,readOnly:!0})],At.prototype,"_groundAndLayersExtent",null),e([A({type:Se})],At.prototype,"environment",null),e([O("environment")],At.prototype,"castEnvironment",null),e([A({readOnly:!0})],At.prototype,"environmentManager",void 0),e([A({type:W})],At.prototype,"extent",null),e([A({type:r})],At.prototype,"floors",void 0),e([A()],At.prototype,"screenCenter",null),e([A()],At.prototype,"frustum",null),e([A({type:Number,readOnly:!0})],At.prototype,"fullOpacity",void 0),e([A({readOnly:!0})],At.prototype,"graphicsView",void 0),e([A()],At.prototype,"analysisViewManager",void 0),e([A()],At.prototype,"groundView",void 0),e([A({readOnly:!0})],At.prototype,"layerviewCollections",null),e([A({type:Boolean})],At.prototype,"initialExtentRequired",null),e([A()],At.prototype,"defaultsFromMapSettings",null),e([A()],At.prototype,"interacting",null),e([A()],At.prototype,"stationary",null),e([A()],At.prototype,"navigating",null),e([A()],At.prototype,"map",void 0),e([A()],At.prototype,"padding",null),e([A({type:Xe,readOnly:!0})],At.prototype,"pointsOfInterest",void 0),e([A()],At.prototype,"_featureTiles",void 0),e([A()],At.prototype,"featureTiles",null),e([A()],At.prototype,"_featureTreeDebugger",void 0),e([A({constructOnly:!0})],At.prototype,"deactivatedWebGLExtensions",void 0),e([A({constructOnly:!0})],At.prototype,"debugWebGLExtensions",void 0),e([A({constructOnly:!0})],At.prototype,"renderCanvas",void 0),e([A({constructOnly:!0})],At.prototype,"state",void 0),e([A()],At.prototype,"screenSizePerspective",void 0),e([A({readOnly:!0})],At.prototype,"inputManager",void 0),e([A({readOnly:!0})],At.prototype,"stateManager",void 0),e([A({type:["low","medium","high"]})],At.prototype,"qualityProfile",null),e([A({type:Ze,get(){let e=this._get("qualitySettings");if(!e){const t=Ne(this.qualityProfile);e=new Ze(t)}return e}})],At.prototype,"qualitySettings",void 0),e([A()],At.prototype,"slice",void 0),e([A({readOnly:!0})],At.prototype,"typeSpecificPreconditionsReady",null),e([A({readOnly:!0})],At.prototype,"renderCoordsHelper",void 0),e([A({readOnly:!0})],At.prototype,"sceneIntersectionHelper",void 0),e([A({type:Number,readOnly:!0})],At.prototype,"resolution",null),e([A({type:Number})],At.prototype,"scale",null),e([A({readOnly:!0,type:Number})],At.prototype,"terrainLevel",null),e([A()],At.prototype,"heightModelInfo",null),e([A({type:N})],At.prototype,"spatialReference",void 0),e([A({type:Boolean,value:!1})],At.prototype,"alphaCompositingEnabled",null),e([A({constructOnly:!0})],At.prototype,"preserveDrawingBufferEnabled",void 0),e([A({type:Boolean})],At.prototype,"supersampleScreenshotsEnabled",void 0),e([A({readOnly:!0})],At.prototype,"type",void 0),e([A(),O(e=>e instanceof Mt?e:I(St,e))],At.prototype,"ui",void 0),e([A({type:Boolean,readOnly:!0})],At.prototype,"updating",null),e([A()],At.prototype,"_updatingObjects",null),e([A()],At.prototype,"_updatingObjectsWithProgress",null),e([A()],At.prototype,"_updatingObjectsToDebug",null),e([A({type:Number,readOnly:!0})],At.prototype,"updatingProgress",void 0),e([A({type:["global","local"]})],At.prototype,"viewingMode",null),e([A({type:i})],At.prototype,"viewpoint",null),e([A({readOnly:!0})],At.prototype,"visibleArea",null),e([A({type:Number})],At.prototype,"zoom",null),e([A({readOnly:!0})],At.prototype,"quality",null),e([A({readOnly:!0})],At.prototype,"resolutionScale",null),e([A()],At.prototype,"focusAreasView",void 0),e([A()],At.prototype,"_defaultToMapOptions",null),e([A()],At.prototype,"_defaultHitTestOptions",null),At=Ct=e([E("esri.views.SceneView")],At);const Et=F(),Lt=C(),It=J(),Ht=ie(0,0,0,N.WebMercator),Pt={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Dt=At;export{Dt as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../core/Accessor.js";import{clock as o}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as n}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as r,subclass as l}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as h}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m,isCancelEvent as v}from"./interactive/interactiveToolUtils.js";import{ToolViewManagerManipulatorState as d}from"./interactive/ToolViewManagerManipulatorState.js";const g="attached",_="tools",T=1e3;let f=class extends e{constructor(t){super(t),this._updatingHandles=new c,this._clock=o,this._manipulatorState=new d,this.tools=new i,this._interacting=!1,this._interactingTimeout=T,this._interactingTimeoutHandle=null}initialize(){this.addHandles([this.view.on(u,t=>{this._handleInputEvent(t)},h.TOOL),...p(this.tools),this.tools.on("before-add",({item:t})=>{this._updateToolEditableFlag(t)}),this.tools.on("before-remove",({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)}),this.tools.on("change",()=>{this._refreshToolWatchers()})])}destroy(){this.activeTool=null,this.tools.drain(t=>t.destroy()),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy(),this._manipulatorState.destroy()}get _manipulatorStateEventArgs(){return{tools:this.tools,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view,multiTouchActive:this.view.inputManager?.multiTouchActive}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const e=this.activeTool;this._set("activeTool",t),null!=e&&e.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const o of this.tools){this._updateToolEditableFlag(o);const t=m(o);null!=this.activeTool&&t||this._manipulatorState.clearPointers(o,this._manipulatorStateEventArgs,!t)}}get cursor(){const t=this._manipulatorState.cursor;if(null!=t)return t;for(const e of this.tools)if(e.visible&&null!=e.cursor)return e.cursor;return null}get updating(){return this._updatingHandles.updating||this.tools.some(t=>t.updating)}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=n(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout(()=>this._interacting=!1,this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s(()=>{const{state:t}=this.view;return"camera"in t&&t.camera},()=>this._forEachManipulator(t=>t.onViewChange())),this.view.elevationProvider.on("elevation-change",t=>this._forEachManipulator(e=>e.onElevationChange(t)))],g):this.addHandles(s(()=>this.view.extent,()=>this._forEachManipulator(t=>t.onViewChange())))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(g),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){for(const e of this.tools)e.manipulators&&e.manipulators.forEach(({manipulator:o})=>t(o,e))}_handleInputEvent(t){let e=!1;const o={...t,stopPropagation:()=>{e=!0,t.stopPropagation()}};if(null!=this.activeTool)this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(o);else for(const i of this.tools)!e&&i.visible&&i.handleInputEvent(o);!e&&v(t)&&this.activeTool&&(t.stopPropagation(),t.preventDefault(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(o,this._manipulatorStateEventArgs),e||null==this.activeTool||this.activeTool.handleInputEventAfter(o),this._manipulatorState.handleHoverEvent(o,this.tools),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(_);for(const t of this.tools){if(t instanceof e){const e=s(()=>[t.cursor,t.visible,t.editable],()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)});this.addHandles(e,_)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",e=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,e.item.manipulator)}),t.manipulators.on("change",()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)})],_)}this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)}_updateToolEditableFlag(t){t.setEditableFlag?.(1,null==this.activeTool||t===this.activeTool)}_removeIncompleteTools(t){this.tools.filter(e=>(null==t||e!==t)&&!e.created&&e.removeIncompleteOnCancel).forEach(t=>{this.tools.remove(t)})}get test(){if("test"!==process.env.NODE_ENV)return;const t=this;return{setClock:t=>this._clock=t,set interactingTimeoutEnabled(e){t._interactingTimeout=e?T:0},get interactingTimeoutEnabled(){return 0!==t._interactingTimeout}}}};t([r({constructOnly:!0,nonNullable:!0})],f.prototype,"view",void 0),t([r({value:null})],f.prototype,"activeTool",null),t([r({readOnly:!0,type:i})],f.prototype,"tools",void 0),t([r()],f.prototype,"cursor",null),t([r({readOnly:!0})],f.prototype,"updating",null),t([r()],f.prototype,"_interacting",void 0),t([r({readOnly:!0})],f.prototype,"interacting",null),f=t([l("esri.views.ToolViewManager")],f);export{f as ToolViewManager,T as interactingTimeout};
2
+ import{__decorate as t}from"tslib";import e from"../core/Accessor.js";import{clock as o}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as n}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as r,subclass as l}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as h}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m,isCancelEvent as v}from"./interactive/interactiveToolUtils.js";import{ToolViewManagerManipulatorState as d}from"./interactive/ToolViewManagerManipulatorState.js";const g="attached",_="tools",T=1e3;let f=class extends e{constructor(t){super(t),this._updatingHandles=new c,this._clock=o,this._manipulatorState=new d,this.tools=new i,this._interacting=!1,this._interactingTimeout=T,this._interactingTimeoutHandle=null}initialize(){this.addHandles([this.view.on(u,t=>{this._handleInputEvent(t)},h.TOOL),...p(this.tools),this.tools.on("before-add",({item:t})=>{this._updateToolEditableFlag(t)}),this.tools.on("before-remove",({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)}),this.tools.on("change",()=>{this._refreshToolWatchers()})])}destroy(){this.activeTool=null,this.tools.drain(t=>t.destroy()),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy(),this._manipulatorState.destroy()}get _manipulatorStateEventArgs(){return{tools:this.tools,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view,multiTouchActive:this.view.inputManager?.multiTouchActive}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const e=this.activeTool;this._set("activeTool",t),null!=e&&e.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const o of this.tools){this._updateToolEditableFlag(o);const t=m(o);null!=this.activeTool&&t||this._manipulatorState.clearPointers(o,this._manipulatorStateEventArgs,!t)}}get cursor(){const t=this._manipulatorState.cursor;if(null!=t)return t;for(const e of this.tools)if(e.visible&&null!=e.cursor)return e.cursor;return null}get updating(){return this._updatingHandles.updating||this.tools.some(t=>t.updating)}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=n(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout(()=>this._interacting=!1,this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s(()=>{const{state:t}=this.view;return"camera"in t&&t.camera},()=>this._forEachManipulator(t=>t.onViewChange())),this.view.elevationProvider.on("elevation-change",t=>this._forEachManipulator(e=>e.onElevationChange(t)))],g):this.addHandles(s(()=>this.view.extent,()=>this._forEachManipulator(t=>t.onViewChange())))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(g),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){for(const e of this.tools)e.manipulators&&e.manipulators.forEach(({manipulator:o})=>t(o,e))}_handleInputEvent(t){let e=!1;v(t)&&this.activeTool&&t.preventDefault();const o={...t,stopPropagation:()=>{e=!0,t.stopPropagation()}};if(null!=this.activeTool)this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(o);else for(const i of this.tools)!e&&i.visible&&i.handleInputEvent(o);!e&&v(t)&&this.activeTool&&(t.stopPropagation(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(o,this._manipulatorStateEventArgs),e||null==this.activeTool||this.activeTool.handleInputEventAfter(o),this._manipulatorState.handleHoverEvent(o,this.tools),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(_);for(const t of this.tools){if(t instanceof e){const e=s(()=>[t.cursor,t.visible,t.editable],()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs)});this.addHandles(e,_)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",e=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,e.item.manipulator)}),t.manipulators.on("change",()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)})],_)}this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)}_updateToolEditableFlag(t){t.setEditableFlag?.(1,null==this.activeTool||t===this.activeTool)}_removeIncompleteTools(t){this.tools.filter(e=>(null==t||e!==t)&&!e.created&&e.removeIncompleteOnCancel).forEach(t=>{this.tools.remove(t)})}get test(){if("test"!==process.env.NODE_ENV)return;const t=this;return{setClock:t=>this._clock=t,set interactingTimeoutEnabled(e){t._interactingTimeout=e?T:0},get interactingTimeoutEnabled(){return 0!==t._interactingTimeout}}}};t([r({constructOnly:!0,nonNullable:!0})],f.prototype,"view",void 0),t([r({value:null})],f.prototype,"activeTool",null),t([r({readOnly:!0,type:i})],f.prototype,"tools",void 0),t([r()],f.prototype,"cursor",null),t([r({readOnly:!0})],f.prototype,"updating",null),t([r()],f.prototype,"_interacting",void 0),t([r({readOnly:!0})],f.prototype,"interacting",null),f=t([l("esri.views.ToolViewManager")],f);export{f as ToolViewManager,T as interactingTimeout};
@@ -5,11 +5,22 @@ import type VideoLayer from "../layers/VideoLayer.js";
5
5
  import type Navigation from "./navigation/Navigation.js";
6
6
  import type { EventedMixin } from "../core/Evented.js";
7
7
  import type { EsriPromiseMixin } from "../core/Promise.js";
8
+ import type { ScreenRect } from "../core/types.js";
8
9
  import type { DOMContainer, DOMContainerProperties } from "./DOMContainer.js";
9
10
  import type { Viewport2DMixin } from "./Viewport2DMixin.js";
10
11
  import type { NavigationProperties } from "./navigation/Navigation.js";
11
12
 
12
13
  export interface VideoViewProperties extends DOMContainerProperties, Partial<Pick<VideoView, "layer" | "map" | "operationalDataVisible" | "scale">> {
14
+ /**
15
+ * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
16
+ * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
17
+ *
18
+ * @internal
19
+ * @since 5.2
20
+ * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
21
+ * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
22
+ */
23
+ focusRegionEnabled?: boolean;
13
24
  /**
14
25
  * Options to configure the navigation behavior of the View.
15
26
  *
@@ -58,6 +69,33 @@ export interface VideoViewProperties extends DOMContainerProperties, Partial<Pic
58
69
  */
59
70
  export default class VideoView extends VideoViewSuperclass {
60
71
  constructor(properties?: VideoViewProperties);
72
+ /**
73
+ * The screen rectangle of the active focus region, or `null` when [DOMContainer.focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) is `false`.
74
+ * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`.
75
+ *
76
+ * | Action | Keyboard Shortcut / Property |
77
+ * |--------|----------------------------|
78
+ * | Enable or disable focus region | Use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view component is in focus or set the [DOMContainer.focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) property to `true` or `false`. |
79
+ * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. |
80
+ *
81
+ * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
82
+ *
83
+ * @internal
84
+ * @since 5.2
85
+ * @see [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled)
86
+ * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
87
+ */
88
+ get focusRegion(): ScreenRect | null;
89
+ /**
90
+ * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
91
+ * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
92
+ *
93
+ * @internal
94
+ * @since 5.2
95
+ * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
96
+ * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
97
+ */
98
+ accessor focusRegionEnabled: boolean;
61
99
  /** The [VideoLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/) to display in the view. */
62
100
  accessor layer: VideoLayer | null | undefined;
63
101
  /** A reference to the associated [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) or [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/). */