@esri/solutions-components 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +3 -3
  2. package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +1 -1
  4. package/dist/cjs/calcite-alert_3.cjs.entry.js +2 -2
  5. package/dist/cjs/calcite-combobox_6.cjs.entry.js +2 -2
  6. package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +16 -9
  7. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
  8. package/dist/cjs/card-manager_3.cjs.entry.js +2 -2
  9. package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
  10. package/dist/cjs/{helpers-ff831524.js → helpers-a0719076.js} +1 -1
  11. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +10 -10
  12. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -2
  13. package/dist/cjs/instant-apps-export.cjs.entry.js +4 -4
  14. package/dist/cjs/instant-apps-header.cjs.entry.js +2 -2
  15. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +3 -3
  16. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -4
  17. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +7 -7
  18. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +6 -6
  19. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +4 -4
  20. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +3 -3
  21. package/dist/cjs/instant-apps-landing-page.cjs.entry.js +1 -1
  22. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +8 -8
  23. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +7 -7
  24. package/dist/cjs/instant-apps-measurement.cjs.entry.js +4 -4
  25. package/dist/cjs/instant-apps-popover.cjs.entry.js +3 -3
  26. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +3 -3
  27. package/dist/cjs/instant-apps-splash.cjs.entry.js +3 -3
  28. package/dist/cjs/{languageSwitcher-cae609d9.js → languageSwitcher-7de41e17.js} +1 -1
  29. package/dist/cjs/layout-manager.cjs.entry.js +1 -1
  30. package/dist/cjs/{loadModules-1d0f0316.js → loadModules-51c30ab9.js} +1 -1
  31. package/dist/cjs/loader.cjs.js +1 -1
  32. package/dist/cjs/{locale-56c3447b.js → locale-9b9d0e94.js} +1 -1
  33. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  34. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  35. package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
  36. package/dist/cjs/solutions-components.cjs.js +1 -1
  37. package/dist/cjs/{utils-41eb3a01.js → utils-35b31785.js} +1 -1
  38. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +5 -5
  39. package/dist/collection/components/edit-card/edit-card.css +3 -3
  40. package/dist/collection/components/info-card/info-card.css +2 -2
  41. package/dist/collection/components/json-editor/json-editor.css +3 -123
  42. package/dist/collection/components/layer-table/layer-table.css +9 -12
  43. package/dist/collection/components/layer-table/layer-table.js +1 -1
  44. package/dist/collection/components/layout-manager/layout-manager.css +73 -73
  45. package/dist/collection/components/map-draw-tools/map-draw-tools.css +1 -1
  46. package/dist/collection/components/map-layer-picker/map-layer-picker.css +5 -3
  47. package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
  48. package/dist/collection/components/map-picker/map-picker.css +3 -3
  49. package/dist/collection/components/map-search/map-search.css +24 -24
  50. package/dist/collection/components/map-select-tools/map-select-tools.css +5 -5
  51. package/dist/collection/components/map-tools/map-tools.css +1 -1
  52. package/dist/collection/components/public-notification/public-notification.css +11 -11
  53. package/dist/collection/components/public-notification/public-notification.js +1 -1
  54. package/dist/collection/components/refine-selection/refine-selection.css +2 -2
  55. package/dist/collection/components/solution-item-details/solution-item-details.css +0 -148
  56. package/dist/collection/components/solution-item-icon/solution-item-icon.css +2 -124
  57. package/dist/collection/components/solution-item-sharing/solution-item-sharing.css +5 -125
  58. package/dist/collection/components/solution-organization-variables/solution-organization-variables.css +6 -126
  59. package/dist/collection/components/solution-resource-item/solution-resource-item.css +6 -126
  60. package/dist/collection/components/solution-variables/solution-variables.css +9 -129
  61. package/dist/collection/demos/browse-solutions.html +2 -0
  62. package/dist/collection/demos/buffer-tools.html +1 -1
  63. package/dist/collection/demos/card-manager.html +2 -2
  64. package/dist/collection/demos/crowdsource-manager.html +3 -3
  65. package/dist/collection/demos/crowdsource-reporter.html +5 -5
  66. package/dist/collection/demos/deduct-calculator.html +1 -1
  67. package/dist/collection/demos/info-card.html +2 -2
  68. package/dist/collection/demos/layer-table.html +2 -2
  69. package/dist/collection/demos/list-item.html +2 -2
  70. package/dist/collection/demos/map-card.html +2 -2
  71. package/dist/collection/demos/map-draw-tools.html +1 -1
  72. package/dist/collection/demos/map-layer-picker.html +1 -1
  73. package/dist/collection/demos/map-select-tools.html +1 -1
  74. package/dist/collection/demos/new-public-notification.html +5 -5
  75. package/dist/collection/demos/pci-calculator.html +1 -1
  76. package/dist/components/crowdsource-manager.js +1 -1
  77. package/dist/components/edit-card2.js +1 -1
  78. package/dist/components/info-card2.js +1 -1
  79. package/dist/components/instant-apps-ckeditor-wrapper2.js +2 -2
  80. package/dist/components/instant-apps-control-panel.js +1 -1
  81. package/dist/components/instant-apps-export.js +2 -2
  82. package/dist/components/instant-apps-filter-list2.js +4 -2
  83. package/dist/components/instant-apps-header2.js +2 -2
  84. package/dist/components/instant-apps-interactive-legend-classic2.js +1 -1
  85. package/dist/components/instant-apps-interactive-legend-count2.js +1 -1
  86. package/dist/components/instant-apps-interactive-legend-group-legend-element-caption.js +5 -5
  87. package/dist/components/instant-apps-interactive-legend-group-legend-element2.js +1 -1
  88. package/dist/components/instant-apps-interactive-legend-layer-element-caption2.js +1 -1
  89. package/dist/components/instant-apps-interactive-legend-layer-element2.js +1 -1
  90. package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +1 -1
  91. package/dist/components/instant-apps-interactive-legend-relationship2.js +1 -1
  92. package/dist/components/instant-apps-interactive-legend.js +1 -1
  93. package/dist/components/instant-apps-keyboard-shortcuts.js +1 -1
  94. package/dist/components/instant-apps-landing-page.js +1 -1
  95. package/dist/components/instant-apps-language-switcher.js +4 -4
  96. package/dist/components/instant-apps-language-translator-item2.js +4 -4
  97. package/dist/components/instant-apps-language-translator-search2.js +1 -1
  98. package/dist/components/instant-apps-language-translator2.js +3 -3
  99. package/dist/components/instant-apps-measurement.js +2 -2
  100. package/dist/components/instant-apps-popover.js +1 -1
  101. package/dist/components/instant-apps-scoreboard.js +1 -1
  102. package/dist/components/instant-apps-social-share2.js +11 -5
  103. package/dist/components/instant-apps-splash.js +1 -1
  104. package/dist/components/json-editor2.js +1 -1
  105. package/dist/components/layer-table2.js +2 -2
  106. package/dist/components/layout-manager.js +1 -1
  107. package/dist/components/loadModules2.js +1 -1
  108. package/dist/components/map-draw-tools2.js +1 -1
  109. package/dist/components/map-layer-picker2.js +2 -2
  110. package/dist/components/map-picker2.js +1 -1
  111. package/dist/components/map-search2.js +1 -1
  112. package/dist/components/map-select-tools2.js +1 -1
  113. package/dist/components/map-tools2.js +1 -1
  114. package/dist/components/public-notification.js +2 -2
  115. package/dist/components/refine-selection2.js +1 -1
  116. package/dist/components/solution-item-details2.js +1 -1
  117. package/dist/components/solution-item-icon2.js +1 -1
  118. package/dist/components/solution-item-sharing2.js +1 -1
  119. package/dist/components/solution-organization-variables2.js +1 -1
  120. package/dist/components/solution-resource-item2.js +1 -1
  121. package/dist/components/solution-variables2.js +1 -1
  122. package/dist/esm/basemap-gallery_7.entry.js +3 -3
  123. package/dist/esm/buffer-tools_3.entry.js +1 -1
  124. package/dist/esm/calcite-action-pad_2.entry.js +1 -1
  125. package/dist/esm/calcite-alert_3.entry.js +2 -2
  126. package/dist/esm/calcite-combobox_6.entry.js +2 -2
  127. package/dist/esm/calcite-input-date-picker_3.entry.js +16 -9
  128. package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
  129. package/dist/esm/card-manager_3.entry.js +2 -2
  130. package/dist/esm/crowdsource-manager.entry.js +1 -1
  131. package/dist/esm/{helpers-e8282221.js → helpers-078591d2.js} +1 -1
  132. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +10 -10
  133. package/dist/esm/instant-apps-control-panel.entry.js +2 -2
  134. package/dist/esm/instant-apps-export.entry.js +4 -4
  135. package/dist/esm/instant-apps-header.entry.js +2 -2
  136. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +3 -3
  137. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -4
  138. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +7 -7
  139. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +6 -6
  140. package/dist/esm/instant-apps-interactive-legend.entry.js +4 -4
  141. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +3 -3
  142. package/dist/esm/instant-apps-landing-page.entry.js +1 -1
  143. package/dist/esm/instant-apps-language-switcher.entry.js +8 -8
  144. package/dist/esm/instant-apps-language-translator.entry.js +7 -7
  145. package/dist/esm/instant-apps-measurement.entry.js +4 -4
  146. package/dist/esm/instant-apps-popover.entry.js +3 -3
  147. package/dist/esm/instant-apps-scoreboard.entry.js +3 -3
  148. package/dist/esm/instant-apps-splash.entry.js +3 -3
  149. package/dist/esm/{languageSwitcher-75765d90.js → languageSwitcher-62232826.js} +1 -1
  150. package/dist/esm/layout-manager.entry.js +1 -1
  151. package/dist/esm/{loadModules-037feea8.js → loadModules-b677d6d7.js} +1 -1
  152. package/dist/esm/loader.js +1 -1
  153. package/dist/esm/{locale-53d724b5.js → locale-89b49505.js} +1 -1
  154. package/dist/esm/map-select-tools_3.entry.js +2 -2
  155. package/dist/esm/public-notification.entry.js +2 -2
  156. package/dist/esm/solution-item-icon.entry.js +1 -1
  157. package/dist/esm/solutions-components.js +1 -1
  158. package/dist/esm/{utils-06bace50.js → utils-b1bd777e.js} +1 -1
  159. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-export/instant-apps-export.css +20 -20
  160. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-filter-list/instant-apps-filter-list.css +3 -3
  161. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +3 -3
  162. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-classic/instant-apps-interactive-legend-classic.css +4 -4
  163. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-count/instant-apps-interactive-legend-count.css +1 -1
  164. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-group-legend-element-caption/instant-apps-interactive-legend-group-legend-element-caption.css +5 -7
  165. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-layer-element-caption/instant-apps-interactive-legend-layer-element-caption.css +5 -7
  166. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-legend-element-caption/instant-apps-interactive-legend-legend-element-caption.css +4 -5
  167. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-relationship/instant-apps-interactive-legend-relationship.css +1 -1
  168. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend.css +2 -2
  169. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-keyboard-shortcuts/instant-apps-keyboard-shortcuts.css +4 -4
  170. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +6 -6
  171. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-switcher/instant-apps-language-switcher.css +4 -4
  172. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator-item/instant-apps-language-translator-item.css +7 -7
  173. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator-search/instant-apps-language-translator-search.css +2 -2
  174. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator.css +2 -2
  175. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-measurement/instant-apps-measurement.css +2 -2
  176. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-popover/instant-apps-popover.css +3 -3
  177. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-scoreboard/instant-apps-scoreboard.css +4 -4
  178. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-social-share/instant-apps-social-share.css +6 -6
  179. package/dist/solutions-components/demos/browse-solutions.html +2 -0
  180. package/dist/solutions-components/demos/buffer-tools.html +1 -1
  181. package/dist/solutions-components/demos/card-manager.html +2 -2
  182. package/dist/solutions-components/demos/crowdsource-manager.html +3 -3
  183. package/dist/solutions-components/demos/crowdsource-reporter.html +5 -5
  184. package/dist/solutions-components/demos/deduct-calculator.html +1 -1
  185. package/dist/solutions-components/demos/info-card.html +2 -2
  186. package/dist/solutions-components/demos/layer-table.html +2 -2
  187. package/dist/solutions-components/demos/list-item.html +2 -2
  188. package/dist/solutions-components/demos/map-card.html +2 -2
  189. package/dist/solutions-components/demos/map-draw-tools.html +1 -1
  190. package/dist/solutions-components/demos/map-layer-picker.html +1 -1
  191. package/dist/solutions-components/demos/map-select-tools.html +1 -1
  192. package/dist/solutions-components/demos/new-public-notification.html +5 -5
  193. package/dist/solutions-components/demos/pci-calculator.html +1 -1
  194. package/dist/solutions-components/{p-bab0aa05.js → p-00f9774c.js} +1 -1
  195. package/dist/solutions-components/p-14097810.entry.js +6 -0
  196. package/dist/solutions-components/{p-019f0baa.entry.js → p-166d5bcc.entry.js} +1 -1
  197. package/dist/solutions-components/{p-9270f6da.entry.js → p-1b9709ce.entry.js} +1 -1
  198. package/dist/solutions-components/p-3bf0115f.entry.js +6 -0
  199. package/dist/solutions-components/{p-796ce3a2.entry.js → p-3ea18af7.entry.js} +1 -1
  200. package/dist/solutions-components/p-4f1c4004.entry.js +6 -0
  201. package/dist/solutions-components/{p-8c7d5880.entry.js → p-546a3d3c.entry.js} +1 -1
  202. package/dist/solutions-components/p-60d212df.entry.js +6 -0
  203. package/dist/solutions-components/{p-bd3f4aa6.entry.js → p-627c19b5.entry.js} +1 -1
  204. package/dist/solutions-components/{p-84034340.js → p-62e92138.js} +1 -1
  205. package/dist/solutions-components/{p-149d80ad.js → p-68434a63.js} +1 -1
  206. package/dist/solutions-components/{p-b2a9bae3.entry.js → p-75f7bfe3.entry.js} +1 -1
  207. package/dist/solutions-components/{p-188483e2.entry.js → p-789f606f.entry.js} +1 -1
  208. package/dist/solutions-components/{p-a7a06d6a.js → p-83225907.js} +1 -1
  209. package/dist/solutions-components/{p-c3fa8a3d.entry.js → p-95ebc2e5.entry.js} +1 -1
  210. package/dist/solutions-components/p-98fe7b5d.entry.js +6 -0
  211. package/dist/solutions-components/p-99ca7674.entry.js +6 -0
  212. package/dist/solutions-components/p-a0b8cecf.entry.js +6 -0
  213. package/dist/solutions-components/{p-7eec285c.entry.js → p-a5d924a9.entry.js} +1 -1
  214. package/dist/solutions-components/{p-0ad0b29a.js → p-a8a0187d.js} +1 -1
  215. package/dist/solutions-components/p-a9f21aaf.entry.js +6 -0
  216. package/dist/solutions-components/{p-a2467088.entry.js → p-b42bde59.entry.js} +1 -1
  217. package/dist/solutions-components/p-baf82bab.entry.js +6 -0
  218. package/dist/solutions-components/p-c504529e.entry.js +6 -0
  219. package/dist/solutions-components/p-c556ed60.entry.js +6 -0
  220. package/dist/solutions-components/p-c99843aa.entry.js +6 -0
  221. package/dist/solutions-components/p-cc774829.entry.js +6 -0
  222. package/dist/solutions-components/p-ced4e208.entry.js +6 -0
  223. package/dist/solutions-components/{p-9e92fd19.entry.js → p-d78f13cb.entry.js} +1 -1
  224. package/dist/solutions-components/{p-10e99d5d.entry.js → p-d8b3d156.entry.js} +1 -1
  225. package/dist/solutions-components/p-db3ca38d.entry.js +17 -0
  226. package/dist/solutions-components/p-dcd6e7b9.entry.js +6 -0
  227. package/dist/solutions-components/{p-811313d1.entry.js → p-dd48cc25.entry.js} +1 -1
  228. package/dist/solutions-components/p-e8011829.entry.js +47 -0
  229. package/dist/solutions-components/solutions-components.css +1 -7
  230. package/dist/solutions-components/solutions-components.esm.js +1 -1
  231. package/dist/types/preact.d.ts +1 -1
  232. package/package.json +2 -2
  233. package/dist/solutions-components/p-0103dee1.entry.js +0 -6
  234. package/dist/solutions-components/p-2f496e4c.entry.js +0 -6
  235. package/dist/solutions-components/p-3977568f.entry.js +0 -17
  236. package/dist/solutions-components/p-3c3c2587.entry.js +0 -6
  237. package/dist/solutions-components/p-4b3ebd24.entry.js +0 -6
  238. package/dist/solutions-components/p-59407d94.entry.js +0 -6
  239. package/dist/solutions-components/p-7283bfe4.entry.js +0 -6
  240. package/dist/solutions-components/p-74a89c71.entry.js +0 -6
  241. package/dist/solutions-components/p-81c5c5f2.entry.js +0 -6
  242. package/dist/solutions-components/p-847193e7.entry.js +0 -6
  243. package/dist/solutions-components/p-a1c924c0.entry.js +0 -47
  244. package/dist/solutions-components/p-a44f1e85.entry.js +0 -6
  245. package/dist/solutions-components/p-abab359e.entry.js +0 -6
  246. package/dist/solutions-components/p-ad5f374e.entry.js +0 -6
  247. package/dist/solutions-components/p-afd9d486.entry.js +0 -6
  248. package/dist/solutions-components/p-f4742b64.entry.js +0 -6
  249. package/dist/solutions-components/p-f7042c6a.entry.js +0 -6
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as e,h as a,a as t,g as i}from"./p-78780f63.js";const o=class{constructor(a){e(this,a),this.isPortal=!1,this.type="",this.typeKeywords=[]}render(){return a("div",{title:this.type},a("img",{class:"item-type-icon item-type-icon-margin",height:"16",src:this._getIconUrl(this.type,this.typeKeywords),width:"16"}))}_getIconUrl(e,a){const i=e&&e.toLowerCase()||"";let o=!1,c=!1,l=!1,r=!1,p=!1,s=!1,n="";return a=a||[],i.indexOf("service")>0||"feature collection"===i||"kml"===i||"wms"===i||"wmts"===i||"wfs"===i?(o=a.indexOf("Hosted Service")>-1,"feature service"===i||"feature collection"===i||"kml"===i||"wfs"===i?(r=a.indexOf("Table")>-1,c=a.indexOf("Route Layer")>-1,l=a.indexOf("Markup")>-1,p=-1!==a.indexOf("Spatiotemporal"),n=p&&r?"spatiotemporaltable":r?"table":c?"routelayer":l?"markup":p?"spatiotemporal":o?"featureshosted":"features"):"map service"===i||"wms"===i||"wmts"===i?(p=-1!==a.indexOf("Spatiotemporal"),s=-1!==a.indexOf("Relational"),n=p||s?"mapimages":o||a.indexOf("Tiled")>-1||"wmts"===i?"maptiles":"mapimages"):n="scene service"===i?a.indexOf("Line")>-1?"sceneweblayerline":a.indexOf("3DObject")>-1?"sceneweblayermultipatch":a.indexOf("Point")>-1?"sceneweblayerpoint":a.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":a.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":a.indexOf("Polygon")>-1?"sceneweblayerpolygon":a.indexOf("Building")>-1?"sceneweblayerbuilding":"sceneweblayer":"image service"===i?a.indexOf("Elevation 3D Layer")>-1?"elevationlayer":a.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===i?"streamlayer":"vector tile service"===i?"vectortile":"datastore catalog service"===i?"datastorecollection":"geocoding service"===i?"geocodeservice":"geoprocessing service"===i&&a.indexOf("Web Tool")>-1&&this.isPortal?"tool":"layers"):n="web map"===i||"cityengine web scene"===i?"maps":"web scene"===i?a.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===i||"mobile application"===i||"application"===i||"operation view"===i||"desktop application"===i?"apps":"map document"===i||"map package"===i||"published map"===i||"scene document"===i||"globe document"===i||"basemap package"===i||"mobile basemap package"===i||"mobile map package"===i||"project package"===i||"project template"===i||"pro map"===i||"layout"===i||"layer"===i&&a.indexOf("ArcGIS Pro")>-1||"explorer map"===i&&a.indexOf("Explorer Document")?"mapsgray":"service definition"===i||"csv"===i||"shapefile"===i||"cad drawing"===i||"geojson"===i||"360 vr experience"===i||"netcdf"===i||"administrative report"===i?"datafiles":"explorer add in"===i||"desktop add in"===i||"windows viewer add in"===i||"windows viewer configuration"===i?"appsgray":"arcgis pro add in"===i||"arcgis pro configuration"===i?"addindesktop":"rule package"===i||"file geodatabase"===i||"sqlite geodatabase"===i||"csv collection"===i||"kml collection"===i||"windows mobile package"===i||"map template"===i||"desktop application template"===i||"gml"===i||"arcpad package"===i||"code sample"===i||"form"===i||"document link"===i||"operations dashboard add in"===i||"rules package"===i||"image"===i||"workflow manager package"===i||"explorer map"===i&&a.indexOf("Explorer Mapping Application")>-1||a.indexOf("Document")>-1?"datafilesgray":"network analysis service"===i||"geoprocessing service"===i||"geodata service"===i||"geometry service"===i||"geoprocessing package"===i||"locator package"===i||"geoprocessing sample"===i||"workflow manager service"===i?"toolsgray":"layer"===i||"layer package"===i||"explorer layer"===i?"layersgray":"scene package"===i?"scenepackage":"mobile scene package"===i?"mobilescenepackage":"tile package"===i||"compact tile package"===i?"tilepackage":"task file"===i?"taskfile":"report template"===i?"report-template":"statistical data collection"===i?"statisticaldatacollection":"insights workbook"===i?"workbook":"insights model"===i?"insightsmodel":"insights page"===i?"insightspage":"insights theme"===i?"insightstheme":"hub initiative"===i?"hubinitiative":"hub page"===i?"hubpage":"hub site application"===i?"hubsite":"hub event"===i?"hubevent":"relational database connection"===i?"relationaldatabaseconnection":"big data file share"===i?"datastorecollection":"image collection"===i?"imagecollection":"desktop style"===i?"desktopstyle":"style"===i?"style":"dashboard"===i?"dashboard":"raster function template"===i?"rasterprocessingtemplate":"vector tile package"===i?"vectortilepackage":"ortho mapping project"===i?"orthomappingproject":"ortho mapping template"===i?"orthomappingtemplate":"solution"===i?"solutions":"geopackage"===i?"geopackage":"deep learning package"===i?"deeplearningpackage":"real time analytic"===i?"realtimeanalytics":"big data analytic"===i?"bigdataanalytics":"feed"===i?"feed":"excalibur imagery project"===i?"excaliburimageryproject":"notebook"===i?"notebook":"storymap"===i?"storymap":"survey123 add in"===i?"survey123addin":"mission"===i?"mission":"mission report"===i?"missionreport":"quickcapture project"===i?"quickcaptureproject":"pro report"===i?"proreport":"urban model"===i?"urbanmodel":"web experience"===i?"experiencebuilder":"web experience template"===i?"webexperiencetemplate":"workflow"===i?"workflow":"kernel gateway connection"===i?"kernelgatewayconnection":"insights script"===i?"insightsscript":"hub initiative template"===i?"hubinitiativetemplate":"storymap theme"===i?"storymaptheme":"group"===i?"group":"maps",n?t("./item-icons/"+n+"16.png"):null}static get assetsDirs(){return["item-icons"]}get el(){return i(this)}};o.style='.item-type-icon{pointer-events:none;display:block;height:1rem;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}.item-type-icon-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.item-type-icon-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.item-type-icon-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.item-type-icon-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.item-type-icon-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.item-type-icon-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.item-type-icon-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.item-type-icon-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>.item-type-icon{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>.item-type-icon{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>.item-type-icon{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>.item-type-icon{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>.item-type-icon{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>.item-type-icon{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>.item-type-icon{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>.item-type-icon{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>.item-type-icon{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>.item-type-icon{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>.item-type-icon{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>.item-type-icon{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>.item-type-icon{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>.item-type-icon{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>.item-type-icon{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>.item-type-icon{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face .item-type-icon{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face .item-type-icon b,.code-face .item-type-icon strong{font-weight:400}.code-italic .item-type-icon{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic .item-type-icon b,.code-italic .item-type-icon strong{font-weight:400}.item-type-icon{margin-top:0.15em !important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{margin-inline-end:0.375rem}';export{o as solution_item_icon}
6
+ import{r as e,h as a,a as t,g as i}from"./p-78780f63.js";const o=class{constructor(a){e(this,a),this.isPortal=!1,this.type="",this.typeKeywords=[]}render(){return a("div",{title:this.type},a("img",{class:"item-type-icon item-type-icon-margin",height:"16",src:this._getIconUrl(this.type,this.typeKeywords),width:"16"}))}_getIconUrl(e,a){const i=e&&e.toLowerCase()||"";let o=!1,r=!1,s=!1,n=!1,c=!1,p=!1,l="";return a=a||[],i.indexOf("service")>0||"feature collection"===i||"kml"===i||"wms"===i||"wmts"===i||"wfs"===i?(o=a.indexOf("Hosted Service")>-1,"feature service"===i||"feature collection"===i||"kml"===i||"wfs"===i?(n=a.indexOf("Table")>-1,r=a.indexOf("Route Layer")>-1,s=a.indexOf("Markup")>-1,c=-1!==a.indexOf("Spatiotemporal"),l=c&&n?"spatiotemporaltable":n?"table":r?"routelayer":s?"markup":c?"spatiotemporal":o?"featureshosted":"features"):"map service"===i||"wms"===i||"wmts"===i?(c=-1!==a.indexOf("Spatiotemporal"),p=-1!==a.indexOf("Relational"),l=c||p?"mapimages":o||a.indexOf("Tiled")>-1||"wmts"===i?"maptiles":"mapimages"):l="scene service"===i?a.indexOf("Line")>-1?"sceneweblayerline":a.indexOf("3DObject")>-1?"sceneweblayermultipatch":a.indexOf("Point")>-1?"sceneweblayerpoint":a.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":a.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":a.indexOf("Polygon")>-1?"sceneweblayerpolygon":a.indexOf("Building")>-1?"sceneweblayerbuilding":"sceneweblayer":"image service"===i?a.indexOf("Elevation 3D Layer")>-1?"elevationlayer":a.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===i?"streamlayer":"vector tile service"===i?"vectortile":"datastore catalog service"===i?"datastorecollection":"geocoding service"===i?"geocodeservice":"geoprocessing service"===i&&a.indexOf("Web Tool")>-1&&this.isPortal?"tool":"layers"):l="web map"===i||"cityengine web scene"===i?"maps":"web scene"===i?a.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===i||"mobile application"===i||"application"===i||"operation view"===i||"desktop application"===i?"apps":"map document"===i||"map package"===i||"published map"===i||"scene document"===i||"globe document"===i||"basemap package"===i||"mobile basemap package"===i||"mobile map package"===i||"project package"===i||"project template"===i||"pro map"===i||"layout"===i||"layer"===i&&a.indexOf("ArcGIS Pro")>-1||"explorer map"===i&&a.indexOf("Explorer Document")?"mapsgray":"service definition"===i||"csv"===i||"shapefile"===i||"cad drawing"===i||"geojson"===i||"360 vr experience"===i||"netcdf"===i||"administrative report"===i?"datafiles":"explorer add in"===i||"desktop add in"===i||"windows viewer add in"===i||"windows viewer configuration"===i?"appsgray":"arcgis pro add in"===i||"arcgis pro configuration"===i?"addindesktop":"rule package"===i||"file geodatabase"===i||"sqlite geodatabase"===i||"csv collection"===i||"kml collection"===i||"windows mobile package"===i||"map template"===i||"desktop application template"===i||"gml"===i||"arcpad package"===i||"code sample"===i||"form"===i||"document link"===i||"operations dashboard add in"===i||"rules package"===i||"image"===i||"workflow manager package"===i||"explorer map"===i&&a.indexOf("Explorer Mapping Application")>-1||a.indexOf("Document")>-1?"datafilesgray":"network analysis service"===i||"geoprocessing service"===i||"geodata service"===i||"geometry service"===i||"geoprocessing package"===i||"locator package"===i||"geoprocessing sample"===i||"workflow manager service"===i?"toolsgray":"layer"===i||"layer package"===i||"explorer layer"===i?"layersgray":"scene package"===i?"scenepackage":"mobile scene package"===i?"mobilescenepackage":"tile package"===i||"compact tile package"===i?"tilepackage":"task file"===i?"taskfile":"report template"===i?"report-template":"statistical data collection"===i?"statisticaldatacollection":"insights workbook"===i?"workbook":"insights model"===i?"insightsmodel":"insights page"===i?"insightspage":"insights theme"===i?"insightstheme":"hub initiative"===i?"hubinitiative":"hub page"===i?"hubpage":"hub site application"===i?"hubsite":"hub event"===i?"hubevent":"relational database connection"===i?"relationaldatabaseconnection":"big data file share"===i?"datastorecollection":"image collection"===i?"imagecollection":"desktop style"===i?"desktopstyle":"style"===i?"style":"dashboard"===i?"dashboard":"raster function template"===i?"rasterprocessingtemplate":"vector tile package"===i?"vectortilepackage":"ortho mapping project"===i?"orthomappingproject":"ortho mapping template"===i?"orthomappingtemplate":"solution"===i?"solutions":"geopackage"===i?"geopackage":"deep learning package"===i?"deeplearningpackage":"real time analytic"===i?"realtimeanalytics":"big data analytic"===i?"bigdataanalytics":"feed"===i?"feed":"excalibur imagery project"===i?"excaliburimageryproject":"notebook"===i?"notebook":"storymap"===i?"storymap":"survey123 add in"===i?"survey123addin":"mission"===i?"mission":"mission report"===i?"missionreport":"quickcapture project"===i?"quickcaptureproject":"pro report"===i?"proreport":"urban model"===i?"urbanmodel":"web experience"===i?"experiencebuilder":"web experience template"===i?"webexperiencetemplate":"workflow"===i?"workflow":"kernel gateway connection"===i?"kernelgatewayconnection":"insights script"===i?"insightsscript":"hub initiative template"===i?"hubinitiativetemplate":"storymap theme"===i?"storymaptheme":"group"===i?"group":"maps",l?t("./item-icons/"+l+"16.png"):null}static get assetsDirs(){return["item-icons"]}get el(){return i(this)}};o.style=".item-type-icon{pointer-events:none;display:block;height:1rem;margin-top:0.15em !important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{margin-inline-end:0.375rem}";export{o as solution_item_icon}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{b as n}from"./p-a7a06d6a.js";import{c as t}from"./p-225c4ca4.js";var a,e,l,o;!function(n){n.User="user",n.Translation="translation"}(a||(a={})),function(n){n.String="string",n.TextEditor="textEditor"}(e||(e={})),function(n){n.ExpandCollapse="list-merge",n.SettingIndicator="list-button",n.Popover="information",n.Expanded="chevron-down",n.Collapsed="chevron-right",n.Copy="copy-to-clipboard",n.Breadcrumb="chevron-right",n.DefaultIcon="language"}(l||(l={})),function(n){n.Light="calcite-mode-light",n.Dark="calcite-mode-dark"}(o||(o={}));const u=t({uiData:null,currentLanguage:null,lastSave:null,saving:!1,currentLocaleSettingItem:null,portalItemResource:null,portalItemResourceT9n:null}),r=u.state,c=u;function i(n,t){var a;if(!n)return;const e=c.get("uiData"),l=new Map;l.set("locales",t),l.set("translatedLanguageLabels",Object.assign({},n.translatedLanguageLabels)),n.content.forEach((n=>{var t;const{type:a,label:o,value:u,uiLocation:r}=n,c=null==e?void 0:e.get(n.id);l.set(n.id,{userLocaleData:{type:a,label:o,value:u},expanded:!0,selected:null!==(t=null==c?void 0:c.selected)&&void 0!==t&&t,uiLocation:r,tip:null==n?void 0:n.tip})}));const o=n.content.map((n=>n.id)),u=o.every((n=>!l.get(n).selected)),r=l.get(o[0]);if(u&&r){const n=null==e?void 0:e.get(o[0]);r.selected=null===(a=null==n?void 0:n.selected)||void 0===a||a}return l}async function s(t){return(await n(t))[0]}function d(){var n;const t=[];return null===(n=r.uiData)||void 0===n||n.forEach(((n,a)=>{"locales"!==a&&"translatedLanguageLabels"!==a&&t.push(a)})),t}function v(n,t){const a=c.get("portalItemResourceT9n");let e;return(null==a?void 0:a[n])||(a[n]={}),e=Object.assign(Object.assign({},a),{[n]:Object.assign(Object.assign({},a[n]),t)}),e}function f(n){var t;return null!==(t=null==n?void 0:n.map((n=>n.locale)))&&void 0!==t?t:[]}function g(){return document.body.classList.contains(o.Dark)}export{l as E,i as a,f as b,d as c,e as d,o as e,a as f,s as g,v as h,g as i,r as l,c as s}
6
+ import{b as n}from"./p-83225907.js";import{c as t}from"./p-225c4ca4.js";var a,e,l,o;!function(n){n.User="user",n.Translation="translation"}(a||(a={})),function(n){n.String="string",n.TextEditor="textEditor"}(e||(e={})),function(n){n.ExpandCollapse="list-merge",n.SettingIndicator="list-button",n.Popover="information",n.Expanded="chevron-down",n.Collapsed="chevron-right",n.Copy="copy-to-clipboard",n.Breadcrumb="chevron-right",n.DefaultIcon="language"}(l||(l={})),function(n){n.Light="calcite-mode-light",n.Dark="calcite-mode-dark"}(o||(o={}));const u=t({uiData:null,currentLanguage:null,lastSave:null,saving:!1,currentLocaleSettingItem:null,portalItemResource:null,portalItemResourceT9n:null}),r=u.state,c=u;function i(n,t){var a;if(!n)return;const e=c.get("uiData"),l=new Map;l.set("locales",t),l.set("translatedLanguageLabels",Object.assign({},n.translatedLanguageLabels)),n.content.forEach((n=>{var t;const{type:a,label:o,value:u,uiLocation:r}=n,c=null==e?void 0:e.get(n.id);l.set(n.id,{userLocaleData:{type:a,label:o,value:u},expanded:!0,selected:null!==(t=null==c?void 0:c.selected)&&void 0!==t&&t,uiLocation:r,tip:null==n?void 0:n.tip})}));const o=n.content.map((n=>n.id)),u=o.every((n=>!l.get(n).selected)),r=l.get(o[0]);if(u&&r){const n=null==e?void 0:e.get(o[0]);r.selected=null===(a=null==n?void 0:n.selected)||void 0===a||a}return l}async function s(t){return(await n(t))[0]}function d(){var n;const t=[];return null===(n=r.uiData)||void 0===n||n.forEach(((n,a)=>{"locales"!==a&&"translatedLanguageLabels"!==a&&t.push(a)})),t}function v(n,t){const a=c.get("portalItemResourceT9n");let e;return(null==a?void 0:a[n])||(a[n]={}),e=Object.assign(Object.assign({},a),{[n]:Object.assign(Object.assign({},a[n]),t)}),e}function f(n){var t;return null!==(t=null==n?void 0:n.map((n=>n.locale)))&&void 0!==t?t:[]}function g(){return document.body.classList.contains(o.Dark)}export{l as E,i as a,f as b,d as c,e as d,o as e,a as f,s as g,v as h,g as i,r as l,c as s}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{l}from"./p-0ad0b29a.js";import{c as n}from"./p-225c4ca4.js";async function o(n,o,i){const[u]=await l(["esri/layers/effects/jsonUtils"]),{toJSON:d,fromJSON:v}=u,e=null==o?void 0:o.layer;if(!n)return(null==e?void 0:e.effect)?e.effect:(null==e?void 0:e.featureEffect)?"includedEffect"===i?e.featureEffect.includedEffect:e.featureEffect.excludedEffect:null;const t=d(n);let r;r=e.featureEffect?"includedEffect"===i?e.featureEffect.includedEffect:e.featureEffect.excludedEffect:e.effect;const a=r?d(r):null;if(!a)return v(t);let s=[...a];return t&&t.forEach((l=>{s.forEach((n=>{const{value:o}=n;if(o)o.forEach(((i,u)=>{i.type===l.type?o[u]=l:!n.value.find((l=>l.type===t[0].type))&&(n.value=[...n.value,...t])}));else{const o=!s.find((l=>l.type===n.type));!s.find((n=>n.type===l.type))&&(s=[...s,l]),o&&(s=[...s,n])}}))})),v(s)}const i=n({data:{},relationshipRampExpandStates:{}}),u=i.state,d=i;async function v(l,n,o){var i,u,d,v,e,t,r,a,s;try{const c="group"===(null===(i=null==n?void 0:n.layer)||void 0===i?void 0:i.type),f=null===(d=null===(u=null==n?void 0:n.layer)||void 0===u?void 0:u.layers)||void 0===d?void 0:d.some((l=>l.visible)),$=null===(e=null===(v=null==n?void 0:n.layer)||void 0===v?void 0:v.layers)||void 0===e?void 0:e.every((l=>!(null==l?void 0:l.legendEnabled)));await o.whenOnce((()=>"ready"===(null==l?void 0:l.state))),!c||c&&f?c&&$?await o.whenOnce((()=>{var l;return null===(l=null==n?void 0:n.layer)||void 0===l?void 0:l.loaded})):await o.whenOnce((()=>null==n?void 0:n.ready)):await o.whenOnce((()=>null==n?void 0:n.legendElements));const y=null===(t=null==n?void 0:n.legendElements)||void 0===t?void 0:t[0],m=new Map,p=n.layer,N=await l.view.whenLayerView(p);await o.whenOnce((()=>!1===(null==N?void 0:N.updating)));const O=null===(r=p.renderer)||void 0===r?void 0:r.get("field");return void 0!==y&&(null===(a=null==y?void 0:y.infos)||void 0===a||a.forEach((l=>{var n;if("symbol-table"===l.type){const n=[];l.infos.forEach((l=>{n.push({count:null,selected:!1,legendElementInfo:l})})),m.set(l.title,{count:null,selected:!1,legendElementInfo:l,nestedInfos:n})}else m.set(null!==(n=l.label)&&void 0!==n?n:p.id,{count:null,selected:!1,legendElementInfo:l})}))),Promise.resolve({activeLayerInfo:n,title:null===(s=null==N?void 0:N.layer)||void 0===s?void 0:s.title,categories:m,field:O,queryExpressions:[],totalCount:null,fLayerView:N,legendElement:y})}catch(l){return Promise.resolve(null)}}async function e(l,n){const o={},i=[];l.activeLayerInfos.forEach(function(l,n,o){return i=>{var u;const d=null===(u=null==i?void 0:i.layer)||void 0===u?void 0:u.type;if("feature"===d||"group"===d){const u=v(n,i,o).then((l=>l));u&&l.push(u);const d=i=>{const u=v(n,i,o).then((l=>l));u&&l.push(u)};i.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{d(l)}))}))}))}}}(i,l,n));try{return(await Promise.all(i)).forEach((l=>{var n,i;return o[null===(i=null===(n=null==l?void 0:l.activeLayerInfo)||void 0===n?void 0:n.layer)||void 0===i?void 0:i.id]=l})),Promise.resolve(o)}catch(l){return Promise.reject(null)}}function t(l){return Array.from(l).map((l=>l[1]))}function r(l,n,o,i,u){var d,v,e;return i?null===(d=null==i?void 0:i.nestedInfos)||void 0===d?void 0:d[u]:null===(v=null==l?void 0:l.categories)||void 0===v?void 0:v.get(null!==(e=null==o?void 0:o.label)&&void 0!==e?e:null==n?void 0:n.id)}function a(l){var n;return null===(n=null==u?void 0:u.data)||void 0===n?void 0:n[null==l?void 0:l.id]}async function s(n,i,u,d,v){var e,t;const[r,a]=await l(["esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]),{queryExpressions:s,fLayerView:$}=n;!function(l,n,o,i){var u,d,v,e;const{field:t,legendElement:r,categories:a,fLayerView:s}=l,$=null==l?void 0:l.queryExpressions;i&&Array.from(l.categories).map((l=>l[1])).forEach((l=>{var n,o;(null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected)))&&(null===(o=l.nestedInfos)||void 0===o||o.forEach((l=>{const n=t?`${t} = '${l.legendElementInfo.value}'`:null,o=n?$.indexOf(n):-1;n&&-1!==o&&$.splice(o,1)})))}));const m=null==r?void 0:r.infos,p=y(s);let N=p?c(n,s):f(n,t,o,r,m,"");const O=i?null===(d=null===(u=a.get(i.title))||void 0===u?void 0:u.nestedInfos)||void 0===d?void 0:d[o]:a.get(null!==(v=n.label)&&void 0!==v?v:null===(e=null==s?void 0:s.layer)||void 0===e?void 0:e.id);O&&(O.selected=!(null==O?void 0:O.selected));const w=m&&1===m.length,A=$.indexOf(N);if(p){const l=$.indexOf(N);0===$.length||-1===l?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]?$[0]="1=0":$&&1===$.length||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]?$[0]=null:$.splice(l,1),$.join(" OR ")}else 0===$.length||-1===A?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]&&!w?$[0]="1=0":$&&1===$.length&&!w||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]&&!w?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]&&!w?$[0]=null:$.splice(A,1);if(i){const n=[];Array.from(l.categories).map((l=>l[1])).forEach((l=>{var o,i;(null===(o=l.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=l.nestedInfos)||void 0===i||i.forEach((l=>{t&&`${t} = '${l.legendElementInfo.value}'`&&n.push(`${t} = '${l.legendElementInfo.value}'`)})))})),n.forEach((l=>{-1===$.indexOf(l)&&$.push(l)}))}}(n,i,u,v);const m=s.join(" OR "),p=null!==(t=null===(e=null==$?void 0:$.filter)||void 0===e?void 0:e.timeExtent)&&void 0!==t?t:null,{type:N}=d;if("filter"===N)$.filter=new r({where:m,timeExtent:p});else if(d.effect){const{includedEffect:l,excludedEffect:n}=d.effect,i=await o(n,$,"excludedEffect"),u=await o(l,$,"includedEffect");$.featureEffect=new a({filter:new r({where:m,timeExtent:p}),includedEffect:u,excludedEffect:i})}return Promise.resolve()}function c(l,n){const o=n?n.layer.renderer.authoringInfo:null,i=o?o.fields:null,u=[];if(!i)return"";if(l.hasOwnProperty("value"))return i.forEach((n=>{l.value!==n&&u.push(`(${l.value} > ${n} OR (${n} IS NULL AND ${l.value} <> 0 AND ${l.value} IS NOT NULL))`)})),u.join(" AND ");{const l=[];i.forEach((n=>{l.push(`${n} = 0`)}));const n=[];if(i.length>2){i.forEach((l=>{i.forEach((o=>{if(l===o)return;const u=[];i.forEach((n=>{l!==n&&o!==n&&u.push(`${l} = ${o} AND (${l} > ${n} OR ${l} >= ${n})`)})),n.push(`(${u.join(" AND ")})`)}))}));const o=[];return i.forEach((l=>{o.push(`${l} IS NULL`)})),`(${l.join(" AND ")}) OR (${n.join(" OR ")}) OR (${o.join(" AND ")})`}{const n=[];i.forEach((o=>{i.forEach((i=>{o!==i&&(n.push(`${o} = ${i}`),n.push(`(${l.join(" AND ")})`))}))}));const o=[];return i.forEach((l=>{i.forEach((n=>{l!==n&&o.push(`(${l} = 0 AND ${n} IS NULL) OR (${l} IS NULL AND ${n} IS NULL)`)}))})),`(${n.join(" OR ")}) OR (${o.join(" OR ")})`}}}function f(l,n,o,i,u,d){const{value:v}=l;if("symbol-table"===i.type){if(!l.hasOwnProperty("value")||Array.isArray(l.value)&&1===(null==u?void 0:u.length)){if((null==u?void 0:u[0].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[0].value)&&(null==u?void 0:u[(null==u?void 0:u.length)-2])&&(null==u?void 0:u[(null==u?void 0:u.length)-2].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[(null==u?void 0:u.length)-2].value))return d?`((${n}/${d}) > ${null==u?void 0:u[0].value[1]}) OR ((${n}/${d}) < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]}) OR ${d} = 0 OR ${d} IS NULL`:`${n} > ${null==u?void 0:u[0].value[1]} OR ${n} < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]} OR ${n} IS NULL`;if(1===(null==u?void 0:u.length))return"1=0";{const l=[];null==u||u.forEach((o=>{if(null==o?void 0:o.value){const{value:i}=o,u=-1!==i.indexOf("'")?i.split("'").join("''"):null,d=u?`${n} <> '${u}'`:isNaN(i)||"string"==typeof i&&!i.trim()?`${n} <> '${i}'`:`${n} <> ${i} AND ${n} <> '${i}'`;l.push(d)}}));const o=l.join(" AND ");return n&&o?`${o} OR ${n} IS NULL`:""}}{const i=-1!==v.indexOf("'")?v.split("'").join("''"):null,e=Array.isArray(l.value),t=(null==u?void 0:u.length)-1===o,r=!(null==u?void 0:u[(null==u?void 0:u.length)-1].hasOwnProperty("value")),a=o===(null==u?void 0:u.length)-2;return e?d?t||r&&a?`(${n}/${d}) >= ${v[0]} AND (${n}/${d}) <= ${l.value[1]}`:`(${n}/${d}) > ${v[0]} AND (${n}/${d}) <= ${l.value[1]}`:t||r&&a?`${n} >= ${v[0]} AND ${n} <= ${v[1]}`:`${n} > ${v[0]} AND ${n} <= ${v[1]}`:1===(null==u?void 0:u.length)&&n?isNaN(v)||!v.trim().length?`${n} <> '${v}'`:`${n} <> ${v} OR ${n} <> '${v}'`:i?`${n} = '${i}'`:isNaN(v)||!v.trim().length?`${n} = '${v}'`:`${n} = ${v} OR ${n} = '${v}'`}}return""}function $(l){return Array.isArray(l)?l.every((l=>!l.selected)):l&&Array.from(l.categories.entries()).every((l=>!l[1].selected))&&"1=0"!==l.queryExpressions[0]}function y(l){return"predominance"===(null==l?void 0:l.get("layer.renderer.authoringInfo.type"))}function m(l){var n;return"relationship-ramp"===(null===(n=null==l?void 0:l.legendElements[1])||void 0===n?void 0:n.type)}function p(l,n,o){var i,u,d,v,e,t,r,a,s;const c=l.layer,f=null===(i=null==c?void 0:c.renderer)||void 0===i?void 0:i.field,$=null==n?void 0:n.type,m=l.get("layerView"),p=null==m?void 0:m.get("layer.renderer.classBreakInfos"),N=(null==m?void 0:m.get("layer.renderer.uniqueValueInfos"))&&f,O="size-ramp"===$,w="color-ramp"===$,A="opacity-ramp"===$,E="heatmap-ramp"===$,b=m&&p&&p.length>1,R=null==m?void 0:m.get("layer.renderer.authoringInfo.type"),L="class-breaks-color"===R,I="class-breaks-size"===R,D=1===(null===(u=null==n?void 0:n.infos)||void 0===u?void 0:u.length)&&!f,g="relationship"===R&&"size-ramp"!==(null==n?void 0:n.type)&&"symbol-table"!==(null==n?void 0:n.type),h="feature"===(null==l?void 0:l.get("layer.type")),x=h&&f&&!w&&!O&&b,P=!(!h||!f||w||O||b),S=!!(P||y(m)&&!O||L&&f||I&&f||D&&!f&&null!==f||g||N),j=(null==l?void 0:l.get("layer.featureReduction"))&&"size-ramp"===(null===(d=null==l?void 0:l.legendElements[o])||void 0===d?void 0:d.type),U="symbol-table"===(null==n?void 0:n.type)&&1===(null===(v=null==n?void 0:n.infos)||void 0===v?void 0:v.length),z=!(null==l?void 0:l.legendElements.every((l=>"color-ramp"!==l.type))),k=!(null==l?void 0:l.legendElements.every((l=>"size-ramp"!==l.type))),F=U&&z,V=U&&k,q=null===(e=null==n?void 0:n.infos)||void 0===e?void 0:e.every((l=>"number"==typeof l.value)),C="symbol-table"===(null===(r=null===(t=null==l?void 0:l.legendElements)||void 0===t?void 0:t[0])||void 0===r?void 0:r.type)&&"color-ramp"===(null===(s=null===(a=null==l?void 0:l.legendElements)||void 0===a?void 0:a[1])||void 0===s?void 0:s.type);return!(!h||j||A||E||F||V||q||C||"dot-density"===R)&&(p?x||S:P||S)}function N(l){var n,o,i,u,d;return l.queryExpressions=[],(null===(o=null===(n=null==l?void 0:l.fLayerView)||void 0===n?void 0:n.filter)||void 0===o?void 0:o.where)&&(l.fLayerView.filter.where=""),(null===(d=null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.featureEffect)||void 0===u?void 0:u.filter)||void 0===d?void 0:d.where)&&(l.fLayerView.featureEffect=null),l.categories.forEach((l=>{l.selected=!1})),l}function O(l,n){var o,i,u,d,v,e,t,r,a,s,c;const f=l.categories.get(n);null===(o=null==f?void 0:f.nestedInfos)||void 0===o||o.forEach((n=>{const o=l.queryExpressions.indexOf(`${l.field} = '${n.legendElementInfo.value}'`);-1!==o&&l.queryExpressions.splice(o,1),n.selected=!1}));const $=[],y=Array.from(l.categories).map((l=>l[1]));y.forEach((n=>{var o,i;(null===(o=n.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=n.nestedInfos)||void 0===i||i.forEach((n=>{$.push(`${l.field} = '${n.legendElementInfo.value}'`)})))})),$.forEach((n=>{-1===l.queryExpressions.indexOf(n)&&l.queryExpressions.push(n)}));let m=l.queryExpressions.join(" OR ");const p=y.every((l=>{var n;return null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected))}));return p?((null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.filter)||void 0===u?void 0:u.where)&&(l.fLayerView.filter.where=""),(null===(e=null===(v=null===(d=null==l?void 0:l.fLayerView)||void 0===d?void 0:d.featureEffect)||void 0===v?void 0:v.filter)||void 0===e?void 0:e.where)&&(l.fLayerView.featureEffect=null),l.queryExpressions=[]):((null===(r=null===(t=null==l?void 0:l.fLayerView)||void 0===t?void 0:t.filter)||void 0===r?void 0:r.where)&&(l.fLayerView.filter.where=m),(null===(c=null===(s=null===(a=null==l?void 0:l.fLayerView)||void 0===a?void 0:a.featureEffect)||void 0===s?void 0:s.filter)||void 0===c?void 0:c.where)&&(l.fLayerView.featureEffect.filter.where=m)),l}async function w(l,n,o){var i,u;const d=l.fLayerView.createQuery();if(o)if(o.nestedInfos.every((l=>!l.selected))){const n=o.nestedInfos.map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");d.where=n}else{const n=o.nestedInfos.filter((l=>l.selected)).map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");d.where=n}else{const n=l.queryExpressions.join(" OR ");d.where=n}try{const o=await(null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.layer)||void 0===u?void 0:u.queryExtent(d));await n.goTo(o)}catch(l){}}function A(l){return l.map((l=>null==l?void 0:l.count)).reduce(((l,n)=>l+n))}function E(l){return l.map((l=>{var n;return null===(n=null==l?void 0:l.nestedInfos)||void 0===n?void 0:n.map((l=>l.count)).reduce(((l,n)=>l+n))})).reduce(((l,n)=>l+n))}async function b(l,n,o,i,u,d,v,e){var t,r,a;if(!n)return;const s="feature"===(null===(t=null==n?void 0:n.layer)||void 0===t?void 0:t.type)?n.createQuery():null,$=y(n)?c(i,n):i.type?f(v,o,e,i,i.infos):f(i,o,u,d,d.infos);s&&$&&(s.where="1=0"===$?"1=1":$,s.geometry=l);try{const l=s?await n.queryFeatureCount(s):null;return Promise.resolve({[null!==(r=i.label)&&void 0!==r?r:null===(a=null==n?void 0:n.layer)||void 0===a?void 0:a.id]:l})}catch(l){console.error("FAILURE AT 'getInfoCount': ",l)}return Promise.resolve(null)}async function R(l,n){let o=Object.assign({},n);const{activeLayerInfos:i}=l;let u={};const d={};i.forEach((async o=>{var i,u,v,e;const t=o.legendElements[0],r=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,a=null===(v=o.layer.renderer)||void 0===v?void 0:v.get("field"),s=[];d[o.layer.id]=[],null===(e=null==t?void 0:t.infos)||void 0===e||e.forEach(((n,i)=>{var u;const v=null===(u=t.infos)||void 0===u?void 0:u.every((l=>"symbol-table"===l.type));if(v){const u=[];n.infos.forEach(((o,d)=>{const v=b(l.view.extent,r,a,n,i,t,o,d);u.push(v)})),d[o.layer.id].push(u)}else s.push(b(l.view.extent,r,a,n,i,t)),d[o.layer.id]=s}));const c=o=>{var i,u,v,e;const t=[],r=o.legendElements[0],a=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,s=null===(v=o.layer.renderer)||void 0===v?void 0:v.get("field");null===(e=null==r?void 0:r.infos)||void 0===e||e.forEach(((n,o)=>t.push(b(l.view.extent,a,s,n,o,r)))),d[o.layer.id]=t};o.children.forEach((async l=>{var n;c(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;c(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{c(l)}))}))}))}));for(const l in d){let n=u[l];n||(n=u[l]={});const o=await Promise.all(d[l]);if(o.every((l=>Array.isArray(l)))){const i=await Promise.all(o.map((async l=>(await Promise.all(l)).map((l=>l&&Object.values(l)[0])))));n[l]=i,u[l]=Object.assign({},n[l])}else{const i={};o.forEach((l=>{if(!l)return;const n=Object.keys(l)[0];i[n]=l[n]})),l&&(n[l]=i),u[l]=Object.assign({},n[l])}}return i.forEach((l=>{var o;const i=n[l.layer.id],d=l.layer.id;null===(o=null==i?void 0:i.categories)||void 0===o||o.forEach(((n,o)=>{var v;const e=Array.from(null==i?void 0:i.categories).findIndex((l=>l[0]===o));if(null==n?void 0:n.nestedInfos)null==n||n.nestedInfos.forEach(((n,o)=>{var i,d,v;const t=null===(v=null===(d=null==u?void 0:u[null===(i=null==l?void 0:l.layer)||void 0===i?void 0:i.id])||void 0===d?void 0:d[e])||void 0===v?void 0:v[o];n.count=isNaN(t)?null:t}));else{const l=null===(v=null==u?void 0:u[d])||void 0===v?void 0:v[o];n.count=isNaN(l)?null:l}}));const v=l=>{var o;const i=l.layer.id,d=n[i];null===(o=null==d?void 0:d.categories)||void 0===o||o.forEach(((l,n)=>{var o;const d=null===(o=null==u?void 0:u[i])||void 0===o?void 0:o[n];l.count=d}))};l.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{v(l)}))}))}))})),Promise.resolve(o)}function L(l,n){var o;return null===(o=null==l?void 0:l.nestedInfos)||void 0===o?void 0:o[n]}function I(l){return Array.from(l).map((l=>l[1])).every((l=>!!(null==l?void 0:l.nestedInfos)))}function D(l){var n,o,i,u;return!!(null===(u=null===(i=null===(o=null===(n=null==l?void 0:l.legendElements)||void 0===n?void 0:n[0])||void 0===o?void 0:o.infos)||void 0===i?void 0:i.every)||void 0===u?void 0:u.call(i,(l=>"symbol-table"===(null==l?void 0:l.type))))}function g(l,n){var o;return null===(o=null==l?void 0:l.categories)||void 0===o?void 0:o.get(null==n?void 0:n.title)}function h(l){const n="calcite-mode-",o=`${n}light`,i=`${n}dark`;return l.classList.contains(i)?i:o}function x(l){if(l.layerId&&l.intLegendLayerData){const n=l.layerId,o=l.intLegendLayerData;d.set("data",Object.assign(Object.assign({},u.data),{[n]:o}))}}function P(n,i){const{type:u}=n;"filter"===u?function(l){var n,o;null===(o=null===(n=null==l?void 0:l.allLayerViews)||void 0===n?void 0:n.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})))||void 0===o||o.forEach((l=>{const n=S(l);l.filter=n,l.set("featureEffect",null)}))}(i):"effect"===u&&function(n,i){var u;null===(u=null==i?void 0:i.allLayerViews)||void 0===u||u.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})).forEach((async i=>{if((null==n?void 0:n.effect)&&i){const[u]=await l(["esri/layers/support/FeatureEffect"]),{includedEffect:d,excludedEffect:v}=n.effect,e=await o(v,i,"excludedEffect"),t=await o(d,i,"includedEffect"),r=S(i);i.featureEffect=new u({filter:r,includedEffect:t,excludedEffect:e}),i.set("filter",null)}}))}(n,i)}function S(l){var n;return(null==l?void 0:l.filter)||(null===(n=null==l?void 0:l.featureEffect)||void 0===n?void 0:n.filter)}export{e as a,g as b,r as c,$ as d,R as e,v as f,h as g,P as h,u as i,s as j,a as k,D as l,m,O as n,N as o,o as p,t as q,I as r,d as s,E as t,x as u,p as v,A as w,L as x,w as z}
6
+ import{l}from"./p-a8a0187d.js";import{c as n}from"./p-225c4ca4.js";async function o(n,o,i){const[u]=await l(["esri/layers/effects/jsonUtils"]),{toJSON:d,fromJSON:v}=u,e=null==o?void 0:o.layer;if(!n)return(null==e?void 0:e.effect)?e.effect:(null==e?void 0:e.featureEffect)?"includedEffect"===i?e.featureEffect.includedEffect:e.featureEffect.excludedEffect:null;const t=d(n);let r;r=e.featureEffect?"includedEffect"===i?e.featureEffect.includedEffect:e.featureEffect.excludedEffect:e.effect;const a=r?d(r):null;if(!a)return v(t);let s=[...a];return t&&t.forEach((l=>{s.forEach((n=>{const{value:o}=n;if(o)o.forEach(((i,u)=>{i.type===l.type?o[u]=l:!n.value.find((l=>l.type===t[0].type))&&(n.value=[...n.value,...t])}));else{const o=!s.find((l=>l.type===n.type));!s.find((n=>n.type===l.type))&&(s=[...s,l]),o&&(s=[...s,n])}}))})),v(s)}const i=n({data:{},relationshipRampExpandStates:{}}),u=i.state,d=i;async function v(l,n,o){var i,u,d,v,e,t,r,a,s;try{const c="group"===(null===(i=null==n?void 0:n.layer)||void 0===i?void 0:i.type),f=null===(d=null===(u=null==n?void 0:n.layer)||void 0===u?void 0:u.layers)||void 0===d?void 0:d.some((l=>l.visible)),$=null===(e=null===(v=null==n?void 0:n.layer)||void 0===v?void 0:v.layers)||void 0===e?void 0:e.every((l=>!(null==l?void 0:l.legendEnabled)));await o.whenOnce((()=>"ready"===(null==l?void 0:l.state))),!c||c&&f?c&&$?await o.whenOnce((()=>{var l;return null===(l=null==n?void 0:n.layer)||void 0===l?void 0:l.loaded})):await o.whenOnce((()=>null==n?void 0:n.ready)):await o.whenOnce((()=>null==n?void 0:n.legendElements));const y=null===(t=null==n?void 0:n.legendElements)||void 0===t?void 0:t[0],m=new Map,p=n.layer,N=await l.view.whenLayerView(p);await o.whenOnce((()=>!1===(null==N?void 0:N.updating)));const O=null===(r=p.renderer)||void 0===r?void 0:r.get("field");return void 0!==y&&(null===(a=null==y?void 0:y.infos)||void 0===a||a.forEach((l=>{var n;if("symbol-table"===l.type){const n=[];l.infos.forEach((l=>{n.push({count:null,selected:!1,legendElementInfo:l})})),m.set(l.title,{count:null,selected:!1,legendElementInfo:l,nestedInfos:n})}else m.set(null!==(n=l.label)&&void 0!==n?n:p.id,{count:null,selected:!1,legendElementInfo:l})}))),Promise.resolve({activeLayerInfo:n,title:null===(s=null==N?void 0:N.layer)||void 0===s?void 0:s.title,categories:m,field:O,queryExpressions:[],totalCount:null,fLayerView:N,legendElement:y})}catch(l){return Promise.resolve(null)}}async function e(l,n){const o={},i=[];l.activeLayerInfos.forEach(function(l,n,o){return i=>{var u;const d=null===(u=null==i?void 0:i.layer)||void 0===u?void 0:u.type;if("feature"===d||"group"===d){const u=v(n,i,o).then((l=>l));u&&l.push(u);const d=i=>{const u=v(n,i,o).then((l=>l));u&&l.push(u)};i.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{d(l)}))}))}))}}}(i,l,n));try{return(await Promise.all(i)).forEach((l=>{var n,i;return o[null===(i=null===(n=null==l?void 0:l.activeLayerInfo)||void 0===n?void 0:n.layer)||void 0===i?void 0:i.id]=l})),Promise.resolve(o)}catch(l){return Promise.reject(null)}}function t(l){return Array.from(l).map((l=>l[1]))}function r(l,n,o,i,u){var d,v,e;return i?null===(d=null==i?void 0:i.nestedInfos)||void 0===d?void 0:d[u]:null===(v=null==l?void 0:l.categories)||void 0===v?void 0:v.get(null!==(e=null==o?void 0:o.label)&&void 0!==e?e:null==n?void 0:n.id)}function a(l){var n;return null===(n=null==u?void 0:u.data)||void 0===n?void 0:n[null==l?void 0:l.id]}async function s(n,i,u,d,v){var e,t;const[r,a]=await l(["esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]),{queryExpressions:s,fLayerView:$}=n;!function(l,n,o,i){var u,d,v,e;const{field:t,legendElement:r,categories:a,fLayerView:s}=l,$=null==l?void 0:l.queryExpressions;i&&Array.from(l.categories).map((l=>l[1])).forEach((l=>{var n,o;(null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected)))&&(null===(o=l.nestedInfos)||void 0===o||o.forEach((l=>{const n=t?`${t} = '${l.legendElementInfo.value}'`:null,o=n?$.indexOf(n):-1;n&&-1!==o&&$.splice(o,1)})))}));const m=null==r?void 0:r.infos,p=y(s);let N=p?c(n,s):f(n,t,o,r,m,"");const O=i?null===(d=null===(u=a.get(i.title))||void 0===u?void 0:u.nestedInfos)||void 0===d?void 0:d[o]:a.get(null!==(v=n.label)&&void 0!==v?v:null===(e=null==s?void 0:s.layer)||void 0===e?void 0:e.id);O&&(O.selected=!(null==O?void 0:O.selected));const w=m&&1===m.length,A=$.indexOf(N);if(p){const l=$.indexOf(N);0===$.length||-1===l?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]?$[0]="1=0":$&&1===$.length||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]?$[0]=null:$.splice(l,1),$.join(" OR ")}else 0===$.length||-1===A?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]&&!w?$[0]="1=0":$&&1===$.length&&!w||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]&&!w?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]&&!w?$[0]=null:$.splice(A,1);if(i){const n=[];Array.from(l.categories).map((l=>l[1])).forEach((l=>{var o,i;(null===(o=l.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=l.nestedInfos)||void 0===i||i.forEach((l=>{t&&`${t} = '${l.legendElementInfo.value}'`&&n.push(`${t} = '${l.legendElementInfo.value}'`)})))})),n.forEach((l=>{-1===$.indexOf(l)&&$.push(l)}))}}(n,i,u,v);const m=s.join(" OR "),p=null!==(t=null===(e=null==$?void 0:$.filter)||void 0===e?void 0:e.timeExtent)&&void 0!==t?t:null,{type:N}=d;if("filter"===N)$.filter=new r({where:m,timeExtent:p});else if(d.effect){const{includedEffect:l,excludedEffect:n}=d.effect,i=await o(n,$,"excludedEffect"),u=await o(l,$,"includedEffect");$.featureEffect=new a({filter:new r({where:m,timeExtent:p}),includedEffect:u,excludedEffect:i})}return Promise.resolve()}function c(l,n){const o=n?n.layer.renderer.authoringInfo:null,i=o?o.fields:null,u=[];if(!i)return"";if(l.hasOwnProperty("value"))return i.forEach((n=>{l.value!==n&&u.push(`(${l.value} > ${n} OR (${n} IS NULL AND ${l.value} <> 0 AND ${l.value} IS NOT NULL))`)})),u.join(" AND ");{const l=[];i.forEach((n=>{l.push(`${n} = 0`)}));const n=[];if(i.length>2){i.forEach((l=>{i.forEach((o=>{if(l===o)return;const u=[];i.forEach((n=>{l!==n&&o!==n&&u.push(`${l} = ${o} AND (${l} > ${n} OR ${l} >= ${n})`)})),n.push(`(${u.join(" AND ")})`)}))}));const o=[];return i.forEach((l=>{o.push(`${l} IS NULL`)})),`(${l.join(" AND ")}) OR (${n.join(" OR ")}) OR (${o.join(" AND ")})`}{const n=[];i.forEach((o=>{i.forEach((i=>{o!==i&&(n.push(`${o} = ${i}`),n.push(`(${l.join(" AND ")})`))}))}));const o=[];return i.forEach((l=>{i.forEach((n=>{l!==n&&o.push(`(${l} = 0 AND ${n} IS NULL) OR (${l} IS NULL AND ${n} IS NULL)`)}))})),`(${n.join(" OR ")}) OR (${o.join(" OR ")})`}}}function f(l,n,o,i,u,d){const{value:v}=l;if("symbol-table"===i.type){if(!l.hasOwnProperty("value")||Array.isArray(l.value)&&1===(null==u?void 0:u.length)){if((null==u?void 0:u[0].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[0].value)&&(null==u?void 0:u[(null==u?void 0:u.length)-2])&&(null==u?void 0:u[(null==u?void 0:u.length)-2].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[(null==u?void 0:u.length)-2].value))return d?`((${n}/${d}) > ${null==u?void 0:u[0].value[1]}) OR ((${n}/${d}) < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]}) OR ${d} = 0 OR ${d} IS NULL`:`${n} > ${null==u?void 0:u[0].value[1]} OR ${n} < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]} OR ${n} IS NULL`;if(1===(null==u?void 0:u.length))return"1=0";{const l=[];null==u||u.forEach((o=>{if(null==o?void 0:o.value){const{value:i}=o,u=-1!==i.indexOf("'")?i.split("'").join("''"):null,d=u?`${n} <> '${u}'`:isNaN(i)||"string"==typeof i&&!i.trim()?`${n} <> '${i}'`:`${n} <> ${i} AND ${n} <> '${i}'`;l.push(d)}}));const o=l.join(" AND ");return n&&o?`${o} OR ${n} IS NULL`:""}}{const i=-1!==v.indexOf("'")?v.split("'").join("''"):null,e=Array.isArray(l.value),t=(null==u?void 0:u.length)-1===o,r=!(null==u?void 0:u[(null==u?void 0:u.length)-1].hasOwnProperty("value")),a=o===(null==u?void 0:u.length)-2;return e?d?t||r&&a?`(${n}/${d}) >= ${v[0]} AND (${n}/${d}) <= ${l.value[1]}`:`(${n}/${d}) > ${v[0]} AND (${n}/${d}) <= ${l.value[1]}`:t||r&&a?`${n} >= ${v[0]} AND ${n} <= ${v[1]}`:`${n} > ${v[0]} AND ${n} <= ${v[1]}`:1===(null==u?void 0:u.length)&&n?isNaN(v)||!v.trim().length?`${n} <> '${v}'`:`${n} <> ${v} OR ${n} <> '${v}'`:i?`${n} = '${i}'`:isNaN(v)||!v.trim().length?`${n} = '${v}'`:`${n} = ${v} OR ${n} = '${v}'`}}return""}function $(l){return Array.isArray(l)?l.every((l=>!l.selected)):l&&Array.from(l.categories.entries()).every((l=>!l[1].selected))&&"1=0"!==l.queryExpressions[0]}function y(l){return"predominance"===(null==l?void 0:l.get("layer.renderer.authoringInfo.type"))}function m(l){var n;return"relationship-ramp"===(null===(n=null==l?void 0:l.legendElements[1])||void 0===n?void 0:n.type)}function p(l,n,o){var i,u,d,v,e,t,r,a,s;const c=l.layer,f=null===(i=null==c?void 0:c.renderer)||void 0===i?void 0:i.field,$=null==n?void 0:n.type,m=l.get("layerView"),p=null==m?void 0:m.get("layer.renderer.classBreakInfos"),N=(null==m?void 0:m.get("layer.renderer.uniqueValueInfos"))&&f,O="size-ramp"===$,w="color-ramp"===$,A="opacity-ramp"===$,E="heatmap-ramp"===$,R=m&&p&&p.length>1,b=null==m?void 0:m.get("layer.renderer.authoringInfo.type"),L="class-breaks-color"===b,I="class-breaks-size"===b,D=1===(null===(u=null==n?void 0:n.infos)||void 0===u?void 0:u.length)&&!f,g="relationship"===b&&"size-ramp"!==(null==n?void 0:n.type)&&"symbol-table"!==(null==n?void 0:n.type),h="feature"===(null==l?void 0:l.get("layer.type")),x=h&&f&&!w&&!O&&R,P=!(!h||!f||w||O||R),S=!!(P||y(m)&&!O||L&&f||I&&f||D&&!f&&null!==f||g||N),j=(null==l?void 0:l.get("layer.featureReduction"))&&"size-ramp"===(null===(d=null==l?void 0:l.legendElements[o])||void 0===d?void 0:d.type),U="symbol-table"===(null==n?void 0:n.type)&&1===(null===(v=null==n?void 0:n.infos)||void 0===v?void 0:v.length),z=!(null==l?void 0:l.legendElements.every((l=>"color-ramp"!==l.type))),k=!(null==l?void 0:l.legendElements.every((l=>"size-ramp"!==l.type))),F=U&&z,V=U&&k,q=null===(e=null==n?void 0:n.infos)||void 0===e?void 0:e.every((l=>"number"==typeof l.value)),C="symbol-table"===(null===(r=null===(t=null==l?void 0:l.legendElements)||void 0===t?void 0:t[0])||void 0===r?void 0:r.type)&&"color-ramp"===(null===(s=null===(a=null==l?void 0:l.legendElements)||void 0===a?void 0:a[1])||void 0===s?void 0:s.type);return!(!h||j||A||E||F||V||q||C||"dot-density"===b)&&(p?x||S:P||S)}function N(l){var n,o,i,u,d;return l.queryExpressions=[],(null===(o=null===(n=null==l?void 0:l.fLayerView)||void 0===n?void 0:n.filter)||void 0===o?void 0:o.where)&&(l.fLayerView.filter.where=""),(null===(d=null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.featureEffect)||void 0===u?void 0:u.filter)||void 0===d?void 0:d.where)&&(l.fLayerView.featureEffect=null),l.categories.forEach((l=>{l.selected=!1})),l}function O(l,n){var o,i,u,d,v,e,t,r,a,s,c;const f=l.categories.get(n);null===(o=null==f?void 0:f.nestedInfos)||void 0===o||o.forEach((n=>{const o=l.queryExpressions.indexOf(`${l.field} = '${n.legendElementInfo.value}'`);-1!==o&&l.queryExpressions.splice(o,1),n.selected=!1}));const $=[],y=Array.from(l.categories).map((l=>l[1]));y.forEach((n=>{var o,i;(null===(o=n.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=n.nestedInfos)||void 0===i||i.forEach((n=>{$.push(`${l.field} = '${n.legendElementInfo.value}'`)})))})),$.forEach((n=>{-1===l.queryExpressions.indexOf(n)&&l.queryExpressions.push(n)}));let m=l.queryExpressions.join(" OR ");const p=y.every((l=>{var n;return null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected))}));return p?((null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.filter)||void 0===u?void 0:u.where)&&(l.fLayerView.filter.where=""),(null===(e=null===(v=null===(d=null==l?void 0:l.fLayerView)||void 0===d?void 0:d.featureEffect)||void 0===v?void 0:v.filter)||void 0===e?void 0:e.where)&&(l.fLayerView.featureEffect=null),l.queryExpressions=[]):((null===(r=null===(t=null==l?void 0:l.fLayerView)||void 0===t?void 0:t.filter)||void 0===r?void 0:r.where)&&(l.fLayerView.filter.where=m),(null===(c=null===(s=null===(a=null==l?void 0:l.fLayerView)||void 0===a?void 0:a.featureEffect)||void 0===s?void 0:s.filter)||void 0===c?void 0:c.where)&&(l.fLayerView.featureEffect.filter.where=m)),l}async function w(l,n,o){var i,u;const d=l.fLayerView.createQuery();if(o)if(o.nestedInfos.every((l=>!l.selected))){const n=o.nestedInfos.map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");d.where=n}else{const n=o.nestedInfos.filter((l=>l.selected)).map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");d.where=n}else{const n=l.queryExpressions.join(" OR ");d.where=n}try{const o=await(null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.layer)||void 0===u?void 0:u.queryExtent(d));await n.goTo(o)}catch(l){}}function A(l){return l.map((l=>null==l?void 0:l.count)).reduce(((l,n)=>l+n))}function E(l){return l.map((l=>{var n;return null===(n=null==l?void 0:l.nestedInfos)||void 0===n?void 0:n.map((l=>l.count)).reduce(((l,n)=>l+n))})).reduce(((l,n)=>l+n))}async function R(l,n,o,i,u,d,v,e){var t,r,a;if(!n)return;const s="feature"===(null===(t=null==n?void 0:n.layer)||void 0===t?void 0:t.type)?n.createQuery():null,$=y(n)?c(i,n):i.type?f(v,o,e,i,i.infos):f(i,o,u,d,d.infos);s&&$&&(s.where="1=0"===$?"1=1":$,s.geometry=l);try{const l=s?await n.queryFeatureCount(s):null;return Promise.resolve({[null!==(r=i.label)&&void 0!==r?r:null===(a=null==n?void 0:n.layer)||void 0===a?void 0:a.id]:l})}catch(l){console.error("FAILURE AT 'getInfoCount': ",l)}return Promise.resolve(null)}async function b(l,n){let o=Object.assign({},n);const{activeLayerInfos:i}=l;let u={};const d={};i.forEach((async o=>{var i,u,v,e;const t=o.legendElements[0],r=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,a=null===(v=o.layer.renderer)||void 0===v?void 0:v.get("field"),s=[];d[o.layer.id]=[],null===(e=null==t?void 0:t.infos)||void 0===e||e.forEach(((n,i)=>{var u;const v=null===(u=t.infos)||void 0===u?void 0:u.every((l=>"symbol-table"===l.type));if(v){const u=[];n.infos.forEach(((o,d)=>{const v=R(l.view.extent,r,a,n,i,t,o,d);u.push(v)})),d[o.layer.id].push(u)}else s.push(R(l.view.extent,r,a,n,i,t)),d[o.layer.id]=s}));const c=o=>{var i,u,v,e;const t=[],r=o.legendElements[0],a=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,s=null===(v=o.layer.renderer)||void 0===v?void 0:v.get("field");null===(e=null==r?void 0:r.infos)||void 0===e||e.forEach(((n,o)=>t.push(R(l.view.extent,a,s,n,o,r)))),d[o.layer.id]=t};o.children.forEach((async l=>{var n;c(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;c(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{c(l)}))}))}))}));for(const l in d){let n=u[l];n||(n=u[l]={});const o=await Promise.all(d[l]);if(o.every((l=>Array.isArray(l)))){const i=await Promise.all(o.map((async l=>(await Promise.all(l)).map((l=>l&&Object.values(l)[0])))));n[l]=i,u[l]=Object.assign({},n[l])}else{const i={};o.forEach((l=>{if(!l)return;const n=Object.keys(l)[0];i[n]=l[n]})),l&&(n[l]=i),u[l]=Object.assign({},n[l])}}return i.forEach((l=>{var o;const i=n[l.layer.id],d=l.layer.id;null===(o=null==i?void 0:i.categories)||void 0===o||o.forEach(((n,o)=>{var v;const e=Array.from(null==i?void 0:i.categories).findIndex((l=>l[0]===o));if(null==n?void 0:n.nestedInfos)null==n||n.nestedInfos.forEach(((n,o)=>{var i,d,v;const t=null===(v=null===(d=null==u?void 0:u[null===(i=null==l?void 0:l.layer)||void 0===i?void 0:i.id])||void 0===d?void 0:d[e])||void 0===v?void 0:v[o];n.count=isNaN(t)?null:t}));else{const l=null===(v=null==u?void 0:u[d])||void 0===v?void 0:v[o];n.count=isNaN(l)?null:l}}));const v=l=>{var o;const i=l.layer.id,d=n[i];null===(o=null==d?void 0:d.categories)||void 0===o||o.forEach(((l,n)=>{var o;const d=null===(o=null==u?void 0:u[i])||void 0===o?void 0:o[n];l.count=d}))};l.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{v(l)}))}))}))})),Promise.resolve(o)}function L(l,n){var o;return null===(o=null==l?void 0:l.nestedInfos)||void 0===o?void 0:o[n]}function I(l){return Array.from(l).map((l=>l[1])).every((l=>!!(null==l?void 0:l.nestedInfos)))}function D(l){var n,o,i,u;return!!(null===(u=null===(i=null===(o=null===(n=null==l?void 0:l.legendElements)||void 0===n?void 0:n[0])||void 0===o?void 0:o.infos)||void 0===i?void 0:i.every)||void 0===u?void 0:u.call(i,(l=>"symbol-table"===(null==l?void 0:l.type))))}function g(l,n){var o;return null===(o=null==l?void 0:l.categories)||void 0===o?void 0:o.get(null==n?void 0:n.title)}function h(l){const n="calcite-mode-",o=`${n}light`,i=`${n}dark`;return l.classList.contains(i)?i:o}function x(l){if(l.layerId&&l.intLegendLayerData){const n=l.layerId,o=l.intLegendLayerData;d.set("data",Object.assign(Object.assign({},u.data),{[n]:o}))}}function P(n,i){const{type:u}=n;"filter"===u?function(l){var n,o;null===(o=null===(n=null==l?void 0:l.allLayerViews)||void 0===n?void 0:n.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})))||void 0===o||o.forEach((l=>{const n=S(l);l.filter=n,l.set("featureEffect",null)}))}(i):"effect"===u&&function(n,i){var u;null===(u=null==i?void 0:i.allLayerViews)||void 0===u||u.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})).forEach((async i=>{if((null==n?void 0:n.effect)&&i){const[u]=await l(["esri/layers/support/FeatureEffect"]),{includedEffect:d,excludedEffect:v}=n.effect,e=await o(v,i,"excludedEffect"),t=await o(d,i,"includedEffect"),r=S(i);i.featureEffect=new u({filter:r,includedEffect:t,excludedEffect:e}),i.set("filter",null)}}))}(n,i)}function S(l){var n;return(null==l?void 0:l.filter)||(null===(n=null==l?void 0:l.featureEffect)||void 0===n?void 0:n.filter)}export{e as a,g as b,r as c,$ as d,b as e,v as f,h as g,P as h,u as i,s as j,a as k,D as l,m,O as n,N as o,o as p,t as q,I as r,d as s,E as t,x as u,p as v,A as w,L as x,w as z}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as i,f as t,h as e,g as s}from"./p-78780f63.js";import{l as n}from"./p-0ad0b29a.js";import{g as a}from"./p-a7a06d6a.js";import{g as r}from"./p-149d80ad.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";import"./p-225c4ca4.js";const o={base:"esri-legend",widget:"esri-widget",widgetPanel:"esri-widget--panel",component:"esri-component",iconLayerList:"esri-icon-layer-list"},d=class{constructor(t){i(this,t),this.handles=void 0,this.reactiveUtils=void 0,this.legendvm=void 0,this.widget=void 0,this.view=void 0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:"filter"},this.messages=void 0}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0}),await this.initializeModules()}async componentDidLoad(){a(this)}async initializeModules(){const[i,t,e,s]=await n(["esri/core/Handles","esri/core/reactiveUtils","esri/widgets/Widget","esri/widgets/Legend"]);this.handles=new i,this.reactiveUtils=t,this.widget=new e;const a=new s;return await t.whenOnce((()=>null==a?void 0:a.messages)),this.messages=Object.assign(Object.assign({},this.messages),a.messages),Promise.resolve()}async init(){if(this.reactiveUtils&&this.view&&this.handles)try{const{on:i}=this.reactiveUtils,[t]=await n(["esri/widgets/Legend/LegendViewModel"]),e=new t({view:this.view});this.legendvm=e,this.handles.add([i((()=>{var i;return null===(i=this.legendvm)||void 0===i?void 0:i.activeLayerInfos}),"change",(()=>{var i;return this._refreshActiveLayerInfos(null===(i=null==this?void 0:this.legendvm)||void 0===i?void 0:i.activeLayerInfos,this.reactiveUtils)}))])}catch(i){console.error('Failed at "init": ',i)}}render(){var i;const{base:t,component:s,widget:n,widgetPanel:a}=o;return e("div",{key:"interactive-legend",class:null===(i=this.widget)||void 0===i?void 0:i.classes(t,s,n,a)},e("instant-apps-interactive-legend-classic",{key:"interactive-legend-classic",ref:i=>this.ref=i,class:r(this.el),legendvm:this.legendvm,"zoom-to":this.zoomTo,filterMode:this.filterMode,"feature-count":this.featureCount,messages:this.messages}))}_refreshActiveLayerInfos(i,t){i&&(this.handles.removeAll(),i.forEach((i=>this._renderOnActiveLayerInfoChange(i,t))))}_renderOnActiveLayerInfoChange(i,t){var e;const{on:s}=this.reactiveUtils,n=s((()=>i.children),"change",(()=>i.children.forEach((i=>this._renderOnActiveLayerInfoChange(i,t)))));this.handles.add(n,`children_${null===(e=null==i?void 0:i.layer)||void 0===e?void 0:e.uid}`),i.children.forEach((i=>{var e,s;this._renderOnActiveLayerInfoChange(i,t),(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)>0&&(null===(s=null==i?void 0:i.children)||void 0===s||s.forEach((i=>this._renderOnActiveLayerInfoChange(i,t))))}))}get el(){return s(this)}static get watchers(){return{handles:["init"],reactiveUtils:["init"],view:["init"]}}};d.style=".sc-instant-apps-interactive-legend-h{display:block;height:100%}.sc-instant-apps-interactive-legend-h .esri-legend.sc-instant-apps-interactive-legend{height:100%;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.sc-instant-apps-interactive-legend-h .esri-legend.esri-component.esri-widget.esri-widget--panel.sc-instant-apps-interactive-legend{margin:0}";export{d as instant_apps_interactive_legend}
6
+ import{r as i,f as t,h as e,g as s}from"./p-78780f63.js";import{l as n}from"./p-a8a0187d.js";import{g as a}from"./p-83225907.js";import{g as r}from"./p-68434a63.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";import"./p-225c4ca4.js";const o={base:"esri-legend",widget:"esri-widget",widgetPanel:"esri-widget--panel",component:"esri-component",iconLayerList:"esri-icon-layer-list"},c=class{constructor(t){i(this,t),this.handles=void 0,this.reactiveUtils=void 0,this.legendvm=void 0,this.widget=void 0,this.view=void 0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:"filter"},this.messages=void 0}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0}),await this.initializeModules()}async componentDidLoad(){a(this)}async initializeModules(){const[i,t,e,s]=await n(["esri/core/Handles","esri/core/reactiveUtils","esri/widgets/Widget","esri/widgets/Legend"]);this.handles=new i,this.reactiveUtils=t,this.widget=new e;const a=new s;return await t.whenOnce((()=>null==a?void 0:a.messages)),this.messages=Object.assign(Object.assign({},this.messages),a.messages),Promise.resolve()}async init(){if(this.reactiveUtils&&this.view&&this.handles)try{const{on:i}=this.reactiveUtils,[t]=await n(["esri/widgets/Legend/LegendViewModel"]),e=new t({view:this.view});this.legendvm=e,this.handles.add([i((()=>{var i;return null===(i=this.legendvm)||void 0===i?void 0:i.activeLayerInfos}),"change",(()=>{var i;return this._refreshActiveLayerInfos(null===(i=null==this?void 0:this.legendvm)||void 0===i?void 0:i.activeLayerInfos,this.reactiveUtils)}))])}catch(i){console.error('Failed at "init": ',i)}}render(){var i;const{base:t,component:s,widget:n,widgetPanel:a}=o;return e("div",{key:"interactive-legend",class:null===(i=this.widget)||void 0===i?void 0:i.classes(t,s,n,a)},e("instant-apps-interactive-legend-classic",{key:"interactive-legend-classic",ref:i=>this.ref=i,class:r(this.el),legendvm:this.legendvm,"zoom-to":this.zoomTo,filterMode:this.filterMode,"feature-count":this.featureCount,messages:this.messages}))}_refreshActiveLayerInfos(i,t){i&&(this.handles.removeAll(),i.forEach((i=>this._renderOnActiveLayerInfoChange(i,t))))}_renderOnActiveLayerInfoChange(i,t){var e;const{on:s}=this.reactiveUtils,n=s((()=>i.children),"change",(()=>i.children.forEach((i=>this._renderOnActiveLayerInfoChange(i,t)))));this.handles.add(n,`children_${null===(e=null==i?void 0:i.layer)||void 0===e?void 0:e.uid}`),i.children.forEach((i=>{var e,s;this._renderOnActiveLayerInfoChange(i,t),(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)>0&&(null===(s=null==i?void 0:i.children)||void 0===s||s.forEach((i=>this._renderOnActiveLayerInfoChange(i,t))))}))}get el(){return s(this)}static get watchers(){return{handles:["init"],reactiveUtils:["init"],view:["init"]}}};c.style=".sc-instant-apps-interactive-legend-h{display:block;height:100%}.sc-instant-apps-interactive-legend-h .esri-legend.sc-instant-apps-interactive-legend{height:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1)}.sc-instant-apps-interactive-legend-h .esri-legend.esri-component.esri-widget.esri-widget--panel.sc-instant-apps-interactive-legend{margin:0}";export{c as instant_apps_interactive_legend}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as t,h as i,H as l,g as s}from"./p-78780f63.js";import{g as o}from"./p-a7a06d6a.js";import"./p-0ad0b29a.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";const n=class{constructor(i){t(this,i),this.messages=void 0,this.view=void 0}render(){var t,s,o,n,a,e,h;const d="2d"!==(null===(t=null==this?void 0:this.view)||void 0===t?void 0:t.type)&&(null==this?void 0:this.view)?this._getSceneViewCommands():this._getMapViewCommands(),r=this._isMacLike()?"Option":"Alt";return i(l,null,i("calcite-block",{open:!0,class:"instant-apps-keyboard-shortcuts__content",heading:null===(o=null===(s=null==this?void 0:this.messages)||void 0===s?void 0:s.generalShortcuts)||void 0===o?void 0:o.label},i("table",null,this.renderTableHeader(),i("tr",null,i("td",null,`${r} + M`),i("td",null,null===(a=null===(n=null==this?void 0:this.messages)||void 0===n?void 0:n.generalShortcuts)||void 0===a?void 0:a.title))),i("calcite-label",null,null===(h=null===(e=null==this?void 0:this.messages)||void 0===e?void 0:e.generalShortcuts)||void 0===h?void 0:h.title),i("table",null,this.renderTableHeader(),d.map((t=>i("tr",null,i("td",null,t.alias),i("td",null,t.title)))))))}componentDidLoad(){o(this)}renderTableHeader(){var t,l;return(null==this?void 0:this.messages)?i("tr",null,i("th",null,null===(t=null==this?void 0:this.messages)||void 0===t?void 0:t.generalShortcuts.shortcut),i("th",null,null===(l=null==this?void 0:this.messages)||void 0===l?void 0:l.generalShortcuts.action)):null}_getMapViewCommands(){return(null==this?void 0:this.messages)?[{alias:null==this?void 0:this.messages.mapShortcuts.arrowKeys,title:null==this?void 0:this.messages.mapShortcuts.nudge},{alias:"N",title:null==this?void 0:this.messages.mapShortcuts.N},{alias:"A",title:null==this?void 0:this.messages.mapShortcuts.A},{alias:"D",title:null==this?void 0:this.messages.mapShortcuts.D},{alias:"+",title:null==this?void 0:this.messages.mapShortcuts.plus},{alias:"-",title:null==this?void 0:this.messages.mapShortcuts.minus}]:[]}_getSceneViewCommands(){var t;const i="global"===(null===(t=null==this?void 0:this.view)||void 0===t?void 0:t.viewingMode),l=(null==this?void 0:this.messages)?[{alias:null==this?void 0:this.messages.mapShortcuts.arrowKeys,title:null==this?void 0:this.messages.mapShortcuts.nudge,show:!!i},{alias:"P",title:null==this?void 0:this.messages.sceneShortcuts.P,show:!0},{alias:"N",title:null==this?void 0:this.messages.sceneShortcuts.N,show:!0},{alias:"W",title:null==this?void 0:this.messages.sceneShortcuts.W,show:!0},{alias:"A",title:null==this?void 0:this.messages.sceneShortcuts.A,show:!0},{alias:"D",title:null==this?void 0:this.messages.sceneShortcuts.D,show:!0},{alias:"S",title:null==this?void 0:this.messages.sceneShortcuts.S,show:!0},{alias:"J",title:null==this?void 0:this.messages.sceneShortcuts.globalCommands.J,show:!!i},{alias:"U",title:null==this?void 0:this.messages.sceneShortcuts.globalCommands.U,show:!!i}]:[];return(null==this?void 0:this.messages)?null==l?void 0:l.filter((t=>t.show)):[]}_isMacLike(){return/(Mac)/i.test(navigator.platform)}get el(){return s(this)}};n.style=":host .instant-apps-keyboard-shortcuts__content{display:flex;flex-direction:column;font-family:var(--calcite-sans-family);font-size:0.875rem;background-color:var(--calcite-ui-background);color:var(--calcite-ui-text-1);width:auto;padding:0.5em;margin-bottom:0;overflow:auto}:host .instant-apps-keyboard-shortcuts__content table{border:none;border-collapse:collapse;width:100%;margin-bottom:1em}:host .instant-apps-keyboard-shortcuts__content table td,:host .instant-apps-keyboard-shortcuts__content table th{border:solid 1px var(--calcite-ui-border-1);padding:0.5rem 0.75rem 0.5rem 0.75rem;white-space:normal}:host .instant-apps-keyboard-shortcuts__content table td:lang(ja),:host .instant-apps-keyboard-shortcuts__content table td:lang(ja-JP),:host .instant-apps-keyboard-shortcuts__content table th:lang(ja-JP),:host .instant-apps-keyboard-shortcuts__content table th:lang(ja){white-space:nowrap}:host .instant-apps-keyboard-shortcuts__content tr:nth-child(even){background-color:var(--calcite-ui-foreground-2)}:host .instant-apps-keyboard-shortcuts__content tr th{padding:0.5em 0.7em;font-weight:400}";export{n as instant_apps_keyboard_shortcuts}
6
+ import{r as t,h as i,H as l,g as s}from"./p-78780f63.js";import{g as o}from"./p-83225907.js";import"./p-a8a0187d.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";const n=class{constructor(i){t(this,i),this.messages=void 0,this.view=void 0}render(){var t,s,o,n,a,e,h;const d="2d"!==(null===(t=null==this?void 0:this.view)||void 0===t?void 0:t.type)&&(null==this?void 0:this.view)?this._getSceneViewCommands():this._getMapViewCommands(),r=this._isMacLike()?"Option":"Alt";return i(l,null,i("calcite-block",{open:!0,class:"instant-apps-keyboard-shortcuts__content",heading:null===(o=null===(s=null==this?void 0:this.messages)||void 0===s?void 0:s.generalShortcuts)||void 0===o?void 0:o.label},i("table",null,this.renderTableHeader(),i("tr",null,i("td",null,`${r} + M`),i("td",null,null===(a=null===(n=null==this?void 0:this.messages)||void 0===n?void 0:n.generalShortcuts)||void 0===a?void 0:a.title))),i("calcite-label",null,null===(h=null===(e=null==this?void 0:this.messages)||void 0===e?void 0:e.generalShortcuts)||void 0===h?void 0:h.title),i("table",null,this.renderTableHeader(),d.map((t=>i("tr",null,i("td",null,t.alias),i("td",null,t.title)))))))}componentDidLoad(){o(this)}renderTableHeader(){var t,l;return(null==this?void 0:this.messages)?i("tr",null,i("th",null,null===(t=null==this?void 0:this.messages)||void 0===t?void 0:t.generalShortcuts.shortcut),i("th",null,null===(l=null==this?void 0:this.messages)||void 0===l?void 0:l.generalShortcuts.action)):null}_getMapViewCommands(){return(null==this?void 0:this.messages)?[{alias:null==this?void 0:this.messages.mapShortcuts.arrowKeys,title:null==this?void 0:this.messages.mapShortcuts.nudge},{alias:"N",title:null==this?void 0:this.messages.mapShortcuts.N},{alias:"A",title:null==this?void 0:this.messages.mapShortcuts.A},{alias:"D",title:null==this?void 0:this.messages.mapShortcuts.D},{alias:"+",title:null==this?void 0:this.messages.mapShortcuts.plus},{alias:"-",title:null==this?void 0:this.messages.mapShortcuts.minus}]:[]}_getSceneViewCommands(){var t;const i="global"===(null===(t=null==this?void 0:this.view)||void 0===t?void 0:t.viewingMode),l=(null==this?void 0:this.messages)?[{alias:null==this?void 0:this.messages.mapShortcuts.arrowKeys,title:null==this?void 0:this.messages.mapShortcuts.nudge,show:!!i},{alias:"P",title:null==this?void 0:this.messages.sceneShortcuts.P,show:!0},{alias:"N",title:null==this?void 0:this.messages.sceneShortcuts.N,show:!0},{alias:"W",title:null==this?void 0:this.messages.sceneShortcuts.W,show:!0},{alias:"A",title:null==this?void 0:this.messages.sceneShortcuts.A,show:!0},{alias:"D",title:null==this?void 0:this.messages.sceneShortcuts.D,show:!0},{alias:"S",title:null==this?void 0:this.messages.sceneShortcuts.S,show:!0},{alias:"J",title:null==this?void 0:this.messages.sceneShortcuts.globalCommands.J,show:!!i},{alias:"U",title:null==this?void 0:this.messages.sceneShortcuts.globalCommands.U,show:!!i}]:[];return(null==this?void 0:this.messages)?null==l?void 0:l.filter((t=>t.show)):[]}_isMacLike(){return/(Mac)/i.test(navigator.platform)}get el(){return s(this)}};n.style=":host .instant-apps-keyboard-shortcuts__content{display:flex;flex-direction:column;font-family:var(--calcite-sans-family);font-size:0.875rem;background-color:var(--calcite-color-background);color:var(--calcite-color-text-1);width:auto;padding:0.5em;margin-bottom:0;overflow:auto}:host .instant-apps-keyboard-shortcuts__content table{border:none;border-collapse:collapse;width:100%;margin-bottom:1em}:host .instant-apps-keyboard-shortcuts__content table td,:host .instant-apps-keyboard-shortcuts__content table th{border:solid 1px var(--calcite-color-border-1);padding:0.5rem 0.75rem 0.5rem 0.75rem;white-space:normal}:host .instant-apps-keyboard-shortcuts__content table td:lang(ja),:host .instant-apps-keyboard-shortcuts__content table td:lang(ja-JP),:host .instant-apps-keyboard-shortcuts__content table th:lang(ja-JP),:host .instant-apps-keyboard-shortcuts__content table th:lang(ja){white-space:nowrap}:host .instant-apps-keyboard-shortcuts__content tr:nth-child(even){background-color:var(--calcite-color-foreground-2)}:host .instant-apps-keyboard-shortcuts__content tr th{padding:0.5em 0.7em;font-weight:400}";export{n as instant_apps_keyboard_shortcuts}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{l as n}from"./p-0ad0b29a.js";import{l as o}from"./p-14a48b14.js";function a(n){var a,i,t;const l=null!==(a=n.closest("[lang]"))&&void 0!==a?a:null===(t=null===(i=n.shadowRoot)||void 0===i?void 0:i.ownerDocument)||void 0===t?void 0:t.documentElement,s=((null==l?void 0:l.lang)||(null===navigator||void 0===navigator?void 0:navigator.language)||"en").toLowerCase();return o.has(s)?o.get(s):o.has(s.slice(0,2))?o.get(s.slice(0,2)):"en"}function i(n,o){return new Promise(((a,i)=>{const t=`./assets/t9n/${n}/resources_${o}.json`,{href:l}=new URL(t,window.location.href);fetch(l).then((n=>{n.ok?a(n.json()):i()}),(()=>i()))}))}function t(n,o){var a;const i=null==o?void 0:o.get("user.culture"),t=null===(a=null===window||void 0===window?void 0:window.navigator)||void 0===a?void 0:a.language,l=n.getLocale();return n.normalizeMessageBundleLocale(i||t||l||"en")}async function l(n,o){const t=n.tagName.toLowerCase(),l=null!=o?o:a(n);let s;try{s=await i(t,l)}catch(n){console.warn(`no locale for ${t} (${l}) loading default locale en.`),s=await i(t,"en")}return[s,l]}async function s(o){const a=await l(o.el);o.messages=a[0];const[i]=await n(["esri/intl"]);i.onLocaleChange((async n=>{const a=await l(o.el,n);o.messages=a[0]}))}export{t as a,l as b,a as c,s as g}
6
+ import{l as n}from"./p-a8a0187d.js";import{l as o}from"./p-14a48b14.js";function a(n){var a,i,t;const l=null!==(a=n.closest("[lang]"))&&void 0!==a?a:null===(t=null===(i=n.shadowRoot)||void 0===i?void 0:i.ownerDocument)||void 0===t?void 0:t.documentElement,s=((null==l?void 0:l.lang)||(null===navigator||void 0===navigator?void 0:navigator.language)||"en").toLowerCase();return o.has(s)?o.get(s):o.has(s.slice(0,2))?o.get(s.slice(0,2)):"en"}function i(n,o){return new Promise(((a,i)=>{const t=`./assets/t9n/${n}/resources_${o}.json`,{href:l}=new URL(t,window.location.href);fetch(l).then((n=>{n.ok?a(n.json()):i()}),(()=>i()))}))}function t(n,o){var a;const i=null==o?void 0:o.get("user.culture"),t=null===(a=null===window||void 0===window?void 0:window.navigator)||void 0===a?void 0:a.language,l=n.getLocale();return n.normalizeMessageBundleLocale(i||t||l||"en")}async function l(n,o){const t=n.tagName.toLowerCase(),l=null!=o?o:a(n);let s;try{s=await i(t,l)}catch(n){console.warn(`no locale for ${t} (${l}) loading default locale en.`),s=await i(t,"en")}return[s,l]}async function s(o){const a=await l(o.el);o.messages=a[0];const[i]=await n(["esri/intl"]);i.onLocaleChange((async n=>{const a=await l(o.el,n);o.messages=a[0]}))}export{t as a,l as b,a as c,s as g}
@@ -8,4 +8,4 @@ import{r as t,c as i,h as e,H as s,g as o}from"./p-78780f63.js";import{u as a,t
8
8
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
9
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
10
10
  * v2.0.0
11
- */const _={slow:14e3,medium:1e4,fast:6e3},j="container",q=class{constructor(e){t(this,e),this.calciteAlertBeforeClose=i(this,"calciteAlertBeforeClose",6),this.calciteAlertClose=i(this,"calciteAlertClose",6),this.calciteAlertBeforeOpen=i(this,"calciteAlertBeforeOpen",6),this.calciteAlertOpen=i(this,"calciteAlertOpen",6),this.calciteInternalAlertSync=i(this,"calciteInternalAlertSync",6),this.calciteInternalAlertRegister=i(this,"calciteInternalAlertRegister",6),this.autoCloseTimeoutId=null,this.totalOpenTime=0,this.totalHoverTime=0,this.openTransitionProp="opacity",this.setTransitionEl=t=>{this.transitionEl=t},this.closeAlert=()=>{this.autoCloseTimeoutId=null,this.queued=!1,this.open=!1,this.queue=this.queue.filter((t=>t!==this.el)),this.determineActiveAlert(),this.calciteInternalAlertSync.emit({queue:this.queue})},this.actionsEndSlotChangeHandler=t=>{this.hasEndActions=a(t)},this.handleMouseOver=()=>{window.clearTimeout(this.autoCloseTimeoutId),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()},this.handleMouseLeave=()=>{const t=Date.now()-this.lastMouseOverBegin,i=_[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?t+this.totalHoverTime:t,this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),i)},this.open=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.kind="brand",this.icon=void 0,this.iconFlipRtl=!1,this.label=void 0,this.numberingSystem=void 0,this.placement="bottom",this.scale="m",this.messages=void 0,this.messageOverrides=void 0,this.slottedInShell=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasEndActions=!1,this.queue=[],this.queueLength=0,this.queued=!1}openHandler(){v(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit(),this.open||(this.queue=this.queue.filter((t=>t!==this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}))}onMessagesChange(){}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),_[this.autoCloseDuration]))}connectedCallback(){u(this),f(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit()}async componentWillLoad(){h(this),await b(this),this.open&&v(this)}componentDidLoad(){d(this)}disconnectedCallback(){window.dispatchEvent(new CustomEvent("calciteInternalAlertUnregister",{detail:{alert:this.el}})),window.clearTimeout(this.autoCloseTimeoutId),window.clearTimeout(this.queueTimeout),m(this),w(this),this.slottedInShell=!1}render(){g.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,signDisplay:"always"};const{open:t,autoClose:i,label:o,placement:a,queued:l}=this,c=i?"alert":"alertdialog",h=!t,d=r(y,this.icon,this.kind),p=this.queueLength>1;return e(s,{"aria-hidden":n(h),"aria-label":o,"calcite-hydrated-hidden":h,role:c},e("div",{class:{[j]:!0,"container--queued":l,[`${j}--${a}`]:!0,"container--slotted-in-shell":this.slottedInShell},onPointerEnter:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null,onPointerLeave:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseLeave:null,ref:this.setTransitionEl},d&&this.renderIcon(d),e("div",{class:"text-container"},e("slot",{name:"title"}),e("slot",{name:"message"}),e("slot",{name:"link"})),this.renderActionsEnd(),p?this.renderQueueCount():null,this.renderCloseButton(),t&&!l&&i?e("div",{class:"dismiss-progress"}):null))}renderCloseButton(){return e("button",{"aria-label":this.messages.close,class:"close",key:"close",onClick:this.closeAlert,type:"button",ref:t=>this.closeButton=t},e("calcite-icon",{icon:"x",scale:c(this.scale)}))}renderQueueCount(){const t=g.numberFormatter.format(this.queueLength>2?this.queueLength-1:1);return e("div",{class:{"queue-count":!0,"queue-count--active":this.queueLength>1},key:"queue-count"},e("calcite-chip",{scale:this.scale,value:t},t))}renderActionsEnd(){return e("div",{class:"actions-end"},e("slot",{name:"actions-end",onSlotchange:this.actionsEndSlotChangeHandler}))}renderIcon(t){return e("div",{class:"icon"},e("calcite-icon",{flipRtl:this.iconFlipRtl,icon:t,scale:c(this.scale)}))}alertSync(t){this.queue!==t.detail.queue&&(this.queue=t.detail.queue),this.queueLength=this.queue.length,this.determineActiveAlert(),t.stopPropagation()}alertRegister(){this.open&&!this.queue.includes(this.el)&&(this.queued=!0,this.queue.push(this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}),this.determineActiveAlert()}alertUnregister(t){const i=this.queue.filter((i=>i!==t.detail.alert));this.queue=i,window.dispatchEvent(new CustomEvent("calciteInternalAlertSync",{detail:{queue:i}}))}async setFocus(){await p(this);const t=l(this.el,{selector:"calcite-link"});if(this.closeButton||t)return t?t.setFocus():void(this.closeButton&&this.closeButton.focus())}effectiveLocaleChange(){k(this,this.effectiveLocale)}determineActiveAlert(){var t;(null===(t=this.queue)||void 0===t?void 0:t[0])===this.el&&(this.openAlert(),this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),_[this.autoCloseDuration])))}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}openAlert(){window.clearTimeout(this.queueTimeout),this.queueTimeout=window.setTimeout((()=>this.queued=!1),300)}static get assetsDirs(){return["assets"]}get el(){return o(this)}static get watchers(){return{open:["openHandler"],messageOverrides:["onMessagesChange"],autoCloseDuration:["updateDuration"],effectiveLocale:["effectiveLocaleChange"]}}};q.style=':host{--calcite-alert-edge-distance:2rem;--calcite-alert-dismiss-progress-background:var(--calcite-color-transparent-tint);display:block}.container{pointer-events:none;position:fixed;z-index:var(--calcite-z-index-toast);margin-inline:auto;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:-moz-min-content;min-inline-size:min-content;align-items:center;justify-content:center;background-color:var(--calcite-color-foreground-1);text-align:start;opacity:0;--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);border-radius:var(--calcite-border-radius);border-block-start:0 solid transparent;border-inline:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3);inline-size:var(--calcite-alert-width);max-inline-size:calc(100% - var(--calcite-alert-edge-distance) * 2);transition:var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out}.container--bottom,.container--top{inset-inline-end:0;inset-inline-start:0}.container[class*=bottom]{transform:translate3d(0, var(--calcite-alert-edge-distance), 0);inset-block-end:var(--calcite-alert-edge-distance)}.container[class*=top]{transform:translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), 0);inset-block-start:var(--calcite-alert-edge-distance)}.container[class*=start]{inset-inline-start:var(--calcite-alert-edge-distance);inset-inline-end:auto}.container[class*=end]{inset-inline-end:var(--calcite-alert-edge-distance);inset-inline-start:auto}.icon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0px;margin-block:auto;margin-inline-end:auto;padding-inline-start:var(--calcite-alert-spacing-token-large)}.close{display:flex;cursor:pointer;align-items:center;justify-content:flex-end;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;-webkit-appearance:none;padding:var(--calcite-alert-spacing-token-large);outline-color:transparent}.close:focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.close:hover,.close:focus{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.close:active{background-color:var(--calcite-color-foreground-3)}.queue-count{visibility:hidden;display:flex;min-inline-size:-moz-min-content;min-inline-size:min-content;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;background-color:var(--calcite-color-foreground-1);text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline:0 solid transparent;border-start-end-radius:0}.queue-count--active{visibility:visible;opacity:1}.dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-alert-dismiss-progress-background);inset-inline-end:0}.actions-end{display:flex;align-self:stretch}.text-container{box-sizing:border-box;display:flex;min-inline-size:0px;flex:1 1 auto;flex-direction:column;overflow-wrap:break-word;padding-block:var(--calcite-alert-spacing-token-small);padding-inline:var(--calcite-alert-spacing-token-large) var(--calcite-alert-spacing-token-small)}.footer{position:relative;display:flex;inline-size:auto;justify-content:flex-end;align-self:stretch;padding-block-start:1px;block-size:inherit}:host([scale=s]){--calcite-alert-width:40em;--calcite-alert-spacing-token-small:0.5rem;--calcite-alert-spacing-token-large:0.75rem;--calcite-alert-footer-height:2rem;--calcite-alert-footer-divider-gap:0.125rem}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .queue-count{margin-inline:0.5rem}:host([scale=s]) .container{--calcite-alert-min-height:3.5rem}:host([scale=m]){--calcite-alert-width:50em;--calcite-alert-spacing-token-small:0.75rem;--calcite-alert-spacing-token-large:1rem;--calcite-alert-footer-height:3rem;--calcite-alert-footer-divider-gap:0.25rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .queue-count{margin-inline:0.75rem}:host([scale=m]) .container{--calcite-alert-min-height:4.1875rem}:host([scale=l]){--calcite-alert-width:60em;--calcite-alert-spacing-token-small:1rem;--calcite-alert-spacing-token-large:1.25rem;--calcite-alert-footer-height:4rem;--calcite-alert-footer-divider-gap:0.5rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){margin-block-end:0.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-alert-min-height:5.625rem}:host([open]) .container:not(.container--queued){border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container:not(.container--queued)[class*=bottom]{transform:translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), inherit)}:host([open]) .container:not(.container--queued)[class*=top]{transform:translate3d(0, var(--calcite-alert-edge-distance), inherit)}:host([auto-close])>.queue-count{border-inline-end:0 solid transparent}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0px;display:inline;font-size:var(--calcite-font-size--1);line-height:1.375;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);margin-inline-end:0.5rem}slot[name=link]::slotted(*),*::slotted([slot=link]){display:inline-flex;color:var(--calcite-color-text-link)}:host([kind=brand]) .container{border-block-start-color:var(--calcite-color-brand)}:host([kind=brand]) .container .icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-block-start-color:var(--calcite-color-status-info)}:host([kind=info]) .container .icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-block-start-color:var(--calcite-color-status-success)}:host([kind=success]) .container .icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-block-start-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .icon{color:var(--calcite-color-status-warning)}:host([auto-close-duration=fast]) .dismiss-progress:after{animation:dismissProgress 6000ms ease-out}:host(:hover[auto-close-duration=fast]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=medium]) .dismiss-progress:after{animation:dismissProgress 10000ms ease-out}:host(:hover[auto-close-duration=medium]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=slow]) .dismiss-progress:after{animation:dismissProgress 14000ms ease-out}:host(:hover[auto-close-duration=slow]) .dismiss-progress:after{animation-play-state:paused}@keyframes dismissProgress{0%{inline-size:0px;opacity:0.75}100%{inline-size:100%;opacity:1}}.container--slotted-in-shell{position:absolute}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}';const W=class{constructor(e){t(this,e),this.closeEdit=i(this,"closeEdit",7),this.editsComplete=i(this,"editsComplete",7),this.refreshGraphics=i(this,"refreshGraphics",7),this._shouldClose=!1,this.graphics=void 0,this.mapView=void 0,this.open=!1,this.graphicIndex=0,this._editorLoading=!1,this._translations=void 0}async graphicsWatchHandler(){0===this.graphics.length&&await this._closeEdit()}async openWatchHandler(t){var i;t&&(null===(i=this.graphics)||void 0===i?void 0:i.length)>0&&this.graphicIndex>-1&&(this._editorLoading=!0,await this._initEditorWidget(),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&await this._startUpdate(),this._editorLoading=!1),t||await this._closeEdit()}async featureSelectionChange(){await this._closeEdit()}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){var t,i;(null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&(null===(i=this.graphics[0])||void 0===i?void 0:i.layer)&&(this._layer=this.graphics[0].layer,this._layerEditHandle&&this._layerEditHandle.remove(),this._layerEditHandle=this._layer.on("edits",(()=>{this.editsComplete.emit(),this.open=!1})))}render(){var t;const i=!((null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled),o=this._editorLoading?"display-none":"position-absolute",a=this._editorLoading?"":"display-none";return e(s,null,e("div",{class:"position-absolute"},i?e("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},e("div",{slot:"message"},this._translations.enableEditing)):void 0,e("div",{class:"position-absolute",slot:"content"},e("div",{class:o,id:"feature-form",ref:t=>this._editContainer=t}),e("calcite-loader",{class:a,label:"",scale:"s"}))))}async _initModules(){const[t,i]=await x(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}async _initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div"),i=(await C(this.mapView)).map((t=>({layer:t,geometryUpdatesEnabled:!1})));this._editor=new this.Editor({allowedWorkflows:"update",view:this.mapView,layerInfos:i,visibleElements:{snappingControls:!1,sketchTooltipControls:!1},container:t}),this._attachmentHandle&&this._activeWorkflowHandle&&(this._attachmentHandle.remove(),this._activeWorkflowHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state||"creating-features"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._activeWorkflowHandle=this.reactiveUtils.watch((()=>{var t;return null===(t=this._editor.viewModel.activeWorkflow)||void 0===t?void 0:t.activeWorkflow}),(t=>{"update-table-record"!==(null==t?void 0:t.type)&&"create-features"!==(null==t?void 0:t.type)||(this._shouldClose=!1),(null==t?void 0:t.type)||(null==t?void 0:t.hasPendingEdits)||(this.open=!1)})),this._editContainer.appendChild(t)}}async _closeEdit(){var t,i,e,s;this._shouldClose=!0,(null===(t=this._editor)||void 0===t?void 0:t.activeWorkflow)&&await(null===(i=this._editor)||void 0===i?void 0:i.cancelWorkflow()),this.graphicIndex>-1&&(null===(e=this.graphics)||void 0===e?void 0:e.length)>0&&this.refreshGraphics.emit(this.graphics),null===(s=this._editor)||void 0===s||s.destroy(),this._shouldClose=!1,this.closeEdit.emit()}async _startUpdate(){await this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0}async _getTranslations(){const t=await z(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],open:["openWatchHandler"]}}};W.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{--calcite-ui-background:none;padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-ui-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-ui-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}";const E=class{constructor(e){t(this,e),this.selectionChanged=i(this,"selectionChanged",7),this.graphics=void 0,this.isLoading=!1,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._showListView=!1,this._translations=void 0}async graphicsWatchHandler(){var t;if(this._features||await this._initFeaturesWidget(),this.graphics.length>0){const i=null===(t=this.graphics[0])||void 0===t?void 0:t.layer;this._editEnabled=i.editingEnabled&&i.capabilities.operations.supportsUpdate,this._features.open({features:this.graphics})}else this._features.clear(),this._features.close()}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features.selectedFeature}async closeEdit(){this._editRecordOpen=!1}async refreshGraphics(t){this.graphics=[...t.detail]}async componentWillLoad(){await this._initModules(),await this._getTranslations()}render(){var t,i,o;const a=this.isLoading||this._editRecordOpen?"display-none":"position-absolute",n=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",l=!this.isLoading&&this._editRecordOpen||this._showListView?"display-none":"",r=(null===(i=null===(t=this._features)||void 0===t?void 0:t.features)||void 0===i?void 0:i.length)<2;return e(s,null,e("calcite-shell",null,e("calcite-loader",{class:this.isLoading?"":"display-none",label:this._translations.fetchingData}),e("div",{class:"esri-widget "+a,id:"features-node"}),e("div",{class:`${l} width-100`,slot:"footer"},e("div",{class:"display-flex top-border padding-1-2"},e("calcite-button",{appearance:"solid","icon-start":"pencil",id:"solutions-edit",onClick:()=>this._openEditRecord(),width:"full"},this._translations.edit),e("calcite-tooltip",{label:"",placement:"bottom","reference-element":"solutions-edit"},e("span",null,this._translations.edit))),e("div",{class:"display-flex padding-1-2 button-container top-border"},e("div",{class:"min-width-100"},e("calcite-button",{appearance:"outline",disabled:r,id:"solutions-back",onClick:()=>this._back(),width:"full"},this._translations.back),e("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},e("span",null,this._translations.back))),e("div",null,e("calcite-action",{icon:"list",onClick:()=>this._toggleListView(),scale:"s",text:this._getCount(),textEnabled:!0})),e("div",{class:"min-width-100"},e("calcite-button",{appearance:"outline",disabled:r,id:"solutions-next",onClick:()=>this._next(),width:"full"},this._translations.next),e("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-next"},e("span",null,this._translations.next))))),e("edit-card",{class:n,graphicIndex:null===(o=this._features)||void 0===o?void 0:o.selectedFeatureIndex,graphics:this.graphics,mapView:this.mapView,open:this._editRecordOpen}),e("calcite-alert",{icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},e("div",{slot:"title"},this._translations.editDisabled),e("div",{slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t,i]=await x(["esri/widgets/Features","esri/core/reactiveUtils"]);this.Features=t,this.reactiveUtils=i}async _initFeaturesWidget(){return await this.mapView.when((()=>{this._features?this._features.view=this.mapView:(this._features=new this.Features({view:this.mapView,container:"features-node",visibleElements:{actionBar:!1,closeButton:!1,heading:!0}}),this.reactiveUtils.watch((()=>this._features.viewModel.featureMenuOpen),(t=>{t||(this._showListView=t)})),this.zoomAndScrollToSelected&&this.reactiveUtils.watch((()=>this._features.selectedFeatureIndex),(t=>{t>-1&&this.selectionChanged.emit(this._features.selectedFeature)})))}))}_alertClosed(){this._alertOpen=!1}_editRecordClosed(){this._editRecordOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}_back(){this._features.previous(),this._count=this._getCount()}_next(){this._features.next(),this._count=this._getCount()}_getCount(){var t,i,e;const s=((null===(t=this._features)||void 0===t?void 0:t.viewModel.selectedFeatureIndex)+1).toString(),o=null===(e=null===(i=this._features)||void 0===i?void 0:i.features)||void 0===e?void 0:e.length.toString();return this._translations.indexOfTotal.replace("{{index}}",s).replace("{{total}}",o)}_toggleListView(){this._showListView=!this._showListView;const t=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=t}async _getTranslations(){const t=await z(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};E.style=":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-ui-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-ui-foreground-1) !important;height:100% !important}";export{q as calcite_alert,W as edit_card,E as info_card}
11
+ */const _={slow:14e3,medium:1e4,fast:6e3},j="container",q=class{constructor(e){t(this,e),this.calciteAlertBeforeClose=i(this,"calciteAlertBeforeClose",6),this.calciteAlertClose=i(this,"calciteAlertClose",6),this.calciteAlertBeforeOpen=i(this,"calciteAlertBeforeOpen",6),this.calciteAlertOpen=i(this,"calciteAlertOpen",6),this.calciteInternalAlertSync=i(this,"calciteInternalAlertSync",6),this.calciteInternalAlertRegister=i(this,"calciteInternalAlertRegister",6),this.autoCloseTimeoutId=null,this.totalOpenTime=0,this.totalHoverTime=0,this.openTransitionProp="opacity",this.setTransitionEl=t=>{this.transitionEl=t},this.closeAlert=()=>{this.autoCloseTimeoutId=null,this.queued=!1,this.open=!1,this.queue=this.queue.filter((t=>t!==this.el)),this.determineActiveAlert(),this.calciteInternalAlertSync.emit({queue:this.queue})},this.actionsEndSlotChangeHandler=t=>{this.hasEndActions=a(t)},this.handleMouseOver=()=>{window.clearTimeout(this.autoCloseTimeoutId),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()},this.handleMouseLeave=()=>{const t=Date.now()-this.lastMouseOverBegin,i=_[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?t+this.totalHoverTime:t,this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),i)},this.open=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.kind="brand",this.icon=void 0,this.iconFlipRtl=!1,this.label=void 0,this.numberingSystem=void 0,this.placement="bottom",this.scale="m",this.messages=void 0,this.messageOverrides=void 0,this.slottedInShell=void 0,this.defaultMessages=void 0,this.effectiveLocale="",this.hasEndActions=!1,this.queue=[],this.queueLength=0,this.queued=!1}openHandler(){v(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit(),this.open||(this.queue=this.queue.filter((t=>t!==this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}))}onMessagesChange(){}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),_[this.autoCloseDuration]))}connectedCallback(){u(this),f(this),this.open&&!this.queued&&this.calciteInternalAlertRegister.emit()}async componentWillLoad(){h(this),await b(this),this.open&&v(this)}componentDidLoad(){d(this)}disconnectedCallback(){window.dispatchEvent(new CustomEvent("calciteInternalAlertUnregister",{detail:{alert:this.el}})),window.clearTimeout(this.autoCloseTimeoutId),window.clearTimeout(this.queueTimeout),m(this),w(this),this.slottedInShell=!1}render(){g.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,signDisplay:"always"};const{open:t,autoClose:i,label:o,placement:a,queued:l}=this,c=i?"alert":"alertdialog",h=!t,d=r(y,this.icon,this.kind),p=this.queueLength>1;return e(s,{"aria-hidden":n(h),"aria-label":o,"calcite-hydrated-hidden":h,role:c},e("div",{class:{[j]:!0,"container--queued":l,[`${j}--${a}`]:!0,"container--slotted-in-shell":this.slottedInShell},onPointerEnter:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null,onPointerLeave:this.autoClose&&this.autoCloseTimeoutId?this.handleMouseLeave:null,ref:this.setTransitionEl},d&&this.renderIcon(d),e("div",{class:"text-container"},e("slot",{name:"title"}),e("slot",{name:"message"}),e("slot",{name:"link"})),this.renderActionsEnd(),p?this.renderQueueCount():null,this.renderCloseButton(),t&&!l&&i?e("div",{class:"dismiss-progress"}):null))}renderCloseButton(){return e("button",{"aria-label":this.messages.close,class:"close",key:"close",onClick:this.closeAlert,type:"button",ref:t=>this.closeButton=t},e("calcite-icon",{icon:"x",scale:c(this.scale)}))}renderQueueCount(){const t=g.numberFormatter.format(this.queueLength>2?this.queueLength-1:1);return e("div",{class:{"queue-count":!0,"queue-count--active":this.queueLength>1},key:"queue-count"},e("calcite-chip",{scale:this.scale,value:t},t))}renderActionsEnd(){return e("div",{class:"actions-end"},e("slot",{name:"actions-end",onSlotchange:this.actionsEndSlotChangeHandler}))}renderIcon(t){return e("div",{class:"icon"},e("calcite-icon",{flipRtl:this.iconFlipRtl,icon:t,scale:c(this.scale)}))}alertSync(t){this.queue!==t.detail.queue&&(this.queue=t.detail.queue),this.queueLength=this.queue.length,this.determineActiveAlert(),t.stopPropagation()}alertRegister(){this.open&&!this.queue.includes(this.el)&&(this.queued=!0,this.queue.push(this.el)),this.calciteInternalAlertSync.emit({queue:this.queue}),this.determineActiveAlert()}alertUnregister(t){const i=this.queue.filter((i=>i!==t.detail.alert));this.queue=i,window.dispatchEvent(new CustomEvent("calciteInternalAlertSync",{detail:{queue:i}}))}async setFocus(){await p(this);const t=l(this.el,{selector:"calcite-link"});if(this.closeButton||t)return t?t.setFocus():void(this.closeButton&&this.closeButton.focus())}effectiveLocaleChange(){k(this,this.effectiveLocale)}determineActiveAlert(){var t;(null===(t=this.queue)||void 0===t?void 0:t[0])===this.el&&(this.openAlert(),this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout((()=>this.closeAlert()),_[this.autoCloseDuration])))}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}openAlert(){window.clearTimeout(this.queueTimeout),this.queueTimeout=window.setTimeout((()=>this.queued=!1),300)}static get assetsDirs(){return["assets"]}get el(){return o(this)}static get watchers(){return{open:["openHandler"],messageOverrides:["onMessagesChange"],autoCloseDuration:["updateDuration"],effectiveLocale:["effectiveLocaleChange"]}}};q.style=':host{--calcite-alert-edge-distance:2rem;--calcite-alert-dismiss-progress-background:var(--calcite-color-transparent-tint);display:block}.container{pointer-events:none;position:fixed;z-index:var(--calcite-z-index-toast);margin-inline:auto;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:-moz-min-content;min-inline-size:min-content;align-items:center;justify-content:center;background-color:var(--calcite-color-foreground-1);text-align:start;opacity:0;--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);border-radius:var(--calcite-border-radius);border-block-start:0 solid transparent;border-inline:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3);inline-size:var(--calcite-alert-width);max-inline-size:calc(100% - var(--calcite-alert-edge-distance) * 2);transition:var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out}.container--bottom,.container--top{inset-inline-end:0;inset-inline-start:0}.container[class*=bottom]{transform:translate3d(0, var(--calcite-alert-edge-distance), 0);inset-block-end:var(--calcite-alert-edge-distance)}.container[class*=top]{transform:translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), 0);inset-block-start:var(--calcite-alert-edge-distance)}.container[class*=start]{inset-inline-start:var(--calcite-alert-edge-distance);inset-inline-end:auto}.container[class*=end]{inset-inline-end:var(--calcite-alert-edge-distance);inset-inline-start:auto}.icon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0px;margin-block:auto;margin-inline-end:auto;padding-inline-start:var(--calcite-alert-spacing-token-large)}.close{display:flex;cursor:pointer;align-items:center;justify-content:flex-end;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;-webkit-appearance:none;padding:var(--calcite-alert-spacing-token-large);outline-color:transparent}.close:focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.close:hover,.close:focus{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.close:active{background-color:var(--calcite-color-foreground-3)}.queue-count{visibility:hidden;display:flex;min-inline-size:-moz-min-content;min-inline-size:min-content;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;background-color:var(--calcite-color-foreground-1);text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline:0 solid transparent;border-start-end-radius:0}.queue-count--active{visibility:visible;opacity:1}.dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-alert-dismiss-progress-background);inset-inline-end:0}.actions-end{display:flex;align-self:stretch}.text-container{box-sizing:border-box;display:flex;min-inline-size:0px;flex:1 1 auto;flex-direction:column;overflow-wrap:break-word;padding-block:var(--calcite-alert-spacing-token-small);padding-inline:var(--calcite-alert-spacing-token-large) var(--calcite-alert-spacing-token-small)}.footer{position:relative;display:flex;inline-size:auto;justify-content:flex-end;align-self:stretch;padding-block-start:1px;block-size:inherit}:host([scale=s]){--calcite-alert-width:40em;--calcite-alert-spacing-token-small:0.5rem;--calcite-alert-spacing-token-large:0.75rem;--calcite-alert-footer-height:2rem;--calcite-alert-footer-divider-gap:0.125rem}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .queue-count{margin-inline:0.5rem}:host([scale=s]) .container{--calcite-alert-min-height:3.5rem}:host([scale=m]){--calcite-alert-width:50em;--calcite-alert-spacing-token-small:0.75rem;--calcite-alert-spacing-token-large:1rem;--calcite-alert-footer-height:3rem;--calcite-alert-footer-divider-gap:0.25rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .queue-count{margin-inline:0.75rem}:host([scale=m]) .container{--calcite-alert-min-height:4.1875rem}:host([scale=l]){--calcite-alert-width:60em;--calcite-alert-spacing-token-small:1rem;--calcite-alert-spacing-token-large:1.25rem;--calcite-alert-footer-height:4rem;--calcite-alert-footer-divider-gap:0.5rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){margin-block-end:0.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-alert-min-height:5.625rem}:host([open]) .container:not(.container--queued){border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container:not(.container--queued)[class*=bottom]{transform:translate3d(0, calc(-1 * var(--calcite-alert-edge-distance)), inherit)}:host([open]) .container:not(.container--queued)[class*=top]{transform:translate3d(0, var(--calcite-alert-edge-distance), inherit)}:host([auto-close])>.queue-count{border-inline-end:0 solid transparent}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0px;display:inline;font-size:var(--calcite-font-size--1);line-height:1.375;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);margin-inline-end:0.5rem}slot[name=link]::slotted(*),*::slotted([slot=link]){display:inline-flex;color:var(--calcite-color-text-link)}:host([kind=brand]) .container{border-block-start-color:var(--calcite-color-brand)}:host([kind=brand]) .container .icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-block-start-color:var(--calcite-color-status-info)}:host([kind=info]) .container .icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-block-start-color:var(--calcite-color-status-success)}:host([kind=success]) .container .icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-block-start-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .icon{color:var(--calcite-color-status-warning)}:host([auto-close-duration=fast]) .dismiss-progress:after{animation:dismissProgress 6000ms ease-out}:host(:hover[auto-close-duration=fast]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=medium]) .dismiss-progress:after{animation:dismissProgress 10000ms ease-out}:host(:hover[auto-close-duration=medium]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=slow]) .dismiss-progress:after{animation:dismissProgress 14000ms ease-out}:host(:hover[auto-close-duration=slow]) .dismiss-progress:after{animation-play-state:paused}@keyframes dismissProgress{0%{inline-size:0px;opacity:0.75}100%{inline-size:100%;opacity:1}}.container--slotted-in-shell{position:absolute}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}';const W=class{constructor(e){t(this,e),this.closeEdit=i(this,"closeEdit",7),this.editsComplete=i(this,"editsComplete",7),this.refreshGraphics=i(this,"refreshGraphics",7),this._shouldClose=!1,this.graphics=void 0,this.mapView=void 0,this.open=!1,this.graphicIndex=0,this._editorLoading=!1,this._translations=void 0}async graphicsWatchHandler(){0===this.graphics.length&&await this._closeEdit()}async openWatchHandler(t){var i;t&&(null===(i=this.graphics)||void 0===i?void 0:i.length)>0&&this.graphicIndex>-1&&(this._editorLoading=!0,await this._initEditorWidget(),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&await this._startUpdate(),this._editorLoading=!1),t||await this._closeEdit()}async featureSelectionChange(){await this._closeEdit()}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){var t,i;(null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&(null===(i=this.graphics[0])||void 0===i?void 0:i.layer)&&(this._layer=this.graphics[0].layer,this._layerEditHandle&&this._layerEditHandle.remove(),this._layerEditHandle=this._layer.on("edits",(()=>{this.editsComplete.emit(),this.open=!1})))}render(){var t;const i=!((null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled),o=this._editorLoading?"display-none":"position-absolute",a=this._editorLoading?"":"display-none";return e(s,null,e("div",{class:"position-absolute"},i?e("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},e("div",{slot:"message"},this._translations.enableEditing)):void 0,e("div",{class:"position-absolute",slot:"content"},e("div",{class:o,id:"feature-form",ref:t=>this._editContainer=t}),e("calcite-loader",{class:a,label:"",scale:"s"}))))}async _initModules(){const[t,i]=await x(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}async _initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div"),i=(await C(this.mapView)).map((t=>({layer:t,geometryUpdatesEnabled:!1})));this._editor=new this.Editor({allowedWorkflows:"update",view:this.mapView,layerInfos:i,visibleElements:{snappingControls:!1,sketchTooltipControls:!1},container:t}),this._attachmentHandle&&this._activeWorkflowHandle&&(this._attachmentHandle.remove(),this._activeWorkflowHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state||"creating-features"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._activeWorkflowHandle=this.reactiveUtils.watch((()=>{var t;return null===(t=this._editor.viewModel.activeWorkflow)||void 0===t?void 0:t.activeWorkflow}),(t=>{"update-table-record"!==(null==t?void 0:t.type)&&"create-features"!==(null==t?void 0:t.type)||(this._shouldClose=!1),(null==t?void 0:t.type)||(null==t?void 0:t.hasPendingEdits)||(this.open=!1)})),this._editContainer.appendChild(t)}}async _closeEdit(){var t,i,e,s;this._shouldClose=!0,(null===(t=this._editor)||void 0===t?void 0:t.activeWorkflow)&&await(null===(i=this._editor)||void 0===i?void 0:i.cancelWorkflow()),this.graphicIndex>-1&&(null===(e=this.graphics)||void 0===e?void 0:e.length)>0&&this.refreshGraphics.emit(this.graphics),null===(s=this._editor)||void 0===s||s.destroy(),this._shouldClose=!1,this.closeEdit.emit()}async _startUpdate(){await this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0}async _getTranslations(){const t=await z(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],open:["openWatchHandler"]}}};W.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{--calcite-color-background:none;padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-color-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-color-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}";const E=class{constructor(e){t(this,e),this.selectionChanged=i(this,"selectionChanged",7),this.graphics=void 0,this.isLoading=!1,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._showListView=!1,this._translations=void 0}async graphicsWatchHandler(){var t;if(this._features||await this._initFeaturesWidget(),this.graphics.length>0){const i=null===(t=this.graphics[0])||void 0===t?void 0:t.layer;this._editEnabled=i.editingEnabled&&i.capabilities.operations.supportsUpdate,this._features.open({features:this.graphics})}else this._features.clear(),this._features.close()}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features.selectedFeature}async closeEdit(){this._editRecordOpen=!1}async refreshGraphics(t){this.graphics=[...t.detail]}async componentWillLoad(){await this._initModules(),await this._getTranslations()}render(){var t,i,o;const a=this.isLoading||this._editRecordOpen?"display-none":"position-absolute",n=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",l=!this.isLoading&&this._editRecordOpen||this._showListView?"display-none":"",r=(null===(i=null===(t=this._features)||void 0===t?void 0:t.features)||void 0===i?void 0:i.length)<2;return e(s,null,e("calcite-shell",null,e("calcite-loader",{class:this.isLoading?"":"display-none",label:this._translations.fetchingData}),e("div",{class:"esri-widget "+a,id:"features-node"}),e("div",{class:`${l} width-100`,slot:"footer"},e("div",{class:"display-flex top-border padding-1-2"},e("calcite-button",{appearance:"solid","icon-start":"pencil",id:"solutions-edit",onClick:()=>this._openEditRecord(),width:"full"},this._translations.edit),e("calcite-tooltip",{label:"",placement:"bottom","reference-element":"solutions-edit"},e("span",null,this._translations.edit))),e("div",{class:"display-flex padding-1-2 button-container top-border"},e("div",{class:"min-width-100"},e("calcite-button",{appearance:"outline",disabled:r,id:"solutions-back",onClick:()=>this._back(),width:"full"},this._translations.back),e("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},e("span",null,this._translations.back))),e("div",null,e("calcite-action",{icon:"list",onClick:()=>this._toggleListView(),scale:"s",text:this._getCount(),textEnabled:!0})),e("div",{class:"min-width-100"},e("calcite-button",{appearance:"outline",disabled:r,id:"solutions-next",onClick:()=>this._next(),width:"full"},this._translations.next),e("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-next"},e("span",null,this._translations.next))))),e("edit-card",{class:n,graphicIndex:null===(o=this._features)||void 0===o?void 0:o.selectedFeatureIndex,graphics:this.graphics,mapView:this.mapView,open:this._editRecordOpen}),e("calcite-alert",{icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},e("div",{slot:"title"},this._translations.editDisabled),e("div",{slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t,i]=await x(["esri/widgets/Features","esri/core/reactiveUtils"]);this.Features=t,this.reactiveUtils=i}async _initFeaturesWidget(){return await this.mapView.when((()=>{this._features?this._features.view=this.mapView:(this._features=new this.Features({view:this.mapView,container:"features-node",visibleElements:{actionBar:!1,closeButton:!1,heading:!0}}),this.reactiveUtils.watch((()=>this._features.viewModel.featureMenuOpen),(t=>{t||(this._showListView=t)})),this.zoomAndScrollToSelected&&this.reactiveUtils.watch((()=>this._features.selectedFeatureIndex),(t=>{t>-1&&this.selectionChanged.emit(this._features.selectedFeature)})))}))}_alertClosed(){this._alertOpen=!1}_editRecordClosed(){this._editRecordOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}_back(){this._features.previous(),this._count=this._getCount()}_next(){this._features.next(),this._count=this._getCount()}_getCount(){var t,i,e;const s=((null===(t=this._features)||void 0===t?void 0:t.viewModel.selectedFeatureIndex)+1).toString(),o=null===(e=null===(i=this._features)||void 0===i?void 0:i.features)||void 0===e?void 0:e.length.toString();return this._translations.indexOfTotal.replace("{{index}}",s).replace("{{total}}",o)}_toggleListView(){this._showListView=!this._showListView;const t=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=t}async _getTranslations(){const t=await z(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};E.style=":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}";export{q as calcite_alert,W as edit_card,E as info_card}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,h as o,H as s,g as n}from"./p-78780f63.js";import{l as e}from"./p-a8a0187d.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";const i="components",r=`[slot="${i}"]`,a=class{constructor(o){t(this,o),this.components=[],this.view=void 0}async componentWillLoad(){const[t]=await e(["esri/widgets/Expand"]);this.Expand=t,this._handleComponents()}componentWillUpdate(){this._handleComponents()}render(){return o(s,null,o("slot",{name:i}))}_handleComponents(){const t=this._getComponentsNode();t&&(this._resetUI(t),this._attachComponents(t))}_attachComponents(t){this.components.forEach(this._attachmentComponent(t))}_attachmentComponent(t){return(o,s)=>{let n=o.content;o.isExpand&&(n=this._getExpand(o),o.expandIconClass&&(n.expandIconClass=o.expandIconClass),o.expandIcon&&(n.expandIcon=o.expandIcon),o.collapseTooltip&&(n.collapseTooltip=o.collapseTooltip),o.expandTooltip&&(n.expandTooltip=o.expandTooltip)),n.container||(n.container=document.createElement("div")),null==t||t.appendChild(n.container),s!==this.components.length-1&&(n.container.style="border-bottom: 1px solid var(--calcite-color-border-3)")}}_getExpand(t){const{view:o}=this,{content:s}=t;return new this.Expand({content:s,view:o,expanded:!1,mode:"floating",group:"instant-apps-control-panel"})}_getComponentsNode(){return this.el.querySelector(r)}_resetUI(t){if(t.children.length>0){const{firstChild:o}=t;for(;o;)t.removeChild(o)}}get el(){return n(this)}};a.style=":host{display:block}";export{a as instant_apps_control_panel}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,c as a,h as n,H as s,g as e}from"./p-78780f63.js";import{d as i,s as r,i as o,e as l,f as c,E as p,l as u,h as g,c as h}from"./p-62e92138.js";import"./p-83225907.js";import"./p-a8a0187d.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";import"./p-225c4ca4.js";const d="instant-apps-components__ckeditor-wrapper",m=class{constructor(n){t(this,n),this.isFocused=a(this,"isFocused",7),this.dataChanged=a(this,"dataChanged",7),this.value=void 0,this.editorInstance=void 0,this.config=void 0}updateValue(){this.value&&this.editorInstance.setData(this.value)}async componentDidLoad(){this.init()}componentDidUpdate(){this.editorInstance.setData(this.value)}render(){return n(s,null,n("div",null))}init(){this.applyStyles(),this.initEditor()}applyStyles(){if(document.getElementById(d))return;const t=document.createElement("style");t.id=d,t.innerHTML="\n .ck.ck-reset.ck-editor.ck-rounded-corners {\n margin-top: 10px !important;\n margin-left: 55px !important;\n }\n .ck-editor__editable {\n height: 70px !important;\n font-size: 0.875rem !important;\n line-height: \t1.375 !important;\n color: var(--calcite-color-text-1) !important;\n }\n\n .ck.ck-editor__editable_inline>:first-child,\n .ck.ck-editor__editable_inline>:last-child {\n --ck-spacing-large: 0.5rem !important;\n }\n\n .ck.ck-balloon-panel.ck-powered-by-balloon {\n --ck-z-modal: 700;\n z-index: 700;\n }\n\n .calcite-mode-dark .ck-editor__editable {\n color: var(--calcite-color-text-inverse) !important;\n }\n",document.head.prepend(t)}async initEditor(){const t=await this.createEditor();t&&(this.editorInstance=t,(this.value||""===this.value)&&t.setData(this.value),t.editing.view.document.on("change:isFocused",this.getEditorFocusedCallback(t)))}async createEditor(){try{let t;return t=this.config?await ClassicEditor.create(this.el,this.config):await ClassicEditor.create(this.el),this.editorInstance=t,Promise.resolve(t)}catch(t){return console.error(t),Promise.reject(null)}}getEditorFocusedCallback(t){return(a,n,s)=>{if(s)this.isFocused.emit();else{const a=t.getData();this.value!==a&&(this.value=a,this.dataChanged.emit(a))}}}get el(){return e(this)}static get watchers(){return{value:["updateValue"]}}};m.style=":host{display:block}";const v="instant-apps-language-translator-item",_={section:`${v}__section`,selected:`${v}__section--selected`,collapsed:`${v}__section--collapsed`,topRow:`${v}__top-row`,labelContainer:`${v}__label-container`,label:`${v}__label`,uiLocationPopoverContent:`${v}__ui-location-popover-content`,uiLocationItems:`${v}__ui-location-items`,uiLocationItem:`${v}__ui-location-item`,infoIcon:`${v}__info-icon`,infoButton:`${v}__info-button`,tip:`${v}__tip`},f=class{constructor(n){t(this,n),this.translatorItemDataUpdated=a(this,"translatorItemDataUpdated",7),this.fieldName=void 0,this.translatedLanguageLabel=void 0,this.type=void 0,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0}componentDidLoad(){this.init()}init(){this.type===i.TextEditor&&r.onChange("uiData",(()=>this.handleEditorCollapse()))}render(){const t=this.getUIDataItem();return n(s,{class:`${o()?l.Dark:l.Light}`},this.renderBase(t),this.renderPopover(t))}renderBase(t){return n("div",{class:v},this.renderUserLocaleSection(t),this.renderTranslatedLanguageSection())}renderUserLocaleSection(t){const a=null==t?void 0:t.userLocaleData,s=null==a?void 0:a.value;return n("div",{class:`${_.section}${(null==t?void 0:t.selected)?` ${_.selected}`:""}`},this.renderItemHeader(c.User,null==a?void 0:a.label),(null==t?void 0:t.expanded)?this.renderInput(s,c.User):null)}renderTranslatedLanguageSection(){var t;const a=this.getUIDataItem(),s=null==a?void 0:a.selected,e=r.get("currentLanguage"),i=r.get("portalItemResourceT9n"),o=null===(t=null==i?void 0:i[e])||void 0===t?void 0:t[this.fieldName];return n("div",{class:`${_.section}${s?` ${_.selected}`:""}`},this.renderItemHeader(c.Translation,this.translatedLanguageLabel),(null==a?void 0:a.expanded)?this.renderInput(o,c.Translation):null)}renderInput(t,a){return"string"===this.type||"textarea"===this.type?a===c.User?this.renderUserLocaleInput(t):this.renderTranslatedLanguageInput(t):this.renderTextEditor(t,a)}renderUserLocaleInput(t){return n("calcite-input",{class:l.Light,ref:t=>this.userLocaleInput=t,"data-field-name":this.fieldName,value:t,onFocus:this.handleSelection,onCalciteInputChange:this.handleUserInputChange.bind(this)})}renderTranslatedLanguageInput(t){return n("calcite-input",{class:l.Light,ref:t=>this.translatedLangInput=t,"data-field-name":this.fieldName,onFocus:this.handleSelection,onCalciteInputChange:this.handleTranslatedInputChange.bind(this),value:t})}renderTextEditor(t,a){return n("instant-apps-ckeditor-wrapper",{ref:this.setEditor.bind(this,a),onDataChanged:this.handleTextEditorDataChange.bind(this,a),onIsFocused:this.handleSelection,value:null!=t?t:"","data-field-name":this.fieldName,config:{toolbar:[]}})}renderItemHeader(t,a){return n("div",{class:_.topRow},n("div",{class:_.labelContainer},this.renderExpandCollapseButton(),n("calcite-icon",{icon:p.SettingIndicator,scale:"s"}),n("span",{class:_.label},t===c.Translation?this.translatedLanguageLabel:a),t===c.User?n("button",{id:`${this.fieldName}goTo`,class:_.infoButton},n("calcite-icon",{class:_.infoIcon,icon:p.Popover,scale:"s"})):null),this.renderCopyButton(t))}renderExpandCollapseButton(){const t=this.getUIDataItem();return n("calcite-action",{onClick:this.handleExpand.bind(this,t),icon:(null==t?void 0:t.expanded)?p.Expanded:p.Collapsed,scale:"s",appearance:"transparent",text:""})}renderPopover(t){const a=this.getTip(t);return n("calcite-popover",{referenceElement:`${this.fieldName}goTo`,label:"","auto-close":"true",placement:"trailing",closable:!0},n("span",{class:_.uiLocationPopoverContent},n("span",{class:_.uiLocationItems},this.getUILocation(t)),a?n("span",{class:_.tip},a):null))}renderCopyButton(t){const a=o();return n("calcite-action",{class:a?l.Dark:l.Light,onClick:this.copySelection.bind(this,t),slot:"action",icon:p.Copy,appearance:"transparent",text:""})}getUIDataItem(){if(u.uiData)return u.uiData.get(this.fieldName)}updateT9nStore(t,a){const n=r.get("currentLanguage"),s=g(n,{[t]:a});r.set("portalItemResourceT9n",s)}handleExpand(t){t.expanded=!t.expanded;const a=new Map(u.uiData);a.set(this.fieldName,t),r.set("uiData",a)}handleEditorCollapse(){var t,a;const n=r.get("uiData"),s=null==n?void 0:n.get(this.fieldName);if(!(null==s?void 0:s.expanded)&&(null===(t=this.userEditorWrapper)||void 0===t?void 0:t.editorInstance)&&(null===(a=this.translatedEditorWrapper)||void 0===a?void 0:a.editorInstance)){const{userEditorWrapper:t,translatedEditorWrapper:a}=this,n=t.editorInstance.getData();t.value=n;const s=a.editorInstance.getData();a.value=s,t.editorInstance.destroy(),a.editorInstance.destroy()}}handleSelection(t){const a=new Map(u.uiData),n=h();n.forEach((t=>{(null==a?void 0:a.get(t)).selected=!1})),n.forEach((n=>{var s;n===(null===(s=null==t?void 0:t.target)||void 0===s?void 0:s.getAttribute("data-field-name"))&&((null==a?void 0:a.get(n)).selected=!0)})),r.set("uiData",a)}getUILocation(t){const{uiLocation:a,userLocaleData:s}=t,{section:e,subsection:i}=a,r=[e.label,i.label,s.label].filter((t=>!!t));return r.map(((t,a)=>n("span",{class:_.uiLocationItem},n("span",null,t),a!==r.length-1?n("calcite-icon",{icon:"chevron-right",scale:"s"}):null)))}getTip(t){const{tip:a}=t;return a}copySelection(t){this.type===i.TextEditor?this.copyTextEditorContent(t):this.copyCalciteInputContent(t)}copyTextEditorContent(t){var a,n;const s=t===c.User?null===(a=this.userEditorWrapper)||void 0===a?void 0:a.editorInstance:null===(n=this.translatedEditorWrapper)||void 0===n?void 0:n.editorInstance;setTimeout((()=>{this.selectContent(s),setTimeout((()=>this.selectContent(s)),50)}),50),this.copyContent(s)}selectContent(t){t.editing.view.focus();const{model:a}=t,n=a.createRangeIn(a.document.getRoot());a.change((t=>t.setSelection(n)))}copyContent(t){const a=t.getData(),n=document.createElement("div");n.contentEditable="true",n.innerHTML=a,document.body.appendChild(n);const s=document.createRange();s.selectNodeContents(n);const e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(s),document.execCommand("copy"),document.body.removeChild(n)}copyCalciteInputContent(t){const a=t===c.User?this.userLocaleInput:this.translatedLangInput;a.selectText(),navigator.clipboard.writeText(a.value)}setEditor(t,a){t===c.User?this.userEditorWrapper=a:this.translatedEditorWrapper=a}async handleUserInputChange(t){r.set("saving",!0);try{const a=t.target.value;this.getUIDataItem().userLocaleData.value=a,await this.userLocaleInputOnChangeCallback(this.fieldName,a),r.set("saving",!1)}catch(t){r.set("saving",!1)}}async handleUserTextEditorChange(t){r.set("saving",!0);try{const a=t.detail;this.getUIDataItem().userLocaleData.value=a,await this.userLocaleInputOnChangeCallback(this.fieldName,a),r.set("saving",!1)}catch(t){r.set("saving",!1)}}async handleTranslatedInputChange(t){r.set("saving",!0);try{const a=t.composedPath();this.updateT9nStore(this.fieldName,a[0].value);const{fieldName:n,locale:s,resource:e}=this.getTranslatedLocaleCallbackData(),i=t.target.value;await this.translatedLocaleInputOnChangeCallback(n,i,s,e),setTimeout((()=>r.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),r.set("saving",!1)}}async handleTranslatedTextEditorChange(t){r.set("saving",!0);try{this.updateT9nStore(this.fieldName,t.detail);const{fieldName:a,locale:n,resource:s}=this.getTranslatedLocaleCallbackData(),e=t.detail;await this.translatedLocaleInputOnChangeCallback(a,e,n,s),setTimeout((()=>r.set("saving",!1)),1500),this.translatorItemDataUpdated.emit()}catch(t){console.error("Error writing to portal item resource: ",t),r.set("saving",!1)}}handleTextEditorDataChange(t,a){t===c.User?this.handleUserTextEditorChange(a):this.handleTranslatedTextEditorChange(a)}getTranslatedLocaleCallbackData(){const{fieldName:t}=this;return{fieldName:t,locale:r.get("currentLanguage"),resource:r.get("portalItemResource")}}get el(){return e(this)}};f.style=".sc-instant-apps-language-translator-item-h{display:block}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{padding:10px;border-bottom:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-2);width:49%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__top-row.sc-instant-apps-language-translator-item{display:flex;align-items:center;justify-content:space-between}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label-container.sc-instant-apps-language-translator-item{display:flex;align-items:center}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item .instant-apps-language-translator-item__label.sc-instant-apps-language-translator-item{display:inline-block;margin-left:10px;font-size:14px;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item calcite-input.sc-instant-apps-language-translator-item{margin-top:10px;margin-left:55px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--last-item.sc-instant-apps-language-translator-item{border-bottom:none}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item:first-child{margin-right:1%}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-popover-content.sc-instant-apps-language-translator-item{display:inline-block;padding:10px;max-width:400px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-items.sc-instant-apps-language-translator-item{display:flex}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__ui-location-item.sc-instant-apps-language-translator-item{display:flex;align-items:center;font-weight:var(--calcite-font-weight-medium);font-size:14px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__tip.sc-instant-apps-language-translator-item{display:inline-block;font-size:14px;line-height:22px}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__info-button.sc-instant-apps-language-translator-item{border:0;background-color:transparent;cursor:pointer}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item{background-color:#f1faff;background-color:var(--calcite-color-brand);color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-action.sc-instant-apps-language-translator-item{--calcite-ui-icon-color:var(--calcite-color-text-inverse)}.calcite-mode-dark.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section--selected.sc-instant-apps-language-translator-item calcite-icon.sc-instant-apps-language-translator-item{color:var(--calcite-color-text-inverse)}.instant-apps-language-translator--last-item.sc-instant-apps-language-translator-item-h .instant-apps-language-translator-item__section.sc-instant-apps-language-translator-item{border-bottom:none}";const b="instant-apps-language-translator-search",x={base:b,input:`${b}__input`,suggestionList:`${b}__suggestion-list`,suggestionListItem:`${b}__suggestion-list-item`},k=class{constructor(n){t(this,n),this.suggestionSelected=a(this,"suggestionSelected",7),this.t9nPlaceholder=void 0,this.results=[]}render(){return n(s,null,this.renderSearchInput(),this.renderSuggestions())}renderSearchInput(){return n("calcite-input",{ref:t=>this.searchInput=t,class:x.input,onCalciteInputInput:this.handleSearch.bind(this),type:"search",placeholder:this.t9nPlaceholder,icon:"search"})}renderSuggestions(){return this.results.length>0?this.renderSuggestionList():null}renderSuggestionList(){return n("ul",{class:x.suggestionList},this.results.map((t=>this.renderSuggestionListItem(t))))}renderSuggestionListItem(t){return n("li",{onClick:this.selectSuggestion.bind(this),class:x.suggestionListItem,"data-field-name":t.fieldName},t.userLocaleData.label)}handleSearch(t){var a,n;const s=null===(n=null===(a=t.target.value)||void 0===a?void 0:a.toLowerCase())||void 0===n?void 0:n.trim(),e=r.get("uiData"),i=h(),o=r.get("portalItemResourceT9n"),l=r.get("currentLanguage"),c=o[l],p=this.getSettingDataItems(i).filter(this.matchedResultsCallback(e,c,s,l));this.results=[...p.map((t=>Object.assign({fieldName:t},e.get(t))))]}matchedResultsCallback(t,a,n,s){return e=>{var i;const r=t.get(e),{label:o}=r.userLocaleData,{value:l}=r.userLocaleData,c=t.get("translatedLanguageLabels"),p=null===(i=null==c?void 0:c[s])||void 0===i?void 0:i[e],u=null==a?void 0:a[e],g=this.testUserInput(o,n),h=this.testUserInput(l,n),d=this.testUserInput(p,n),m=this.testUserInput(u,n);return g||h||d||m}}getSettingDataItems(t){return t.filter((t=>"locales"!==t&&"translatedLanguageLabels"!==t))}testUserInput(t,a){var n;return!!(null==t?void 0:t.trim())&&!!(null==a?void 0:a.trim())&&-1!==(null===(n=null==t?void 0:t.toLowerCase())||void 0===n?void 0:n.search(a))}selectSuggestion(t){const a=t.target.getAttribute("data-field-name");this.suggestionSelected.emit(a),this.resetSearchInput()}resetSearchInput(){this.searchInput.value="",this.results=[]}};k.style=".sc-instant-apps-language-translator-search-h{display:block;position:relative}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__input.sc-instant-apps-language-translator-search{width:235.5px}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list.sc-instant-apps-language-translator-search{position:absolute;margin:0;padding:0;width:100%;max-height:30vh;overflow:auto;border-left:none;background-color:var(--calcite-color-foreground-1);border:1px solid #c0c0c0;z-index:702}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:first-child{border:none}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search{margin-top:0;padding:0.8em 1em;border-top:solid 1px rgba(110, 110, 110, 0.3);display:flex;flex-direction:column;cursor:pointer;word-break:break-word}.sc-instant-apps-language-translator-search-h .instant-apps-language-translator-search__suggestion-list-item.sc-instant-apps-language-translator-search:hover{background-color:var(--calcite-color-foreground-2)}";export{m as instant_apps_ckeditor_wrapper,f as instant_apps_language_translator_item,k as instant_apps_language_translator_search}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as a,c as t,h as n,H as s,g as e}from"./p-78780f63.js";import{g as i,a as l,s as r,E as o,b as c,l as p,c as g}from"./p-62e92138.js";import{l as d}from"./p-a8a0187d.js";import{c as u}from"./p-83225907.js";import{g as h,f as v}from"./p-00f9774c.js";import"./p-225c4ca4.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";const m="instant-apps-language-translator",_={BASE:m,header:`${m}__header`,headerText:`${m}__header-text`,savingIndicator:`${m}__saving-indicator`,closeButton:`${m}__close-button`,headerTip:`${m}__header-tip`,topBar:`${m}__top-bar`,topBarSection:`${m}__top-bar-section`,collapseSearchContainer:`${m}__collapse-search-container`,userLangText:`${m}__user-lang-text`,lastItem:`${m}--last-item`,writingIcon:`${m}__writing-icon`},b=class{constructor(n){a(this,n),this.translatorDataUpdated=t(this,"translatorDataUpdated",7),this.portalItem=void 0,this.appSettings=void 0,this.locales=void 0,this.open=!1,this.userLocaleInputOnChangeCallback=void 0,this.translatedLocaleInputOnChangeCallback=void 0,this.saving=!1,this.messages=void 0,this.isCollapse=!0}handleT9nItemUpdate(){this.translatorDataUpdated.emit()}handleLocaleChange(){this.initUIData(),this.initSelectLanguage()}handleAppSettings(){this.initUIData(),this.initSelectLanguage()}async componentDidLoad(){this.initialize()}async initialize(){const[a,t]=await d(["esri/intl","esri/request"]);this.intl=a,this.request=t,await this.initMessages(),this.initUIData(),this.initPortalItemResourceT9nData(),this.initSelectLanguage()}async initMessages(){try{const{el:a}=this,t=await i(a);return this.messages=t,Promise.resolve()}catch(a){return Promise.reject()}}initUIData(){const{appSettings:a,locales:t}=this,n=l(a,t);r.set("uiData",n)}initSelectLanguage(){var a,t;if(!this.intl)return;const{locales:n}=this,s=null!==(t=null===(a=null==n?void 0:n[0])||void 0===a?void 0:a.locale)&&void 0!==t?t:this.intl.getLocale(),e=r.get("currentLanguage");0===this.locales.filter((a=>a.locale===e)).length&&r.set("currentLanguage",s)}async initPortalItemResourceT9nData(){try{const a=await h(this.portalItem);r.set("portalItemResource",a);const t=await v(this.request,a);r.set("portalItemResourceT9n",null!=t?t:{})}catch(a){}}render(){return n(s,null,this.renderModal(),this.renderPopoverTip())}renderModal(){return n("calcite-modal",{open:this.open,scale:"l",fullscreen:!0,onCalciteModalClose:this.close.bind(this)},this.renderHeader(),this.renderContent(),this.renderPrimaryButton())}renderPopoverTip(){var a;return n("calcite-popover",{label:"",referenceElement:"headerTip",placement:"trailing","auto-close":!0,closable:!0},n("div",{class:_.headerTip},null===(a=this.messages)||void 0===a?void 0:a.headerTip))}renderHeader(){const a=r.get("saving");return n("header",{class:_.header,slot:"header"},this.renderHeaderText(),a?this.renderSavingIndicator():null)}renderHeaderText(){const{messages:a}=this;return n("div",{class:_.headerText},n("span",null,null==a?void 0:a.header),n("calcite-button",{id:"headerTip",appearance:"transparent"},n("calcite-icon",{icon:o.Popover,scale:"s"})))}renderSavingIndicator(){var a;const t=r.get("saving"),s=null===(a=this.messages)||void 0===a?void 0:a.saving;return n("div",{class:_.savingIndicator},t?n("calcite-loader",{label:s,inline:!0}):null,n("span",null,s))}renderContent(){const a=c(this.locales);return n("div",{slot:"content"},this.renderTopBar(),(null==a?void 0:a.length)>0?this.renderUIData():this.renderNotice())}renderTopBar(){return n("div",{class:_.topBar},this.renderLeadingTopBarSection(),this.renderTrailingTopBarSection())}renderLeadingTopBarSection(){return n("div",{class:_.topBarSection},this.renderUserLocale(),this.renderCollapseSearchContainer())}renderUserLocale(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.languages,s=u(this.el);return n("div",{class:_.userLangText},null==t?void 0:t[s])}renderCollapseSearchContainer(){return n("div",{class:_.collapseSearchContainer},this.renderExpandCollapseButton(),this.renderSearch())}renderExpandCollapseButton(){const{isCollapse:a,messages:t}=this,s=a?null==t?void 0:t.collapseAll:null==t?void 0:t.expandAll;return n("calcite-button",{onClick:this.handleExpandCollapseAll.bind(this),appearance:"transparent","icon-start":o.ExpandCollapse},s)}renderSearch(){var a;return n("instant-apps-language-translator-search",{onSuggestionSelected:this.onSuggestionSelect.bind(this),t9nPlaceholder:null===(a=this.messages)||void 0===a?void 0:a.searchPlaceholder})}renderTrailingTopBarSection(){return n("div",{class:_.topBarSection},this.renderLanguageSelection())}renderLanguageSelection(){var a;return n("calcite-label",{layout:"inline"},null===(a=this.messages)||void 0===a?void 0:a.translatedLanguage,n("calcite-select",{label:"",onCalciteSelectChange:this.handleLanguageSelection.bind(this)},this.renderTranslatedLangOptions()))}renderTranslatedLangOptions(){const a=r.get("uiData"),t=null==a?void 0:a.get("locales"),s=c(t);return null==s?void 0:s.map((a=>{const{messages:t}=this,s=null==t?void 0:t.translatedLanguageNames,e=null==t?void 0:t.languages;return n("calcite-option",{key:`translated-lang-option-${a}`,value:a},`${null==s?void 0:s[a]} - ${null==e?void 0:e[a]}`)}))}renderUIData(){if(!(null==p?void 0:p.uiData))return;const a=g();return n("div",null,null==a?void 0:a.map(((t,n)=>this.renderUIDataItem(t,n,a.length))))}renderNotice(){var a;const t=null===(a=this.messages)||void 0===a?void 0:a.noLanguage;return n("calcite-notice",{open:!0,icon:"exclamation-mark-triangle",kind:"warning"},n("div",{slot:"title"},null==t?void 0:t.title),n("div",{slot:"message"},null==t?void 0:t.message))}renderUIDataItem(a,t,s){var e,i,l;const r=null===(l=null===(i=null===(e=this.appSettings)||void 0===e?void 0:e.translatedLanguageLabels)||void 0===i?void 0:i[p.currentLanguage])||void 0===l?void 0:l[a],o=`${t===s-1?_.lastItem:""}`,c=this.appSettings.content.filter((t=>t.id===a))[0];return n("instant-apps-language-translator-item",{key:`${a}-${t}`,class:o,fieldName:a,translatedLanguageLabel:r,type:c.type,userLocaleInputOnChangeCallback:this.userLocaleInputOnChangeCallback,translatedLocaleInputOnChangeCallback:this.translatedLocaleInputOnChangeCallback})}renderPrimaryButton(){var a;return n("calcite-button",{onClick:()=>this.open=!1,slot:"primary",class:_.closeButton},null===(a=this.messages)||void 0===a?void 0:a.close)}handleExpandCollapseAll(){this.isCollapse=!this.isCollapse;const a=new Map(p.uiData);g().forEach((t=>a.get(t).expanded=this.isCollapse)),r.set("uiData",a)}onSuggestionSelect(a){const t=a.detail,n=new Map(p.uiData);g().forEach((a=>{n.get(a).selected=a===t})),r.set("uiData",n)}close(){this.open=!1}handleLanguageSelection(a){r.set("currentLanguage",a.target.value)}get el(){return e(this)}static get watchers(){return{locales:["handleLocaleChange"],appSettings:["handleAppSettings"]}}};b.style=".sc-instant-apps-language-translator-h{display:block}.sc-instant-apps-language-translator-h calcite-modal.sc-instant-apps-language-translator{--calcite-modal-content-padding:0}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header.sc-instant-apps-language-translator{display:flex;justify-content:space-between;width:100%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-text.sc-instant-apps-language-translator{font-size:18px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__saving-indicator.sc-instant-apps-language-translator{display:flex;align-items:center;font-size:14.5px;color:var(--calcite-color-brand)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__writing-icon.sc-instant-apps-language-translator{display:flex;justify-content:center;align-items:center;margin-right:5px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__close-button.sc-instant-apps-language-translator{width:175px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__header-tip.sc-instant-apps-language-translator{padding:20px;max-width:45vw}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator{display:flex;width:100%;position:sticky;top:0;background:var(--calcite-color-foreground-1);z-index:1}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar.sc-instant-apps-language-translator calcite-label.sc-instant-apps-language-translator{--calcite-label-margin-bottom:0;font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator{box-sizing:border-box;display:flex;align-items:center;width:50%;padding:0.5%}.sc-instant-apps-language-translator-h .instant-apps-language-translator__user-lang-text.sc-instant-apps-language-translator{font-weight:var(--calcite-font-weight-medium)}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:first-child{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__top-bar-section.sc-instant-apps-language-translator:nth-child(2) calcite-select.sc-instant-apps-language-translator{width:255px}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator{display:flex;justify-content:space-between}.sc-instant-apps-language-translator-h .instant-apps-language-translator__collapse-search-container.sc-instant-apps-language-translator calcite-input.sc-instant-apps-language-translator{width:300px;margin-left:30px}.ck.ck-reset.ck-editor.ck-rounded-corners.sc-instant-apps-language-translator{margin-top:10px !important;margin-left:55px !important}.ck-editor__editable.sc-instant-apps-language-translator{height:70px !important;font-size:0.875rem !important;line-height:1.375 !important}.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:first-child,.ck.ck-editor__editable_inline.sc-instant-apps-language-translator>.sc-instant-apps-language-translator:last-child{--ck-spacing-large:0.5rem !important}";export{b as instant_apps_language_translator}