@arcgis/core 4.27.0-rc.3 → 4.27.0-rc.5

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 (650) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0e65e00173b66c7fec2e.js → 09e677ca7532a281d262.js} +1 -1
  3. package/assets/esri/core/workers/chunks/0f51fa430333cf77faf7.js +1 -0
  4. package/assets/esri/core/workers/chunks/{89001ee8d3f69fa03cc1.js → 0f7ddb063ee0664f2fca.js} +1 -1
  5. package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
  6. package/assets/esri/core/workers/chunks/2132edadb75a2c6c216d.js +1 -0
  7. package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
  10. package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
  11. package/assets/esri/core/workers/chunks/{470e34f5c33185919719.js → 4db447d0f1d865ab6c88.js} +1 -1
  12. package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
  13. package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3160af63b860b52db389.js → 6f724f75f85dc3989d60.js} +1 -1
  17. package/assets/esri/core/workers/chunks/85191485a7556d3c99f2.js +1 -0
  18. package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
  19. package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
  20. package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
  21. package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 979d9f37c555df0e8fa6.js} +58 -59
  23. package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
  24. package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
  25. package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
  26. package/assets/esri/core/workers/chunks/{50f910797c17c3028521.js → a49718c74053314ed741.js} +1 -1
  27. package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
  28. package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
  29. package/assets/esri/core/workers/chunks/b3c42e9ba07217a51911.js +1 -0
  30. package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
  31. package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
  32. package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
  33. package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
  34. package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
  35. package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
  36. package/assets/esri/core/workers/chunks/{ff42585e1b1d0c5497af.js → ea16230a0edfc9f756bd.js} +1 -1
  37. package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
  38. package/assets/esri/t9n/common_sv.json +1 -1
  39. package/assets/esri/themes/base/_View.scss +2 -5
  40. package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
  41. package/assets/esri/themes/dark/main.css +1 -1
  42. package/assets/esri/themes/light/main.css +1 -1
  43. package/assets/esri/themes/light/view.css +1 -1
  44. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
  45. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
  46. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
  47. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
  48. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
  49. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
  50. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
  51. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
  52. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
  53. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
  54. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
  55. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
  56. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
  57. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
  58. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
  59. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
  60. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
  61. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
  62. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
  63. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
  64. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
  65. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nb.json +1 -1
  66. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
  67. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
  68. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
  69. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
  70. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
  71. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
  72. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
  73. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
  74. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
  75. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
  76. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
  77. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
  78. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
  79. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
  80. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
  81. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
  82. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
  83. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  84. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  85. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  86. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  87. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  88. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  89. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  90. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  91. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  92. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  93. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  94. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  95. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  96. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  97. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  98. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  99. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  100. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  101. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  102. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  103. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  104. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
  105. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  106. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  107. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  108. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  109. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  110. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  111. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  112. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  113. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  114. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  115. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  116. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  117. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  118. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  119. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  120. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  121. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  122. package/assets/esri/widgets/CoordinateConversion/t9n/CoordinateConversion_ja.json +1 -1
  123. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  124. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  125. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  126. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  127. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  128. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  129. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  130. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  131. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  132. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  133. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  134. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  135. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  136. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  137. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  138. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  139. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  140. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  141. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  142. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  143. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  144. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  145. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  146. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  147. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  148. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  149. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  150. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  151. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  152. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  153. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  154. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  162. package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
  163. package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
  164. package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
  165. package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
  166. package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
  167. package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
  168. package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
  169. package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
  170. package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
  171. package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
  172. package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
  173. package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
  174. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  175. package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
  176. package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
  177. package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
  178. package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
  179. package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
  180. package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
  181. package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
  182. package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
  183. package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
  184. package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
  185. package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
  186. package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
  187. package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
  188. package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
  189. package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
  190. package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
  191. package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
  192. package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
  193. package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
  194. package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
  195. package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
  196. package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
  197. package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
  198. package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
  199. package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
  200. package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
  201. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  202. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  203. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  204. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  205. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  206. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  207. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  208. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  209. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  210. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  211. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  212. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  213. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  214. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  215. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  216. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  217. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  218. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  219. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  220. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  221. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  222. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nb.json +1 -1
  223. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  224. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  225. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  226. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  227. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  228. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  229. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  230. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  231. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  232. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  233. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  234. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  235. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  236. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  237. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  238. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  239. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  240. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ja.json +1 -1
  241. package/assets/esri/widgets/Features/t9n/Features_ar.json +1 -1
  242. package/assets/esri/widgets/Features/t9n/Features_bg.json +1 -1
  243. package/assets/esri/widgets/Features/t9n/Features_bs.json +1 -1
  244. package/assets/esri/widgets/Features/t9n/Features_ca.json +1 -1
  245. package/assets/esri/widgets/Features/t9n/Features_cs.json +1 -1
  246. package/assets/esri/widgets/Features/t9n/Features_da.json +1 -1
  247. package/assets/esri/widgets/Features/t9n/Features_de.json +1 -1
  248. package/assets/esri/widgets/Features/t9n/Features_el.json +1 -1
  249. package/assets/esri/widgets/Features/t9n/Features_es.json +1 -1
  250. package/assets/esri/widgets/Features/t9n/Features_et.json +1 -1
  251. package/assets/esri/widgets/Features/t9n/Features_fi.json +1 -1
  252. package/assets/esri/widgets/Features/t9n/Features_fr.json +1 -1
  253. package/assets/esri/widgets/Features/t9n/Features_he.json +1 -1
  254. package/assets/esri/widgets/Features/t9n/Features_hr.json +1 -1
  255. package/assets/esri/widgets/Features/t9n/Features_hu.json +1 -1
  256. package/assets/esri/widgets/Features/t9n/Features_id.json +1 -1
  257. package/assets/esri/widgets/Features/t9n/Features_it.json +1 -1
  258. package/assets/esri/widgets/Features/t9n/Features_ja.json +1 -1
  259. package/assets/esri/widgets/Features/t9n/Features_ko.json +1 -1
  260. package/assets/esri/widgets/Features/t9n/Features_lt.json +1 -1
  261. package/assets/esri/widgets/Features/t9n/Features_lv.json +1 -1
  262. package/assets/esri/widgets/Features/t9n/Features_nb.json +1 -1
  263. package/assets/esri/widgets/Features/t9n/Features_nl.json +1 -1
  264. package/assets/esri/widgets/Features/t9n/Features_pl.json +1 -1
  265. package/assets/esri/widgets/Features/t9n/Features_pt-BR.json +1 -1
  266. package/assets/esri/widgets/Features/t9n/Features_pt-PT.json +1 -1
  267. package/assets/esri/widgets/Features/t9n/Features_ro.json +1 -1
  268. package/assets/esri/widgets/Features/t9n/Features_ru.json +1 -1
  269. package/assets/esri/widgets/Features/t9n/Features_sk.json +1 -1
  270. package/assets/esri/widgets/Features/t9n/Features_sl.json +1 -1
  271. package/assets/esri/widgets/Features/t9n/Features_sr.json +1 -1
  272. package/assets/esri/widgets/Features/t9n/Features_sv.json +1 -1
  273. package/assets/esri/widgets/Features/t9n/Features_th.json +1 -1
  274. package/assets/esri/widgets/Features/t9n/Features_tr.json +1 -1
  275. package/assets/esri/widgets/Features/t9n/Features_uk.json +1 -1
  276. package/assets/esri/widgets/Features/t9n/Features_vi.json +1 -1
  277. package/assets/esri/widgets/Features/t9n/Features_zh-CN.json +1 -1
  278. package/assets/esri/widgets/Features/t9n/Features_zh-HK.json +1 -1
  279. package/assets/esri/widgets/Features/t9n/Features_zh-TW.json +1 -1
  280. package/assets/esri/widgets/Legend/t9n/Legend_ar.json +1 -1
  281. package/assets/esri/widgets/Legend/t9n/Legend_bg.json +1 -1
  282. package/assets/esri/widgets/Legend/t9n/Legend_bs.json +1 -1
  283. package/assets/esri/widgets/Legend/t9n/Legend_ca.json +1 -1
  284. package/assets/esri/widgets/Legend/t9n/Legend_cs.json +1 -1
  285. package/assets/esri/widgets/Legend/t9n/Legend_da.json +1 -1
  286. package/assets/esri/widgets/Legend/t9n/Legend_de.json +1 -1
  287. package/assets/esri/widgets/Legend/t9n/Legend_el.json +1 -1
  288. package/assets/esri/widgets/Legend/t9n/Legend_es.json +1 -1
  289. package/assets/esri/widgets/Legend/t9n/Legend_et.json +1 -1
  290. package/assets/esri/widgets/Legend/t9n/Legend_fi.json +1 -1
  291. package/assets/esri/widgets/Legend/t9n/Legend_fr.json +1 -1
  292. package/assets/esri/widgets/Legend/t9n/Legend_he.json +1 -1
  293. package/assets/esri/widgets/Legend/t9n/Legend_hr.json +1 -1
  294. package/assets/esri/widgets/Legend/t9n/Legend_hu.json +1 -1
  295. package/assets/esri/widgets/Legend/t9n/Legend_id.json +1 -1
  296. package/assets/esri/widgets/Legend/t9n/Legend_it.json +1 -1
  297. package/assets/esri/widgets/Legend/t9n/Legend_ja.json +1 -1
  298. package/assets/esri/widgets/Legend/t9n/Legend_ko.json +1 -1
  299. package/assets/esri/widgets/Legend/t9n/Legend_lt.json +1 -1
  300. package/assets/esri/widgets/Legend/t9n/Legend_lv.json +1 -1
  301. package/assets/esri/widgets/Legend/t9n/Legend_nb.json +1 -1
  302. package/assets/esri/widgets/Legend/t9n/Legend_nl.json +1 -1
  303. package/assets/esri/widgets/Legend/t9n/Legend_pl.json +1 -1
  304. package/assets/esri/widgets/Legend/t9n/Legend_pt-BR.json +1 -1
  305. package/assets/esri/widgets/Legend/t9n/Legend_pt-PT.json +1 -1
  306. package/assets/esri/widgets/Legend/t9n/Legend_ro.json +1 -1
  307. package/assets/esri/widgets/Legend/t9n/Legend_ru.json +1 -1
  308. package/assets/esri/widgets/Legend/t9n/Legend_sk.json +1 -1
  309. package/assets/esri/widgets/Legend/t9n/Legend_sl.json +1 -1
  310. package/assets/esri/widgets/Legend/t9n/Legend_sr.json +1 -1
  311. package/assets/esri/widgets/Legend/t9n/Legend_sv.json +1 -1
  312. package/assets/esri/widgets/Legend/t9n/Legend_th.json +1 -1
  313. package/assets/esri/widgets/Legend/t9n/Legend_tr.json +1 -1
  314. package/assets/esri/widgets/Legend/t9n/Legend_uk.json +1 -1
  315. package/assets/esri/widgets/Legend/t9n/Legend_vi.json +1 -1
  316. package/assets/esri/widgets/Legend/t9n/Legend_zh-CN.json +1 -1
  317. package/assets/esri/widgets/Legend/t9n/Legend_zh-HK.json +1 -1
  318. package/assets/esri/widgets/Legend/t9n/Legend_zh-TW.json +1 -1
  319. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  320. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  321. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  322. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  323. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  324. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  325. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  326. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  327. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  328. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  329. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  330. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  331. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  332. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  333. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  334. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  335. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  336. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  337. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  338. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  339. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  340. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nb.json +1 -1
  341. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  342. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  343. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  344. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  345. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  346. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  347. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  348. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  349. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  350. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  351. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  352. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  353. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  354. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  355. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  356. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  357. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  358. package/assets/esri/widgets/Popup/t9n/Popup_ar.json +1 -1
  359. package/assets/esri/widgets/Popup/t9n/Popup_bg.json +1 -1
  360. package/assets/esri/widgets/Popup/t9n/Popup_bs.json +1 -1
  361. package/assets/esri/widgets/Popup/t9n/Popup_ca.json +1 -1
  362. package/assets/esri/widgets/Popup/t9n/Popup_cs.json +1 -1
  363. package/assets/esri/widgets/Popup/t9n/Popup_da.json +1 -1
  364. package/assets/esri/widgets/Popup/t9n/Popup_de.json +1 -1
  365. package/assets/esri/widgets/Popup/t9n/Popup_el.json +1 -1
  366. package/assets/esri/widgets/Popup/t9n/Popup_es.json +1 -1
  367. package/assets/esri/widgets/Popup/t9n/Popup_et.json +1 -1
  368. package/assets/esri/widgets/Popup/t9n/Popup_fi.json +1 -1
  369. package/assets/esri/widgets/Popup/t9n/Popup_fr.json +1 -1
  370. package/assets/esri/widgets/Popup/t9n/Popup_he.json +1 -1
  371. package/assets/esri/widgets/Popup/t9n/Popup_hr.json +1 -1
  372. package/assets/esri/widgets/Popup/t9n/Popup_hu.json +1 -1
  373. package/assets/esri/widgets/Popup/t9n/Popup_id.json +1 -1
  374. package/assets/esri/widgets/Popup/t9n/Popup_it.json +1 -1
  375. package/assets/esri/widgets/Popup/t9n/Popup_ja.json +1 -1
  376. package/assets/esri/widgets/Popup/t9n/Popup_ko.json +1 -1
  377. package/assets/esri/widgets/Popup/t9n/Popup_lt.json +1 -1
  378. package/assets/esri/widgets/Popup/t9n/Popup_lv.json +1 -1
  379. package/assets/esri/widgets/Popup/t9n/Popup_nb.json +1 -1
  380. package/assets/esri/widgets/Popup/t9n/Popup_nl.json +1 -1
  381. package/assets/esri/widgets/Popup/t9n/Popup_pl.json +1 -1
  382. package/assets/esri/widgets/Popup/t9n/Popup_pt-BR.json +1 -1
  383. package/assets/esri/widgets/Popup/t9n/Popup_pt-PT.json +1 -1
  384. package/assets/esri/widgets/Popup/t9n/Popup_ro.json +1 -1
  385. package/assets/esri/widgets/Popup/t9n/Popup_ru.json +1 -1
  386. package/assets/esri/widgets/Popup/t9n/Popup_sk.json +1 -1
  387. package/assets/esri/widgets/Popup/t9n/Popup_sl.json +1 -1
  388. package/assets/esri/widgets/Popup/t9n/Popup_sr.json +1 -1
  389. package/assets/esri/widgets/Popup/t9n/Popup_sv.json +1 -1
  390. package/assets/esri/widgets/Popup/t9n/Popup_th.json +1 -1
  391. package/assets/esri/widgets/Popup/t9n/Popup_tr.json +1 -1
  392. package/assets/esri/widgets/Popup/t9n/Popup_uk.json +1 -1
  393. package/assets/esri/widgets/Popup/t9n/Popup_vi.json +1 -1
  394. package/assets/esri/widgets/Popup/t9n/Popup_zh-CN.json +1 -1
  395. package/assets/esri/widgets/Popup/t9n/Popup_zh-HK.json +1 -1
  396. package/assets/esri/widgets/Popup/t9n/Popup_zh-TW.json +1 -1
  397. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  398. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  399. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  400. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  401. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  402. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  403. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  404. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  405. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  406. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  407. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  408. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  409. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  410. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  411. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  412. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  413. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  414. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  415. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  416. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  417. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  418. package/assets/esri/widgets/Sketch/t9n/Sketch_nb.json +1 -1
  419. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  420. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  421. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  422. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  423. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  424. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  425. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  426. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  427. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  428. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  429. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  430. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  431. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  432. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  433. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  434. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  435. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  436. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  437. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  438. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  439. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  440. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  441. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  442. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  443. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  444. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  445. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  446. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  447. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  448. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  449. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  450. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  451. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  452. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  453. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  454. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  455. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  456. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  457. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
  458. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  459. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  460. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  461. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  462. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  463. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  464. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  465. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  466. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  467. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  468. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  469. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  470. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  471. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  472. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  473. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  474. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  475. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ar.json +1 -1
  476. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bg.json +1 -1
  477. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bs.json +1 -1
  478. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ca.json +1 -1
  479. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_cs.json +1 -1
  480. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_da.json +1 -1
  481. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_de.json +1 -1
  482. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_el.json +1 -1
  483. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_es.json +1 -1
  484. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_et.json +1 -1
  485. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fi.json +1 -1
  486. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fr.json +1 -1
  487. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_he.json +1 -1
  488. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hr.json +1 -1
  489. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hu.json +1 -1
  490. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_id.json +1 -1
  491. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_it.json +1 -1
  492. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ja.json +1 -1
  493. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ko.json +1 -1
  494. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lt.json +1 -1
  495. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lv.json +1 -1
  496. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nb.json +1 -1
  497. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nl.json +1 -1
  498. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pl.json +1 -1
  499. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-BR.json +1 -1
  500. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-PT.json +1 -1
  501. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ro.json +1 -1
  502. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ru.json +1 -1
  503. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sk.json +1 -1
  504. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sl.json +1 -1
  505. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sr.json +1 -1
  506. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sv.json +1 -1
  507. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_th.json +1 -1
  508. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_tr.json +1 -1
  509. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_uk.json +1 -1
  510. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_vi.json +1 -1
  511. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-CN.json +1 -1
  512. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-HK.json +1 -1
  513. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-TW.json +1 -1
  514. package/chunks/AtmosphereCompositing.glsl.js +9 -5
  515. package/chunks/ChapmanAtmosphere.glsl.js +6 -6
  516. package/chunks/DefaultMaterial.glsl.js +42 -42
  517. package/chunks/Fog.glsl.js +2 -2
  518. package/chunks/Terrain.glsl.js +7 -7
  519. package/chunks/vec2.js +1 -1
  520. package/copyright.txt +1 -1
  521. package/core/fontUtils.js +1 -1
  522. package/core/libs/gl-matrix-2/math/vec2.js +1 -1
  523. package/core/libs/gl-matrix-2/vec2.js +1 -1
  524. package/core/workers/workers.js +1 -1
  525. package/geometry/Mesh.js +1 -1
  526. package/geometry/support/meshUtils/bounds.js +1 -1
  527. package/geometry/support/meshUtils/georeference.js +1 -1
  528. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  529. package/interfaces.d.ts +738 -131
  530. package/kernel.js +1 -1
  531. package/layers/OrientedImageryLayer.js +1 -1
  532. package/layers/SceneLayer.js +1 -1
  533. package/layers/VideoLayer.js +1 -1
  534. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  535. package/layers/graphics/editingSupport.js +1 -1
  536. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  537. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  538. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  539. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  540. package/layers/mixins/ArcGISImageService.js +1 -1
  541. package/layers/mixins/ImageryTileMixin.js +1 -1
  542. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  543. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  544. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  545. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  546. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  547. package/layers/support/SubtypeSublayer.js +1 -1
  548. package/layers/support/capabilities.js +1 -1
  549. package/layers/support/layerUtils.js +1 -1
  550. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  551. package/layers/video/VideoCameraSensorModel.js +5 -0
  552. package/layers/video/VideoController.js +1 -1
  553. package/layers/video/videoUtils.js +1 -1
  554. package/networks/support/TraceJobInfo.d.ts +4 -0
  555. package/package.json +1 -1
  556. package/portal/PortalItem.js +1 -1
  557. package/renderers/support/colorRampUtils.js +1 -1
  558. package/rest/support/meshFeatureSet.js +1 -1
  559. package/smartMapping/labels/bins.d.ts +4 -0
  560. package/smartMapping/labels/bins.js +5 -0
  561. package/smartMapping/labels/clusters.js +1 -1
  562. package/smartMapping/labels/support/utils.js +5 -0
  563. package/smartMapping/support/binningUtils.js +1 -1
  564. package/support/revision.js +1 -1
  565. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  566. package/symbols/cim/CIMSymbolHelper.js +1 -1
  567. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  568. package/symbols/support/previewCIMSymbol.js +1 -1
  569. package/views/2d/MapViewConstraints.js +1 -1
  570. package/views/2d/layers/features/schemaUtils.js +1 -1
  571. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  572. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  573. package/views/3d/layers/I3SMeshView3D.js +1 -1
  574. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  575. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  576. package/views/3d/layers/SceneLayerWorker.js +1 -1
  577. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  578. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  579. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
  580. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  581. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  582. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  583. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  584. package/views/3d/layers/i3s/featureEditing.js +1 -1
  585. package/views/3d/support/engineContent/line.js +1 -1
  586. package/views/3d/terrain/TerrainRenderer.js +1 -1
  587. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
  588. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +3 -3
  589. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  590. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  591. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  592. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  593. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  594. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  595. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  596. package/views/DOMContainer.js +1 -1
  597. package/views/PopupView.js +1 -1
  598. package/views/interactive/editGeometry/operations/ScaleVertex.js +1 -1
  599. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  600. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  601. package/views/support/geometry2dUtils.js +1 -1
  602. package/views/support/geometry3dUtils.js +1 -1
  603. package/views/ui/DefaultUI.js +1 -1
  604. package/views/ui/UI.js +1 -1
  605. package/widgets/BasemapGallery.js +1 -1
  606. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  607. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  608. package/widgets/Editor/EditorViewModel.js +1 -1
  609. package/widgets/Editor/UpdateWorkflow.js +1 -1
  610. package/widgets/Editor/workflowUtils.js +1 -1
  611. package/widgets/Editor.js +1 -1
  612. package/widgets/Feature/FeatureMedia.js +1 -1
  613. package/widgets/Feature/support/featureUtils.js +1 -1
  614. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  615. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  616. package/widgets/FeatureForm.js +1 -1
  617. package/widgets/FeatureTemplates/ItemList.js +1 -1
  618. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  619. package/widgets/OrientedImageryViewer.js +1 -1
  620. package/widgets/Popup.js +1 -1
  621. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  622. package/widgets/UtilityNetworkTrace.js +1 -1
  623. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  624. package/widgets/support/chartUtils.js +1 -1
  625. package/widgets/support/chartUtilsAm5.js +1 -1
  626. package/assets/esri/core/workers/chunks/013de5c2955801b329b3.js +0 -1
  627. package/assets/esri/core/workers/chunks/030b43764f945cb1f8b0.js +0 -1
  628. package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
  629. package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +0 -1
  630. package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +0 -1
  631. package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +0 -1
  632. package/assets/esri/core/workers/chunks/2faa8f08f2fdaac3f4af.js +0 -1
  633. package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
  634. package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
  635. package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
  636. package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +0 -1
  637. package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
  638. package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
  639. package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +0 -1
  640. package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
  641. package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +0 -1
  642. package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
  643. package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
  644. package/assets/esri/core/workers/chunks/f6e68befe2812b90b40d.js +0 -1
  645. package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
  646. package/layers/orientedImagery/core/Affixes.js +0 -5
  647. package/layers/orientedImagery/core/CameraProperties.js +0 -5
  648. package/layers/orientedImagery/core/ImageProperties.js +0 -5
  649. package/layers/orientedImagery/core/ImageryTypes.js +0 -5
  650. package/layers/orientedImagery/core/imageryUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{formatDate as r,formatTimestamp as n,formatTimeOnly as i,formatDateOnly as o,convertDateFormatToIntlOptions as a}from"../../../intl/date.js";import{formatNumber as l,convertNumberFormatToIntlOptions as u}from"../../../intl/number.js";import{isRasterPixelValueField as s,featureHasFields as f}from"../../../layers/support/fieldUtils.js";import{isFeatureLayer as c,getEffectiveLayerCapabilities as d}from"../../../layers/support/layerUtils.js";import p from"../../../popup/support/FieldInfoFormat.js";import{loadArcade as y}from"../../../support/arcadeOnDemand.js";const m="esri.widgets.Feature.support.featureUtils",g=e.getLogger(m),h=/href=(""|'')/gi,I=/(\{([^\{\r\n]+)\})/g,b=/\'/g,F=/^\s*expression\//i,w=/(\n)/gi,N=/[\u00A0-\u9999<>\&]/gim,j=/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi,E=/^(?:mailto:|tel:)/,T="relationships/",x=a("short-date-short-time");function C(e){if(null!=e)return e.get("sourceLayer")||e.get("layer")}async function q(e,t){return"function"==typeof e?e(t):e}function A(e=""){if(e)return!E.test(e.trim().toLowerCase())}function M(e){return!!e&&F.test(e)}function R(e,t){if(!M(t)||!e)return null;const r=t.replace(F,"").toLowerCase();let n=null;return e.some((e=>e.name.toLowerCase()===r&&(n=e,!0))),n}function L(e,t){const r=R(t,e?.fieldName);return r?r.title||null:e?e.label||e.fieldName:null}function D(e,t){const r=t.get(e.toLowerCase());return`{${r&&r.fieldName||e}}`}function v(e){return e.replaceAll(h,"")}function U(e,t){const r=O(t,e);return r?r.name:e}function $(e,t){return e&&e.map((e=>U(e,t)))}function O(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function S(e){return`${e}`.trim()}function G({attributes:e,globalAttributes:t,layer:r,text:n,expressionAttributes:i,fieldInfoMap:o}){return n?k({formattedAttributes:t,template:H(n,{...t,...i,...e},r),fieldInfoMap:o}):""}function k({formattedAttributes:e,template:r,fieldInfoMap:n}){return S(v(t(t(r,(e=>D(e,n))),e)))}function P(e,t,r=!1){const n=t[e];if("string"==typeof n){const i="%27",o=(r?encodeURIComponent(n):n).replaceAll(b,i);t[e]=o}}function Q(e,t=!1){const r={...e};return Object.keys(r).forEach((e=>P(e,r,t))),r}function _(e,r,n){const i=(r=S(r))&&"{"!==r[0];return t(e,Q(n,i||!1))}function z(e,t){return e.replaceAll(I,((e,r,n)=>{const i=O(t,n);return i?`{${i.name}}`:r}))}function H(e,t,r){const n=z(e,r);return n?n.replaceAll(j,((e,r,n)=>_(e,r||n,t))):n}function V(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){const t=Number(e);if(!isNaN(t))return t}return e}function Z(e){return null!=e&&"object"==typeof e&&"layer"in e&&!!e.layer}function B(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-image"===e.type}function J(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&"feature"===e.type&&"when"in e}function K(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function W(e){return J(e)&&K(e)}function X(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&W(e.sourceLayer)}function Y(e,t){const{fieldInfos:r,fieldName:n,preventPlacesFormatting:i,layer:o}=t,a=ee(r,n),f=a?.clone(),d=O(o,n);if(f&&!s(n)){const t=d?.type;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t){const r=f.format??new p;if(r.dateFormat??="date-only"===t?"short-date":"short-date-short-time","number"==typeof e){const t=!Z(o)&&c(o)&&o.datesInUnknownTimezone||Z(o)&&B(o.layer)&&o.layer.datesInUnknownTimezone;return r.formatDate(e,t)}switch(t){case"date-only":return r.formatDateOnly(e);case"time-only":return r.formatTimeOnly(e);case"timestamp-offset":return r.formatTimestamp(e)}}}const y=f?.format;return"string"==typeof e&&s(n)&&y?y.formatRasterPixelValue(e):"string"==typeof(e=V(e,y))||null==e||null==y?le(e):i?l(e,{...u(y),minimumFractionDigits:0,maximumFractionDigits:20}):y.formatNumber(e)}function ee(e,t){if(e&&e.length&&t)return e.find((e=>e.fieldName?.toLowerCase()===t.toLowerCase()))}function te({fieldName:e,graphic:t,layer:r}){if(pe(e))return null;if(!r||"function"!=typeof r.getFeatureType)return null;const{typeIdField:n}=r;if(!n||e!==n)return null;const i=r.getFeatureType(t);return i?i.name:null}function re({fieldName:e,value:t,graphic:r,layer:n}){if(pe(e))return null;if(!n||"function"!=typeof n.getFieldDomain)return null;const i=r&&n.getFieldDomain(e,{feature:r});return i&&"coded-value"===i.type?i.getName(t):null}function ne(e,t){const{creatorField:n,creationDateField:i,editorField:o,editDateField:a}=e;if(!t)return;const l=t[a];if("number"==typeof l){const e=t[o];return{type:"edit",date:r(l,x),user:e}}const u=t[i];if("number"==typeof u){const e=t[n];return{type:"create",date:r(u,x),user:e}}return null}function ie(e,t){const r=new Map;return e?(e.forEach((e=>{const n=U(e.fieldName,t);e.fieldName=n,r.set(n.toLowerCase(),e)})),r):r}function oe(e){const t=[];if(!e)return t;const{fieldInfos:r,content:n}=e;return r&&t.push(...r),n&&Array.isArray(n)?(n.forEach((e=>{if("fields"===e.type){const r=e&&e.fieldInfos;r&&t.push(...r)}})),t):t}function ae(e){return e.replaceAll(N,(e=>`&#${e.charCodeAt(0)};`))}function le(e){return"string"==typeof e?e.replaceAll(w,'<br class="esri-text-new-line" />'):e}function ue(e){const{value:t,fieldName:a,fieldInfos:l,fieldInfoMap:u,layer:s,graphic:f}=e;if(null==t)return"";const c=re({fieldName:a,value:t,graphic:f,layer:s});if(c)return c;const d=te({fieldName:a,graphic:f,layer:s});if(d)return d;if(u.get(a.toLowerCase()))return Y(t,{fieldInfos:l||Array.from(u.values()),fieldName:a,layer:s});switch(s?.fieldsIndex?.get(a)?.type){case"date":return r(t);case"date-only":return o(t);case"time-only":return i(t);case"timestamp-offset":return n(t)}return le(t)}function se({fieldInfos:e,attributes:t,layer:r,graphic:n,fieldInfoMap:i,relatedInfos:o}){const a={};return o?.forEach((t=>ge({attributes:a,relatedInfo:t,fieldInfoMap:i,fieldInfos:e,layer:r}))),t&&Object.keys(t).forEach((o=>{const l=t[o];a[o]=ue({fieldName:o,fieldInfos:e,fieldInfoMap:i,layer:r,value:l,graphic:n})})),a}async function fe(e,t){const{layer:r,graphic:n,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:r,graphic:n,objectId:u,requiredFields:i};return g.warn(e,t),null}if(!d(r)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:r,graphic:n,requiredFields:i,returnGeometry:a};return g.warn(e,t),null}const s=r.createQuery();s.objectIds=o,s.outFields=i?.length?i:[r.objectIdField],s.returnGeometry=!!a,s.returnZ=!!a,s.returnM=!!a,s.outSpatialReference=l;return(await r.queryFeatures(s,t)).features[0]}async function ce(e){if(!e.expressionInfos?.length)return!1;const t=await y(),{arcadeUtils:{hasGeometryFunctions:r}}=t;return r(e)}async function de({graphic:e,popupTemplate:t,layer:r,spatialReference:n},i){if(!r||!t)return;if("function"==typeof r.load&&await r.load(i),!e.attributes)return;const o=e.attributes[r.objectIdField];if(null==o)return;const a=[o],l=await t.getRequiredFields(r.fieldsIndex),u=f(l,e),s=u?[]:l,c=t.returnGeometry||await ce(t);if(u&&!c)return;const d=await fe({layer:r,graphic:e,outFields:s,objectIds:a,returnGeometry:c,spatialReference:n},i);d&&(d.geometry&&(e.geometry=d.geometry),d.attributes&&(e.attributes={...e.attributes,...d.attributes}))}function pe(e=""){return!!e&&e.includes(T)}function ye(e){return e?`${T}${e.layerId}/${e.fieldName}`:""}function me({attributes:e,graphic:t,relatedInfo:r,fieldInfos:n,fieldInfoMap:i,layer:o}){e&&t&&r&&Object.keys(t.attributes).forEach((a=>{const l=ye({layerId:r.relation.id.toString(),fieldName:a}),u=t.attributes[a];e[l]=ue({fieldName:l,fieldInfos:n,fieldInfoMap:i,layer:o,value:u,graphic:t})}))}function ge({attributes:e,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i}){e&&t&&(t.relatedFeatures&&t.relatedFeatures&&t.relatedFeatures.forEach((o=>me({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i}))),t.relatedStatsFeatures&&t.relatedStatsFeatures&&t.relatedStatsFeatures.forEach((o=>me({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i}))))}const he=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},Ie=({layer:e,method:t,query:r,definitionExpression:n})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=r.where?r.where:null,o=null!=r.geometry?r.geometry:null;he(n)||he(i)||"extent"===o?.type||"tile"===r.resultType||(r.cacheHint=!0)},be=({query:e,layer:t,method:r})=>{Ie({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression}`})},Fe=({queryPayload:e,layer:t,method:r})=>{Ie({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression}`})};function we(e,t,r){return e&&t&&r?Ne(e.allLayers,t,r)||Ne(e.allTables,t,r):null}function Ne(e,t,r){return e.filter(W).find((e=>e!==t&&e.url===t.url&&e.layerId===r.relatedTableId))}export{le as applyTextFormattingHTML,ie as createfieldInfoMap,we as findRelatedLayer,z as fixTokens,se as formatAttributes,ne as formatEditInfo,Y as formatValueToFieldInfo,oe as getAllFieldInfos,ee as getFieldInfo,L as getFieldInfoLabel,U as getFixedFieldName,$ as getFixedFieldNames,C as getSourceLayer,q as graphicCallback,ae as htmlEntities,M as isExpressionField,J as isFeatureSupportedLayer,X as isGraphicForRelatableFeatureSupportedLayer,W as isRelatableFeatureSupportedLayer,K as isRelatableLayer,pe as isRelatedField,be as preLayerQueryCallback,Fe as preRequestCallback,fe as querySourceLayer,de as queryUpdatedFeature,A as shouldOpenInNewTab,k as substituteAttributes,G as substituteFieldsInLinksAndAttributes};
5
+ import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{formatDate as r,formatTimestamp as n,formatTimeOnly as i,formatDateOnly as o,convertDateFormatToIntlOptions as a}from"../../../intl/date.js";import{formatNumber as l,convertNumberFormatToIntlOptions as u}from"../../../intl/number.js";import{isRasterPixelValueField as s,featureHasFields as f}from"../../../layers/support/fieldUtils.js";import{isFeatureLayer as c,getEffectiveLayerCapabilities as d}from"../../../layers/support/layerUtils.js";import p from"../../../popup/support/FieldInfoFormat.js";import{loadArcade as y}from"../../../support/arcadeOnDemand.js";const m="esri.widgets.Feature.support.featureUtils",g=e.getLogger(m),h=/href=(""|'')/gi,I=/(\{([^\{\r\n]+)\})/g,b=/\'/g,F=/^\s*expression\//i,w=/(\n)/gi,N=/[\u00A0-\u9999<>\&]/gim,j=/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi,E=/^(?:mailto:|tel:)/,T="relationships/",x=a("short-date-short-time");function C(e){if(null!=e)return e.get("sourceLayer")||e.get("layer")}async function q(e,t){return"function"==typeof e?e(t):e}function A(e=""){if(e)return!E.test(e.trim().toLowerCase())}function M(e){return!!e&&F.test(e)}function R(e,t){if(!M(t)||!e)return null;const r=t.replace(F,"").toLowerCase();let n=null;return e.some((e=>e.name.toLowerCase()===r&&(n=e,!0))),n}function L(e,t){const r=R(t,e?.fieldName);return r?r.title||null:e?e.label||e.fieldName:null}function D(e,t){const r=t.get(e.toLowerCase());return`{${r&&r.fieldName||e}}`}function v(e){return e.replaceAll(h,"")}function U(e,t){const r=O(t,e);return r?r.name:e}function $(e,t){return e&&e.map((e=>U(e,t)))}function O(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function S(e){return`${e}`.trim()}function G({attributes:e,globalAttributes:t,layer:r,text:n,expressionAttributes:i,fieldInfoMap:o}){return n?k({formattedAttributes:t,template:H(n,{...t,...i,...e},r),fieldInfoMap:o}):""}function k({formattedAttributes:e,template:r,fieldInfoMap:n}){return S(v(t(t(r,(e=>D(e,n))),e)))}function P(e,t,r=!1){const n=t[e];if("string"==typeof n){const i="%27",o=(r?encodeURIComponent(n):n).replaceAll(b,i);t[e]=o}}function Q(e,t=!1){const r={...e};return Object.keys(r).forEach((e=>P(e,r,t))),r}function _(e,r,n){const i=(r=S(r))&&"{"!==r[0];return t(e,Q(n,i||!1))}function z(e,t){return e.replaceAll(I,((e,r,n)=>{const i=O(t,n);return i?`{${i.name}}`:r}))}function H(e,t,r){const n=z(e,r);return n?n.replaceAll(j,((e,r,n)=>_(e,r||n,t))):n}function V(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){const t=Number(e);if(!isNaN(t))return t}return e}function Z(e){return null!=e&&"object"==typeof e&&"layer"in e&&!!e.layer}function B(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-image"===e.type}function J(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&"feature"===e.type&&"when"in e}function K(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function W(e){return J(e)&&K(e)}function X(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&W(e.sourceLayer)}function Y(e,t){const{fieldInfos:r,fieldName:n,preventPlacesFormatting:i,layer:o}=t,a=ee(r,n),f=a?.clone(),d=O(o,n);if(f&&!s(n)){const t=d?.type;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||f.format?.dateFormat){const r=f.format??new p;if(r.dateFormat??="date-only"===t?"short-date":"short-date-short-time","number"==typeof e){const t=!Z(o)&&c(o)&&o.datesInUnknownTimezone||Z(o)&&B(o.layer)&&o.layer.datesInUnknownTimezone;return r.formatDate(e,t)}switch(t){case"date-only":return r.formatDateOnly(e);case"time-only":return r.formatTimeOnly(e);case"timestamp-offset":return r.formatTimestamp(e)}}}const y=f?.format;return"string"==typeof e&&s(n)&&y?y.formatRasterPixelValue(e):"string"==typeof(e=V(e,y))||null==e||null==y?le(e):i?l(e,{...u(y),minimumFractionDigits:0,maximumFractionDigits:20}):y.formatNumber(e)}function ee(e,t){if(e&&e.length&&t)return e.find((e=>e.fieldName?.toLowerCase()===t.toLowerCase()))}function te({fieldName:e,graphic:t,layer:r}){if(pe(e))return null;if(!r||"function"!=typeof r.getFeatureType)return null;const{typeIdField:n}=r;if(!n||e!==n)return null;const i=r.getFeatureType(t);return i?i.name:null}function re({fieldName:e,value:t,graphic:r,layer:n}){if(pe(e))return null;if(!n||"function"!=typeof n.getFieldDomain)return null;const i=r&&n.getFieldDomain(e,{feature:r});return i&&"coded-value"===i.type?i.getName(t):null}function ne(e,t){const{creatorField:n,creationDateField:i,editorField:o,editDateField:a}=e;if(!t)return;const l=t[a];if("number"==typeof l){const e=t[o];return{type:"edit",date:r(l,x),user:e}}const u=t[i];if("number"==typeof u){const e=t[n];return{type:"create",date:r(u,x),user:e}}return null}function ie(e,t){const r=new Map;return e?(e.forEach((e=>{const n=U(e.fieldName,t);e.fieldName=n,r.set(n.toLowerCase(),e)})),r):r}function oe(e){const t=[];if(!e)return t;const{fieldInfos:r,content:n}=e;return r&&t.push(...r),n&&Array.isArray(n)?(n.forEach((e=>{if("fields"===e.type){const r=e&&e.fieldInfos;r&&t.push(...r)}})),t):t}function ae(e){return e.replaceAll(N,(e=>`&#${e.charCodeAt(0)};`))}function le(e){return"string"==typeof e?e.replaceAll(w,'<br class="esri-text-new-line" />'):e}function ue(e){const{value:t,fieldName:a,fieldInfos:l,fieldInfoMap:u,layer:s,graphic:f}=e;if(null==t)return"";const c=re({fieldName:a,value:t,graphic:f,layer:s});if(c)return c;const d=te({fieldName:a,graphic:f,layer:s});if(d)return d;if(u.get(a.toLowerCase()))return Y(t,{fieldInfos:l||Array.from(u.values()),fieldName:a,layer:s});switch(s?.fieldsIndex?.get(a)?.type){case"date":return r(t);case"date-only":return o(t);case"time-only":return i(t);case"timestamp-offset":return n(t)}return le(t)}function se({fieldInfos:e,attributes:t,layer:r,graphic:n,fieldInfoMap:i,relatedInfos:o}){const a={};return o?.forEach((t=>ge({attributes:a,relatedInfo:t,fieldInfoMap:i,fieldInfos:e,layer:r}))),t&&Object.keys(t).forEach((o=>{const l=t[o];a[o]=ue({fieldName:o,fieldInfos:e,fieldInfoMap:i,layer:r,value:l,graphic:n})})),a}async function fe(e,t){const{layer:r,graphic:n,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:r,graphic:n,objectId:u,requiredFields:i};return g.warn(e,t),null}if(!d(r)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:r,graphic:n,requiredFields:i,returnGeometry:a};return g.warn(e,t),null}const s=r.createQuery();s.objectIds=o,s.outFields=i?.length?i:[r.objectIdField],s.returnGeometry=!!a,s.returnZ=!!a,s.returnM=!!a,s.outSpatialReference=l;return(await r.queryFeatures(s,t)).features[0]}async function ce(e){if(!e.expressionInfos?.length)return!1;const t=await y(),{arcadeUtils:{hasGeometryFunctions:r}}=t;return r(e)}async function de({graphic:e,popupTemplate:t,layer:r,spatialReference:n},i){if(!r||!t)return;if("function"==typeof r.load&&await r.load(i),!e.attributes)return;const o=e.attributes[r.objectIdField];if(null==o)return;const a=[o],l=await t.getRequiredFields(r.fieldsIndex),u=f(l,e),s=u?[]:l,c=t.returnGeometry||await ce(t);if(u&&!c)return;const d=await fe({layer:r,graphic:e,outFields:s,objectIds:a,returnGeometry:c,spatialReference:n},i);d&&(d.geometry&&(e.geometry=d.geometry),d.attributes&&(e.attributes={...e.attributes,...d.attributes}))}function pe(e=""){return!!e&&e.includes(T)}function ye(e){return e?`${T}${e.layerId}/${e.fieldName}`:""}function me({attributes:e,graphic:t,relatedInfo:r,fieldInfos:n,fieldInfoMap:i,layer:o}){e&&t&&r&&Object.keys(t.attributes).forEach((a=>{const l=ye({layerId:r.relation.id.toString(),fieldName:a}),u=t.attributes[a];e[l]=ue({fieldName:l,fieldInfos:n,fieldInfoMap:i,layer:o,value:u,graphic:t})}))}function ge({attributes:e,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i}){e&&t&&(t.relatedFeatures&&t.relatedFeatures&&t.relatedFeatures.forEach((o=>me({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i}))),t.relatedStatsFeatures&&t.relatedStatsFeatures&&t.relatedStatsFeatures.forEach((o=>me({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i}))))}const he=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},Ie=({layer:e,method:t,query:r,definitionExpression:n})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=r.where?r.where:null,o=null!=r.geometry?r.geometry:null;he(n)||he(i)||"extent"===o?.type||"tile"===r.resultType||(r.cacheHint=!0)},be=({query:e,layer:t,method:r})=>{Ie({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression}`})},Fe=({queryPayload:e,layer:t,method:r})=>{Ie({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression}`})};function we(e,t,r){return e&&t&&r?Ne(e.allLayers,t,r)||Ne(e.allTables,t,r):null}function Ne(e,t,r){return e.filter(W).find((e=>e!==t&&e.url===t.url&&e.layerId===r.relatedTableId))}export{le as applyTextFormattingHTML,ie as createfieldInfoMap,we as findRelatedLayer,z as fixTokens,se as formatAttributes,ne as formatEditInfo,Y as formatValueToFieldInfo,oe as getAllFieldInfos,ee as getFieldInfo,L as getFieldInfoLabel,U as getFixedFieldName,$ as getFixedFieldNames,C as getSourceLayer,q as graphicCallback,ae as htmlEntities,M as isExpressionField,J as isFeatureSupportedLayer,X as isGraphicForRelatableFeatureSupportedLayer,W as isRelatableFeatureSupportedLayer,K as isRelatableLayer,pe as isRelatedField,be as preLayerQueryCallback,Fe as preRequestCallback,fe as querySourceLayer,de as queryUpdatedFeature,A as shouldOpenInNewTab,k as substituteAttributes,G as substituteFieldsInLinksAndAttributes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{getOrCreateMapValue as s}from"../../core/MapUtils.js";import{isAbortError as r,createResolver as o}from"../../core/promiseUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";const i="#JSAPI_FORM_EXPRESSIONS_MANAGER_GEOMETRY",l="esri.widgets.FeatureForm.FormExpressionsManager";let c=class extends t{constructor(e){super(e),this._fieldReferencesLookup=new Map,this._fieldsAffectedLookup=new Map,this._latestFieldValues={...e.feature.attributes}}initialize(){this._dependencyGraph=this._buildDependencyGraph()}get _baseContext(){const{editType:e,layer:t,map:s,originalFeature:r,spatialReference:o}=this.arcadeContextInfo,a="feature"===t?.type?t:"scene"===t?.type&&null!=t.associatedLayer?t.associatedLayer:void 0;return[{$originalfeature:r,$editcontext:{editType:e},$layer:a,$featureset:a,$datastore:t?.url,$map:s},{spatialReference:o??void 0}]}set feature(e){this._latestFieldValues={...e?.attributes},this._set("feature",e)}evaluateAll(){return this._evaluate(this.executors)}evaluateExpressions(e){return this._evaluate(e)}evaluateInvalidated(e){const{_fieldReferencesLookup:t,_latestFieldValues:s,feature:r}=this,o=new Set;for(const a of e)if(s[a]=r.getAttribute(a),t.has(a))for(const e of t.get(a))o.add(e);return this._evaluate([...o])}async evaluateInvalidatedByGeometry(){if(this._fieldReferencesLookup.has(i))return this._evaluate([...this._fieldReferencesLookup.get(i)])}resetExecutors(){for(const e of this.executors)e.reset()}_buildDependencyGraph(){const{_fieldReferencesLookup:e,_fieldsAffectedLookup:t,executors:r}=this,o=new Map(this.fieldInputs.map((e=>[e.name,e]))),a=new Map(r.map((e=>[e,new Array])));for(const n of r){for(const r of n.fieldsUsed){s(e,r,(()=>new Set)).add(n);const i=o.get(r),{valueExpressionExecutor:l,editableExpressionExecutor:c}=i;if(null!=l&&l!==n){a.get(l).push(n);s(t,l,(()=>new Set)).add(i)}if(null!=c&&c!==n){a.get(c).push(n);s(t,c,(()=>new Set)).add(i)}}if(n.geometryUsed){s(e,i,(()=>new Set)).add(n)}}return a}async _evaluate(e){const t=new Map,{_dependencyGraph:s,_fieldsAffectedLookup:o,_latestFieldValues:a}=this;for(const r of e)u(r,t,s);for(const[i,{resolver:l,dependencyPromises:c}]of t){Promise.all(c).then((async()=>{const[e,t]=this._makeContext(a);return i.executeAsync(e,t)})).then((()=>{if(o.has(i))for(const e of o.get(i))this._latestFieldValues[e.name]=e.value;l.resolve()}),(e=>{!e||r(e)||p(e)||i.markStale(),l.reject(e)}))}const n=(await Promise.allSettled(Array.from(t.values(),(({resolver:e})=>e.promise)))).filter((e=>"rejected"===e.status&&!(r(e.reason)||p(e.reason))));if(n.length>0)throw new AggregateError(n,"One or more expression executions failed")}_makeContext(e){const[t,s]=this._baseContext,r=this.feature.clone();return r.attributes=e,[{...t,$feature:r},s]}};e([a()],c.prototype,"_baseContext",null),e([a()],c.prototype,"feature",null),e([a()],c.prototype,"executors",void 0),e([a()],c.prototype,"fieldInputs",void 0),e([a()],c.prototype,"arcadeContextInfo",void 0),c=e([n(l)],c);const u=(e,t,s)=>{if(t.has(e))return;const r=o();t.set(e,{resolver:r,dependencyPromises:[]}),e.abort();const a=s.get(e);for(const o of a)u(o,t,s),t.get(o).dependencyPromises.push(r.promise)},p=e=>e&&"object"==typeof e&&"message"in e&&"Cancelled"===e.message;export{c as FormExpressionsManager};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{getOrCreateMapValue as s}from"../../core/MapUtils.js";import{isAbortError as r,createResolver as o}from"../../core/promiseUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";const i="#JSAPI_FORM_EXPRESSIONS_MANAGER_GEOMETRY",l="esri.widgets.FeatureForm.FormExpressionsManager";let c=class extends t{constructor(e){super(e),this._fieldReferencesLookup=new Map,this._fieldsAffectedLookup=new Map,this._latestFieldValues={...e.feature.attributes}}initialize(){this._dependencyGraph=this._buildDependencyGraph()}get _baseContext(){const{editType:e,layer:t,map:s,originalFeature:r,spatialReference:o}=this.arcadeContextInfo,a="feature"===t?.type?t:"scene"===t?.type&&null!=t.associatedLayer?t.associatedLayer:void 0;return[{$originalfeature:r,$editcontext:{editType:e},$layer:a,$featureset:a,$datastore:t?.url,$map:s},{spatialReference:o??void 0}]}set feature(e){this._latestFieldValues={...e?.attributes},this._set("feature",e)}evaluateAll(){return this._evaluate(this.executors)}evaluateExpressions(e){return this._evaluate(e)}evaluateInvalidated(e){const{_fieldReferencesLookup:t,_latestFieldValues:s,feature:r}=this,o=new Set;for(const a of e)if(s[a]=r.getAttribute(a),t.has(a))for(const e of t.get(a))o.add(e);return this._evaluate([...o])}async evaluateInvalidatedByGeometry(){if(this._fieldReferencesLookup.has(i))return this._evaluate([...this._fieldReferencesLookup.get(i)])}resetExecutors(){for(const e of this.executors)e.reset()}_buildDependencyGraph(){const{_fieldReferencesLookup:e,_fieldsAffectedLookup:t,executors:r}=this,o=new Map(this.fieldInputs.map((e=>[e.name,e]))),a=new Map(r.map((e=>[e,new Array])));for(const n of r){for(const r of n.fieldsUsed){s(e,r,(()=>new Set)).add(n);const i=o.get(r),l=i?.valueExpressionExecutor,c=i?.editableExpressionExecutor;if(null!=l&&l!==n){a.get(l).push(n);s(t,l,(()=>new Set)).add(i)}if(null!=c&&c!==n){a.get(c).push(n);s(t,c,(()=>new Set)).add(i)}}if(n.geometryUsed){s(e,i,(()=>new Set)).add(n)}}return a}async _evaluate(e){const t=new Map,{_dependencyGraph:s,_fieldsAffectedLookup:o,_latestFieldValues:a}=this;for(const r of e)u(r,t,s);for(const[i,{resolver:l,dependencyPromises:c}]of t){Promise.all(c).then((async()=>{const[e,t]=this._makeContext(a);return i.executeAsync(e,t)})).then((()=>{if(o.has(i))for(const e of o.get(i))this._latestFieldValues[e.name]=e.value;l.resolve()}),(e=>{!e||r(e)||p(e)||i.markStale(),l.reject(e)}))}const n=(await Promise.allSettled(Array.from(t.values(),(({resolver:e})=>e.promise)))).filter((e=>"rejected"===e.status&&!(r(e.reason)||p(e.reason))));if(n.length>0)throw new AggregateError(n,"One or more expression executions failed")}_makeContext(e){const[t,s]=this._baseContext,r=this.feature.clone();return r.attributes=e,[{...t,$feature:r},s]}};e([a()],c.prototype,"_baseContext",null),e([a()],c.prototype,"feature",null),e([a()],c.prototype,"executors",void 0),e([a()],c.prototype,"fieldInputs",void 0),e([a()],c.prototype,"arcadeContextInfo",void 0),c=e([n(l)],c);const u=(e,t,s)=>{if(t.has(e))return;const r=o();t.set(e,{resolver:r,dependencyPromises:[]}),e.abort();const a=s.get(e);for(const o of a)u(o,t,s),t.get(o).dependencyPromises.push(r.promise)},p=e=>e&&"object"==typeof e&&"message"in e&&"Cancelled"===e.message;export{c as FormExpressionsManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{watch as t,initial as r}from"../../core/reactiveUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import i from"../Feature/FeatureRelationship/FeatureRelationshipViewModel.js";import{isRelatableFeatureSupportedLayer as l}from"../Feature/support/featureUtils.js";import a from"./EditableInput.js";const n=3;let p=class extends a{constructor(e){super(e),this._relationshipVM=null,this.group=null,this.type="relationship",this.handles.add([t((()=>({feature:this.feature,element:this.element,layer:this.layer})),(e=>this._createRelationshipVM(e)),r)])}destroy(){this._relationshipVM?.destroy()}get canAddRelatedFeature(){const{editable:e,featureCount:t,_relationshipVM:r}=this;if(!r?.relationship||!this.loaded)return!1;const{cardinality:s,role:o}=r.relationship;return!("one-to-one"===s&&t>0)&&("many-to-many"!==s&&(!("one-to-many"===s&&"destination"===o&&t>0)&&e))}get displayCount(){return this.element.displayCount??n}get displayType(){return this.element.displayType}get editable(){return!!this.layerAllowsEdits&&(this.evaluatedEditableExpression??!0)}get featureCount(){return this._relationshipVM?.featureCount??0}get map(){return this._get("map")}set map(e){e&&this._relationshipVM?.set("map",e),this._set("map",e)}get orderByFields(){return this.element.orderByFields}get relationshipId(){return this.element.relationshipId}get relatedFeatureInfos(){return this._relationshipVM?.relatedFeatureInfos??[]}get relatedLayer(){return this._relationshipVM?.relatedLayer}get showAllEnabled(){return this._get("showAllEnabled")}set showAllEnabled(e){this._relationshipVM?.set("showAllEnabled",e),this._set("showAllEnabled",e)}get showAllActionVisible(){return!this.showAllEnabled&&this.featureCount>0&&this.featureCount>this.displayCount}get updating(){return"loading"===this._relationshipVM?.state||"querying"===this._relationshipVM?.state}get loaded(){return"ready"===this._relationshipVM?.state}incrementPage(){this._relationshipVM&&this._relationshipVM.featurePage++}getRelatedFeatureByObjectId(e){return this._relationshipVM?.getRelatedFeatureByObjectId(e)}_createRelationshipVM(e){const{feature:t,element:r,layer:s}=e;if(this._relationshipVM?.destroy(),!t||!r||!s)return;const{displayCount:o,map:a,orderByFields:n,relationshipId:p,showAllEnabled:u}=this;l(s)&&(this._relationshipVM=new i({graphic:t,displayCount:o,layer:s,map:a,orderByFields:n,relationshipId:p,showAllEnabled:u}))}};e([s()],p.prototype,"canAddRelatedFeature",null),e([s()],p.prototype,"displayCount",null),e([s()],p.prototype,"displayType",null),e([s()],p.prototype,"editable",null),e([s()],p.prototype,"group",void 0),e([s()],p.prototype,"map",null),e([s()],p.prototype,"orderByFields",null),e([s()],p.prototype,"relationshipId",null),e([s()],p.prototype,"relatedFeatureInfos",null),e([s()],p.prototype,"relatedLayer",null),e([s()],p.prototype,"showAllEnabled",null),e([s()],p.prototype,"showAllActionVisible",null),e([s({readOnly:!0})],p.prototype,"type",void 0),e([s()],p.prototype,"updating",null),e([s()],p.prototype,"incrementPage",null),e([s()],p.prototype,"getRelatedFeatureByObjectId",null),p=e([o("esri.widgets.FeatureForm.RelationshipInput")],p);const u=p;export{u as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{watch as t,initial as r}from"../../core/reactiveUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{isTable as o}from"../../layers/support/layerUtils.js";import l from"../Feature/FeatureRelationship/FeatureRelationshipViewModel.js";import{isRelatableFeatureSupportedLayer as a}from"../Feature/support/featureUtils.js";import n from"./EditableInput.js";const p=3;let u=class extends n{constructor(e){super(e),this._relationshipVM=null,this.group=null,this.type="relationship",this.handles.add([t((()=>({feature:this.feature,element:this.element,layer:this.layer})),(e=>this._createRelationshipVM(e)),r)])}destroy(){this._relationshipVM?.destroy()}get canAddRelatedFeature(){const{editable:e,featureCount:t,_relationshipVM:r}=this;if(!r?.relationship||!this.loaded)return!1;const{cardinality:s,role:i}=r.relationship;return!("one-to-one"===s&&t>0)&&("many-to-many"!==s&&(!("one-to-many"===s&&"destination"===i&&t>0)&&e))}get displayCount(){return this.element.displayCount??p}get displayType(){return this.element.displayType}get editable(){if(!this.layerAllowsEdits)return!1;const{_relationshipVM:e,relatedLayer:t}=this;if(!e?.relationship)return!1;const{cardinality:r}=e.relationship;return"many-to-many"!==r&&(!(t&&!o(t))&&(this.evaluatedEditableExpression??!0))}get featureCount(){return this._relationshipVM?.featureCount??0}get map(){return this._get("map")}set map(e){e&&this._relationshipVM?.set("map",e),this._set("map",e)}get orderByFields(){return this.element.orderByFields}get relationshipId(){return this.element.relationshipId}get relatedFeatureInfos(){return this._relationshipVM?.relatedFeatureInfos??[]}get relatedLayer(){return this._relationshipVM?.relatedLayer}get showAllEnabled(){return this._get("showAllEnabled")}set showAllEnabled(e){this._relationshipVM?.set("showAllEnabled",e),this._set("showAllEnabled",e)}get showAllActionVisible(){return!this.showAllEnabled&&this.featureCount>0&&this.featureCount>this.displayCount}get updating(){return"loading"===this._relationshipVM?.state||"querying"===this._relationshipVM?.state}get loaded(){return"ready"===this._relationshipVM?.state}incrementPage(){this._relationshipVM&&this._relationshipVM.featurePage++}getRelatedFeatureByObjectId(e){return this._relationshipVM?.getRelatedFeatureByObjectId(e)}_createRelationshipVM(e){const{feature:t,element:r,layer:s}=e;if(this._relationshipVM?.destroy(),!t||!r||!s)return;const{displayCount:i,map:o,orderByFields:n,relationshipId:p,showAllEnabled:u}=this;a(s)&&(this._relationshipVM=new l({graphic:t,displayCount:i,layer:s,map:o,orderByFields:n,relationshipId:p,showAllEnabled:u}))}};e([s()],u.prototype,"canAddRelatedFeature",null),e([s()],u.prototype,"displayCount",null),e([s()],u.prototype,"displayType",null),e([s()],u.prototype,"editable",null),e([s()],u.prototype,"group",void 0),e([s()],u.prototype,"map",null),e([s()],u.prototype,"orderByFields",null),e([s()],u.prototype,"relationshipId",null),e([s()],u.prototype,"relatedFeatureInfos",null),e([s()],u.prototype,"relatedLayer",null),e([s()],u.prototype,"showAllEnabled",null),e([s()],u.prototype,"showAllActionVisible",null),e([s({readOnly:!0})],u.prototype,"type",void 0),e([s()],u.prototype,"updating",null),e([s()],u.prototype,"incrementPage",null),e([s()],u.prototype,"getRelatedFeatureByObjectId",null),u=e([i("esri.widgets.FeatureForm.RelationshipInput")],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.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{neverReached as i}from"../core/compilerUtils.js";import{deprecatedProperty as s}from"../core/deprecate.js";import a from"../core/Logger.js";import{watch as l}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import{CSS as d}from"./FeatureForm/css.js";import{isGroupInput as u,isFieldInput as c,isRelationshipInput as p,isInputInGroupInput as m,isFieldElementWithInputType as h,formatDateFieldValue as v,getErrorMessageForFieldInput as _,getIconForFeature as b,isNumberFieldInput as g}from"./FeatureForm/featureFormUtils.js";import f from"./FeatureForm/FeatureFormViewModel.js";import{loadCalciteComponents as I}from"./support/componentsUtils.js";import{Heading as F,incrementHeadingLevel as y}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as w}from"./support/decorators/messageBundle.js";import{vmEvent as R}from"./support/decorators/vmEvent.js";import{tsx as C}from"./support/jsxFactory.js";import{DateTime as M}from"luxon";import{substitute as V}from"../intl/substitute.js";import{getLocale as D}from"../intl/locale.js";const k="TT",O="data-field-name",T="latn",x=e=>"valueAsDate"in e,N="esri.widgets.FeatureForm",L=a.getLogger(N);let j=class extends o{constructor(e,t){super(e,t),this._dateFieldInputMap=new Map,this._activeInputName="",this._activeNumberFieldEdit=null,this._fieldFocusNeeded=!1,this._fieldToInitialIncompatibleDomainValue=new Map,this._switchFieldsWithInitialIncompatibleValue=new Set,this._userUpdatedFieldInputNames=new Set,this._listObserverNode=null,this._listObserver=new IntersectionObserver((e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()}),{root:window.document}),this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new f,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,relatedRecordCallbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t)=>{const{feature:i,relatedRecordCallbacks:s}=this;i&&s?.addRelatedRecord&&s.addRelatedRecord({parentFeature:i,relatedLayer:t,relationshipId:e})},this._handleInputInput=e=>{this._commitInputValue(e.currentTarget)},this._handleFormKeyDown=this._handleFormKeyDown.bind(this),this._handleInputBlur=this._handleInputBlur.bind(this),this._handleInputFocus=this._handleInputFocus.bind(this),this._handleNumberInputMouseDown=this._handleNumberInputMouseDown.bind(this),this._handleInputKeyDown=this._handleInputKeyDown.bind(this),this._handleOptionChange=this._handleOptionChange.bind(this),this._handleGroupClick=this._handleGroupClick.bind(this),this._handleSubmit=this._handleSubmit.bind(this),this._afterInputCreateOrUpdate=this._afterInputCreateOrUpdate.bind(this),this._afterDateInputCreateOrUpdate=this._afterDateInputCreateOrUpdate.bind(this)}initialize(){this.addHandles([l((()=>this.feature),(()=>{const e=this._getFocusableInput("forward");this._activeInputName=e?.name||"",this._userUpdatedFieldInputNames.clear(),this._fieldToInitialIncompatibleDomainValue.clear(),this._switchFieldsWithInitialIncompatibleValue.clear(),this._dateFieldInputMap.clear(),this._fieldFocusNeeded=!0})),this.on("submit",(e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach((e=>this._userUpdatedFieldInputNames.add(e))),this._activeInputName=t,this._fieldFocusNeeded=!0,this.scheduleRender()}})),l((()=>[this.viewModel.activeRelationshipInput,this._listObserverNode]),(()=>this._onObserverChange()))])}loadDependencies(){return I({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker.js"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message.js"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress.js"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch.js")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const e=this.relatedRecordCallbacks;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get relatedRecordCallbacks(){return this.viewModel.relatedRecordCallbacks}set relatedRecordCallbacks(e){this.viewModel.relatedRecordCallbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get view(){return s(L,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view}set view(e){s(L,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view=e}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return C("div",{class:this.classes(d.base,d.widget,d.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return C("form",{class:d.form,novalidate:!0,onsubmit:this._handleSubmit,onkeydown:this._handleFormKeyDown},this._renderHeader(),this._renderInputs())}_renderHeader(){const e=this.viewModel;if(!e.formHeaderVisible)return;const t=null!=e.formTitle&&C(F,{key:"title",level:this.headingLevel},e.formTitle),i=null!=e.formDescription&&C("p",{class:d.description,key:"description"},e.formDescription);return C("div",{class:d.formHeader},t,i)}_renderInputs(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderActiveRelationshipInput(e.activeRelationshipInput):e.inputs.filter(t).filter((e=>e.visible)).map(((e,t)=>u(e)?this._renderGroup(e,t):c(e)?this._renderLabeledField(e):p(e)?this._renderRelationshipInput(e):void 0))}_renderActiveRelationshipInput(e){return this._renderRelationshipInput(e)}_renderDescriptionOrEmpty(e,t){return null==e?null:C("div",{class:this.classes(d.description),id:t},e)}_renderGroup(e,t){const{formTemplate:i,disabled:s}=this,{description:a,inputs:l,label:n,state:r}=e,o=l.filter((e=>e.visible)),u=this.viewModel.findField(this._activeInputName),m=!(!u||u.group!==e),h=`${this.id}_group_${t}`,v=`${this.id}_group-label_${t}`,_=`${this.id}_group-description_${t}`,b=this._renderDescriptionOrEmpty(a,_),g="sequential"===this.groupDisplay,f=g?m:"expanded"===r,I=f?d.collapseIcon:d.expandIcon;return C("fieldset",{"aria-expanded":f.toString(),"aria-labelledby":v,"aria-describedby":a?_:"",class:this.classes(d.group,g?d.groupSequential:null,f?null:d.groupCollapsed,m?d.groupActive:null,s?d.inputDisabled:null),disabled:s,"data-group":e,id:h,key:t,onclick:this._handleGroupClick},C("button",{role:g?"presentation":void 0,class:d.groupHeader,type:"button",tabIndex:g?-1:0},C("div",{class:d.groupTitle},C(F,{class:d.groupLabel,id:v,level:null!=i&&i.title?y(this.headingLevel):this.headingLevel},n),b),g?null:C("span",{class:this.classes(I,d.groupToggleIcon)})),o.map((e=>c(e)?this._renderLabeledField(e):p(e)?this._renderRelationshipInput(e):void 0)))}_getFocusableInput(e,t){const i=this.viewModel.allFieldInputs,s="forward"===e?i:i.slice().reverse();let a;if(!t||p(t))a=0;else if(u(t)){const e=t.inputs.find(c);a=e?s.indexOf(e):0}else{let i;if(m(t)&&"collapsed"===t.group.state){const s=t.group.inputs.filter(c);i="forward"===e?s[s.length-1]:s[0]}else i=t;a=s.indexOf(i)+1}for(let l=a;l<s.length;l++){const e=s[l];if(e.visible&&c(e))return e}return null}_renderLabeledField(e){const{dataType:t,feature:i,label:s,layer:a}=e;return C("label",{key:`${a.id}-${i.uid}-${e.name}`,class:d.label},[s,"unsupported"!==t?this._renderFieldInput(e):this._renderUnsupportedField(e),this._renderAuxiliaryText(e)])}_renderFieldInput(e){const{dataType:t,domain:i,name:s,updating:a,value:l}=e,n=this.getCommonInputProps(e);if("coded-value"===i?.type){if(h(e.element,"switch")){const{element:t}=e;if(!(this._switchFieldsWithInitialIncompatibleValue.has(s)||null==l||t.input.onValue!==l&&t.input.offValue!==l))return this._renderSwitchFieldInput(e,n);this._switchFieldsWithInitialIncompatibleValue.add(s)}return"radio-buttons"===e.inputType?this._renderRadioButtonsFieldInput(e,i.codedValues.map((({code:e,name:t})=>({value:e,name:t}))),n):this._renderSelectFieldInput(e,this._getFieldValueOptions(s,i),n)}if("datetime-picker"===e.inputType||"date"===t)return this._renderDateFieldInput(e,n);const r="number"===t?C("input",{type:"number",...n,value:null!=this._activeNumberFieldEdit&&this._activeNumberFieldEdit.fieldName===e.name?this._activeNumberFieldEdit.value:`${n.value}`}):"text-area"===e.inputType?C("textarea",{...n}):C("input",{type:"text",...n});return a?C("div",{key:`${n.key}-input-updating-wrapper`,class:d.fieldInputWrapper},r,C("div",{class:d.fieldInputLoader},C("calcite-progress",{type:"indeterminate"}))):r}_renderDateFieldInput(e,t){const{dateDataType:i,includeTime:s,label:a,name:l,valid:n,value:r}=e,{readOnly:o,required:u}=t;if("string"===i)return this._renderUnsupportedField(e,v(e.field,t.value));const{date:c,time:p}=this._formatValueForDateInputs(r),m=null!=t.max?this._formatValueForDateInputs(t.max):void 0,h=null!=t.min?this._formatValueForDateInputs(t.min):void 0,_=m?.date??void 0,b=h?.date??void 0,g={afterCreate:this._afterDateInputCreate,afterUpdate:this._afterDateInputCreateOrUpdate,"aria-invalid":!n,label:a,numberingSystem:T,overlayPositioning:"fixed",readOnly:o,required:u,tabIndex:0,[O]:l};return C("div",{key:`${t.key}-date-time-container`,class:d.dateInputContainer},C("calcite-input-date-picker",{bind:this,...g,class:this.classes(t.class,d.inputDate),"data-date-part":"date",key:`${t.key}-date-input`,valueAsDate:c??void 0,maxAsDate:_,minAsDate:b,onCalciteInputDatePickerChange:e=>this._commitDateChanges(e.target),onblur:e=>this._commitDateChanges(e.target,!0)}),s?C("calcite-input-time-picker",{bind:this,...g,class:this.classes(t.class,d.inputTime),"data-date-part":"time",key:`${t.key}-time-input`,value:p??void 0,step:1,onCalciteInputTimePickerChange:e=>this._commitDateChanges(e.target),onfocus:e=>{e.target.calciteTimePickerEl&&(e.target.calciteTimePickerEl.showSecond=!0)},onblur:e=>this._commitDateChanges(e.target,!0)}):null)}_renderUnsupportedField(e,t){const i=this.getCommonInputProps(e);return C("input",{afterCreate:i.afterCreate,afterUpdate:i.afterUpdate,class:this.classes(d.input,d.fieldInput,d.inputDisabled),onfocus:i.onfocus,readOnly:!0,tabIndex:i.tabIndex,type:"text",value:null!=t?`${t}`:i.value,[O]:i[O]})}_renderSelectFieldInput(e,t,i){const{element:s,required:a,value:l}=e,{messages:n,messagesTemplates:r}=this,o=t.map((e=>e.map((e=>C("calcite-combobox-item",{value:`${e.value}`,textLabel:e.name,key:`#${e.value}`,selected:l===e.value}))))),[d,u]=o;this._registerIncompatibleValue(l,t.flat(),e,(e=>{u.unshift(C("calcite-combobox-item",{value:`${e}`,textLabel:`${e}`,key:"incompatible-option",readOnly:!0}))}));const c=u.length>0?[C("calcite-combobox-item-group",{key:"recommended",label:n.recommended},d),C("calcite-combobox-item-group",{key:"other",label:r.other},u)]:d,p=null==s,m=h(s,"combo-box"),v=p||m&&s.input?.showNoValueOption;if(!a&&v){const e="",t=m&&s.input.noValueOptionLabel||n.empty;c.unshift(C("calcite-combobox-item",{value:e,textLabel:n.empty,key:"empty-option"},t))}return C("calcite-combobox",{...i,selectionMode:"single",disabled:i.readOnly,allowCustomValues:!1,onCalciteComboboxChange:e=>this._handleOptionChange(e.target)},c)}_registerIncompatibleValue(e,t,i,s){const a=this._fieldToInitialIncompatibleDomainValue,l=a.has(i.name);(l||null!=e&&""!==e&&!t.some((t=>t.value===e)))&&(l||a.set(i.name,e),s?.(e))}_renderRadioButtonsFieldInput(e,t,i){const{element:s,name:a,required:l,value:n}=e,r=t.map((e=>this._renderRadioButton({key:e.name,label:e.name,name:a,value:e.value,selected:e.value===n,props:i})));this._registerIncompatibleValue(n,t,e);const o=null==s,u=h(s,"radio-buttons"),c=o||u&&s.input?.showNoValueOption;if(!l&&c){const e="",t=u&&s.input.noValueOptionLabel||this.messages.empty,l=n===e||null===n;r.unshift(this._renderRadioButton({key:"empty-option",label:t,name:a,value:e,selected:l,props:i}))}return C("div",{key:`${i.key}-radio`,class:d.inputRadioGroup},r)}_renderSwitchFieldInput(e,t){const{value:i}=e,s=!!h(e.element,"switch")&&i===e.element.input.onValue;return C("calcite-switch",{...t,class:d.inputSwitch,onCalciteSwitchChange:e=>this._commitInputValue(e.target),checked:s,disabled:t.readOnly})}_renderRadioButton({key:e,name:t,value:i,selected:s,label:a,props:l}){return C("label",{key:e,class:d.inputRadioLabel},C("input",{...l,class:d.inputRadio,name:t,type:"radio",value:i,checked:s,disabled:l.readOnly,onchange:e=>this._commitInputValue(e.target)}),a)}_renderAuxiliaryText(e){const t=this._userUpdatedFieldInputNames.has(e.name)&&!e.valid?_(e,this.messages):null!=this.viewModel.contingencyConstraintViolations.get(e.name)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=t?C("calcite-input-message",{status:"invalid",icon:!0},t):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){const{featureCount:t,relationshipId:i,showAllActionVisible:s}=e,{relatedRecordCallbacks:a}=this;if(!s||!a?.showAllRelatedRecords)return;const l=this.messages;return C("calcite-list-item",{description:V(l.totalCount,{count:t}),label:l.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(i)},C("calcite-icon",{slot:"content-end",scale:"s",icon:"list"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:s}=e,{relatedRecordCallbacks:a}=this;if(t&&a?.addRelatedRecord&&s)return C("calcite-button",{alignment:"center",appearance:"outline-fill",class:d.centeredButton,disabled:e.updating,iconStart:"plus",key:`${i}-add-button`,round:!0,scale:"s",width:"half",onclick:()=>this._onAddRelatedRecordsClick(i,s)},this.messages.addRecord)}_renderRelatedRecordListItem(e,t){const{feature:i,description:s,title:a}=e,{feature:l,relatedRecordCallbacks:n}=this,r=()=>{n?.editRelatedRecord&&l&&n.editRelatedRecord({parentFeature:l,relationshipId:t,relatedFeature:i})};return C("calcite-list-item",{bind:this,description:s,label:a,key:`${t}-${i.uid}`,value:a,onclick:r},C("calcite-icon",{slot:"content-start",scale:"m",icon:b(i)}),C("calcite-icon",{slot:"content-end",scale:"s",icon:"chevron-right"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled||!e.editable)return;const{relationshipId:t,relatedFeatureInfos:i,showAllEnabled:s}=e,a=s?null:this._renderDescriptionOrEmpty(e.description),l=i.length?this._renderRelatedRecordsList(e):e.loaded?this._renderNoRelatedRecordsNotice():void 0;return C("label",{class:this.classes(d.label,d.relationshipLabel),key:`relationship-${t}-container`},C("div",null,this._renderRelatedRecordsHeaderContainer(e),a,l),this._renderAddRelatedRecordButton(e))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return C("div",{class:d.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},C("span",null,e.label),t?C("calcite-loader",{label:this.messagesCommon?.loading,inline:!0,key:"loader",scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t}=e;return C("calcite-list",{class:d.relatedRecordsList},e.relatedFeatureInfos.map((e=>this._renderRelatedRecordListItem(e,t))),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoRelatedRecordsNotice(){return C("calcite-notice",{open:!0,scale:"s",kind:"brand",icon:"information",width:"full"},C("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return C("div",{key:"feature-observer",class:d.listObserver,bind:this,afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved})}getCommonInputProps(e){const{disabled:t,groupDisplay:i}=this,{dataType:s,editable:a,group:l,hint:n,label:r,maxLength:o,minLength:u,name:c,required:p,valid:m,value:h}=e,v=this._userUpdatedFieldInputNames.has(c),_=!a||t,b="all"===i&&null!=l&&"collapsed"===l.state;return{afterCreate:this._afterInputCreateOrUpdate,afterUpdate:this._afterInputCreateOrUpdate,"aria-invalid":m?"false":"true",class:this.classes(d.input,d.fieldInput,_?d.inputDisabled:null,v&&!m?d.inputInvalid:null),key:c,label:r,minlength:u>-1?`${u}`:"",maxlength:o>-1?`${o}`:"",...e.range,readOnly:_,value:null==h?"":`${h}`,[O]:c,onfocus:this._handleInputFocus,oninput:this._handleInputInput,onblur:this._handleInputBlur,onkeydown:this._handleInputKeyDown,onmousedown:"number"===s?this._handleNumberInputMouseDown:void 0,placeholder:"number"===s||"text"===s?n??void 0:"",required:p,tabIndex:b?-1:0}}_handleNumberInputMouseDown({target:e}){e.focus(),this.scheduleRender()}_getFieldValueOptions(e,t){const i=t.codedValues.map((({code:e,name:t})=>({value:e,name:t}))),s=this.viewModel.fieldsWithContingentValues.has(e)?this._getContingentValueOptions(e):[];if(s.length>0){const e=new Set(s.map((e=>e.value)));return[s,i.filter((t=>!e.has(t.value)))]}return[i,[]]}_getContingentValueOptions(e){const t={};for(const a of this.viewModel.allFieldInputs){const{name:i,value:s}=a;null!=s&&i!==e&&this.viewModel.fieldsWithContingentValues.has(i)&&(t[i]=s)}const i=this.viewModel.joinedContingentValues.slice(),s=new Map;for(const a of i){const i=a.values[e];if(null==i||"code"!==i.objectType&&"null"!==i.objectType)continue;const{code:l,name:n}=i.codedValue&&"null"!==i.objectType?i.codedValue:{code:"",name:this.messages.empty};if(s.has(l))continue;Object.entries(t).every((([e,t])=>!a.values.hasOwnProperty(e)||this._valueIsValidContingentValue(t,a.values[e])))&&s.set(l,{name:n,value:l})}return[...s.values()]}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(O))}async _afterDateInputCreate(e){this._afterDateInputCreateOrUpdate(e)}_afterDateInputCreateOrUpdate(e){const{name:t}=this._getFieldInputFromHTMLElement(e),i=this._dateFieldInputMap.get(t),s=x(e);null!=i?s?i.date=e:i.time=e:this._dateFieldInputMap.set(t,{[s?"date":"time"]:e}),this._afterInputCreateOrUpdate(e)}_afterInputCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),s=t.findField(this._activeInputName),a=this._fieldToInitialIncompatibleDomainValue.get(i.name)===i.value;this._fieldFocusNeeded&&s===i&&("radio-buttons"!==i.inputType||a||e.checked)&&(this._fieldFocusNeeded=!1,m(i)&&(i.group.state="expanded"),e.focus())}_handleInputFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._activeInputName=i.name,g(i)&&(this._activeNumberFieldEdit={fieldName:i.name,input:t,value:t.value})}_handleInputBlur(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);"number"===i.dataType&&null!=this._activeNumberFieldEdit&&(this._activeNumberFieldEdit.input.value=`${i.value}`,this._activeNumberFieldEdit=null),this._commitInputValue(t),this.scheduleRender()}_commitDateChanges(e,t=!1){const{name:i}=this._getFieldInputFromHTMLElement(e);if(!this._dateFieldInputMap.has(i))return;const s=this._dateFieldInputMap.get(i);if(!s||!s.date)return;const a=this._getFieldValueFromDateInput(e),l=this._getFieldValueFromDateInputs(s.date,s.time);this.viewModel.getValue(i)!==l&&(null!==a&&null!==l?this._updateFieldValue(i,l):t&&this._updateFieldValue(i,null))}_commitInputValue(e){const t=this._getFieldInputFromHTMLElement(e);null!=this._activeNumberFieldEdit&&g(t)&&(this._activeNumberFieldEdit.value=e.value),this._updateFieldValue(t.name,this._parseValue(e))}_handleInputKeyDown(e){const{key:t,altKey:i,ctrlKey:s,metaKey:a}=e,l=this._getFieldInputFromHTMLElement(e.target);if("Enter"===t)m(l)&&"collapsed"===l.group.state&&(l.group.state="expanded");else{const{type:n}=l.field,r="single"===n||"double"===n;if(("integer"===n||"small-integer"===n||r)&&(!i&&!s&&!a)&&1===t.length){const i=Number(t),s=["-","+"],a=["e","."],l=r?[...s,...a]:s;isNaN(i)&&!l.includes(t)&&e.preventDefault()}}}_updateFieldValue(e,t){if(this.viewModel.setValue(e,t),this._userUpdatedFieldInputNames.add(e),this.viewModel.fieldsWithContingentValues.has(e)){const e=Object.fromEntries(Object.entries(this.getValues()).filter((([e,t])=>null!=t)));this.viewModel.validateContingencyConstraints(e)}}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;if(h(t.element,"switch")&&"CALCITE-COMBOBOX"!==e.tagName)return e.checked?t.element.input.onValue:t.element.input.offValue;if("radio-buttons"===t.inputType&&"radio"===e.type&&!e.checked)return t.value;const{dataType:s}=t;return"number"===s?i?parseFloat(i):null:i}_handleOptionChange(e){this._commitInputValue(e),this.scheduleRender()}_handleGroupClick(e){const t=e.currentTarget["data-group"],i="expanded"===t.state,s="sequential"===this.groupDisplay,a=`.${d.groupHeader}`;if(!(i&&!e.target.closest(a))){if(this._activeInputName=this._getFocusableInput("forward",t)?.name||"",s){const s=e.target.closest(a);if(i&&!s)return;this.viewModel.inputs.forEach((e=>{u(e)&&e!==t&&(e.state="collapsed")}))}t.state=i?"collapsed":"expanded",this._fieldFocusNeeded=s,this.scheduleRender()}}_handleSubmit(e){e.preventDefault()}_handleFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_getDefaultLocaleOptions(){return{locale:D(),numberingSystem:T}}_getFieldValueFromDateInputs(e,t){const i=this._getDateTimeFromInput(e),s=this._getDateTimeFromInput(t);if(!i&&!s)return null;const a=this._getFieldInputFromHTMLElement(e).range,l=Date.now(),n=null!=a.max&&a.max<l?a.max:l,r=M.fromMillis(n,this._getDefaultLocaleOptions()),o=i||r,{year:d,month:u,day:c}=o,{hour:p,minute:m,second:h}=s||r,v=o.set({year:d,month:u,day:c,hour:p,minute:m,second:h});return v.isValid?v.toMillis():null}_getDateTimeFromInput(e){if(!e)return null;let t=null;if(x(e)){const i=e.valueAsDate;if(!i||Array.isArray(i))return null;t=M.fromJSDate(i)}else{if(!e.value)return null;t=M.fromFormat(e.value,k,this._getDefaultLocaleOptions())}return t??null}_getFieldValueFromDateInput(e){return this._dateTimeToFieldValue(this._getDateTimeFromInput(e))}_dateTimeToFieldValue(e){return e?.isValid?e.toMillis():null}_dateTimeFromFieldValue(e){return null===e?null:M.fromMillis(e,this._getDefaultLocaleOptions())}_formatValueForDateInputs(e){if(null==e||isNaN(e))return{date:null,time:null};const t=this._dateTimeFromFieldValue(e);return t?{date:t.toJSDate(),time:t.toFormat(k,this._getDefaultLocaleOptions())}:{date:null,time:null}}_valueIsValidContingentValue(e,t){switch(t.objectType){case"any":return!0;case"null":return null==e;case"code":return e===t.codedValue?.code;case"range":return null!=e&&null!=t.minValue&&null!=t.maxValue&&+e>=t.minValue&&+e<=t.maxValue;default:return i(t.objectType),!1}}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}async _onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;if(!e)return;const{showAllEnabled:t,updating:i}=e;this._listObserverNode&&!i&&t&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}};e([n()],j.prototype,"_listObserverNode",void 0),e([n()],j.prototype,"_relatedRecordsEnabled",null),e([n()],j.prototype,"disabled",null),e([n()],j.prototype,"feature",null),e([n()],j.prototype,"formTemplate",null),e([n()],j.prototype,"groupDisplay",void 0),e([n()],j.prototype,"headingLevel",void 0),e([n()],j.prototype,"label",null),e([n()],j.prototype,"layer",null),e([n()],j.prototype,"map",null),e([n(),w("esri/widgets/FeatureForm/t9n/FeatureForm")],j.prototype,"messages",void 0),e([n(),w("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([n(),w("esri/widgets/Feature/t9n/Feature")],j.prototype,"messagesFeature",void 0),e([n(),w("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],j.prototype,"messagesTemplates",void 0),e([n()],j.prototype,"relatedRecordCallbacks",null),e([n()],j.prototype,"relationshipId",null),e([n()],j.prototype,"spatialReference",null),e([n()],j.prototype,"strict",null),e([n()],j.prototype,"view",null),e([n(),R(["value-change","submit"])],j.prototype,"viewModel",void 0),j=e([r(N)],j);const E=j;export{E as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{neverReached as i}from"../core/compilerUtils.js";import{deprecatedProperty as s}from"../core/deprecate.js";import a from"../core/Logger.js";import{watch as l}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import{CSS as d}from"./FeatureForm/css.js";import{isGroupInput as u,isFieldInput as c,isRelationshipInput as p,isInputInGroupInput as m,isFieldElementWithInputType as h,formatDateFieldValue as v,getErrorMessageForFieldInput as _,getIconForFeature as b,isNumberFieldInput as g}from"./FeatureForm/featureFormUtils.js";import f from"./FeatureForm/FeatureFormViewModel.js";import{loadCalciteComponents as I}from"./support/componentsUtils.js";import{Heading as F,incrementHeadingLevel as y}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as w}from"./support/decorators/messageBundle.js";import{vmEvent as R}from"./support/decorators/vmEvent.js";import{tsx as C}from"./support/jsxFactory.js";import{DateTime as M}from"luxon";import{substitute as V}from"../intl/substitute.js";import{getLocale as D}from"../intl/locale.js";const k="TT",O="data-field-name",T="latn",x=e=>"valueAsDate"in e,N="esri.widgets.FeatureForm",L=a.getLogger(N);let j=class extends o{constructor(e,t){super(e,t),this._dateFieldInputMap=new Map,this._activeInputName="",this._activeNumberFieldEdit=null,this._fieldFocusNeeded=!1,this._fieldToInitialIncompatibleDomainValue=new Map,this._switchFieldsWithInitialIncompatibleValue=new Set,this._userUpdatedFieldInputNames=new Set,this._listObserverNode=null,this._listObserver=new IntersectionObserver((e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()}),{root:window.document}),this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new f,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,relatedRecordCallbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t)=>{const{feature:i,relatedRecordCallbacks:s}=this;i&&s?.addRelatedRecord&&s.addRelatedRecord({parentFeature:i,relatedLayer:t,relationshipId:e})},this._handleInputInput=e=>{this._commitInputValue(e.currentTarget)},this._handleFormKeyDown=this._handleFormKeyDown.bind(this),this._handleInputBlur=this._handleInputBlur.bind(this),this._handleInputFocus=this._handleInputFocus.bind(this),this._handleNumberInputMouseDown=this._handleNumberInputMouseDown.bind(this),this._handleInputKeyDown=this._handleInputKeyDown.bind(this),this._handleOptionChange=this._handleOptionChange.bind(this),this._handleGroupClick=this._handleGroupClick.bind(this),this._handleSubmit=this._handleSubmit.bind(this),this._afterInputCreateOrUpdate=this._afterInputCreateOrUpdate.bind(this),this._afterDateInputCreateOrUpdate=this._afterDateInputCreateOrUpdate.bind(this)}initialize(){this.addHandles([l((()=>this.feature),(()=>{const e=this._getFocusableInput("forward");this._activeInputName=e?.name||"",this._userUpdatedFieldInputNames.clear(),this._fieldToInitialIncompatibleDomainValue.clear(),this._switchFieldsWithInitialIncompatibleValue.clear(),this._dateFieldInputMap.clear(),this._fieldFocusNeeded=!0})),this.on("submit",(e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach((e=>this._userUpdatedFieldInputNames.add(e))),this._activeInputName=t,this._fieldFocusNeeded=!0,this.scheduleRender()}})),l((()=>[this.viewModel.activeRelationshipInput,this._listObserverNode]),(()=>this._onObserverChange()))])}loadDependencies(){return I({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox.js"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item.js"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker.js"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message.js"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker.js"),list:()=>import("@esri/calcite-components/dist/components/calcite-list.js"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice.js"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress.js"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch.js")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const e=this.relatedRecordCallbacks;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get relatedRecordCallbacks(){return this.viewModel.relatedRecordCallbacks}set relatedRecordCallbacks(e){this.viewModel.relatedRecordCallbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get view(){return s(L,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view}set view(e){s(L,"view",{replacement:"Use FeatureForm.map instead.",version:"4.27"}),this.viewModel.view=e}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return C("div",{class:this.classes(d.base,d.widget,d.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return C("form",{class:d.form,novalidate:!0,onsubmit:this._handleSubmit,onkeydown:this._handleFormKeyDown},this._renderHeader(),this._renderInputs())}_renderHeader(){const e=this.viewModel;if(!e.formHeaderVisible)return;const t=null!=e.formTitle&&C(F,{key:"title",level:this.headingLevel},e.formTitle),i=null!=e.formDescription&&C("p",{class:d.description,key:"description"},e.formDescription);return C("div",{class:d.formHeader},t,i)}_renderInputs(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderActiveRelationshipInput(e.activeRelationshipInput):e.inputs.filter(t).filter((e=>e.visible)).map(((e,t)=>u(e)?this._renderGroup(e,t):c(e)?this._renderLabeledField(e):p(e)?this._renderRelationshipInput(e):void 0))}_renderActiveRelationshipInput(e){return this._renderRelationshipInput(e)}_renderDescriptionOrEmpty(e,t){return null==e?null:C("div",{class:this.classes(d.description),id:t},e)}_renderGroup(e,t){const{formTemplate:i,disabled:s}=this,{description:a,inputs:l,label:n,state:r}=e,o=l.filter((e=>e.visible)),u=this.viewModel.findField(this._activeInputName),m=!(!u||u.group!==e),h=`${this.id}_group_${t}`,v=`${this.id}_group-label_${t}`,_=`${this.id}_group-description_${t}`,b=this._renderDescriptionOrEmpty(a,_),g="sequential"===this.groupDisplay,f=g?m:"expanded"===r,I=f?d.collapseIcon:d.expandIcon;return C("fieldset",{"aria-expanded":f.toString(),"aria-labelledby":v,"aria-describedby":a?_:"",class:this.classes(d.group,g?d.groupSequential:null,f?null:d.groupCollapsed,m?d.groupActive:null,s?d.inputDisabled:null),disabled:s,"data-group":e,id:h,key:t,onclick:this._handleGroupClick},C("button",{role:g?"presentation":void 0,class:d.groupHeader,type:"button",tabIndex:g?-1:0},C("div",{class:d.groupTitle},C(F,{class:d.groupLabel,id:v,level:null!=i&&i.title?y(this.headingLevel):this.headingLevel},n),b),g?null:C("span",{class:this.classes(I,d.groupToggleIcon)})),o.map((e=>c(e)?this._renderLabeledField(e):p(e)?this._renderRelationshipInput(e):void 0)))}_getFocusableInput(e,t){const i=this.viewModel.allFieldInputs,s="forward"===e?i:i.slice().reverse();let a;if(!t||p(t))a=0;else if(u(t)){const e=t.inputs.find(c);a=e?s.indexOf(e):0}else{let i;if(m(t)&&"collapsed"===t.group.state){const s=t.group.inputs.filter(c);i="forward"===e?s[s.length-1]:s[0]}else i=t;a=s.indexOf(i)+1}for(let l=a;l<s.length;l++){const e=s[l];if(e.visible&&c(e))return e}return null}_renderLabeledField(e){const{dataType:t,feature:i,label:s,layer:a}=e;return C("label",{key:`${a.id}-${i.uid}-${e.name}`,class:d.label},[s,"unsupported"!==t?this._renderFieldInput(e):this._renderUnsupportedField(e),this._renderAuxiliaryText(e)])}_renderFieldInput(e){const{dataType:t,domain:i,name:s,updating:a,value:l}=e,n=this.getCommonInputProps(e);if("coded-value"===i?.type){if(h(e.element,"switch")){const{element:t}=e;if(!(this._switchFieldsWithInitialIncompatibleValue.has(s)||null==l||t.input.onValue!==l&&t.input.offValue!==l))return this._renderSwitchFieldInput(e,n);this._switchFieldsWithInitialIncompatibleValue.add(s)}return"radio-buttons"===e.inputType?this._renderRadioButtonsFieldInput(e,i.codedValues.map((({code:e,name:t})=>({value:e,name:t}))),n):this._renderSelectFieldInput(e,this._getFieldValueOptions(s,i),n)}if("datetime-picker"===e.inputType||"date"===t)return this._renderDateFieldInput(e,n);const r="number"===t?C("input",{type:"number",...n,value:null!=this._activeNumberFieldEdit&&this._activeNumberFieldEdit.fieldName===e.name?this._activeNumberFieldEdit.value:`${n.value}`}):"text-area"===e.inputType?C("textarea",{...n}):C("input",{type:"text",...n});return a?C("div",{key:`${n.key}-input-updating-wrapper`,class:d.fieldInputWrapper},r,C("div",{class:d.fieldInputLoader},C("calcite-progress",{type:"indeterminate"}))):r}_renderDateFieldInput(e,t){const{dateDataType:i,includeTime:s,label:a,name:l,valid:n,value:r}=e,{readOnly:o,required:u}=t;if("string"===i)return this._renderUnsupportedField(e,v(e.field,t.value));const{date:c,time:p}=this._formatValueForDateInputs(r),m=null!=t.max?this._formatValueForDateInputs(t.max):void 0,h=null!=t.min?this._formatValueForDateInputs(t.min):void 0,_=m?.date??void 0,b=h?.date??void 0,g={afterCreate:this._afterDateInputCreate,afterUpdate:this._afterDateInputCreateOrUpdate,"aria-invalid":!n,label:a,numberingSystem:T,overlayPositioning:"fixed",readOnly:o,required:u,tabIndex:0,[O]:l};return C("div",{key:`${t.key}-date-time-container`,class:d.dateInputContainer},C("calcite-input-date-picker",{bind:this,...g,class:this.classes(t.class,d.inputDate),"data-date-part":"date",key:`${t.key}-date-input`,valueAsDate:c??void 0,maxAsDate:_,minAsDate:b,onCalciteInputDatePickerChange:e=>this._commitDateChanges(e.target),onblur:e=>this._commitDateChanges(e.target,!0)}),s?C("calcite-input-time-picker",{bind:this,...g,class:this.classes(t.class,d.inputTime),"data-date-part":"time",key:`${t.key}-time-input`,value:p??void 0,step:1,onCalciteInputTimePickerChange:e=>this._commitDateChanges(e.target),onfocus:e=>{e.target.calciteTimePickerEl&&(e.target.calciteTimePickerEl.showSecond=!0)},onblur:e=>this._commitDateChanges(e.target,!0)}):null)}_renderUnsupportedField(e,t){const i=this.getCommonInputProps(e);return C("input",{afterCreate:i.afterCreate,afterUpdate:i.afterUpdate,class:this.classes(d.input,d.fieldInput,d.inputDisabled),onfocus:i.onfocus,readOnly:!0,tabIndex:i.tabIndex,type:"text",value:null!=t?`${t}`:i.value,[O]:i[O]})}_renderSelectFieldInput(e,t,i){const{element:s,required:a,value:l}=e,{messages:n,messagesTemplates:r}=this,o=t.map((e=>e.map((e=>C("calcite-combobox-item",{value:`${e.value}`,textLabel:e.name,key:`#${e.value}`,selected:l===e.value}))))),[d,u]=o;this._registerIncompatibleValue(l,t.flat(),e,(e=>{u.unshift(C("calcite-combobox-item",{value:`${e}`,textLabel:`${e}`,key:"incompatible-option",readOnly:!0}))}));const c=u.length>0?[C("calcite-combobox-item-group",{key:"recommended",label:n.recommended},d),C("calcite-combobox-item-group",{key:"other",label:r.other},u)]:d,p=null==s,m=h(s,"combo-box"),v=p||m&&s.input?.showNoValueOption;if(!a&&v){const e="",t=m&&s.input.noValueOptionLabel||n.empty;c.unshift(C("calcite-combobox-item",{value:e,textLabel:n.empty,key:"empty-option"},t))}return C("calcite-combobox",{...i,selectionMode:"single",disabled:i.readOnly,allowCustomValues:!1,clearDisabled:!0,onCalciteComboboxChange:e=>this._handleOptionChange(e.target)},c)}_registerIncompatibleValue(e,t,i,s){const a=this._fieldToInitialIncompatibleDomainValue,l=a.has(i.name);(l||null!=e&&""!==e&&!t.some((t=>t.value===e)))&&(l||a.set(i.name,e),s?.(e))}_renderRadioButtonsFieldInput(e,t,i){const{element:s,name:a,required:l,value:n}=e,r=t.map((e=>this._renderRadioButton({key:e.name,label:e.name,name:a,value:e.value,selected:e.value===n,props:i})));this._registerIncompatibleValue(n,t,e);const o=null==s,u=h(s,"radio-buttons"),c=o||u&&s.input?.showNoValueOption;if(!l&&c){const e="",t=u&&s.input.noValueOptionLabel||this.messages.empty,l=n===e||null===n;r.unshift(this._renderRadioButton({key:"empty-option",label:t,name:a,value:e,selected:l,props:i}))}return C("div",{key:`${i.key}-radio`,class:d.inputRadioGroup},r)}_renderSwitchFieldInput(e,t){const{value:i}=e,s=!!h(e.element,"switch")&&i===e.element.input.onValue;return C("calcite-switch",{...t,class:d.inputSwitch,onCalciteSwitchChange:e=>this._commitInputValue(e.target),checked:s,disabled:t.readOnly})}_renderRadioButton({key:e,name:t,value:i,selected:s,label:a,props:l}){return C("label",{key:e,class:d.inputRadioLabel},C("input",{...l,class:d.inputRadio,name:t,type:"radio",value:i,checked:s,disabled:l.readOnly,onchange:e=>this._commitInputValue(e.target)}),a)}_renderAuxiliaryText(e){const t=this._userUpdatedFieldInputNames.has(e.name)&&!e.valid?_(e,this.messages):null!=this.viewModel.contingencyConstraintViolations.get(e.name)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=t?C("calcite-input-message",{status:"invalid",icon:!0},t):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){const{featureCount:t,relationshipId:i,showAllActionVisible:s}=e,{relatedRecordCallbacks:a}=this;if(!s||!a?.showAllRelatedRecords)return;const l=this.messages;return C("calcite-list-item",{description:V(l.totalCount,{count:t}),label:l.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(i)},C("calcite-icon",{slot:"content-end",scale:"s",icon:"list"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:s}=e,{relatedRecordCallbacks:a}=this;if(t&&a?.addRelatedRecord&&s)return C("calcite-button",{alignment:"center",appearance:"outline-fill",class:d.centeredButton,disabled:e.updating,iconStart:"plus",key:`${i}-add-button`,round:!0,scale:"s",width:"half",onclick:()=>this._onAddRelatedRecordsClick(i,s)},this.messages.addRecord)}_renderRelatedRecordListItem(e,t){const{feature:i,description:s,title:a}=e,{feature:l,relatedRecordCallbacks:n}=this,r=()=>{n?.editRelatedRecord&&l&&n.editRelatedRecord({parentFeature:l,relationshipId:t,relatedFeature:i})};return C("calcite-list-item",{bind:this,description:s,label:a,key:`${t}-${i.uid}`,value:a,onclick:r},C("calcite-icon",{slot:"content-start",scale:"m",icon:b(i)}),C("calcite-icon",{slot:"content-end",scale:"s",icon:"chevron-right"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled||!e.editable)return;const{featureCount:t,relationshipId:i,showAllEnabled:s}=e,a=s?null:this._renderDescriptionOrEmpty(e.description),l=t>0?this._renderRelatedRecordsList(e):e.loaded?this._renderNoRelatedRecordsNotice():void 0;return C("label",{class:this.classes(d.label,d.relationshipLabel),key:`relationship-${i}-container`},C("div",null,this._renderRelatedRecordsHeaderContainer(e),a,l),this._renderAddRelatedRecordButton(e))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return C("div",{class:d.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},C("span",null,e.label),t?C("calcite-loader",{label:this.messagesCommon?.loading,inline:!0,key:"loader",scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t}=e;return C("calcite-list",{class:d.relatedRecordsList},e.relatedFeatureInfos.map((e=>this._renderRelatedRecordListItem(e,t))),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoRelatedRecordsNotice(){return C("calcite-notice",{open:!0,scale:"s",kind:"brand",icon:"information",width:"full"},C("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return C("div",{key:"feature-observer",class:d.listObserver,bind:this,afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved})}getCommonInputProps(e){const{disabled:t,groupDisplay:i}=this,{dataType:s,editable:a,group:l,hint:n,label:r,maxLength:o,minLength:u,name:c,required:p,valid:m,value:h}=e,v=this._userUpdatedFieldInputNames.has(c),_=!a||t,b="all"===i&&null!=l&&"collapsed"===l.state;return{afterCreate:this._afterInputCreateOrUpdate,afterUpdate:this._afterInputCreateOrUpdate,"aria-invalid":m?"false":"true",class:this.classes(d.input,d.fieldInput,_?d.inputDisabled:null,v&&!m?d.inputInvalid:null),key:c,label:r,minlength:u>-1?`${u}`:"",maxlength:o>-1?`${o}`:"",...e.range,readOnly:_,value:null==h?"":`${h}`,[O]:c,onfocus:this._handleInputFocus,oninput:this._handleInputInput,onblur:this._handleInputBlur,onkeydown:this._handleInputKeyDown,onmousedown:"number"===s?this._handleNumberInputMouseDown:void 0,placeholder:"number"===s||"text"===s?n??void 0:"",required:p,tabIndex:b?-1:0}}_handleNumberInputMouseDown({target:e}){e.focus(),this.scheduleRender()}_getFieldValueOptions(e,t){const i=t.codedValues.map((({code:e,name:t})=>({value:e,name:t}))),s=this.viewModel.fieldsWithContingentValues.has(e)?this._getContingentValueOptions(e):[];if(s.length>0){const e=new Set(s.map((e=>e.value)));return[s,i.filter((t=>!e.has(t.value)))]}return[i,[]]}_getContingentValueOptions(e){const t={};for(const a of this.viewModel.allFieldInputs){const{name:i,value:s}=a;null!=s&&i!==e&&this.viewModel.fieldsWithContingentValues.has(i)&&(t[i]=s)}const i=this.viewModel.joinedContingentValues.slice(),s=new Map;for(const a of i){const i=a.values[e];if(null==i||"code"!==i.objectType&&"null"!==i.objectType)continue;const{code:l,name:n}=i.codedValue&&"null"!==i.objectType?i.codedValue:{code:"",name:this.messages.empty};if(s.has(l))continue;Object.entries(t).every((([e,t])=>!a.values.hasOwnProperty(e)||this._valueIsValidContingentValue(t,a.values[e])))&&s.set(l,{name:n,value:l})}return[...s.values()]}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(O))}async _afterDateInputCreate(e){this._afterDateInputCreateOrUpdate(e)}_afterDateInputCreateOrUpdate(e){const{name:t}=this._getFieldInputFromHTMLElement(e),i=this._dateFieldInputMap.get(t),s=x(e);null!=i?s?i.date=e:i.time=e:this._dateFieldInputMap.set(t,{[s?"date":"time"]:e}),this._afterInputCreateOrUpdate(e)}_afterInputCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),s=t.findField(this._activeInputName),a=this._fieldToInitialIncompatibleDomainValue.get(i.name)===i.value;this._fieldFocusNeeded&&s===i&&("radio-buttons"!==i.inputType||a||e.checked)&&(this._fieldFocusNeeded=!1,m(i)&&(i.group.state="expanded"),e.focus())}_handleInputFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._activeInputName=i.name,g(i)&&(this._activeNumberFieldEdit={fieldName:i.name,input:t,value:t.value})}_handleInputBlur(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);"number"===i.dataType&&null!=this._activeNumberFieldEdit&&(this._activeNumberFieldEdit.input.value=`${i.value}`,this._activeNumberFieldEdit=null),this._commitInputValue(t),this.scheduleRender()}_commitDateChanges(e,t=!1){const{name:i}=this._getFieldInputFromHTMLElement(e);if(!this._dateFieldInputMap.has(i))return;const s=this._dateFieldInputMap.get(i);if(!s||!s.date)return;const a=this._getFieldValueFromDateInput(e),l=this._getFieldValueFromDateInputs(s.date,s.time);this.viewModel.getValue(i)!==l&&(null!==a&&null!==l?this._updateFieldValue(i,l):t&&this._updateFieldValue(i,null))}_commitInputValue(e){const t=this._getFieldInputFromHTMLElement(e);null!=this._activeNumberFieldEdit&&g(t)&&(this._activeNumberFieldEdit.value=e.value),this._updateFieldValue(t.name,this._parseValue(e))}_handleInputKeyDown(e){const{key:t,altKey:i,ctrlKey:s,metaKey:a}=e,l=this._getFieldInputFromHTMLElement(e.target);if("Enter"===t)m(l)&&"collapsed"===l.group.state&&(l.group.state="expanded");else{const{type:n}=l.field,r="single"===n||"double"===n;if(("integer"===n||"small-integer"===n||r)&&(!i&&!s&&!a)&&1===t.length){const i=Number(t),s=["-","+"],a=["e","."],l=r?[...s,...a]:s;isNaN(i)&&!l.includes(t)&&e.preventDefault()}}}_updateFieldValue(e,t){if(this.viewModel.setValue(e,t),this._userUpdatedFieldInputNames.add(e),this.viewModel.fieldsWithContingentValues.has(e)){const e=Object.fromEntries(Object.entries(this.getValues()).filter((([e,t])=>null!=t)));this.viewModel.validateContingencyConstraints(e)}}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;if(h(t.element,"switch")&&"CALCITE-COMBOBOX"!==e.tagName)return e.checked?t.element.input.onValue:t.element.input.offValue;if("radio-buttons"===t.inputType&&"radio"===e.type&&!e.checked)return t.value;const{dataType:s}=t;return"number"===s?i?parseFloat(i):null:i}_handleOptionChange(e){this._commitInputValue(e),this.scheduleRender()}_handleGroupClick(e){const t=e.currentTarget["data-group"],i="expanded"===t.state,s="sequential"===this.groupDisplay,a=`.${d.groupHeader}`;if(!(i&&!e.target.closest(a))){if(this._activeInputName=this._getFocusableInput("forward",t)?.name||"",s){const s=e.target.closest(a);if(i&&!s)return;this.viewModel.inputs.forEach((e=>{u(e)&&e!==t&&(e.state="collapsed")}))}t.state=i?"collapsed":"expanded",this._fieldFocusNeeded=s,this.scheduleRender()}}_handleSubmit(e){e.preventDefault()}_handleFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_getDefaultLocaleOptions(){return{locale:D(),numberingSystem:T}}_getFieldValueFromDateInputs(e,t){const i=this._getDateTimeFromInput(e),s=this._getDateTimeFromInput(t);if(!i&&!s)return null;const a=this._getFieldInputFromHTMLElement(e).range,l=Date.now(),n=null!=a.max&&a.max<l?a.max:l,r=M.fromMillis(n,this._getDefaultLocaleOptions()),o=i||r,{year:d,month:u,day:c}=o,{hour:p,minute:m,second:h}=s||r,v=o.set({year:d,month:u,day:c,hour:p,minute:m,second:h});return v.isValid?v.toMillis():null}_getDateTimeFromInput(e){if(!e)return null;let t=null;if(x(e)){const i=e.valueAsDate;if(!i||Array.isArray(i))return null;t=M.fromJSDate(i)}else{if(!e.value)return null;t=M.fromFormat(e.value,k,this._getDefaultLocaleOptions())}return t??null}_getFieldValueFromDateInput(e){return this._dateTimeToFieldValue(this._getDateTimeFromInput(e))}_dateTimeToFieldValue(e){return e?.isValid?e.toMillis():null}_dateTimeFromFieldValue(e){return null===e?null:M.fromMillis(e,this._getDefaultLocaleOptions())}_formatValueForDateInputs(e){if(null==e||isNaN(e))return{date:null,time:null};const t=this._dateTimeFromFieldValue(e);return t?{date:t.toJSDate(),time:t.toFormat(k,this._getDefaultLocaleOptions())}:{date:null,time:null}}_valueIsValidContingentValue(e,t){switch(t.objectType){case"any":return!0;case"null":return null==e;case"code":return e===t.codedValue?.code;case"range":return null!=e&&null!=t.minValue&&null!=t.maxValue&&+e>=t.minValue&&+e<=t.maxValue;default:return i(t.objectType),!1}}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}async _onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;if(!e)return;const{showAllEnabled:t,updating:i}=e;this._listObserverNode&&!i&&t&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}};e([n()],j.prototype,"_listObserverNode",void 0),e([n()],j.prototype,"_relatedRecordsEnabled",null),e([n()],j.prototype,"disabled",null),e([n()],j.prototype,"feature",null),e([n()],j.prototype,"formTemplate",null),e([n()],j.prototype,"groupDisplay",void 0),e([n()],j.prototype,"headingLevel",void 0),e([n()],j.prototype,"label",null),e([n()],j.prototype,"layer",null),e([n()],j.prototype,"map",null),e([n(),w("esri/widgets/FeatureForm/t9n/FeatureForm")],j.prototype,"messages",void 0),e([n(),w("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([n(),w("esri/widgets/Feature/t9n/Feature")],j.prototype,"messagesFeature",void 0),e([n(),w("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],j.prototype,"messagesTemplates",void 0),e([n()],j.prototype,"relatedRecordCallbacks",null),e([n()],j.prototype,"relationshipId",null),e([n()],j.prototype,"spatialReference",null),e([n()],j.prototype,"strict",null),e([n()],j.prototype,"view",null),e([n(),R(["value-change","submit"])],j.prototype,"viewModel",void 0),j=e([r(N)],j);const E=j;export{E 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.27/esri/copyright.txt for details.
4
4
  */
5
- import{Heading as e}from"../support/Heading.js";import{classes as t,isActivationKey as n}from"../support/widgetUtils.js";import{tsx as r}from"../support/jsxFactory.js";const o="esri-item-list",i={base:o,group:`${o}__group`,scroller:`${o}__scroller`,scrollerEnabled:`${o}__scroller--enabled`,groupHeader:`${o}__group__header`,item:`${o}__list-item`,itemIcon:`${o}__list-item-icon`,itemContentEnd:`${o}__list-item-content-end`,noMatchesMessage:`${o}__no-matches-message`,filterContainerSticky:`${o}__filter-container--sticky`},l=4;function s(e){const{filterText:t="",id:n,messages:o,onFilterChange:i,...l}=e;return r("div",{key:n},e.filterEnabled??1?d({filterText:t,id:n,messages:o,onFilterChange:i}):null,c({...l,enableListScroll:e.enableListScroll??!0,filterText:t,messages:o}))}function a(e){return!!e.items}function c(e){const{headingLevel:n,items:o,...l}=e;return 0===o.length?r("div",{class:i.noMatchesMessage,key:"no-matches"},e.messages.noMatches):r("div",{class:t({[i.scroller]:!0,[i.scrollerEnabled]:!!e.enableListScroll}),key:"item-container"},o.map((e=>a(e)?g({...l,group:e,headingLevel:n}):m({...l,grouped:!0,item:e}))))}function d(e){const{messages:t,filterText:n,enableListScroll:o}=e;return r("div",{key:"filter",class:o?void 0:i.filterContainerSticky},r("calcite-input",{onCalciteInputInput:t=>{const n=t.currentTarget;e.onFilterChange&&e.onFilterChange(n.value)},placeholder:t.filterPlaceholder,value:n,type:"search"}))}function m(e){const{grouped:t,identify:o,item:l,onItemMouseEnter:s,onItemMouseLeave:a,onItemSelect:c,renderIcon:d,renderCustomItem:m,renderItemContent:g,renderItemContentEnd:v,renderItemLabel:f,renderItemDescription:_,selectedItem:b}=e,h=u(l,o),y=h===u(b,o),I=m?.(e);if(I)return I;const k=g?.(l),C=v?.(l);return r("calcite-list-item",{"aria-level":t?"2":"",class:i.item,"data-item":l,key:h,label:k?void 0:f?.(l)??l.label??void 0,description:k?void 0:_?.(l)??void 0,selected:y,tabIndex:0,afterCreate:e=>{const t=e=>{e.preventDefault(),e.stopImmediatePropagation(),c?.(p(e))},r={capture:!0};e.addEventListener("click",t,r),e.addEventListener("keydown",(e=>{n(e.key)&&t(e)}),r)},onmouseenter:e=>s?.(p(e)),onmouseleave:e=>a?.(p(e))},r("div",{key:"content-start",class:i.itemIcon,slot:"content-start"},d?.(l)),k?r("div",{key:"content",slot:"content"},k):null,C?r("div",{key:"content-end",class:i.itemContentEnd,slot:"content-end"},C):null)}function u(e,t){return e?`${t?.(e)||e.id}__${e.label}`:""}function p(e){return e.currentTarget["data-item"]}function g(t){const{group:n,headingLevel:o=l,selectionMode:s="none",renderCustomGroupContent:a,...c}=t,d=a?.(t);return r("div",{class:i.group,key:n.label??void 0},r(e,{level:o,class:i.groupHeader},n.label),d||r("calcite-list",{selectionMode:s,selectionAppearance:"border"},n.items.map((e=>m({...c,item:e,grouped:!0})))))}export{s as ItemList,g as renderGroup,m as renderItem};
5
+ import{Heading as e}from"../support/Heading.js";import{classes as t}from"../support/widgetUtils.js";import{tsx as n}from"../support/jsxFactory.js";const r="esri-item-list",o={base:r,group:`${r}__group`,scroller:`${r}__scroller`,scrollerEnabled:`${r}__scroller--enabled`,groupHeader:`${r}__group__header`,item:`${r}__list-item`,itemIcon:`${r}__list-item-icon`,itemContentEnd:`${r}__list-item-content-end`,noMatchesMessage:`${r}__no-matches-message`,filterContainerSticky:`${r}__filter-container--sticky`},l=4;function i(e){const{filterText:t="",id:r,messages:o,onFilterChange:l,...i}=e;return n("div",{key:r},e.filterEnabled??1?c({filterText:t,id:r,messages:o,onFilterChange:l}):null,a({...i,enableListScroll:e.enableListScroll??!0,filterText:t,messages:o}))}function s(e){return!!e.items}function a(e){const{headingLevel:r,items:l,...i}=e;return 0===l.length?n("div",{class:o.noMatchesMessage,key:"no-matches"},e.messages.noMatches):n("div",{class:t({[o.scroller]:!0,[o.scrollerEnabled]:!!e.enableListScroll}),key:"item-container"},l.map((e=>s(e)?p({...i,group:e,headingLevel:r}):d({...i,grouped:!0,item:e}))))}function c(e){const{messages:t,filterText:r,enableListScroll:l}=e;return n("div",{key:"filter",class:l?void 0:o.filterContainerSticky},n("calcite-input",{onCalciteInputInput:t=>{const n=t.currentTarget;e.onFilterChange&&e.onFilterChange(n.value)},placeholder:t.filterPlaceholder,value:r,type:"search"}))}function d(e){const{grouped:t,identify:r,item:l,onItemMouseEnter:i,onItemMouseLeave:s,onItemSelect:a,renderIcon:c,renderCustomItem:d,renderItemContent:p,renderItemContentEnd:g,renderItemLabel:f,renderItemDescription:v,selectedItem:_}=e,b=m(l,r),h=b===m(_,r),I=d?.(e);if(I)return I;const y=p?.(l),C=g?.(l);return n("calcite-list-item",{"aria-level":t?"2":"",class:o.item,"data-item":l,key:b,label:y?void 0:f?.(l)??l.label??void 0,description:y?void 0:v?.(l)??void 0,selected:h,tabIndex:0,afterUpdate:e=>{e.selected=h},onCalciteListItemSelect:e=>{e.preventDefault(),a?.(u(e))},onmouseenter:e=>i?.(u(e)),onmouseleave:e=>s?.(u(e))},n("div",{key:"content-start",class:o.itemIcon,slot:"content-start"},c?.(l)),y?n("div",{key:"content",slot:"content"},y):null,C?n("div",{key:"content-end",class:o.itemContentEnd,slot:"content-end"},C):null)}function m(e,t){return e?`${t?.(e)||e.id}__${e.label}`:""}function u(e){return e.currentTarget["data-item"]}function p(t){const{group:r,headingLevel:i=l,selectionMode:s="none",renderCustomGroupContent:a,...c}=t,m=a?.(t);return n("div",{class:o.group,key:r.label??void 0},n(e,{level:i,class:o.groupHeader},r.label),m||n("calcite-list",{selectionMode:s,selectionAppearance:"border"},r.items.map((e=>d({...c,item:e,grouped:!0})))))}export{i as ItemList,p as renderGroup,d as renderItem};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import i from"../../core/Collection.js";import r from"../../core/Evented.js";import o from"../../core/Logger.js";import{destroyMaybe as s}from"../../core/maybe.js";import{once as a,on as n,watch as l,when as g,syncAndInitial as h}from"../../core/reactiveUtils.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{ensureType as m}from"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import p from"../../geometry/Extent.js";import y from"../../layers/GraphicsLayer.js";import _ from"../../layers/ImageryTileLayer.js";import{searchImages as v}from"../../layers/orientedImagery/queries.js";import{calculateSuitabilities as f}from"../../layers/orientedImagery/core/bestImageUtils.js";import{createCoveragePolygon as C,computePolygonForInspection as P,resizePolygon as w,checkIfPolygonContainsSelectedPoint as I}from"../../layers/orientedImagery/core/coverageUtils.js";import{transformPoints as b}from"../../layers/orientedImagery/transformations/groundToImageUtils.js";import{transformPoints as F}from"../../layers/orientedImagery/transformations/imageToGroundUtils.js";import V from"../../views/MapView.js";import{getResolutionToScaleFactor as x}from"../../views/2d/viewpointUtils.js";import{projectWithEngineOrService as S}from"../../views/support/projectionUtils.js";import{activePolygonSymbol as O,polygonSymbol as G,activeSourcePointSymbol as j,sourcePointSymbol as M,crossSymbol as R,diamondSymbol as L}from"./symbols.js";import D from"../../geometry/SpatialReference.js";import A from"../../geometry/Point.js";import E from"../../geometry/Polygon.js";const U={click:"view-click",view:"view",viewLayers:"view-layers",mapLayers:"map-layers",layerViews:"layer-views",layerListMode:"layer-list-mode",children:"children",registerLayerSelection:"register-layer-selection",plotPointOnGround:"plot-point-on-ground"};let J=class extends r.EventedAccessor{constructor(e){super(e),this.activeLayer=null,this.shouldShowSelectedImage=!1,this.coverageFrustums=null,this.coveragePolygons=null,this.displayMessage=null,this.initialCurrentCoverageUpdate=!1,this.pointSources=null,this.selectedFeature=null,this.selectedPoint=null,this.features=null,this._additionalCoveragePolygons=null,this._additionalFeatureGraphics=null,this._currentCoveragePolygon=null,this._currentImage=null,this._imageViewer=null,this._initialCurrentCoveragePolygon=null,this._isLoading=!1,this._overlays=null,this._referencePointOnGround=null,this._referencePointOnImage=null,this._crossSymbol=null,this._fetchFeaturesController=null,this._panConstraint=null,this._scaleConstraint=null,this._transformController=new AbortController,this._updateCoverageController=null,this.loadViewer=this.loadViewer.bind(this)}initialize(){a((()=>this.view?.ready)).then((()=>{this._overlays=new y({listMode:"hide"}),this.view.map.layers.add(this._overlays)})),this.addHandles([n((()=>this.view),"click",(e=>{this.view.ready&&this.active&&(e.stopPropagation(),e.preventDefault(),"mouse"===e.pointerType&&0!==e.button||(e.native.altKey?(this.plotReferencePoint(e),this.plotImagePointOnGround({feature:this.selectedFeature,selectedLocation:e.mapPoint,options:{signal:this._transformController?.signal}})):(this.displayMessage=null,this.selectedPoint=e.mapPoint,this._fetchFeaturesWithController(e))))}))],U.view)}destroy(){this._cancelCurrentCoverageUpdate(),this._cancelFetchingFeatures(),this.coverageFrustums=null,this.coveragePolygons=null,this.pointSources=null,this._additionalCoveragePolygons=null,this._additionalFeatureGraphics=null,this._currentImage=s(this._currentImage),this._imageViewer=s(this._imageViewer),this._initialCurrentCoveragePolygon=s(this._initialCurrentCoveragePolygon),this._currentCoveragePolygon=s(this._currentCoveragePolygon),this._crossSymbol=s(this._crossSymbol),this._referencePointOnGround=s(this._referencePointOnGround),this._referencePointOnImage=s(this._referencePointOnImage),this._overlays=s(this._overlays)}get active(){return!0===this.view?.map?.allLayers.some((e=>"oriented-imagery"===e.type&&e.loaded))}get currentImageView(){return this._imageViewer?.allLayerViews.find((e=>e.layer===this._currentImage))}get featureCount(){return this.features?.length??0}get hasImageLoaded(){return!!this._currentImage}get isAdditionalCoverageDisabled(){return!this._additionalCoveragePolygons?.length}get isAdditionalCoverageVisible(){return this._additionalCoveragePolygons?.getItemAt(0)?.visible??!1}get isAdditionalPointSourcesDisabled(){return!this._additionalFeatureGraphics?.length}get isAdditionalPointSourcesVisible(){return this._additionalFeatureGraphics?.getItemAt(0)?.visible??!1}get isCurrentCoverageDisabled(){return!this._currentCoveragePolygon}get isCurrentCoverageVisible(){return!!this._currentCoveragePolygon?.visible}get isLoading(){return!(this._imageViewer?.stationary??1)||(this.currentImageView?.updating??!1)||this._isLoading}get state(){const{active:e,hasImageLoaded:t,isLoading:i}=this;return i?"loading":t?"image-loaded":e?"ready":"disabled"}set view(e){this._set("view",e)}getCurrentCoveragePolygon(){return this._currentCoveragePolygon}getSelectedFeature(){return this.selectedFeature}getSelectedFeaturePolygon(){return this._initialCurrentCoveragePolygon}loadViewer(e){const t=new Map,i={wkid:0};this._imageViewer=new V({container:e,map:t,spatialReferance:i,constraints:{snapToZoom:!1,rotationEnabled:!1},ui:{components:["zoom"]}}),this._imageViewer.addHandles([this._imageViewer.on("click",(async e=>{if(0===e.button&&this._currentImage&&this._currentImage&&this._currentImage.fullExtent){const{xmin:t,xmax:i,ymin:r,ymax:o}=this._currentImage.fullExtent,{x:s,y:a}=e.mapPoint;if(t>s||i<s||o<a||r>a)return;this.plotReferencePointOnImage(e.mapPoint);const n=this.getSelectedFeature();if(n){const t=(await F([e.mapPoint.toJSON()],{feature:n,currentCoveragePolygon:this.getSelectedFeaturePolygon(),imageProperties:this._currentImage.rasterInfo,options:{signal:this._transformController?.signal}}))[0];t&&this.plotReferencePointOnGround(t)}}})),l((()=>this._imageViewer?.viewpoint),(e=>{e&&(this._cancelCurrentCoverageUpdate(),this.updateCoverage())}))])}toggleAdditionalCameraLocations(){this._additionalFeatureGraphics?.forEach((e=>{e.visible=!e.visible}))}toggleAdditionalCoverage(){this._additionalCoveragePolygons?.forEach((e=>{e.visible=!e.visible}))}toggleCurrentCoverage(){this._currentCoveragePolygon&&(this._currentCoveragePolygon.visible=!this._currentCoveragePolygon.visible,this._selectedFeatureGraphic.visible=!this._selectedFeatureGraphic)}_cancelFetchingFeatures(){const e=this._fetchFeaturesController;e&&e.abort(),this._fetchFeaturesController=null}_cancelCurrentCoverageUpdate(){const e=this._updateCoverageController;e&&e.abort("Multiple Coverage Updates: Aborting Current Coverage Update to sync image and coverage"),this._updateCoverageController=null}async _fetchFeatures(e,t){const{screenPoint:i}=e,r=this.activeLayer;if(r){const e={include:r};return this.view.hitTest(i,e).then((e=>this._processHitTestResults(r,e,t)))}return null}_fetchFeaturesWithController(e){this._cancelFetchingFeatures(),this._isLoading=!0;const t=new AbortController,{signal:i}=t;this._fetchFeaturesController=t;const r=this._fetchFeatures(e,{signal:i});this._processFeatureResponse(r,e,{signal:i})}_processFeatureResponse(e,r,o){this.initialCurrentCoverageUpdate=!1,e.then((async e=>{if(e){const s=o.signal,{features:n}=e;this._updateFeatures(n);const l=n.map((e=>({feature:e,...C(e)}))).map((e=>{const{feature:t}=e;return t.attributes.isInspection&&(e.polygon=P(t)),t.layer.coveragePercent&&(e.polygon=w(e.polygon,t.layer.coveragePercent)),e})).filter((({polygon:e})=>I(e,r.mapPoint))),g=l.map((e=>e.feature)),h=await f({features:g,selectedPoint:r.mapPoint,camera:"3d"===this.view.type?this.view.camera:null,currentImage:this.selectedFeature,polygons:l.map((e=>e.polygon))});h?.sort(((e,t)=>e.suitability-t.suitability));const c=h[0]?.feature;this.selectedFeature=c,this.coveragePolygons=new i,this.coverageFrustums=new i,this.pointSources=new i,l.forEach((({polygon:e,frustum:t,feature:i})=>{const r=e.toJSON(),o=t?.toJSON(),{attributes:s}=i,{averageHeightAboveGround:a,cameraHeading:n,location:l,objectId:g}=s,h="toJSON"in l?l.toJSON():l;Object.defineProperty(r,"imageID",{value:g}),Object.defineProperty(o,"imageID",{value:g}),Object.defineProperty(h,"imageID",{value:g}),h.z=a,this.pointSources?.push(h),n>0?(this.coveragePolygons?.push(r),this.coverageFrustums?.push(o)):(this.coveragePolygons?.push(void 0),this.coverageFrustums?.push(void 0))})),this._currentCoveragePolygon&&(this._currentCoveragePolygon.destroy(),this._currentCoveragePolygon=null,this._initialCurrentCoveragePolygon=null),this._additionalCoveragePolygons=new i;for(const e of this.coveragePolygons)e?.imageID===this.selectedFeature?.attributes.objectId?(this._currentCoveragePolygon=new t({attributes:{imageID:e?.imageID},geometry:{type:"polygon",...e},symbol:O,visible:!1}),this._initialCurrentCoveragePolygon=this._currentCoveragePolygon.clone()):this._additionalCoveragePolygons.push(new t({attributes:{imageID:e?.imageID},geometry:{type:"polygon",...e},symbol:G,visible:!1}));if(this.view){this._overlays?.removeAll(),this._additionalFeatureGraphics=new i;for(const e of this.pointSources)e.imageID===this.selectedFeature?.attributes.objectId?this._selectedFeatureGraphic=new t({attributes:{imageID:e.imageID},geometry:{type:"point",...e},symbol:j}):this._additionalFeatureGraphics?.push(new t({attributes:{imageID:e.imageID},geometry:{type:"point",...e},symbol:M,visible:!1}));this._overlays?.graphics.addMany(this._additionalCoveragePolygons),this._overlays?.graphics.addMany(this._additionalFeatureGraphics),this._currentCoveragePolygon&&this._overlays?.add(this._currentCoveragePolygon),this._overlays?.add(this._selectedFeatureGraphic),this._overlays?.add(new t({geometry:{type:"point",...r.mapPoint.toJSON()},symbol:R}))}else a((()=>this.initialCurrentCoverageUpdate)).then((e=>{if(e){const e={points:this.pointSources?.filter((e=>e?.imageID!==this.selectedFeature?.attributes.objectId)),frustums:this.coverageFrustums?.filter((e=>e?.imageID!==this.selectedFeature?.attributes.objectId)),polygons:this._additionalCoveragePolygons?.map((e=>e.geometry?.toJSON())),currentPoint:this.selectedFeature?.geometry,currentPolygon:this._currentCoveragePolygon,currentFrustum:this.coverageFrustums?.find((e=>e?.imageID===this.selectedFeature?.attributes.objectId))};this.emit("plot-polygons",{data:e})}}));await this.loadImage(this.selectedFeature,r.mapPoint,{signal:s}),this._isLoading=!1}})).catch((e=>{throw e})).finally((()=>{this._isLoading=!1}))}_processHitTestResults(e,t,i){const{screenPoint:r,results:o}=t,s=this.view.toMap(r),a=o[0],n={layerInstanceOrURL:e,point:s,queryParams:{maximumDistance:e.maximumDistance,objectIds:this.shouldShowSelectedImage?[a.graphic.attributes.id]:void 0,outSpatialReference:s.spatialReference},queryFeatures:null};return v(n,i)}_updateFeatures(e){e.length&&(this.features=e)}plotReferencePoint(e){"mapPoint"in e?this.plotReferencePointOnGround(e.mapPoint):this.plotReferencePointOnGround(e)}updateCurrentCoveragePolygon(e){if(this.view){const t=this._currentCoveragePolygon&&this._overlays?this._overlays.graphics.indexOf(this._currentCoveragePolygon):-1;e&&(this._currentCoveragePolygon&&(this._overlays?.remove(this._currentCoveragePolygon),this._currentCoveragePolygon.destroy()),e.visible=this.isCurrentCoverageVisible,this._currentCoveragePolygon=e,this._overlays?.graphics.add(this._currentCoveragePolygon,t>=0?t:void 0))}else e&&this.emit("update-current-coverage",{graphic:e.toJSON()})}async loadImage(e,i,r){if(!this._imageViewer)return;if(this._imageViewer.graphics.removeAll(),this._currentImage&&this._imageViewer?.map.layers.includes(this._currentImage)&&(this._currentImage?.removeHandles("image-handles"),this._imageViewer?.map.layers.remove(this._currentImage),this._currentImage?.destroy(),this._currentImage=null),!e)return void this.setMessage("noImageError","error");const s=e.layer?.affixes;let a=e.attributes.image;if(s){const{imagePathPrefix:e,imagePathSuffix:t}=s;e&&(a=e.trim()+"/"+a),t&&(a=a+"/"+t.trim())}this._referencePointOnGround&&(this._imageViewer?.graphics.remove(this._referencePointOnGround),this._referencePointOnGround.destroy());const n={skipExtensions:["aux.xml","jgw"]};this._currentImage=new _({ioConfig:n,url:a,options:r}),this._imageViewer.map.layers.add(this._currentImage);try{const r=await this._currentImage.when();this._imageViewer.extent=r.fullExtent,r.raster.rasterInfo.isPseudoSpatialReference&&(this._imageViewer.constraints.rotationEnabled=!0,this._imageViewer.rotation=e.attributes.cameraRoll+(e.attributes.imageRotation??0),this._imageViewer.constraints.rotationEnabled=!1);const{pixelSize:o}=r.rasterInfo;b([i],{feature:e,imageProperties:r.rasterInfo,currentCoveragePolygon:this.getSelectedFeaturePolygon(),options:{signal:this._fetchFeaturesController?.signal}}).then((async e=>{if(!e.length)return;const i=e[0];if(!i)return;const s=m(p,await S(r.fullExtent,m(D,this._imageViewer?.spatialReference)));i.x=i.x*o.x+s.xmin,i.y=s.ymax-i.y*o.y,i.spatialReference=s.spatialReference,this._crossSymbol&&(this._imageViewer?.graphics.remove(this._crossSymbol),this._crossSymbol.destroy()),this._crossSymbol=new t({geometry:{type:"point",...i},symbol:R}),this._imageViewer?.graphics.add(this._crossSymbol)})),this._panConstraint&&this._imageViewer?.constraints.customConstraints.remove(this._panConstraint),this._panConstraint={constrain:(e,t)=>{if(!this._currentImage||!this._imageViewer||!e.targetGeometry)return e;const{xmin:i,xmax:r,ymin:o,ymax:s}=this._currentImage.fullExtent,{width:a,height:n}=this._imageViewer.extent,l=this._imageViewer?.rotation*Math.PI/180,g=Math.cos(l)*a+Math.sin(l)*n,h=Math.cos(l)*n+Math.sin(l)*a,{width:c,height:u}=this._currentImage.rasterInfo;return e.targetGeometry.x=Math.min(Math.max(i+(c>g?g:c)/2,e.targetGeometry.x),r-(c>g?g:c)/2),e.targetGeometry.y=Math.min(Math.max(o+(u>h?h:u)/2,e.targetGeometry.y),s-(u>h?h:u)/2),e}},this._scaleConstraint&&this._imageViewer?.constraints.customConstraints.remove(this._scaleConstraint),this._scaleConstraint={constrain:(e,t)=>{if(this._imageViewer&&this._currentImage){const{width:t,height:i}=this._currentImage.rasterInfo,{width:r,height:o}=this._imageViewer;e.scale=Math.min(e.scale,x(this._imageViewer.spatialReference)*Math.max(t/r,i/o))}return e}},this._imageViewer?.constraints.customConstraints.add(this._panConstraint),this._imageViewer?.constraints.customConstraints.add(this._scaleConstraint),r.addHandles([g((()=>this._imageViewer?.stationary),(e=>{e&&this._imageViewer?.viewpoint&&this._panConstraint?.constrain(this._imageViewer?.viewpoint)}),h)])}catch(l){o.getLogger(this.declaredClass).error("oriented-imagery-viewer:load-image",l)}}async plotImagePointOnGround(e){if(!this._imageViewer)return;const t=this._currentImage;if(!t)return;const{feature:i,selectedLocation:r,options:o}=e,{pixelSize:s,isPseudoSpatialReference:a,transform:n}=t.rasterInfo,l=await b([r],{feature:i,imageProperties:t.rasterInfo,currentCoveragePolygon:this.getSelectedFeaturePolygon(),options:o});if(!l.length)return;let g=l[0];const h=await S(t.fullExtent,this._imageViewer.spatialReference,null,o?.signal);a?(g.x=g.x*s.x+h.xmin,g.y=h.ymax-g.y*s.y,g.spatialReference=h.spatialReference):g=n.forwardTransform(new A(g)),this.plotReferencePointOnImage(g)}plotReferencePointOnGround(e){this._referencePointOnGround&&(this._overlays?.remove(this._referencePointOnGround),this._referencePointOnGround.destroy()),this._referencePointOnGround=new t({geometry:{type:"point",...e.toJSON()},symbol:L}),this._overlays?.add(this._referencePointOnGround)}plotReferencePointOnImage(e){this._imageViewer&&(this._referencePointOnImage&&(this._imageViewer.graphics.remove(this._referencePointOnImage),this._referencePointOnImage.destroy()),this._referencePointOnImage=new t({geometry:{type:"point",..."toJSON"in e?e.toJSON():e},symbol:L}),this._imageViewer.graphics.add(this._referencePointOnImage))}setMessage(e,t,i){this.displayMessage={key:e,type:t,data:i}}async updateCoverage(){const e=new AbortController,{signal:i}=e;this._updateCoverageController=e;const{_imageViewer:r}=this;if(this._currentImage&&r){const{width:e,height:o}=this._currentImage.rasterInfo,{xmin:s,xmax:a,ymin:n,ymax:l}=this._currentImage.fullExtent,g=[[0,0],[Math.min(r.width,e),0],[Math.min(r.width,e),Math.min(r.height,o)],[0,Math.min(r.height,o)]].map((e=>r.toMap(c(e[0],e[1]))));g.forEach((e=>{e.x=s<=e.x&&e.x<=a?e.x:Math.abs(s-e.x)>Math.abs(a-e.x)?a:s,e.y=n<=e.y&&e.y<=l?e.y:Math.abs(n-e.y)>Math.abs(l-e.y)?l:n}));const h=await F(g,{feature:this.getSelectedFeature(),currentCoveragePolygon:this.getSelectedFeaturePolygon(),imageProperties:this._currentImage.rasterInfo,options:{signal:i}});if(h&&!i.aborted){const e=[h.map((e=>[e.x,e.y,1]))];e[0].push(e[0][0]);const i=new E({hasZ:!0,rings:e,spatialReference:h[0].spatialReference});this.updateCurrentCoveragePolygon(new t({geometry:i,symbol:O,visible:this.isCurrentCoverageVisible}))}}}};e([u()],J.prototype,"active",null),e([u()],J.prototype,"activeLayer",void 0),e([u()],J.prototype,"shouldShowSelectedImage",void 0),e([u()],J.prototype,"coverageFrustums",void 0),e([u()],J.prototype,"coveragePolygons",void 0),e([u()],J.prototype,"currentImageView",null),e([u()],J.prototype,"displayMessage",void 0),e([u()],J.prototype,"initialCurrentCoverageUpdate",void 0),e([u()],J.prototype,"pointSources",void 0),e([u()],J.prototype,"selectedFeature",void 0),e([u()],J.prototype,"selectedPoint",void 0),e([u({readOnly:!0})],J.prototype,"featureCount",null),e([u()],J.prototype,"features",void 0),e([u()],J.prototype,"hasImageLoaded",null),e([u()],J.prototype,"isAdditionalCoverageDisabled",null),e([u()],J.prototype,"isAdditionalCoverageVisible",null),e([u()],J.prototype,"isAdditionalPointSourcesDisabled",null),e([u()],J.prototype,"isAdditionalPointSourcesVisible",null),e([u()],J.prototype,"isCurrentCoverageDisabled",null),e([u()],J.prototype,"isCurrentCoverageVisible",null),e([u()],J.prototype,"isLoading",null),e([u()],J.prototype,"state",null),e([u()],J.prototype,"view",null),e([u()],J.prototype,"_additionalCoveragePolygons",void 0),e([u()],J.prototype,"_additionalFeatureGraphics",void 0),e([u()],J.prototype,"_currentCoveragePolygon",void 0),e([u()],J.prototype,"_currentImage",void 0),e([u()],J.prototype,"_imageViewer",void 0),e([u()],J.prototype,"_initialCurrentCoveragePolygon",void 0),e([u()],J.prototype,"_isLoading",void 0),e([u()],J.prototype,"_overlays",void 0),e([u()],J.prototype,"_referencePointOnGround",void 0),e([u()],J.prototype,"_referencePointOnImage",void 0),e([u()],J.prototype,"_selectedFeatureGraphic",void 0),J=e([d("esri.widgets.OrientedImageryViewer.OrientedImageryViewerViewModel")],J);const N=J;export{N as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import r from"../../core/Collection.js";import i from"../../core/Evented.js";import o from"../../core/Logger.js";import{destroyMaybe as s}from"../../core/maybe.js";import{once as a,on as n,watch as l,when as g,syncAndInitial as h}from"../../core/reactiveUtils.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import{ensureType as m}from"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import p from"../../geometry/Extent.js";import y from"../../layers/GraphicsLayer.js";import _ from"../../layers/ImageryTileLayer.js";import{searchImages as v}from"../../layers/orientedImagery/queries.js";import{calculateSuitabilities as f}from"../../layers/orientedImagery/core/bestImageUtils.js";import{createCoveragePolygon as C,computePolygonForInspection as w,resizePolygon as P,checkIfPolygonContainsSelectedPoint as I}from"../../layers/orientedImagery/core/coverageUtils.js";import{updateElevation as b,transformPoints as F}from"../../layers/orientedImagery/transformations/groundToImageUtils.js";import{transformPoints as V}from"../../layers/orientedImagery/transformations/imageToGroundUtils.js";import S from"../../views/MapView.js";import{getResolutionToScaleFactor as x}from"../../views/2d/viewpointUtils.js";import{projectWithEngineOrService as O}from"../../views/support/projectionUtils.js";import{activePolygonSymbol as G,polygonSymbol as M,activeSourcePointSymbol as j,sourcePointSymbol as R,crossSymbol as L,diamondSymbol as D}from"./symbols.js";import A from"../../geometry/Polygon.js";import E from"../../geometry/SpatialReference.js";import U from"../../geometry/Point.js";const J={click:"view-click",view:"view",viewLayers:"view-layers",mapLayers:"map-layers",layerViews:"layer-views",layerListMode:"layer-list-mode",children:"children",registerLayerSelection:"register-layer-selection",plotPointOnGround:"plot-point-on-ground"};function N(e){return"3d"===e?.type}function T(e){return"esri.Graphic"===e?.declaredClass}let k=class extends i.EventedAccessor{constructor(e){super(e),this.activeLayer=null,this.shouldShowSelectedImage=!1,this.coverageFrustums=null,this.coveragePolygons=null,this.displayMessage=null,this.pointSources=null,this.selectedFeature=null,this.selectedPoint=null,this.features=null,this._additionalCoveragePolygons=null,this._additionalFeatureGraphics=null,this._currentCoveragePolygon=null,this._currentImage=null,this._fetchFeaturesController=null,this._imageViewer=null,this._initialCurrentCoveragePolygon=null,this._initialCurrentCoverageUpdate=!0,this._overlays=null,this._referencePointOnGround=null,this._referencePointOnImage=null,this._crossSymbol=null,this._panConstraint=null,this._scaleConstraint=null,this._transformController=new AbortController,this._updateCoverageController=null,this.loadViewer=this.loadViewer.bind(this),this.searchBestImage=this.searchBestImage.bind(this)}initialize(){a((()=>this.view?.ready)).then((()=>{this._overlays=new y({listMode:"hide"}),this.view.map.layers.add(this._overlays)})),this.addHandles(n((()=>this.view),"click",(e=>{this.view.ready&&this.active&&(e.stopPropagation(),e.preventDefault(),"mouse"===e.pointerType&&0!==e.button||(e.native.altKey?(this.plotReferencePoint(e),this.plotImagePointOnGround({feature:this.selectedFeature,selectedLocation:e.mapPoint,options:{signal:this._transformController?.signal}})):(this.displayMessage=null,this.selectedPoint=e.mapPoint,this.features=null,this.selectedFeature=null,this._overlays?.removeAll(),this._overlays?.add(new t({geometry:e.mapPoint.clone(),symbol:L})),this._fetchFeaturesWithController(e))))})),J.view)}destroy(){this._cancelCurrentCoverageUpdate(),this._cancelFetchingFeatures(),this.coverageFrustums=null,this.coveragePolygons=null,this.pointSources=null,this._additionalCoveragePolygons=null,this._additionalFeatureGraphics=null,this._currentImage=s(this._currentImage),this._imageViewer=s(this._imageViewer),this._initialCurrentCoveragePolygon=s(this._initialCurrentCoveragePolygon),this._currentCoveragePolygon=s(this._currentCoveragePolygon),this._crossSymbol=s(this._crossSymbol),this._referencePointOnGround=s(this._referencePointOnGround),this._referencePointOnImage=s(this._referencePointOnImage),this._overlays=s(this._overlays)}get active(){return!0===this.view?.map?.allLayers.some((e=>"oriented-imagery"===e.type&&e.loaded))}get currentImageView(){return this._imageViewer?.allLayerViews.find((e=>e.layer===this._currentImage))}get featureCount(){return this.features?.length??0}get hasImageLoaded(){return!!this._currentImage}get isAdditionalCoverageDisabled(){return!this._additionalCoveragePolygons?.length}get isAdditionalCoverageVisible(){return this._additionalCoveragePolygons?.getItemAt(0)?.visible??!1}get isAdditionalPointSourcesDisabled(){return!this._additionalFeatureGraphics?.length}get isAdditionalPointSourcesVisible(){return this._additionalFeatureGraphics?.getItemAt(0)?.visible??!1}get isCurrentCoverageDisabled(){return!this._currentCoveragePolygon}get isCurrentCoverageVisible(){return!!this._currentCoveragePolygon?.visible}get updating(){return!(this._imageViewer?.stationary??1)||(this.currentImageView?.updating??!1)||"loading"===this._currentImage?.loadStatus||!!this._fetchFeaturesController}get state(){const{active:e,hasImageLoaded:t,updating:r}=this;return r?"loading":t?"image-loaded":e?"ready":"disabled"}set view(e){this._set("view",e)}getCurrentCoveragePolygon(){return this._currentCoveragePolygon}getSelectedFeature(){return this.selectedFeature}getSelectedFeaturePolygon(){return this._initialCurrentCoveragePolygon}loadViewer(e){const t=new Map,r={wkid:0};this._imageViewer=new S({container:e,map:t,spatialReferance:r,constraints:{snapToZoom:!1,rotationEnabled:!1},ui:{components:["zoom"]}}),a((()=>this._imageViewer?.stationary)).then((()=>{this.setMessage("onLoadMessage","info")})),this._imageViewer.addHandles([this._imageViewer.on("click",(async e=>{if(0===e.button&&this._currentImage&&this._currentImage&&this._currentImage.fullExtent){const{xmin:t,xmax:r,ymin:i,ymax:o}=this._currentImage.fullExtent,{x:s,y:a}=e.mapPoint;if(t>s||r<s||o<a||i>a)return;this.plotReferencePointOnImage(e.mapPoint);const n=this.getSelectedFeature();if(n){const t=(await V([e.mapPoint.toJSON()],{feature:n,currentCoveragePolygon:this.getSelectedFeaturePolygon(),imageProperties:this._currentImage.rasterInfo,options:{signal:this._transformController?.signal}}))[0];t&&this.plotReferencePointOnGround(t)}}})),l((()=>[this._imageViewer?.viewpoint,this._initialCurrentCoveragePolygon]),(()=>{this._imageViewer?.viewpoint&&this._initialCurrentCoveragePolygon&&(this._cancelCurrentCoverageUpdate(),this.updateCoverage())})),l((()=>this.selectedFeature),(async()=>{const{_fetchFeaturesController:e,selectedFeature:t,selectedPoint:r}=this;!t&&this._currentImage&&(this._imageViewer?.map.layers.remove(this._currentImage),this._currentImage=s(this._currentImage)),t&&r&&(await this.loadImage(t,{signal:e?.signal}),this.transformAndPlotSelectedLocation({signal:this._fetchFeaturesController?.signal}))}))])}async searchBestImage(e,t){try{const r=await v(e,t);r&&await this._processFeatureResponse(r,{signal:t?.signal})}catch(r){const e=o.getLogger(this);this.setMessage("imageLoadError","error"),e.error("error occured while finding best image",r)}}toggleAdditionalCameraLocations(){this._additionalFeatureGraphics?.forEach((e=>{e.visible=!e.visible}))}toggleAdditionalCoverage(){this._additionalCoveragePolygons?.forEach((e=>{e.visible=!e.visible}))}toggleCurrentCoverage(){this._currentCoveragePolygon&&(this._currentCoveragePolygon.visible=!this._currentCoveragePolygon.visible,this._selectedFeatureGraphic.visible=!this._selectedFeatureGraphic)}_cancelFetchingFeatures(){const e=this._fetchFeaturesController;e&&e.abort(),this._fetchFeaturesController=null}_cancelCurrentCoverageUpdate(){const e=this._updateCoverageController;e&&e.abort("Multiple Coverage Updates: Aborting Current Coverage Update to sync image and coverage"),this._updateCoverageController=null}async _fetchFeatures(e,t){const{screenPoint:r}=e,i=this.activeLayer;if(i){const e={include:i},o=await this.view.hitTest(r,e);this._processHitTestResults(i,o,t)}}async _fetchFeaturesWithController(e){this._cancelFetchingFeatures();const t=new AbortController,{signal:r}=t;this._fetchFeaturesController=t;try{this._fetchFeatures(e,{signal:r})}catch(i){const e=o.getLogger(this);this.setMessage("imageLoadError","error"),e.error("error occured while fetching features",i)}this._fetchFeaturesController=null}async _processFeatureResponse(e,i){const{selectedPoint:o}=this;if(!o)return;if(!e)return;const s=await e;if(this._fetchFeaturesController=null,!s)return;const{features:a}=s;if(!a.length)return this.setMessage("noImageError","error"),void(this.selectedFeature=null);const n=new Array;this.coveragePolygons=new r,this.coverageFrustums=new r,this.pointSources=new r,a.forEach((e=>{let t;const{polygon:r,frustum:i}=C(e);if(t=r,e.attributes.isInspection&&(t=w(e.attributes)),e.layer.coveragePercent&&(t=P(t,e.layer.coveragePercent)),I(t,o)){n.push(e);const r=t.toJSON(),o=i?.toJSON(),{attributes:s}=e,{cameraHeight:a,cameraHeading:l,location:g,objectId:h}=s,c="toJSON"in g?g.toJSON():g;r.imageID=c.imageID=h,o&&(o.imageID=h),c.z=a,this.pointSources?.push(c),this.coveragePolygons?.push(l>0?r:void 0),this.coverageFrustums?.push(l>0?o:void 0)}}));const l=this.coveragePolygons?.getItemAt(0);if(!n.length)return void this.setMessage("noImageError","error");if(n[0].attributes.elevationSource&&!o.z&&l){const e=await b([o],{feature:n[0],currentCoveragePolygon:new A(l),options:i});if(e[0]){const t=e[0];o.elevation=t.z}}const g=f({features:n,selectedPoint:o,camera:N(this.view)?this.view.camera:null,currentImage:this.selectedFeature});g?.sort(((e,t)=>e.suitability-t.suitability));const h=g?.map((e=>e.feature)),c=h[0];this._updateFeatures(h),this._additionalCoveragePolygons=new r,this._additionalFeatureGraphics=new r,this._currentCoveragePolygon&&(this._currentCoveragePolygon.destroy(),this._currentCoveragePolygon=null,this._initialCurrentCoveragePolygon=null);for(const r of this.coveragePolygons)r?.imageID===c?.attributes.objectId?this._initialCurrentCoveragePolygon=new t({attributes:{imageID:r?.imageID},geometry:{type:"polygon",...r},symbol:G,visible:!1}):this._additionalCoveragePolygons.push(new t({attributes:{imageID:r?.imageID},geometry:{type:"polygon",...r},symbol:M,visible:!1}));for(const r of this.pointSources)r.imageID===c?.attributes.objectId?this._selectedFeatureGraphic=new t({attributes:{imageID:r.imageID},geometry:{type:"point",...r},symbol:j,visible:!1}):this._additionalFeatureGraphics?.push(new t({attributes:{imageID:r.imageID},geometry:{type:"point",...r},symbol:R,visible:!1}));this.selectedFeature=c,this._initialCurrentCoverageUpdate=!0}async _processHitTestResults(e,t,r){const{screenPoint:i,results:o}=t,s=this.view.toMap(i),a=o[0],n={layerInstanceOrURL:e,point:s,queryParams:{maximumDistance:e.maximumDistance,objectIds:this.shouldShowSelectedImage?[a.graphic.attributes.id]:void 0,outSpatialReference:s.spatialReference},queryFeatures:null};await this.searchBestImage(n,r)}async _updateFeatures(e){e.length&&(this.features=new r(e),this.notifyChange("features"))}plotReferencePoint(e){"mapPoint"in e?this.plotReferencePointOnGround(e.mapPoint):this.plotReferencePointOnGround(e)}updateCurrentCoveragePolygon(e){if(this._initialCurrentCoverageUpdate)if(this._initialCurrentCoverageUpdate=!1,e&&(this._currentCoveragePolygon&&(this._overlays?.remove(this._currentCoveragePolygon),this._currentCoveragePolygon.destroy()),e.visible=this.isCurrentCoverageVisible,this._currentCoveragePolygon=e),this.view)this._overlays?.graphics.addMany([...this._additionalCoveragePolygons??[],...this._additionalFeatureGraphics??[],this._currentCoveragePolygon,this._selectedFeatureGraphic].filter(T));else{const e={points:this.pointSources?.filter((e=>e?.imageID!==this.selectedFeature?.attributes.objectId)),frustums:this.coverageFrustums?.filter((e=>e?.imageID!==this.selectedFeature?.attributes.objectId)),polygons:this._additionalCoveragePolygons?.map((e=>e.geometry?.toJSON())),currentPoint:this.selectedFeature?.geometry,currentPolygon:this._currentCoveragePolygon,currentFrustum:this.coverageFrustums?.find((e=>e?.imageID===this.selectedFeature?.attributes.objectId))};this.emit("plot-polygons",{data:e})}else if(this.view){const t=this._currentCoveragePolygon&&this._overlays?this._overlays.graphics.indexOf(this._currentCoveragePolygon):-1;e&&(this._currentCoveragePolygon&&(this._overlays?.remove(this._currentCoveragePolygon),this._currentCoveragePolygon.destroy()),e.visible=this.isCurrentCoverageVisible,this._currentCoveragePolygon=e,this._overlays?.graphics.add(this._currentCoveragePolygon,t>=0?t:void 0))}else e&&this.emit("update-current-coverage",{graphic:e.toJSON()})}async loadImage(e,t){if(!this._imageViewer)return;if(this._imageViewer.graphics.removeAll(),this._currentImage&&this._imageViewer?.map.layers.includes(this._currentImage)&&(this._currentImage?.removeHandles("image-handles"),this._imageViewer?.map.layers.remove(this._currentImage),this._currentImage?.destroy(),this._currentImage=null),!e)return void this.setMessage("noImageError","error");const r=e.attributes.image;this._referencePointOnGround&&(this._imageViewer?.graphics.remove(this._referencePointOnGround),this._referencePointOnGround.destroy());const i={skipExtensions:["aux.xml","jgw"]};this._currentImage=new _({ioConfig:i,url:r,options:t}),this._imageViewer.map.layers.add(this._currentImage);try{const t=await this._currentImage.when();this._imageViewer.extent=t.fullExtent,t.raster.rasterInfo.isPseudoSpatialReference&&(this._imageViewer.constraints.rotationEnabled=!0,this._imageViewer.rotation=(e.attributes.cameraRoll??0)+(e.attributes.imageRotation??0),this._imageViewer.constraints.rotationEnabled=!1),this._panConstraint&&this._imageViewer?.constraints.customConstraints.remove(this._panConstraint),this._panConstraint={constrain:(e,t)=>{if(!this._currentImage||!this._imageViewer||!e.targetGeometry)return e;const{xmin:r,xmax:i,ymin:o,ymax:s}=this._currentImage.fullExtent,{width:a,height:n}=this._imageViewer.extent,l=this._imageViewer?.rotation*Math.PI/180,g=Math.abs(Math.cos(l)*a+Math.sin(l)*n),h=Math.abs(Math.cos(l)*n+Math.sin(l)*a),{width:c,height:u}=this._currentImage.rasterInfo;return e.targetGeometry.x=Math.min(Math.max(r+(c>g?g:c)/2,e.targetGeometry.x),i-(c>g?g:c)/2),e.targetGeometry.y=Math.min(Math.max(o+(u>h?h:u)/2,e.targetGeometry.y),s-(u>h?h:u)/2),e}},this._scaleConstraint&&this._imageViewer?.constraints.customConstraints.remove(this._scaleConstraint),this._scaleConstraint={constrain:(e,t)=>{if(this._imageViewer&&this._currentImage){const{width:t,height:r}=this._currentImage.rasterInfo,{width:i,height:o}=this._imageViewer;e.scale=Math.min(e.scale,x(this._imageViewer.spatialReference)*Math.max(t/i,r/o))}return e}},this._imageViewer?.constraints.customConstraints.add(this._panConstraint),this._imageViewer?.constraints.customConstraints.add(this._scaleConstraint),t.addHandles([g((()=>this._imageViewer?.stationary),(e=>{e&&this._imageViewer?.viewpoint&&this._panConstraint?.constrain(this._imageViewer?.viewpoint)}),h)])}catch(s){o.getLogger(this.declaredClass).error("oriented-imagery-viewer:load-image",s)}}async transformAndPlotSelectedLocation(e){const{_currentImage:r,selectedFeature:i,selectedPoint:o}=this;if(!o||!i||!r)return;const{pixelSize:s}=r.rasterInfo,a=await F([o],{feature:i,imageProperties:r.rasterInfo,currentCoveragePolygon:this.getSelectedFeaturePolygon(),options:e});if(!a.length)return;const n=a[0];if(!n)return;const l=m(p,await O(r.fullExtent,m(E,this._imageViewer?.spatialReference),null,e?.signal));n.x=n.x*s.x+l.xmin,n.y=l.ymax-n.y*s.y,n.spatialReference=l.spatialReference,this._crossSymbol&&(this._imageViewer?.graphics.remove(this._crossSymbol),this._crossSymbol.destroy()),this._crossSymbol=new t({geometry:U.fromJSON(n),symbol:L}),this._imageViewer?.graphics.add(this._crossSymbol)}async plotImagePointOnGround(e){if(!this._imageViewer)return;const t=this._currentImage;if(!t)return;const{feature:r,selectedLocation:i,options:o}=e,{pixelSize:s,isPseudoSpatialReference:a,transform:n}=t.rasterInfo,l=await F([i],{feature:r,imageProperties:t.rasterInfo,currentCoveragePolygon:this.getSelectedFeaturePolygon(),options:o});if(!l.length)return;let g=l[0];const h=await O(t.fullExtent,this._imageViewer.spatialReference,null,o?.signal);a?(g.x=g.x*s.x+h.xmin,g.y=h.ymax-g.y*s.y,g.spatialReference=h.spatialReference):g=n.forwardTransform(new U(g)),this.plotReferencePointOnImage(g)}plotReferencePointOnGround(e){this._referencePointOnGround&&(this._overlays?.remove(this._referencePointOnGround),this._referencePointOnGround.destroy()),this._referencePointOnGround=new t({geometry:{type:"point",...e.toJSON()},symbol:D}),this._overlays?.add(this._referencePointOnGround)}plotReferencePointOnImage(e){this._imageViewer&&(this._referencePointOnImage&&(this._imageViewer.graphics.remove(this._referencePointOnImage),this._referencePointOnImage.destroy()),this._referencePointOnImage=new t({geometry:{type:"point",..."toJSON"in e?e.toJSON():e},symbol:D}),this._imageViewer.graphics.add(this._referencePointOnImage))}setMessage(e,t,r){this.displayMessage={key:e,type:t,data:r}}async updateCoverage(){const e=new AbortController,{signal:r}=e;this._updateCoverageController=e;const{_imageViewer:i}=this;if(this._currentImage?.loaded&&i){const{width:e,height:o}=this._currentImage.rasterInfo,{xmin:s,xmax:a,ymin:n,ymax:l}=this._currentImage.fullExtent,g=[[0,0],[Math.min(i.width,e),0],[Math.min(i.width,e),Math.min(i.height,o)],[0,Math.min(i.height,o)]].map((e=>i.toMap(c(e[0],e[1]))));g.forEach((e=>{e.x=s<=e.x&&e.x<=a?e.x:Math.abs(s-e.x)>Math.abs(a-e.x)?a:s,e.y=n<=e.y&&e.y<=l?e.y:Math.abs(n-e.y)>Math.abs(l-e.y)?l:n}));const h=await V(g,{feature:this.getSelectedFeature(),currentCoveragePolygon:this.getSelectedFeaturePolygon(),imageProperties:this._currentImage.rasterInfo,options:{signal:r}});if(h&&!r.aborted){const e=[h.map((e=>[e.x,e.y,1]))];e[0].push(e[0][0]);const r=new A({hasZ:!0,rings:e,spatialReference:h[0].spatialReference});this.updateCurrentCoveragePolygon(new t({geometry:r,symbol:G,visible:this.isCurrentCoverageVisible}))}}}};e([u()],k.prototype,"active",null),e([u()],k.prototype,"activeLayer",void 0),e([u()],k.prototype,"shouldShowSelectedImage",void 0),e([u()],k.prototype,"coverageFrustums",void 0),e([u()],k.prototype,"coveragePolygons",void 0),e([u()],k.prototype,"currentImageView",null),e([u()],k.prototype,"displayMessage",void 0),e([u()],k.prototype,"pointSources",void 0),e([u()],k.prototype,"selectedFeature",void 0),e([u()],k.prototype,"selectedPoint",void 0),e([u({readOnly:!0})],k.prototype,"featureCount",null),e([u()],k.prototype,"features",void 0),e([u()],k.prototype,"hasImageLoaded",null),e([u()],k.prototype,"isAdditionalCoverageDisabled",null),e([u()],k.prototype,"isAdditionalCoverageVisible",null),e([u()],k.prototype,"isAdditionalPointSourcesDisabled",null),e([u()],k.prototype,"isAdditionalPointSourcesVisible",null),e([u()],k.prototype,"isCurrentCoverageDisabled",null),e([u()],k.prototype,"isCurrentCoverageVisible",null),e([u()],k.prototype,"updating",null),e([u()],k.prototype,"state",null),e([u()],k.prototype,"view",null),e([u()],k.prototype,"_additionalCoveragePolygons",void 0),e([u()],k.prototype,"_additionalFeatureGraphics",void 0),e([u()],k.prototype,"_currentCoveragePolygon",void 0),e([u()],k.prototype,"_currentImage",void 0),e([u()],k.prototype,"_fetchFeaturesController",void 0),e([u()],k.prototype,"_imageViewer",void 0),e([u()],k.prototype,"_initialCurrentCoveragePolygon",void 0),e([u()],k.prototype,"_initialCurrentCoverageUpdate",void 0),e([u()],k.prototype,"_overlays",void 0),e([u()],k.prototype,"_referencePointOnGround",void 0),e([u()],k.prototype,"_referencePointOnImage",void 0),e([u()],k.prototype,"_selectedFeatureGraphic",void 0),k=e([d("esri.widgets.OrientedImageryViewer.OrientedImageryViewerViewModel")],k);const H=k;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.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import{cast as t}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import s from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import"./support/widgetUtils.js";import{messageBundle as a}from"./support/decorators/messageBundle.js";import{tsx as d}from"./support/jsxFactory.js";import{isDarkTheme as l}from"../support/themeUtils.js";const c={calciteThemeLight:"calcite-mode-light",calciteThemeDark:"calcite-mode-dark",base:"esri-oriented-imagery-viewer",close:"esri-oriented-imagery-viewer__close",header:"esri-oriented-imagery-viewer__header",body:"esri-oriented-imagery-viewer__body",titleContainer:"esri-oriented-imagery-viewer__title-container",title:"esri-oriented-imagery-viewer__title",viewerContainer:"esri-oriented-imagery-viewer__viewer-container",viewer:"esri-oriented-imagery-viewer__viewer",submenu:"esri-oriented-imagery-viewer__submenu",currentCoverage:"esri-oriented-imagery-viewer__body-current-coverage",addExpPoints:"esri-oriented-imagery-viewer__body-additional-camera-locations",addCoverage:"esri-oriented-imagery-viewer__body-additional-coverage",footprint:"esri-oriented-imagery-viewer__body-footprint",messageBox:"esri-oriented-imagery-viewer__message-box"},m={closeButton:!0,coverageMenu:!0,imageMenu:!0,viewerTools:!0,title:!0};let p=class extends o{constructor(e,i){super(e,i),this.isDocked=!1,this.viewModel=new s,this.messagesCommon=null,this.visibleElements={...m},this._actionItems=new Map,this.renderTitleContainer=this.renderTitleContainer.bind(this),this.renderTitle=this.renderTitle.bind(this),this.renderViewerContainer=this.renderViewerContainer.bind(this),this.renderViewer=this.renderViewer.bind(this)}loadDependencies(){return n({tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js"),action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js")})}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}castVisibleElements(e){return{...m,...e}}_storeActionElement(e){this._actionItems.set(e.text,e)}_toggleAdditionalCameraLocations(){this.viewModel.toggleAdditionalCameraLocations()}_toggleAdditionalCoverage(){this.viewModel.toggleAdditionalCoverage()}_toggleCurrentCoverage(){this.viewModel.toggleCurrentCoverage()}renderActionTooltips(){return[...this._actionItems].map((([e,i])=>d("calcite-tooltip",{key:e,label:e,referenceElement:i},d("span",null,e))))}renderBody(){return d("div",{class:c.body},this.visibleElements.coverageMenu&&this.renderMenuBarContainer(),this.renderViewerContainer())}renderHeader(){return d("div",{class:c.header},this.renderTitleContainer())}renderMenuBarContainer(){const{isCurrentCoverageDisabled:e,isCurrentCoverageVisible:i,isAdditionalCoverageDisabled:t,isAdditionalCoverageVisible:r,isAdditionalPointSourcesDisabled:o,isAdditionalPointSourcesVisible:s}=this.viewModel;return d("calcite-action-bar",{layout:"horizontal",expandDisabled:!0},d("calcite-action-group",{layout:"horizontal"},d("calcite-action",{text:this.messages.currentFootprint,icon:"trapezoid-area",class:c.currentCoverage,bind:this,active:!e&&i,disabled:e,onclick:this._toggleCurrentCoverage,afterCreate:this._storeActionElement}),d("calcite-action",{text:this.messages.additionalFootprints,icon:"trapezoid-area",class:c.addCoverage,bind:this,active:!t&&r,disabled:t,onclick:this._toggleAdditionalCoverage,afterCreate:this._storeActionElement}),d("calcite-action",{text:this.messages.additionalCameraLocations,icon:"circle-area",class:c.addExpPoints,bind:this,disabled:o,active:!o&&s,onclick:this._toggleAdditionalCameraLocations,afterCreate:this._storeActionElement}),this.renderActionTooltips()))}renderMessageBox(){const{displayMessage:e}=this.viewModel;return e?d("span",{class:c.messageBox+"--"+e.type},this.messages[e.key],e?.data):null}renderTitleContainer(){return d("div",{class:c.titleContainer},this.renderTitle())}renderTitle(){return d("span",{class:c.title},this.messages.title)}renderViewerContainer(){return d("div",{class:c.viewerContainer},this.renderViewer(),this.renderMessageBox())}renderViewer(){const{displayMessage:e}=this.viewModel;return d("div",{bind:this,afterCreate:this.viewModel.loadViewer,class:`${c.viewer}${e?"--hide":""}`})}render(){const{isLoading:e}=this.viewModel;return d("calcite-panel",{class:this.classes(`${c.base}--${this.isDocked?"docked":"floating"}`,l()?c.calciteThemeDark:c.calciteThemeLight),bind:this},this.visibleElements.title&&this.renderHeader(),d("calcite-panel",{loading:e},this.renderBody()))}};e([i()],p.prototype,"isDocked",void 0),e([i({type:s})],p.prototype,"viewModel",void 0),e([i(),a("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],p.prototype,"messages",void 0),e([i(),a("esri/t9n/common")],p.prototype,"messagesCommon",void 0),e([i()],p.prototype,"view",null),e([i()],p.prototype,"visibleElements",void 0),e([t("visibleElements")],p.prototype,"castVisibleElements",null),p=e([r("esri.widgets.OrientedImageryViewer")],p);const g=p;export{g as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import{cast as i}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import s from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import"./support/widgetUtils.js";import{messageBundle as a}from"./support/decorators/messageBundle.js";import{tsx as l}from"./support/jsxFactory.js";import{isDarkTheme as c}from"../support/themeUtils.js";const d="esri-oriented-imagery-viewer",m={addCoverage:`${d}__body-additional-coverage`,addExpPoints:`${d}__body-additional-camera-locations`,base:"esri-oriented-imagery-viewer",body:`${d}__body`,calciteThemeDark:"calcite-mode-dark",calciteThemeLight:"calcite-mode-light",close:`${d}__close`,currentCoverage:`${d}__body-current-coverage`,footprint:`${d}__body-footprint`,header:`${d}__header`,messageBox:`${d}__message-box`,submenu:`${d}__submenu`,title:`${d}__title`,titleContainer:`${d}__title-container`,viewer:`${d}__viewer`,viewerContainer:`${d}__viewer-container`},p={closeButton:!0,coverageMenu:!0,imageMenu:!0,viewerTools:!0,title:!0};let g=class extends o{constructor(e,t){super(e,t),this.isDocked=!1,this.viewModel=new s,this.messagesCommon=null,this.visibleElements={...p},this._actionItems=new Map,this.renderTitleContainer=this.renderTitleContainer.bind(this),this.renderTitle=this.renderTitle.bind(this),this.renderViewerContainer=this.renderViewerContainer.bind(this),this.renderViewer=this.renderViewer.bind(this)}loadDependencies(){return n({tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js"),action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js")})}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}castVisibleElements(e){return{...p,...e}}_storeActionElement(e){this._actionItems.set(e.text,e)}_toggleAdditionalCameraLocations(){this.viewModel.toggleAdditionalCameraLocations()}_toggleAdditionalCoverage(){this.viewModel.toggleAdditionalCoverage()}_toggleCurrentCoverage(){this.viewModel.toggleCurrentCoverage()}renderActionTooltips(){return[...this._actionItems].map((([e,t])=>l("calcite-tooltip",{key:e,label:e,referenceElement:t},l("span",null,e))))}renderBody(){return l("div",{class:m.body},this.visibleElements.coverageMenu&&this.renderMenuBarContainer(),this.renderViewerContainer())}renderHeader(){return l("div",{class:m.header},this.renderTitleContainer())}renderMenuBarContainer(){const{isCurrentCoverageDisabled:e,isCurrentCoverageVisible:t,isAdditionalCoverageDisabled:i,isAdditionalCoverageVisible:r,isAdditionalPointSourcesDisabled:o,isAdditionalPointSourcesVisible:s}=this.viewModel;return l("calcite-action-bar",{layout:"horizontal",expandDisabled:!0},l("calcite-action-group",{layout:"horizontal"},l("calcite-action",{text:this.messages.currentFootprint,icon:"trapezoid-area",class:m.currentCoverage,bind:this,active:!e&&t,disabled:e,onclick:this._toggleCurrentCoverage,afterCreate:this._storeActionElement}),l("calcite-action",{text:this.messages.additionalFootprints,icon:"trapezoid-area",class:m.addCoverage,bind:this,active:!i&&r,disabled:i,onclick:this._toggleAdditionalCoverage,afterCreate:this._storeActionElement}),l("calcite-action",{text:this.messages.additionalCameraLocations,icon:"circle-area",class:m.addExpPoints,bind:this,disabled:o,active:!o&&s,onclick:this._toggleAdditionalCameraLocations,afterCreate:this._storeActionElement}),this.renderActionTooltips()))}renderMessageBox(){const{displayMessage:e}=this.viewModel;return e?l("span",{class:m.messageBox+"--"+e.type},this.messages[e.key],e?.data):null}renderTitleContainer(){return l("div",{class:m.titleContainer},this.renderTitle())}renderTitle(){return l("span",{class:m.title},this.messages.title)}renderViewerContainer(){return l("div",{class:m.viewerContainer},this.renderViewer(),this.renderMessageBox())}renderViewer(){const{displayMessage:e}=this.viewModel;return l("div",{bind:this,afterCreate:this.viewModel.loadViewer,class:`${m.viewer}${e?"--hide":""}`})}render(){const{updating:e}=this.viewModel;return l("calcite-panel",{class:this.classes(`${m.base}--${this.isDocked?"docked":"floating"}`,c()?m.calciteThemeDark:m.calciteThemeLight),bind:this},this.visibleElements.title&&this.renderHeader(),l("calcite-panel",{loading:e},this.renderBody()))}};e([t()],g.prototype,"isDocked",void 0),e([t({type:s})],g.prototype,"viewModel",void 0),e([t(),a("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],g.prototype,"messages",void 0),e([t(),a("esri/t9n/common")],g.prototype,"messagesCommon",void 0),e([t()],g.prototype,"view",null),e([t()],g.prototype,"visibleElements",void 0),e([i("visibleElements")],g.prototype,"castVisibleElements",null),g=e([r("esri.widgets.OrientedImageryViewer")],g);const h=g;export{h as default};