@esri/solutions-components 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -5
  2. package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
  3. package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
  4. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  5. package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
  6. package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/map-card.cjs.entry.js +1 -1
  9. package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
  10. package/dist/cjs/public-notification.cjs.entry.js +16 -10
  11. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  12. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  13. package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
  14. package/dist/collection/components/buffer-tools/buffer-tools.js +2 -2
  15. package/dist/collection/components/map-draw-tools/map-draw-tools.js +2 -1
  16. package/dist/collection/components/public-notification/public-notification.js +14 -8
  17. package/dist/collection/components/refine-selection/refine-selection.js +4 -2
  18. package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
  19. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
  20. package/dist/collection/demos/new-public-notification.html +2 -1
  21. package/dist/collection/utils/interfaces.js +1 -1
  22. package/dist/collection/utils/interfaces.ts +2 -2
  23. package/dist/components/interfaces3.js +1 -1
  24. package/dist/components/map-draw-tools2.js +2 -1
  25. package/dist/components/public-notification.js +14 -8
  26. package/dist/components/refine-selection-tools2.js +4 -2
  27. package/dist/components/refine-selection2.js +4 -2
  28. package/dist/esm/buffer-tools_6.entry.js +8 -5
  29. package/dist/esm/calcite-combobox_3.entry.js +2 -2
  30. package/dist/esm/calcite-input-message_5.entry.js +6 -4
  31. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  32. package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
  33. package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
  34. package/dist/esm/layer-table.entry.js +3 -3
  35. package/dist/esm/map-card.entry.js +1 -1
  36. package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
  37. package/dist/esm/public-notification.entry.js +16 -10
  38. package/dist/esm/solution-configuration.entry.js +2 -2
  39. package/dist/esm/solution-contents_3.entry.js +2 -2
  40. package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
  41. package/dist/solutions-components/demos/new-public-notification.html +2 -1
  42. package/dist/solutions-components/p-05e64bd1.js +498 -2
  43. package/dist/solutions-components/p-08a95b33.entry.js +138 -0
  44. package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
  45. package/dist/solutions-components/p-0ef91144.entry.js +913 -0
  46. package/dist/solutions-components/p-0f523243.entry.js +1916 -0
  47. package/dist/solutions-components/p-11b9510e.entry.js +173 -0
  48. package/dist/solutions-components/p-1b875d94.entry.js +58 -0
  49. package/dist/solutions-components/p-1c567f3a.js +23 -16
  50. package/dist/solutions-components/p-1c883db9.entry.js +43 -0
  51. package/dist/solutions-components/p-1f225056.js +322 -0
  52. package/dist/solutions-components/p-1f499e67.entry.js +72 -0
  53. package/dist/solutions-components/p-20d3d758.entry.js +881 -0
  54. package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
  55. package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
  56. package/dist/solutions-components/p-2447798c.entry.js +155 -0
  57. package/dist/solutions-components/p-2525e691.entry.js +432 -0
  58. package/dist/solutions-components/p-2561f5b5.js +4092 -0
  59. package/dist/solutions-components/p-29f887c0.entry.js +234 -0
  60. package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
  61. package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
  62. package/dist/solutions-components/p-2e9ed892.js +46 -1
  63. package/dist/solutions-components/p-316f56db.js +219 -2
  64. package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
  65. package/dist/solutions-components/p-356f8b54.entry.js +138 -0
  66. package/dist/solutions-components/p-359c58de.entry.js +172 -0
  67. package/dist/solutions-components/p-37336c0d.entry.js +116 -0
  68. package/dist/solutions-components/p-374a5031.js +105 -2
  69. package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
  70. package/dist/solutions-components/p-3b010ce1.js +17 -1
  71. package/dist/solutions-components/p-4307dacd.js +194 -1
  72. package/dist/solutions-components/p-44da2507.js +405 -14
  73. package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
  74. package/dist/solutions-components/p-4894bbeb.js +53 -2
  75. package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
  76. package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
  77. package/dist/solutions-components/p-4e32bf8c.js +482 -1
  78. package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
  79. package/dist/solutions-components/p-508317b3.js +13 -2
  80. package/dist/solutions-components/p-54697d58.entry.js +198 -0
  81. package/dist/solutions-components/p-55c79103.entry.js +311 -0
  82. package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
  83. package/dist/solutions-components/p-59b48fde.entry.js +443 -0
  84. package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
  85. package/dist/solutions-components/p-621d0534.entry.js +123 -0
  86. package/dist/solutions-components/p-63f6e8f1.js +14 -1
  87. package/dist/solutions-components/p-66aeec57.entry.js +61 -0
  88. package/dist/solutions-components/p-69834f46.entry.js +618 -0
  89. package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
  90. package/dist/solutions-components/p-6e0da576.js +13 -1
  91. package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
  92. package/dist/solutions-components/p-6fe17794.js +9 -1
  93. package/dist/solutions-components/p-7024cb16.entry.js +72 -0
  94. package/dist/solutions-components/p-70535506.entry.js +226 -0
  95. package/dist/solutions-components/p-708a63a8.js +12 -1
  96. package/dist/solutions-components/p-729708a3.js +14 -1
  97. package/dist/solutions-components/p-73e23995.js +6 -1
  98. package/dist/solutions-components/p-74b29d75.entry.js +231 -0
  99. package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
  100. package/dist/solutions-components/p-77182c3a.js +3015 -1
  101. package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
  102. package/dist/solutions-components/p-79709c19.js +60 -3
  103. package/dist/solutions-components/p-7a46ef97.js +181 -2
  104. package/dist/solutions-components/p-7be159e6.entry.js +175 -0
  105. package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
  106. package/dist/solutions-components/p-7daea1df.js +41 -1
  107. package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
  108. package/dist/solutions-components/p-7fb45059.entry.js +43 -0
  109. package/dist/solutions-components/p-815533de.js +306 -3
  110. package/dist/solutions-components/p-816622ca.entry.js +248 -0
  111. package/dist/solutions-components/p-83166522.js +205 -2
  112. package/dist/solutions-components/p-83bd1991.entry.js +36 -0
  113. package/dist/solutions-components/p-856464d7.entry.js +572 -0
  114. package/dist/solutions-components/p-8c349bad.entry.js +347 -0
  115. package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
  116. package/dist/solutions-components/p-904c185a.entry.js +228 -0
  117. package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
  118. package/dist/solutions-components/p-9371145a.entry.js +477 -0
  119. package/dist/solutions-components/p-93d3119d.js +1948 -1
  120. package/dist/solutions-components/p-95ec8062.entry.js +173 -0
  121. package/dist/solutions-components/p-991ee695.js +109 -1
  122. package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
  123. package/dist/solutions-components/p-9a9955db.js +41 -1
  124. package/dist/solutions-components/p-9c1ebc90.js +35 -16
  125. package/dist/solutions-components/p-9eba5c66.js +399 -3
  126. package/dist/solutions-components/p-a033a507.entry.js +252 -0
  127. package/dist/solutions-components/p-a3773415.entry.js +1132 -0
  128. package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
  129. package/dist/solutions-components/p-a5b1ab03.js +33 -3
  130. package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
  131. package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
  132. package/dist/solutions-components/p-a8005026.entry.js +565 -0
  133. package/dist/solutions-components/p-a80b3880.js +14 -1
  134. package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
  135. package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
  136. package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
  137. package/dist/solutions-components/p-ae1fd76b.js +11 -1
  138. package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
  139. package/dist/solutions-components/p-b359dc78.js +41 -1
  140. package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
  141. package/dist/solutions-components/p-b75cc407.entry.js +145 -0
  142. package/dist/solutions-components/p-b911cb75.entry.js +71 -0
  143. package/dist/solutions-components/p-b965e177.entry.js +335 -0
  144. package/dist/solutions-components/p-b978636e.js +14 -1
  145. package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
  146. package/dist/solutions-components/p-bd67334c.js +122 -2
  147. package/dist/solutions-components/p-bde20dba.entry.js +212 -0
  148. package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
  149. package/dist/solutions-components/p-c023e6a1.js +2028 -2
  150. package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
  151. package/dist/solutions-components/p-c579ed60.entry.js +447 -0
  152. package/dist/solutions-components/p-c92bc231.js +101 -2
  153. package/dist/solutions-components/p-cc815aca.js +839 -16
  154. package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
  155. package/dist/solutions-components/p-cdc46c0c.js +1751 -2
  156. package/dist/solutions-components/p-d12e6992.entry.js +118 -0
  157. package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
  158. package/dist/solutions-components/p-d48a24e6.js +754 -2
  159. package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
  160. package/dist/solutions-components/p-dbc9a5a8.js +80 -0
  161. package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
  162. package/dist/solutions-components/p-de39206f.entry.js +113 -0
  163. package/dist/solutions-components/p-de5416e8.js +28 -1
  164. package/dist/solutions-components/p-df420d54.entry.js +213 -0
  165. package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
  166. package/dist/solutions-components/p-e4845fec.entry.js +152 -0
  167. package/dist/solutions-components/p-e611d8c8.js +28 -1
  168. package/dist/solutions-components/p-e947d3b0.js +5 -1
  169. package/dist/solutions-components/p-ea534300.js +41 -2
  170. package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
  171. package/dist/solutions-components/p-ed36c637.entry.js +85 -0
  172. package/dist/solutions-components/p-f0add71c.js +74 -0
  173. package/dist/solutions-components/p-f42e014b.js +171 -2
  174. package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
  175. package/dist/solutions-components/p-fc884dd6.js +28 -16
  176. package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
  177. package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
  178. package/dist/solutions-components/solutions-components.esm.js +20 -1
  179. package/dist/solutions-components/utils/interfaces.ts +2 -2
  180. package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
  181. package/dist/types/components/public-notification/public-notification.d.ts +9 -1
  182. package/dist/types/components.d.ts +2 -2
  183. package/package.json +1 -1
  184. package/dist/solutions-components/p-021432b8.entry.js +0 -12
  185. package/dist/solutions-components/p-03440b1e.entry.js +0 -11
  186. package/dist/solutions-components/p-0512635b.entry.js +0 -6
  187. package/dist/solutions-components/p-086ef115.entry.js +0 -29
  188. package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
  189. package/dist/solutions-components/p-0c088725.entry.js +0 -6
  190. package/dist/solutions-components/p-0f820c08.entry.js +0 -6
  191. package/dist/solutions-components/p-164780a0.entry.js +0 -6
  192. package/dist/solutions-components/p-179a68a0.entry.js +0 -6
  193. package/dist/solutions-components/p-184b5005.entry.js +0 -11
  194. package/dist/solutions-components/p-1d082fee.entry.js +0 -11
  195. package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
  196. package/dist/solutions-components/p-20a58e62.entry.js +0 -17
  197. package/dist/solutions-components/p-20b2458c.entry.js +0 -11
  198. package/dist/solutions-components/p-245d47c1.entry.js +0 -6
  199. package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
  200. package/dist/solutions-components/p-2cc72806.entry.js +0 -23
  201. package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
  202. package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
  203. package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
  204. package/dist/solutions-components/p-3109d940.entry.js +0 -6
  205. package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
  206. package/dist/solutions-components/p-3649acb3.entry.js +0 -18
  207. package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
  208. package/dist/solutions-components/p-3fa9b3c8.js +0 -36
  209. package/dist/solutions-components/p-40c41709.entry.js +0 -6
  210. package/dist/solutions-components/p-40e963c7.entry.js +0 -11
  211. package/dist/solutions-components/p-40f480da.entry.js +0 -11
  212. package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
  213. package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
  214. package/dist/solutions-components/p-506e4d78.entry.js +0 -6
  215. package/dist/solutions-components/p-576fdcab.entry.js +0 -6
  216. package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
  217. package/dist/solutions-components/p-65e177f1.entry.js +0 -6
  218. package/dist/solutions-components/p-67d710c2.entry.js +0 -6
  219. package/dist/solutions-components/p-7268b445.entry.js +0 -11
  220. package/dist/solutions-components/p-75ea4667.entry.js +0 -6
  221. package/dist/solutions-components/p-778c0a36.entry.js +0 -17
  222. package/dist/solutions-components/p-7a22509b.entry.js +0 -12
  223. package/dist/solutions-components/p-7bff51db.entry.js +0 -6
  224. package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
  225. package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
  226. package/dist/solutions-components/p-8060fb94.entry.js +0 -6
  227. package/dist/solutions-components/p-80a1b305.entry.js +0 -6
  228. package/dist/solutions-components/p-81eae877.entry.js +0 -12
  229. package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
  230. package/dist/solutions-components/p-851e04ae.entry.js +0 -6
  231. package/dist/solutions-components/p-9106950a.entry.js +0 -11
  232. package/dist/solutions-components/p-979804a4.entry.js +0 -11
  233. package/dist/solutions-components/p-9862baa8.entry.js +0 -11
  234. package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
  235. package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
  236. package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
  237. package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
  238. package/dist/solutions-components/p-a33c044e.entry.js +0 -6
  239. package/dist/solutions-components/p-a516c658.entry.js +0 -6
  240. package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
  241. package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
  242. package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
  243. package/dist/solutions-components/p-ad469b92.entry.js +0 -11
  244. package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
  245. package/dist/solutions-components/p-addc1156.entry.js +0 -11
  246. package/dist/solutions-components/p-ae846934.entry.js +0 -11
  247. package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
  248. package/dist/solutions-components/p-b4e476b7.js +0 -257
  249. package/dist/solutions-components/p-b668daf8.js +0 -21
  250. package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
  251. package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
  252. package/dist/solutions-components/p-be41429f.js +0 -21
  253. package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
  254. package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
  255. package/dist/solutions-components/p-c4afae53.entry.js +0 -12
  256. package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
  257. package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
  258. package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
  259. package/dist/solutions-components/p-d09a168c.entry.js +0 -6
  260. package/dist/solutions-components/p-d377f913.entry.js +0 -11
  261. package/dist/solutions-components/p-d4cefead.entry.js +0 -37
  262. package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
  263. package/dist/solutions-components/p-d8968487.entry.js +0 -11
  264. package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
  265. package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
  266. package/dist/solutions-components/p-ec27e493.entry.js +0 -11
  267. package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
  268. package/dist/solutions-components/p-ef21e195.entry.js +0 -23
  269. package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
  270. package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
  271. package/dist/solutions-components/p-f847291f.entry.js +0 -6
  272. package/dist/solutions-components/p-f90fd262.entry.js +0 -11
  273. package/dist/solutions-components/p-fc973005.entry.js +0 -6
  274. package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -3,4 +3,197 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{d as e,f as t}from"./p-c023e6a1.js";const s=e=>!("isConnected"in e)||e.isConnected,n=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),o=e=>"function"==typeof e?e():e,r=(s,r)=>{const c=((e,t=((e,t)=>e!==t))=>{const s=o(e);let n=new Map(Object.entries(null!=s?s:{}));const r={dispose:[],get:[],set:[],reset:[]},c=()=>{var t;n=new Map(Object.entries(null!==(t=o(e))&&void 0!==t?t:{})),r.reset.forEach((e=>e()))},u=e=>(r.get.forEach((t=>t(e))),n.get(e)),a=(e,s)=>{const o=n.get(e);t(s,o,e)&&(n.set(e,s),r.set.forEach((t=>t(e,s,o))))},i="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>u(t),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>n.has(t),set:(e,t,s)=>(a(t,s),!0)}),p=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(r[e],t)});return{state:i,get:u,set:a,on:p,onChange:(t,s)=>{const n=p("set",((e,n)=>{e===t&&s(n)})),r=p("reset",(()=>s(o(e)[t])));return()=>{n(),r()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(p("set",t.set)),t.get&&e.push(p("get",t.get)),t.reset&&e.push(p("reset",t.reset)),t.dispose&&e.push(p("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),c()},reset:c,forceUpdate:e=>{const t=n.get(e);r.set.forEach((s=>s(e,t,t)))}}})(s,r);return c.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();n&&((e,t,s)=>{const n=e.get(t);n?n.includes(s)||n.push(s):e.set(t,[s])})(s,t,n)},set:e=>{const o=s.get(e);o&&s.set(e,o.filter(t)),n(s)},reset:()=>{s.forEach((e=>e.forEach(t))),n(s)}}})()),c};export{r as c}
