@arcgis/core 4.34.0-next.87 → 4.34.0-next.89

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 (504) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/arcade/Dictionary.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/Pixel.js +1 -1
  5. package/arcade/Voxel.js +1 -1
  6. package/arcade/containerUtils.js +1 -1
  7. package/arcade/featureSetUtils.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/actions/OrderBy.js +1 -1
  10. package/arcade/featureset/support/FeatureSet.js +1 -1
  11. package/arcade/functions/date.js +1 -1
  12. package/arcade/functions/feature.js +1 -1
  13. package/arcade/functions/featuresetbase.js +1 -1
  14. package/arcade/functions/featuresetstats.js +1 -1
  15. package/arcade/functions/featuresetstring.js +1 -1
  16. package/arcade/functions/fieldStats.js +1 -1
  17. package/arcade/functions/geometry.js +1 -1
  18. package/arcade/functions/maths.js +1 -1
  19. package/arcade/functions/string.js +1 -1
  20. package/arcade/languageUtils.js +1 -1
  21. package/assets/components/assets/accordion-item/t9n/messages.ar.json +1 -1
  22. package/assets/components/assets/accordion-item/t9n/messages.bg.json +1 -1
  23. package/assets/components/assets/accordion-item/t9n/messages.bs.json +1 -1
  24. package/assets/components/assets/accordion-item/t9n/messages.ca.json +1 -1
  25. package/assets/components/assets/accordion-item/t9n/messages.cs.json +1 -1
  26. package/assets/components/assets/accordion-item/t9n/messages.da.json +1 -1
  27. package/assets/components/assets/accordion-item/t9n/messages.de.json +1 -1
  28. package/assets/components/assets/accordion-item/t9n/messages.el.json +1 -1
  29. package/assets/components/assets/accordion-item/t9n/messages.es.json +1 -1
  30. package/assets/components/assets/accordion-item/t9n/messages.et.json +1 -1
  31. package/assets/components/assets/accordion-item/t9n/messages.fi.json +1 -1
  32. package/assets/components/assets/accordion-item/t9n/messages.fr.json +1 -1
  33. package/assets/components/assets/accordion-item/t9n/messages.he.json +1 -1
  34. package/assets/components/assets/accordion-item/t9n/messages.hr.json +1 -1
  35. package/assets/components/assets/accordion-item/t9n/messages.hu.json +1 -1
  36. package/assets/components/assets/accordion-item/t9n/messages.id.json +1 -1
  37. package/assets/components/assets/accordion-item/t9n/messages.it.json +1 -1
  38. package/assets/components/assets/accordion-item/t9n/messages.ja.json +1 -1
  39. package/assets/components/assets/accordion-item/t9n/messages.ko.json +1 -1
  40. package/assets/components/assets/accordion-item/t9n/messages.lt.json +1 -1
  41. package/assets/components/assets/accordion-item/t9n/messages.lv.json +1 -1
  42. package/assets/components/assets/accordion-item/t9n/messages.nl.json +1 -1
  43. package/assets/components/assets/accordion-item/t9n/messages.no.json +1 -1
  44. package/assets/components/assets/accordion-item/t9n/messages.pl.json +1 -1
  45. package/assets/components/assets/accordion-item/t9n/messages.pt-BR.json +1 -1
  46. package/assets/components/assets/accordion-item/t9n/messages.pt-PT.json +1 -1
  47. package/assets/components/assets/accordion-item/t9n/messages.ro.json +1 -1
  48. package/assets/components/assets/accordion-item/t9n/messages.ru.json +1 -1
  49. package/assets/components/assets/accordion-item/t9n/messages.sk.json +1 -1
  50. package/assets/components/assets/accordion-item/t9n/messages.sl.json +1 -1
  51. package/assets/components/assets/accordion-item/t9n/messages.sr.json +1 -1
  52. package/assets/components/assets/accordion-item/t9n/messages.sv.json +1 -1
  53. package/assets/components/assets/accordion-item/t9n/messages.th.json +1 -1
  54. package/assets/components/assets/accordion-item/t9n/messages.tr.json +1 -1
  55. package/assets/components/assets/accordion-item/t9n/messages.uk.json +1 -1
  56. package/assets/components/assets/accordion-item/t9n/messages.vi.json +1 -1
  57. package/assets/components/assets/accordion-item/t9n/messages.zh-CN.json +1 -1
  58. package/assets/components/assets/accordion-item/t9n/messages.zh-HK.json +1 -1
  59. package/assets/components/assets/accordion-item/t9n/messages.zh-TW.json +1 -1
  60. package/assets/components/assets/action-bar/t9n/messages.ar.json +1 -1
  61. package/assets/components/assets/action-bar/t9n/messages.bg.json +1 -1
  62. package/assets/components/assets/action-bar/t9n/messages.bs.json +1 -1
  63. package/assets/components/assets/action-bar/t9n/messages.ca.json +1 -1
  64. package/assets/components/assets/action-bar/t9n/messages.cs.json +1 -1
  65. package/assets/components/assets/action-bar/t9n/messages.da.json +1 -1
  66. package/assets/components/assets/action-bar/t9n/messages.de.json +1 -1
  67. package/assets/components/assets/action-bar/t9n/messages.el.json +1 -1
  68. package/assets/components/assets/action-bar/t9n/messages.es.json +1 -1
  69. package/assets/components/assets/action-bar/t9n/messages.et.json +1 -1
  70. package/assets/components/assets/action-bar/t9n/messages.fi.json +1 -1
  71. package/assets/components/assets/action-bar/t9n/messages.fr.json +1 -1
  72. package/assets/components/assets/action-bar/t9n/messages.he.json +1 -1
  73. package/assets/components/assets/action-bar/t9n/messages.hr.json +1 -1
  74. package/assets/components/assets/action-bar/t9n/messages.hu.json +1 -1
  75. package/assets/components/assets/action-bar/t9n/messages.id.json +1 -1
  76. package/assets/components/assets/action-bar/t9n/messages.it.json +1 -1
  77. package/assets/components/assets/action-bar/t9n/messages.ja.json +1 -1
  78. package/assets/components/assets/action-bar/t9n/messages.ko.json +1 -1
  79. package/assets/components/assets/action-bar/t9n/messages.lt.json +1 -1
  80. package/assets/components/assets/action-bar/t9n/messages.lv.json +1 -1
  81. package/assets/components/assets/action-bar/t9n/messages.nl.json +1 -1
  82. package/assets/components/assets/action-bar/t9n/messages.no.json +1 -1
  83. package/assets/components/assets/action-bar/t9n/messages.pl.json +1 -1
  84. package/assets/components/assets/action-bar/t9n/messages.pt-BR.json +1 -1
  85. package/assets/components/assets/action-bar/t9n/messages.pt-PT.json +1 -1
  86. package/assets/components/assets/action-bar/t9n/messages.ro.json +1 -1
  87. package/assets/components/assets/action-bar/t9n/messages.ru.json +1 -1
  88. package/assets/components/assets/action-bar/t9n/messages.sk.json +1 -1
  89. package/assets/components/assets/action-bar/t9n/messages.sl.json +1 -1
  90. package/assets/components/assets/action-bar/t9n/messages.sr.json +1 -1
  91. package/assets/components/assets/action-bar/t9n/messages.sv.json +1 -1
  92. package/assets/components/assets/action-bar/t9n/messages.th.json +1 -1
  93. package/assets/components/assets/action-bar/t9n/messages.tr.json +1 -1
  94. package/assets/components/assets/action-bar/t9n/messages.uk.json +1 -1
  95. package/assets/components/assets/action-bar/t9n/messages.vi.json +1 -1
  96. package/assets/components/assets/action-bar/t9n/messages.zh-CN.json +1 -1
  97. package/assets/components/assets/action-bar/t9n/messages.zh-HK.json +1 -1
  98. package/assets/components/assets/action-bar/t9n/messages.zh-TW.json +1 -1
  99. package/assets/components/assets/action-pad/t9n/messages.ar.json +1 -1
  100. package/assets/components/assets/action-pad/t9n/messages.bg.json +1 -1
  101. package/assets/components/assets/action-pad/t9n/messages.bs.json +1 -1
  102. package/assets/components/assets/action-pad/t9n/messages.ca.json +1 -1
  103. package/assets/components/assets/action-pad/t9n/messages.cs.json +1 -1
  104. package/assets/components/assets/action-pad/t9n/messages.da.json +1 -1
  105. package/assets/components/assets/action-pad/t9n/messages.de.json +1 -1
  106. package/assets/components/assets/action-pad/t9n/messages.el.json +1 -1
  107. package/assets/components/assets/action-pad/t9n/messages.es.json +1 -1
  108. package/assets/components/assets/action-pad/t9n/messages.et.json +1 -1
  109. package/assets/components/assets/action-pad/t9n/messages.fi.json +1 -1
  110. package/assets/components/assets/action-pad/t9n/messages.fr.json +1 -1
  111. package/assets/components/assets/action-pad/t9n/messages.he.json +1 -1
  112. package/assets/components/assets/action-pad/t9n/messages.hr.json +1 -1
  113. package/assets/components/assets/action-pad/t9n/messages.hu.json +1 -1
  114. package/assets/components/assets/action-pad/t9n/messages.id.json +1 -1
  115. package/assets/components/assets/action-pad/t9n/messages.it.json +1 -1
  116. package/assets/components/assets/action-pad/t9n/messages.ja.json +1 -1
  117. package/assets/components/assets/action-pad/t9n/messages.ko.json +1 -1
  118. package/assets/components/assets/action-pad/t9n/messages.lt.json +1 -1
  119. package/assets/components/assets/action-pad/t9n/messages.lv.json +1 -1
  120. package/assets/components/assets/action-pad/t9n/messages.nl.json +1 -1
  121. package/assets/components/assets/action-pad/t9n/messages.no.json +1 -1
  122. package/assets/components/assets/action-pad/t9n/messages.pl.json +1 -1
  123. package/assets/components/assets/action-pad/t9n/messages.pt-BR.json +1 -1
  124. package/assets/components/assets/action-pad/t9n/messages.pt-PT.json +1 -1
  125. package/assets/components/assets/action-pad/t9n/messages.ro.json +1 -1
  126. package/assets/components/assets/action-pad/t9n/messages.ru.json +1 -1
  127. package/assets/components/assets/action-pad/t9n/messages.sk.json +1 -1
  128. package/assets/components/assets/action-pad/t9n/messages.sl.json +1 -1
  129. package/assets/components/assets/action-pad/t9n/messages.sr.json +1 -1
  130. package/assets/components/assets/action-pad/t9n/messages.sv.json +1 -1
  131. package/assets/components/assets/action-pad/t9n/messages.th.json +1 -1
  132. package/assets/components/assets/action-pad/t9n/messages.tr.json +1 -1
  133. package/assets/components/assets/action-pad/t9n/messages.uk.json +1 -1
  134. package/assets/components/assets/action-pad/t9n/messages.vi.json +1 -1
  135. package/assets/components/assets/action-pad/t9n/messages.zh-CN.json +1 -1
  136. package/assets/components/assets/action-pad/t9n/messages.zh-HK.json +1 -1
  137. package/assets/components/assets/action-pad/t9n/messages.zh-TW.json +1 -1
  138. package/assets/components/assets/icon/layer3D16.json +1 -0
  139. package/assets/components/assets/icon/layer3D24.json +1 -0
  140. package/assets/components/assets/icon/layer3D32.json +1 -0
  141. package/assets/components/assets/sort-handle/t9n/messages.ar.json +1 -1
  142. package/assets/components/assets/sort-handle/t9n/messages.bg.json +1 -1
  143. package/assets/components/assets/sort-handle/t9n/messages.bs.json +1 -1
  144. package/assets/components/assets/sort-handle/t9n/messages.ca.json +1 -1
  145. package/assets/components/assets/sort-handle/t9n/messages.cs.json +1 -1
  146. package/assets/components/assets/sort-handle/t9n/messages.da.json +1 -1
  147. package/assets/components/assets/sort-handle/t9n/messages.de.json +1 -1
  148. package/assets/components/assets/sort-handle/t9n/messages.el.json +1 -1
  149. package/assets/components/assets/sort-handle/t9n/messages.es.json +1 -1
  150. package/assets/components/assets/sort-handle/t9n/messages.et.json +1 -1
  151. package/assets/components/assets/sort-handle/t9n/messages.fi.json +1 -1
  152. package/assets/components/assets/sort-handle/t9n/messages.fr.json +1 -1
  153. package/assets/components/assets/sort-handle/t9n/messages.he.json +1 -1
  154. package/assets/components/assets/sort-handle/t9n/messages.hr.json +1 -1
  155. package/assets/components/assets/sort-handle/t9n/messages.hu.json +1 -1
  156. package/assets/components/assets/sort-handle/t9n/messages.id.json +1 -1
  157. package/assets/components/assets/sort-handle/t9n/messages.it.json +1 -1
  158. package/assets/components/assets/sort-handle/t9n/messages.ja.json +1 -1
  159. package/assets/components/assets/sort-handle/t9n/messages.ko.json +1 -1
  160. package/assets/components/assets/sort-handle/t9n/messages.lt.json +1 -1
  161. package/assets/components/assets/sort-handle/t9n/messages.lv.json +1 -1
  162. package/assets/components/assets/sort-handle/t9n/messages.nl.json +1 -1
  163. package/assets/components/assets/sort-handle/t9n/messages.no.json +1 -1
  164. package/assets/components/assets/sort-handle/t9n/messages.pl.json +1 -1
  165. package/assets/components/assets/sort-handle/t9n/messages.pt-BR.json +1 -1
  166. package/assets/components/assets/sort-handle/t9n/messages.pt-PT.json +1 -1
  167. package/assets/components/assets/sort-handle/t9n/messages.ro.json +1 -1
  168. package/assets/components/assets/sort-handle/t9n/messages.ru.json +1 -1
  169. package/assets/components/assets/sort-handle/t9n/messages.sk.json +1 -1
  170. package/assets/components/assets/sort-handle/t9n/messages.sl.json +1 -1
  171. package/assets/components/assets/sort-handle/t9n/messages.sr.json +1 -1
  172. package/assets/components/assets/sort-handle/t9n/messages.sv.json +1 -1
  173. package/assets/components/assets/sort-handle/t9n/messages.th.json +1 -1
  174. package/assets/components/assets/sort-handle/t9n/messages.tr.json +1 -1
  175. package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
  176. package/assets/components/assets/sort-handle/t9n/messages.vi.json +1 -1
  177. package/assets/components/assets/sort-handle/t9n/messages.zh-CN.json +1 -1
  178. package/assets/components/assets/sort-handle/t9n/messages.zh-HK.json +1 -1
  179. package/assets/components/assets/sort-handle/t9n/messages.zh-TW.json +1 -1
  180. package/assets/esri/core/workers/RemoteClient.js +1 -1
  181. package/assets/esri/core/workers/chunks/{ed8863c3d334f438b625.js → 0037abf0a82d1ed32e91.js} +1 -1
  182. package/assets/esri/core/workers/chunks/{c6d4b8d683a34fc0d111.js → 0103b70126bc5dffc55e.js} +1 -1
  183. package/assets/esri/core/workers/chunks/{d7fc8ea2ff527a09f4b9.js → 0296ebe8e37e30af771c.js} +1 -1
  184. package/assets/esri/core/workers/chunks/{39a1f361bb69073af765.js → 04dbdaa63c950f32b8f0.js} +1 -1
  185. package/assets/esri/core/workers/chunks/05aac984cbbadb5f6aa0.js +1 -0
  186. package/assets/esri/core/workers/chunks/0fadd1defbb6743dacdc.js +1 -0
  187. package/assets/esri/core/workers/chunks/{0f05425954578ac796ec.js → 135142f3cbfaf24949bc.js} +1 -1
  188. package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +2 -0
  189. package/assets/esri/core/workers/chunks/{268f5b233640a9dbbf89.js.LICENSE.txt → 24921d31efa8d222ad2d.js.LICENSE.txt} +1 -1
  190. package/assets/esri/core/workers/chunks/2b2f1fcd50dea017d891.js +1 -0
  191. package/assets/esri/core/workers/chunks/2e1cc11462846febb3b2.js +1 -0
  192. package/assets/esri/core/workers/chunks/300b96f0f8e34b4a5d8b.js +1 -0
  193. package/assets/esri/core/workers/chunks/37b5007660535f1c91c6.js +1 -0
  194. package/assets/esri/core/workers/chunks/{2dc88379ee94fabdaf52.js → 39a5863355cccaabd2d6.js} +1 -1
  195. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js +2 -0
  196. package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js.LICENSE.txt → 3a457e718a901a45902e.js.LICENSE.txt} +1 -1
  197. package/assets/esri/core/workers/chunks/{f3ee035fa7bf638c8e60.js → 3d68a650a1f944ec5171.js} +1 -1
  198. package/assets/esri/core/workers/chunks/46ef545d2b3b3f4e6d32.js +2 -0
  199. package/assets/esri/core/workers/chunks/{336b54144afec0c7d396.js.LICENSE.txt → 46ef545d2b3b3f4e6d32.js.LICENSE.txt} +1 -1
  200. package/assets/esri/core/workers/chunks/47c0c16c1e995a441ec2.js +1 -0
  201. package/assets/esri/core/workers/chunks/48913b944c28343816ac.js +1 -0
  202. package/assets/esri/core/workers/chunks/{4d4db6854aff7656f6e1.js → 4dd4b19c410026233999.js} +1 -1
  203. package/assets/esri/core/workers/chunks/4e77b9cc1d9437bcbb0c.js +1 -0
  204. package/assets/esri/core/workers/chunks/52121179d4f9833008ec.js +1 -0
  205. package/assets/esri/core/workers/chunks/58e2652810143f509fe1.js +1 -0
  206. package/assets/esri/core/workers/chunks/{97489bf16a1d327992b2.js → 595593dd03bcfba795c8.js} +11 -16
  207. package/assets/esri/core/workers/chunks/59e27818cb68f0285d54.js +1 -0
  208. package/assets/esri/core/workers/chunks/620a94b54be3ed78350d.js +1 -0
  209. package/assets/esri/core/workers/chunks/67d9cfe02613cb73ee37.js.LICENSE.txt +1 -1
  210. package/assets/esri/core/workers/chunks/6f29951f5a2da068b257.js +1 -0
  211. package/assets/esri/core/workers/chunks/71c6c0b26253c4ca1b68.js +1 -0
  212. package/assets/esri/core/workers/chunks/{1c1b0cc91fe9cb3fec61.js → 71df48968d6cdc736458.js} +1 -1
  213. package/assets/esri/core/workers/chunks/773d106f60f7dad1493d.js +1 -0
  214. package/assets/esri/core/workers/chunks/779ee975efebb838b5d6.js +1 -0
  215. package/assets/esri/core/workers/chunks/7a240ab31d9ff2d2c5af.js +1 -0
  216. package/assets/esri/core/workers/chunks/834985ec601623df34a1.js +1 -0
  217. package/assets/esri/core/workers/chunks/{5dee8c0c60ced791e57f.js → 84a556dafd583635ad5e.js} +1 -1
  218. package/assets/esri/core/workers/chunks/8be9fa12e854a83062c3.js +1 -0
  219. package/assets/esri/core/workers/chunks/8f4cfef97716c3502b0f.js +1 -0
  220. package/assets/esri/core/workers/chunks/{65ec21d29e8563fdbc55.js → 94c9d3094c93f7760433.js} +1 -1
  221. package/assets/esri/core/workers/chunks/{177840d5f0076c0de46b.js → 96de78f9994207aa7201.js} +1 -1
  222. package/assets/esri/core/workers/chunks/{366db86914a63e6d0c68.js → 978ffde9ebebf5c83aea.js} +1 -1
  223. package/assets/esri/core/workers/chunks/a1abe9865d66789bd5af.js +1 -0
  224. package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js → a8f998b8ec8c56150479.js} +2 -2
  225. package/assets/esri/core/workers/chunks/{f6e18668f728dfd8ba5e.js.LICENSE.txt → a8f998b8ec8c56150479.js.LICENSE.txt} +1 -1
  226. package/assets/esri/core/workers/chunks/{257fd65786feb5951b90.js → a96e58ed9a4a2329ee53.js} +1 -1
  227. package/assets/esri/core/workers/chunks/{0074f1836d7ff69ff6ec.js → aa778e5d7db40d9b9b4a.js} +1 -1
  228. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  229. package/assets/esri/core/workers/chunks/{c78de6dd6c10280cee69.js → baa48614d9567d5f240d.js} +1 -1
  230. package/assets/esri/core/workers/chunks/c1d75c48558ed23c5b2b.js +1 -0
  231. package/assets/esri/core/workers/chunks/c3010d783506f8410f99.js +1 -0
  232. package/assets/esri/core/workers/chunks/c55c096669677321a227.js +1 -0
  233. package/assets/esri/core/workers/chunks/c86ca87959f04075e834.js +1 -0
  234. package/assets/esri/core/workers/chunks/c954d281038f6bf80232.js +1 -0
  235. package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js → ce16489cf7eb0d78c741.js} +2 -2
  236. package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js.LICENSE.txt → ce16489cf7eb0d78c741.js.LICENSE.txt} +1 -1
  237. package/assets/esri/core/workers/chunks/{a48f980c1531805db73b.js → d1fc2c6e95fe2572d297.js} +1 -1
  238. package/assets/esri/core/workers/chunks/{fc5ac54aab66562c8463.js → d51aabb9b950f49df183.js} +1 -1
  239. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  240. package/assets/esri/core/workers/chunks/{639d856cd217914dfe1f.js → de34c21d3e6913befe5a.js} +1 -1
  241. package/assets/esri/core/workers/chunks/e99fc64b67bb0c71dc34.js +1 -0
  242. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  243. package/assets/esri/core/workers/chunks/f6806780ca2aa591475a.js +1 -0
  244. package/assets/esri/themes/dark/main.css +1 -1
  245. package/assets/esri/themes/light/main.css +1 -1
  246. package/assets/esri/themes/light/view.css +1 -1
  247. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -0
  248. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -0
  249. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -0
  250. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -0
  251. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -0
  252. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -0
  253. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -0
  254. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -0
  255. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_en.json +1 -0
  256. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -0
  257. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -0
  258. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -0
  259. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -0
  260. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -0
  261. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -0
  262. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -0
  263. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -0
  264. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -0
  265. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -0
  266. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -0
  267. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -0
  268. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -0
  269. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -0
  270. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -0
  271. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -0
  272. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -0
  273. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -0
  274. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -0
  275. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -0
  276. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -0
  277. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -0
  278. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -0
  279. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -0
  280. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -0
  281. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -0
  282. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -0
  283. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -0
  284. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -0
  285. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -0
  286. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -0
  287. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  288. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  289. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  290. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  291. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  292. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  293. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  294. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  295. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  296. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  297. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  298. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  299. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  300. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  301. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  302. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  303. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  304. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  305. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  306. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  307. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  308. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  309. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  310. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  311. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  312. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  313. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  314. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  315. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  316. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  317. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  318. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  319. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  320. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  321. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  322. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  323. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  324. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  325. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  326. package/chunks/ComponentShader.glsl.js +15 -16
  327. package/chunks/DefaultMaterial.glsl.js +15 -16
  328. package/chunks/Path.glsl.js +12 -12
  329. package/chunks/RealisticTree.glsl.js +5 -6
  330. package/chunks/aiServices.js +1 -1
  331. package/chunks/array.js +1 -1
  332. package/chunks/languageUtils.js +1 -1
  333. package/config.js +1 -1
  334. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  335. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  336. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  337. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  338. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  339. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  340. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  341. package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
  342. package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
  343. package/editing/sharedTemplates/templateDefinitions/parts/TemplatePartBase.js +1 -1
  344. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  345. package/interfaces.d.ts +106 -47
  346. package/kernel.js +1 -1
  347. package/layers/CSVLayer.js +1 -1
  348. package/layers/FeatureLayer.js +1 -1
  349. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  350. package/layers/OrientedImageryLayer.js +1 -1
  351. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  352. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  353. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  354. package/layers/support/BuildingFieldStatistics.js +5 -0
  355. package/layers/support/BuildingSummaryStatistics.js +1 -1
  356. package/layers/support/ControlPoint.js +5 -0
  357. package/layers/support/ControlPointsGeoreference.js +1 -1
  358. package/layers/support/DateTimeFieldFormat.js +1 -1
  359. package/layers/support/FieldConfiguration.js +1 -1
  360. package/layers/support/FieldFormat.js +1 -1
  361. package/layers/support/NumberFieldFormat.js +1 -1
  362. package/layers/support/Sublayer.js +1 -1
  363. package/layers/support/VideoFrame.js +1 -1
  364. package/layers/support/capabilities.js +1 -1
  365. package/layers/support/fieldConfigUtils.js +1 -1
  366. package/layers/support/fieldFormatUtils.js +5 -0
  367. package/layers/support/mediaUtils.js +1 -1
  368. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  369. package/layers/support/vectorTileLayerLoader.js +1 -1
  370. package/package.json +2 -2
  371. package/popup/FieldInfo.js +1 -1
  372. package/popup/content/FieldsContent.js +1 -1
  373. package/portal/Portal.js +1 -1
  374. package/portal/schemas/definitions.js +1 -1
  375. package/renderers/support/RasterSymbolizer.js +1 -1
  376. package/rest/sharedTemplates/addSharedTemplates.js +5 -0
  377. package/rest/sharedTemplates/querySharedTemplates.js +1 -1
  378. package/rest/sharedTemplates/utils.js +5 -0
  379. package/rest/support/imageMeasureUtils.js +1 -1
  380. package/support/ArcadeExpression.js +1 -1
  381. package/support/revision.js +1 -1
  382. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  383. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  384. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  385. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  386. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
  387. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
  388. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
  389. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
  390. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
  391. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  392. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  393. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  394. package/views/2d/layers/BaseLayerView2D.js +1 -1
  395. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  396. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  397. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  398. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  399. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
  400. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  401. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  402. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  403. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  404. package/views/3d/environment/CloudsComposition.js +1 -1
  405. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  406. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  407. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  408. package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +5 -0
  409. package/views/3d/layers/I3SMeshView3D.js +1 -1
  410. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  411. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  412. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  413. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  414. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  415. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  416. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  417. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  418. package/views/3d/state/ViewState.js +1 -1
  419. package/views/3d/state/ViewStateManager.js +1 -1
  420. package/views/3d/support/QualitySettings.js +1 -1
  421. package/views/3d/support/ResourceController.js +1 -1
  422. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  423. package/views/3d/support/orientedBoundingBox.js +1 -1
  424. package/views/3d/terrain/TerrainRenderer.js +1 -1
  425. package/views/3d/webgl/RenderNode.js +1 -1
  426. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  427. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  428. package/views/3d/webgl-engine/collections/Component/{ComponentObjectElevationAgnosticComponentBVH.js → ComponentObjectElevationAgnosticBVH.js} +1 -1
  429. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +5 -0
  430. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  431. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  432. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  433. package/views/3d/webgl-engine/collections/Component/ObjectParameters.js +1 -1
  434. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  435. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  436. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  437. package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +0 -3
  438. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  439. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  440. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  441. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  442. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  443. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  444. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  445. package/views/GroundView.js +1 -1
  446. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
  447. package/views/draw/input/DrawEvents.js +1 -1
  448. package/views/interactive/dragEventPipeline.js +1 -1
  449. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  450. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  451. package/views/layers/ImageryTileLayerView.js +1 -1
  452. package/views/support/Scheduler.js +1 -1
  453. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  454. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  455. package/widgets/Editor/EditorViewModel.js +1 -1
  456. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  457. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  458. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  459. package/widgets/Editor/UpdateWorkflow.js +1 -1
  460. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  461. package/widgets/Editor/components/FeatureList.js +1 -1
  462. package/widgets/Editor/workflowUtils.js +1 -1
  463. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  464. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  465. package/widgets/FeatureTable/support/templateUtils.js +1 -1
  466. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  467. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  468. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  469. package/widgets/OrientedImageryViewer.js +1 -1
  470. package/widgets/PanoramicVideoViewer.js +5 -0
  471. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +5 -0
  472. package/widgets/ScaleRangeSlider.js +1 -1
  473. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  474. package/assets/esri/core/workers/chunks/09c2004126f4a5242b85.js +0 -1
  475. package/assets/esri/core/workers/chunks/0dd6b8b3e634bb5f0ca7.js +0 -1
  476. package/assets/esri/core/workers/chunks/0dfc2ca36014910457ef.js +0 -1
  477. package/assets/esri/core/workers/chunks/1c7fffb496af6f2540dd.js +0 -1
  478. package/assets/esri/core/workers/chunks/1fc6311d4f0d27e88737.js +0 -1
  479. package/assets/esri/core/workers/chunks/268f5b233640a9dbbf89.js +0 -2
  480. package/assets/esri/core/workers/chunks/2fe96bf7dedef11a3b63.js +0 -1
  481. package/assets/esri/core/workers/chunks/336b54144afec0c7d396.js +0 -2
  482. package/assets/esri/core/workers/chunks/36a006c55766f9540bfc.js +0 -1
  483. package/assets/esri/core/workers/chunks/4840bd93d8fe15c7aefd.js +0 -1
  484. package/assets/esri/core/workers/chunks/637a5293e36f4f7f2853.js +0 -1
  485. package/assets/esri/core/workers/chunks/7540b34e743a23e67729.js +0 -1
  486. package/assets/esri/core/workers/chunks/7be11a3ef1f49245089f.js +0 -1
  487. package/assets/esri/core/workers/chunks/804e3b3df375177e6c86.js +0 -1
  488. package/assets/esri/core/workers/chunks/819a8bc1f0a694017ee6.js +0 -1
  489. package/assets/esri/core/workers/chunks/88d8ff0140f5ea97c6b7.js +0 -1
  490. package/assets/esri/core/workers/chunks/8de11aab65d91e7f1a4d.js +0 -1
  491. package/assets/esri/core/workers/chunks/96740c75ad65d651cc43.js +0 -1
  492. package/assets/esri/core/workers/chunks/9971de3f38a55735cec9.js +0 -1
  493. package/assets/esri/core/workers/chunks/9e47f680b66320dcfd34.js +0 -1
  494. package/assets/esri/core/workers/chunks/a2652d10bb0bc41c9a8d.js +0 -1
  495. package/assets/esri/core/workers/chunks/a7fcb60d5a9d2d9560e4.js +0 -1
  496. package/assets/esri/core/workers/chunks/aa84775399420e35c6a5.js +0 -1
  497. package/assets/esri/core/workers/chunks/b0508c96338d7cf296c1.js +0 -1
  498. package/assets/esri/core/workers/chunks/b09b34f64a6bc2b49e0a.js +0 -1
  499. package/assets/esri/core/workers/chunks/c0ae186620b68d43b338.js +0 -1
  500. package/assets/esri/core/workers/chunks/cc579c94438f48a0dbab.js +0 -1
  501. package/assets/esri/core/workers/chunks/ce0bf0d0cd9e9a90093b.js +0 -1
  502. package/assets/esri/core/workers/chunks/d142a42755a78bb157ed.js +0 -1
  503. package/assets/esri/core/workers/chunks/f35003a90163847fe1e2.js +0 -1
  504. package/assets/esri/core/workers/chunks/f6e18668f728dfd8ba5e.js +0 -2
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../core/has.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../layers/support/RasterInfo.js";import{getPixelValueRange as n}from"../../layers/support/rasterFormats/pixelRangeUtils.js";import{colorize as i,remapColor as l,lookupPixels as u,createColormapLUT as c,isValidPixelBlock as p}from"../../layers/support/rasterFunctions/pixelUtils.js";import{stretch as d,getStretchCutoff as m,isStandardU8Histogram as h,createStretchLUT as f,computeGammaValues as b,createHistogramEqualizationLUT as g}from"../../layers/support/rasterFunctions/stretchUtils.js";import{hillshade as y,tintHillshade as S,calculateHillshadeParams as x}from"../../layers/support/rasterFunctions/surfaceUtils.js";import{convertColorRampToColormap as R,createHsvMap as I}from"./colorRampUtils.js";import{isUVRendererSupported as k,isColormapSupportedByWebGL as C,isColormapRendererSupported as L,isShadedReliefRendererSupported as _}from"./rasterRendererChecks.js";let V=class extends t{constructor(e){super(e),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e?.pixelBlock;if(!U(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const s=e.extent,a=s.spatialReference.isGeographic,o={x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:a,resolution:o});break}}return r}catch(s){return r.getLogger(this).error("symbolize",s.message),t}}simpleStretch(e,t){if(!U(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),d(e,{...t,isRenderer:!0})}catch(s){return r.getLogger(this).error("symbolize",s.message),e}}generateWebGLParameters(e){const{rendererJSON:t}=this;switch(t.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===t.type);case"rasterStretch":return this._generateStretchWebGLParams(e.pixelBlock,t,e.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(t,e.isGCS,e.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(t);default:return null}}_isLUTChanged(e){const t=this.lookup.rendererJSON;if(!t)return!0;const{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){const s=r.colorRamp;if(e)return JSON.stringify(s)!==JSON.stringify(t.colorRamp)}return JSON.stringify(r)!==JSON.stringify(t)}_symbolizeColormap(e){if(this._isLUTChanged()){if(!this.bind().success)return e}return i(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);if(this._isLUTChanged()){if(!this.bind().success)return e}return t?i(e,this.lookup.colormapLut):l(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){if(!e)return null;const{rasterInfo:r,lookup:s}=this,{pixelType:a,bandCount:o}=r,n=this.rendererJSON,l=["u8","u16","s8","s16"].includes(a);let c;const{dra:p}=n,{gamma:b}=s;if(p&&(t=null),"histogramEqualization"===n.stretchType){const a=p?null:s.histogramLut,o=m(n,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!a}),i="u8"===r.pixelType&&!p&&h(r.histograms?.[0])?e:d(e,{...o,gamma:b,isRenderer:!0});c=u(i,{lut:p?o.histogramLut:t?.length?t.map(e=>a[e]):a,offset:0})}else if(l){let i;if(p){const s=m(n,{rasterInfo:r,pixelBlock:e,bandIds:t});i=f({pixelType:a,...s,gamma:b,rounding:"floor"})}else{if(this._isLUTChanged()){if(!this.bind().success)return e}i=s.stretchLut}if(!i)return e;o>1&&null!=t&&t.length===e?.pixels.length&&i.lut.length===o&&(i={lut:t.map(e=>i.lut[e]),offset:i.offset}),c=u(e,i)}else{const s=m(n,{rasterInfo:r,pixelBlock:e,bandIds:t});c=d(e,{...s,gamma:b,isRenderer:!0})}if(n.colorRamp){if(this._isLUTChanged(!0)){if(!this.bind().success)return e}c=i(c,s.colormapLut)}return c}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,s={...r,...t},a=y(e,s);if(!r.colorRamp)return a;if(this._isLUTChanged(!0)){if(!this.bind().success)return a}const{hsvMap:o}=this.lookup;if(!o)return a;const n=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return S(a,e,o,n),a}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:s}=this.rasterInfo,a=e.field1;if(!a)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const o=e.defaultSymbol,n=1===t&&["u8","s8"].includes(s);if(!k(this.rasterInfo,a)&&!n)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const i=[];if(null!=r){const t=r.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{const s=e.uniqueValueInfos?.find(e=>String(e.value)===String(r.attributes[a])),n=s?.symbol?.color;n?i.push([r.attributes[t.name]].concat(n)):o&&i.push([r.attributes[t.name]].concat(o.color))})}else{if("value"!==a.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach(e=>{const t=e?.symbol?.color;t?i.push([parseInt(""+e.value,10)].concat(t)):o&&i.push([parseInt(""+e.value,10)].concat(o?.color))})}if(0===i.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=c({colormap:i});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=C(l?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!L(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=c({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=C(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!_(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=R(e.colorRamp,{interpolateAlpha:!0}),r=c({colormap:t}),s=I(r.indexedColormap);this.lookup={rendererJSON:e,colormapLut:r,hsvMap:s}}else this.lookup={rendererJSON:e};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,s=t?.fields.find(e=>"value"===e.name.toLowerCase()),a=t?.fields.find(t=>t.name.toLowerCase()===e.field.toLowerCase()),o=null!=s&&null!==a;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||o,tableValueField:s,tableBreakField:a}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:s,tableBreakField:a}=this._analyzeClassBreaks(e),o=e.classBreakInfos;if(!o?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const i=o.sort((e,t)=>e.classMaxValue-t.classMaxValue),l=i[i.length-1];let u=e.minValue;if(!r){const t=[];for(let e=0;e<i.length;e++)t.push({value:i[e].classMinValue??u,mappedColor:i[e].symbol.color}),u=i[e].classMaxValue;return t.push({value:l.classMaxValue,mappedColor:l.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const p=[];if(null!=t&&null!=s&&null!==a&&s!==a){const r=s.name,o=a.name,n=i[i.length-1],{classMaxValue:l}=n;u=e.minValue;for(const e of t.features){const t=e.attributes[r],s=e.attributes[o],a=s===l?n:s<u?null:i.find(({classMaxValue:e})=>e>s);a&&p.push([t].concat(a.symbol.color))}}else{const[t,r]=n(this.rasterInfo.pixelType);u=Math.max(t,Math.floor(e.minValue));for(let e=0;e<i.length;e++){const t=i[e],s=Math.min(r,Math.ceil(t.classMaxValue));for(let e=u;e<s;e++)p.push([e].concat(t.symbol.color));u=s}l.classMaxValue!==u&&u!==r||p.push([u].concat(l.symbol.color))}const d=c({colormap:p,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:d},this.canRenderInWebGL=C(d?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||T(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};const s=e.histograms||this.rasterInfo.histograms;!v(e.stretchType)||s?.length||r||(t="minMax");const{computeGamma:a,useGamma:o,colorRamp:n}=e;let{gamma:i}=e;if(o&&a&&!i?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;i=b(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=s.map(e=>g(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(u){const t=m(e,{rasterInfo:this.rasterInfo}),r=f({pixelType:l,...t,gamma:o?i:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}else this.lookup={rendererJSON:e};if(n&&!O(n)){const t=R(n,{interpolateAlpha:!0});this.lookup.colormapLut=c({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=o&&i?.length?i:null,this.canRenderInWebGL="histogramEqualization"!==t,{success:!0}}_generateColormapWebGLParams(e){const{indexedColormap:t,offset:r}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:r,isClassBreaks:e,type:"lut"}}_generateStretchWebGLParams(e,t,r){const{colormapLut:s}=this.lookup,a=t.colorRamp?s?.indexedColormap:null,o=t.colorRamp?s?.offset:null;"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:n}=this.lookup,i=!(!t.useGamma||!n?.some(e=>1!==e)),{minCutOff:l,maxCutOff:u,minOutput:c,maxOutput:p}=m(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});let d=0;null!=e&&(d=e.getPlaneCount(),2===d&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:h}=this.rasterInfo,f=Math.min(3,r?.length||d||h,h),b=a||i?1:255,g=new Float32Array(f);if(i&&n)for(let m=0;m<f;m++)n[m]>1?n[m]>2?g[m]=6.5+(n[m]-2)**2.5:g[m]=6.5+100*(2-n[m])**4:g[m]=1;1===l.length&&(l[2]=l[1]=l[0]),1===u.length&&(u[2]=u[1]=u[0]);const y=i&&n?[n[0],n[1]??n[0],n[2]??n[0]]:[1,1,1],S=i?[g[0],g[1]??g[0],g[2]??g[0]]:[1,1,1],x=u.map((e,t)=>u[t]===l[t]?0:(p-c)/(u[t]-l[t])/b);return{bandCount:f,minOutput:c/b,maxOutput:p/b,minCutOff:l,maxCutOff:u,factor:x,useGamma:i,gamma:y,gammaCorrection:S,colormap:a,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){const{colormapLut:s}=this.lookup,a=e.colorRamp?s?.indexedColormap:null,o=e.colorRamp?s?.offset:null,n={...e,isGCS:t,resolution:r},i=x(n),l=this.rasterInfo.statistics?.[0];return{...i,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:a,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:s,visualVariables:a,symbolTileSize:o,flowRepresentation:n}=e,i=this.rasterInfo.statistics?.[0].min??0,l=this.rasterInfo.statistics?.[0].max??50,u=a?.find(e=>"sizeInfo"===e.type)??{maxDataValue:l,maxSize:.8*o,minDataValue:i,minSize:.2*o},c=u.minDataValue??i,p=u.maxDataValue??l,d=null!=u.maxSize&&null!=u.minSize?[u.minSize/o,u.maxSize/o]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const m=null!=c&&null!=p?[c,p]:null;let h=null;if("classified_arrow"===t)if(null!=c&&null!=p&&null!=u){h=[];const e=(u.maxDataValue-u.minDataValue)/5;for(let t=0;t<6;t++)h.push(u.minDataValue+e*t)}else h=[0,1e-6,3.5,7,10.5,14];const f="flow_to"===n===("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,b=a?.find(e=>"rotationInfo"===e.type);return{breakValues:h,dataRange:m,inputUnit:r,outputUnit:s,symbolTileSize:o,symbolPercentRange:d,style:t||"single_arrow",rotation:f,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":b?.rotationType||e.rotationType,type:"vectorField"}}};function v(e){return"percentClip"===e||"histogramEqualization"===e}function T(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}function U(e){return p(e)&&0!==e.validPixelCount}function O(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}e([s({json:{write:!0}})],V.prototype,"rendererJSON",void 0),e([s({type:o,json:{write:!0}})],V.prototype,"rasterInfo",void 0),e([s({json:{write:!0}})],V.prototype,"lookup",void 0),e([s()],V.prototype,"canRenderInWebGL",void 0),V=e([a("esri.renderers.support.RasterSymbolizer")],V);export{V as default};
5
+ import{__decorate as e}from"tslib";import"../../core/has.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../layers/support/RasterInfo.js";import{getPixelValueRange as n}from"../../layers/support/rasterFormats/pixelRangeUtils.js";import{colorize as i,remapColor as l,lookupPixels as u,createColormapLUT as c,isValidPixelBlock as p}from"../../layers/support/rasterFunctions/pixelUtils.js";import{stretch as d,getStretchCutoff as m,isStandardU8Histogram as h,createStretchLUT as f,computeGammaValues as b,createHistogramEqualizationLUT as y}from"../../layers/support/rasterFunctions/stretchUtils.js";import{hillshade as g,tintHillshade as x,calculateHillshadeParams as S}from"../../layers/support/rasterFunctions/surfaceUtils.js";import{convertColorRampToColormap as R,createHsvMap as I}from"./colorRampUtils.js";import{isUVRendererSupported as C,isColormapSupportedByWebGL as k,isColormapRendererSupported as L,isShadedReliefRendererSupported as _}from"./rasterRendererChecks.js";let O=class extends t{constructor(e){super(e),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e?.pixelBlock;if(!T(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const s=e.extent,a=s.spatialReference.isGeographic,o={x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:a,resolution:o});break}}return r}catch(s){return r.getLogger(this).error("symbolize",s.message),t}}simpleStretch(e,t){if(!T(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),d(e,{...t,isRenderer:!0})}catch(s){return r.getLogger(this).error("symbolize",s.message),e}}generateWebGLParameters(e){const{rendererJSON:t}=this;switch(t.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===t.type);case"rasterStretch":return this._generateStretchWebGLParams(e.pixelBlock,t,e.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(t,e.isGCS,e.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(t);default:return null}}_isLUTChanged(e){const t=this.lookup.rendererJSON;if(!t)return!0;const{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){const s=r.colorRamp;if(e)return JSON.stringify(s)!==JSON.stringify(t.colorRamp)}return JSON.stringify(r)!==JSON.stringify(t)}_symbolizeColormap(e){if(this._isLUTChanged()){if(!this.bind().success)return e}return i(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);if(this._isLUTChanged()){if(!this.bind().success)return e}return t?i(e,this.lookup.colormapLut):l(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){if(!e)return null;const{rasterInfo:r,lookup:s}=this,{pixelType:a,bandCount:o}=r,n=this.rendererJSON,l=["u8","u16","s8","s16"].includes(a);let c;const{dra:p}=n,{gamma:b}=s;if(p&&(t=null),"histogramEqualization"===n.stretchType){const a=p?null:s.histogramLut,o=m(n,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!a}),i="u8"===r.pixelType&&!p&&h(r.histograms?.[0])?e:d(e,{...o,gamma:b,isRenderer:!0});c=u(i,{lut:p?o.histogramLut:t?.length?t.map(e=>a[e]):a,offset:0})}else if(l){let i;if(p){const s=m(n,{rasterInfo:r,pixelBlock:e,bandIds:t});i=f({pixelType:a,...s,gamma:b,rounding:"floor"})}else{if(this._isLUTChanged()){if(!this.bind().success)return e}i=s.stretchLut}if(!i)return e;o>1&&null!=t&&t.length===e?.pixels.length&&i.lut.length===o&&(i={lut:t.map(e=>i.lut[e]),offset:i.offset}),c=u(e,i)}else{const s=m(n,{rasterInfo:r,pixelBlock:e,bandIds:t});c=d(e,{...s,gamma:b,isRenderer:!0})}if(n.colorRamp){if(this._isLUTChanged(!0)){if(!this.bind().success)return e}c=i(c,s.colormapLut)}return c}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,s={...r,...t},a=g(e,s);if(!r.colorRamp)return a;if(this._isLUTChanged(!0)){if(!this.bind().success)return a}const{hsvMap:o}=this.lookup;if(!o)return a;const n=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return x(a,e,o,n),a}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:s}=this.rasterInfo,a=e.field1;if(!a)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const o=e.defaultSymbol,n=1===t&&["u8","s8"].includes(s);if(!C(this.rasterInfo,a)&&!n)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const i=[];if(null!=r){const t=r.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{const s=e.uniqueValueInfos?.find(e=>String(e.value)===String(r.attributes[a])),n=s?.symbol?.color;n?i.push([r.attributes[t.name]].concat(n)):o&&i.push([r.attributes[t.name]].concat(o.color))})}else{if("value"!==a.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach(e=>{const t=e?.symbol?.color;t?i.push([parseInt(""+e.value,10)].concat(t)):o&&i.push([parseInt(""+e.value,10)].concat(o?.color))})}if(0===i.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=c({colormap:i});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=k(l?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!L(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=c({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=k(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!_(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=R(e.colorRamp,{interpolateAlpha:!0}),r=c({colormap:t}),s=I(r.indexedColormap);this.lookup={rendererJSON:e,colormapLut:r,hsvMap:s}}else this.lookup={rendererJSON:e};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,s=t?.fields.find(e=>"value"===e.name.toLowerCase()),a=t?.fields.find(t=>t.name.toLowerCase()===e.field.toLowerCase()),o=null!=s&&null!==a;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||o,tableValueField:s,tableBreakField:a}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:s,tableBreakField:a}=this._analyzeClassBreaks(e),o=e.classBreakInfos;if(!o?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const i=o.sort((e,t)=>e.classMaxValue-t.classMaxValue),l=i[i.length-1];let u=e.minValue;if(!r){const t=[];for(let e=0;e<i.length;e++)t.push({value:i[e].classMinValue??u,mappedColor:i[e].symbol.color}),u=i[e].classMaxValue;return t.push({value:l.classMaxValue,mappedColor:l.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const p=[];if(null!=t&&null!=s&&null!==a&&s!==a){const r=s.name,o=a.name,n=i[i.length-1],{classMaxValue:l}=n;u=e.minValue;for(const e of t.features){const t=e.attributes[r],s=e.attributes[o],a=s===l?n:s<u?null:i.find(({classMaxValue:e})=>e>s);a&&p.push([t].concat(a.symbol.color))}}else{const[t,r]=n(this.rasterInfo.pixelType);u=Math.max(t,Math.floor(e.minValue));for(let e=0;e<i.length;e++){const t=i[e],s=Math.min(r,Math.ceil(t.classMaxValue));for(let e=u;e<s;e++)p.push([e].concat(t.symbol.color));u=s}l.classMaxValue!==u&&u!==r||p.push([u].concat(l.symbol.color))}const d=c({colormap:p,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:d},this.canRenderInWebGL=k(d?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||v(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};const s=e.histograms||this.rasterInfo.histograms;!V(e.stretchType)||s?.length||r||(t="minMax");const{computeGamma:a,useGamma:o,colorRamp:n}=e;let{gamma:i}=e;if(o&&a&&!i?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;i=b(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=s.map(e=>y(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(u){const t=m(e,{rasterInfo:this.rasterInfo}),r=f({pixelType:l,...t,gamma:o?i:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}else this.lookup={rendererJSON:e};if(n&&!U(n)){const t=R(n,{interpolateAlpha:!0});this.lookup.colormapLut=c({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=o&&i?.length?i:null,this.canRenderInWebGL="histogramEqualization"!==t,{success:!0}}_generateColormapWebGLParams(e){const{indexedColormap:t,offset:r}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:r,isClassBreaks:e,type:"lut"}}_generateStretchWebGLParams(e,t,r){const{colormapLut:s}=this.lookup,a=t.colorRamp?s?.indexedColormap:null,o=t.colorRamp?s?.offset:null;"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:n}=this.lookup,i=!(!t.useGamma||!n?.some(e=>1!==e));let l=0;null!=e&&(l=e.getPlaneCount(),2===l&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:u}=this.rasterInfo,c=Math.min(3,r?.length||l||u,u),p=a||i?1:255,d=new Float32Array(c);if(i&&n)for(let m=0;m<c;m++)n[m]>1?n[m]>2?d[m]=6.5+(n[m]-2)**2.5:d[m]=6.5+100*(2-n[m])**4:d[m]=1;const h=i&&n?[n[0],n[1]??n[0],n[2]??n[0]]:[1,1,1],f=i?[d[0],d[1]??d[0],d[2]??d[0]]:[1,1,1];if(t.dra&&null==e&&("minMax"===t.stretchType||"standardDeviation"===t.stretchType))return{bandCount:c,minOutput:(t.min??0)/p,maxOutput:(t.max??255)/p,minCutOff:[0,0,0],maxCutOff:[1,1,1],factor:[1,1,1],useGamma:!1,gamma:h,gammaCorrection:f,colormap:a,colormapOffset:o,stretchType:t.stretchType,dynamicRangeAdjustment:t.dra,numberOfStandardDeviations:t.numberOfStandardDeviations??2,type:"stretch"};const{minCutOff:b,maxCutOff:y,minOutput:g,maxOutput:x}=m(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});1===b.length&&(b[2]=b[1]=b[0]),1===y.length&&(y[2]=y[1]=y[0]);const S=y.map((e,t)=>y[t]===b[t]?0:(x-g)/(y[t]-b[t])/p);return{bandCount:c,minOutput:g/p,maxOutput:x/p,minCutOff:b,maxCutOff:y,factor:S,useGamma:i,gamma:h,gammaCorrection:f,colormap:a,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){const{colormapLut:s}=this.lookup,a=e.colorRamp?s?.indexedColormap:null,o=e.colorRamp?s?.offset:null,n={...e,isGCS:t,resolution:r},i=S(n),l=this.rasterInfo.statistics?.[0];return{...i,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:a,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:s,visualVariables:a,symbolTileSize:o,flowRepresentation:n}=e,i=this.rasterInfo.statistics?.[0].min??0,l=this.rasterInfo.statistics?.[0].max??50,u=a?.find(e=>"sizeInfo"===e.type)??{maxDataValue:l,maxSize:.8*o,minDataValue:i,minSize:.2*o},c=u.minDataValue??i,p=u.maxDataValue??l,d=null!=u.maxSize&&null!=u.minSize?[u.minSize/o,u.maxSize/o]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const m=null!=c&&null!=p?[c,p]:null;let h=null;if("classified_arrow"===t)if(null!=c&&null!=p&&null!=u){h=[];const e=(u.maxDataValue-u.minDataValue)/5;for(let t=0;t<6;t++)h.push(u.minDataValue+e*t)}else h=[0,1e-6,3.5,7,10.5,14];const f="flow_to"===n===("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,b=a?.find(e=>"rotationInfo"===e.type);return{breakValues:h,dataRange:m,inputUnit:r,outputUnit:s,symbolTileSize:o,symbolPercentRange:d,style:t||"single_arrow",rotation:f,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":b?.rotationType||e.rotationType,type:"vectorField"}}};function V(e){return"percentClip"===e||"histogramEqualization"===e}function v(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}function T(e){return p(e)&&0!==e.validPixelCount}function U(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}e([s({json:{write:!0}})],O.prototype,"rendererJSON",void 0),e([s({type:o,json:{write:!0}})],O.prototype,"rasterInfo",void 0),e([s({json:{write:!0}})],O.prototype,"lookup",void 0),e([s()],O.prototype,"canRenderInWebGL",void 0),O=e([a("esri.renderers.support.RasterSymbolizer")],O);export{O as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import e from"../../request.js";import r from"../../core/Error.js";import{join as t}from"../../core/urlUtils.js";import{isEmptyValue as s}from"./utils.js";async function a({featureService:a,templates:o,postOptions:d={}}){if(s(o))throw new r("add-shared-templates:invalid-parameters","Must supply new templates to add");if(d.useGlobalIds&&!o.every(e=>e.globalId))throw new r("add-shared-templates:invalid-parameters","useGlobalIds set, but globalId not provided for all templates.");const l=t(a.url,"sharedTemplates","add"),p=o.map(e=>{const r=e.toJSON();return r.layerId=r.layerId??e.layerIds?.[0],r}),m={method:"post",query:{sharedTemplates:JSON.stringify(p),f:"json",...d.useGlobalIds&&{useGlobalIds:"true"}},responseType:"json"};return e(l,m).then(e=>e.data).catch(e=>{throw new r("add-shared-templates:request-error","The request to add shared templates failed.",{error:e})})}export{a as addSharedTemplates};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../request.js";import r from"../../core/Error.js";import{join as t}from"../../core/urlUtils.js";import a from"../../editing/sharedTemplates/SharedTemplateMetadata.js";async function s({featureService:s,query:n,requestOptions:p={}}){if(o(n.layers)&&o(n.templateIds)&&(n.layers=s.layerInfos.map(e=>e.id),!n.layers.length))throw new r("query-shared-templates:invalid-parameters","Must supply a value for either the 'layers' or the 'templateIds' parameters");const m=t(s.url,"sharedTemplates","query"),u={f:"json",...p.query,...n};u.layers&&(u.layers=l(u.layers)),u.templateIds&&(u.templateIds=l(u.templateIds)),u.tags&&(u.tags=l(u.tags));const i={...p,responseType:"json",query:u};return(await e(m,i)).data.templates.map(e=>{const r=a.fromJSON(e);return r.featureService=s,r})}function l(e){return Array.isArray(e)?e.join(","):""}function o(e){return null==e||!e.length}export{s as querySharedTemplates};
5
+ import e from"../../request.js";import r from"../../core/Error.js";import{join as t}from"../../core/urlUtils.js";import a from"../../editing/sharedTemplates/SharedTemplateMetadata.js";import{isEmptyValue as s}from"./utils.js";async function o({featureService:o,query:m,requestOptions:p={}}){if(s(m.layers)&&s(m.templateIds)&&(m.layers=o.layerInfos.map(e=>e.id),!m.layers.length))throw new r("query-shared-templates:invalid-parameters","Must supply a value for either the 'layers' or the 'templateIds' parameters");const i=t(o.url,"sharedTemplates","query"),n={f:"json",...p.query,...m};n.layers&&(n.layers=l(n.layers)),n.templateIds&&(n.templateIds=l(n.templateIds)),n.tags&&(n.tags=l(n.tags));const u={...p,responseType:"json",query:n};return(await e(i,u)).data.templates.map(e=>{const r=a.fromJSON(e);return r.featureService=o,r})}function l(e){return Array.isArray(e)?e.join(","):""}export{o as querySharedTemplates};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ function n(n){return null==n||!n.length}export{n as isEmptyValue};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{lengthUnitsJSONMap as s,areaUnitsJSONMap as o,angleUnitsJSONMap as i}from"../../core/unitUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";const u=new r({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let p=class extends t{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};e([n({type:Number,json:{read:!0,write:!0}})],p.prototype,"value",void 0),e([n({type:String,json:{read:!0,write:!0}})],p.prototype,"displayValue",void 0),e([n({type:Number,json:{read:!0,write:!0}})],p.prototype,"uncertainty",void 0),p=e([a("esri.rest.support.imageMeasureUtils.BaseImageMeasureResultValue")],p);let d=class extends p{constructor(){super(...arguments),this.unit=null}};e([n({type:String,json:{read:s.read,write:s.write}})],d.prototype,"unit",void 0),d=e([a("esri.rest.support.imageMeasureUtils.ImageMeasureResultLengthValue")],d);let l=class extends p{constructor(){super(...arguments),this.unit=null}};e([n({type:String,json:{read:o.read,write:o.write}})],l.prototype,"unit",void 0),l=e([a("esri.rest.support.imageMeasureUtils.ImageMeasureResultAreaValue")],l);let c=class extends p{constructor(){super(...arguments),this.unit=null}};e([n({type:String,json:{read:i.read,write:i.write}})],c.prototype,"unit",void 0),c=e([a("esri.rest.support.imageMeasureUtils.ImageMeasureResultAngleValue")],c);export{c as ImageMeasureResultAngleValue,l as ImageMeasureResultAreaValue,d as ImageMeasureResultLengthValue,u as measureOperationJSONMap};
5
+ import{__decorate as e}from"tslib";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{lengthUnitsJSONMap as s,areaUnitsJSONMap as o,angleUnitsJSONMap as i}from"../../core/unitUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";const u=new r({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let p=class extends t{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};e([n({type:Number,json:{read:!0,write:!0}})],p.prototype,"value",void 0),e([n({type:String,json:{read:!0,write:!0}})],p.prototype,"displayValue",void 0),e([n({type:Number,json:{read:!0,write:!0}})],p.prototype,"uncertainty",void 0),p=e([a("esri.rest.support.imageMeasureUtils.BaseImageMeasureResultValue")],p);let d=class extends p{constructor(){super(...arguments),this.unit=null}};e([n({type:String,json:{read:s.read,write:s.write}})],d.prototype,"unit",void 0),d=e([a("esri.rest.support.imageMeasureUtils.ImageMeasureResultLengthValue")],d);let l=class extends p{constructor(){super(...arguments),this.unit=null}};e([n({type:String,json:{read:o.read,write:o.write}})],l.prototype,"unit",void 0),l=e([a("esri.rest.support.imageMeasureUtils.ImageMeasureResultAreaValue")],l);let c=class extends p{constructor(){super(...arguments),this.unit=null}};e([n({type:String,json:{read:i.read,write:i.write}})],c.prototype,"unit",void 0),c=e([a("esri.rest.support.imageMeasureUtils.ImageMeasureResultAngleValue")],c);export{p as BaseImageMeasureResultValue,c as ImageMeasureResultAngleValue,l as ImageMeasureResultAreaValue,d as ImageMeasureResultLengthValue,u as measureOperationJSONMap};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{ArcadeDate as e}from"../arcade/ArcadeDate.js";import t from"../core/Error.js";import"../core/has.js";import{DateOnly as r}from"../core/sql/DateOnly.js";import{TimeOnly as i}from"../core/sql/TimeOnly.js";import{fromJSON as n}from"../geometry/support/jsonUtils.js";import s from"../layers/support/FieldsIndex.js";import{loadArcade as a}from"./loadArcade.js";import{unknown as o,system as c}from"../time/constants.js";const l=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of l)t.hasArcadeDependency(r)&&e.add(r);return e}function u(e,t){return p.create(e,t,null,["$feature","$view"])}function h(e,t){return p.create(e,t,null,["$feature","$view"])}function m(e,t,r){return p.create(e,t,r,["$feature","$view","$config"])}class p{static async create(e,r,i,n){const{arcade:s,Dictionary:o}=await a();let c;try{c=s.parseScript(e)}catch(f){throw new t("arcade-bad-expression","Failed to parse arcade script",{script:e,error:f})}const l=s.scriptUsesGeometryEngine(c);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,c,null,!1,l);const d={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:r,useAsync:!1},u=s.compileScript(c,d);let h=null;null!=i&&(h=new o(i),h.immutable=!0);const m=new o;return m.immutable=!1,m.setField("scale",0),new p(e,s,c,u,r,m,h,o)}constructor(e,t,r,i,n,s,a,o){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=a,this._dictionaryCtor=o,this._dependencies=new Map,this._featureReader=new f,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(t,r){const i=r.$view?.timeZone;if(r.$view){let t;if(this._viewDict.setField("scale",r.$view.scale),null!=r.$view.timeProperties){const{currentStart:n,currentEnd:s}=r.$view.timeProperties;t=new this._dictionaryCtor({currentStart:null!=n?null!=i?e.epochToArcadeDate(n,i):e.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=i?e.epochToArcadeDate(s,i):e.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",t)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:t},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class f{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new s(_(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=n(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===o}field(t,n=!0){const s=this._getField(t);if(s){const n=this._boundTarget.attributes[s.name];if(null==n)return null;switch(s.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(n);case"time-only":case"esriFieldTypeTimeOnly":return i.fromReader(n);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(n);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(t)?e.unknownEpochToArcadeDate(n):e.epochToArcadeDate(n,this.contextTimeZone??c);default:return n}}if(n)throw new Error(`Field ${t} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function _(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}export{p as ArcadeExpression,f as ArcadeFeatureReader,d as collectExpressionDependencies,m as createDictionaryExpression,u as createLabelExpression,h as createRendererExpression,_ as deriveFields};
5
+ import{ArcadeDate as e}from"../arcade/ArcadeDate.js";import t from"../core/Error.js";import"../core/has.js";import{DateOnly as r}from"../core/sql/DateOnly.js";import{TimeOnly as i}from"../core/sql/TimeOnly.js";import{fromJSON as n}from"../geometry/support/jsonUtils.js";import s from"../layers/support/FieldsIndex.js";import{loadArcade as a}from"./loadArcade.js";import{unknown as o,system as c}from"../time/constants.js";const l=["geometry","scale","timeProperties"];function u(e,t){if(null!=t)for(const r of l)t.hasArcadeDependency(r)&&e.add(r);return e}function d(e,t){return p.create(e,t,null,["$feature","$view"])}function h(e,t){return p.create(e,t,null,["$feature","$view"])}function m(e,t,r){return p.create(e,t,r,["$feature","$view","$config"])}class p{static async create(e,r,i,n){const{arcade:s,Dictionary:o}=await a();let c;try{c=s.parseScript(e)}catch(f){throw new t("arcade-bad-expression","Failed to parse arcade script",{script:e,error:f})}const l=s.scriptUsesGeometryEngine(c);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,c,null,!1,l);const u={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:r,useAsync:!1},d=s.compileScript(c,u);let h=null;null!=i&&(h=new o(i),h.immutable=!0);const m=new o;return m.immutable=!1,m.setField("scale",0),new p(e,s,c,d,r,m,h,o)}constructor(e,t,r,i,n,s,a,o){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=a,this._dictionaryCtor=o,this._dependencies=new Map,this._featureReader=new f,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(t,r){const i=r.$view?.timeZone;if(r.$view){let t;if(this._viewDict.setField("scale",r.$view.scale),null!=r.$view.timeProperties){const{currentStart:n,currentEnd:s}=r.$view.timeProperties;t=new this._dictionaryCtor({currentStart:null!=n?null!=i?e.epochToArcadeDate(n,i):e.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=i?e.epochToArcadeDate(s,i):e.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",t)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:t},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class f{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new s(_(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=n(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===o}field(t,n=!0){const s=this._getField(t);if(s){const n=this._boundTarget.attributes[s.name];if(null==n)return null;switch(s.type){case"date-only":case"esriFieldTypeDateOnly":return r.fromReader(n);case"time-only":case"esriFieldTypeTimeOnly":return i.fromReader(n);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(n);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(t)?e.unknownEpochToArcadeDate(n):e.epochToArcadeDate(n,this.contextTimeZone??c);default:return n}}if(n)throw new Error(`Field ${t} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function _(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}export{p as ArcadeExpression,f as ArcadeFeatureReader,u as collectExpressionDependencies,m as createDictionaryExpression,d as createLabelExpression,h as createRendererExpression,_ as deriveFields};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const c="20250917",e="d8f74ac3accdef5904b6fee9e57311a8c2d5d73c";export{c as buildDate,e as commitHash};
5
+ const b="20250919",c="2fb8bd684afb127a92e865bc1998d986b6cd7afc";export{b as buildDate,c as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView2D as i}from"./AnalysisView2D.js";import{ElevationProfileVisualization2D as s}from"./ElevationProfile/ElevationProfileVisualization2D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends i{constructor(t){super(t),this.type="elevation-profile-view-2d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:o}=this;this._controller=new l({analysis:t,analysisViewData:this,view:o,computationFactory:{create:t=>{switch(t.profileLine.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":throw new e("elevation-profile-analysis-view-2d:unsupported","The scene profile line type is not supported in 2D views.")}}}}),this._visualization=new s({view:o,analysisViewData:this}),this._sketchTool=new c({view:o,analysisViewData:this})}destroy(){this._controller.destroy(),this._visualization.destroy(),this._sketchTool?.destroy()}get effectiveUnits(){return this._controller.effectiveUnits}get error(){return this._controller.error}get hoveredPoints(){return this._controller.hoveredPoints}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller.progress}get results(){return this._controller.results}get statistics(){return this._controller.statistics}get updating(){return!0===this._controller.updating||!0===this._visualization.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([o({readOnly:!0})],u.prototype,"type",void 0),t([o({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([o({readOnly:!0})],u.prototype,"effectiveUnits",null),t([o({readOnly:!0})],u.prototype,"error",null),t([o()],u.prototype,"hoveredPosition",void 0),t([o()],u.prototype,"hoveredPoints",null),t([o({readOnly:!0})],u.prototype,"progress",null),t([o({readOnly:!0})],u.prototype,"results",null),t([o({readOnly:!0})],u.prototype,"statistics",null),t([o({readOnly:!0})],u.prototype,"updating",null),t([o()],u.prototype,"sketchGraphic",null),t([o()],u.prototype,"toolState",null),t([o()],u.prototype,"_controller",void 0),t([o()],u.prototype,"_visualization",void 0),t([o()],u.prototype,"_sketchTool",void 0),u=t([r("esri.views.2d.analysis.ElevationProfileAnalysisView2D")],u);const h=u;export{h as default};
5
+ import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView2D as i}from"./AnalysisView2D.js";import{ElevationProfileVisualization2D as s}from"./ElevationProfile/ElevationProfileVisualization2D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends i{constructor(t){super(t),this.type="elevation-profile-view-2d",this.analysis=null,this.hoveredPosition=null}initialize(){const{analysis:t,view:o}=this;this._controller=new l({analysis:t,analysisViewData:this,view:o,computationFactory:{create:t=>{switch(t.profileLine.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":throw new e("elevation-profile-analysis-view-2d:unsupported","The scene profile line type is not supported in 2D views.")}}}}),this._visualization=new s({view:o,analysisViewData:this}),this._sketchTool=new c({view:o,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveUnits(){return this._controller?.effectiveUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get hoveredPoints(){return this._controller?.hoveredPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickGraphic(t){return this._sketchTool.pickGraphic(t)}};t([o({readOnly:!0})],u.prototype,"type",void 0),t([o({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([o({readOnly:!0})],u.prototype,"effectiveUnits",null),t([o({readOnly:!0})],u.prototype,"error",null),t([o()],u.prototype,"hoveredPosition",void 0),t([o()],u.prototype,"hoveredPoints",null),t([o({readOnly:!0})],u.prototype,"progress",null),t([o({readOnly:!0})],u.prototype,"results",null),t([o({readOnly:!0})],u.prototype,"statistics",null),t([o({readOnly:!0})],u.prototype,"updating",null),t([o()],u.prototype,"sketchGraphic",null),t([o()],u.prototype,"toolState",null),t([o()],u.prototype,"_controller",void 0),t([o()],u.prototype,"_visualization",void 0),t([o()],u.prototype,"_sketchTool",void 0),u=t([r("esri.views.2d.analysis.ElevationProfileAnalysisView2D")],u);const h=u;export{h as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{on as t}from"../../../../core/events.js";import e from"../../../../core/Handles.js";import{disposeMaybe as r}from"../../../../core/maybe.js";import{when as i,initial as s}from"../../../../core/reactiveUtils.js";import{createScreenPoint as o}from"../../../../core/screenUtils.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import a from"../../../../geometry/Point.js";import h from"../../../../geometry/Polygon.js";import{project as l}from"../../../../geometry/projectionUtils.js";import{DisplayObject as u}from"../DisplayObject.js";import d from"../../../layers/support/Geometry.js";import{Texture as c}from"../../../webgl/Texture.js";import{TextureDescriptor as m}from"../../../webgl/TextureDescriptor.js";const p=2;class f extends u{constructor(r){super(),this.element=r,this._handles=new e,this.isWrapAround=!1,this.perspectiveTransform=n(),this.wrapAroundShift=0,this.clipGeometry=null,this._handles.add(i(()=>this.element,()=>{const e=this.element;this.ready(),e&&this._handles.add(t(e,"play",()=>this.requestRender()))},s))}getMesh(t){throw new Error("Method not implemented.")}destroy(){super.destroy(),this._handles.destroy(),this.texture=r(this.texture)}get textureSize(){if(!this.texture)return[1,1];const t=this.texture.descriptor;return[t.width,t.height]}get dvsMat3(){return this.parent.dvsMat3}beforeRender(t){const e=this.element;if(null==e)return;const{context:r}=t,{videoWidth:i,videoHeight:s}=e;if(0!==i&&0!==s){if(this.texture)e.paused||this.texture.setData(e);else{const t=new m(i,s);t.wrapMode=33071,t.preMultiplyAlpha=!0,this.texture=new c(r,t,e)}e.paused||(this.texture.generateMipmap(),this.requestRender()),super.beforeRender(t)}}_createTransforms(){return null}updateDrawCoords(t,e,r,i){const s=this.element,o=this._getFrameInfo();if(!s||!o)return;const{spatialReference:n}=r;this._initializeData(t,o,n);const{controlPoints:a,horizon:u}=o,c=Math.sqrt(a.length),m=c,{x:f,y:x}=t,y=this._vertices,g=a[0],P=a[c-1],w=a[(m-1)*c],_=a[(m-1)*c+c-1],v=l(u?u[0].mapPoint:g.mapPoint,n),j=l(u?u[1].mapPoint:P.mapPoint,n),M=l(w.mapPoint,n),A=l(_.mapPoint,n);this.clipGeometry=u?new d({geometry:h.fromJSON({rings:[[[M.x,M.y],[A.x,A.y],[j.x,j.y],[v.x,v.y],[M.x,M.y]]],spatialReference:n})}):null;for(let h=0;h<a.length;h++){const t=a[h],{sourcePoint:e,mapPoint:r}=t;if(null==e||null==r)continue;const i=l(r,n);y[h*p+0]=i.x-f,y[h*p+1]=i.y-x}let b=e;if(i){const t=Math.min(v.x,j.x,M.x,A.x),e=Math.max(v.x,j.x,M.x,A.x),{worldWidth:r,xBounds:s}=i,[o,n]=s;t<o&&e>o?b=r:e>n&&t<n&&(b=-r)}this.wrapAroundShift=b,this.isWrapAround=0!==b}draw(t,e){if(!this.visible)return;if(!(this.isReady&&this._vertices&&this._indices&&this._texCoords))return void this.requestRender();this.stage||console.warn("OverlayMultipoint: stage is null"),e.render(t,{transform:{dvs:this.dvsMat3},config:{perspective:this.perspectiveTransform,texSize:this.textureSize,wrapAroundShift:this.wrapAroundShift,isWrapAround:this.isWrapAround,opacity:this.opacity,texture:{texture:this.texture,unit:0}},position:this._vertices,tex:this._texCoords,index:this._indices})}_initializeData(t,e,r){if(null!=this._vertices&&null!=this._indices)return;const{controlPoints:i}=e,s=Math.sqrt(i.length),o=s,n=new Float32Array(p*i.length),a=new Uint16Array(2*i.length);for(let d=0;d<i.length;d++){const e=i[d],{sourcePoint:s,mapPoint:o}=e;if(null==s||null==o)continue;const h=l(o,r);n[d*p+0]=h.x-t.x,n[d*p+1]=h.y-t.y,a[2*d+0]=s.x,a[2*d+1]=s.y}const h=new Uint16Array(o*s+(o-2)*(s+2));let u=0;for(let l=0;l<o;l++){for(let t=0;t<s;t++)h[u++]=l*s+t,h[u++]=(l+1)*s+t;l<o-2&&(h[u++]=(l+1)*s+(s-1),h[u++]=(l+1)*s)}this._vertices=n,this._texCoords=a,this._indices=h}_getFrameInfo(){if(!this.groundControlPoints)return null;const t=this._getFrameControlPoints(),e=this.frameHorizonPoints;let r=null;if(e){const t=e.startX,i=e.startY,s=e.endX,n=e.endY;r=[{sourcePoint:o(t,i),mapPoint:new a(e.startLongitude,e.startLatitude)},{sourcePoint:o(s,n),mapPoint:new a(e.endLongitude,e.endLatitude)}]}return{controlPoints:t,horizon:r}}_getFrameControlPoints(){const t=this.groundControlPoints,e=t?.length;if(!e)return[];const r=new Array(e),i=Math.max(...t.map(({x:t})=>t)),s=this.element.videoWidth/i;for(let n=0;n<e;n++){const{x:e,y:i,lat:h,lon:l}=t[n];r[n]={sourcePoint:o(e*s,-i*s),mapPoint:new a(l,h)}}return r}}export{f as default};
5
+ import{on as t}from"../../../../core/events.js";import e from"../../../../core/Handles.js";import{disposeMaybe as r}from"../../../../core/maybe.js";import{when as i,initial as s}from"../../../../core/reactiveUtils.js";import{createScreenPoint as o}from"../../../../core/screenUtils.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import a from"../../../../geometry/Point.js";import l from"../../../../geometry/Polygon.js";import{project as h}from"../../../../geometry/projectionUtils.js";import u from"../../../../layers/support/ControlPoint.js";import{DisplayObject as p}from"../DisplayObject.js";import d from"../../../layers/support/Geometry.js";import{Texture as m}from"../../../webgl/Texture.js";import{TextureDescriptor as c}from"../../../webgl/TextureDescriptor.js";const f=2;class x extends p{constructor(r){super(),this.element=r,this._handles=new e,this.isWrapAround=!1,this.perspectiveTransform=n(),this.wrapAroundShift=0,this.clipGeometry=null,this._handles.add(i(()=>this.element,()=>{const e=this.element;this.ready(),e&&this._handles.add(t(e,"play",()=>this.requestRender()))},s))}getMesh(t){throw new Error("Method not implemented.")}destroy(){super.destroy(),this._handles.destroy(),this.texture=r(this.texture)}get textureSize(){if(!this.texture)return[1,1];const t=this.texture.descriptor;return[t.width,t.height]}get dvsMat3(){return this.parent.dvsMat3}beforeRender(t){const e=this.element;if(null==e)return;const{context:r}=t,{videoWidth:i,videoHeight:s}=e;if(0!==i&&0!==s){if(this.texture)e.paused||this.texture.setData(e);else{const t=new c(i,s);t.wrapMode=33071,t.preMultiplyAlpha=!0,this.texture=new m(r,t,e)}e.paused||(this.texture.generateMipmap(),this.requestRender()),super.beforeRender(t)}}_createTransforms(){return null}updateDrawCoords(t,e,r,i){const s=this.element,o=this._getFrameInfo();if(!s||!o)return;const{spatialReference:n}=r;this._initializeData(t,o,n);const{controlPoints:a,horizon:u}=o,p=Math.sqrt(a.length),m=p,{x:c,y:x}=t,y=this._vertices,g=a[0],w=a[p-1],P=a[(m-1)*p],_=a[(m-1)*p+p-1],v=h(u?u[0].mapPoint:g.mapPoint,n),j=h(u?u[1].mapPoint:w.mapPoint,n),M=h(P.mapPoint,n),A=h(_.mapPoint,n);this.clipGeometry=u?new d({geometry:l.fromJSON({rings:[[[M.x,M.y],[A.x,A.y],[j.x,j.y],[v.x,v.y],[M.x,M.y]]],spatialReference:n})}):null;for(let l=0;l<a.length;l++){const t=a[l],{sourcePoint:e,mapPoint:r}=t;if(null==e||null==r)continue;const i=h(r,n);y[l*f+0]=i.x-c,y[l*f+1]=i.y-x}let C=e;if(i){const t=Math.min(v.x,j.x,M.x,A.x),e=Math.max(v.x,j.x,M.x,A.x),{worldWidth:r,xBounds:s}=i,[o,n]=s;t<o&&e>o?C=r:e>n&&t<n&&(C=-r)}this.wrapAroundShift=C,this.isWrapAround=0!==C}draw(t,e){if(!this.visible)return;if(!(this.isReady&&this._vertices&&this._indices&&this._texCoords))return void this.requestRender();this.stage||console.warn("OverlayMultipoint: stage is null"),e.render(t,{transform:{dvs:this.dvsMat3},config:{perspective:this.perspectiveTransform,texSize:this.textureSize,wrapAroundShift:this.wrapAroundShift,isWrapAround:this.isWrapAround,opacity:this.opacity,texture:{texture:this.texture,unit:0}},position:this._vertices,tex:this._texCoords,index:this._indices})}_initializeData(t,e,r){if(null!=this._vertices&&null!=this._indices)return;const{controlPoints:i}=e,s=Math.sqrt(i.length),o=s,n=new Float32Array(f*i.length),a=new Uint16Array(2*i.length);for(let p=0;p<i.length;p++){const e=i[p],{sourcePoint:s,mapPoint:o}=e;if(null==s||null==o)continue;const l=h(o,r);n[p*f+0]=l.x-t.x,n[p*f+1]=l.y-t.y,a[2*p+0]=s.x,a[2*p+1]=s.y}const l=new Uint16Array(o*s+(o-2)*(s+2));let u=0;for(let h=0;h<o;h++){for(let t=0;t<s;t++)l[u++]=h*s+t,l[u++]=(h+1)*s+t;h<o-2&&(l[u++]=(h+1)*s+(s-1),l[u++]=(h+1)*s)}this._vertices=n,this._texCoords=a,this._indices=l}_getFrameInfo(){if(!this.groundControlPoints)return null;const t=this._getFrameControlPoints(),e=this.frameHorizonPoints;let r=null;if(e){const t=e.startX,i=e.startY,s=e.endX,n=e.endY;r=[new u({sourcePoint:o(t,i),mapPoint:new a(e.startLongitude,e.startLatitude)}),new u({sourcePoint:o(s,n),mapPoint:new a(e.endLongitude,e.endLatitude)})]}return{controlPoints:t,horizon:r}}_getFrameControlPoints(){const t=this.groundControlPoints,e=t?.length;if(!e)return[];const r=new Array(e),i=Math.max(...t.map(({x:t})=>t)),s=this.element.videoWidth/i;for(let n=0;n<e;n++){const{x:e,y:i,lat:l,lon:h}=t[n];r[n]=new u({sourcePoint:o(e*s,-i*s),mapPoint:new a(h,l)})}return r}}export{x as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../../core/has.js";import{isPowerOfTwo as e,nextPowerOfTwo as t}from"../../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../../core/maybe.js";import{simplePipelineState as s}from"../utils.js";import{Technique as u}from"./Technique.js";import{TextureStatisticsDiffShader as o}from"./shaders/TextureStatisticsDiffShader.js";import{TextureStatisticsMinMaxSumShader as i}from"./shaders/TextureStatisticsMinMaxSumShader.js";import{TextureStatisticsStdDevShader as a}from"./shaders/TextureStatisticsStdDevShader.js";import{TextureStatisticsSumOfSquaredDiffShader as f}from"./shaders/TextureStatisticsSumOfSquaredDiffShader.js";import{getWebGLCapabilities as n}from"../../../../../webgl/capabilities.js";import{ColorAttachment2 as l,ColorAttachment3 as h,SizedPixelFormat as m,PixelType as x,ColorAttachment0 as c,ColorAttachment1 as T}from"../../../../../webgl/enums.js";import{FramebufferObject as p}from"../../../../../webgl/FramebufferObject.js";import{Texture as d}from"../../../../../webgl/Texture.js";import{TextureDescriptor as b}from"../../../../../webgl/TextureDescriptor.js";const _=1048576;class F extends u{constructor(){super(...arguments),this.type=32,this._width=0,this._height=0,this._framebuffers=null,this._minTexture=null,this._maxTexture=null,this._sumTexture=null,this._numOfNoDataTexture=null,this._resultsFramebuffer=null,this._startFramebuffer=null,this._diffFramebuffer=null,this._scaleFbo=null,this.shaders={textureStatisticsMinMaxSum:new i,textureStatisticsSum:new f,textureStatisticsDiff:new o,textureStatisticsStdDev:new a}}dispose(){this.shaders.textureStatisticsMinMaxSum=null,this._framebuffers&&(this._framebuffers.forEach(e=>r(e)),this._framebuffers=null),r(this._resultsFramebuffer),r(this._startFramebuffer),r(this._diffFramebuffer),r(this._scaleFbo),r(this._minTexture),r(this._maxTexture),r(this._sumTexture),r(this._numOfNoDataTexture)}get minValuesTexture(){return this._minTexture||null}get maxValuesTexture(){return this._maxTexture||null}get meanValuesTexture(){return this._resultsFramebuffer?.getColorTexture(l)||null}get stdDevValuesTexture(){return this._resultsFramebuffer?.getColorTexture(h)||null}get statsFbo(){return this._resultsFramebuffer}render(t,r){const{context:u,painter:o}=t;let i=r.fbo.width,a=r.fbo.height,f=r.fbo;const n=u.gl,l=u.getBoundFramebufferObject();if(i*a>_||!e(i)||!e(a)){const t=i/a;if(i*a>_){const e=Math.max(Math.floor(Math.sqrt(_/t)),1);i=Math.max(Math.floor(t*e),1),a=e}e(i)||(i=S(i)),e(a)||(a=S(a)),this._scaleFbo?this._scaleFbo.resize(i,a):this._scaleFbo=w(u,i,a,x.UNSIGNED_BYTE,m.RGBA8),u.bindFramebuffer(this._scaleFbo),u.setViewport(0,0,i,a),o.blitTexture(u,f.getColorTexture(c),9728),f=this._scaleFbo}this._updateResources(t,f),o.setPipelineState({...s,color:{write:[!0,!0,!0,!0],blendMode:"none"}});const h=this._applyReductionPass(t);n.readBuffer(n.COLOR_ATTACHMENT3),h.copyToTexture(0,0,1,1,0,0,this._numOfNoDataTexture),n.readBuffer(n.COLOR_ATTACHMENT2),h.copyToTexture(0,0,1,1,0,0,this._sumTexture),n.readBuffer(n.COLOR_ATTACHMENT1),h.copyToTexture(0,0,1,1,0,0,this._maxTexture),n.readBuffer(n.COLOR_ATTACHMENT0),h.copyToTexture(0,0,1,1,0,0,this._minTexture);const T=r.fbo.getColorTexture(c);if(!T)throw new Error("Start buffer color texture is not available, cannot compute diff.");this._computeDiff(t,T,this._sumTexture,this._numOfNoDataTexture,i,a);const p=this._applySecondReductionPass(t,i,a).getColorTexture(c);this._computeSdtDev(t,this._minTexture,this._maxTexture,this._sumTexture,this._numOfNoDataTexture,p,i,a),u.bindFramebuffer(l),u.setViewport(0,0,i,a),u.setDrawBuffers([c]),o.setPipelineState(s)}_applyReductionPass(e){const{context:t,painter:r}=e,s=this.shaders.textureStatisticsMinMaxSum,u=this._framebuffers;if(null===u)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");t.setDrawBuffers([c,T,l]);const o=this._startFramebuffer;let i=o.getColorTexture(c),a=o.getColorTexture(T),f=o.getColorTexture(l),n=o.getColorTexture(h);const m=u;let x=0;for(const p of m){t.setViewport(0,0,p.width,p.height),t.bindFramebuffer(p),t.setClearColor(0,0,0,0),t.clear(16384);const e={shader:s,uniforms:{config:{minTexture:{texture:i,unit:1},maxTexture:{texture:a,unit:2},sumTexture:{texture:f,unit:3},numOfNoDataTexture:{texture:n,unit:4},width:p.width,height:p.height,isFirstPass:0===x?1:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1};r.submitDrawMesh(t,e,r.quadMesh),i=p.getColorTexture(c),a=p.getColorTexture(T),f=p.getColorTexture(l),n=p.getColorTexture(h),x++}return u.at(-1)}_applySecondReductionPass(e,t,r){const{context:s,painter:u}=e,o=this.shaders.textureStatisticsSum,i=this._framebuffers;if(null===i||null==this._diffFramebuffer)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");s.setDrawBuffers([c]);let a=this._diffFramebuffer.getColorTexture(c);const f=i;for(const n of f){s.setViewport(0,0,n.width,n.height),s.bindFramebuffer(n),s.setClearColor(0,0,0,0),s.clear(16384);const e={shader:o,uniforms:{config:{sumTexture:{texture:a,unit:2},width:n.width,height:n.height}},defines:null,optionalAttributes:null,useComputeBuffer:!1};u.submitDrawMesh(s,e,u.quadMesh),a=n.getColorTexture(c)}return i.at(-1)}_updateResources(e,t){const{context:r}=e,s=t.width,u=t.height;if(null===this._startFramebuffer){if(!n().supportsColorBufferFloat)throw new Error("WebGL does not support color buffer float, cannot compute texture statistics.");const e=t.getColorTexture(c);if(!e)throw new Error("Input FBO does not have a color attachment 0, cannot compute texture statistics.");const o=e.descriptor,{dataType:i,internalFormat:a}=o,f=w(r,s,u,i,a??m.RGBA8,4),p=f.getColorTexture(c),d=f.getColorTexture(T),b=f.getColorTexture(l),_=f.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,p),t.copyToTexture(0,0,s,u,0,0,d),t.copyToTexture(0,0,s,u,0,0,b),t.copyToTexture(0,0,s,u,0,0,_),this._startFramebuffer=f,this._diffFramebuffer=w(r,s,u,x.FLOAT,m.RGBA32F),this._resultsFramebuffer=w(r,1,1,x.FLOAT,m.RGBA32F,4),this._minTexture=C(r,1,1,x.FLOAT,m.RGBA32F),this._maxTexture=C(r,1,1,x.FLOAT,m.RGBA32F),this._sumTexture=C(r,1,1,x.FLOAT,m.RGBA32F),this._numOfNoDataTexture=C(r,1,1,x.FLOAT,m.R32F)}else{const e=this._startFramebuffer;e.resize(s,u);const r=e.getColorTexture(c),o=e.getColorTexture(T),i=e.getColorTexture(l),a=e.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,r),t.copyToTexture(0,0,s,u,0,0,o),t.copyToTexture(0,0,s,u,0,0,i),t.copyToTexture(0,0,s,u,0,0,a),this._diffFramebuffer.resize(s,u)}if(this._width===s&&this._height===u&&null!==this._framebuffers)return;const o=(this._framebuffers||[]).reverse();this._framebuffers=null,this._width=s,this._height=u,this._framebuffers=this._updateFramebuffers(r,s,u,o,4)}_updateFramebuffers(e,t,s,u,o=1){const i=[];let a=t,f=s;for(;a>1||f>1;){const t=Math.max(1,Math.floor(a/2)),r=Math.max(1,Math.floor(f/2)),s=g(e,t,r,u,o);i.push(s),a=t,f=r}return i.at(-1),u.forEach(e=>r(e)),u.length=0,i}_computeDiff(e,t,r,s,u,o){const{context:i,painter:a}=e;i.bindFramebuffer(this._diffFramebuffer),i.setDrawBuffers([c]),i.setViewport(0,0,u,o),i.setClearColor(0,0,0,0),i.clear(16384);const f={shader:this.shaders.textureStatisticsDiff,uniforms:{config:{inputTexture:{texture:t,unit:1},sumTexture:{texture:r,unit:2},numOfNoDataTexture:{texture:s,unit:3},numTexels:u*o}},defines:null,optionalAttributes:null,useComputeBuffer:!1};a.submitDrawMesh(i,f,a.quadMesh)}_computeSdtDev(e,t,r,s,u,o,i,a){const{context:f,painter:n}=e;f.bindFramebuffer(this._resultsFramebuffer),f.setDrawBuffers([c,T,l,h]),f.setViewport(0,0,1,1),f.setClearColor(0,0,0,0),f.clear(16384);const m={shader:this.shaders.textureStatisticsStdDev,uniforms:{config:{minTexture:{texture:t,unit:1},maxTexture:{texture:r,unit:2},sumTexture:{texture:s,unit:3},numOfNoDataTexture:{texture:u,unit:4},diffSqTexture:{texture:o,unit:5},numTexels:i*a}},defines:null,optionalAttributes:null,useComputeBuffer:!1};n.submitDrawMesh(f,m,n.quadMesh)}}function g(e,t,r,s,u=1){let o=s.pop();return void 0!==o?o.resize(t,r):o=w(e,t,r,x.FLOAT,m.RGBA32F,u),o}function w(e,t,r,s,u,o=1){if(o<1||o>4)throw new Error("Number of color attachments must be between 1 and 4.");const i=new p(e,C(e,t,r,s,u));for(let a=1;a<o;a++){const o=C(e,t,r,s,u);i.attachColorTexture(o,c+a)}return i}function C(e,t,r,s,u){const o=new b(t,r);return o.samplingMode=9728,o.wrapMode=33071,o.pixelFormat=6408,o.dataType=s,o.internalFormat=u,new d(e,o)}function S(e){const r=t(e),s=r/2;return Math.abs(r-e)<Math.abs(s-e)?r:s}export{F as TextureStatisticsTechnique};
5
+ import"../../../../../../core/has.js";import{isPowerOfTwo as e,nextPowerOfTwo as t}from"../../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../../core/maybe.js";import{simplePipelineState as s}from"../utils.js";import{Technique as u}from"./Technique.js";import{TextureStatisticsDiffShader as o}from"./shaders/TextureStatisticsDiffShader.js";import{TextureStatisticsMinMaxSumShader as i}from"./shaders/TextureStatisticsMinMaxSumShader.js";import{TextureStatisticsStdDevShader as a}from"./shaders/TextureStatisticsStdDevShader.js";import{TextureStatisticsSumOfSquaredDiffShader as f}from"./shaders/TextureStatisticsSumOfSquaredDiffShader.js";import{getWebGLCapabilities as n}from"../../../../../webgl/capabilities.js";import{ColorAttachment2 as l,ColorAttachment3 as h,ColorAttachment0 as m,ColorAttachment1 as x,SizedPixelFormat as c,PixelType as T}from"../../../../../webgl/enums.js";import{FramebufferObject as d}from"../../../../../webgl/FramebufferObject.js";import{Texture as p}from"../../../../../webgl/Texture.js";import{TextureDescriptor as b}from"../../../../../webgl/TextureDescriptor.js";const _=1048576;class F extends u{constructor(){super(...arguments),this.type=32,this._width=0,this._height=0,this._framebuffers=null,this._minTexture=null,this._maxTexture=null,this._sumTexture=null,this._numOfNoDataTexture=null,this._resultsFramebuffer=null,this._startFramebuffer=null,this._diffFramebuffer=null,this._scaleFbo=null,this.shaders={textureStatisticsMinMaxSum:new i,textureStatisticsSum:new f,textureStatisticsDiff:new o,textureStatisticsStdDev:new a}}dispose(){this.shaders.textureStatisticsMinMaxSum=null,this._framebuffers&&(this._framebuffers.forEach(e=>r(e)),this._framebuffers=null),r(this._resultsFramebuffer),r(this._startFramebuffer),r(this._diffFramebuffer),r(this._scaleFbo),r(this._minTexture),r(this._maxTexture),r(this._sumTexture),r(this._numOfNoDataTexture)}get minValuesTexture(){return this._minTexture||null}get maxValuesTexture(){return this._maxTexture||null}get meanValuesTexture(){return this._resultsFramebuffer?.getColorTexture(l)||null}get stdDevValuesTexture(){return this._resultsFramebuffer?.getColorTexture(h)||null}get statsFbo(){return this._resultsFramebuffer}render(t,r){const{context:u,painter:o}=t;let i=r.fbo.width,a=r.fbo.height,f=r.fbo;const n=u.gl,l=u.getBoundFramebufferObject();if(i*a>_||!e(i)||!e(a)){const t=i/a;if(i*a>_){const e=Math.max(Math.floor(Math.sqrt(_/t)),1);i=Math.max(Math.floor(t*e),1),a=e}if(e(i)||(i=S(i)),e(a)||(a=S(a)),this._scaleFbo)this._scaleFbo.resize(i,a);else{const{dataType:e,internalFormat:t}=r.fbo.getColorTexture(m).descriptor,s=t??c.RGBA8;this._scaleFbo=w(u,i,a,e,s)}u.bindFramebuffer(this._scaleFbo),u.setViewport(0,0,i,a),o.blitTexture(u,f.getColorTexture(m),9728),f=this._scaleFbo}this._updateResources(t,f),o.setPipelineState({...s,color:{write:[!0,!0,!0,!0],blendMode:"none"}});const h=this._applyReductionPass(t);n.readBuffer(n.COLOR_ATTACHMENT3),h.copyToTexture(0,0,1,1,0,0,this._numOfNoDataTexture),n.readBuffer(n.COLOR_ATTACHMENT2),h.copyToTexture(0,0,1,1,0,0,this._sumTexture),n.readBuffer(n.COLOR_ATTACHMENT1),h.copyToTexture(0,0,1,1,0,0,this._maxTexture),n.readBuffer(n.COLOR_ATTACHMENT0),h.copyToTexture(0,0,1,1,0,0,this._minTexture);const x=r.fbo.getColorTexture(m);if(!x)throw new Error("Start buffer color texture is not available, cannot compute diff.");this._computeDiff(t,x,this._sumTexture,this._numOfNoDataTexture,i,a);const T=this._applySecondReductionPass(t,i,a).getColorTexture(m);this._computeSdtDev(t,this._minTexture,this._maxTexture,this._sumTexture,this._numOfNoDataTexture,T,i,a),u.bindFramebuffer(l),u.setViewport(0,0,r.fbo.width,r.fbo.height),u.setDrawBuffers([m]),o.setPipelineState(s)}_applyReductionPass(e){const{context:t,painter:r}=e,s=this.shaders.textureStatisticsMinMaxSum,u=this._framebuffers;if(null===u)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");t.setDrawBuffers([m,x,l]);const o=this._startFramebuffer;let i=o.getColorTexture(m),a=o.getColorTexture(x),f=o.getColorTexture(l),n=o.getColorTexture(h);const c=u;let T=0;for(const d of c){t.setViewport(0,0,d.width,d.height),t.bindFramebuffer(d),t.setClearColor(0,0,0,0),t.clear(16384);const e={shader:s,uniforms:{config:{minTexture:{texture:i,unit:1},maxTexture:{texture:a,unit:2},sumTexture:{texture:f,unit:3},numOfNoDataTexture:{texture:n,unit:4},width:d.width,height:d.height,isFirstPass:0===T?1:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1};r.submitDrawMesh(t,e,r.quadMesh),i=d.getColorTexture(m),a=d.getColorTexture(x),f=d.getColorTexture(l),n=d.getColorTexture(h),T++}return u.at(-1)}_applySecondReductionPass(e,t,r){const{context:s,painter:u}=e,o=this.shaders.textureStatisticsSum,i=this._framebuffers;if(null===i||null==this._diffFramebuffer)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");s.setDrawBuffers([m]);let a=this._diffFramebuffer.getColorTexture(m);const f=i;for(const n of f){s.setViewport(0,0,n.width,n.height),s.bindFramebuffer(n),s.setClearColor(0,0,0,0),s.clear(16384);const e={shader:o,uniforms:{config:{sumTexture:{texture:a,unit:2},width:n.width,height:n.height}},defines:null,optionalAttributes:null,useComputeBuffer:!1};u.submitDrawMesh(s,e,u.quadMesh),a=n.getColorTexture(m)}return i.at(-1)}_updateResources(e,t){const{context:r}=e,s=t.width,u=t.height;if(null===this._startFramebuffer){if(!n().supportsColorBufferFloat)throw new Error("WebGL does not support color buffer float, cannot compute texture statistics.");const e=t.getColorTexture(m);if(!e)throw new Error("Input FBO does not have a color attachment 0, cannot compute texture statistics.");const o=e.descriptor,{dataType:i,internalFormat:a}=o,f=w(r,s,u,i,a??c.RGBA8,4),d=f.getColorTexture(m),p=f.getColorTexture(x),b=f.getColorTexture(l),_=f.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,d),t.copyToTexture(0,0,s,u,0,0,p),t.copyToTexture(0,0,s,u,0,0,b),t.copyToTexture(0,0,s,u,0,0,_),this._startFramebuffer=f,this._diffFramebuffer=w(r,s,u,T.FLOAT,c.RGBA32F),this._resultsFramebuffer=w(r,1,1,T.FLOAT,c.RGBA32F,4),this._minTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._maxTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._sumTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._numOfNoDataTexture=C(r,1,1,T.FLOAT,c.R32F)}else{const e=this._startFramebuffer;e.resize(s,u);const r=e.getColorTexture(m),o=e.getColorTexture(x),i=e.getColorTexture(l),a=e.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,r),t.copyToTexture(0,0,s,u,0,0,o),t.copyToTexture(0,0,s,u,0,0,i),t.copyToTexture(0,0,s,u,0,0,a),this._diffFramebuffer.resize(s,u)}if(this._width===s&&this._height===u&&null!==this._framebuffers)return;const o=(this._framebuffers||[]).reverse();this._framebuffers=null,this._width=s,this._height=u,this._framebuffers=this._updateFramebuffers(r,s,u,o,4)}_updateFramebuffers(e,t,s,u,o=1){const i=[];let a=t,f=s;for(;a>1||f>1;){const t=Math.max(1,Math.floor(a/2)),r=Math.max(1,Math.floor(f/2)),s=g(e,t,r,u,o);i.push(s),a=t,f=r}return i.at(-1),u.forEach(e=>r(e)),u.length=0,i}_computeDiff(e,t,r,s,u,o){const{context:i,painter:a}=e;i.bindFramebuffer(this._diffFramebuffer),i.setDrawBuffers([m]),i.setViewport(0,0,u,o),i.setClearColor(0,0,0,0),i.clear(16384);const f={shader:this.shaders.textureStatisticsDiff,uniforms:{config:{inputTexture:{texture:t,unit:1},sumTexture:{texture:r,unit:2},numOfNoDataTexture:{texture:s,unit:3},numTexels:u*o}},defines:null,optionalAttributes:null,useComputeBuffer:!1};a.submitDrawMesh(i,f,a.quadMesh)}_computeSdtDev(e,t,r,s,u,o,i,a){const{context:f,painter:n}=e;f.bindFramebuffer(this._resultsFramebuffer),f.setDrawBuffers([m,x,l,h]),f.setViewport(0,0,1,1),f.setClearColor(0,0,0,0),f.clear(16384);const c={shader:this.shaders.textureStatisticsStdDev,uniforms:{config:{minTexture:{texture:t,unit:1},maxTexture:{texture:r,unit:2},sumTexture:{texture:s,unit:3},numOfNoDataTexture:{texture:u,unit:4},diffSqTexture:{texture:o,unit:5},numTexels:i*a}},defines:null,optionalAttributes:null,useComputeBuffer:!1};n.submitDrawMesh(f,c,n.quadMesh)}}function g(e,t,r,s,u=1){let o=s.pop();return void 0!==o?o.resize(t,r):o=w(e,t,r,T.FLOAT,c.RGBA32F,u),o}function w(e,t,r,s,u,o=1){if(o<1||o>4)throw new Error("Number of color attachments must be between 1 and 4.");const i=new d(e,C(e,t,r,s,u));for(let a=1;a<o;a++){const o=C(e,t,r,s,u);i.attachColorTexture(o,m+a)}return i}function C(e,t,r,s,u){const o=new b(t,r);return o.samplingMode=9728,o.wrapMode=33071,o.pixelFormat=6408,o.dataType=s,o.internalFormat=u,new p(e,o)}function S(e){const r=t(e),s=r/2;return Math.abs(r-e)<Math.abs(s-e)?r:s}export{F as TextureStatisticsTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{Technique as e}from"../Technique.js";import{getInterpolationDefines as i}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as t}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as o}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as r}from"../shaders/raster/RasterColorizerStretchShader.js";class s extends e{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new t,stretch:new r,shadedRelief:new o}}render(e,i){for(const t of i.bitmaps){if(!t.source||t.suspended)continue;e.timeline.begin(this.name);const{painter:i}=e;i.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),t.updateTexture(e),t.updateProcessedTexture();const{type:o}=t.symbolizerParameters,r="stretch"===o?this._getStretchOptions(t):"lut"===o?this._getLutOptions(t):this._getShadedReliefOptions(t);"bilinear"!==t.interpolation||e.context.capabilities.textureFloatLinear||(r.defines.bilinear=!0),i.submitDrawMesh(e.context,r,i.quadMesh,t),e.timeline.end(this.name)}}_getLutOptions(e){const{config:t,projectionConfig:o,colormapConfig:r,pixelMaskConfig:s,highlightConfig:n,projectionDefines:a}=this._getCommonConfig(e),l=i(e);return{shader:this.shaders.lut,uniforms:{projectionConfig:o,config:t,colormapConfig:r,pixelMaskConfig:s,highlightConfig:n},defines:{...a,...l,applyPixelMask:!!s,applyPixelHighlights:!!n},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e){const t=e.symbolizerParameters,{config:o,projectionConfig:r,colormapConfig:s,pixelMaskConfig:n,highlightConfig:a,projectionDefines:l}=this._getCommonConfig(e),p=i(e);return{shader:this.shaders.stretch,uniforms:{projectionConfig:r,config:o,stretchConfig:t,colormapConfig:s,pixelMaskConfig:n,highlightConfig:a},defines:{...l,...p,isMultiband:t.bandCount>1,applyColormap:!!s,useGamma:t.useGamma,noOp:e.isRendereredSource&&!e.processed,applyPixelMask:!!n,applyPixelHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:o,projectionConfig:r,colormapConfig:s,pixelMaskConfig:n,highlightConfig:a,projectionDefines:l}=this._getCommonConfig(e),p=i(e);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:r,config:o,hillshadeConfig:t,colormapConfig:s,pixelMaskConfig:n,highlightConfig:a},defines:{...l,...p,isMultidirectional:t.hillshadeType>0,applyColormap:!!s,applyPixelMask:!!n,applyPixelHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:i,computedOpacity:t,transforms:o}=e,{names:r,textures:s}=e.getTextures({useProcessedTexture:e.processed}),n=s[r.indexOf("u_image")],a=e.getRasterTextureSize(),l={texture:{texture:n,unit:0},dvsMat3:o.displayViewScreenMat3,coordScale:i,srcImageSize:a,opacity:t},p=s[r.indexOf("u_transformGrid")],{transformGrid:g}=e,f=!(!p||!g),h=f?{transformTexture:{texture:p,unit:2},targetImageSize:[e.width,e.height],transformSpacing:g.spacing,transformGridSize:g.size}:void 0,c=s[r.indexOf("u_colormap")],{colormap:u,colormapOffset:m}=e.symbolizerParameters,d=c&&u?{colormapTexture:{texture:c,unit:1},colormapOffset:m??0,colormapMaxIndex:u.length/4-1}:void 0,C=s[r.indexOf("u_mask")],x=C?{maskTexture:{texture:C,unit:3}}:void 0,{highlightTexture:y}=e;return{config:l,projectionConfig:h,colormapConfig:d,pixelMaskConfig:x,highlightConfig:y?{highlightTexture:{texture:y,unit:4}}:void 0,projectionDefines:{applyProjection:f,lookupProjection:f&&1===g.spacing[0]}}}}export{s as RasterColorizerTechnique};
5
+ import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as s}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as o}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as r}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as n}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as a,PixelType as u}from"../../../../../../webgl/enums.js";import{FramebufferObject as c}from"../../../../../../webgl/FramebufferObject.js";import{Texture as m}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../../../webgl/TextureDescriptor.js";class p extends t{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new o,stretch:new n,shadedRelief:new r},this._mosaicFbo=null,this._statisticsTechnique=null}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,i){const s=i.bitmaps.some(f);s||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));const o=s?this._computeStatisticsTextures(t,i):void 0;for(const e of i.bitmaps){if(!e.source||e.suspended)continue;t.timeline.begin(this.name);const{painter:i}=t;i.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),e.updateTexture(t),e.updateProcessedTexture();const{type:s}=e.symbolizerParameters,r="stretch"===s?this._getStretchOptions(e,o):"lut"===s?this._getLutOptions(e):this._getShadedReliefOptions(e);"bilinear"!==e.interpolation||t.context.capabilities.textureFloatLinear||(r.defines.bilinear=!0),i.submitDrawMesh(t.context,r,i.quadMesh,e),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new i;const s=this._statisticsTechnique;return this._mosaic(e,t),s.render(e,{fbo:this._mosaicFbo}),{minTexture:s.minValuesTexture,maxTexture:s.maxValuesTexture,meanTexture:s.meanValuesTexture,stddevTexture:s.stdDevValuesTexture}}_mosaic(e,t){const{context:i,painter:s}=e,o=i.getBoundFramebufferObject();if(this._mosaicFbo)this._mosaicFbo.resize(o.width,o.height);else{const e=h(i,o.width,o.height);this._mosaicFbo=new c(i,e)}i.bindFramebuffer(this._mosaicFbo);const r="RasterColorizerMosaic";for(const n of t.bitmaps){if(!f(n))continue;e.timeline.begin(r),s.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}});const t=n.interpolation;n.interpolation="nearest",n.updateTexture(e),n.updateProcessedTexture();const i=this._getStretchOptions(n);i.defines.noOp=!0,s.submitDrawMesh(e.context,i,s.quadMesh,n),n.interpolation=t,e.timeline.end(r)}i.bindFramebuffer(o)}_getLutOptions(e){const{config:t,projectionConfig:i,colormapConfig:o,pixelMaskConfig:r,highlightConfig:n,projectionDefines:a}=this._getCommonConfig(e),u=s(e);return{shader:this.shaders.lut,uniforms:{projectionConfig:i,config:t,colormapConfig:o,pixelMaskConfig:r,highlightConfig:n},defines:{...a,...u,applyPixelMask:!!r,applyPixelHighlights:!!n},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t){const i=e.symbolizerParameters,{config:o,projectionConfig:r,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,projectionDefines:c,textureUnit:m}=this._getCommonConfig(e),l=s(e),p=t?{minTexture:{texture:t.minTexture,unit:m},maxTexture:{texture:t.maxTexture,unit:m+1},meanTexture:{texture:t.meanTexture,unit:m+2},stddevTexture:{texture:t.stddevTexture,unit:m+3},numberOfStandardDeviations:i.numberOfStandardDeviations||2}:void 0,h=t?"standardDeviation"===i.stretchType?2:1:0;return{shader:this.shaders.stretch,uniforms:{projectionConfig:r,config:o,stretchConfig:i,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,statisticsConfig:p},defines:{...c,...l,isMultiband:i.bandCount>1,applyColormap:!!n,useGamma:i.useGamma,noOp:e.isRendereredSource&&!e.processed,applyPixelMask:!!a,applyPixelHighlights:!!u,draStretchType:h},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:i,projectionConfig:o,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a,projectionDefines:u}=this._getCommonConfig(e),c=s(e);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:o,config:i,hillshadeConfig:t,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a},defines:{...u,...c,isMultidirectional:t.hillshadeType>0,applyColormap:!!r,applyPixelMask:!!n,applyPixelHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:i,transforms:s}=e,{names:o,textures:r}=e.getTextures({useProcessedTexture:e.processed}),n=r[o.indexOf("u_image")],a=e.getRasterTextureSize();let u=0;const c={texture:{texture:n,unit:u++},dvsMat3:s.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:i},m=r[o.indexOf("u_transformGrid")],{transformGrid:l}=e,p=!(!m||!l),h=p?{transformTexture:{texture:m,unit:u++},targetImageSize:[e.width,e.height],transformSpacing:l.spacing,transformGridSize:l.size}:void 0,f=r[o.indexOf("u_colormap")],{colormap:d,colormapOffset:g}=e.symbolizerParameters,x=f&&d?{colormapTexture:{texture:f,unit:u++},colormapOffset:g??0,colormapMaxIndex:d.length/4-1}:void 0,C=r[o.indexOf("u_mask")],b=C?{maskTexture:{texture:C,unit:u++}}:void 0,{highlightTexture:T}=e;return{config:c,projectionConfig:h,colormapConfig:x,pixelMaskConfig:b,highlightConfig:T?{highlightTexture:{texture:T,unit:u++}}:void 0,projectionDefines:{applyProjection:p,lookupProjection:p&&1===l.spacing[0]},textureUnit:u}}}function h(e,t,i){const s=new l(t,i);return s.internalFormat=a.RGBA32F,s.samplingMode=9728,s.dataType=u.FLOAT,s.wrapMode=33071,new m(e,s)}function f(e){return!e.suspended&&null!=e.source&&!e.isRendereredSource&&"stretch"===e.symbolizerParameters.type&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{p as RasterColorizerTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t,__param as e}from"tslib";import{location as o,uniform as r,input as s,VertexInput as i,UniformGroup as n,GraphShaderModule as p,FragmentOutput as u,FragmentInput as l}from"../../GraphShaderModule.js";import{Vec2 as a,Sampler2D as m,Float as x,Vec4 as c,texture2D as d,texelFetch as f,Int as v,IVec2 as y,step as g}from"../../graph/glsl.js";import{uvToClip as T}from"./utils.js";class w extends i{}t([o(0,a)],w.prototype,"position",void 0);class h extends l{}class b extends n{}t([r(m)],b.prototype,"inputTexture",void 0),t([r(m)],b.prototype,"sumTexture",void 0),t([r(m)],b.prototype,"numOfNoDataTexture",void 0),t([r(x)],b.prototype,"numTexels",void 0);class j extends p{constructor(){super(...arguments),this.type="TextureStatisticsDiffShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new c(T(e),0,1)}}fragment(t){const{inputTexture:e,numOfNoDataTexture:o,sumTexture:r}=this.config,s=new u,i=d(e,t.uv),n=f(r,new y(0,0),new v(0)),p=f(o,new y(0,0),new v(0)).r,l=this.config.numTexels.subtract(p),a=n.divide(l),m=g(i.a,new x(0)),c=new x(1).subtract(m).multiply(i.subtract(a));return s.fragColor=c.multiply(c),s}}t([r(b)],j.prototype,"config",void 0),t([e(0,s(w))],j.prototype,"vertex",null),t([e(0,s(h))],j.prototype,"fragment",null);export{j as TextureStatisticsDiffShader};
5
+ import{__decorate as t,__param as e}from"tslib";import{GraphShaderModule as o,FragmentOutput as r,location as s,uniform as i,input as n,VertexInput as p,UniformGroup as u,FragmentInput as l}from"../../GraphShaderModule.js";import{Vec4 as a,texture2D as m,texelFetch as x,Int as c,IVec2 as d,step as f,Float as v,Vec2 as y,Sampler2D as g}from"../../graph/glsl.js";import{uvToClip as T}from"./utils.js";class w extends p{}t([s(0,y)],w.prototype,"position",void 0);class h extends l{}class b extends u{}t([i(g)],b.prototype,"inputTexture",void 0),t([i(g)],b.prototype,"sumTexture",void 0),t([i(g)],b.prototype,"numOfNoDataTexture",void 0),t([i(v)],b.prototype,"numTexels",void 0);class j extends o{constructor(){super(...arguments),this.type="TextureStatisticsDiffShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new a(T(e),0,1)}}fragment(t){const{inputTexture:e,numOfNoDataTexture:o,sumTexture:s}=this.config,i=new r,n=m(e,t.uv),p=x(s,new d(0,0),new c(0)),u=x(o,new d(0,0),new c(0)).r,l=this.config.numTexels.subtract(u),a=p.divide(l),y=f(n.a,new v(0)),g=new v(1).subtract(y).multiply(n.subtract(a));return i.fragColor=g.multiply(g),i}}t([i(b)],j.prototype,"config",void 0),t([e(0,n(w))],j.prototype,"vertex",null),t([e(0,n(h))],j.prototype,"fragment",null);export{j as TextureStatisticsDiffShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t,__param as e}from"tslib";import{location as n,uniform as o,input as r,VertexInput as a,UniformGroup as i,GraphShaderModule as s,FragmentOutput as d,FragmentInput as u}from"../../GraphShaderModule.js";import{Vec2 as p,Sampler2D as l,Int as w,Vec4 as m,IVec2 as c,texelFetch as y,Float as f,step as x,min as g,max as v}from"../../graph/glsl.js";import{maxRepresentableInt as h}from"./constants.js";import{uvToClip as T,sum4 as D}from"./utils.js";class b extends a{}t([n(0,p)],b.prototype,"position",void 0);class j extends u{}class S extends i{}t([o(l)],S.prototype,"minTexture",void 0),t([o(l)],S.prototype,"maxTexture",void 0),t([o(l)],S.prototype,"sumTexture",void 0),t([o(l)],S.prototype,"numOfNoDataTexture",void 0),t([o(w)],S.prototype,"width",void 0),t([o(w)],S.prototype,"height",void 0),t([o(w)],S.prototype,"isFirstPass",void 0);class F extends s{constructor(){super(...arguments),this.type="TextureStatisticsMinMaxSumShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new m(T(e),0,1)}}fragment(t){const e=new d,{minTexture:n,maxTexture:o,sumTexture:r,numOfNoDataTexture:a}=this.config,i=t.glFragCoord.xy,s=new c(i.multiply(2)),u=new w(0),p=y(n,s,u),l=y(n,s.add(new c(-1,0)),u),x=y(n,s.add(new c(0,-1)),u),g=y(n,s.add(new c(-1,-1)),u),v=M(M(p,M(l,new m(h))),M(x,M(g,new m(h)))),T=y(o,s,u),b=y(o,s.add(new c(-1,0)),u),j=y(o,s.add(new c(0,-1)),u),S=y(o,s.add(new c(-1,-1)),u),F=P(P(T,P(b,new m(-h))),P(j,P(S,new m(-h)))),C=y(r,s,u),G=y(r,s.add(new c(-1,0)),u),k=y(r,s.add(new c(0,-1)),u),q=y(r,s.add(new c(-1,-1)),u),z=D(N(C),N(G),N(k),N(q)),A=y(a,s,u),B=y(a,s.add(new c(-1,0)),u),E=y(a,s.add(new c(0,-1)),u),H=y(a,s.add(new c(-1,-1)),u),I=new f(this.config.isFirstPass),J=D(O(A,I),O(B,I),O(E,I),O(H,I));return e.fragData0=v,e.fragData1=F,e.fragData2=z,e.fragData3=J,e}}function M(t,e){const n=x(t.a,new f(0));return g(t,e).multiply(new f(1).subtract(n)).add(e.multiply(n))}function P(t,e){const n=x(t.a,new f(0));return v(t,e).multiply(new f(1).subtract(n)).add(e.multiply(n))}function N(t){const e=x(t.a,new f(0)),n=new f(1).subtract(e);return t.multiply(n)}function O(t,e){const n=x(t.a,new f(0)),o=new f(1).subtract(e);return e.multiply(n).multiply(new m(1)).add(o.multiply(t))}t([o(S)],F.prototype,"config",void 0),t([e(0,r(b))],F.prototype,"vertex",null),t([e(0,r(j))],F.prototype,"fragment",null);export{F as TextureStatisticsMinMaxSumShader};
5
+ import{__decorate as t,__param as e}from"tslib";import{GraphShaderModule as n,FragmentOutput as o,location as r,uniform as a,input as i,VertexInput as s,UniformGroup as d,FragmentInput as u}from"../../GraphShaderModule.js";import{Vec4 as p,IVec2 as l,Int as w,texelFetch as m,Float as c,step as y,min as f,max as x,Vec2 as g,Sampler2D as v}from"../../graph/glsl.js";import{maxRepresentableInt as h}from"./constants.js";import{uvToClip as T,sum4 as D}from"./utils.js";class b extends s{}t([r(0,g)],b.prototype,"position",void 0);class j extends u{}class S extends d{}t([a(v)],S.prototype,"minTexture",void 0),t([a(v)],S.prototype,"maxTexture",void 0),t([a(v)],S.prototype,"sumTexture",void 0),t([a(v)],S.prototype,"numOfNoDataTexture",void 0),t([a(w)],S.prototype,"width",void 0),t([a(w)],S.prototype,"height",void 0),t([a(w)],S.prototype,"isFirstPass",void 0);class F extends n{constructor(){super(...arguments),this.type="TextureStatisticsMinMaxSumShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new p(T(e),0,1)}}fragment(t){const e=new o,{minTexture:n,maxTexture:r,sumTexture:a,numOfNoDataTexture:i}=this.config,s=t.glFragCoord.xy,d=new l(s.multiply(2)),u=new w(0),y=m(n,d,u),f=m(n,d.add(new l(-1,0)),u),x=m(n,d.add(new l(0,-1)),u),g=m(n,d.add(new l(-1,-1)),u),v=M(M(y,M(f,new p(h))),M(x,M(g,new p(h)))),T=m(r,d,u),b=m(r,d.add(new l(-1,0)),u),j=m(r,d.add(new l(0,-1)),u),S=m(r,d.add(new l(-1,-1)),u),F=P(P(T,P(b,new p(-h))),P(j,P(S,new p(-h)))),C=m(a,d,u),G=m(a,d.add(new l(-1,0)),u),k=m(a,d.add(new l(0,-1)),u),q=m(a,d.add(new l(-1,-1)),u),z=D(N(C),N(G),N(k),N(q)),A=m(i,d,u),B=m(i,d.add(new l(-1,0)),u),E=m(i,d.add(new l(0,-1)),u),H=m(i,d.add(new l(-1,-1)),u),I=new c(this.config.isFirstPass),J=D(O(A,I),O(B,I),O(E,I),O(H,I));return e.fragData0=v,e.fragData1=F,e.fragData2=z,e.fragData3=J,e}}function M(t,e){const n=y(t.a,new c(0));return f(t,e).multiply(new c(1).subtract(n)).add(e.multiply(n))}function P(t,e){const n=y(t.a,new c(0));return x(t,e).multiply(new c(1).subtract(n)).add(e.multiply(n))}function N(t){const e=y(t.a,new c(0)),n=new c(1).subtract(e);return t.multiply(n)}function O(t,e){const n=y(t.a,new c(0)),o=new c(1).subtract(e);return e.multiply(n).multiply(new p(1)).add(o.multiply(t))}t([a(S)],F.prototype,"config",void 0),t([e(0,i(b))],F.prototype,"vertex",null),t([e(0,i(j))],F.prototype,"fragment",null);export{F as TextureStatisticsMinMaxSumShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t,__param as e}from"tslib";import{location as o,uniform as r,input as i,VertexInput as s,UniformGroup as a,GraphShaderModule as p,FragmentOutput as n,FragmentInput as u}from"../../GraphShaderModule.js";import{Vec2 as d,Sampler2D as x,Float as m,Vec4 as f,IVec2 as l,Int as g,texelFetch as v,sqrt as c}from"../../graph/glsl.js";import{uvToClip as T}from"./utils.js";class y extends s{}t([o(0,d)],y.prototype,"position",void 0);class h extends u{}class D extends a{}t([r(x)],D.prototype,"minTexture",void 0),t([r(x)],D.prototype,"maxTexture",void 0),t([r(x)],D.prototype,"sumTexture",void 0),t([r(x)],D.prototype,"numOfNoDataTexture",void 0),t([r(x)],D.prototype,"diffSqTexture",void 0),t([r(m)],D.prototype,"numTexels",void 0);class S extends p{constructor(){super(...arguments),this.type="TextureStatisticsStdDevShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new f(T(e),0,1)}}fragment(t){const e=new n,{minTexture:o,maxTexture:r,numOfNoDataTexture:i,sumTexture:s,diffSqTexture:a}=this.config,p=t.glFragCoord.xy,u=new l(p),d=new g(0),x=v(o,u,d),m=v(r,u,d),f=v(s,u,d),T=v(i,u,d).r,y=v(a,u,d),h=this.config.numTexels.subtract(T),D=f.divide(h),S=y.divide(h),w=c(S);return e.fragData0=x,e.fragData1=m,e.fragData2=D,e.fragData3=w,e}}t([r(D)],S.prototype,"config",void 0),t([e(0,i(y))],S.prototype,"vertex",null),t([e(0,i(h))],S.prototype,"fragment",null);export{S as TextureStatisticsStdDevShader};
5
+ import{__decorate as t,__param as e}from"tslib";import{GraphShaderModule as o,FragmentOutput as r,location as i,uniform as s,input as a,VertexInput as p,UniformGroup as n,FragmentInput as u}from"../../GraphShaderModule.js";import{Vec4 as d,IVec2 as x,Int as m,texelFetch as f,sqrt as l,Vec2 as g,Sampler2D as v,Float as c}from"../../graph/glsl.js";import{uvToClip as T}from"./utils.js";class y extends p{}t([i(0,g)],y.prototype,"position",void 0);class h extends u{}class D extends n{}t([s(v)],D.prototype,"minTexture",void 0),t([s(v)],D.prototype,"maxTexture",void 0),t([s(v)],D.prototype,"sumTexture",void 0),t([s(v)],D.prototype,"numOfNoDataTexture",void 0),t([s(v)],D.prototype,"diffSqTexture",void 0),t([s(c)],D.prototype,"numTexels",void 0);class S extends o{constructor(){super(...arguments),this.type="TextureStatisticsStdDevShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new d(T(e),0,1)}}fragment(t){const e=new r,{minTexture:o,maxTexture:i,numOfNoDataTexture:s,sumTexture:a,diffSqTexture:p}=this.config,n=t.glFragCoord.xy,u=new x(n),d=new m(0),g=f(o,u,d),v=f(i,u,d),c=f(a,u,d),T=f(s,u,d).r,y=f(p,u,d),h=this.config.numTexels.subtract(T),D=c.divide(h),S=y.divide(h),w=l(S);return e.fragData0=g,e.fragData1=v,e.fragData2=D,e.fragData3=w,e}}t([s(D)],S.prototype,"config",void 0),t([e(0,a(y))],S.prototype,"vertex",null),t([e(0,a(h))],S.prototype,"fragment",null);export{S as TextureStatisticsStdDevShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t,__param as e}from"tslib";import{location as o,uniform as r,input as s,VertexInput as a,UniformGroup as n,GraphShaderModule as i,FragmentOutput as p,FragmentInput as d}from"../../GraphShaderModule.js";import{Vec2 as l,Sampler2D as u,Int as f,Vec4 as g,IVec2 as m,texelFetch as c}from"../../graph/glsl.js";import{uvToClip as w,sum4 as x}from"./utils.js";class y extends a{}t([o(0,l)],y.prototype,"position",void 0);class h extends d{}class v extends n{}t([r(u)],v.prototype,"sumTexture",void 0),t([r(f)],v.prototype,"width",void 0),t([r(f)],v.prototype,"height",void 0);class D extends i{constructor(){super(...arguments),this.type="TextureStatisticsSumOfSquaredDiffShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new g(w(e),0,1)}}fragment(t){const e=new p,{sumTexture:o}=this.config,r=t.glFragCoord.xy,s=new m(r.multiply(2)),a=new f(0),n=c(o,s,a),i=c(o,s.add(new m(-1,0)),a),d=c(o,s.add(new m(0,-1)),a),l=c(o,s.add(new m(-1,-1)),a),u=x(n,i,d,l);return e.fragData0=u,e.fragData1=new g(0),e.fragData2=new g(0),e.fragData3=new g(0),e}}t([r(v)],D.prototype,"config",void 0),t([e(0,s(y))],D.prototype,"vertex",null),t([e(0,s(h))],D.prototype,"fragment",null);export{D as TextureStatisticsSumOfSquaredDiffShader};
5
+ import{__decorate as t,__param as e}from"tslib";import{GraphShaderModule as o,FragmentOutput as r,location as s,uniform as a,input as n,VertexInput as i,UniformGroup as p,FragmentInput as d}from"../../GraphShaderModule.js";import{Vec4 as l,IVec2 as u,Int as f,texelFetch as g,Vec2 as m,Sampler2D as c}from"../../graph/glsl.js";import{uvToClip as w,sum4 as x}from"./utils.js";class y extends i{}t([s(0,m)],y.prototype,"position",void 0);class h extends d{}class v extends p{}t([a(c)],v.prototype,"sumTexture",void 0),t([a(f)],v.prototype,"width",void 0),t([a(f)],v.prototype,"height",void 0);class D extends o{constructor(){super(...arguments),this.type="TextureStatisticsSumOfSquaredDiffShader"}vertex(t){const e=t.position;return{uv:e,glPosition:new l(w(e),0,1)}}fragment(t){const e=new r,{sumTexture:o}=this.config,s=t.glFragCoord.xy,a=new u(s.multiply(2)),n=new f(0),i=g(o,a,n),p=g(o,a.add(new u(-1,0)),n),d=g(o,a.add(new u(0,-1)),n),m=g(o,a.add(new u(-1,-1)),n),c=x(i,p,d,m);return e.fragData0=c,e.fragData1=new l(0),e.fragData2=new l(0),e.fragData3=new l(0),e}}t([a(v)],D.prototype,"config",void 0),t([e(0,n(y))],D.prototype,"vertex",null),t([e(0,n(h))],D.prototype,"fragment",null);export{D as TextureStatisticsSumOfSquaredDiffShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import{define as t,uniform as r,option as i}from"../../../GraphShaderModule.js";import{Vec4 as s,Float as e}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as p}from"./BaseRasterColorizerShader.js";import{lookupColor as a,ColormapConfig as m}from"./lut.js";import{stretch as h,StretchConfig as l}from"./stretch.js";class n extends p{constructor(){super(...arguments),this.type="RasterColorizerStretchShader",this.isMultiband=!0,this.applyColormap=!1,this.useGamma=!1,this.noOp=!1}_colorize(o){const t=this._getPixel(o);if(this.noOp)return t;let r=h(t,this.stretchConfig,this.useGamma);if(this.isMultiband)return r;if(r=new s(r.rrr,r.a),this.applyColormap){const o=this.useGamma?255:1;r=a(r,new e(o),this.colormapConfig)}return r}}o([t],n.prototype,"isMultiband",void 0),o([t],n.prototype,"applyColormap",void 0),o([t],n.prototype,"useGamma",void 0),o([t],n.prototype,"noOp",void 0),o([r(l)],n.prototype,"stretchConfig",void 0),o([i(m)],n.prototype,"colormapConfig",void 0);export{n as RasterColorizerStretchShader};
5
+ import{__decorate as t}from"tslib";import{define as o,uniform as r,option as i}from"../../../GraphShaderModule.js";import{Vec4 as s,Float as e}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as p}from"./BaseRasterColorizerShader.js";import{lookupColor as a,ColormapConfig as h}from"./lut.js";import{stretch as m,stretchWithStatisticsTexture as l,StretchConfig as n,StatisticsConfig as d}from"./stretch.js";class c extends p{constructor(){super(...arguments),this.type="RasterColorizerStretchShader",this.isMultiband=!0,this.applyColormap=!1,this.useGamma=!1,this.noOp=!1,this.draStretchType=0}_colorize(t){const o=this._getPixel(t);if(this.noOp)return o;const{draStretchType:r,stretchConfig:i,useGamma:p,statisticsConfig:h}=this;let n=0===r?m(o,i,p):l(o,i,h,p,2===r);if(this.isMultiband)return n;if(n=new s(n.rrr,n.a),this.applyColormap){const t=this.useGamma?255:1;n=a(n,new e(t),this.colormapConfig)}return n}}t([o],c.prototype,"isMultiband",void 0),t([o],c.prototype,"applyColormap",void 0),t([o],c.prototype,"useGamma",void 0),t([o],c.prototype,"noOp",void 0),t([o],c.prototype,"draStretchType",void 0),t([r(n)],c.prototype,"stretchConfig",void 0),t([i(h)],c.prototype,"colormapConfig",void 0),t([i(d)],c.prototype,"statisticsConfig",void 0);export{c as RasterColorizerStretchShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{maxMapSizeGpu as n}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{Vec3 as t,step as e,sign as r,dot as l,Vec4 as o,floor as u,abs as i,Float as s,mix as c}from"../../../../graph/glsl.js";function w(n){const t=r(n),e=n.add(i(t).subtract(1));return t.multiply(t).divide(e)}function a(n){return new o(u(n.rgb.add(.5)),n.a)}function p(n,t){return e(t.x,n).multiply(e(n,t.y))}function d(o,u){let i=new t(0,0,0);const s=new t(o);for(let r=0;r<n/3;r++){const n=6*r,l=new t(u[n],u[n+2],u[n+4]),o=new t(u[n+1],u[n+3],u[n+5]);i=i.add(e(l,s).multiply(e(s,o)))}return r(l(i,new t(1,1,1)))}function f(n,o,u){const i=new t(n);let w=new t(0,0,0),a=new s(0);for(let r=0;r<u/3;r++){const n=9*r,l=new t(o[n],o[n+3],o[n+6]),u=new t(o[n+1],o[n+4],o[n+7]),s=e(l,i).multiply(e(i,u)),p=new t(o[n+2],o[n+5],o[n+8]);a=c(a,p.x,s.x),a=c(a,p.y,s.y),a=c(a,p.z,s.z),w=w.add(s)}return{mapValue:a,includeMask:r(l(w,new t(1,1,1)))}}export{f as computeMapValue,d as computeSingleBandRangeFactor,p as getRangeClipFactor,w as invertValue,a as roundOutput};
5
+ import{maxMapSizeGpu as n}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{Vec3 as t,step as e,sign as r,dot as l,abs as o,Vec4 as u,floor as i,Float as s,mix as c}from"../../../../graph/glsl.js";function w(n){const t=r(n),e=n.add(o(t).subtract(1));return t.multiply(t).divide(e)}function a(n){return new u(i(n.rgb.add(.5)),n.a)}function p(n,t){return e(t.x,n).multiply(e(n,t.y))}function d(o,u){let i=new t(0,0,0);const s=new t(o);for(let r=0;r<n/3;r++){const n=6*r,l=new t(u[n],u[n+2],u[n+4]),o=new t(u[n+1],u[n+3],u[n+5]);i=i.add(e(l,s).multiply(e(s,o)))}return r(l(i,new t(1,1,1)))}function f(n,o,u){const i=new t(n);let w=new t(0,0,0),a=new s(0);for(let r=0;r<u/3;r++){const n=9*r,l=new t(o[n],o[n+3],o[n+6]),u=new t(o[n+1],o[n+4],o[n+7]),s=e(l,i).multiply(e(i,u)),p=new t(o[n+2],o[n+5],o[n+8]);a=c(a,p.x,s.x),a=c(a,p.y,s.y),a=c(a,p.z,s.z),w=w.add(s)}return{mapValue:a,includeMask:r(l(w,new t(1,1,1)))}}export{f as computeMapValue,d as computeSingleBandRangeFactor,p as getRangeClipFactor,w as invertValue,a as roundOutput};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{uniform as o,UniformGroup as i}from"../../../GraphShaderModule.js";import{Vec4 as r,clamp as u,step as m,Float as p,sign as a,Vec3 as e,pow as n}from"../../../graph/glsl.js";import{oneMinus as d}from"../utils.js";class f extends i{}function l(t,o){const{minCutOff:i,maxCutOff:r,factor:m,minOutput:p}=o;return u(t,i,r).subtract(i).multiply(m).add(p)}function s(t,o){const{minCutOff:i,maxCutOff:r,minOutput:f,maxOutput:l,gamma:s,gammaCorrection:c}=o,y=u(t,i,r).subtract(i),v=r.subtract(i),O=y.divide(v),b=m(new p(1),s),g=a(s.subtract(1)),C=l.subtract(f),x=new e(1),h=n(x.divide(C),O.multiply(c)),j=d(b.multiply(g).multiply(h)),w=n(O,x.divide(s)),G=j.multiply(C).multiply(w).add(f);return u(G,f,l)}function c(t,o,i,u=255){const m=i?s(t.rgb,o).divide(u):l(t.rgb,o);return new r(m,t.a)}t([o(p)],f.prototype,"minOutput",void 0),t([o(p)],f.prototype,"maxOutput",void 0),t([o(e)],f.prototype,"minCutOff",void 0),t([o(e)],f.prototype,"maxCutOff",void 0),t([o(e)],f.prototype,"factor",void 0),t([o(e)],f.prototype,"gamma",void 0),t([o(e)],f.prototype,"gammaCorrection",void 0);export{f as StretchConfig,c as stretch};
5
+ import{__decorate as t}from"tslib";import{uniform as r,UniformGroup as o}from"../../../GraphShaderModule.js";import{Vec4 as e,IVec2 as i,Int as u,texelFetch as m,max as p,min as a,Vec3 as n,clamp as d,step as s,Float as f,sign as c,pow as l,Sampler2D as v}from"../../../graph/glsl.js";import{oneMinus as x}from"../utils.js";import{invertValue as y}from"./processor/math.js";class b extends o{}t([r(f)],b.prototype,"minOutput",void 0),t([r(f)],b.prototype,"maxOutput",void 0),t([r(n)],b.prototype,"minCutOff",void 0),t([r(n)],b.prototype,"maxCutOff",void 0),t([r(n)],b.prototype,"factor",void 0),t([r(n)],b.prototype,"gamma",void 0),t([r(n)],b.prototype,"gammaCorrection",void 0);class O extends o{}function g(t,r){const{minCutOff:o,maxCutOff:e,factor:i,minOutput:u}=r;return d(t,o,e).subtract(o).multiply(i).add(u)}function C(t,r){const{minCutOff:o,maxCutOff:e,minOutput:i,maxOutput:u,gamma:m,gammaCorrection:p}=r,a=d(t,o,e).subtract(o),v=e.subtract(o),y=a.divide(v),b=s(new f(1),m),O=c(m.subtract(1)),g=u.subtract(i),C=new n(1),T=l(C.divide(g),y.multiply(p)),w=x(b.multiply(O).multiply(T)),h=l(y,C.divide(m)),j=w.multiply(g).multiply(h).add(i);return d(j,i,u)}function T(t,r,o,i=255){const u=o?C(t.rgb,r).divide(i):g(t.rgb,r);return new e(u,t.a)}function w(t,r,o,d,s){const f=new i(0,0),c=new u(0);let l=m(o.minTexture,f,c).rgb,v=m(o.maxTexture,f,c).rgb;if(s){const t=m(o.meanTexture,f,c).rgb,r=m(o.stddevTexture,f,c).rgb.multiply(o.numberOfStandardDeviations);l=p(l,t.subtract(r)),v=a(v,t.add(r))}const x=v.subtract(l),b=new n(y(x.x),y(x.y),y(x.z)),O=r.maxOutput.subtract(r.minOutput).multiply(b),T={...r,minCutOff:l,maxCutOff:v,factor:O},w=d?C(t.rgb,r).divide(255):g(t.rgb,T);return new e(w,t.a)}t([r(v)],O.prototype,"minTexture",void 0),t([r(v)],O.prototype,"maxTexture",void 0),t([r(v)],O.prototype,"meanTexture",void 0),t([r(v)],O.prototype,"stddevTexture",void 0),t([r(f)],O.prototype,"numberOfStandardDeviations",void 0);export{O as StatisticsConfig,b as StretchConfig,T as stretch,w as stretchWithStatisticsTexture};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{maxHighlightReasons as t}from"../../../definitions.js";import{Float as n,greaterThan as r,float as u,max as c,mod as i,floor as o,vec4 as e,dot as f,vec2 as s,fract as l,sin as a,equal as m,vec3 as p,Vec4 as b,divide as d}from"../../graph/glsl.js";import{nanMagicNumber as y}from"./constants.js";function w(t){const n=u(12.9898),r=u(78.233),c=u(43758.5453),o=f(t,s(n,r)),e=i(o,u(3.14));return l(a(e).multiply(c))}function x(t){return m(t,u(y))}function j(t){return d(t,u(255))}function z(t,n){return t.x.multiply(n.y).subtract(n.x.multiply(t.y))}function g(t){return t.multiply(2).subtract(1)}function v(t){return t.multiply(.5).add(.5)}function h(t,n){const r=u(2**n);return i(o(t.divide(r)),u(2))}function k(t,n){return r(h(t,n),u(.5))}function q(n,r){return h(n,r+t)}function A(t,n){return h(t,n)}function B(t){const n=h(t.z,7),r=u(1).subtract(n),c=t.xyz.subtract(p(0,0,u(128)));return r.multiply(t).add(n.multiply(c))}function C(t){const n=e(255/256,255/65536,255/16777216,255/4294967296);return f(t,n)}function D(t){return c(c(c(t.x,t.y),t.z),t.w)}function E(t){return new n(1).subtract(t)}function F(t){return t.subtract(new n(1))}function G(t){return new n(1).divide(t)}function H(t,r){return new n(t).subtract(r)}function I(t,r){return t.subtract(new n(r))}function J(t,n,r,u){let c=new b(0);const i=new b(0);return c=K(c,t,i),c=K(c,n,i),c=K(c,r,i),c=K(c,u,i),c}function K(t,n,r){const u=n.subtract(r),c=t.add(u);return r=c.subtract(t).subtract(u),c}export{v as clipToUv,z as cross2,h as getBit,k as getBitBool,q as getFilterBit,A as getHighlightBit,x as isNan,K as kahanSummation,D as max4,F as minusOne,I as minusScalar,j as norm,E as oneMinus,G as oneOver,w as rand,C as rgba2float,H as scalarMinus,J as sum4,B as unpackDisplayIdTexel,g as uvToClip};
5
+ import{maxHighlightReasons as t}from"../../../definitions.js";import{Float as n,greaterThan as r,float as u,max as c,mod as i,floor as o,vec4 as e,dot as f,vec2 as s,fract as l,sin as a,equal as m,Vec4 as p,vec3 as b,divide as d}from"../../graph/glsl.js";import{nanMagicNumber as y}from"./constants.js";function w(t){const n=u(12.9898),r=u(78.233),c=u(43758.5453),o=f(t,s(n,r)),e=i(o,u(3.14));return l(a(e).multiply(c))}function x(t){return m(t,u(y))}function j(t){return d(t,u(255))}function z(t,n){return t.x.multiply(n.y).subtract(n.x.multiply(t.y))}function g(t){return t.multiply(2).subtract(1)}function v(t){return t.multiply(.5).add(.5)}function h(t,n){const r=u(2**n);return i(o(t.divide(r)),u(2))}function k(t,n){return r(h(t,n),u(.5))}function q(n,r){return h(n,r+t)}function A(t,n){return h(t,n)}function B(t){const n=h(t.z,7),r=u(1).subtract(n),c=t.xyz.subtract(b(0,0,u(128)));return r.multiply(t).add(n.multiply(c))}function C(t){const n=e(255/256,255/65536,255/16777216,255/4294967296);return f(t,n)}function D(t){return c(c(c(t.x,t.y),t.z),t.w)}function E(t){return new n(1).subtract(t)}function F(t){return t.subtract(new n(1))}function G(t){return new n(1).divide(t)}function H(t,r){return new n(t).subtract(r)}function I(t,r){return t.subtract(new n(r))}function J(t,n,r,u){let c=new p(0);const i=new p(0);return c=K(c,t,i),c=K(c,n,i),c=K(c,r,i),c=K(c,u,i),c}function K(t,n,r){const u=n.subtract(r),c=t.add(u);return r=c.subtract(t).subtract(u),c}export{v as clipToUv,z as cross2,h as getBit,k as getBitBool,q as getFilterBit,A as getHighlightBit,x as isNan,K as kahanSummation,D as max4,F as minusOne,I as minusScalar,j as norm,E as oneMinus,G as oneOver,w as rand,C as rgba2float,H as scalarMinus,J as sum4,B as unpackDisplayIdTexel,g as uvToClip};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{create as i}from"../../../geometry/support/aaBoundingRect.js";import{equals as o}from"../../../geometry/support/spatialReferenceUtils.js";import r from"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import"../tiling/TileQueue.js";import"../tiling/TileStrategy.js";import{LayerView2DMixin as l}from"./LayerView2D.js";import{Display as n}from"./support/Display.js";import a from"../../layers/LayerView.js";import{RefreshableLayerView as p}from"../../layers/RefreshableLayerView.js";const h=new Set,c=[],d=[];class u{constructor(e,t,s,o,r,l,n,a=[0,0],p=i()){this.id=e,this.level=t,this.row=s,this.col=o,this.world=r,this.resolution=l,this.scale=n,this.coords=a,this.bounds=p}}let m=class extends(p(l(a))){constructor(e){super(e),this._tileMap=new Map,this.layer=null,this.tiles=[]}initialize(){this.display=new n(this),this.container.addChild(this.display)}get _tileInfoView(){const e=this.layer?.tileInfo;return e?new r(e):null}attach(){}detach(){}requestRender(){this.display.requestRender()}tilesChanged(e,t){}supportsSpatialReference(e){const t=this.layer?.tileInfo;return!t||o(t.spatialReference,e)}async doRefresh(){}isUpdating(){return!1}update(e){const t=this._tileInfoView,s=this.tiles;if(t){const i=t.getTileCoverage(e.state,0),{spans:o,lodInfo:r}=i??{};if(o?.length&&r)for(const{row:e,colFrom:t,colTo:l}of o)for(let i=t;i<=l;i++){const t=r.normalizeCol(i),o=r.getWorldForColumn(i),l=`${r.level}/${e}/${t}/${o}`;if(!this._tileMap.has(l)){const i=new u(l,r.level,e,t,o,r.resolution,r.scale);r.getTileCoords(i.coords,i,!1),r.getTileBounds(i.bounds,i,!0),this._tileMap.set(l,i),s.push(i),c.push(i)}h.add(l)}}for(let i=s.length-1;i>=0;i--){const e=s[i];h.has(e.id)||(s.splice(i,1),d.push(e),this._tileMap.delete(e.id))}(c.length||d.length)&&(this.tilesChanged(c,d),c.length=d.length=0),h.clear(),this.requestRender()}viewChange(){this.requestUpdate()}moveEnd(){}};e([t()],m.prototype,"_tileInfoView",null),e([t()],m.prototype,"layer",void 0),m=e([s("esri.views.2d.layers.BaseLayerView2D")],m);const f=m;export{f as default};
5
+ import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{create as i}from"../../../geometry/support/aaBoundingRect.js";import{equals as o}from"../../../geometry/support/spatialReferenceUtils.js";import r from"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import"../tiling/TileQueue.js";import"../tiling/TileStrategy.js";import{LayerView2DMixin as l}from"./LayerView2D.js";import{Display as n}from"./support/Display.js";import a from"../../layers/LayerView.js";import{RefreshableLayerView as p}from"../../layers/RefreshableLayerView.js";const h=new Set,c=[],d=[];class u{constructor(e,t,s,o,r,l,n,a=[0,0],p=i()){this.id=e,this.level=t,this.row=s,this.col=o,this.world=r,this.resolution=l,this.scale=n,this.coords=a,this.bounds=p}}let m=class extends(p(l(a))){constructor(e){super(e),this._tileMap=new Map,this.layer=null,this.tiles=[]}initialize(){this.display=new n(this),this.container.addChild(this.display)}get _tileInfoView(){const e=this.layer?.tileInfo;return e?new r(e):null}attach(){}detach(){}requestRender(){this.display.requestRender()}tilesChanged(e,t){}supportsSpatialReference(e){const t=this.layer?.tileInfo;return!t||o(t.spatialReference,e)}async doRefresh(){}isUpdating(){return!1}update(e){const t=this._tileInfoView,s=this.tiles;if(t){const i=t.getTileCoverage(e.state,0),{spans:o,lodInfo:r}=i??{};if(o?.length&&r)for(const{row:e,colFrom:t,colTo:l}of o)for(let i=t;i<=l;i++){const t=r.normalizeCol(i),o=r.getWorldForColumn(i),l=`${r.level}/${e}/${t}/${o}`;if(!this._tileMap.has(l)){const i=new u(l,r.level,e,t,o,r.resolution,r.scale),n=i;r.getTileCoords(n.coords,n,!1),r.getTileBounds(i.bounds,n,!0),this._tileMap.set(l,n),s.push(n),c.push(n)}h.add(l)}}for(let i=s.length-1;i>=0;i--){const e=s[i];h.has(e.id)||(s.splice(i,1),d.push(e),this._tileMap.delete(e.id))}(c.length||d.length)&&(this.tilesChanged(c,d),c.length=d.length=0),h.clear(),this.requestRender()}viewChange(){this.requestUpdate()}moveEnd(){}};e([t()],m.prototype,"_tileInfoView",null),e([t()],m.prototype,"layer",void 0),m=e([s("esri.views.2d.layers.BaseLayerView2D")],m);const f=m;export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{e as r}from"../../../chunks/earcut.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{closeRings as i}from"../../../geometry/support/coordsUtils.js";import{normalizeCentralMeridianForDisplay as n}from"../../../geometry/support/normalizeUtilsSync.js";import{equals as a}from"../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as c,project as l}from"../../../layers/graphics/data/projectionSupport.js";import p from"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import"../tiling/TileQueue.js";import"../tiling/TileStrategy.js";import{thinLineHalfWidthThreshold as f}from"../engine/webgl/definitions.js";import{LineTessellation as h}from"../engine/webgl/TurboLine.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import u from"./support/DisplayGL.js";import{analyzeRings as m}from"./support/util.js";import y from"../../layers/LayerView.js";import{RefreshableLayerView as x}from"../../layers/RefreshableLayerView.js";const g=new Set,v=[],w=[];class T{constructor(e,t,s,r,i,n,a,c=[0,0],l=o()){this.id=e,this.level=t,this.row=s,this.col=r,this.world=i,this.resolution=n,this.scale=a,this.coords=c,this.bounds=l}}let j=class extends(x(d(y))){constructor(e){super(e),this._tileMap=new Map,this.container=new u(this),this.layer=null,this.tiles=[],this._renderTarget={framebuffer:null,viewport:[0,0,0,0]}}get _tileInfoView(){const e=this.layer?.tileInfo;return e?new p(e):null}get context(){return this.view.stage.context.gl}attach(){}detach(){}requestRender(){this.container.requestRender()}tilesChanged(e,t){}supportsSpatialReference(e){const t=this.layer?.tileInfo;return!t||a(t.spatialReference,e)}async doRefresh(){}isUpdating(){return!1}update(e){const t=this._tileInfoView,s=this.tiles;if(t){const r=t.getTileCoverage(e.state,0),o=r?.spans,i=r?.lodInfo;if(o?.length&&i){const e=i.level;for(const{row:t,colFrom:r,colTo:n}of o)for(let o=r;o<=n;o++){const r=i.normalizeCol(o),n=i.getWorldForColumn(o),a=`${e}/${t}/${r}/${n}`;if(!this._tileMap.has(a)){const o=new T(a,e,t,r,n,i.resolution,i.scale);i.getTileCoords(o.coords,o,!1),i.getTileBounds(o.bounds,o,!0),this._tileMap.set(a,o),s.push(o),v.push(o)}g.add(a)}}}for(let r=s.length-1;r>=0;r--){const e=s[r];g.has(e.id)||(s.splice(r,1),w.push(e),this._tileMap.delete(e.id))}(v.length||w.length)&&(this.tilesChanged(v,w),v.length=w.length=0),g.clear(),this.requestRender()}viewChange(){this.requestUpdate()}moveEnd(){}bindRenderTarget(){this.context.bindFramebuffer(this.context.FRAMEBUFFER,this._renderTarget.framebuffer),this.context.viewport(this._renderTarget.viewport[0],this._renderTarget.viewport[1],this._renderTarget.viewport[2],this._renderTarget.viewport[3])}getRenderTarget(){return this._renderTarget}async tessellateExtent(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=t.vertices.length;return t.vertices.push({x:s.xmin,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmax,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmin,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:1,distance:0}),t.vertices.push({x:s.xmax,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:1,distance:0}),t.indices.push(r,r+1,r+2,r+1,r+3,r+2),t}async tessellatePoint(e,t){const s=await this._projectAndNormalizeGeometry(e);return this._tessellatePoints([s],t)}async tessellateMultipoint(e,t){const s=await this._projectAndNormalizeGeometry(e),r=s.points.map(e=>({x:e[0],y:e[1],spatialReference:s.spatialReference}));return this._tessellatePoints(r,t)}async _tessellatePoints(e,t){const s={vertices:[],indices:[]};for(const r of e){const e=s.vertices.length;s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y+t.height,uTexcoord:0,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y+t.height,uTexcoord:1,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y,uTexcoord:0,vTexcoord:1,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y,uTexcoord:1,vTexcoord:1,distance:0}),s.indices.push(e,e+1,e+2,e+1,e+3,e+2)}return s}async tessellatePolyline(e,t){const s={vertices:[],indices:[]},r=(await this._projectAndNormalizeGeometry(e)).paths;if(!r?.length)return s;let o;const i=new h((e,r,i,n,a,c,l,p,f,h,d)=>{const u=s.vertices.length;return s.vertices.push({x:e,y:-r,xOffset:l*t/2,yOffset:p*t/2,uTexcoord:d/o,vTexcoord:(h+1)/2,distance:d}),u},(e,t,r)=>{s.indices.push(e,t,r)},!0);for(const n of r){o=0;for(let t=1;t<n.length;++t){const e=n[t][0]-n[t-1][0],s=n[t][1]-n[t-1][1];o+=Math.sqrt(e*e+s*s)}const e=n.map(e=>({x:e[0],y:-e[1]}));i.tessellate(e,_)}return s}async tessellatePolygon(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=s.rings;if(!r?.length)return t;i(s);for(const i of s.rings)for(const e of i)e[1]=-e[1];let o=1/0,n=1/0,a=-1/0,c=-1/0;return m(s.rings,()=>{},(e,t,s)=>{for(let r=e;r<t;r+=2)o=Math.min(o,s[r]),n=Math.min(n,s[r+1]),a=Math.max(a,s[r]),c=Math.max(c,s[r+1])}),m(s.rings,()=>{},(e,s,r,i)=>{this._invokeEarcut(t,e,s,r,i,[o,n,a,c])}),t}_invokeEarcut(e,t,s,o,i,n){const a=o.slice(t,s),c=r(a,i,2),l=e.vertices.length;for(let r=0;r<a.length;r+=2){const t=a[r],s=a[r+1];e.vertices.push({x:t,y:-s,xOffset:0,yOffset:0,uTexcoord:(t-n[0])/(n[2]-n[0]),vTexcoord:1-(s-n[1])/(n[3]-n[1]),distance:0})}for(let r=0;r<c.length;++r)e.indices.push(l+c[r])}async _projectAndNormalizeGeometry(e){await c(e.spatialReference,this.view.spatialReference);const t=n(e);return l(t,e.spatialReference,this.view.spatialReference)}};e([t()],j.prototype,"_tileInfoView",null),e([t()],j.prototype,"layer",void 0),e([t()],j.prototype,"context",null),j=e([s("esri.views.2d.layers.BaseLayerViewGL2D")],j);const _={pixelCoordRatio:1,wrapDistance:1e11,halfWidth:f+1,initialDistance:0,textured:!0,offset:0},R=j;export{R as default};
5
+ import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{e as r}from"../../../chunks/earcut.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{closeRings as i}from"../../../geometry/support/coordsUtils.js";import{normalizeCentralMeridianForDisplay as n}from"../../../geometry/support/normalizeUtilsSync.js";import{equals as a}from"../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as c,project as l}from"../../../layers/graphics/data/projectionSupport.js";import p from"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import"../tiling/TileQueue.js";import"../tiling/TileStrategy.js";import{thinLineHalfWidthThreshold as f}from"../engine/webgl/definitions.js";import{LineTessellation as h}from"../engine/webgl/TurboLine.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import u from"./support/DisplayGL.js";import{analyzeRings as m}from"./support/util.js";import y from"../../layers/LayerView.js";import{RefreshableLayerView as x}from"../../layers/RefreshableLayerView.js";const g=new Set,v=[],w=[];class T{constructor(e,t,s,r,i,n,a,c=[0,0],l=o()){this.id=e,this.level=t,this.row=s,this.col=r,this.world=i,this.resolution=n,this.scale=a,this.coords=c,this.bounds=l}}let j=class extends(x(d(y))){constructor(e){super(e),this._tileMap=new Map,this.container=new u(this),this.layer=null,this.tiles=[],this._renderTarget={framebuffer:null,viewport:[0,0,0,0]}}get _tileInfoView(){const e=this.layer?.tileInfo;return e?new p(e):null}get context(){return this.view.stage.context.gl}attach(){}detach(){}requestRender(){this.container.requestRender()}tilesChanged(e,t){}supportsSpatialReference(e){const t=this.layer?.tileInfo;return!t||a(t.spatialReference,e)}async doRefresh(){}isUpdating(){return!1}update(e){const t=this._tileInfoView,s=this.tiles;if(t){const r=t.getTileCoverage(e.state,0),o=r?.spans,i=r?.lodInfo;if(o?.length&&i){const e=i.level;for(const{row:t,colFrom:r,colTo:n}of o)for(let o=r;o<=n;o++){const r=i.normalizeCol(o),n=i.getWorldForColumn(o),a=`${e}/${t}/${r}/${n}`;if(!this._tileMap.has(a)){const o=new T(a,e,t,r,n,i.resolution,i.scale),c=o;i.getTileCoords(c.coords,c,!1),i.getTileBounds(o.bounds,c,!0),this._tileMap.set(a,c),s.push(c),v.push(c)}g.add(a)}}}for(let r=s.length-1;r>=0;r--){const e=s[r];g.has(e.id)||(s.splice(r,1),w.push(e),this._tileMap.delete(e.id))}(v.length||w.length)&&(this.tilesChanged(v,w),v.length=w.length=0),g.clear(),this.requestRender()}viewChange(){this.requestUpdate()}moveEnd(){}bindRenderTarget(){this.context.bindFramebuffer(this.context.FRAMEBUFFER,this._renderTarget.framebuffer),this.context.viewport(this._renderTarget.viewport[0],this._renderTarget.viewport[1],this._renderTarget.viewport[2],this._renderTarget.viewport[3])}getRenderTarget(){return this._renderTarget}async tessellateExtent(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=t.vertices.length;return t.vertices.push({x:s.xmin,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmax,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmin,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:1,distance:0}),t.vertices.push({x:s.xmax,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:1,distance:0}),t.indices.push(r,r+1,r+2,r+1,r+3,r+2),t}async tessellatePoint(e,t){const s=await this._projectAndNormalizeGeometry(e);return this._tessellatePoints([s],t)}async tessellateMultipoint(e,t){const s=await this._projectAndNormalizeGeometry(e),r=s.points.map(e=>({x:e[0],y:e[1],spatialReference:s.spatialReference}));return this._tessellatePoints(r,t)}async _tessellatePoints(e,t){const s={vertices:[],indices:[]};for(const r of e){const e=s.vertices.length;s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y+t.height,uTexcoord:0,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y+t.height,uTexcoord:1,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y,uTexcoord:0,vTexcoord:1,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y,uTexcoord:1,vTexcoord:1,distance:0}),s.indices.push(e,e+1,e+2,e+1,e+3,e+2)}return s}async tessellatePolyline(e,t){const s={vertices:[],indices:[]},r=(await this._projectAndNormalizeGeometry(e)).paths;if(!r?.length)return s;let o;const i=new h((e,r,i,n,a,c,l,p,f,h,d)=>{const u=s.vertices.length;return s.vertices.push({x:e,y:-r,xOffset:l*t/2,yOffset:p*t/2,uTexcoord:d/o,vTexcoord:(h+1)/2,distance:d}),u},(e,t,r)=>{s.indices.push(e,t,r)},!0);for(const n of r){o=0;for(let t=1;t<n.length;++t){const e=n[t][0]-n[t-1][0],s=n[t][1]-n[t-1][1];o+=Math.sqrt(e*e+s*s)}const e=n.map(e=>({x:e[0],y:-e[1]}));i.tessellate(e,_)}return s}async tessellatePolygon(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=s.rings;if(!r?.length)return t;i(s);for(const i of s.rings)for(const e of i)e[1]=-e[1];let o=1/0,n=1/0,a=-1/0,c=-1/0;return m(s.rings,()=>{},(e,t,s)=>{for(let r=e;r<t;r+=2)o=Math.min(o,s[r]),n=Math.min(n,s[r+1]),a=Math.max(a,s[r]),c=Math.max(c,s[r+1])}),m(s.rings,()=>{},(e,s,r,i)=>{this._invokeEarcut(t,e,s,r,i,[o,n,a,c])}),t}_invokeEarcut(e,t,s,o,i,n){const a=o.slice(t,s),c=r(a,i,2),l=e.vertices.length;for(let r=0;r<a.length;r+=2){const t=a[r],s=a[r+1];e.vertices.push({x:t,y:-s,xOffset:0,yOffset:0,uTexcoord:(t-n[0])/(n[2]-n[0]),vTexcoord:1-(s-n[1])/(n[3]-n[1]),distance:0})}for(let r=0;r<c.length;++r)e.indices.push(l+c[r])}async _projectAndNormalizeGeometry(e){await c(e.spatialReference,this.view.spatialReference);const t=n(e);return l(t,e.spatialReference,this.view.spatialReference)}};e([t()],j.prototype,"_tileInfoView",null),e([t()],j.prototype,"layer",void 0),e([t()],j.prototype,"context",null),j=e([s("esri.views.2d.layers.BaseLayerViewGL2D")],j);const _={pixelCoordRatio:1,wrapDistance:1e11,halfWidth:f+1,initialDistance:0,textured:!0,offset:0},R=j;export{R as default};