@arcgis/core 5.2.0-next.112 → 5.2.0-next.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/Ground.js +1 -1
  2. package/arcgisGlobal.d.ts +6 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +1 -0
  5. package/assets/esri/core/workers/chunks/{f5a988bb850f7a7af143.js → 05b373a663cb5d4d722f.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{36f8caeb574dcd5c0ed5.js → 0b727d7bf3e36e146725.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0c65862e3dd810015491.js +1 -0
  8. package/assets/esri/core/workers/chunks/0e3e58ba8e2d358121a5.js +1 -0
  9. package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +1 -0
  10. package/assets/esri/core/workers/chunks/1004e77593dfa506cd5d.js +1 -0
  11. package/assets/esri/core/workers/chunks/184942ea601237c8241a.js +1 -0
  12. package/assets/esri/core/workers/chunks/20de0ea9fa08a6545978.js +1 -0
  13. package/assets/esri/core/workers/chunks/214d63813d268afc265d.js +1 -0
  14. package/assets/esri/core/workers/chunks/22e85819e23202a8ba90.js +1 -0
  15. package/assets/esri/core/workers/chunks/{6e677505d257e0848075.js → 23f9ab77e4e263f82636.js} +1 -1
  16. package/assets/esri/core/workers/chunks/28a04887ecaee5445d14.js +1 -0
  17. package/assets/esri/core/workers/chunks/{2fc5c1504691badc7792.js → 2ac2d0a7623dd060c144.js} +1 -1
  18. package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +1 -0
  19. package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +1 -0
  20. package/assets/esri/core/workers/chunks/36a7e19f43517aa94577.js +1 -0
  21. package/assets/esri/core/workers/chunks/{6e6cdff4bbe1ff2f44ac.js → 3ab25279aaa30f035038.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{e6dae16208f6978b59e0.js → 3b499cfc89c8f87cdb20.js} +1 -1
  23. package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +1 -0
  24. package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 4bf2cc4d092601ff2b86.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{d45483dd0dc2853b18b7.js → 4bfd63f3cf9208eb839b.js} +33 -33
  26. package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +1 -0
  27. package/assets/esri/core/workers/chunks/510a190a6f0a60ae38c3.js +1 -0
  28. package/assets/esri/core/workers/chunks/{89a785f8b61263e2d592.js → 552c92b01a5f02a115c5.js} +1 -1
  29. package/assets/esri/core/workers/chunks/564fdf0d663b773806cc.js +1 -0
  30. package/assets/esri/core/workers/chunks/{d9270f4935eb0d044db3.js → 57328c206f1e699ac06f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{50951fb13013b11b8a24.js → 58e62c8ce1292f4d3b06.js} +1 -1
  32. package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +1 -0
  33. package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +1 -0
  34. package/assets/esri/core/workers/chunks/5f79ba5639067f734791.js +1 -0
  35. package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 60c61f34733063730386.js} +1 -1
  36. package/assets/esri/core/workers/chunks/62b1f94f4fa978d4da48.js +1 -0
  37. package/assets/esri/core/workers/chunks/6b264006b96cbf93d8ed.js +1 -0
  38. package/assets/esri/core/workers/chunks/6b9d29ca568590358478.js +1 -0
  39. package/assets/esri/core/workers/chunks/{7c5310e0104c22da0261.js → 6c7cb7974969e3167f2b.js} +1 -1
  40. package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +1 -0
  41. package/assets/esri/core/workers/chunks/{e98b785e8f4edc8bd3ff.js → 6eceeca33fac8e900d9d.js} +1 -1
  42. package/assets/esri/core/workers/chunks/7232fc11b23777b6be94.js +1 -0
  43. package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +1 -0
  44. package/assets/esri/core/workers/chunks/785206da3962ba23de16.js +1 -0
  45. package/assets/esri/core/workers/chunks/{1c70620f40be02f532b5.js → 7b169eabafcc03bfaee6.js} +1 -1
  46. package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +1 -0
  47. package/assets/esri/core/workers/chunks/{082069f80eee0407b828.js → 7edf57e31ff07af9032b.js} +1 -1
  48. package/assets/esri/core/workers/chunks/83ed38468e316302b157.js +1 -0
  49. package/assets/esri/core/workers/chunks/85c876ee9e63d5732937.js +1 -0
  50. package/assets/esri/core/workers/chunks/8f0ecf4d06ec7b67d4ed.js +1 -0
  51. package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +1 -0
  52. package/assets/esri/core/workers/chunks/{a1916bca1af5c65be4b0.js → 90ab3c47138875070a53.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{10389c87d9c6a43363ce.js → 917dec9c004218c58950.js} +1 -1
  54. package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +1 -0
  55. package/assets/esri/core/workers/chunks/943d0026ca4d49eb3ac2.js +1 -0
  56. package/assets/esri/core/workers/chunks/982a396bd4fffa62e911.js +1 -0
  57. package/assets/esri/core/workers/chunks/98a5327fd96d9542b39f.js +1 -0
  58. package/assets/esri/core/workers/chunks/9b9a60f1e0c48aa701f0.js +1 -0
  59. package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +1 -0
  60. package/assets/esri/core/workers/chunks/9df379041e8860fe7f01.js +1 -0
  61. package/assets/esri/core/workers/chunks/{1e8ceb4a4b28625236e3.js → a42505b978d54d36d3b6.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{bfbe6ff786435fe1e7cf.js → a86a4e550a92f770d6d5.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{a34eee4c9d4c1c2b8c49.js → ab60f3bc18b5ea504f70.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{18b9ec6ba7a6c0fa2ac6.js → b1880d9f5eafd50ce84b.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{777fc163530448eea13e.js → b4222152efaf73b37b53.js} +1 -1
  66. package/assets/esri/core/workers/chunks/b6ca73c1384f07b30b74.js +1 -0
  67. package/assets/esri/core/workers/chunks/bb4cbf6b7c35e8c78cc7.js +1 -0
  68. package/assets/esri/core/workers/chunks/bb831d23422acfb00ae2.js +1 -0
  69. package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +1 -0
  70. package/assets/esri/core/workers/chunks/{a0f742fd947104662d37.js → c6277236ec47586dca00.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{3be33a129d3ae7dc4f06.js → caf38cf4d8542fb11c46.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{2728eda8178e02fbca47.js → cd0f5cd0fefe7f49e3d8.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{48a53bfeef11c32dadcc.js → d25fb32a233d2128afbe.js} +1 -1
  74. package/assets/esri/core/workers/chunks/d629708bf23da24ee523.js +1 -0
  75. package/assets/esri/core/workers/chunks/db141122060d8d9b38da.js +1 -0
  76. package/assets/esri/core/workers/chunks/dc1944a7601b518a9c48.js +1 -0
  77. package/assets/esri/core/workers/chunks/{573ee2e59d26bc75201e.js → dc8670f32bb0b93c1473.js} +1 -1
  78. package/assets/esri/core/workers/chunks/e164acd876bbd42ed658.js +1 -0
  79. package/assets/esri/core/workers/chunks/e1f2b07be33e33117313.js +1 -0
  80. package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +1 -0
  81. package/assets/esri/core/workers/chunks/e5906b28b981199fd489.js +1 -0
  82. package/assets/esri/core/workers/chunks/{b3293ee9f221423a6825.js → e611e452f04a9ce64cf8.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{0f20c458f873564faff2.js → ec4f887153c24ab83f2c.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{707b4ae689c4329cad3b.js → f40ceb5e03c699605302.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{547a073c789fdfb78310.js → f42243c62dd0b6993816.js} +1 -1
  86. package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +1 -0
  87. package/assets/esri/core/workers/chunks/fdf5ceffec9d5185953d.js +1 -0
  88. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ar.json +1 -1
  89. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bg.json +1 -1
  90. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bs.json +1 -1
  91. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ca.json +1 -1
  92. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.cs.json +1 -1
  93. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.da.json +1 -1
  94. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.de.json +1 -1
  95. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.el.json +1 -1
  96. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.es.json +1 -1
  97. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.et.json +1 -1
  98. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fi.json +1 -1
  99. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fr.json +1 -1
  100. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.he.json +1 -1
  101. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hr.json +1 -1
  102. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hu.json +1 -1
  103. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.id.json +1 -1
  104. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.it.json +1 -1
  105. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ja.json +1 -1
  106. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ko.json +1 -1
  107. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lt.json +1 -1
  108. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lv.json +1 -1
  109. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.nl.json +1 -1
  110. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.no.json +1 -1
  111. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pl.json +1 -1
  112. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-BR.json +1 -1
  113. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-PT.json +1 -1
  114. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ro.json +1 -1
  115. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ru.json +1 -1
  116. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sk.json +1 -1
  117. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sl.json +1 -1
  118. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sr.json +1 -1
  119. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sv.json +1 -1
  120. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.th.json +1 -1
  121. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.tr.json +1 -1
  122. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.uk.json +1 -1
  123. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.vi.json +1 -1
  124. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-CN.json +1 -1
  125. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-HK.json +1 -1
  126. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-TW.json +1 -1
  127. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/messages.ja.json +1 -1
  128. package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
  129. package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.de.json +1 -1
  130. package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.ro.json +1 -1
  131. package/assets/esri/widgets/Expand/t9n/messages.id.json +1 -1
  132. package/assets/esri/widgets/Features/t9n/messages.he.json +1 -1
  133. package/assets/esri/widgets/Features/t9n/messages.uk.json +1 -1
  134. package/assets/esri/widgets/Home/t9n/messages.bs.json +1 -1
  135. package/assets/esri/widgets/Home/t9n/messages.de.json +1 -1
  136. package/assets/esri/widgets/Home/t9n/messages.et.json +1 -1
  137. package/assets/esri/widgets/Home/t9n/messages.fi.json +1 -1
  138. package/assets/esri/widgets/Home/t9n/messages.hr.json +1 -1
  139. package/assets/esri/widgets/Home/t9n/messages.hu.json +1 -1
  140. package/assets/esri/widgets/Home/t9n/messages.id.json +1 -1
  141. package/assets/esri/widgets/Home/t9n/messages.lv.json +1 -1
  142. package/assets/esri/widgets/Home/t9n/messages.nl.json +1 -1
  143. package/assets/esri/widgets/Home/t9n/messages.pt-PT.json +1 -1
  144. package/assets/esri/widgets/Home/t9n/messages.th.json +1 -1
  145. package/assets/esri/widgets/Home/t9n/messages.tr.json +1 -1
  146. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
  147. package/assets/esri/widgets/Print/t9n/messages.es.json +1 -1
  148. package/assets/esri/widgets/Print/t9n/messages.it.json +1 -1
  149. package/assets/esri/widgets/Print/t9n/messages.lt.json +1 -1
  150. package/assets/esri/widgets/Print/t9n/messages.pt-PT.json +1 -1
  151. package/assets/esri/widgets/Print/t9n/messages.sl.json +1 -1
  152. package/assets/esri/widgets/Print/t9n/messages.sr.json +1 -1
  153. package/assets/esri/widgets/Search/t9n/messages.bs.json +1 -1
  154. package/assets/esri/widgets/Search/t9n/messages.de.json +1 -1
  155. package/assets/esri/widgets/Search/t9n/messages.es.json +1 -1
  156. package/assets/esri/widgets/Search/t9n/messages.et.json +1 -1
  157. package/assets/esri/widgets/Search/t9n/messages.fi.json +1 -1
  158. package/assets/esri/widgets/Search/t9n/messages.he.json +1 -1
  159. package/assets/esri/widgets/Search/t9n/messages.hr.json +1 -1
  160. package/assets/esri/widgets/Search/t9n/messages.it.json +1 -1
  161. package/assets/esri/widgets/Search/t9n/messages.lv.json +1 -1
  162. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ar.json +1 -1
  163. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ca.json +1 -1
  164. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.cs.json +1 -1
  165. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.el.json +1 -1
  166. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.es.json +1 -1
  167. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.fi.json +1 -1
  168. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.he.json +1 -1
  169. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.it.json +1 -1
  170. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lt.json +1 -1
  171. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lv.json +1 -1
  172. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.pl.json +1 -1
  173. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ro.json +1 -1
  174. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ru.json +1 -1
  175. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.sl.json +1 -1
  176. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.uk.json +1 -1
  177. package/assets/esri/widgets/support/GridControls/t9n/messages.pt-BR.json +1 -1
  178. package/chunks/DeepSky.glsl.js +2 -2
  179. package/chunks/FocusArea.glsl.js +1 -1
  180. package/chunks/GaussianSplatDepth.glsl.js +3 -3
  181. package/chunks/RibbonLine.glsl.js +15 -13
  182. package/config.js +1 -1
  183. package/core/Evented.d.ts +1 -1
  184. package/form/elements/AttachmentElement.d.ts +5 -5
  185. package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -1
  186. package/geometry/Extent.js +1 -1
  187. package/geometry/operators/affineTransformOperator.d.ts +9 -3
  188. package/geometry/operators/affineTransformOperator.js +1 -1
  189. package/geometry/operators/alphaShapeOperator.d.ts +14 -4
  190. package/geometry/operators/alphaShapeOperator.js +1 -1
  191. package/geometry/operators/areaOperator.d.ts +11 -3
  192. package/geometry/operators/areaOperator.js +1 -1
  193. package/geometry/operators/autoCompleteOperator.d.ts +6 -2
  194. package/geometry/operators/autoCompleteOperator.js +1 -1
  195. package/geometry/operators/boundaryOperator.d.ts +9 -3
  196. package/geometry/operators/boundaryOperator.js +1 -1
  197. package/geometry/operators/bufferOperator.d.ts +19 -5
  198. package/geometry/operators/bufferOperator.js +1 -1
  199. package/geometry/operators/centroidOperator.d.ts +6 -2
  200. package/geometry/operators/centroidOperator.js +1 -1
  201. package/geometry/operators/clipOperator.d.ts +9 -3
  202. package/geometry/operators/clipOperator.js +1 -1
  203. package/geometry/operators/containsOperator.d.ts +9 -3
  204. package/geometry/operators/containsOperator.js +1 -1
  205. package/geometry/operators/convexHullOperator.d.ts +17 -5
  206. package/geometry/operators/convexHullOperator.js +1 -1
  207. package/geometry/operators/crossesOperator.d.ts +9 -3
  208. package/geometry/operators/crossesOperator.js +1 -1
  209. package/geometry/operators/cutOperator.d.ts +6 -2
  210. package/geometry/operators/cutOperator.js +1 -1
  211. package/geometry/operators/densifyOperator.d.ts +14 -4
  212. package/geometry/operators/densifyOperator.js +1 -1
  213. package/geometry/operators/differenceOperator.d.ts +9 -3
  214. package/geometry/operators/differenceOperator.js +1 -1
  215. package/geometry/operators/disjointOperator.d.ts +9 -3
  216. package/geometry/operators/disjointOperator.js +1 -1
  217. package/geometry/operators/distanceOperator.d.ts +11 -3
  218. package/geometry/operators/distanceOperator.js +1 -1
  219. package/geometry/operators/equalsOperator.d.ts +9 -3
  220. package/geometry/operators/equalsOperator.js +1 -1
  221. package/geometry/operators/extendOperator.d.ts +11 -3
  222. package/geometry/operators/extendOperator.js +1 -1
  223. package/geometry/operators/generalizeOperator.d.ts +14 -4
  224. package/geometry/operators/generalizeOperator.js +1 -1
  225. package/geometry/operators/geodesicBufferOperator.d.ts +25 -7
  226. package/geometry/operators/geodesicBufferOperator.js +1 -1
  227. package/geometry/operators/geodesicProximityOperator.d.ts +28 -8
  228. package/geometry/operators/geodesicProximityOperator.js +1 -1
  229. package/geometry/operators/geodeticAreaOperator.d.ts +17 -5
  230. package/geometry/operators/geodeticAreaOperator.js +1 -1
  231. package/geometry/operators/geodeticDensifyOperator.d.ts +20 -6
  232. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  233. package/geometry/operators/geodeticDistanceOperator.d.ts +17 -5
  234. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  235. package/geometry/operators/geodeticLengthOperator.d.ts +17 -5
  236. package/geometry/operators/geodeticLengthOperator.js +1 -1
  237. package/geometry/operators/geodeticUtilsOperator.d.ts +17 -5
  238. package/geometry/operators/geodeticUtilsOperator.js +1 -1
  239. package/geometry/operators/graphicBufferOperator.d.ts +11 -3
  240. package/geometry/operators/graphicBufferOperator.js +1 -1
  241. package/geometry/operators/integrateOperator.d.ts +6 -2
  242. package/geometry/operators/integrateOperator.js +1 -1
  243. package/geometry/operators/intersectionOperator.d.ts +12 -4
  244. package/geometry/operators/intersectionOperator.js +1 -1
  245. package/geometry/operators/intersectsOperator.d.ts +9 -3
  246. package/geometry/operators/intersectsOperator.js +1 -1
  247. package/geometry/operators/isNearOperator.d.ts +11 -3
  248. package/geometry/operators/isNearOperator.js +1 -1
  249. package/geometry/operators/json/bufferOperator.js +1 -1
  250. package/geometry/operators/json/containsOperator.js +1 -1
  251. package/geometry/operators/json/convexHullOperator.js +1 -1
  252. package/geometry/operators/json/crossesOperator.js +1 -1
  253. package/geometry/operators/json/disjointOperator.js +1 -1
  254. package/geometry/operators/json/generalizeOperator.js +1 -1
  255. package/geometry/operators/json/geodesicBufferOperator.js +1 -1
  256. package/geometry/operators/json/graphicBufferOperator.js +1 -1
  257. package/geometry/operators/json/intersectionOperator.js +1 -1
  258. package/geometry/operators/json/intersectsOperator.js +1 -1
  259. package/geometry/operators/json/lengthOperator.js +1 -1
  260. package/geometry/operators/json/offsetOperator.js +1 -1
  261. package/geometry/operators/json/overlapsOperator.js +1 -1
  262. package/geometry/operators/json/projectOperator.js +1 -1
  263. package/geometry/operators/json/simplifyOperator.js +1 -1
  264. package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
  265. package/geometry/operators/json/touchesOperator.js +1 -1
  266. package/geometry/operators/json/unionOperator.js +1 -1
  267. package/geometry/operators/json/withinOperator.js +1 -1
  268. package/geometry/operators/labelPointOperator.d.ts +9 -3
  269. package/geometry/operators/labelPointOperator.js +1 -1
  270. package/geometry/operators/lengthOperator.d.ts +11 -3
  271. package/geometry/operators/lengthOperator.js +1 -1
  272. package/geometry/operators/linesToPolygonsOperator.d.ts +6 -2
  273. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  274. package/geometry/operators/locateBetweenOperator.d.ts +6 -2
  275. package/geometry/operators/locateBetweenOperator.js +1 -1
  276. package/geometry/operators/minimumBoundingCircleOperator.d.ts +14 -4
  277. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  278. package/geometry/operators/multiPartToSinglePartOperator.d.ts +11 -3
  279. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  280. package/geometry/operators/offsetOperator.d.ts +14 -4
  281. package/geometry/operators/offsetOperator.js +1 -1
  282. package/geometry/operators/overlapsOperator.d.ts +9 -3
  283. package/geometry/operators/overlapsOperator.js +1 -1
  284. package/geometry/operators/polygonOverlayOperator.d.ts +11 -3
  285. package/geometry/operators/polygonOverlayOperator.js +1 -1
  286. package/geometry/operators/polygonSlicerOperator.d.ts +22 -6
  287. package/geometry/operators/polygonSlicerOperator.js +1 -1
  288. package/geometry/operators/projectOperator.d.ts +15 -5
  289. package/geometry/operators/projectOperator.js +1 -1
  290. package/geometry/operators/proximityOperator.d.ts +22 -6
  291. package/geometry/operators/proximityOperator.js +1 -1
  292. package/geometry/operators/relateOperator.d.ts +12 -4
  293. package/geometry/operators/relateOperator.js +1 -1
  294. package/geometry/operators/reshapeOperator.d.ts +6 -2
  295. package/geometry/operators/reshapeOperator.js +1 -1
  296. package/geometry/operators/shapePreservingProjectOperator.d.ts +20 -6
  297. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  298. package/geometry/operators/simplifyOGCOperator.d.ts +3 -1
  299. package/geometry/operators/simplifyOGCOperator.js +1 -1
  300. package/geometry/operators/simplifyOperator.d.ts +12 -4
  301. package/geometry/operators/simplifyOperator.js +1 -1
  302. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  303. package/geometry/operators/support/deprecatedOperator.js +2 -0
  304. package/geometry/operators/symmetricDifferenceOperator.d.ts +9 -3
  305. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  306. package/geometry/operators/touchesOperator.d.ts +9 -3
  307. package/geometry/operators/touchesOperator.js +1 -1
  308. package/geometry/operators/unionOperator.d.ts +9 -3
  309. package/geometry/operators/unionOperator.js +1 -1
  310. package/geometry/operators/withinOperator.d.ts +9 -3
  311. package/geometry/operators/withinOperator.js +1 -1
  312. package/geometry/support/intersectsBase.js +1 -1
  313. package/geometry/support/normalizeUtils.js +1 -1
  314. package/kernel.js +1 -1
  315. package/layers/FeatureLayer.d.ts +2 -2
  316. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  317. package/layers/IntegratedMeshLayer.js +1 -1
  318. package/layers/SceneLayer.js +1 -1
  319. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  320. package/layers/list/BasemapItemCollection.d.ts +40 -14
  321. package/layers/list/BasemapItemCollection.js +1 -1
  322. package/layers/list/CatalogItemCollection.d.ts +29 -11
  323. package/layers/list/CatalogItemCollection.js +1 -1
  324. package/layers/list/Item.d.ts +66 -122
  325. package/layers/list/Item.js +1 -1
  326. package/layers/list/ItemPanel.d.ts +23 -34
  327. package/layers/list/LayerItemCollection.d.ts +33 -43
  328. package/layers/list/LayerItemCollection.js +1 -1
  329. package/layers/list/TableItem.d.ts +42 -53
  330. package/layers/list/TableItem.js +1 -1
  331. package/layers/list/TableItemCollection.d.ts +25 -55
  332. package/layers/list/TableItemCollection.js +1 -1
  333. package/layers/list/TableItemPanel.d.ts +25 -23
  334. package/layers/list/support/layerListUtils.js +1 -1
  335. package/layers/list/types.d.ts +158 -37
  336. package/layers/support/ElevationQuery.js +1 -1
  337. package/layers/support/FeatureFilter.d.ts +2 -1
  338. package/layers/support/FeatureFilter.js +1 -1
  339. package/layers/support/FeatureReductionBinning.d.ts +2 -2
  340. package/layers/support/FeatureReductionCluster.d.ts +2 -2
  341. package/layers/support/SubtypeSublayer.d.ts +1 -1
  342. package/package.json +3 -3
  343. package/popup/FeatureContent.d.ts +7 -7
  344. package/portal/schemas/definitions.js +1 -1
  345. package/portal/types.d.ts +1 -1
  346. package/renderers/DotDensityRenderer.d.ts +2 -2
  347. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +0 -1
  348. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +1 -1
  349. package/rest/knowledgeGraphService.d.ts +2 -2
  350. package/rest/support/Query.d.ts +1 -3
  351. package/rest/support/RelationshipQuery.d.ts +1 -1
  352. package/support/revision.js +1 -1
  353. package/symbols/LineSymbol3D.js +1 -1
  354. package/symbols/LineSymbol3DLayer.d.ts +9 -3
  355. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  356. package/symbols/cim/CIMSymbolHelper.js +1 -1
  357. package/symbols/cim/OverrideHelper.js +1 -1
  358. package/symbols/cim/Rasterizer.js +1 -1
  359. package/symbols/cim/cimAnalyzer.js +1 -1
  360. package/symbols/cim/dashUtils.js +2 -0
  361. package/symbols/cim/effects/EffectDashes.js +1 -1
  362. package/symbols/cim/fromCIMFontStyle.js +2 -0
  363. package/symbols/cim/richTextUtils.js +1 -1
  364. package/symbols/cim/types.d.ts +32 -0
  365. package/symbols/cim/utils.js +1 -1
  366. package/symbols/patterns/LinePattern3D.d.ts +10 -4
  367. package/symbols/patterns/LinePattern3D.js +1 -1
  368. package/symbols/patterns/LineTemplatePattern3D.d.ts +48 -0
  369. package/symbols/patterns/LineTemplatePattern3D.js +2 -0
  370. package/symbols/patterns/utils.js +1 -1
  371. package/symbols/support/Symbol3DOutline.js +1 -1
  372. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  373. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  374. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  375. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  376. package/views/2d/engine/webgl/TextureManager.js +1 -1
  377. package/views/2d/engine/webgl/decorGlyphRect.js +2 -0
  378. package/views/2d/engine/webgl/definitions.js +1 -1
  379. package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
  380. package/views/2d/engine/webgl/effects/highlight/MultiHighlightGradient.js +1 -1
  381. package/views/2d/engine/webgl/hashMosaic.js +2 -0
  382. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  383. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  384. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHighlight.js +1 -1
  385. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  386. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  387. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  388. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  389. package/views/2d/layers/LayerView2D.js +1 -1
  390. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  391. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  392. package/views/2d/layers/RouteLayerView2D.js +1 -1
  393. package/views/2d/layers/TileLayerView2D.js +1 -1
  394. package/views/2d/layers/features/FeatureContainer.js +1 -1
  395. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  396. package/views/2d/layers/features/Processor.js +1 -1
  397. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  398. package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
  399. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  400. package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
  401. package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
  402. package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
  403. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  404. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  405. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  406. package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
  407. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  408. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  409. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  410. package/views/2d/layers/support/FilterSchema.js +2 -0
  411. package/views/2d/layers/support/HighlightRegistry.js +2 -0
  412. package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
  413. package/views/2d/layers/support/util.js +1 -1
  414. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  415. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
  416. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  417. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  418. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  419. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  420. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  421. package/views/3d/input/SceneInputManager.js +1 -1
  422. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  423. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  424. package/views/3d/layers/I3SMeshView3D.js +1 -1
  425. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  426. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  427. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  428. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  429. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  430. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  431. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  432. package/views/3d/navigation/Navigation3D.d.ts +16 -0
  433. package/views/3d/navigation/Navigation3D.js +2 -0
  434. package/views/3d/navigation/modes/DefaultNavigationMode3D.d.ts +4 -0
  435. package/views/3d/navigation/modes/DefaultNavigationMode3D.js +2 -0
  436. package/views/3d/navigation/modes/GroundNavigationMode3D.d.ts +4 -0
  437. package/views/3d/navigation/modes/GroundNavigationMode3D.js +2 -0
  438. package/views/3d/navigation/modes/NavigationMode3D.d.ts +4 -0
  439. package/views/3d/navigation/modes/NavigationMode3D.js +2 -0
  440. package/views/3d/navigation/modes/NavigationMode3DUnion.d.ts +5 -0
  441. package/views/3d/state/ConstraintsManager.js +1 -1
  442. package/views/3d/support/QualityProfile.js +1 -1
  443. package/views/3d/support/hitTest.js +1 -1
  444. package/views/3d/terrain/ExtentHelper.js +1 -1
  445. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  446. package/views/3d/webgl-engine/effects/AmbientIllumination.js +2 -0
  447. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  448. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  449. package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
  450. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  451. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  452. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  453. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  454. package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
  455. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  456. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  457. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  458. package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
  459. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  460. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +12 -8
  461. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  462. package/views/BreakpointsOwner.d.ts +2 -2
  463. package/views/PopupView.js +1 -1
  464. package/views/SceneView.js +1 -1
  465. package/views/SelectionManager.d.ts +24 -24
  466. package/views/View.js +1 -1
  467. package/views/View2D.js +1 -1
  468. package/views/interactive/support/types.d.ts +0 -1
  469. package/views/layers/FeatureLikeLayerView.js +1 -1
  470. package/views/support/DefaultsFromMap.js +1 -1
  471. package/widgets/Attachments/support/attachmentUtils.d.ts +8 -0
  472. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
  473. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  474. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +5 -1
  475. package/widgets/BasemapLayerList/types.d.ts +15 -2
  476. package/widgets/BasemapLayerList.d.ts +1 -1
  477. package/widgets/BasemapLayerList.js +1 -1
  478. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  479. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  480. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +14 -0
  481. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  482. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  483. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +29 -2
  484. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  485. package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +1 -5
  486. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  487. package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
  488. package/widgets/BatchAttributeForm.js +1 -1
  489. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  490. package/widgets/Editor/EditorViewModel.d.ts +2 -2
  491. package/widgets/Editor.d.ts +2 -2
  492. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +6 -6
  493. package/widgets/FeatureTable/support/FeatureStore.d.ts +2 -2
  494. package/widgets/FeatureTable.d.ts +5 -5
  495. package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
  496. package/widgets/LayerList/LayerListViewModel.js +1 -1
  497. package/widgets/LayerList/LayerListVisibleElements.d.ts +4 -1
  498. package/widgets/LayerList/ListItem.d.ts +4 -0
  499. package/widgets/LayerList/ListItemPanel.d.ts +3 -0
  500. package/widgets/OrientedImageryViewer/types.d.ts +2 -2
  501. package/widgets/OrientedImageryViewer.d.ts +20 -1
  502. package/widgets/OrientedImageryViewer.js +1 -1
  503. package/widgets/Sketch/SketchViewModel.js +1 -1
  504. package/widgets/support/SelectionList/SelectionListViewModel.d.ts +1 -1
  505. package/widgets/support/iconUtils.js +1 -1
  506. package/assets/esri/core/workers/chunks/03601be8b0763f82e88f.js +0 -1
  507. package/assets/esri/core/workers/chunks/0bff8d589312be6588fe.js +0 -1
  508. package/assets/esri/core/workers/chunks/0de90b1ad8118457fd5a.js +0 -1
  509. package/assets/esri/core/workers/chunks/0e1a067ab243900d0371.js +0 -1
  510. package/assets/esri/core/workers/chunks/0ee6109e6578395a7900.js +0 -1
  511. package/assets/esri/core/workers/chunks/0ee7376c29e0fd8f676c.js +0 -1
  512. package/assets/esri/core/workers/chunks/13551987fbeaae154df8.js +0 -1
  513. package/assets/esri/core/workers/chunks/186350d720352bd5ff33.js +0 -1
  514. package/assets/esri/core/workers/chunks/25ecf94d776c3b6db0f3.js +0 -1
  515. package/assets/esri/core/workers/chunks/262052dfaec3af8a58b9.js +0 -1
  516. package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +0 -1
  517. package/assets/esri/core/workers/chunks/307297e025eed110095f.js +0 -1
  518. package/assets/esri/core/workers/chunks/33422dca6f4bcaa0ea74.js +0 -1
  519. package/assets/esri/core/workers/chunks/33e583166ab3943ecf0e.js +0 -1
  520. package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +0 -1
  521. package/assets/esri/core/workers/chunks/3daddcb106a7009c5a70.js +0 -1
  522. package/assets/esri/core/workers/chunks/3de6e54b6ed0feae1940.js +0 -1
  523. package/assets/esri/core/workers/chunks/448f068a14f24f2f8a43.js +0 -1
  524. package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +0 -1
  525. package/assets/esri/core/workers/chunks/5134241be1f1bf25231a.js +0 -1
  526. package/assets/esri/core/workers/chunks/56163189fbe63aa11e94.js +0 -1
  527. package/assets/esri/core/workers/chunks/571cf99c3eab8e517542.js +0 -1
  528. package/assets/esri/core/workers/chunks/5762746cfb02a4119d82.js +0 -1
  529. package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +0 -1
  530. package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +0 -1
  531. package/assets/esri/core/workers/chunks/5c8f423812a23c02c1fd.js +0 -1
  532. package/assets/esri/core/workers/chunks/5eb726317b6602f1e206.js +0 -1
  533. package/assets/esri/core/workers/chunks/6e2075bd4832ff0db68c.js +0 -1
  534. package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +0 -1
  535. package/assets/esri/core/workers/chunks/7610dd0b46948b7bd840.js +0 -1
  536. package/assets/esri/core/workers/chunks/7737ab739eba6d81282d.js +0 -1
  537. package/assets/esri/core/workers/chunks/7be56ac60e580c806a5d.js +0 -1
  538. package/assets/esri/core/workers/chunks/7d9468e38f3bf006f86e.js +0 -1
  539. package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +0 -1
  540. package/assets/esri/core/workers/chunks/84dc2afd89263a311b81.js +0 -1
  541. package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +0 -1
  542. package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +0 -1
  543. package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +0 -1
  544. package/assets/esri/core/workers/chunks/be69e2dda75b079362b2.js +0 -1
  545. package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +0 -1
  546. package/assets/esri/core/workers/chunks/c18de0f6cbeecee4ce34.js +0 -1
  547. package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +0 -1
  548. package/assets/esri/core/workers/chunks/d33d08cb6856cd2eb35e.js +0 -1
  549. package/assets/esri/core/workers/chunks/e688e6e816824b53a25e.js +0 -1
  550. package/assets/esri/core/workers/chunks/ea068c797e3e462f4518.js +0 -1
  551. package/assets/esri/core/workers/chunks/eaf1d38f09744b7e84f5.js +0 -1
  552. package/assets/esri/core/workers/chunks/eff99e45d818e58fd443.js +0 -1
  553. package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +0 -1
  554. package/assets/esri/core/workers/chunks/f60d5ce49c173d5381ec.js +0 -1
  555. package/assets/esri/core/workers/chunks/f72f4413fc7461e11a2a.js +0 -1
  556. package/assets/esri/core/workers/chunks/f834aa732c3f06525089.js +0 -1
  557. package/assets/esri/core/workers/chunks/fae14e30fa7d81bf706e.js +0 -1
  558. package/assets/esri/core/workers/chunks/fb6f1b562ee0983c8c6e.js +0 -1
  559. package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +0 -1
  560. package/graphic/graphicOrigins.js +0 -2
  561. package/views/2d/engine/webgl/Utils.js +0 -2
  562. package/views/2d/layers/support/HighlightCounter.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{Cyclical as t}from"../../core/Cyclical.js";import e from"../../core/Error.js";import{importLazily as n}from"../../core/importUtils.js";import{whenOrAbort as r}from"../../core/promiseUtils.js";import o from"../Extent.js";import i from"../Polygon.js";import s from"../Polyline.js";import l from"../SpatialReference.js";import{getGeometryParts as a}from"./normalizeUtilsCommon.js";import{getInfo as c}from"./spatialReferenceUtils.js";function p(t){const e=[];let n=0,r=0;for(let o=0;o<t.length;o++){const i=t[o];let s=null;for(let t=0;t<i.length;t++)s=i[t],e.push(s),0===t?(n=s[0],r=n):(n=Math.min(n,s[0]),r=Math.max(r,s[0]));s&&e.push([(n+r)/2,0])}return e}function f(t,n){switch(t.type){case"polygon":case"polyline":break;default:throw new e("internal:geometry","straightLineDensify: the input geometry is neither polyline nor polygon")}const r=a(t),o=[];for(const e of r){const t=[];o.push(t),t.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],i=e[r][1],s=e[r+1][0],l=e[r+1][1],a=Math.sqrt((s-o)*(s-o)+(l-i)*(l-i)),c=(l-i)/a,p=(s-o)/a,f=a/n;if(f>1){for(let l=1;l<=f-1;l++){const e=l*n,r=p*e+o,s=c*e+i;t.push([r,s])}const e=(a+Math.floor(f-1)*n)/2,r=p*e+o,s=c*e+i;t.push([r,s])}t.push([s,l])}}return"polygon"===t.type?new i({rings:o,spatialReference:t.spatialReference}):new s({paths:o,spatialReference:t.spatialReference})}async function m(t,e,n){Array.isArray(t)||(t=[t]),null!=e&&"object"==typeof e&&"authMode"in e&&(n=e);let o=null;for(const r of t)o??=r?.spatialReference;if(!o)return t;const i=c(o);if(!i)return t;const[s,l]=i.valid;let a=!1;for(const r of t){if(!r)continue;if("point"===r.type){a||=r.x>=l,a||=r.x<=s;continue}const{extent:t}=r;if(null==t){a=!0;break}a||=t.xmin>=l,a||=t.xmin<=s,a||=t.xmax>=l,a||=t.xmax<=s}if(!a)return t;const[{foldInto360Range:p},f]=await r(Promise.all([u.getImportPromise(),h.getImportPromise()]),n),m=f.fromSpatialReference(o);return t.map(t=>{if(null==t||"mesh"===t.type)return t;const e=f.fromGeometry(t),n=f.toGeometry(p(e,m),o);return"extent"===t.type&&1===n?.rings.length?n.extent:n})}const u=n(()=>import("../operators/gx/operatorProject.js").then(t=>t.load().then(()=>t))),h=n(()=>import("../operators/support/apiConverter.js"));function x(t){if(!t||"mesh"===t.type)return null;const{extent:e,spatialReference:n}=t,r=n&&c(n);if("point"===t.type){const{x:e,y:r}=t;return new o({xmin:e,ymin:r,xmax:e,ymax:r,spatialReference:n})}if(!e||!r)return e;const[i,s]=r.valid,l=2*s,{width:a}=e;let f,{xmin:m,xmax:u}=e;if([m,u]=[u,m],"extent"===t.type||0===a||a<=s||a>l||m<i||u>s)return e;switch(t.type){case"polygon":if(!(t.rings.length>1))return e;f=p(t.rings);break;case"polyline":if(!(t.paths.length>1))return e;f=p(t.paths);break;case"multipoint":f=t.points}const h=e.clone();for(let o=0;o<f.length;o++){let t=f[o][0];t<0?(t+=s,u=Math.max(t,u)):(t-=s,m=Math.min(t,m))}return h.xmin=m,h.xmax=u,h.width<a?(h.xmin-=s,h.xmax-=s,h):e}function y(t,e,n){const r=c(n);if(null==r)return t;const[o,i]=r.valid,s=2*i;let l=0,a=0;e>i?l=Math.ceil(Math.abs(e-i)/s):e<o&&(l=-Math.ceil(Math.abs(e-o)/s)),t>i?a=Math.ceil(Math.abs(t-i)/s):t<o&&(a=-Math.ceil(Math.abs(t-o)/s));let p=t+(l-a)*s;const f=p-e;return f>i?p-=s:f<o&&(p+=s),p}function g(t,e){const n=M(e);return n?.normalize(t)??t}function M(e){const n=c(e);if(null==n)return null;const[r,o]=n.valid;return new t(r,o)}const j=M(l.WGS84),w=M(l.WebMercator);export{M as createSpatialReferenceCyclical,j as gcsCyclical,y as getClosestDenormalizedXToReference,x as getDenormalizedExtent,m as normalizeCentralMeridian,g as normalizeMapX,f as straightLineDensify,w as webMercatorCyclical};
2
+ import{Cyclical as t}from"../../core/Cyclical.js";import e from"../../core/Error.js";import{importLazily as n}from"../../core/importUtils.js";import{whenOrAbort as r}from"../../core/promiseUtils.js";import o from"../Extent.js";import i from"../Polygon.js";import s from"../Polyline.js";import l from"../SpatialReference.js";import{getGeometryParts as a}from"./normalizeUtilsCommon.js";import{getInfo as c}from"./spatialReferenceUtils.js";function p(t){const e=[];let n=0,r=0;for(let o=0;o<t.length;o++){const i=t[o];let s=null;for(let t=0;t<i.length;t++)s=i[t],e.push(s),0===t?(n=s[0],r=n):(n=Math.min(n,s[0]),r=Math.max(r,s[0]));s&&e.push([(n+r)/2,0])}return e}function m(t,n){switch(t.type){case"polygon":case"polyline":break;default:throw new e("internal:geometry","straightLineDensify: the input geometry is neither polyline nor polygon")}const r=a(t),o=[];for(const e of r){const t=[];o.push(t),t.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],i=e[r][1],s=e[r+1][0],l=e[r+1][1],a=Math.sqrt((s-o)*(s-o)+(l-i)*(l-i)),c=(l-i)/a,p=(s-o)/a,m=a/n;if(m>1){for(let l=1;l<=m-1;l++){const e=l*n,r=p*e+o,s=c*e+i;t.push([r,s])}const e=(a+Math.floor(m-1)*n)/2,r=p*e+o,s=c*e+i;t.push([r,s])}t.push([s,l])}}return"polygon"===t.type?new i({rings:o,spatialReference:t.spatialReference}):new s({paths:o,spatialReference:t.spatialReference})}async function f(t,e,n){Array.isArray(t)||(t=[t]),null!=e&&"object"==typeof e&&"authMode"in e&&(n=e);let o=null;for(const r of t)o??=r?.spatialReference;if(!o)return t;const s=c(o);if(!s)return t;if(1===t.length&&"extent"===t[0]?.type){const e=t[0].clone().normalizeAsSingleGeometry(s);return["xmin"in e?e:new i(e)]}const[l,a]=s.valid;let p=!1;for(const r of t){if(!r)continue;if("point"===r.type){p||=r.x>=a,p||=r.x<=l;continue}const{extent:t}=r;if(null==t){p=!0;break}p||=t.xmin>=a,p||=t.xmin<=l,p||=t.xmax>=a,p||=t.xmax<=l}if(!p)return t;const[{foldInto360Range:m},f]=await r(Promise.all([u.getImportPromise(),h.getImportPromise()]),n),x=f.fromSpatialReference(o);return t.map(t=>{if(null==t||"mesh"===t.type)return t;const e=f.fromGeometry(t),n=f.toGeometry(m(e,x),o);return"extent"===t.type&&1===n?.rings.length?n.extent:n})}const u=n(()=>import("../operators/gx/operatorProject.js").then(t=>t.load().then(()=>t))),h=n(()=>import("../operators/support/apiConverter.js"));function x(t){if(!t||"mesh"===t.type)return null;const{extent:e,spatialReference:n}=t,r=n&&c(n);if("point"===t.type){const{x:e,y:r}=t;return new o({xmin:e,ymin:r,xmax:e,ymax:r,spatialReference:n})}if(!e||!r)return e;const[i,s]=r.valid,l=2*s,{width:a}=e;let m,{xmin:f,xmax:u}=e;if([f,u]=[u,f],"extent"===t.type||0===a||a<=s||a>l||f<i||u>s)return e;switch(t.type){case"polygon":if(!(t.rings.length>1))return e;m=p(t.rings);break;case"polyline":if(!(t.paths.length>1))return e;m=p(t.paths);break;case"multipoint":m=t.points}const h=e.clone();for(let o=0;o<m.length;o++){let t=m[o][0];t<0?(t+=s,u=Math.max(t,u)):(t-=s,f=Math.min(t,f))}return h.xmin=f,h.xmax=u,h.width<a?(h.xmin-=s,h.xmax-=s,h):e}function y(t,e,n){const r=c(n);if(null==r)return t;const[o,i]=r.valid,s=2*i;let l=0,a=0;e>i?l=Math.ceil(Math.abs(e-i)/s):e<o&&(l=-Math.ceil(Math.abs(e-o)/s)),t>i?a=Math.ceil(Math.abs(t-i)/s):t<o&&(a=-Math.ceil(Math.abs(t-o)/s));let p=t+(l-a)*s;const m=p-e;return m>i?p-=s:m<o&&(p+=s),p}function g(t,e){const n=M(e);return n?.normalize(t)??t}function M(e){const n=c(e);if(null==n)return null;const[r,o]=n.valid;return new t(r,o)}const j=M(l.WGS84),w=M(l.WebMercator);export{M as createSpatialReferenceCyclical,j as gcsCyclical,y as getClosestDenormalizedXToReference,x as getDenormalizedExtent,f as normalizeCentralMeridian,g as normalizeMapX,m as straightLineDensify,w as webMercatorCyclical};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.112",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.114",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
@@ -1589,8 +1589,8 @@ export abstract class __FeatureLayerSansType extends FeatureLayerSuperclass {
1589
1589
  /**
1590
1590
  * Returns the title of a [feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/). The feature title is generated based on the following conditions for a `FeatureLayer`.
1591
1591
  * - If the feature has a popup title configured, then the popup title will be returned.
1592
- * - If the feature does not have a popup title, then the [displayField](#displayField) value will be returned.
1593
- * - If there is no `displayField`, then the [objectId](#objectIdField) will be returned.
1592
+ * - If the feature does not have a popup title, then the [displayField](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#displayField) value will be returned.
1593
+ * - If there is no `displayField`, then the [objectIdField](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#objectIdField) will be returned.
1594
1594
  *
1595
1595
  * @param graphic - The [graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) for which to generate a title.
1596
1596
  * @param options - Additional options that control how the title is generated.
@@ -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"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import o from"../core/Error.js";import"../core/has.js";import r from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as n}from"../core/promiseUtils.js";import{on as a,sync as l,watch as p}from"../core/reactiveUtils.js";import{property as c,subclass as m}from"../core/accessorSupport/decorators.js";import{persistable as d}from"../core/accessorSupport/decorators/persistable.js";import u from"../geometry/Extent.js";import h from"../geometry/SpatialReference.js";import f from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as g}from"./mixins/ArcGISService.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as T,url as x}from"./support/commonProperties.js";import w from"./support/SceneModifications.js";import{default3DTilesSpatialReference as R,default3DTilesFullExtent as E,initFullExtent as b,hasEsriCrs as L}from"./support/tiles3DUtils.js";import k from"../portal/Portal.js";import{getElevationOffsetInMeters as G,logInvalidElevationInfoWarning as P,elevationModeRequiredMessage as I,featureExpressionUnsupportedMessage as D}from"../support/elevationInfoUtils.js";import{f as O}from"../chunks/persistableUrlUtils.js";import{isBasemap as U}from"../support/userTypeGuards/isBasemap.js";import{initialize as C,switchMeshModificationPolygonVCSSync as M}from"../views/3d/layers/Lyr3DWorker.js";import{toWasmModification as q,fromWasmModification as N}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{reader as A}from"../core/accessorSupport/decorators/reader.js";let J=class extends(g(_(v(j(s(S(y(i(f))))))))){readModifications(e,t,i){this._modificationsSource={url:O(e,i),context:i}}initialize(){this.addHandles([a(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},l),p(()=>this.modifications,()=>this._modificationsGeneration++)])}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=R,this.fullExtent=E,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null,this._modificationsGeneration=0,this._simulateGoogleUrl=!1}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[h.WGS84,this.esriCrsSpatialReference]:[h.WGS84]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[E,this.esriCrsFullExtent]:[E]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[o,r]of Object.entries(e)){if("uri"===o)try{const e=new URL("https://tmp"+r).searchParams.get("session");if(e)return e}catch(i){}"object"==typeof r&&null!==r&&t.push(r)}}return null}async requestRootAndSession(e){const i=(e,t)=>new o("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((o,s)=>{this.url||s(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,o)=>{if(this.replacesTerrain&&!this._key){const r=this.portalItem?.portal||this.parent?.portalItem?.portal||k.getDefault();r.signIn().then(()=>{r.g3dTilesEnabled?t(r.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>o(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):o(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+r.url))},()=>o(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void s(i("root-parse-failed","Error parsing root tile, details: "+t))}if(!this._rootTilesetJSON)return void s(i("root-is-null","Root tile is null."));this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=b(this._rootTilesetJSON);L(this._rootTilesetJSON)&&(this.esriCrsFullExtent=b(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),o(),this._rootRequestPromise=null},e=>{n(e),s(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>s(e))})),this._rootRequestPromise}_haveWGS84ZModifications(e){for(const t of e){if(!t.geometry?.spatialReference)return!0;if(115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0}return!1}async _doLoad(e){const t=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new o("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(i){n(i)}if(null!=this._modificationsSource){const t=await w.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await C();try{const e=q(null,t.toArray(),h.WGS84),i=M({modifications:e,inVCS:115700});i.success&&i.modifications&&N(i.modifications,t)}catch(s){r.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",s)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){const{modifications:e}=this;return void(e&&e.length>0&&await C())}await this.load().then(()=>{},()=>{})}get memoizedElevationQueryDependencies(){return[this.loadStatus,null!=this.queryElevationCallback,G(this.elevationInfo),this._modificationsGeneration]}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";P(r.getLogger(this),I(t,"absolute-height",e)),P(r.getLogger(this),D(t,e))}get replacesTerrain(){return this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return U(this.parent)}get hasGoogleUrl(){return this._simulateGoogleUrl||!!this.url?.match(/.+\.googleapis.com/)}get test(){}};e([c({type:["IntegratedMesh3DTilesLayer"]})],J.prototype,"operationalLayerType",void 0),e([c({type:w,clonable:e=>e?.clone()??null}),d({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],J.prototype,"modifications",void 0),e([c({clonable:e=>e?{...e}:null})],J.prototype,"_modificationsSource",void 0),e([A(["web-scene","portal-item"],"modifications")],J.prototype,"readModifications",null),e([c({type:h})],J.prototype,"spatialReference",void 0),e([c({type:u})],J.prototype,"fullExtent",void 0),e([c({readOnly:!0})],J.prototype,"supportedSpatialReferences",null),e([c({type:[u]})],J.prototype,"fullExtents",null),e([c(T)],J.prototype,"elevationInfo",null),e([c({type:["show","hide"]})],J.prototype,"listMode",void 0),e([c(x)],J.prototype,"url",void 0),e([c({readOnly:!0})],J.prototype,"type",void 0),e([c({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],J.prototype,"path",void 0),e([c({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],J.prototype,"minScale",void 0),e([c({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],J.prototype,"maxScale",void 0),e([c()],J.prototype,"queryElevationCallback",void 0),e([c()],J.prototype,"_modificationsGeneration",void 0),e([c()],J.prototype,"memoizedElevationQueryDependencies",null),e([c({readOnly:!0})],J.prototype,"hasAttributionData",null),e([c()],J.prototype,"replacesTerrain",null),e([c()],J.prototype,"isUsedAsGroundLayer",null),e([c()],J.prototype,"hasGoogleUrl",null),e([c()],J.prototype,"_simulateGoogleUrl",void 0),J=e([m("esri.layers.IntegratedMesh3DTilesLayer")],J);const W=J;export{W as default};
2
+ import{__decorate as e}from"tslib";import t from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as n}from"../core/promiseUtils.js";import{on as a,sync as l,watch as p}from"../core/reactiveUtils.js";import{property as m,subclass as c}from"../core/accessorSupport/decorators.js";import{persistable as u}from"../core/accessorSupport/decorators/persistable.js";import d from"../geometry/Extent.js";import h from"../geometry/SpatialReference.js";import f from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as g}from"./mixins/ArcGISService.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as T,url as x}from"./support/commonProperties.js";import w from"./support/SceneModifications.js";import{default3DTilesSpatialReference as R,default3DTilesFullExtent as b,initFullExtent as E,hasEsriCrs as L}from"./support/tiles3DUtils.js";import k from"../portal/Portal.js";import{getElevationOffsetInMeters as G,logInvalidElevationInfoWarning as I,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as U}from"../support/elevationInfoUtils.js";import{isGround as D}from"../support/groundInstanceUtils.js";import{f as O}from"../chunks/persistableUrlUtils.js";import{isBasemap as C}from"../support/userTypeGuards/isBasemap.js";import{initialize as M,switchMeshModificationPolygonVCSSync as q}from"../views/3d/layers/Lyr3DWorker.js";import{toWasmModification as N,fromWasmModification as A}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{reader as J}from"../core/accessorSupport/decorators/reader.js";let W=class extends(g(_(v(j(s(S(y(i(f))))))))){readModifications(e,t,i){this._modificationsSource={url:O(e,i),context:i}}initialize(){this.addHandles([a(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},l),p(()=>this.modifications,()=>this._modificationsGeneration++)])}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=R,this.fullExtent=b,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null,this._modificationsGeneration=0,this._simulateGoogleUrl=!1}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[h.WGS84,this.esriCrsSpatialReference]:[h.WGS84]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[b,this.esriCrsFullExtent]:[b]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[r,o]of Object.entries(e)){if("uri"===r)try{const e=new URL("https://tmp"+o).searchParams.get("session");if(e)return e}catch(i){}"object"==typeof o&&null!==o&&t.push(o)}}return null}async requestRootAndSession(e){const i=(e,t)=>new r("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((r,s)=>{this.url||s(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,r)=>{if(this.replacesTerrain&&!this._key){const o=this.portalItem?.portal||this.parent?.portalItem?.portal||k.getDefault();o.signIn().then(()=>{o.g3dTilesEnabled?t(o.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>r(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):r(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+o.url))},()=>r(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void s(i("root-parse-failed","Error parsing root tile, details: "+t))}if(!this._rootTilesetJSON)return void s(i("root-is-null","Root tile is null."));this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=E(this._rootTilesetJSON);L(this._rootTilesetJSON)&&(this.esriCrsFullExtent=E(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),r(),this._rootRequestPromise=null},e=>{n(e),s(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>s(e))})),this._rootRequestPromise}_haveWGS84ZModifications(e){for(const t of e){if(!t.geometry?.spatialReference)return!0;if(115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0}return!1}async _doLoad(e){const t=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(i){n(i)}if(null!=this._modificationsSource){const t=await w.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await M();try{const e=N(null,t.toArray(),h.WGS84),i=q({modifications:e,inVCS:115700});i.success&&i.modifications&&A(i.modifications,t)}catch(s){o.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",s)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){const{modifications:e}=this;return void(e&&e.length>0&&await M())}await this.load().then(()=>{},()=>{})}get memoizedElevationQueryDependencies(){return[this.loadStatus,null!=this.queryElevationCallback,G(this.elevationInfo),this._modificationsGeneration]}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";I(o.getLogger(this),P(t,"absolute-height",e)),I(o.getLogger(this),U(t,e))}get replacesTerrain(){return this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return has("enable-feature:im-as-ground")?C(this.parent)||D(this.parent):C(this.parent)}get hasGoogleUrl(){return this._simulateGoogleUrl||!!this.url?.match(/.+\.googleapis.com/)}get test(){}};e([m({type:["IntegratedMesh3DTilesLayer"]})],W.prototype,"operationalLayerType",void 0),e([m({type:w,clonable:e=>e?.clone()??null}),u({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],W.prototype,"modifications",void 0),e([m({clonable:e=>e?{...e}:null})],W.prototype,"_modificationsSource",void 0),e([J(["web-scene","portal-item"],"modifications")],W.prototype,"readModifications",null),e([m({type:h})],W.prototype,"spatialReference",void 0),e([m({type:d})],W.prototype,"fullExtent",void 0),e([m({readOnly:!0})],W.prototype,"supportedSpatialReferences",null),e([m({type:[d]})],W.prototype,"fullExtents",null),e([m(T)],W.prototype,"elevationInfo",null),e([m({type:["show","hide"]})],W.prototype,"listMode",void 0),e([m(x)],W.prototype,"url",void 0),e([m({readOnly:!0})],W.prototype,"type",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],W.prototype,"path",void 0),e([m({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],W.prototype,"minScale",void 0),e([m({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],W.prototype,"maxScale",void 0),e([m()],W.prototype,"queryElevationCallback",void 0),e([m()],W.prototype,"_modificationsGeneration",void 0),e([m()],W.prototype,"memoizedElevationQueryDependencies",null),e([m({readOnly:!0})],W.prototype,"hasAttributionData",null),e([m()],W.prototype,"replacesTerrain",null),e([m()],W.prototype,"isUsedAsGroundLayer",null),e([m()],W.prototype,"hasGoogleUrl",null),e([m()],W.prototype,"_simulateGoogleUrl",void 0),W=e([c("esri.layers.IntegratedMesh3DTilesLayer")],W);const z=W;export{z as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t,__decorate as o}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Error.js";import{abortHandle as n,disposable as a,makeHandle as l}from"../core/handleUtils.js";import p from"../core/Logger.js";import{MultiOriginJSONSupportMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as y,throwIfAbortError as m}from"../core/promiseUtils.js";import{on as c,sync as u,watch as h}from"../core/reactiveUtils.js";import{property as f,subclass as v}from"../core/accessorSupport/decorators.js";import{persistable as g}from"../core/accessorSupport/decorators/persistable.js";import S from"./Layer.js";import{APIKeyMixin as _}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as Q}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{SceneService as L}from"./mixins/SceneService.js";import{elevationInfo as x}from"./support/commonProperties.js";import{GeometryDescriptor as k}from"./support/GeometryDescriptor.js";import{queryIntegratedMeshElevation as A,defaultNoDataValue as D}from"./support/I3SIntegratedMeshElevationQuery.js";import{I3SNodePageDefinition as C,I3SMaterialDefinition as T,I3STextureSetDefinition as M,I3SGeometryDefinition as W}from"./support/I3SLayerDefinitions.js";import E from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as O,elevationModeRequiredMessage as U,featureExpressionUnsupportedMessage as G}from"../support/elevationInfoUtils.js";import{f as P}from"../chunks/persistableUrlUtils.js";import{SceneLayerWorkerHandle as N}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{I3SDataRequester as R}from"../views/3d/layers/i3s/I3SDataRequester.js";import H from"../views/3d/layers/i3s/I3SNodeLoader.js";import{ImmediateTask as z}from"../views/support/Scheduler.js";import{reader as K}from"../core/accessorSupport/decorators/reader.js";let V=class extends(L(w(j(Q(I(d(b(_(i(S)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();const e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,null!=e&&e.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([c(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},u),h(()=>this.modifications,()=>this._modificationsGeneration++,u),h(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),u)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:P(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new N((e,t)=>z.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(o,i,s){const p={stack:[],error:void 0,hasError:!1};try{const t=s?.noDataValue??Number.MAX_VALUE,d=this._elevationQueryWorker,m=new AbortController;o.addHandles(n(m),m);e(p,a(l(()=>o.removeHandles(m))),!1);const c=AbortSignal.any([s?.signal,this._elevationQueryAbortController.signal,m.signal].filter(r));await this.load({signal:c}),y(c);const u=k.fromGeometry(i),h={signal:c,elevationOffset:this.elevationInfo?.offset??0,scheduler:o.resourceController.scheduler};if(null==this._elevationQueryWorkerSetup){const e=this.store?.defaultGeometrySchema;null!=e&&(this._elevationQueryWorkerSetup=d.setLegacySchema(this._elevationQueryWorkerContext,e))}const f=await A(this,u,h);y(c);const v=f.coordinates[0].z===D;v&&(f.coordinates[0].z=t);const g=await f.project(i.spatialReference,c);y(c);const S=g??u.clone(),_={geometry:S.export(),noDataValue:t};return s?.returnSampleInfo&&(_.sampleInfo=S.coordinates.map(()=>({demResolution:v?-1:1}))),_}catch(d){p.error=d,p.hasError=!0}finally{t(p)}}_abortElevationQueriesAfterDependencyChange(){const e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){return await this._elevationQueryWorkerSetup,y(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){m(o)}if(y(t),await this._fetchService(t),y(t),null!=this._modificationsSource){const o=await E.fromUrl(this._modificationsSource.url,this.spatialReference,e);y(t),this.setAtOrigin("modifications",o,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),y(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new s("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}get elevationQueryDataRequester(){return new R(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new H(this,this.elevationQueryDataRequester,p.getLogger("esri.layers.IntegratedMeshLayer"),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){const t="Integrated mesh layers";O(p.getLogger(this),U(t,"absolute-height",e)),O(p.getLogger(this),G(t,e))}};o([f({type:String,readOnly:!0})],V.prototype,"geometryType",void 0),o([f({type:["show","hide"]})],V.prototype,"listMode",void 0),o([f({type:["IntegratedMeshLayer"]})],V.prototype,"operationalLayerType",void 0),o([f({json:{read:!1},readOnly:!0})],V.prototype,"type",void 0),o([f({type:C,readOnly:!0,clonable:!1})],V.prototype,"nodePages",void 0),o([f({type:[T],readOnly:!0,clonable:!1})],V.prototype,"materialDefinitions",void 0),o([f({type:[M],readOnly:!0,clonable:!1})],V.prototype,"textureSetDefinitions",void 0),o([f({type:[W],readOnly:!0,clonable:!1})],V.prototype,"geometryDefinitions",void 0),o([f({readOnly:!0})],V.prototype,"serviceUpdateTimeStamp",void 0),o([f({type:E,clonable:e=>e?.clone()??e}),g({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],V.prototype,"modifications",void 0),o([f({clonable:e=>e?{...e}:null})],V.prototype,"_modificationsSource",void 0),o([K(["web-scene","portal-item"],"modifications")],V.prototype,"readModifications",null),o([f(x)],V.prototype,"elevationInfo",null),o([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],V.prototype,"path",void 0),o([f({clonable:!1})],V.prototype,"_elevationQueryWorker",null),o([f()],V.prototype,"_modificationsGeneration",void 0),o([f()],V.prototype,"memoizedElevationQueryDependencies",null),o([f({clonable:!1})],V.prototype,"elevationQueryDataRequester",null),o([f({clonable:!1})],V.prototype,"elevationQueryNodeLoader",null),V=o([v("esri.layers.IntegratedMeshLayer")],V);const q=V;export{q as default};
2
+ import{__addDisposableResource as e,__disposeResources as t,__decorate as o}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Error.js";import{abortHandle as n,disposable as a,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{MultiOriginJSONSupportMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as y,throwIfAbortError as m}from"../core/promiseUtils.js";import{on as u,sync as c,watch as h}from"../core/reactiveUtils.js";import{property as f,subclass as v}from"../core/accessorSupport/decorators.js";import{persistable as g}from"../core/accessorSupport/decorators/persistable.js";import S from"./Layer.js";import{APIKeyMixin as _}from"./mixins/APIKeyMixin.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as Q}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{SceneService as I}from"./mixins/SceneService.js";import{elevationInfo as x}from"./support/commonProperties.js";import{GeometryDescriptor as A}from"./support/GeometryDescriptor.js";import{queryIntegratedMeshElevation as k,defaultNoDataValue as D}from"./support/I3SIntegratedMeshElevationQuery.js";import{I3SNodePageDefinition as T,I3SMaterialDefinition as C,I3STextureSetDefinition as M,I3SGeometryDefinition as W}from"./support/I3SLayerDefinitions.js";import E from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as U,elevationModeRequiredMessage as G,featureExpressionUnsupportedMessage as O}from"../support/elevationInfoUtils.js";import{isGround as P}from"../support/groundInstanceUtils.js";import{f as N}from"../chunks/persistableUrlUtils.js";import{isBasemap as R}from"../support/userTypeGuards/isBasemap.js";import{SceneLayerWorkerHandle as H}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{I3SDataRequester as z}from"../views/3d/layers/i3s/I3SDataRequester.js";import K from"../views/3d/layers/i3s/I3SNodeLoader.js";import{ImmediateTask as V}from"../views/support/Scheduler.js";import{reader as q}from"../core/accessorSupport/decorators/reader.js";let F=class extends(I(j(b(Q(L(d(w(_(i(S)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();const e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,null!=e&&e.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([u(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},c),h(()=>this.modifications,()=>this._modificationsGeneration++,c),h(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),c)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:N(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new H((e,t)=>V.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(o,i,s){const p={stack:[],error:void 0,hasError:!1};try{const t=s?.noDataValue??Number.MAX_VALUE,d=this._elevationQueryWorker,m=new AbortController;o.addHandles(n(m),m);e(p,a(l(()=>o.removeHandles(m))),!1);const u=AbortSignal.any([s?.signal,this._elevationQueryAbortController.signal,m.signal].filter(r));await this.load({signal:u}),y(u);const c=A.fromGeometry(i),h={signal:u,elevationOffset:this.elevationInfo?.offset??0,scheduler:o.resourceController.scheduler};if(null==this._elevationQueryWorkerSetup){const e=this.store?.defaultGeometrySchema;null!=e&&(this._elevationQueryWorkerSetup=d.setLegacySchema(this._elevationQueryWorkerContext,e))}const f=await k(this,c,h);y(u);const v=f.coordinates[0].z===D;v&&(f.coordinates[0].z=t);const g=await f.project(i.spatialReference,u);y(u);const S=g??c.clone(),_={geometry:S.export(),noDataValue:t};return s?.returnSampleInfo&&(_.sampleInfo=S.coordinates.map(()=>({demResolution:v?-1:1}))),_}catch(d){p.error=d,p.hasError=!0}finally{t(p)}}_abortElevationQueriesAfterDependencyChange(){const e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){return await this._elevationQueryWorkerSetup,y(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){m(o)}if(y(t),await this._fetchService(t),y(t),null!=this._modificationsSource){const o=await E.fromUrl(this._modificationsSource.url,this.spatialReference,e);y(t),this.setAtOrigin("modifications",o,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),y(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}get isUsedAsGroundLayer(){return!has("enable-feature:im-as-ground")||(R(this.parent)||P(this.parent))}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new s("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}get elevationQueryDataRequester(){return new z(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new K(this,this.elevationQueryDataRequester,p.getLogger("esri.layers.IntegratedMeshLayer"),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){const t="Integrated mesh layers";U(p.getLogger(this),G(t,"absolute-height",e)),U(p.getLogger(this),O(t,e))}};o([f({type:String,readOnly:!0})],F.prototype,"geometryType",void 0),o([f({type:["show","hide"]})],F.prototype,"listMode",void 0),o([f({type:["IntegratedMeshLayer"]})],F.prototype,"operationalLayerType",void 0),o([f({json:{read:!1},readOnly:!0})],F.prototype,"type",void 0),o([f({type:T,readOnly:!0,clonable:!1})],F.prototype,"nodePages",void 0),o([f({type:[C],readOnly:!0,clonable:!1})],F.prototype,"materialDefinitions",void 0),o([f({type:[M],readOnly:!0,clonable:!1})],F.prototype,"textureSetDefinitions",void 0),o([f({type:[W],readOnly:!0,clonable:!1})],F.prototype,"geometryDefinitions",void 0),o([f({readOnly:!0})],F.prototype,"serviceUpdateTimeStamp",void 0),o([f({type:E,clonable:e=>e?.clone()??e}),g({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],F.prototype,"modifications",void 0),o([f({clonable:e=>e?{...e}:null})],F.prototype,"_modificationsSource",void 0),o([q(["web-scene","portal-item"],"modifications")],F.prototype,"readModifications",null),o([f(x)],F.prototype,"elevationInfo",null),o([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],F.prototype,"path",void 0),o([f({clonable:!1})],F.prototype,"_elevationQueryWorker",null),o([f()],F.prototype,"_modificationsGeneration",void 0),o([f()],F.prototype,"memoizedElevationQueryDependencies",null),o([f()],F.prototype,"isUsedAsGroundLayer",null),o([f({clonable:!1})],F.prototype,"elevationQueryDataRequester",null),o([f({clonable:!1})],F.prototype,"elevationQueryNodeLoader",null),F=o([v("esri.layers.IntegratedMeshLayer")],F);const B=F;export{B as default};
@@ -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"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as u,isAbortError as y,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as f}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as w}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SceneService as A}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as C,legendEnabled as Q,popupEnabled as N,attributeTableTemplate as G,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{getFieldDomain as M,computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as K}from"./support/featureLayerUtils.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as $}from"./support/fieldProperties.js";import H from"./support/FieldsIndex.js";import{fixRendererFields as W,fixTimeInfoFields as B,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layersLoaderMap as ae}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as ye}from"./support/SceneServiceTimeInfo.js";import ce from"./support/TimeInfo.js";import{loadStyleRenderer as me}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ge,elevationModeUnsupportedMessage as ve,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import Le from"../time/TimeExtent.js";import je from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Fe}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Se,getFetchPopupTemplate as Te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";import{reader as _e}from"../core/accessorSupport/decorators/reader.js";const xe=new Set(["3DObject","Point"]),Pe=$();let Ae=class extends(O(A(S(_(x(P(p(T(F(i(I))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?M(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new H(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Ue[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:y,supportsAdd:c,supportsUpdate:m,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v},attachment:w}=e,b=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&a,supportsUploadWithItemId:o},data:{supportsAttachment:u,supportsZ:l,supportsM:p,isVersioned:d,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:y&&b,supportsAdd:I&&c&&b,supportsDelete:I&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:w}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ee[r]?Ee[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await me(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){const[r,{queryModels:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryModel(e,t){const[r,{queryModel:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Z(this.fieldsIndex,await Se(this,Te(this)));return Fe(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await(import("./graphics/editingSupport.js"));let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await K(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await w(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{createWithExternalSource:y}=await(import("../geometry/support/meshUtils.js"));u(t);const c=y(p,{type:"client",files:i},{vertexSpace:d,transform:ne(a),unitConversionDisabled:!0}),[m]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return m}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!xe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!de(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await m(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ge(n.getLogger(this),ve("Mesh scene layers","relative-to-scene",e)),ge(n.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(de({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:o,maxTimeStr:a,max:n}=i,l=t===r?s??o:a??n;return null!=l?new Date(l):null},[o,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==o||null!=i&&null==a)return;const n=new Le({start:o,end:a});this.setAtOrigin("timeInfo",new ce({endField:i,startField:r,fullTimeExtent:n}),"service")}};e([h({types:{key:"type",base:null,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Ae.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Ae.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Ae.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Ae.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Ae.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Ae.prototype,"type",void 0),e([h({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"fields",void 0),e([h()],Ae.prototype,"types",null),e([h()],Ae.prototype,"typeIdField",null),e([h()],Ae.prototype,"templates",null),e([h()],Ae.prototype,"formTemplate",null),e([h({readOnly:!0})],Ae.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Ae.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ae.prototype,"floorInfo",void 0),e([h(Pe.outFields)],Ae.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Ae.prototype,"nodePages",void 0),e([_e("service","nodePages",["nodePages","pointNodePages"])],Ae.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Ae.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Ae.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Ae.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Ae.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Ae.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Ae.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ae.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ae.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ae.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ae.prototype,"path",void 0),e([h(R)],Ae.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Ae.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Ae.prototype,"geometryType",null),e([h(C)],Ae.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Ae.prototype,"labelingInfo",void 0),e([h(Q)],Ae.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ae.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ae.prototype,"renderer",null),e([h({json:{read:!1}})],Ae.prototype,"cachedDrawingInfo",void 0),e([_e("service","cachedDrawingInfo")],Ae.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Ae.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"relationships",null),e([h(N)],Ae.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Ae.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"defaultPopupTemplate",null),e([h(G)],Ae.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Ae.prototype,"objectIdField",void 0),e([_e("service","objectIdField",["objectIdField","fields"])],Ae.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"globalIdField",void 0),e([_e("service","globalIdField",["globalIdField","fields"])],Ae.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Ae.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"profile",void 0),e([_e("service","profile",["store.profile"])],Ae.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ae.prototype,"normalReferenceFrame",void 0),e([h(k)],Ae.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"serviceItemId",void 0),e([h(E)],Ae.prototype,"useViewTime",null),e([h({type:ce,json:{read:!1,write:!1}})],Ae.prototype,"timeInfo",null),e([h({type:Le,json:{read:!1,write:!1}})],Ae.prototype,"timeExtent",null),e([h({type:je,json:{read:!1,write:!1}})],Ae.prototype,"timeOffset",null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Ae.prototype,"datesInUnknownTimezone",null),e([h({type:ye,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Ae.prototype,"serviceTimeInfo",void 0),Ae=e([f("esri.layers.SceneLayer")],Ae);const Ee={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ue={"mesh-pyramids":"mesh",points:"point"},De=Ae;export{De as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as u,isAbortError as y,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as f}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as w}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as A}from"./mixins/ScaleRangeLayer.js";import{SceneService as P}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as C,legendEnabled as Q,popupEnabled as G,attributeTableTemplate as N,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{getFieldDomain as M,computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as K}from"./support/featureLayerUtils.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as $}from"./support/fieldProperties.js";import H from"./support/FieldsIndex.js";import{fixRendererFields as W,fixTimeInfoFields as B,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layersLoaderMap as ae}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as ye}from"./support/SceneServiceTimeInfo.js";import ce from"./support/TimeInfo.js";import{loadStyleRenderer as me}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ge,elevationModeUnsupportedMessage as ve,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import Le from"../time/TimeExtent.js";import je from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Fe}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Se,getFetchPopupTemplate as Te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";import{reader as _e}from"../core/accessorSupport/decorators/reader.js";const xe=new Set(["3DObject","Point"]),Ae=$();let Pe=class extends(O(P(S(_(x(A(p(T(F(i(I))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?M(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new H(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Ue[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:y,supportsAdd:c,supportsUpdate:m,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v},attachment:w}=e,b=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&a,supportsUploadWithItemId:o},data:{supportsAttachment:u,supportsZ:l,supportsM:p,isVersioned:d,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:y&&b,supportsAdd:I&&c&&b,supportsDelete:I&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:w}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ee[r]?Ee[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await me(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){const[r,{queryModels:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryModel(e,t){const[r,{queryModel:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Z(this.fieldsIndex,await Se(this,Te(this)));return Fe(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await(import("./graphics/editingSupport.js"));let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await K(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await w(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{createWithExternalSource:y}=await(import("../geometry/support/meshUtils.js"));u(t);const c=y(p,{type:"client",files:i},{vertexSpace:d,transform:ne(a),unitConversionDisabled:!0}),[m]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return m}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!xe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!de(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await m(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ge(n.getLogger(this),ve("Mesh scene layers","relative-to-scene",e)),ge(n.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(de({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:o,maxTimeStr:a,max:n}=i,l=t===r?s??o:a??n;return null!=l?new Date(l):null},[o,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==o||null!=i&&null==a)return;const n=new Le({start:o,end:a});this.setAtOrigin("timeInfo",new ce({endField:i,startField:r,fullTimeExtent:n}),"service")}};e([h({types:{key:"type",base:null,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Pe.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Pe.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Pe.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Pe.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Pe.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Pe.prototype,"type",void 0),e([h({...Ae.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"fields",void 0),e([h()],Pe.prototype,"types",null),e([h()],Pe.prototype,"typeIdField",null),e([h()],Pe.prototype,"templates",null),e([h()],Pe.prototype,"formTemplate",null),e([h({readOnly:!0})],Pe.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Pe.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Pe.prototype,"floorInfo",void 0),e([h(Ae.outFields)],Pe.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Pe.prototype,"nodePages",void 0),e([_e("service","nodePages",["nodePages","pointNodePages"])],Pe.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Pe.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Pe.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Pe.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Pe.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Pe.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Pe.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Pe.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Pe.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Pe.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Pe.prototype,"path",void 0),e([h(R)],Pe.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Pe.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Pe.prototype,"geometryType",null),e([h(C)],Pe.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Pe.prototype,"labelingInfo",void 0),e([h(Q)],Pe.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Pe.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Pe.prototype,"renderer",null),e([h({json:{read:!1}})],Pe.prototype,"cachedDrawingInfo",void 0),e([_e("service","cachedDrawingInfo")],Pe.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Pe.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"relationships",null),e([h(G)],Pe.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Pe.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"defaultPopupTemplate",null),e([h(N)],Pe.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Pe.prototype,"objectIdField",void 0),e([_e("service","objectIdField",["objectIdField","fields"])],Pe.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Pe.prototype,"globalIdField",void 0),e([_e("service","globalIdField",["globalIdField","fields"])],Pe.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Pe.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Pe.prototype,"profile",void 0),e([_e("service","profile",["store.profile"])],Pe.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Pe.prototype,"normalReferenceFrame",void 0),e([h(k)],Pe.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"serviceItemId",void 0),e([h(E)],Pe.prototype,"useViewTime",null),e([h({type:ce,json:{read:!1,write:!1}})],Pe.prototype,"timeInfo",null),e([h({type:Le,json:{read:!1,write:!1}})],Pe.prototype,"timeExtent",null),e([h({type:je,json:{read:!1,write:!1}})],Pe.prototype,"timeOffset",null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Pe.prototype,"datesInUnknownTimezone",null),e([h({type:ye,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Pe.prototype,"serviceTimeInfo",void 0),e([h()],Pe.prototype,"isUsedAsGroundLayer",null),Pe=e([f("esri.layers.SceneLayer")],Pe);const Ee={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ue={"mesh-pyramids":"mesh",points:"point"},De=Pe;export{De as default};
@@ -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"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import i from"../../core/Error.js";import{JSONMap as s}from"../../core/jsonMap.js";import{LoadableMixin as a}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{EsriPromiseMixin as p}from"../../core/Promise.js";import{property as l,subclass as y}from"../../core/accessorSupport/decorators.js";import u from"../../geometry/Extent.js";import d from"../../geometry/SpatialReference.js";import c from"../../graphic/BuildingGraphicOrigin.js";import h from"../FeatureLayer.js";import m from"./BuildingSublayer.js";import{zeroCapabilities as f}from"../support/capabilities.js";import{popupEnabled as g}from"../support/commonProperties.js";import{getFieldDomain as j}from"../support/featureLayerUtils.js";import{defineFieldProperties as v}from"../support/fieldProperties.js";import b from"../support/FieldsIndex.js";import{unpackFieldNames as L}from"../support/fieldUtils.js";import{fetchIndexInfo as I}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as S,I3SMaterialDefinition as F,I3STextureSetDefinition as O,I3SGeometryDefinition as w}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as x}from"../../renderers/support/typeUtils.js";import P from"../../rest/support/Query.js";import{isNumber as q}from"../../support/guards.js";import{createPopupTemplate as T}from"../../support/popupUtils.js";import Q from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as U}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as E,getFetchPopupTemplate as D}from"../../views/layers/support/popupUtils.js";import{reader as R}from"../../core/accessorSupport/decorators/reader.js";import{enumeration as A}from"../../core/accessorSupport/decorators/enumeration.js";const _=v();let N=class extends(a(p(m))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}initialize(){this._set("graphicOrigin",new c(this))}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new b(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new h({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=I(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t),this.indexInfo.catch(()=>{})});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return T(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?j(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:f,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:i,isVersioned:s}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:i,isVersioned:s}}}createQuery(){const e=new P;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(q)}async queryCachedAttributes(e,t){const r=L(this.fieldsIndex,await E(this,D(this)));return U(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new i("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],N.prototype,"parsedUrl",null),e([l({type:S,readOnly:!0})],N.prototype,"nodePages",void 0),e([l({type:[F],readOnly:!0})],N.prototype,"materialDefinitions",void 0),e([l({type:[O],readOnly:!0})],N.prototype,"textureSetDefinitions",void 0),e([l({type:[w],readOnly:!0})],N.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],N.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],N.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],N.prototype,"rootNode",void 0),e([l({readOnly:!0})],N.prototype,"attributeStorageInfo",void 0),e([l(_.fields)],N.prototype,"fields",void 0),e([l({readOnly:!0})],N.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:h})],N.prototype,"associatedLayer",void 0),e([R("service","associatedLayer",["associatedLayerID"])],N.prototype,"readAssociatedLayer",null),e([l(_.outFields)],N.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],N.prototype,"objectIdField",null),e([l({type:String,readOnly:!0})],N.prototype,"globalIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],N.prototype,"displayField",null),e([l({readOnly:!0,type:String})],N.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],N.prototype,"customParameters",null),e([l({readOnly:!0,type:u})],N.prototype,"fullExtent",null),e([l({readOnly:!0,type:d})],N.prototype,"spatialReference",null),e([l({readOnly:!0})],N.prototype,"version",null),e([l({readOnly:!0,type:Q})],N.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],N.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],N.prototype,"listMode",void 0),e([l({types:x,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],N.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],N.prototype,"definitionExpression",void 0),e([l(g)],N.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],N.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],N.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"defaultPopupTemplate",null),e([l({readOnly:!0})],N.prototype,"graphicOrigin",void 0),e([l()],N.prototype,"types",null),e([l()],N.prototype,"typeIdField",null),e([l({json:{write:!1}}),A(new s({"3DObject":"3d-object",Point:"point"}))],N.prototype,"layerType",void 0),e([l()],N.prototype,"geometryType",null),e([l()],N.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"capabilities",null),e([l({readOnly:!0})],N.prototype,"statisticsInfo",void 0),N=e([y("esri.layers.buildingSublayers.BuildingComponentSublayer")],N);export{N as default};
2
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import s from"../../core/Error.js";import{JSONMap as i}from"../../core/jsonMap.js";import{LoadableMixin as a}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{EsriPromiseMixin as p}from"../../core/Promise.js";import{property as l,subclass as y}from"../../core/accessorSupport/decorators.js";import u from"../../geometry/Extent.js";import d from"../../geometry/SpatialReference.js";import c from"../../graphic/BuildingGraphicOrigin.js";import h from"../FeatureLayer.js";import m from"./BuildingSublayer.js";import{zeroCapabilities as f}from"../support/capabilities.js";import{popupEnabled as g}from"../support/commonProperties.js";import{getFieldDomain as j}from"../support/featureLayerUtils.js";import{defineFieldProperties as v}from"../support/fieldProperties.js";import L from"../support/FieldsIndex.js";import{unpackFieldNames as b}from"../support/fieldUtils.js";import{fetchIndexInfo as I}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as S,I3SMaterialDefinition as F,I3STextureSetDefinition as O,I3SGeometryDefinition as w}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as x}from"../../renderers/support/typeUtils.js";import P from"../../rest/support/Query.js";import{isNumber as q}from"../../support/guards.js";import{createPopupTemplate as T}from"../../support/popupUtils.js";import U from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as Q}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as E,getFetchPopupTemplate as A}from"../../views/layers/support/popupUtils.js";import{reader as D}from"../../core/accessorSupport/decorators/reader.js";import{enumeration as R}from"../../core/accessorSupport/decorators/enumeration.js";const _=v();let N=class extends(a(p(m))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}initialize(){this._set("graphicOrigin",new c(this))}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new L(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new h({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=I(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t),this.indexInfo.catch(()=>{})});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return T(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?j(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:f,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}}createQuery(){const e=new P;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(q)}async queryCachedAttributes(e,t){const r=b(this.fieldsIndex,await E(this,A(this)));return Q(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new s("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}get isUsedAsGroundLayer(){return!1}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],N.prototype,"parsedUrl",null),e([l({type:S,readOnly:!0})],N.prototype,"nodePages",void 0),e([l({type:[F],readOnly:!0})],N.prototype,"materialDefinitions",void 0),e([l({type:[O],readOnly:!0})],N.prototype,"textureSetDefinitions",void 0),e([l({type:[w],readOnly:!0})],N.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],N.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],N.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],N.prototype,"rootNode",void 0),e([l({readOnly:!0})],N.prototype,"attributeStorageInfo",void 0),e([l(_.fields)],N.prototype,"fields",void 0),e([l({readOnly:!0})],N.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:h})],N.prototype,"associatedLayer",void 0),e([D("service","associatedLayer",["associatedLayerID"])],N.prototype,"readAssociatedLayer",null),e([l(_.outFields)],N.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],N.prototype,"objectIdField",null),e([l({type:String,readOnly:!0})],N.prototype,"globalIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],N.prototype,"displayField",null),e([l({readOnly:!0,type:String})],N.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],N.prototype,"customParameters",null),e([l({readOnly:!0,type:u})],N.prototype,"fullExtent",null),e([l({readOnly:!0,type:d})],N.prototype,"spatialReference",null),e([l({readOnly:!0})],N.prototype,"version",null),e([l({readOnly:!0,type:U})],N.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],N.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],N.prototype,"listMode",void 0),e([l({types:x,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],N.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],N.prototype,"definitionExpression",void 0),e([l(g)],N.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],N.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],N.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"defaultPopupTemplate",null),e([l({readOnly:!0})],N.prototype,"graphicOrigin",void 0),e([l()],N.prototype,"types",null),e([l()],N.prototype,"typeIdField",null),e([l({json:{write:!1}}),R(new i({"3DObject":"3d-object",Point:"point"}))],N.prototype,"layerType",void 0),e([l()],N.prototype,"geometryType",null),e([l()],N.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"capabilities",null),e([l({readOnly:!0})],N.prototype,"statisticsInfo",void 0),e([l()],N.prototype,"isUsedAsGroundLayer",null),N=e([y("esri.layers.buildingSublayers.BuildingComponentSublayer")],N);export{N as default};
@@ -5,28 +5,39 @@ import type { LayerItemCollectionEvents } from "./LayerItemCollection.js";
5
5
  import type { Action, ItemModifier, State } from "./types.js";
6
6
  import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
7
7
 
8
+ /** @internal */
8
9
  export interface BasemapItemCollectionProperties extends Partial<Pick<BasemapItemCollection, "baseItemCreatedFunction" | "basemapTitle" | "checkPublishStatusEnabled" | "listModeDisabled" | "referenceItemCreatedFunction" | "view">> {}
9
10
 
11
+ /** @internal */
10
12
  export interface BasemapItemCollectionEvents extends LayerItemCollectionEvents {}
11
13
 
12
14
  /**
13
15
  * Provides list orchestration logic for basemap base and reference layers.
14
16
  *
15
- * @since 5.2
17
+ * @internal
16
18
  */
17
19
  export default class BasemapItemCollection extends EventedAccessor {
18
- /**
19
- * @deprecated
20
- * Do not directly reference this property.
21
- * Use EventNames and EventTypes helpers from \@arcgis/core/Evented
22
- */
20
+ /** @internal */
23
21
  "@eventTypes": BasemapItemCollectionEvents;
22
+ /** @internal */
24
23
  constructor(properties?: BasemapItemCollectionProperties);
25
- /** Specifies a function that accesses each base-layer [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/). */
24
+ /**
25
+ * Specifies a function that accesses each base-layer [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/).
26
+ *
27
+ * @internal
28
+ */
26
29
  accessor baseItemCreatedFunction: ItemModifier | null | undefined;
27
- /** A collection of [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/)s representing basemap base layers. */
30
+ /**
31
+ * A collection of [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/)s representing basemap base layers.
32
+ *
33
+ * @internal
34
+ */
28
35
  get baseItems(): Collection<Item>;
29
- /** The current basemap title. */
36
+ /**
37
+ * The current basemap title.
38
+ *
39
+ * @internal
40
+ */
30
41
  accessor basemapTitle: string | null | undefined;
31
42
  /**
32
43
  * Whether to provide an indication if a layer is being published.
@@ -34,33 +45,47 @@ export default class BasemapItemCollection extends EventedAccessor {
34
45
  * is `false` if `checkPublishStatusEnabled` is `false`.
35
46
  *
36
47
  * @default false
37
- * @since 5.2
48
+ * @internal
38
49
  */
39
50
  accessor checkPublishStatusEnabled: boolean;
40
51
  /**
41
52
  * Specifies whether to ignore the [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) property of layers.
42
53
  *
43
54
  * @default false
44
- * @since 5.2
55
+ * @internal
45
56
  * @see [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
46
57
  */
47
58
  accessor listModeDisabled: boolean;
48
- /** Specifies a function that accesses each reference-layer [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/). */
59
+ /**
60
+ * Specifies a function that accesses each reference-layer [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/).
61
+ *
62
+ * @internal
63
+ */
49
64
  accessor referenceItemCreatedFunction: ItemModifier | null | undefined;
50
- /** A collection of [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/)s representing basemap reference layers. */
65
+ /**
66
+ * A collection of [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/)s representing basemap reference layers.
67
+ *
68
+ * @internal
69
+ */
51
70
  get referenceItems(): Collection<Item>;
52
71
  /**
53
72
  * The view model's state.
54
73
  *
55
74
  * @default "disabled"
75
+ * @internal
56
76
  */
57
77
  get state(): State;
58
- /** The view context for this view model. */
78
+ /**
79
+ * The view context for this view model.
80
+ *
81
+ * @internal
82
+ */
59
83
  accessor view: MapViewOrSceneView | null | undefined;
60
84
  /**
61
85
  * Moves a list item between base and reference collections.
62
86
  *
63
87
  * @param options - Move options describing source, target, and destination index.
88
+ * @internal
64
89
  */
65
90
  moveItem(options: {
66
91
  targetItem: Item | null | undefined;
@@ -76,6 +101,7 @@ export default class BasemapItemCollection extends EventedAccessor {
76
101
  *
77
102
  * @param action - The action to execute.
78
103
  * @param item - An item associated with the action.
104
+ * @internal
79
105
  */
80
106
  triggerAction(action: Action, item: Item): void;
81
107
  }
@@ -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"../../core/Collection.js";import{EventedAccessor as s}from"../../core/Evented.js";import{watch as i,initial as a}from"../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../core/accessorSupport/decorators.js";import n from"./Item.js";import{getItemLayers as o,findLayerListMode as m}from"./support/layerListUtils.js";const c={view:"view",basemap:"basemap",baseLayers:"base-layers",referenceLayers:"reference-layers",baseLayersListMode:"reference-layers-list-mode",referenceLayersListMode:"base-layers-list-mode",baseLayerViews:"base-layer-views",referenceLayerViews:"reference-layer-views",children:"children"},h="hide",d=t.ofType(n);let y=class extends s{constructor(e){super(e),this.baseItems=new d,this.baseItemCreatedFunction=null,this.checkPublishStatusEnabled=!1,this.listModeDisabled=!1,this.referenceItemCreatedFunction=null,this.referenceItems=new d,this.view=null,this._compileBaseList=this._compileBaseList.bind(this),this._compileReferenceList=this._compileReferenceList.bind(this)}initialize(){this.addHandles([i(()=>[this.view?.map?.basemap,!0===this.view?.ready,this.view?.basemapView],()=>this._watchBasemapLayers(),a),i(()=>[this.baseItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._baseItemCreatedFunctionChanged()),i(()=>[this.referenceItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._referenceItemCreatedFunctionChanged())],c.view)}destroy(){this.view=null,this._removeAllBaseItems(),this._removeAllReferenceItems()}get basemapTitle(){return this.view?.map?.basemap?.title??null}set basemapTitle(e){this._override("basemapTitle",e)}get state(){return this.view?.ready?"ready":this.view?"loading":"disabled"}get totalBaseItems(){return this.baseItems.flatten(e=>e.children).length}get totalReferenceItems(){return this.referenceItems.flatten(e=>e.children).length}triggerAction(e,t){e&&!e.disabled&&this.emit("trigger-action",{action:e,item:t})}moveItem({targetItem:e,fromParentItem:t,toParentItem:s,from:i,to:a,newIndex:r}){const l=e?.layer;if(!l||"subtype-sublayer"===l.type||"sublayer"===l.type)return;const n=this.view?.map?.basemap,m=n?.baseLayers,c=n?.referenceLayers,h=t?o(t):"base"===i?m:c,d=s?o(s):"base"===a?m:c;if(!h||!d)return;const{baseItems:y,referenceItems:p}=this,b="base"===i?y:p,f="base"===a?y:p,I=t?.children||b,u=s?.children||f,v=d.length-r;e.parent=s||null,I.remove(e),h.remove(l),u.includes(e)||u.add(e,v),d.includes(l)||d.add(l,v),this._compileLists()}_createItemChangeHandles({items:e,key:t,callback:s}){this.removeHandles(t),s(),e&&this.addHandles(e.on("change",()=>s()),t)}_createItem({layer:e,type:t}){const{view:s,baseItemCreatedFunction:i,referenceItemCreatedFunction:a,checkPublishStatusEnabled:r,listModeDisabled:l}=this;return new n({layer:e,checkPublishStatusEnabled:r,listItemCreatedFunction:"base"===t?i:a,listModeDisabled:l,view:s})}_watchLayersListMode({layers:e,key:t,callback:s}){this.removeHandles(t),e&&!this.listModeDisabled&&this.addHandles(i(()=>e.filter(e=>"listMode"in e).map(e=>e.listMode).toArray(),()=>s()),t)}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>m(e)!==h):void 0}_compileItems({layers:e,items:t,key:s,type:i,callback:a}){this._watchLayersListMode({layers:e,key:s,callback:a});const r=this._getViewableLayers(e);r?.length?(this._createNewItems({type:i,items:t,layers:r}),this._removeItems({items:t,layers:r}),this._sortItems(t,r)):"base"===i?this._removeAllBaseItems():this._removeAllReferenceItems()}_compileReferenceList(){const{referenceItems:e}=this,t=this.view?.map?.basemap?.referenceLayers;this._compileItems({type:"reference",layers:t,items:e,key:c.referenceLayersListMode,callback:this._compileReferenceList})}_compileBaseList(){const{baseItems:e}=this,t=this.view?.map?.basemap?.baseLayers;this._compileItems({type:"base",layers:t,items:e,key:c.baseLayersListMode,callback:this._compileBaseList})}_compileLists(){this._compileReferenceList(),this._compileBaseList()}_createNewItems({items:e,layers:t,type:s}){t?.forEach(t=>{e.some(e=>e.layer===t)||e.add(this._createItem({type:s,layer:t}))})}_removeItems({items:e,layers:t}){e&&e.forEach(s=>{if(!s)return;const i=t?.some(e=>s.layer===e);i||(this.removeHandles(`${c.children}-${s.uid}`),e.remove(s),s.destroy())})}_sortItems(e,t){e&&t&&e.sort((e,s)=>{const i=t.indexOf(e.layer),a=t.indexOf(s.layer);return i>a?-1:i<a?1:0})}_removeAllBaseItems(){this.baseItems.drain(e=>{this.removeHandles(`${c.children}-${e.uid}`),e.destroy()})}_removeAllReferenceItems(){this.referenceItems.drain(e=>{this.removeHandles(`${c.children}-${e.uid}`),e.destroy()})}_baseItemCreatedFunctionChanged(){this._removeAllBaseItems(),this._compileLists()}_referenceItemCreatedFunctionChanged(){this._removeAllReferenceItems(),this._compileLists()}_watchBasemapLayers(){const{view:e}=this;if(this.removeHandles([c.baseLayers,c.referenceLayers,c.basemap,c.baseLayerViews,c.referenceLayerViews]),!e?.ready)return this._removeAllBaseItems(),void this._removeAllReferenceItems();this._compileLists(),this.addHandles([i(()=>this.view?.map?.basemap?.baseLayers,e=>this._createItemChangeHandles({items:e,key:c.baseLayers,callback:this._compileBaseList}),a),i(()=>this.view?.map?.basemap?.referenceLayers,e=>this._createItemChangeHandles({items:e,key:c.referenceLayers,callback:this._compileReferenceList}),a),i(()=>this.view?.basemapView?.baseLayerViews,e=>this._createItemChangeHandles({items:e,key:c.baseLayerViews,callback:this._compileBaseList}),a),i(()=>this.view?.basemapView?.referenceLayerViews,e=>this._createItemChangeHandles({items:e,key:c.referenceLayerViews,callback:this._compileReferenceList}),a)],c.basemap)}};e([r({type:d,readOnly:!0})],y.prototype,"baseItems",void 0),e([r()],y.prototype,"basemapTitle",null),e([r()],y.prototype,"baseItemCreatedFunction",void 0),e([r()],y.prototype,"checkPublishStatusEnabled",void 0),e([r({nonNullable:!0})],y.prototype,"listModeDisabled",void 0),e([r()],y.prototype,"referenceItemCreatedFunction",void 0),e([r({type:d,readOnly:!0})],y.prototype,"referenceItems",void 0),e([r({readOnly:!0})],y.prototype,"state",null),e([r()],y.prototype,"totalBaseItems",null),e([r()],y.prototype,"totalReferenceItems",null),e([r()],y.prototype,"view",void 0),y=e([l("esri.layers.list.BasemapItemCollection")],y);const p=y;export{p as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{EventedAccessor as s}from"../../core/Evented.js";import{watch as i,initial as a}from"../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../core/accessorSupport/decorators.js";import n from"./Item.js";import{getItemLayers as o,findLayerListMode as m}from"./support/layerListUtils.js";const c={view:"view",basemap:"basemap",baseLayers:"base-layers",referenceLayers:"reference-layers",baseLayersListMode:"reference-layers-list-mode",referenceLayersListMode:"base-layers-list-mode",baseLayerViews:"base-layer-views",referenceLayerViews:"reference-layer-views",children:"children"},h="hide",d=t.ofType(n);let y=class extends s{constructor(e){super(e),this.baseItemCreatedFunction=null,this.baseItems=new d,this.checkPublishStatusEnabled=!1,this.listModeDisabled=!1,this.referenceItemCreatedFunction=null,this.referenceItems=new d,this.view=null,this._compileBaseList=this._compileBaseList.bind(this),this._compileReferenceList=this._compileReferenceList.bind(this)}initialize(){this.addHandles([i(()=>[this.view?.map?.basemap,!0===this.view?.ready,this.view?.basemapView],()=>this._watchBasemapLayers(),a),i(()=>[this.baseItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._baseItemCreatedFunctionChanged()),i(()=>[this.referenceItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._referenceItemCreatedFunctionChanged())],c.view)}destroy(){this.view=null,this._removeAllBaseItems(),this._removeAllReferenceItems()}get basemapTitle(){return this.view?.map?.basemap?.title??null}set basemapTitle(e){this._override("basemapTitle",e)}get state(){return this.view?.ready?"ready":this.view?"loading":"disabled"}get totalBaseItems(){return this.baseItems.flatten(e=>e.children).length}get totalReferenceItems(){return this.referenceItems.flatten(e=>e.children).length}moveItem({targetItem:e,fromParentItem:t,toParentItem:s,from:i,to:a,newIndex:r}){const l=e?.layer;if(!l||"subtype-sublayer"===l.type||"sublayer"===l.type)return;const n=this.view?.map?.basemap,m=n?.baseLayers,c=n?.referenceLayers,h=t?o(t):"base"===i?m:c,d=s?o(s):"base"===a?m:c;if(!h||!d)return;const{baseItems:y,referenceItems:p}=this,b="base"===i?y:p,f="base"===a?y:p,I=t?.children||b,u=s?.children||f,v=d.length-r;e.parent=s||null,I.remove(e),h.remove(l),u.includes(e)||u.add(e,v),d.includes(l)||d.add(l,v),this._compileLists()}triggerAction(e,t){e&&!e.disabled&&this.emit("trigger-action",{action:e,item:t})}_baseItemCreatedFunctionChanged(){this._removeAllBaseItems(),this._compileLists()}_compileBaseList(){const{baseItems:e}=this,t=this.view?.map?.basemap?.baseLayers;this._compileItems({type:"base",layers:t,items:e,key:c.baseLayersListMode,callback:this._compileBaseList})}_compileItems({layers:e,items:t,key:s,type:i,callback:a}){this._watchLayersListMode({layers:e,key:s,callback:a});const r=this._getViewableLayers(e);r?.length?(this._createNewItems({type:i,items:t,layers:r}),this._removeItems({items:t,layers:r}),this._sortItems(t,r)):"base"===i?this._removeAllBaseItems():this._removeAllReferenceItems()}_compileLists(){this._compileReferenceList(),this._compileBaseList()}_compileReferenceList(){const{referenceItems:e}=this,t=this.view?.map?.basemap?.referenceLayers;this._compileItems({type:"reference",layers:t,items:e,key:c.referenceLayersListMode,callback:this._compileReferenceList})}_createItem({layer:e,type:t}){const{view:s,baseItemCreatedFunction:i,referenceItemCreatedFunction:a,checkPublishStatusEnabled:r,listModeDisabled:l}=this;return new n({checkPublishStatusEnabled:r,layer:e,listItemCreatedFunction:"base"===t?i:a,listModeDisabled:l,view:s})}_createItemChangeHandles({items:e,key:t,callback:s}){this.removeHandles(t),s(),e&&this.addHandles(e.on("change",()=>s()),t)}_createNewItems({items:e,layers:t,type:s}){t?.forEach(t=>{e.some(e=>e.layer===t)||e.add(this._createItem({type:s,layer:t}))})}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>m(e)!==h):void 0}_referenceItemCreatedFunctionChanged(){this._removeAllReferenceItems(),this._compileLists()}_removeAllBaseItems(){this.baseItems.drain(e=>{this.removeHandles(`${c.children}-${e.uid}`),e.destroy()})}_removeAllReferenceItems(){this.referenceItems.drain(e=>{this.removeHandles(`${c.children}-${e.uid}`),e.destroy()})}_removeItems({items:e,layers:t}){e&&e.forEach(s=>{if(!s)return;const i=t?.some(e=>s.layer===e);i||(this.removeHandles(`${c.children}-${s.uid}`),e.remove(s),s.destroy())})}_sortItems(e,t){e&&t&&e.sort((e,s)=>{const i=t.indexOf(e.layer),a=t.indexOf(s.layer);return i>a?-1:i<a?1:0})}_watchBasemapLayers(){const{view:e}=this;if(this.removeHandles([c.baseLayers,c.referenceLayers,c.basemap,c.baseLayerViews,c.referenceLayerViews]),!e?.ready)return this._removeAllBaseItems(),void this._removeAllReferenceItems();this._compileLists(),this.addHandles([i(()=>this.view?.map?.basemap?.baseLayers,e=>this._createItemChangeHandles({items:e,key:c.baseLayers,callback:this._compileBaseList}),a),i(()=>this.view?.map?.basemap?.referenceLayers,e=>this._createItemChangeHandles({items:e,key:c.referenceLayers,callback:this._compileReferenceList}),a),i(()=>this.view?.basemapView?.baseLayerViews,e=>this._createItemChangeHandles({items:e,key:c.baseLayerViews,callback:this._compileBaseList}),a),i(()=>this.view?.basemapView?.referenceLayerViews,e=>this._createItemChangeHandles({items:e,key:c.referenceLayerViews,callback:this._compileReferenceList}),a)],c.basemap)}_watchLayersListMode({layers:e,key:t,callback:s}){this.removeHandles(t),e&&!this.listModeDisabled&&this.addHandles(i(()=>e.filter(e=>"listMode"in e).map(e=>e.listMode).toArray(),()=>s()),t)}};e([r()],y.prototype,"baseItemCreatedFunction",void 0),e([r({type:d,readOnly:!0})],y.prototype,"baseItems",void 0),e([r()],y.prototype,"basemapTitle",null),e([r()],y.prototype,"checkPublishStatusEnabled",void 0),e([r({nonNullable:!0})],y.prototype,"listModeDisabled",void 0),e([r()],y.prototype,"referenceItemCreatedFunction",void 0),e([r({type:d,readOnly:!0})],y.prototype,"referenceItems",void 0),e([r({readOnly:!0})],y.prototype,"state",null),e([r()],y.prototype,"totalBaseItems",null),e([r()],y.prototype,"totalReferenceItems",null),e([r()],y.prototype,"view",void 0),y=e([l("esri.layers.list.BasemapItemCollection")],y);const p=y;export{p as default};