6
+ import { d as getRenderingRef, f as forceUpdate } from './p-c023e6a1.js';
7
+
8
+ const appendToMap = (map, propName, value) => {
9
+ const items = map.get(propName);
10
+ if (!items) {
11
+ map.set(propName, [value]);
12
+ }
13
+ else if (!items.includes(value)) {
14
+ items.push(value);
15
+ }
16
+ };
17
+ const debounce = (fn, ms) => {
18
+ let timeoutId;
19
+ return (...args) => {
20
+ if (timeoutId) {
21
+ clearTimeout(timeoutId);
22
+ }
23
+ timeoutId = setTimeout(() => {
24
+ timeoutId = 0;
25
+ fn(...args);
26
+ }, ms);
27
+ };
28
+ };
29
+
30
+ /**
31
+ * Check if a possible element isConnected.
32
+ * The property might not be there, so we check for it.
33
+ *
34
+ * We want it to return true if isConnected is not a property,
35
+ * otherwise we would remove these elements and would not update.
36
+ *
37
+ * Better leak in Edge than to be useless.
38
+ */
39
+ const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
40
+ const cleanupElements = debounce((map) => {
41
+ for (let key of map.keys()) {
42
+ map.set(key, map.get(key).filter(isConnected));
43
+ }
44
+ }, 2000);
45
+ const stencilSubscription = () => {
46
+ if (typeof getRenderingRef !== 'function') {
47
+ // If we are not in a stencil project, we do nothing.
48
+ // This function is not really exported by @stencil/core.
49
+ return {};
50
+ }
51
+ const elmsToUpdate = new Map();
52
+ return {
53
+ dispose: () => elmsToUpdate.clear(),
54
+ get: (propName) => {
55
+ const elm = getRenderingRef();
56
+ if (elm) {
57
+ appendToMap(elmsToUpdate, propName, elm);
58
+ }
59
+ },
60
+ set: (propName) => {
61
+ const elements = elmsToUpdate.get(propName);
62
+ if (elements) {
63
+ elmsToUpdate.set(propName, elements.filter(forceUpdate));
64
+ }
65
+ cleanupElements(elmsToUpdate);
66
+ },
67
+ reset: () => {
68
+ elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
69
+ cleanupElements(elmsToUpdate);
70
+ },
71
+ };
72
+ };
73
+
74
+ const unwrap = (val) => (typeof val === 'function' ? val() : val);
75
+ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
76
+ const unwrappedState = unwrap(defaultState);
77
+ let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
78
+ const handlers = {
79
+ dispose: [],
80
+ get: [],
81
+ set: [],
82
+ reset: [],
83
+ };
84
+ const reset = () => {
85
+ var _a;
86
+ // When resetting the state, the default state may be a function - unwrap it to invoke it.
87
+ // otherwise, the state won't be properly reset
88
+ states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
89
+ handlers.reset.forEach((cb) => cb());
90
+ };
91
+ const dispose = () => {
92
+ // Call first dispose as resetting the state would
93
+ // cause less updates ;)
94
+ handlers.dispose.forEach((cb) => cb());
95
+ reset();
96
+ };
97
+ const get = (propName) => {
98
+ handlers.get.forEach((cb) => cb(propName));
99
+ return states.get(propName);
100
+ };
101
+ const set = (propName, value) => {
102
+ const oldValue = states.get(propName);
103
+ if (shouldUpdate(value, oldValue, propName)) {
104
+ states.set(propName, value);
105
+ handlers.set.forEach((cb) => cb(propName, value, oldValue));
106
+ }
107
+ };
108
+ const state = (typeof Proxy === 'undefined'
109
+ ? {}
110
+ : new Proxy(unwrappedState, {
111
+ get(_, propName) {
112
+ return get(propName);
113
+ },
114
+ ownKeys(_) {
115
+ return Array.from(states.keys());
116
+ },
117
+ getOwnPropertyDescriptor() {
118
+ return {
119
+ enumerable: true,
120
+ configurable: true,
121
+ };
122
+ },
123
+ has(_, propName) {
124
+ return states.has(propName);
125
+ },
126
+ set(_, propName, value) {
127
+ set(propName, value);
128
+ return true;
129
+ },
130
+ }));
131
+ const on = (eventName, callback) => {
132
+ handlers[eventName].push(callback);
133
+ return () => {
134
+ removeFromArray(handlers[eventName], callback);
135
+ };
136
+ };
137
+ const onChange = (propName, cb) => {
138
+ const unSet = on('set', (key, newValue) => {
139
+ if (key === propName) {
140
+ cb(newValue);
141
+ }
142
+ });
143
+ // We need to unwrap the defaultState because it might be a function.
144
+ // Otherwise we might not be sending the right reset value.
145
+ const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
146
+ return () => {
147
+ unSet();
148
+ unReset();
149
+ };
150
+ };
151
+ const use = (...subscriptions) => {
152
+ const unsubs = subscriptions.reduce((unsubs, subscription) => {
153
+ if (subscription.set) {
154
+ unsubs.push(on('set', subscription.set));
155
+ }
156
+ if (subscription.get) {
157
+ unsubs.push(on('get', subscription.get));
158
+ }
159
+ if (subscription.reset) {
160
+ unsubs.push(on('reset', subscription.reset));
161
+ }
162
+ if (subscription.dispose) {
163
+ unsubs.push(on('dispose', subscription.dispose));
164
+ }
165
+ return unsubs;
166
+ }, []);
167
+ return () => unsubs.forEach((unsub) => unsub());
168
+ };
169
+ const forceUpdate = (key) => {
170
+ const oldValue = states.get(key);
171
+ handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
172
+ };
173
+ return {
174
+ state,
175
+ get,
176
+ set,
177
+ on,
178
+ onChange,
179
+ use,
180
+ dispose,
181
+ reset,
182
+ forceUpdate,
183
+ };
184
+ };
185
+ const removeFromArray = (array, item) => {
186
+ const index = array.indexOf(item);
187
+ if (index >= 0) {
188
+ array[index] = array[array.length - 1];
189
+ array.length--;
190
+ }
191
+ };
192
+
193
+ const createStore = (defaultState, shouldUpdate) => {
194
+ const map = createObservableMap(defaultState, shouldUpdate);
195
+ map.use(stencilSubscription());
196
+ return map;
197
+ };
198
+
199
+ export { createStore as c };
@@ -3,19 +3,410 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{c as r,a as n}from"./p-3b010ce1.js";import{a as t}from"./p-c023e6a1.js";var e=r((function(r,n){!function(r){var n={Promise:"undefined"!=typeof window?window.Promise:void 0},t="4.22",e="next";function o(r){if(r.toLowerCase()===e)return e;var n=r&&r.match(/^(\d)\.(\d+)/);return n&&{major:parseInt(n[1],10),minor:parseInt(n[2],10)}}function i(r){return void 0===r&&(r=t),"https://js.arcgis.com/"+r+"/"}function a(r){return!r||o(r)?function(r){void 0===r&&(r=t);var n=i(r),a=o(r);return a!==e&&3===a.major?n+(a.minor<=10?"js/":"")+"esri/css/esri.css":n+"esri/themes/light/main.css"}(r):r}function u(r,n){var t=a(r),e=function(r){return document.querySelector('link[href*="'+r+'"]')}(t);return e||function(r,n){if(n){var t=document.querySelector(n);t.parentNode.insertBefore(r,t)}else document.head.appendChild(r)}(e=function(r){var n=document.createElement("link");return n.rel="stylesheet",n.href=r,n}(t),n),e}var c={};function s(r,n,t){var e;t&&(e=function(r,n){var t=function(e){n(e.error||new Error("There was an error attempting to load "+r.src)),r.removeEventListener("error",t,!1)};return r.addEventListener("error",t,!1),t}(r,t));var o=function(){n(r),r.removeEventListener("load",o,!1),e&&r.removeEventListener("error",e,!1)};r.addEventListener("load",o,!1)}function d(){return document.querySelector("script[data-esri-loader]")}function l(){var r=window.require;return r&&r.on}function f(r){void 0===r&&(r={});var t={};[c,r].forEach((function(r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}));var e=t.version,o=t.url||i(e);return new n.Promise((function(r,n){var i=d();if(i){var a=i.getAttribute("src");a!==o?n(new Error("The ArcGIS API for JavaScript is already loaded ("+a+").")):l()?r(i):s(i,r,n)}else if(l())n(new Error("The ArcGIS API for JavaScript is already loaded."));else{var c=t.css;c&&u(!0===c?e:c,t.insertCssBefore),s(i=function(r){var n=document.createElement("script");return n.type="text/javascript",n.src=r,n.setAttribute("data-esri-loader","loading"),n}(o),(function(){i.setAttribute("data-esri-loader","loaded"),r(i)}),n),document.body.appendChild(i)}}))}function v(r){return new n.Promise((function(n,t){var e=window.require.on("error",t);window.require(r,(function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];e.remove(),n(r)}))}))}r.utils=n,r.loadModules=function(r,n){if(void 0===n&&(n={}),l())return v(r);var t=d(),e=t&&t.getAttribute("src");return!n.url&&e&&(n.url=e),f(n).then((function(){return v(r)}))},r.getScript=d,r.isLoaded=l,r.loadScript=f,r.setDefaultOptions=function(r){void 0===r&&(r={}),c=r},r.loadCss=u,Object.defineProperty(r,"__esModule",{value:!0})}(n)}));const o=new Map([["ar","ar"],["bg","bg"],["bs","bs"],["ca","ca"],["cs","cs"],["da","da"],["de","de"],["el","el"],["en","en"],["es","es"],["et","et"],["fi","fi"],["fr","fr"],["he","he"],["hr","hr"],["hu","hu"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["lt","lt"],["lv","lv"],["nb","nb"],["nl","nl"],["pl","pl"],["pt-br","pt-BR"],["pt-pt","pt-PT"],["ro","ro"],["ru","ru"],["sk","sk"],["sl","sl"],["sr","sr"],["sv","sv"],["th","th"],["tr","tr"],["uk","uk"],["vi","vi"],["zh-cn","zh-CN"],["zh-hk","zh-HK"],["zh-tw","zh-TW"]]);
7
- /** @license
8
- * Copyright 2022 Esri
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
6
+ import { c as createCommonjsModule, a as commonjsGlobal } from './p-3b010ce1.js';
7
+ import { a as getAssetPath } from './p-c023e6a1.js';
8
+
9
+ var esriLoader = createCommonjsModule(function (module, exports) {
10
+ (function (global, factory) {
11
+ factory(exports) ;
12
+ }(commonjsGlobal, (function (exports) {
13
+ /* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
14
+ * Apache-2.0 */
15
+ var isBrowser = typeof window !== 'undefined';
16
+ // allow consuming libraries to provide their own Promise implementations
17
+ var utils = {
18
+ Promise: isBrowser ? window['Promise'] : undefined
19
+ };
20
+
21
+ /* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
22
+ * Apache-2.0 */
23
+ var DEFAULT_VERSION = '4.22';
24
+ var NEXT = 'next';
25
+ function parseVersion(version) {
26
+ if (version.toLowerCase() === NEXT) {
27
+ return NEXT;
28
+ }
29
+ var match = version && version.match(/^(\d)\.(\d+)/);
30
+ return match && {
31
+ major: parseInt(match[1], 10),
32
+ minor: parseInt(match[2], 10)
33
+ };
34
+ }
35
+ /**
36
+ * Get the CDN url for a given version
13
37
  *
14
- * http://www.apache.org/licenses/LICENSE-2.0
38
+ * @param version Ex: '4.22' or '3.39'. Defaults to the latest 4.x version.
39
+ */
40
+ function getCdnUrl(version) {
41
+ if (version === void 0) { version = DEFAULT_VERSION; }
42
+ return "https://js.arcgis.com/" + version + "/";
43
+ }
44
+ /**
45
+ * Get the CDN url for a the CSS for a given version and/or theme
15
46
  *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */function i(r,n){return new Promise(((e,o)=>{fetch(t(`../assets/t9n/${r}/resources_${n}.json`)).then((r=>{r.ok?e(r.json()):o()}),(()=>o()))}))}async function a(r){const n=r.tagName.toLowerCase(),t=function(r){var n,t,e;const i=null!==(n=r.closest("[lang]"))&&void 0!==n?n:null===(e=null===(t=r.shadowRoot)||void 0===t?void 0:t.ownerDocument)||void 0===e?void 0:e.documentElement,a=((null==i?void 0:i.lang)||(null===navigator||void 0===navigator?void 0:navigator.language)||"en").toLowerCase();return o.has(a)?o.get(a):o.has(a.slice(0,2))?o.get(a.slice(0,2)):"en"}(r);let e;try{e=await i(n,t)}catch(r){console.warn(`no locale for ${n} (${t}) loading default locale en.`),e=await i(n,"en")}return[e,t]}export{e,a as g}
47
+ * @param version Ex: '4.22', '3.39', or 'next'. Defaults to the latest 4.x version.
48
+ */
49
+ function getCdnCssUrl(version) {
50
+ if (version === void 0) { version = DEFAULT_VERSION; }
51
+ var baseUrl = getCdnUrl(version);
52
+ var parsedVersion = parseVersion(version);
53
+ if (parsedVersion !== NEXT && parsedVersion.major === 3) {
54
+ // NOTE: at 3.11 the CSS moved from the /js folder to the root
55
+ var path = parsedVersion.minor <= 10 ? 'js/' : '';
56
+ return "" + baseUrl + path + "esri/css/esri.css";
57
+ }
58
+ else {
59
+ // assume 4.x
60
+ return baseUrl + "esri/themes/light/main.css";
61
+ }
62
+ }
63
+
64
+ /* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
65
+ * Apache-2.0 */
66
+ function createStylesheetLink(href) {
67
+ var link = document.createElement('link');
68
+ link.rel = 'stylesheet';
69
+ link.href = href;
70
+ return link;
71
+ }
72
+ function insertLink(link, before) {
73
+ if (before) {
74
+ // the link should be inserted before a specific node
75
+ var beforeNode = document.querySelector(before);
76
+ beforeNode.parentNode.insertBefore(link, beforeNode);
77
+ }
78
+ else {
79
+ // append the link to then end of the head tag
80
+ document.head.appendChild(link);
81
+ }
82
+ }
83
+ // check if the css url has been injected or added manually
84
+ function getCss(url) {
85
+ return document.querySelector("link[href*=\"" + url + "\"]");
86
+ }
87
+ function getCssUrl(urlOrVersion) {
88
+ return !urlOrVersion || parseVersion(urlOrVersion)
89
+ // if it's a valid version string return the CDN URL
90
+ ? getCdnCssUrl(urlOrVersion)
91
+ // otherwise assume it's a URL and return that
92
+ : urlOrVersion;
93
+ }
94
+ // lazy load the CSS needed for the ArcGIS API
95
+ function loadCss(urlOrVersion, before) {
96
+ var url = getCssUrl(urlOrVersion);
97
+ var link = getCss(url);
98
+ if (!link) {
99
+ // create & load the css link
100
+ link = createStylesheetLink(url);
101
+ insertLink(link, before);
102
+ }
103
+ return link;
104
+ }
105
+
106
+ /* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
107
+ * Apache-2.0 */
108
+ var defaultOptions = {};
109
+ function createScript(url) {
110
+ var script = document.createElement('script');
111
+ script.type = 'text/javascript';
112
+ script.src = url;
113
+ script.setAttribute('data-esri-loader', 'loading');
114
+ return script;
115
+ }
116
+ // add a one-time load handler to script
117
+ // and optionally add a one time error handler as well
118
+ function handleScriptLoad(script, callback, errback) {
119
+ var onScriptError;
120
+ if (errback) {
121
+ // set up an error handler as well
122
+ onScriptError = handleScriptError(script, errback);
123
+ }
124
+ var onScriptLoad = function () {
125
+ // pass the script to the callback
126
+ callback(script);
127
+ // remove this event listener
128
+ script.removeEventListener('load', onScriptLoad, false);
129
+ if (onScriptError) {
130
+ // remove the error listener as well
131
+ script.removeEventListener('error', onScriptError, false);
132
+ }
133
+ };
134
+ script.addEventListener('load', onScriptLoad, false);
135
+ }
136
+ // add a one-time error handler to the script
137
+ function handleScriptError(script, callback) {
138
+ var onScriptError = function (e) {
139
+ // reject the promise and remove this event listener
140
+ callback(e.error || new Error("There was an error attempting to load " + script.src));
141
+ // remove this event listener
142
+ script.removeEventListener('error', onScriptError, false);
143
+ };
144
+ script.addEventListener('error', onScriptError, false);
145
+ return onScriptError;
146
+ }
147
+ // allow the user to configure default script options rather than passing options to `loadModules` each time
148
+ function setDefaultOptions(options) {
149
+ if (options === void 0) { options = {}; }
150
+ defaultOptions = options;
151
+ }
152
+ // get the script injected by this library
153
+ function getScript() {
154
+ return document.querySelector('script[data-esri-loader]');
155
+ }
156
+ // has ArcGIS API been loaded on the page yet?
157
+ function isLoaded() {
158
+ var globalRequire = window['require'];
159
+ // .on() ensures that it's Dojo's AMD loader
160
+ return globalRequire && globalRequire.on;
161
+ }
162
+ // load the ArcGIS API on the page
163
+ function loadScript(options) {
164
+ if (options === void 0) { options = {}; }
165
+ // we would have liked to use spread like { ...defaultOptions, ...options }
166
+ // but TS would inject a polyfill that would require use to configure rollup w content: 'window'
167
+ // if we have another occasion to use spread, let's do that and replace this for...in
168
+ var opts = {};
169
+ [defaultOptions, options].forEach(function (obj) {
170
+ for (var prop in obj) {
171
+ if (Object.prototype.hasOwnProperty.call(obj, prop)) {
172
+ opts[prop] = obj[prop];
173
+ }
174
+ }
175
+ });
176
+ // URL to load
177
+ var version = opts.version;
178
+ var url = opts.url || getCdnUrl(version);
179
+ return new utils.Promise(function (resolve, reject) {
180
+ var script = getScript();
181
+ if (script) {
182
+ // the API is already loaded or in the process of loading...
183
+ // NOTE: have to test against scr attribute value, not script.src
184
+ // b/c the latter will return the full url for relative paths
185
+ var src = script.getAttribute('src');
186
+ if (src !== url) {
187
+ // potentially trying to load a different version of the API
188
+ reject(new Error("The ArcGIS API for JavaScript is already loaded (" + src + ")."));
189
+ }
190
+ else {
191
+ if (isLoaded()) {
192
+ // the script has already successfully loaded
193
+ resolve(script);
194
+ }
195
+ else {
196
+ // wait for the script to load and then resolve
197
+ handleScriptLoad(script, resolve, reject);
198
+ }
199
+ }
200
+ }
201
+ else {
202
+ if (isLoaded()) {
203
+ // the API has been loaded by some other means
204
+ // potentially trying to load a different version of the API
205
+ reject(new Error("The ArcGIS API for JavaScript is already loaded."));
206
+ }
207
+ else {
208
+ // this is the first time attempting to load the API
209
+ var css = opts.css;
210
+ if (css) {
211
+ var useVersion = css === true;
212
+ // load the css before loading the script
213
+ loadCss(useVersion ? version : css, opts.insertCssBefore);
214
+ }
215
+ // create a script object whose source points to the API
216
+ script = createScript(url);
217
+ // _currentUrl = url;
218
+ // once the script is loaded...
219
+ handleScriptLoad(script, function () {
220
+ // update the status of the script
221
+ script.setAttribute('data-esri-loader', 'loaded');
222
+ // return the script
223
+ resolve(script);
224
+ }, reject);
225
+ // load the script
226
+ document.body.appendChild(script);
227
+ }
228
+ }
229
+ });
230
+ }
231
+
232
+ /* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
233
+ * Apache-2.0 */
234
+ // wrap Dojo's require() in a promise
235
+ function requireModules(modules) {
236
+ return new utils.Promise(function (resolve, reject) {
237
+ // If something goes wrong loading the esri/dojo scripts, reject with the error.
238
+ var errorHandler = window['require'].on('error', reject);
239
+ window['require'](modules, function () {
240
+ var args = [];
241
+ for (var _i = 0; _i < arguments.length; _i++) {
242
+ args[_i] = arguments[_i];
243
+ }
244
+ // remove error handler
245
+ errorHandler.remove();
246
+ // Resolve with the parameters from dojo require as an array.
247
+ resolve(args);
248
+ });
249
+ });
250
+ }
251
+ // returns a promise that resolves with an array of the required modules
252
+ // also will attempt to lazy load the ArcGIS API if it has not already been loaded
253
+ function loadModules(modules, loadScriptOptions) {
254
+ if (loadScriptOptions === void 0) { loadScriptOptions = {}; }
255
+ if (!isLoaded()) {
256
+ // script is not yet loaded, is it in the process of loading?
257
+ var script = getScript();
258
+ var src = script && script.getAttribute('src');
259
+ if (!loadScriptOptions.url && src) {
260
+ // script is still loading and user did not specify a URL
261
+ // in this case we want to default to the URL that's being loaded
262
+ // instead of defaulting to the latest 4.x URL
263
+ loadScriptOptions.url = src;
264
+ }
265
+ // attempt to load the script then load the modules
266
+ return loadScript(loadScriptOptions).then(function () { return requireModules(modules); });
267
+ }
268
+ else {
269
+ // script is already loaded, just load the modules
270
+ return requireModules(modules);
271
+ }
272
+ }
273
+
274
+ /*
275
+ Copyright (c) 2017 Esri
276
+ Licensed under the Apache License, Version 2.0 (the "License");
277
+ you may not use this file except in compliance with the License.
278
+ You may obtain a copy of the License at
279
+ http://www.apache.org/licenses/LICENSE-2.0
280
+ Unless required by applicable law or agreed to in writing, software
281
+ distributed under the License is distributed on an "AS IS" BASIS,
282
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
283
+ See the License for the specific language governing permissions and
284
+ limitations under the License.
285
+ */
286
+ // re-export the functions that are part of the public API
287
+
288
+ exports.utils = utils;
289
+ exports.loadModules = loadModules;
290
+ exports.getScript = getScript;
291
+ exports.isLoaded = isLoaded;
292
+ exports.loadScript = loadScript;
293
+ exports.setDefaultOptions = setDefaultOptions;
294
+ exports.loadCss = loadCss;
295
+
296
+ Object.defineProperty(exports, '__esModule', { value: true });
297
+
298
+ })));
299
+ //# sourceMappingURL=esri-loader.js.map
300
+ });
301
+
302
+ /*
303
+ * Copyright (c) 2022 Esri
304
+ * All rights reserved.
305
+ * Licensed under the Apache License, Version 2.0 (the "License");
306
+ * you may not use this file except in compliance with the License.
307
+ * You may obtain a copy of the License at
308
+ * http://www.apache.org/licenses/LICENSE-2.0
309
+ * Unless required by applicable law or agreed to in writing, software
310
+ * distributed under the License is distributed on an "AS IS" BASIS,
311
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
312
+ * See the License for the specific language governing permissions and
313
+ * limitations under the License.
314
+ */
315
+ const languageMap = new Map([
316
+ ["ar", "ar"],
317
+ ["bg", "bg"],
318
+ ["bs", "bs"],
319
+ ["ca", "ca"],
320
+ ["cs", "cs"],
321
+ ["da", "da"],
322
+ ["de", "de"],
323
+ ["el", "el"],
324
+ ["en", "en"],
325
+ ["es", "es"],
326
+ ["et", "et"],
327
+ ["fi", "fi"],
328
+ ["fr", "fr"],
329
+ ["he", "he"],
330
+ ["hr", "hr"],
331
+ ["hu", "hu"],
332
+ ["id", "id"],
333
+ ["it", "it"],
334
+ ["ja", "ja"],
335
+ ["ko", "ko"],
336
+ ["lt", "lt"],
337
+ ["lv", "lv"],
338
+ ["nb", "nb"],
339
+ ["nl", "nl"],
340
+ ["pl", "pl"],
341
+ ["pt-br", "pt-BR"],
342
+ ["pt-pt", "pt-PT"],
343
+ ["ro", "ro"],
344
+ ["ru", "ru"],
345
+ ["sk", "sk"],
346
+ ["sl", "sl"],
347
+ ["sr", "sr"],
348
+ ["sv", "sv"],
349
+ ["th", "th"],
350
+ ["tr", "tr"],
351
+ ["uk", "uk"],
352
+ ["vi", "vi"],
353
+ ["zh-cn", "zh-CN"],
354
+ ["zh-hk", "zh-HK"],
355
+ ["zh-tw", "zh-TW"],
356
+ ]);
357
+
358
+ /** @license
359
+ * Copyright 2022 Esri
360
+ *
361
+ * Licensed under the Apache License, Version 2.0 (the "License");
362
+ * you may not use this file except in compliance with the License.
363
+ * You may obtain a copy of the License at
364
+ *
365
+ * http://www.apache.org/licenses/LICENSE-2.0
366
+ *
367
+ * Unless required by applicable law or agreed to in writing, software
368
+ * distributed under the License is distributed on an "AS IS" BASIS,
369
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
370
+ * See the License for the specific language governing permissions and
371
+ * limitations under the License.
372
+ */
373
+ function getComponentClosestLanguage(element) {
374
+ var _a, _b, _c;
375
+ const closestElement = (_a = (element.closest("[lang]"))) !== null && _a !== void 0 ? _a : (_c = (_b = element.shadowRoot) === null || _b === void 0 ? void 0 : _b.ownerDocument) === null || _c === void 0 ? void 0 : _c.documentElement;
376
+ // language set by the calling application or browser. defaults to english.
377
+ const lang = ((closestElement === null || closestElement === void 0 ? void 0 : closestElement.lang) || (navigator === null || navigator === void 0 ? void 0 : navigator.language) || "en").toLowerCase();
378
+ if (languageMap.has(lang)) {
379
+ return languageMap.get(lang);
380
+ }
381
+ else {
382
+ // "ru-RU" maps to "ru" use case
383
+ return languageMap.has(lang.slice(0, 2)) ? languageMap.get(lang.slice(0, 2)) : "en";
384
+ }
385
+ }
386
+ function fetchLocaleStringsForComponent(componentName, locale) {
387
+ return new Promise((resolve, reject) => {
388
+ fetch(getAssetPath(`../assets/t9n/${componentName}/resources_${locale}.json`)).then(result => {
389
+ if (result.ok) {
390
+ resolve(result.json());
391
+ }
392
+ else {
393
+ reject();
394
+ }
395
+ }, () => reject());
396
+ });
397
+ }
398
+ async function getLocaleComponentStrings(element) {
399
+ const componentName = element.tagName.toLowerCase();
400
+ const componentLanguage = getComponentClosestLanguage(element);
401
+ let strings;
402
+ try {
403
+ strings = await fetchLocaleStringsForComponent(componentName, componentLanguage);
404
+ }
405
+ catch (e) {
406
+ console.warn(`no locale for ${componentName} (${componentLanguage}) loading default locale en.`);
407
+ strings = await fetchLocaleStringsForComponent(componentName, "en");
408
+ }
409
+ return [strings, componentLanguage];
410
+ }
411
+
412
+ export { esriLoader as e, getLocaleComponentStrings as g };