@esri/solutions-components 0.11.9 → 0.11.10

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 (192) hide show
  1. package/dist/cjs/{asyncToGenerator-c7fc3ee4.js → asyncToGenerator-ccb3278b.js} +1 -1
  2. package/dist/cjs/basemap-gallery_7.cjs.entry.js +2 -2
  3. package/dist/cjs/buffer-tools_2.cjs.entry.js +2 -2
  4. package/dist/cjs/card-manager_3.cjs.entry.js +4 -4
  5. package/dist/cjs/consent-manager.cjs.entry.js +4 -4
  6. package/dist/cjs/{constants-bed33322.js → constants-cb1b5548.js} +1 -1
  7. package/dist/cjs/create-feature_4.cjs.entry.js +5 -5
  8. package/dist/cjs/create-related-feature_3.cjs.entry.js +2 -2
  9. package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -2
  10. package/dist/cjs/crowdsource-reporter.cjs.entry.js +2 -2
  11. package/dist/cjs/delete-dialog.cjs.entry.js +2 -2
  12. package/dist/cjs/{downloadUtils-9ce90176.js → downloadUtils-47d639a9.js} +3 -3
  13. package/dist/cjs/{effects-fdd163a9.js → effects-c3f6d203.js} +1 -1
  14. package/dist/cjs/feature-list.cjs.entry.js +5 -5
  15. package/dist/cjs/{helpers-6a222aa7.js → helpers-2170c127.js} +2 -2
  16. package/dist/cjs/{index.es-6549e26a.js → index.es-f2dfef62.js} +2 -2
  17. package/dist/cjs/instant-apps-app-guide.cjs.entry.js +4 -4
  18. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +5 -5
  19. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -2
  20. package/dist/cjs/instant-apps-create.cjs.entry.js +4 -4
  21. package/dist/cjs/instant-apps-export-views.cjs.entry.js +4 -4
  22. package/dist/cjs/instant-apps-export.cjs.entry.js +4 -4
  23. package/dist/cjs/instant-apps-filter-list_2.cjs.entry.js +4 -4
  24. package/dist/cjs/instant-apps-header.cjs.entry.js +2 -2
  25. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +4 -4
  26. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -4
  27. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +4 -4
  28. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +4 -4
  29. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +6 -6
  30. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +4 -4
  31. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +6 -6
  32. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
  33. package/dist/cjs/instant-apps-measurement-tool.cjs.entry.js +2 -2
  34. package/dist/cjs/instant-apps-measurement.cjs.entry.js +4 -4
  35. package/dist/cjs/instant-apps-popover.cjs.entry.js +4 -4
  36. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +4 -4
  37. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +4 -4
  38. package/dist/cjs/instant-apps-splash.cjs.entry.js +4 -4
  39. package/dist/cjs/instant-apps-time-filter.cjs.entry.js +5 -5
  40. package/dist/cjs/json-editor_7.cjs.entry.js +2 -2
  41. package/dist/cjs/{languageUtil-a3e1eafd.js → languageUtil-f22ce913.js} +1 -1
  42. package/dist/cjs/{loadModules-df8b13ca.js → loadModules-581c909a.js} +1 -1
  43. package/dist/cjs/loader.cjs.js +1 -1
  44. package/dist/cjs/{locale-2dd3020a.js → locale-223194d0.js} +2 -2
  45. package/dist/cjs/{locale-1c60be9c.js → locale-70d78da8.js} +1 -1
  46. package/dist/cjs/map-layer-picker.cjs.entry.js +2 -2
  47. package/dist/cjs/map-select-tools_3.cjs.entry.js +4 -4
  48. package/dist/cjs/{popupUtils-93b14f86.js → popupUtils-a06bdfad.js} +2 -2
  49. package/dist/cjs/public-notification.cjs.entry.js +9 -6
  50. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  51. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  52. package/dist/cjs/solution-item-accordion.cjs.entry.js +33 -6
  53. package/dist/cjs/solutions-components.cjs.js +1 -1
  54. package/dist/cjs/spatial-ref.cjs.entry.js +2 -2
  55. package/dist/cjs/{utils-53383d03.js → utils-e4a0ff78.js} +1 -1
  56. package/dist/collection/assets/t9n/solution-item-accordion/resources.json +1 -1
  57. package/dist/collection/assets/t9n/solution-item-accordion/resources_en.json +2 -2
  58. package/dist/collection/components/public-notification/public-notification.js +25 -2
  59. package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +114 -4
  60. package/dist/collection/demos/solution-item-accordion.html +5 -3
  61. package/dist/collection/utils/interfaces.ts +17 -1
  62. package/dist/components/public-notification.js +6 -2
  63. package/dist/components/solution-item-accordion.js +33 -5
  64. package/dist/esm/{asyncToGenerator-96b2368d.js → asyncToGenerator-48cd21fe.js} +1 -1
  65. package/dist/esm/basemap-gallery_7.entry.js +2 -2
  66. package/dist/esm/buffer-tools_2.entry.js +2 -2
  67. package/dist/esm/card-manager_3.entry.js +4 -4
  68. package/dist/esm/consent-manager.entry.js +4 -4
  69. package/dist/esm/{constants-637a40f5.js → constants-abe87823.js} +1 -1
  70. package/dist/esm/create-feature_4.entry.js +5 -5
  71. package/dist/esm/create-related-feature_3.entry.js +2 -2
  72. package/dist/esm/crowdsource-manager.entry.js +2 -2
  73. package/dist/esm/crowdsource-reporter.entry.js +2 -2
  74. package/dist/esm/delete-dialog.entry.js +2 -2
  75. package/dist/esm/{downloadUtils-1179f077.js → downloadUtils-6ca6519f.js} +3 -3
  76. package/dist/esm/{effects-d42ccf96.js → effects-c8fc15b3.js} +1 -1
  77. package/dist/esm/feature-list.entry.js +5 -5
  78. package/dist/esm/{helpers-bd1ff401.js → helpers-673c1beb.js} +2 -2
  79. package/dist/esm/{index.es-6b399444.js → index.es-158fd72a.js} +2 -2
  80. package/dist/esm/instant-apps-app-guide.entry.js +4 -4
  81. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +5 -5
  82. package/dist/esm/instant-apps-control-panel.entry.js +2 -2
  83. package/dist/esm/instant-apps-create.entry.js +4 -4
  84. package/dist/esm/instant-apps-export-views.entry.js +4 -4
  85. package/dist/esm/instant-apps-export.entry.js +4 -4
  86. package/dist/esm/instant-apps-filter-list_2.entry.js +4 -4
  87. package/dist/esm/instant-apps-header.entry.js +2 -2
  88. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +4 -4
  89. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -4
  90. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +4 -4
  91. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +4 -4
  92. package/dist/esm/instant-apps-interactive-legend.entry.js +6 -6
  93. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +4 -4
  94. package/dist/esm/instant-apps-language-switcher.entry.js +6 -6
  95. package/dist/esm/instant-apps-language-translator.entry.js +6 -6
  96. package/dist/esm/instant-apps-measurement-tool.entry.js +2 -2
  97. package/dist/esm/instant-apps-measurement.entry.js +4 -4
  98. package/dist/esm/instant-apps-popover.entry.js +4 -4
  99. package/dist/esm/instant-apps-scoreboard.entry.js +4 -4
  100. package/dist/esm/instant-apps-sign-in.entry.js +4 -4
  101. package/dist/esm/instant-apps-splash.entry.js +4 -4
  102. package/dist/esm/instant-apps-time-filter.entry.js +5 -5
  103. package/dist/esm/json-editor_7.entry.js +2 -2
  104. package/dist/esm/{languageUtil-2b6e191a.js → languageUtil-a3e6adf6.js} +1 -1
  105. package/dist/esm/{loadModules-d5a25252.js → loadModules-400cb067.js} +1 -1
  106. package/dist/esm/loader.js +1 -1
  107. package/dist/esm/{locale-7874c756.js → locale-4cea650e.js} +1 -1
  108. package/dist/esm/{locale-4744c8a4.js → locale-d96a2bff.js} +2 -2
  109. package/dist/esm/map-layer-picker.entry.js +2 -2
  110. package/dist/esm/map-select-tools_3.entry.js +4 -4
  111. package/dist/esm/{popupUtils-cfe51dfd.js → popupUtils-dea8b2bb.js} +2 -2
  112. package/dist/esm/public-notification.entry.js +9 -6
  113. package/dist/esm/solution-configuration.entry.js +2 -2
  114. package/dist/esm/solution-contents_3.entry.js +2 -2
  115. package/dist/esm/solution-item-accordion.entry.js +34 -7
  116. package/dist/esm/solutions-components.js +1 -1
  117. package/dist/esm/spatial-ref.entry.js +2 -2
  118. package/dist/esm/{utils-04fffcaf.js → utils-92313b5a.js} +1 -1
  119. package/dist/solutions-components/assets/t9n/solution-item-accordion/resources.json +1 -1
  120. package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_en.json +2 -2
  121. package/dist/solutions-components/demos/solution-item-accordion.html +5 -3
  122. package/dist/solutions-components/{p-6369b974.entry.js → p-0055118a.entry.js} +1 -1
  123. package/dist/solutions-components/{p-7d4a72fa.entry.js → p-00965f29.entry.js} +1 -1
  124. package/dist/solutions-components/{p-97f33e9f.js → p-00eccd9f.js} +1 -1
  125. package/dist/solutions-components/{p-f1b5f09a.entry.js → p-0620c894.entry.js} +1 -1
  126. package/dist/solutions-components/{p-d6c60b8f.entry.js → p-098ca58c.entry.js} +1 -1
  127. package/dist/solutions-components/{p-f2d7b9c3.entry.js → p-118331aa.entry.js} +1 -1
  128. package/dist/solutions-components/p-1b161201.entry.js +6 -0
  129. package/dist/solutions-components/{p-d099573a.entry.js → p-1f4b9762.entry.js} +1 -1
  130. package/dist/solutions-components/{p-48242dd4.js → p-1f9f8107.js} +1 -1
  131. package/dist/solutions-components/{p-8d281f47.js → p-24b9d4b9.js} +2 -2
  132. package/dist/solutions-components/{p-95d1c104.entry.js → p-26190dbf.entry.js} +1 -1
  133. package/dist/solutions-components/{p-d324196d.entry.js → p-26f96d2f.entry.js} +1 -1
  134. package/dist/solutions-components/{p-3f83917b.entry.js → p-2b2ebb38.entry.js} +1 -1
  135. package/dist/solutions-components/{p-b7421036.entry.js → p-2be294e3.entry.js} +1 -1
  136. package/dist/solutions-components/{p-2a16aa29.entry.js → p-3155f0d6.entry.js} +1 -1
  137. package/dist/solutions-components/{p-fe9b2c74.entry.js → p-38331e47.entry.js} +1 -1
  138. package/dist/solutions-components/{p-3f14b242.entry.js → p-3bed6b51.entry.js} +1 -1
  139. package/dist/solutions-components/{p-404cbf48.js → p-4b2ec507.js} +1 -1
  140. package/dist/solutions-components/{p-c2e57b81.entry.js → p-4c97ab32.entry.js} +1 -1
  141. package/dist/solutions-components/{p-ea09b078.entry.js → p-5833cc4f.entry.js} +1 -1
  142. package/dist/solutions-components/{p-8e21a871.entry.js → p-59fbd618.entry.js} +1 -1
  143. package/dist/solutions-components/{p-7271fa31.entry.js → p-5aefa348.entry.js} +1 -1
  144. package/dist/solutions-components/p-5e3b74ff.entry.js +6 -0
  145. package/dist/solutions-components/{p-ffe1e3a3.entry.js → p-61310787.entry.js} +1 -1
  146. package/dist/solutions-components/{p-648b5a9e.js → p-619fefa1.js} +1 -1
  147. package/dist/solutions-components/{p-d65f8b73.js → p-62a0aa8e.js} +1 -1
  148. package/dist/solutions-components/{p-28858c2f.entry.js → p-6537611b.entry.js} +1 -1
  149. package/dist/solutions-components/{p-832707fd.entry.js → p-66e0a2ae.entry.js} +1 -1
  150. package/dist/solutions-components/{p-bc8d8128.entry.js → p-67aa6fdc.entry.js} +1 -1
  151. package/dist/solutions-components/{p-be16bc80.entry.js → p-6df9fc09.entry.js} +1 -1
  152. package/dist/solutions-components/{p-837e0939.entry.js → p-6ee5a767.entry.js} +1 -1
  153. package/dist/solutions-components/{p-d001e961.js → p-813c7077.js} +1 -1
  154. package/dist/solutions-components/{p-8585c128.entry.js → p-91177188.entry.js} +1 -1
  155. package/dist/solutions-components/{p-37ae171f.entry.js → p-928dc0da.entry.js} +1 -1
  156. package/dist/solutions-components/{p-c9686e6c.entry.js → p-9d977ad2.entry.js} +1 -1
  157. package/dist/solutions-components/{p-e5cb329f.entry.js → p-a28f1b42.entry.js} +1 -1
  158. package/dist/solutions-components/{p-ed1ecb5b.entry.js → p-a756fe7c.entry.js} +1 -1
  159. package/dist/solutions-components/{p-4695cfab.js → p-a7824793.js} +1 -1
  160. package/dist/solutions-components/{p-c50ff9f1.entry.js → p-acdb22c6.entry.js} +1 -1
  161. package/dist/solutions-components/{p-d59fb1a7.entry.js → p-ae7bed8d.entry.js} +1 -1
  162. package/dist/solutions-components/{p-79d66109.entry.js → p-af2a1ae1.entry.js} +1 -1
  163. package/dist/solutions-components/{p-ac122d9e.js → p-af2c8aa9.js} +1 -1
  164. package/dist/solutions-components/{p-7dc95675.js → p-b382fabf.js} +1 -1
  165. package/dist/solutions-components/{p-980d9473.entry.js → p-b5845b40.entry.js} +1 -1
  166. package/dist/solutions-components/{p-f95cc485.entry.js → p-bd8a3a91.entry.js} +1 -1
  167. package/dist/solutions-components/{p-d1551601.entry.js → p-c5aa99a9.entry.js} +1 -1
  168. package/dist/solutions-components/{p-0326f1f4.entry.js → p-c7e0799c.entry.js} +1 -1
  169. package/dist/solutions-components/{p-60b3b8b4.entry.js → p-cf0717b7.entry.js} +1 -1
  170. package/dist/solutions-components/{p-698656b8.entry.js → p-d83eb0b2.entry.js} +1 -1
  171. package/dist/solutions-components/p-d991af6f.js +6 -0
  172. package/dist/solutions-components/{p-4868d196.entry.js → p-dd0e85e0.entry.js} +1 -1
  173. package/dist/solutions-components/{p-dc704bc6.entry.js → p-ddeaaadf.entry.js} +1 -1
  174. package/dist/solutions-components/{p-3335285a.js → p-e70ae0b0.js} +2 -2
  175. package/dist/solutions-components/solutions-components.esm.js +1 -1
  176. package/dist/solutions-components/utils/interfaces.ts +17 -1
  177. package/dist/solutions-components_commit.txt +6 -6
  178. package/dist/types/components/public-notification/public-notification.d.ts +5 -0
  179. package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +22 -2
  180. package/dist/types/components.d.ts +38 -2
  181. package/dist/types/preact.d.ts +5 -1
  182. package/dist/types/utils/interfaces.d.ts +13 -0
  183. package/package.json +1 -1
  184. package/dist/solutions-components/p-40b36394.entry.js +0 -6
  185. package/dist/solutions-components/p-80262cb7.js +0 -6
  186. package/dist/solutions-components/p-dcabfe6a.entry.js +0 -6
  187. /package/dist/cjs/{esri-loader-08dc41bd.js → esri-loader-a56cbcbe.js} +0 -0
  188. /package/dist/cjs/{typeof-2a7e2dec.js → typeof-920a4426.js} +0 -0
  189. /package/dist/esm/{esri-loader-c6842c6b.js → esri-loader-781d738a.js} +0 -0
  190. /package/dist/esm/{typeof-ef2a007d.js → typeof-2511410e.js} +0 -0
  191. /package/dist/solutions-components/{p-0a24ad5f.js → p-6a68306c.js} +0 -0
  192. /package/dist/solutions-components/{p-4fe489cf.js → p-af7e43e0.js} +0 -0
@@ -3,7 +3,7 @@
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,c as n,g as e,h as r,H as i}from"./p-e996c38f.js";import{g as o}from"./p-404cbf48.js";import{g as u,c as a}from"./p-d4056c1c.js";import{d as c,_ as s,a as f}from"./p-d65f8b73.js";import{_ as l,t as d}from"./p-4fe489cf.js";import{r as h,_ as v,g as p,u as w}from"./p-0668e30d.js";import"./p-0a24ad5f.js";const m={storage:{},memory:!0,get(t){let n;try{n=window.localStorage&&window.localStorage.getItem(t)||this.storage[t]}catch(e){n=this.storage[t]}if(n)try{return JSON.parse(n)}catch(t){return}},set(t,n){const e=JSON.stringify(n);try{window.localStorage.setItem(t,e)}catch(e){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[t]=n}},delete(t){try{window.localStorage.removeItem(t)}catch(n){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[t]}}},b="esri-telemetry";class y extends Error{}const g=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"];class j{constructor(t){var n,e,r;this.trackers=[],this.options=t,this.debug=t.debug,this.suppressDisabledWarnings=t.suppressDisabledWarnings,this.disabled=function(t={}){const{disabled:n,portal:e}=t;return!(!n&&!1!==(null==e?void 0:e.eueiEnabled)&&(!e||function(t){return t.eueiEnabled&&t.user&&t.user.orgId===t.id}(e)||function(t){return t.user&&!t.user.orgId&&"US"===t.ipCntryCode}(e)||function(t){return!t.user&&"US"===t.ipCntryCode}(e)))}(t),this.logger=t.logger||console,this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");const i=(null===(n=t.portal)||void 0===n?void 0:n.user)||t.user;i&&this.setUser(i,null===(r=null===(e=t.portal)||void 0===e?void 0:e.subscriptionInfo)||void 0===r?void 0:r.type),this.disabled||this.initializeTrackers()}initializeTrackers(){this.options.plugins&&this.trackers.push(...this.options.plugins),this.trackers.length||this.logger.error(new Error("No trackers configured"))}getScriptTags(){return this.trackers.map((t=>t.getScriptTags&&t.getScriptTags())).join("")}async init(){const t=this.trackers.map((t=>t.init()));await Promise.all(t)}setUser(t={},n="Public"){let e;if(this.user=t="string"==typeof t?{username:t}:t,this.user.accountType=n,t.email&&t.email.split){const n=t.email.split("@")[1];e=g.filter((t=>n===t)).length>0}(e||["In House","Demo and Marketing"].indexOf(n)>-1)&&(this.user.internalUser=!0)}logPageView(t,n={},e={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;const r=this.trackers.filter((({disabled:t,hasError:n})=>!t&&!n));if(!r.length)return this.logger.warn("Page view was not logged because no enabled telemetry-plugins are registered."),!1;const i=this.preProcess(n,e);this.debug&&this.logger.info("Tracking page view",JSON.stringify(i));const o=r.map((n=>n.logPageView(t,i)));return Promise.all(o).then(),!0}logEvent(t,n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;const e=this.trackers.filter((({disabled:t,hasError:n})=>!t&&!n));if(!e.length)return this.logger.warn("Event was not logged because no enabled telemetry-plugins are registered."),!1;const r=this.preProcess(t,n);this.debug&&this.logger.info("Tracking event",JSON.stringify(r));const i=e.map((t=>t.logEvent(r)));return Promise.all(i).then(),!0}logError(t={}){t=Object.assign({eventType:"error"},t),this.logEvent(t)}startWorkflow(t,n={}){const e={name:t,start:Date.now(),steps:[],workflowId:Math.floor(17592186044416*(1+Math.random())).toString(16)};this.saveWorkflow(e);const r=Object.assign({name:t,step:"start"},n);return this.logWorkflow(r),e}stepWorkflow(t,n,e={}){const r=Object.assign({name:t,step:n,details:"string"==typeof e?e:e.details},e);this.logWorkflow(r)}endWorkflow(t,n={}){const e=Object.assign({name:t,step:"finish"},n);this.logWorkflow(e)}cancelWorkflow(t,n={}){const e=Object.assign({name:t,step:"cancel"},n);this.logWorkflow(e)}getWorkflow(t){const n=m.get(`TELEMETRY-WORKFLOW:${t}`);if(n){if(Date.now()-n.start<18e5)return n;this.deleteWorkflow(n)}}saveWorkflow(t){m.set(`TELEMETRY-WORKFLOW:${t.name}`,t)}deleteWorkflow(t){m.delete(`TELEMETRY-WORKFLOW:${t.name}`)}logWorkflow(t={}){t=this.preProcess(t);let n=this.getWorkflow(t.name);n||(this.startWorkflow(t.name),n=this.getWorkflow(t.name)),n.steps.push(t.step),n.duration=(Date.now()-n.start)/1e3,["cancel","finish"].indexOf(t.step)>-1?this.deleteWorkflow(n):this.saveWorkflow(n);const e=Object.assign(t,{eventType:"workflow",category:t.name,action:t.step,label:t.details,duration:n.duration,workflowId:n.workflowId});this.logEvent(e)}preProcess(t={},n={}){let e={};return this.user&&(e={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},t),e)).reduce((r=n.omitComplexData,i=this.logger,function(t,[n,e]){return function(t){return["string","number","boolean","undefined"].includes(typeof t)||t&&"string"==typeof t.valueOf()}(e)?t[n]=e:r||(i.warn(`You are trying to log a non-primitive value, ${n}:${JSON.stringify(e)}. This will get logged as [object Object]`),t[n]=e),t}),{});var r,i}disableTracker(t){var n;const e=this.trackers.find((({name:n})=>n===t));e&&!e.hasError&&(e.disabled=!0,null===(n=e.disable)||void 0===n||n.call(e))}enableTracker(t){var n;const e=this.trackers.find((({name:n})=>n===t));e&&!e.hasError&&(e.disabled=!1,null===(n=e.enable)||void 0===n||n.call(e))}}function O(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e}"function"==typeof SuppressedError&&SuppressedError;class S{constructor(t){var n;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},"undefined"!=typeof window&&!(null===(n=null==t?void 0:t.measurementIds)||void 0===n?void 0:n.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,t)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return this._getScripts().map((t=>{const n=[];return["src","id","dataAttribute","type"].forEach((e=>{let r=e;"dataAttribute"===e&&(r="data-esri-telemetry"),t[e]&&n.push(`${r}="${t[e]}"`)})),["async","defer"].forEach((e=>{t[e]&&n.push(`${e}`)})),`<script ${n.join(" ")}>${t.body?t.body:""}<\/script>`})).join("")}async init(){if("undefined"==typeof window)throw new y("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map((t=>{return n=t,new Promise(((t,e)=>{n.onload=t,n.onerror=e;const r=function(t){const{body:n,src:e,id:r,dataAttribute:i,section:o="body",type:u="text/javascript",async:a=!1,defer:c=!1,onload:s,onerror:f}=t;if("undefined"==typeof window)throw new y("Window is undefined: Cannot add script element.");if(function(t){const{id:n,dataAttribute:e}=t;return!!document.getElementById(n)||!!document.querySelector(`[data-${b}="${e}"]`)}(t))return void console.log(`script (${r||i}) is already present, skipping`);const l=function({id:t,dataAttribute:n,type:e,async:r,defer:i,body:o,src:u,onload:a,onerror:c}){const s=document.createElement("script");return t&&(s.id=t),n&&s.setAttribute(`data-${b}`,n),u&&(s.src=u),o&&(s.innerText=o),s.type=e,s.async=r,s.defer=i,a&&(s.onload=a),c&&(s.onerror=c),s}({id:r,dataAttribute:i,type:u,async:a,defer:c,body:n,src:e,onload:s,onerror:f});return"body"===o?document.body.appendChild(l):document.head.appendChild(l)}(n);r&&!n.body||t()}));var n}))),this.injectConfig()}logPageView(t,n={}){const e=this.buildCustomParams(n),r=Object.assign({page_title:t||window.location.pathname},e);return window.gtag("event","page_view",r),!0}logEvent(t){let{action:n}=t,e=O(t,["action"]);const r=n||"other",i=this.buildCustomParams(e);return window.gtag("event",r,i),!0}disable(){this.measurementIds&&this.measurementIds.forEach((t=>{window[`ga-disable-${t}`]=!0}))}enable(){this.measurementIds&&this.measurementIds.forEach((t=>{window[`ga-disable-${t}`]=void 0}))}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const t={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach((n=>{window.gtag("config",n,t)}))}buildCustomParams(t){let n,{category:e,label:r}=t;return n=this.verifyCustomDimensionAndMetrics(t),e&&(n=Object.assign(Object.assign({},n),{event_category:e})),r&&(n=Object.assign(Object.assign({},n),{event_label:r})),n}verifyCustomDimensionAndMetrics(t){const n=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),e=Object.values(n);return Object.keys(t).filter((t=>e.includes(t))).reduce(((n,e)=>Object.assign(n,{[e]:t[e]})),{})}createDimensionsAndMetricsCustomMap(t={},n={}){const e=this.createMetricCustomMap(n),r=this.createDimensionCustomMap(t);return Object.assign(Object.assign({},e),r)}createMetricCustomMap(t={}){return Object.keys(t).map((function(n){return{key:`metric${t[n]}`,value:n}})).filter((t=>t)).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}createDimensionCustomMap(t={}){return Object.keys(t).map((function(n){return{key:`dimension${t[n]}`,value:n}})).filter((t=>t)).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}}const k="TELEMETRY_COGNITO_CREDENTIALS";function E({telemetryData:t,dimensionLookup:n={},excludeKeys:e=[]}){return Object.keys(t).filter((t=>!e.includes(t))).map((e=>n[e]?{key:I(n,e),value:t[e]}:{key:e,value:A(t,e)})).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}function A(t,n){return"json"===n?t[n]?JSON.stringify(t[n]):"null":void 0===t[n]?"null":t[n].toString()}function I(t,n){return`dimension${t[n]}`}const x=["size","duration","position","number","count"];function T(t,n={}){return Object.keys(t).filter((t=>n[t]||x.includes(t))).map((e=>n[e]?{key:N(n,e),value:t[e]}:{key:e,value:t[e]})).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}function N(t,n){return`metric${t[n]}`}var _={exports:function(t,n,e,r,i){for(n=n.split?n.split("."):n,r=0;r<n.length;r++)t=t?t[n[r]]:i;return t===i?e:t}};const P=_.exports;"undefined"==typeof process||process;var M="undefined"!=typeof document;function C(t,n){return n.charAt(0)[t]()+n.slice(1)}"undefined"!=typeof Deno&&Deno,M&&"nodejs"===window.name||"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var D=C.bind(null,"toUpperCase"),L=C.bind(null,"toLowerCase");function z(t,n){void 0===n&&(n=!0);var e=function(t){return W(t)?D("null"):"object"==typeof t?function(t){return U(t.constructor)?t.constructor.name:null}(t):Object.prototype.toString.call(t).slice(8,-1)}(t);return n?L(e):e}function $(t,n){return typeof n===t}var U=$.bind(null,"function"),R=$.bind(null,"string");function W(t){return null===t}function H(t,n){if("object"!=typeof n||W(n))return!1;if(n instanceof t)return!0;var e=z(new t(""));if(function(t){return t instanceof Error||R(t.message)&&t.constructor&&function(t){return"number"===z(t)&&!isNaN(t)}(t.constructor.stackTraceLimit)}(n))for(;n;){if(z(n)===e)return!0;n=Object.getPrototypeOf(n)}return!1}function q(t,n){var e=t instanceof Element||t instanceof HTMLDocument;return e&&n?function(t,n){return void 0===n&&(n=""),t&&t.nodeName===n.toUpperCase()}(t,n):e}function V(t){var n=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(n))}}function F(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function G(t,n,e){for(var r=n.length-1,i=0;i<r;++i){var o=n[i];if("__proto__"===o||"constructor"===o)break;o in t||(t[o]={}),t=t[o]}t[n[r]]=e}function J(){for(var t="",n=0,e=4294967295*Math.random()|0;n++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[n-1],i=15&e;t+="-"==r||"4"==r?r:("x"==r?i:3&i|8).toString(16),e=n%8==0?4294967295*Math.random()|0:e>>4}return t}$.bind(null,"undefined"),$.bind(null,"boolean"),$.bind(null,"symbol"),H.bind(null,TypeError),H.bind(null,SyntaxError),V(q,"form"),V(q,"button"),V(q,"input"),V(q,"select");var X="undefined",K="object";"undefined"==typeof process||process;var B="undefined"!=typeof document;function Y(t,n){return n.charAt(0)[t]()+n.slice(1)}"undefined"!=typeof Deno&&Deno,B&&"nodejs"===window.name||"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var Z=Y.bind(null,"toUpperCase"),Q=Y.bind(null,"toLowerCase");function tt(t,n){void 0===n&&(n=!0);var e=function(t){return it(t)?Z("null"):"object"==typeof t?function(t){return et(t.constructor)?t.constructor.name:null}(t):Object.prototype.toString.call(t).slice(8,-1)}(t);return n?Q(e):e}function nt(t,n){return typeof n===t}var et=nt.bind(null,"function"),rt=nt.bind(null,"string");function it(t){return null===t}function ot(t,n){if("object"!=typeof n||it(n))return!1;if(n instanceof t)return!0;var e=tt(new t(""));if(function(t){return t instanceof Error||rt(t.message)&&t.constructor&&function(t){return"number"===tt(t)&&!isNaN(t)}(t.constructor.stackTraceLimit)}(n))for(;n;){if(tt(n)===e)return!0;n=Object.getPrototypeOf(n)}return!1}function ut(t,n){var e=t instanceof Element||t instanceof HTMLDocument;return e&&n?function(t,n){return void 0===n&&(n=""),t&&t.nodeName===n.toUpperCase()}(t,n):e}function at(t){var n=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(n))}}nt.bind(null,"undefined"),nt.bind(null,"boolean"),nt.bind(null,"symbol"),ot.bind(null,TypeError),ot.bind(null,SyntaxError),at(ut,"form"),at(ut,"button"),at(ut,"input"),at(ut,"select");var ct="global",st="__global__",ft=typeof self===K&&self.self===self&&self||typeof global===K&&global.global===global&&global||void 0;function lt(t){return ft[st][t]}function dt(t,n){return ft[st][t]=n}function ht(t){delete ft[st][t]}function vt(t,n,e){var r;try{if(wt(t)){var i=window[t];r=i[n].bind(i)}}catch(t){}return r||e}ft[st]||(ft[st]={});var pt={};function wt(t){if(typeof pt[t]!==X)return pt[t];try{var n=window[t];n.setItem(X,X),n.removeItem(X)}catch(n){return pt[t]=!1}return pt[t]=!0}"undefined"==typeof process||process;var mt="undefined"!=typeof window;function bt(t,n){return typeof n===t}"undefined"!=typeof Deno&&Deno,mt&&"nodejs"===window.name||"undefined"!=typeof navigator&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var yt=bt.bind(null,"function"),gt=bt.bind(null,"string");bt.bind(null,"undefined");var jt=bt.bind(null,"boolean");function Ot(t){if(!function(t){return t&&("object"==typeof t||null!==t)}(t))return!1;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}function St(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function kt(t,n){if(t){if("string"==typeof t)return St(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?St(t,n):void 0}}function Et(t){return function(t){if(Array.isArray(t))return St(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||kt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function It(t,n,e,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void e(t)}a.done?n(c):Promise.resolve(c).then(r,i)}function xt(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function u(t){It(o,r,i,u,a,"next",t)}function a(t){It(o,r,i,u,a,"throw",t)}u(void 0)}))}}function Tt(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Nt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function _t(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Nt(Object(e),!0).forEach((function(n){Tt(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Nt(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var Pt={};!function(){var t=function(t){var n,e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function s(t,n,e,r){var i=Object.create((n&&n.prototype instanceof w?n:w).prototype),o=new x(r||[]);return i._invoke=function(t,n,e){var r=l;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===v){if("throw"===i)throw o;return N()}for(e.method=i,e.arg=o;;){var u=e.delegate;if(u){var a=E(u,e);if(a){if(a===p)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===l)throw r=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var c=f(t,n,e);if("normal"===c.type){if(r=e.done?v:d,c.arg===p)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=v,e.method="throw",e.arg=c.arg)}}}(t,e,o),i}function f(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",d="suspendedYield",h="executing",v="completed",p={};function w(){}function m(){}function b(){}var y={};c(y,o,(function(){return this}));var g=Object.getPrototypeOf,j=g&&g(g(T([])));j&&j!==e&&r.call(j,o)&&(y=j);var O=b.prototype=w.prototype=Object.create(y);function S(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function k(t,n){function e(i,o,u,a){var c=f(t[i],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?n.resolve(l.__await).then((function(t){e("next",t,u,a)}),(function(t){e("throw",t,u,a)})):n.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return e("throw",t,u,a)}))}a(c.arg)}var i;this._invoke=function(t,r){function o(){return new n((function(n,i){e(t,r,n,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=f(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function A(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function I(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,u=function e(){for(;++i<t.length;)if(r.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=n,e.done=!0,e};return u.next=u}}return{next:N}}function N(){return{value:n,done:!0}}return m.prototype=b,c(O,"constructor",b),c(b,"constructor",m),m.displayName=c(b,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===m||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,a,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},S(k.prototype),c(k.prototype,u,(function(){return this})),t.AsyncIterator=k,t.async=function(n,e,r,i,o){void 0===o&&(o=Promise);var u=new k(s(n,e,r,i),o);return t.isGeneratorFunction(e)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},S(O),c(O,a,"Generator"),c(O,o,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(r,i){return a.type="throw",a.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),s=r.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),p},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),I(e),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;I(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),p}},t}(Pt);try{regeneratorRuntime=t}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}();var Mt=Pt,Ct="function",Dt="undefined",Lt="reducer",zt="@@redux/",$t=zt+"INIT",Ut=zt+Math.random().toString(36),Rt=function(){return("undefined"==typeof Symbol?"undefined":At(Symbol))===Ct&&Symbol.observable||"@@observable"}(),Wt=" != "+Ct;function Ht(t,n,e){if(At(n)===Ct&&At(e)===Dt&&(e=n,n=void 0),At(e)!==Dt){if(At(e)!==Ct)throw new Error("enhancer"+Wt);return e(Ht)(t,n)}if(At(t)!==Ct)throw new Error(Lt+Wt);var r=t,i=n,o=[],u=o,a=!1;function c(){u===o&&(u=o.slice())}function s(){return i}function f(t){if(At(t)!==Ct)throw new Error("Listener"+Wt);var n=!0;return c(),u.push(t),function(){if(n){n=!1,c();var e=u.indexOf(t);u.splice(e,1)}}}function l(t){if(!Ot(t))throw new Error("Act != obj");if(At(t.type)===Dt)throw new Error("ActType "+Dt);if(a)throw new Error("Dispatch in "+Lt);try{a=!0,i=r(i,t)}finally{a=!1}for(var n=o=u,e=0;e<n.length;e++)(0,n[e])();return t}return l({type:$t}),Tt({dispatch:l,subscribe:f,getState:s,replaceReducer:function(t){if(At(t)!==Ct)throw new Error("next "+Lt+Wt);r=t,l({type:$t})}},Rt,(function(){var t=f;return Tt({subscribe:function(n){if("object"!==At(n))throw new TypeError("Observer != obj");function e(){n.next&&n.next(s())}return e(),{unsubscribe:t(e)}}},Rt,(function(){return this}))}))}function qt(t,n){var e=n&&n.type;return"action "+(e&&e.toString()||"?")+Lt+" "+t+" returns "+Dt}function Vt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return 0===n.length?function(t){return t}:1===n.length?n[0]:n.reduce((function(t,n){return function(){return t(n.apply(void 0,arguments))}}))}function Ft(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return function(t){return function(e,r,i){var o,u=t(e,r,i),a=u.dispatch,c={getState:u.getState,dispatch:function(t){return a(t)}};return o=n.map((function(t){return t(c)})),a=Vt.apply(void 0,Et(o))(u.dispatch),_t(_t({},u),{},{dispatch:a})}}}var Gt="__anon_id",Jt="__user_id",Xt="__user_traits",Kt="analytics",Bt="userId",Yt="anonymousId",Zt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Qt=["name","EVENTS","config","loaded"],tn=Zt.reduce((function(t,n){return t[n]=n,t}),{registerPluginType:function(t){return"registerPlugin:".concat(t)},pluginReadyType:function(t){return"ready:".concat(t)}}),nn=/^utm_/,en=/^an_prop_/,rn=/^an_trait_/;function on(t){var n=t.storage.setItem;return function(e){return function(r){return function(i){if(i.type===tn.bootstrap){var o=i.params,u=i.user,a=i.persistedUser,c=i.initialUser,s=a.userId===u.userId;a.anonymousId!==u.anonymousId&&n(Gt,u.anonymousId),s||n(Jt,u.userId),c.traits&&n(Xt,_t(_t({},s&&a.traits?a.traits:{}),c.traits));var f=Object.keys(i.params);if(f.length){var l=o.an_uid,d=o.an_event,h=f.reduce((function(t,n){if(n.match(nn)||n.match(/^(d|g)clid/)){var e=n.replace(nn,"");t.campaign["campaign"===e?"name":e]=o[n]}return n.match(en)&&(t.props[n.replace(en,"")]=o[n]),n.match(rn)&&(t.traits[n.replace(rn,"")]=o[n]),t}),{campaign:{},props:{},traits:{}});e.dispatch(_t(_t({type:tn.params,raw:o},h),l?{userId:l}:{})),l&&setTimeout((function(){return t.identify(l,h.traits)}),0),d&&setTimeout((function(){return t.track(d,h.props)}),0),Object.keys(h.campaign).length&&e.dispatch({type:tn.campaign,campaign:h.campaign})}}return r(i)}}}}function un(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.type===tn.setItemEnd){if(e.key===Gt)return _t(_t({},n),{anonymousId:e.value});if(e.key===Jt)return _t(_t({},n),{userId:e.value})}switch(e.type){case tn.identify:return Object.assign({},n,{userId:e.userId,traits:_t(_t({},n.traits),e.traits)});case tn.reset:return[Jt,Gt,Xt].forEach((function(n){t.removeItem(n)})),Object.assign({},n,{userId:null,anonymousId:null,traits:{}});default:return n}}}function an(t){return{userId:t.getItem(Jt),anonymousId:t.getItem(Gt),traits:t.getItem(Xt)}}var cn=function(t){return"__TEMP__"+t};function sn(t){var n=t.storage,e=n.setItem,r=n.removeItem,i=n.getItem;return function(t){return function(n){return function(o){var u=o.userId,a=o.traits,c=o.options;if(o.type===tn.reset&&([Jt,Xt,Gt].forEach((function(t){r(t)})),[Bt,Yt,"traits"].forEach((function(t){ht(cn(t))}))),o.type===tn.identify){i(Gt)||e(Gt,J());var s=i(Jt),f=i(Xt)||{};s&&s!==u&&t.dispatch({type:tn.userIdChanged,old:{userId:s,traits:f},new:{userId:u,traits:a},options:c}),u&&e(Jt,u),a&&e(Xt,_t(_t({},f),a))}return n(o)}}}}var fn={};function ln(t,n){fn[t]&&yt(fn[t])&&(fn[t](n),delete fn[t])}function dn(t,n,e){return new Promise((function(r,i){return n()?r(t):e<1?i(_t(_t({},t),{},{queue:!0})):new Promise((function(t){return setTimeout(t,10)})).then((function(){return dn(t,n,e-10).then(r,i)}))}))}function hn(t,n,e){var r=n(),i=t.getState(),o=i.plugins,u=i.queue,a=i.user;if(!i.context.offline&&u&&u.actions&&u.actions.length){var c=u.actions.reduce((function(t,n,e){return o[n.plugin].loaded?(t.process.push(n),t.processIndex.push(e)):(t.requeue.push(n),t.requeueIndex.push(e)),t}),{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(c.processIndex&&c.processIndex.length){c.processIndex.forEach((function(n){var i=u.actions[n],c=i.plugin,s=i.payload.type,f=r[c][s];if(f&&yt(f)){var l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[Bt,Yt].reduce((function(e,r){return t.hasOwnProperty(r)&&n[r]&&n[r]!==t[r]&&(e[r]=n[r]),e}),t)}(i.payload,a);f({payload:l,config:o[c].config,instance:e});var d="".concat(s,":").concat(c);t.dispatch(_t(_t({},l),{},{type:d,_:{called:d,from:"queueDrain"}}))}}));var s=u.actions.filter((function(t,n){return!~c.processIndex.indexOf(n)}));u.actions=s}}}function vn(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(t).filter((function(t){var r=e.plugins||{};return jt(r[t])?r[t]:!1!==r.all&&(!n[t]||!1!==n[t].enabled)})).map((function(n){return t[n]}))}var pn=/Start$/,wn=/^bootstrap/,mn=/^ready/;function bn(t,n,e,r,i){return yn.apply(this,arguments)}function yn(){return yn=xt(Mt.mark((function t(n,e,r,i,o){var u,a,c,s,f,l,d,h,v,p,w;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=yt(e)?e():e,c=(a=n.type).replace(pn,""),!n._||!n._.called){t.next=5;break}return t.abrupt("return",n);case 5:return s=r.getState(),f=vn(u,s.plugins,n.options),a===tn.initializeStart&&n.fromEnable&&(f=Object.keys(s.plugins).filter((function(t){var e=s.plugins[t];return n.plugins.includes(t)&&!e.initialized})).map((function(t){return u[t]}))),l=f.map((function(t){return t.name})),d=An(a,f),t.next=12,gn({action:n,data:{exact:d.before,namespaced:d.beforeNS},state:s,allPlugins:u,allMatches:d,instance:r,store:i,EVENTS:o});case 12:if(!xn(h=t.sent,l.length)){t.next=15;break}return t.abrupt("return",h);case 15:if(a!==c){t.next=19;break}v=h,t.next=22;break;case 19:return t.next=21,gn({action:_t(_t({},h),{},{type:c}),data:{exact:d.during,namespaced:d.duringNS},state:s,allPlugins:u,allMatches:d,instance:r,store:i,EVENTS:o});case 21:v=t.sent;case 22:if(!a.match(pn)){t.next=28;break}return p="".concat(c,"End"),t.next=26,gn({action:_t(_t({},v),{},{type:p}),data:{exact:d.after,namespaced:d.afterNS},state:s,allPlugins:u,allMatches:d,instance:r,store:i,EVENTS:o});case 26:(w=t.sent).meta&&w.meta.hasCallback&&ln(w.meta.rid,{payload:w});case 28:return t.abrupt("return",h);case 29:case"end":return t.stop()}}),t)}))),yn.apply(this,arguments)}function gn(t){return jn.apply(this,arguments)}function jn(){return jn=xt(Mt.mark((function t(n){var e,r,i,o,u,a,c,s,f,l,d,h,v,p,w,m,b,y;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.data,i=n.instance,u=n.allPlugins,a=n.allMatches,c=n.store,s=n.EVENTS,f=(o=n.state).plugins,l=o.context,h=(d=(r=n.action).type).match(pn),v=e.exact.map((function(t){return t.pluginName})),h&&(v=a.during.map((function(t){return t.pluginName}))),p=_n(i,v),w=e.exact.reduce((function(t,n){var e=n.pluginName,r=n.methodName,i=!1;return r.match(/^initialize/)||r.match(/^reset/)||(i=!f[e].loaded),l.offline&&r.match(/^(page|track|identify)/)&&(i=!0),t["".concat(e)]=i,t}),{}),t.next=10,e.exact.reduce(function(){var t=xt(Mt.mark((function t(n,o){var a,c;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.pluginName,t.next=3,n;case 3:if(c=t.sent,!e.namespaced||!e.namespaced[a]){t.next=11;break}return t.next=7,e.namespaced[a].reduce(function(){var t=xt(Mt.mark((function t(n,e){var r,o,c,s;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(t,n,e){return function(r,i){var o=e||n;return _t(_t({},t),{},{abort:{reason:r,plugins:i||[n],caller:d,from:o}})}},t.next=3,n;case 3:if(r=t.sent,e.method&&yt(e.method)){t.next=6;break}return t.abrupt("return",r);case 6:return Pn(e.methodName,e.pluginName),t.next=9,e.method({payload:r,instance:i,abort:o(r,a,e.pluginName),config:Sn(e.pluginName,f,u),plugins:f});case 9:return s=Ot(c=t.sent)?c:{},t.abrupt("return",Promise.resolve(_t(_t({},r),s)));case 12:case"end":return t.stop()}}),t)})));return function(n,e,r){return t.apply(this,arguments)}}(),Promise.resolve(r));case 7:c[a]=t.sent,t.next=12;break;case 11:c[a]=r;case 12:return t.abrupt("return",Promise.resolve(c));case 13:case"end":return t.stop()}}),t)})));return function(n,e,r){return t.apply(this,arguments)}}(),Promise.resolve({}));case 10:return m=t.sent,t.next=13,e.exact.reduce(function(){var t=xt(Mt.mark((function t(n,r,o){var a,s,l,v,b,y,g,j,O,S,k;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.exact.length===o+1,l=u[s=r.pluginName],t.next=5,n;case 5:if(v=t.sent,b=m[s]?m[s]:{},h&&(b=v),!In(b,s)){t.next=11;break}return On({data:b,method:d,instance:i,pluginName:s,store:c}),t.abrupt("return",Promise.resolve(v));case 11:if(!In(v,s)){t.next=14;break}return a&&On({data:v,method:d,instance:i,store:c}),t.abrupt("return",Promise.resolve(v));case 14:if(!w.hasOwnProperty(s)||!0!==w[s]){t.next=17;break}return c.dispatch({type:"queue",plugin:s,payload:b,_:{called:"queue",from:"queueMechanism"}}),t.abrupt("return",Promise.resolve(v));case 17:return y=p(m[s],u[s]),t.next=20,l[d]({abort:y.abort,payload:b,instance:i,config:Sn(s,f,u),plugins:f});case 20:return j=Ot(g=t.sent)?g:{},O=_t(_t({},v),j),In(S=m[s],s)?On({data:S,method:d,instance:i,pluginName:s,store:c}):((k="".concat(d,":").concat(s)).match(/:/g)||[]).length<2&&!d.match(wn)&&!d.match(mn)&&i.dispatch(_t(_t({},h?O:b),{},{type:k,_:{called:k,from:"submethod"}})),t.abrupt("return",Promise.resolve(O));case 26:case"end":return t.stop()}}),t)})));return function(n,e,r){return t.apply(this,arguments)}}(),Promise.resolve(r));case 13:if(b=t.sent,d.match(pn)||d.match(/^registerPlugin/)||d.match(mn)||d.match(wn)||d.match(/^params/)||d.match(/^userIdChanged/)){t.next=21;break}if(s.plugins.includes(d),!b._||b._.originalAction!==d){t.next=18;break}return t.abrupt("return",b);case 18:y=_t(_t({},b),{_:{originalAction:b.type,called:b.type,from:"engineEnd"}}),xn(b,e.exact.length)&&!d.match(/End$/)&&(y=_t(_t({},y),{type:b.type+"Aborted"})),c.dispatch(y);case 21:return t.abrupt("return",b);case 22:case"end":return t.stop()}}),t)}))),jn.apply(this,arguments)}function On(t){var n=t.pluginName,e=t.method+"Aborted"+(n?":"+n:"");t.store.dispatch(_t(_t({},t.data),{},{type:e,_:{called:e,from:"abort"}}))}function Sn(t,n,e){var r=n[t]||e[t];return r&&r.config?r.config:{}}function kn(t,n){return n.reduce((function(n,e){return e[t]?n.concat({methodName:t,pluginName:e.name,method:e[t]}):n}),[])}function En(t,n){var e=t.replace(pn,""),r=n?":".concat(n):"";return["".concat(t).concat(r),"".concat(e).concat(r),"".concat(e,"End").concat(r)]}function An(t,n){var e=En(t).map((function(t){return kn(t,n)}));return n.reduce((function(e,r){var i=r.name,o=function(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,i,o=[],u=!0,a=!1;try{for(e=e.call(t);!(u=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);u=!0);}catch(t){a=!0,i=t}finally{try{u||null==e.return||e.return()}finally{if(a)throw i}}return o}}(t,n)||kt(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(En(t,i).map((function(t){return kn(t,n)})),3),u=o[0],a=o[1],c=o[2];return u.length&&(e.beforeNS[i]=u),a.length&&(e.duringNS[i]=a),c.length&&(e.afterNS[i]=c),e}),{before:e[0],beforeNS:{},during:e[1],duringNS:{},after:e[2],afterNS:{}})}function In(t,n){var e=t.abort;return!!e&&(!0===e||Nn(e,n)||e&&Nn(e.plugins,n))}function xn(t,n){var e=t.abort;if(!e)return!1;if(!0===e||gt(e))return!0;var r=e.plugins;return Tn(e)&&e.length===n||Tn(r)&&r.length===n}function Tn(t){return Array.isArray(t)}function Nn(t,n){return!(!t||!Tn(t))&&t.includes(n)}function _n(t,n){return function(e,r,i){var o=r.config,u=r.name,a="".concat(u,".").concat(e.type);i&&(a=i.event);var c=e.type.match(pn)?function(t,n,e,r,i){return function(o,u){var a=r?r.name:t,c=u&&Tn(u)?u:e;if(r&&(!(c=u&&Tn(u)?u:[t]).includes(t)||1!==c.length))throw new Error("Method ".concat(n," can only abort ").concat(t," plugin. ").concat(JSON.stringify(c)," input valid"));return _t(_t({},i),{},{abort:{reason:o,plugins:c,caller:n,_:a}})}}(u,a,n,i,e):function(t,n){return function(){throw new Error(t.type+" action not cancellable. Remove abort in "+n)}}(e,a);return{payload:Cn(e),instance:t,config:o||{},abort:c}}}function Pn(t,n){var e=Mn(t);if(e&&e.name===n){var r=Mn(e.method),i=r?"or "+r.method:"";throw new Error([n+" plugin is calling method "+t,"Plugins cant call self","Use ".concat(e.method," ").concat(i," in ").concat(n," plugin insteadof ").concat(t)].join("\n"))}}function Mn(t){var n=t.match(/(.*):(.*)/);return!!n&&{method:n[1],name:n[2]}}function Cn(t){return Object.keys(t).reduce((function(n,e){return"type"===e||(n[e]=Ot(t[e])?Object.assign({},t[e]):t[e]),n}),{})}function Dn(t,n,e){var r={};return function(i){return function(o){return function(){var u=xt(Mt.mark((function u(a){var c,s,f,l,d,h,v,p,w,m;return Mt.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(c=a.type,s=a.plugins,f=a,!a.abort){u.next=4;break}return u.abrupt("return",o(a));case 4:if(c===tn.enablePlugin&&i.dispatch({type:tn.initializeStart,plugins:s,disabled:[],fromEnable:!0,meta:a.meta}),c===tn.disablePlugin&&setTimeout((function(){return ln(a.meta.rid,{payload:a})}),0),c===tn.initializeEnd&&(l=n(),d=Object.keys(l),h=d.filter((function(t){return s.includes(t)})).map((function(t){return l[t]})),v=[],p=[],w=a.disabled,m=h.map((function(t){var n=t.name;return dn(t,t.loaded,1e4).then((function(){return r[n]||(i.dispatch({type:tn.pluginReadyType(n),name:n,events:Object.keys(t).filter((function(t){return!Qt.includes(t)}))}),r[n]=!0),v=v.concat(n),t})).catch((function(t){if(t instanceof Error)throw new Error(t);return p=p.concat(t.name),t}))})),Promise.all(m).then((function(){var t={plugins:v,failed:p,disabled:w};setTimeout((function(){d.length===m.length+w.length&&i.dispatch(_t(_t({},{type:tn.ready}),t))}),0)}))),c===tn.bootstrap){u.next=13;break}return/^ready:([^:]*)$/.test(c)&&setTimeout((function(){return hn(i,n,t)}),0),u.next=11,bn(a,n,t,i,e);case 11:return u.abrupt("return",o(u.sent));case 13:return u.abrupt("return",o(f));case 14:case"end":return u.stop()}}),u)})));return function(t){return u.apply(this,arguments)}}()}}}function Ln(t){return function(){return function(n){return function(e){var r=e.type,i=e.key,o=e.value,u=e.options;if(r===tn.setItem||r===tn.removeItem){if(e.abort)return n(e);r===tn.setItem?t.setItem(i,o,u):t.removeItem(i,u)}return n(e)}}}}function zn(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $n(t,n,e){return n&&zn(t.prototype,n),e&&zn(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Un=$n((function t(){var n=this;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),Tt(this,"before",[]),Tt(this,"after",[]),Tt(this,"addMiddleware",(function(t,e){n[e]=n[e].concat(t)})),Tt(this,"removeMiddleware",(function(t,e){var r=n[e].findIndex((function(n){return n===t}));-1!==r&&(n[e]=[].concat(Et(n[e].slice(0,r)),Et(n[e].slice(r+1))))})),Tt(this,"dynamicMiddlewares",(function(t){return function(e){return function(r){return function(i){var o={getState:e.getState,dispatch:function(t){return e.dispatch(t)}},u=n[t].map((function(t){return t(o)}));return Vt.apply(void 0,Et(u))(r)(i)}}}}))}));function Rn(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r={};if("initialize:aborted"===e.type)return n;if(/^registerPlugin:([^:]*)$/.test(e.type)){var i=Wn(e.type,"registerPlugin"),o=t()[i];if(!o||!i)return n;var u=e.enabled;return r[i]={enabled:u,initialized:!!u&&Boolean(!o.initialize),loaded:!!u&&Boolean(o.loaded()),config:o.config||{}},_t(_t({},n),r)}if(/^initialize:([^:]*)$/.test(e.type)){var a=Wn(e.type,tn.initialize),c=t()[a];return c&&a?(r[a]=_t(_t({},n[a]),{initialized:!0,loaded:Boolean(c.loaded())}),_t(_t({},n),r)):n}if(/^ready:([^:]*)$/.test(e.type))return r[e.name]=_t(_t({},n[e.name]),{loaded:!0}),_t(_t({},n),r);switch(e.type){case tn.disablePlugin:return _t(_t({},n),Hn(e.plugins,!1,n));case tn.enablePlugin:return _t(_t({},n),Hn(e.plugins,!0,n));default:return n}}}function Wn(t,n){return t.substring(n.length+1,t.length)}function Hn(t,n,e){return t.reduce((function(t,r){return t[r]=_t(_t({},e[r]),{enabled:n}),t}),e)}function qn(t){try{return JSON.parse(JSON.stringify(t))}catch(t){}return t}var Vn={last:{},history:[]};function Fn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vn,n=arguments.length>1?arguments[1]:void 0,e=n.options,r=n.meta;if(n.type===tn.track){var i=qn(_t(_t({event:n.event,properties:n.properties},Object.keys(e).length&&{options:e}),{},{meta:r}));return _t(_t({},t),{last:i,history:t.history.concat(i)})}return t}var Gn={actions:[]};function Jn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gn,n=arguments.length>1?arguments[1]:void 0,e=n.payload;switch(n.type){case"queue":var r;return r=e&&e.type&&e.type===tn.identify?[n].concat(t.actions):t.actions.concat(n),_t(_t({},t),{},{actions:r});case"dequeue":return[];default:return t}}var Xn=/#.*$/;function Kn(t){var n=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);return"/"+(n&&n[3]?n[3].split("?")[0].replace(Xn,""):"")}var Bn,Yn,Zn,Qn,te=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt)return t;var n=document,e=n.title,r=n.referrer,i=window,o=i.location,u=i.innerWidth,a=i.innerHeight,c=o.hash,s=o.search,f=function(t){var n=function(){if(mt)for(var t,n=document.getElementsByTagName("link"),e=0;t=n[e];e++)if("canonical"===t.getAttribute("rel"))return t.getAttribute("href")}();return n?n.match(/\?/)?n:n+t:window.location.href.replace(Xn,"")}(s),l={title:e,url:f,path:Kn(f),hash:c,search:s,width:u,height:a};return r&&""!==r&&(l.referrer=r),_t(_t({},l),t)},ne={last:{},history:[]};function ee(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne,n=arguments.length>1?arguments[1]:void 0,e=n.options;if(n.type===tn.page){var r=qn(_t({properties:n.properties,meta:n.meta},Object.keys(e).length&&{options:e}));return _t(_t({},t),{last:r,history:t.history.concat(r)})}return t}Bn=function(){if(!mt)return!1;var t=navigator.appVersion;return~t.indexOf("Win")?"Windows":~t.indexOf("Mac")?"MacOS":~t.indexOf("X11")?"UNIX":~t.indexOf("Linux")?"Linux":"Unknown OS"}(),Yn=mt?document.referrer:null,Zn=function(){if(M){var t=navigator,n=t.languages;return t.userLanguage||(n&&n.length?n[0]:t.language)}}(),Qn=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}}();var re={initialized:!1,sessionId:J(),app:null,version:null,debug:!1,offline:!!mt&&!navigator.onLine,os:{name:Bn},userAgent:mt?navigator.userAgent:"node",library:{name:Kt,version:"0.10.22"},timezone:Qn,locale:Zn,campaign:{},referrer:Yn};function ie(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re,n=arguments.length>1?arguments[1]:void 0,e=t.initialized,r=n.campaign;switch(n.type){case tn.campaign:return _t(_t({},t),{campaign:r});case tn.offline:return _t(_t({},t),{offline:!0});case tn.online:return _t(_t({},t),{offline:!1});default:return e?t:_t(_t(_t({},re),t),{initialized:!0})}}var oe=["plugins","reducers","storage"];function ue(t,n,e){if(mt){var r=window[(e?"add":"remove")+"EventListener"];t.split(" ").forEach((function(t){r(t,n)}))}}function ae(t){var n=ue.bind(null,"online offline",(function(){return Promise.resolve(!navigator.onLine).then(t)}));return n(!0),function(){return n(!1)}}function ce(){return dt(Kt,[]),function(t){return function(n,e,r){var i=t(n,e,r),o=i.dispatch;return Object.assign(i,{dispatch:function(t){return ft[st][Kt].push(t.action||t),o(t)}})}}}function se(){return function(){return Vt(Vt.apply(null,arguments),ce())}}function fe(t){return t?function(t){return"[object Array]"===Object.prototype.toString.call(t)}(t)?t:[t]:[]}function le(){var t,n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,o=J();return r&&(fn[o]=(t=r,n=function(t){for(var n,e=t||Array.prototype.slice.call(arguments),r=0;r<e.length;r++)if(yt(e[r])){n=e[r];break}return n}(i),function(e){n&&n(e),t(e)})),_t(_t({},e),{},{rid:o,ts:(new Date).getTime()},r?{hasCallback:!0}:{})}function de(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.reducers||{},e=t.initialUser||{},r=(t.plugins||[]).reduce((function(t,n){if(yt(n))return t.middlewares=t.middlewares.concat(n),t;if(n.NAMESPACE&&(n.name=n.NAMESPACE),!n.name)throw new Error("https://lytics.dev/errors/1");var e=n.EVENTS?Object.keys(n.EVENTS).map((function(t){return n.EVENTS[t]})):[];t.pluginEnabled[n.name]=!(!1===n.enabled||n.config&&!1===n.config.enabled),delete n.enabled,n.methods&&(t.methods[n.name]=Object.keys(n.methods).reduce((function(t,e){var r;return t[e]=(r=n.methods[e],function(){for(var t=Array.prototype.slice.call(arguments),n=new Array(r.length),e=0;e<t.length;e++)n[e]=t[e];return n[n.length]=S,r.apply({instance:S},n)}),t}),{}),delete n.methods);var r=Object.keys(n).concat(e),i=new Set(t.events.concat(r));if(t.events=Array.from(i),t.pluginsArray=t.pluginsArray.concat(n),t.plugins[n.name])throw new Error(n.name+"AlreadyLoaded");return t.plugins[n.name]=n,t.plugins[n.name].loaded||(t.plugins[n.name].loaded=function(){return!0}),t}),{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),i=t.storage?t.storage:{getItem:lt,setItem:dt,removeItem:ht},o=function(t){return function(n,e,r){return e.getState("user")[n]||(r&&Ot(r)&&r[n]?r[n]:an(t)[n]||lt(cn(n))||null)}}(i),u=r.plugins,a=r.events.filter((function(t){return!Qt.includes(t)})).sort(),c=new Set(a.concat(Zt).filter((function(t){return!Qt.includes(t)}))),s=Array.from(c).sort(),f=function(){return u},l=new Un,d=l.addMiddleware,h=l.removeMiddleware,v=l.dynamicMiddlewares,p=function(){throw new Error("Abort disabled inListener")},w=function(t){for(var n,e=Object.create(null),r=/([^&=]+)=?([^&]*)/g;n=r.exec(t);){var i=F(n[1]),o=F(n[2]);if(i)if("[]"===i.substring(i.length-2)){var u=e[i=i.substring(0,i.length-2)]||(e[i]=[]);e[i]=Array.isArray(u)?u:[],e[i].push(o)}else e[i]=""===o||o}for(var a in e){var c=a.split("[");c.length>1&&(G(e,c.map((function(t){return t.replace(/[?[\]\\ ]/g,"")})),e[a]),delete e[a])}return e}(function(t){if(t){var n=t.match(/\?(.*)/);return n&&n[1]?n[1].split("#")[0]:""}return M&&window.location.search.substring(1)}(void 0)),m=an(i),b=_t(_t(_t(_t({},m),e),w.an_uid?{userId:w.an_uid}:{}),w.an_aid?{anonymousId:w.an_aid}:{});b.anonymousId||(b.anonymousId=J());var y,g,j,O=_t({enable:function(t,n){return new Promise((function(e){D.dispatch({type:tn.enablePlugin,plugins:fe(t),_:{originalAction:tn.enablePlugin}},e,[n])}))},disable:function(t,n){return new Promise((function(e){D.dispatch({type:tn.disablePlugin,plugins:fe(t),_:{originalAction:tn.disablePlugin}},e,[n])}))}},r.methods),S={identify:(j=xt(Mt.mark((function t(n,e,r,i){var u,a,c,s,f;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=gt(n)?n:null,a=Ot(n)?n:e,c=r||{},s=S.user(),dt(cn(Bt),u),f=u||a.userId||o(Bt,S,a),t.abrupt("return",new Promise((function(t){D.dispatch(_t({type:tn.identifyStart,userId:f,traits:a||{},options:c,anonymousId:s.anonymousId},s.id&&s.id!==u&&{previousId:s.id}),t,[e,r,i])})));case 7:case"end":return t.stop()}}),t)}))),function(t,n,e,r){return j.apply(this,arguments)}),track:(g=xt(Mt.mark((function t(n,e,r,i){var u,a,c;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((u=Ot(n)?n.event:n)&&gt(u)){t.next=3;break}throw new Error("EventMissing");case 3:return a=Ot(n)?n:e||{},c=Ot(r)?r:{},t.abrupt("return",new Promise((function(t){D.dispatch({type:tn.trackStart,event:u,properties:a,options:c,userId:o(Bt,S,e),anonymousId:o(Yt,S,e)},t,[e,r,i])})));case 6:case"end":return t.stop()}}),t)}))),function(t,n,e,r){return g.apply(this,arguments)}),page:(y=xt(Mt.mark((function t(n,e,r){var i,u;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Ot(n)?n:{},u=Ot(e)?e:{},t.abrupt("return",new Promise((function(t){D.dispatch({type:tn.pageStart,properties:te(i),options:u,userId:o(Bt,S,i),anonymousId:o(Yt,S,i)},t,[n,e,r])})));case 3:case"end":return t.stop()}}),t)}))),function(t,n,e){return y.apply(this,arguments)}),user:function(t){if(t===Bt||"id"===t)return o(Bt,S);if(t===Yt||"anonId"===t)return o(Yt,S);var n=S.getState("user");return t?P(n,t):n},reset:function(t){return new Promise((function(n){D.dispatch({type:tn.resetStart},n,t)}))},ready:function(t){return S.on(tn.ready,t)},on:function(t,n){if(!t||!yt(n))return!1;if(t===tn.bootstrap)throw new Error(".on disabled for "+t);var e=/Start$|Start:/;if("*"===t){var r=function(){return function(t){return function(r){return r.type.match(e)&&n({payload:r,instance:S,plugins:u}),t(r)}}},i=function(){return function(t){return function(r){return r.type.match(e)||n({payload:r,instance:S,plugins:u}),t(r)}}};return d(r,he),d(i,ve),function(){h(r,he),h(i,ve)}}var o=t.match(e)?he:ve,a=function(){return function(e){return function(r){return r.type===t&&n({payload:r,instance:S,plugins:u,abort:p}),e(r)}}};return d(a,o),function(){return h(a,o)}},once:function(t,n){if(!t||!yt(n))return!1;if(t===tn.bootstrap)throw new Error(".once disabled for "+t);var e=S.on(t,(function(t){n({payload:t.payload,instance:S,plugins:u,abort:p}),e()}));return e},getState:function(t){var n=D.getState();return t?P(n,t):Object.assign({},n)},dispatch:function(t){var n=gt(t)?{type:t}:t;if(Zt.includes(n.type))throw new Error("reserved action "+n.type);var e=t._||{},r=_t(_t({},n),{},{_:_t({originalAction:n.type},e)});D.dispatch(r)},enablePlugin:O.enable,disablePlugin:O.disable,plugins:O,storage:{getItem:i.getItem,setItem:function(t,n,e){D.dispatch({type:tn.setItemStart,key:t,value:n,options:e})},removeItem:function(t,n){D.dispatch({type:tn.removeItemStart,key:t,options:n})}},setAnonymousId:function(t,n){S.storage.setItem(Gt,t,n)},events:{all:s,core:Zt,plugins:a}},k=r.middlewares.concat([function(){return function(t){return function(n){return n.meta||(n.meta=le()),t(n)}}},v(he),Dn(S,f,{all:s,plugins:a}),Ln(i),on(S),sn(S),v(ve)]),E={context:ie,user:un(i),page:ee,track:Fn,plugins:Rn(f),queue:Jn},A=Vt,I=Vt;if(mt&&t.debug){var x=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;x&&(A=x({trace:!0,traceLimit:25})),I=function(){return 0===arguments.length?ce():Ot(At(arguments[0]))?se():se().apply(null,arguments)}}var T,N=function(t){return Object.keys(t).reduce((function(n,e){return oe.includes(e)||(n[e]=t[e]),n}),{})}(t),_=r.pluginsArray.reduce((function(t,n){var e=n.name,i=n.config,o=n.loaded,u=r.pluginEnabled[e];return t[e]={enabled:u,initialized:!!u&&Boolean(!n.initialize),loaded:Boolean(o()),config:i||{}},t}),{}),C={context:N,user:b,plugins:_},D=Ht(function(t){for(var n=Object.keys(t),e={},r=0;r<n.length;r++){var i=n[r];At(t[i])===Ct&&(e[i]=t[i])}var o,u=Object.keys(e);try{!function(t){Object.keys(t).forEach((function(n){var e=t[n];if(At(e(void 0,{type:$t}))===Dt||At(e(void 0,{type:Ut}))===Dt)throw new Error(Lt+" "+n+" "+Dt)}))}(e)}catch(t){o=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(o)throw o;for(var r=!1,i={},a=0;a<u.length;a++){var c=u[a],s=t[c],f=(0,e[c])(s,n);if(At(f)===Dt){var l=qt(c,n);throw new Error(l)}i[c]=f,r=r||f!==s}return r?i:t}}(_t(_t({},E),n)),C,I(A(Ft.apply(void 0,Et(k)))));D.dispatch=(T=D.dispatch,function(t,n,e){var r=le(t.meta,n,fe(e)),i=_t(_t({},t),{meta:r});return T.apply(null,[i])});var L=Object.keys(u);D.dispatch({type:tn.bootstrap,plugins:L,config:N,params:w,user:b,initialUser:e,persistedUser:m});var z=L.filter((function(t){return r.pluginEnabled[t]})),$=L.filter((function(t){return!r.pluginEnabled[t]}));return D.dispatch({type:tn.registerPlugins,plugins:L,enabled:r.pluginEnabled}),r.pluginsArray.map((function(t,n){var e=t.bootstrap,i=t.config,o=t.name;e&&yt(e)&&e({instance:S,config:i,payload:t}),D.dispatch({type:tn.registerPluginType(o),name:o,enabled:r.pluginEnabled[o],plugin:t}),r.pluginsArray.length===n+1&&D.dispatch({type:tn.initializeStart,plugins:z,disabled:$})})),ae((function(t){D.dispatch({type:t?tn.offline:tn.online})})),function(t,n,e){setInterval((function(){return hn(t,n,e)}),3e3)}(D,f,S),S}var he="before",ve="after",pe="cookie",we=ge(),me=je,be=je;function ye(t){return we?je(t,"",-1):ht(t)}function ge(){if(void 0!==we)return we;var t="cookiecookie";try{je(t,t),we=-1!==document.cookie.indexOf(t),ye(t)}catch(t){we=!1}return we}function je(t,n,e,r,i,o){if("undefined"!=typeof window){var u=arguments.length>1;return!1===we&&(u?dt(t,n):lt(t)),u?document.cookie=t+"="+encodeURIComponent(n)+(e?"; expires="+new Date(+new Date+1e3*e).toUTCString()+(r?"; path="+r:"")+(i?"; domain="+i:"")+(o?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0])}}var Oe="localStorage",Se=wt.bind(null,"localStorage"),ke=vt("localStorage","getItem",lt),Ee=vt("localStorage","setItem",dt),Ae=vt("localStorage","removeItem",ht),Ie="sessionStorage",xe=wt.bind(null,"sessionStorage");vt("sessionStorage","getItem",lt),vt("sessionStorage","setItem",dt),vt("sessionStorage","removeItem",ht);var Te="any",Ne="*";"undefined"==typeof process||process;var _e="undefined"!=typeof window;function Pe(t,n){return typeof n===t}"undefined"!=typeof Deno&&Deno,_e&&"nodejs"===window.name||"undefined"!=typeof navigator&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Pe.bind(null,"function");var Me=Pe.bind(null,"string"),Ce=Pe.bind(null,"undefined");function De(t){var n=t;try{if("true"===(n=JSON.parse(t)))return!0;if("false"===n)return!1;if(function(t){if(!function(t){return t&&("object"==typeof t||null!==t)}(t))return!1;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}(n))return n;parseFloat(n)===n&&(n=parseFloat(n))}catch(t){}if(null!==n&&""!==n)return n}Pe.bind(null,"boolean");var Le=Se(),ze=xe(),$e=ge();function Ue(t,n){if(t){var e=Re(n),r=!Ve(e),i=We(e)?De(localStorage.getItem(t)):void 0;if(r&&!Ce(i))return i;var o=He(e)?De(me(t)):void 0;if(r&&o)return o;var u=qe(e)?De(sessionStorage.getItem(t)):void 0;if(r&&u)return u;var a=lt(t);return r?a:{localStorage:i,sessionStorage:u,cookie:o,global:a}}}function Re(t){return t?Me(t)?t:t.storage:Te}function We(t){return Le&&Fe(t,Oe)}function He(t){return $e&&Fe(t,pe)}function qe(t){return ze&&Fe(t,Ie)}function Ve(t){return t===Ne||"all"===t}function Fe(t,n){return t===Te||t===n||Ve(t)}function Ge(t,n,e){return{location:t,current:n,previous:e}}var Je={setItem:function(t,n,e){if(t&&!Ce(n)){var r={},i=Re(e),o=JSON.stringify(n),u=!Ve(i);return We(i)&&(r[Oe]=Ge(Oe,n,De(localStorage.getItem(t))),localStorage.setItem(t,o),u)?r[Oe]:He(i)&&(r[pe]=Ge(pe,n,De(me(t))),be(t,o),u)?r[pe]:qe(i)&&(r[Ie]=Ge(Ie,n,De(sessionStorage.getItem(t))),sessionStorage.setItem(t,o),u)?r[Ie]:(r[ct]=Ge(ct,n,lt(t)),dt(t,n),u?r[ct]:r)}},getItem:Ue,removeItem:function(t,n){if(t){var e=Re(n),r=Ue(t,Ne),i={};return!Ce(r.localStorage)&&We(e)&&(localStorage.removeItem(t),i[Oe]=r.localStorage),!Ce(r.cookie)&&He(e)&&(ye(t),i[pe]=r.cookie),!Ce(r.sessionStorage)&&qe(e)&&(sessionStorage.removeItem(t),i[Ie]=r.sessionStorage),!Ce(r.global)&&Fe(e,ct)&&(ht(t),i[ct]=r.global),i}}};const Xe=Je;function Ke(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Be(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Ye(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Be(Object(e),!0).forEach((function(n){Ke(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Be(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var Ze={exports:{}};!function(t){var n=c.exports;function e(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}t.exports=function(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t},t.exports.__esModule=!0,t.exports.default=t.exports}(Ze);const Qe=u(Ze.exports);var tr={exports:{}};!function(t){var n=l.exports.default;function e(){t.exports=e=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var r,i={},o=Object.prototype,u=o.hasOwnProperty,a=Object.defineProperty||function(t,n,e){t[n]=e.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function d(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{d({},"")}catch(r){d=function(t,n,e){return t[n]=e}}function h(t,n,e,r){var i=Object.create((n&&n.prototype instanceof g?n:g).prototype),o=new M(r||[]);return a(i,"_invoke",{value:T(t,e,o)}),i}function v(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}i.wrap=h;var p="suspendedStart",w="suspendedYield",m="executing",b="completed",y={};function g(){}function j(){}function O(){}var S={};d(S,s,(function(){return this}));var k=Object.getPrototypeOf,E=k&&k(k(C([])));E&&E!==o&&u.call(E,s)&&(S=E);var A=O.prototype=g.prototype=Object.create(S);function I(t){["next","throw","return"].forEach((function(n){d(t,n,(function(t){return this._invoke(n,t)}))}))}function x(t,e){function r(i,o,a,c){var s=v(t[i],t,o);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==n(l)&&u.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function T(t,n,e){var i=p;return function(o,u){if(i===m)throw Error("Generator is already running");if(i===b){if("throw"===o)throw u;return{value:r,done:!0}}for(e.method=o,e.arg=u;;){var a=e.delegate;if(a){var c=N(a,e);if(c){if(c===y)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(i===p)throw i=b,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);i=m;var s=v(t,n,e);if("normal"===s.type){if(i=e.done?b:w,s.arg===y)continue;return{value:s.arg,done:e.done}}"throw"===s.type&&(i=b,e.method="throw",e.arg=s.arg)}}}function N(t,n){var e=n.method,i=t.iterator[e];if(i===r)return n.delegate=null,"throw"===e&&t.iterator.return&&(n.method="return",n.arg=r,N(t,n),"throw"===n.method)||"return"!==e&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+e+"' method")),y;var o=v(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,y):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function _(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function P(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function C(t){if(t||""===t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(u.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=r,n.done=!0,n};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return j.prototype=O,a(A,"constructor",{value:O,configurable:!0}),a(O,"constructor",{value:j,configurable:!0}),j.displayName=d(O,l,"GeneratorFunction"),i.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===j||"GeneratorFunction"===(n.displayName||n.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,d(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},i.awrap=function(t){return{__await:t}},I(x.prototype),d(x.prototype,f,(function(){return this})),i.AsyncIterator=x,i.async=function(t,n,e,r,o){void 0===o&&(o=Promise);var u=new x(h(t,n,e,r),o);return i.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},I(A),d(A,l,"Generator"),d(A,s,(function(){return this})),d(A,"toString",(function(){return"[object Generator]"})),i.keys=function(t){var n=Object(t),e=[];for(var r in n)e.push(r);return e.reverse(),function t(){for(;e.length;){var r=e.pop();if(r in n)return t.value=r,t.done=!1,t}return t.done=!0,t}},i.values=C,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&u.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function e(e,i){return a.type="throw",a.arg=t,n.next=e,i&&(n.method="next",n.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var c=u.call(o,"catchLoc"),s=u.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=n,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),y},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),y}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;P(e)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:C(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=r),y}},i}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(tr);var nr=tr.exports(),er=nr;try{regeneratorRuntime=nr}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=nr:Function("r","regeneratorRuntime = r")(nr)}var rr=function(){};wt.bind(null,"sessionStorage");var ir=vt("sessionStorage","getItem",lt),or=vt("sessionStorage","setItem",dt);vt("sessionStorage","removeItem",ht);var ur="__session",ar=["id","createdAt","created"];function cr(t){var n=t?new Date(t):new Date;return[n.toISOString(),n.getTime()]}function sr(){var t=cr(),n=t[0],e=t[1];return{id:J(),created:e,createdAt:n}}var fr={session:[ir,or],page:[lt,dt]};function lr(t,n){for(var e=fr[t],r=e[0],i=e[1],o=sr(),u=!1,a={},c=0;c<ar.length;c++){var s=ar[c],f="__"+t+"__session__"+s,l=r(f);u=n||!l,(n||!n&&!l)&&i(f,o[s]);var d=l&&!n?l:o[s],h="created"!==s?d:Number(d);a[s]=h}return dr(a,u)}function dr(t,n){var e=Date.now();return t.elapsed=e-t.created,t.expires&&(t.remaining=Math.max(t.expires-e,0),t.isExpired=0===t.remaining),t.isNew=n,t}function hr(t,n){void 0===t&&(t=30);var e=me(ur),r=e?JSON.parse(e):vr(t);return n?r:dr(r,!e)}function vr(t,n,e){void 0===t&&(t=30);var r=e?hr(t,!0):sr(),i=60*t,o=r.created;if(e){var u=cr(),a=u[0],c=u[1];r.modified=c,r.modifiedAt=a,o=c}var s=cr(o+1e3*i),f=s[0];return r.expires=s[1],r.expiresAt=f,r.duration=1e3*i,n&&(r=Object.assign(r,n)),be(ur,JSON.stringify(r),i),dr(r,!e)}var pr=lr.bind(null,"session"),wr=lr.bind(null,"session",!0),mr=lr.bind(null,"page"),br=lr.bind(null,"page",!0),yr="undefined"!=typeof window;function gr(t){return"boolean"==typeof t}var jr=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var n=Object.prototype.toString.call(t);return"[object RegExp]"===n||"[object Date]"===n||function(t){return t.$$typeof===Or}(t)}(t)},Or="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Sr(t,n){return!1!==n.clone&&n.isMergeableObject(t)?Ir(Array.isArray(t)?[]:{},t,n):t}function kr(t,n,e){return t.concat(n).map((function(t){return Sr(t,e)}))}function Er(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]}(t))}function Ar(t,n){try{return n in t}catch(t){return!1}}function Ir(t,n,e){(e=e||{}).arrayMerge=e.arrayMerge||kr,e.isMergeableObject=e.isMergeableObject||jr,e.cloneUnlessOtherwiseSpecified=Sr;var r=Array.isArray(n);return r===Array.isArray(t)?r?e.arrayMerge(t,n,e):function(t,n,e){var r={};return e.isMergeableObject(t)&&Er(t).forEach((function(n){r[n]=Sr(t[n],e)})),Er(n).forEach((function(i){(function(t,n){return Ar(t,n)&&!(Object.hasOwnProperty.call(t,n)&&Object.propertyIsEnumerable.call(t,n))})(t,i)||(r[i]=Ar(t,i)&&e.isMergeableObject(n[i])?function(t,n){if(!n.customMerge)return Ir;var e=n.customMerge(t);return"function"==typeof e?e:Ir}(i,e)(t[i],n[i],e):Sr(n[i],e))})),r}(t,n,e):Sr(n,e)}Ir.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,e){return Ir(t,e,n)}),{})};var xr=Ir,Tr={exports:{}};!function(t){
6
+ import{r as t,c as n,g as e,h as r,H as i}from"./p-e996c38f.js";import{g as o}from"./p-4b2ec507.js";import{g as u,c as a}from"./p-d4056c1c.js";import{d as c,_ as s,a as f}from"./p-62a0aa8e.js";import{_ as l,t as d}from"./p-af7e43e0.js";import{r as h,_ as v,g as p,u as w}from"./p-0668e30d.js";import"./p-6a68306c.js";const m={storage:{},memory:!0,get(t){let n;try{n=window.localStorage&&window.localStorage.getItem(t)||this.storage[t]}catch(e){n=this.storage[t]}if(n)try{return JSON.parse(n)}catch(t){return}},set(t,n){const e=JSON.stringify(n);try{window.localStorage.setItem(t,e)}catch(e){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[t]=n}},delete(t){try{window.localStorage.removeItem(t)}catch(n){this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[t]}}},b="esri-telemetry";class y extends Error{}const g=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"];class j{constructor(t){var n,e,r;this.trackers=[],this.options=t,this.debug=t.debug,this.suppressDisabledWarnings=t.suppressDisabledWarnings,this.disabled=function(t={}){const{disabled:n,portal:e}=t;return!(!n&&!1!==(null==e?void 0:e.eueiEnabled)&&(!e||function(t){return t.eueiEnabled&&t.user&&t.user.orgId===t.id}(e)||function(t){return t.user&&!t.user.orgId&&"US"===t.ipCntryCode}(e)||function(t){return!t.user&&"US"===t.ipCntryCode}(e)))}(t),this.logger=t.logger||console,this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");const i=(null===(n=t.portal)||void 0===n?void 0:n.user)||t.user;i&&this.setUser(i,null===(r=null===(e=t.portal)||void 0===e?void 0:e.subscriptionInfo)||void 0===r?void 0:r.type),this.disabled||this.initializeTrackers()}initializeTrackers(){this.options.plugins&&this.trackers.push(...this.options.plugins),this.trackers.length||this.logger.error(new Error("No trackers configured"))}getScriptTags(){return this.trackers.map((t=>t.getScriptTags&&t.getScriptTags())).join("")}async init(){const t=this.trackers.map((t=>t.init()));await Promise.all(t)}setUser(t={},n="Public"){let e;if(this.user=t="string"==typeof t?{username:t}:t,this.user.accountType=n,t.email&&t.email.split){const n=t.email.split("@")[1];e=g.filter((t=>n===t)).length>0}(e||["In House","Demo and Marketing"].indexOf(n)>-1)&&(this.user.internalUser=!0)}logPageView(t,n={},e={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;const r=this.trackers.filter((({disabled:t,hasError:n})=>!t&&!n));if(!r.length)return this.logger.warn("Page view was not logged because no enabled telemetry-plugins are registered."),!1;const i=this.preProcess(n,e);this.debug&&this.logger.info("Tracking page view",JSON.stringify(i));const o=r.map((n=>n.logPageView(t,i)));return Promise.all(o).then(),!0}logEvent(t,n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;const e=this.trackers.filter((({disabled:t,hasError:n})=>!t&&!n));if(!e.length)return this.logger.warn("Event was not logged because no enabled telemetry-plugins are registered."),!1;const r=this.preProcess(t,n);this.debug&&this.logger.info("Tracking event",JSON.stringify(r));const i=e.map((t=>t.logEvent(r)));return Promise.all(i).then(),!0}logError(t={}){t=Object.assign({eventType:"error"},t),this.logEvent(t)}startWorkflow(t,n={}){const e={name:t,start:Date.now(),steps:[],workflowId:Math.floor(17592186044416*(1+Math.random())).toString(16)};this.saveWorkflow(e);const r=Object.assign({name:t,step:"start"},n);return this.logWorkflow(r),e}stepWorkflow(t,n,e={}){const r=Object.assign({name:t,step:n,details:"string"==typeof e?e:e.details},e);this.logWorkflow(r)}endWorkflow(t,n={}){const e=Object.assign({name:t,step:"finish"},n);this.logWorkflow(e)}cancelWorkflow(t,n={}){const e=Object.assign({name:t,step:"cancel"},n);this.logWorkflow(e)}getWorkflow(t){const n=m.get(`TELEMETRY-WORKFLOW:${t}`);if(n){if(Date.now()-n.start<18e5)return n;this.deleteWorkflow(n)}}saveWorkflow(t){m.set(`TELEMETRY-WORKFLOW:${t.name}`,t)}deleteWorkflow(t){m.delete(`TELEMETRY-WORKFLOW:${t.name}`)}logWorkflow(t={}){t=this.preProcess(t);let n=this.getWorkflow(t.name);n||(this.startWorkflow(t.name),n=this.getWorkflow(t.name)),n.steps.push(t.step),n.duration=(Date.now()-n.start)/1e3,["cancel","finish"].indexOf(t.step)>-1?this.deleteWorkflow(n):this.saveWorkflow(n);const e=Object.assign(t,{eventType:"workflow",category:t.name,action:t.step,label:t.details,duration:n.duration,workflowId:n.workflowId});this.logEvent(e)}preProcess(t={},n={}){let e={};return this.user&&(e={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},t),e)).reduce((r=n.omitComplexData,i=this.logger,function(t,[n,e]){return function(t){return["string","number","boolean","undefined"].includes(typeof t)||t&&"string"==typeof t.valueOf()}(e)?t[n]=e:r||(i.warn(`You are trying to log a non-primitive value, ${n}:${JSON.stringify(e)}. This will get logged as [object Object]`),t[n]=e),t}),{});var r,i}disableTracker(t){var n;const e=this.trackers.find((({name:n})=>n===t));e&&!e.hasError&&(e.disabled=!0,null===(n=e.disable)||void 0===n||n.call(e))}enableTracker(t){var n;const e=this.trackers.find((({name:n})=>n===t));e&&!e.hasError&&(e.disabled=!1,null===(n=e.enable)||void 0===n||n.call(e))}}function O(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e}"function"==typeof SuppressedError&&SuppressedError;class S{constructor(t){var n;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},"undefined"!=typeof window&&!(null===(n=null==t?void 0:t.measurementIds)||void 0===n?void 0:n.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,t)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return this._getScripts().map((t=>{const n=[];return["src","id","dataAttribute","type"].forEach((e=>{let r=e;"dataAttribute"===e&&(r="data-esri-telemetry"),t[e]&&n.push(`${r}="${t[e]}"`)})),["async","defer"].forEach((e=>{t[e]&&n.push(`${e}`)})),`<script ${n.join(" ")}>${t.body?t.body:""}<\/script>`})).join("")}async init(){if("undefined"==typeof window)throw new y("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map((t=>{return n=t,new Promise(((t,e)=>{n.onload=t,n.onerror=e;const r=function(t){const{body:n,src:e,id:r,dataAttribute:i,section:o="body",type:u="text/javascript",async:a=!1,defer:c=!1,onload:s,onerror:f}=t;if("undefined"==typeof window)throw new y("Window is undefined: Cannot add script element.");if(function(t){const{id:n,dataAttribute:e}=t;return!!document.getElementById(n)||!!document.querySelector(`[data-${b}="${e}"]`)}(t))return void console.log(`script (${r||i}) is already present, skipping`);const l=function({id:t,dataAttribute:n,type:e,async:r,defer:i,body:o,src:u,onload:a,onerror:c}){const s=document.createElement("script");return t&&(s.id=t),n&&s.setAttribute(`data-${b}`,n),u&&(s.src=u),o&&(s.innerText=o),s.type=e,s.async=r,s.defer=i,a&&(s.onload=a),c&&(s.onerror=c),s}({id:r,dataAttribute:i,type:u,async:a,defer:c,body:n,src:e,onload:s,onerror:f});return"body"===o?document.body.appendChild(l):document.head.appendChild(l)}(n);r&&!n.body||t()}));var n}))),this.injectConfig()}logPageView(t,n={}){const e=this.buildCustomParams(n),r=Object.assign({page_title:t||window.location.pathname},e);return window.gtag("event","page_view",r),!0}logEvent(t){let{action:n}=t,e=O(t,["action"]);const r=n||"other",i=this.buildCustomParams(e);return window.gtag("event",r,i),!0}disable(){this.measurementIds&&this.measurementIds.forEach((t=>{window[`ga-disable-${t}`]=!0}))}enable(){this.measurementIds&&this.measurementIds.forEach((t=>{window[`ga-disable-${t}`]=void 0}))}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const t={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach((n=>{window.gtag("config",n,t)}))}buildCustomParams(t){let n,{category:e,label:r}=t;return n=this.verifyCustomDimensionAndMetrics(t),e&&(n=Object.assign(Object.assign({},n),{event_category:e})),r&&(n=Object.assign(Object.assign({},n),{event_label:r})),n}verifyCustomDimensionAndMetrics(t){const n=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),e=Object.values(n);return Object.keys(t).filter((t=>e.includes(t))).reduce(((n,e)=>Object.assign(n,{[e]:t[e]})),{})}createDimensionsAndMetricsCustomMap(t={},n={}){const e=this.createMetricCustomMap(n),r=this.createDimensionCustomMap(t);return Object.assign(Object.assign({},e),r)}createMetricCustomMap(t={}){return Object.keys(t).map((function(n){return{key:`metric${t[n]}`,value:n}})).filter((t=>t)).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}createDimensionCustomMap(t={}){return Object.keys(t).map((function(n){return{key:`dimension${t[n]}`,value:n}})).filter((t=>t)).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}}const k="TELEMETRY_COGNITO_CREDENTIALS";function E({telemetryData:t,dimensionLookup:n={},excludeKeys:e=[]}){return Object.keys(t).filter((t=>!e.includes(t))).map((e=>n[e]?{key:I(n,e),value:t[e]}:{key:e,value:A(t,e)})).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}function A(t,n){return"json"===n?t[n]?JSON.stringify(t[n]):"null":void 0===t[n]?"null":t[n].toString()}function I(t,n){return`dimension${t[n]}`}const x=["size","duration","position","number","count"];function T(t,n={}){return Object.keys(t).filter((t=>n[t]||x.includes(t))).map((e=>n[e]?{key:N(n,e),value:t[e]}:{key:e,value:t[e]})).reduce(((t,{key:n,value:e})=>(t[n]=e,t)),{})}function N(t,n){return`metric${t[n]}`}var _={exports:function(t,n,e,r,i){for(n=n.split?n.split("."):n,r=0;r<n.length;r++)t=t?t[n[r]]:i;return t===i?e:t}};const P=_.exports;"undefined"==typeof process||process;var M="undefined"!=typeof document;function C(t,n){return n.charAt(0)[t]()+n.slice(1)}"undefined"!=typeof Deno&&Deno,M&&"nodejs"===window.name||"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var D=C.bind(null,"toUpperCase"),L=C.bind(null,"toLowerCase");function z(t,n){void 0===n&&(n=!0);var e=function(t){return W(t)?D("null"):"object"==typeof t?function(t){return U(t.constructor)?t.constructor.name:null}(t):Object.prototype.toString.call(t).slice(8,-1)}(t);return n?L(e):e}function $(t,n){return typeof n===t}var U=$.bind(null,"function"),R=$.bind(null,"string");function W(t){return null===t}function H(t,n){if("object"!=typeof n||W(n))return!1;if(n instanceof t)return!0;var e=z(new t(""));if(function(t){return t instanceof Error||R(t.message)&&t.constructor&&function(t){return"number"===z(t)&&!isNaN(t)}(t.constructor.stackTraceLimit)}(n))for(;n;){if(z(n)===e)return!0;n=Object.getPrototypeOf(n)}return!1}function q(t,n){var e=t instanceof Element||t instanceof HTMLDocument;return e&&n?function(t,n){return void 0===n&&(n=""),t&&t.nodeName===n.toUpperCase()}(t,n):e}function V(t){var n=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(n))}}function F(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function G(t,n,e){for(var r=n.length-1,i=0;i<r;++i){var o=n[i];if("__proto__"===o||"constructor"===o)break;o in t||(t[o]={}),t=t[o]}t[n[r]]=e}function J(){for(var t="",n=0,e=4294967295*Math.random()|0;n++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[n-1],i=15&e;t+="-"==r||"4"==r?r:("x"==r?i:3&i|8).toString(16),e=n%8==0?4294967295*Math.random()|0:e>>4}return t}$.bind(null,"undefined"),$.bind(null,"boolean"),$.bind(null,"symbol"),H.bind(null,TypeError),H.bind(null,SyntaxError),V(q,"form"),V(q,"button"),V(q,"input"),V(q,"select");var X="undefined",K="object";"undefined"==typeof process||process;var B="undefined"!=typeof document;function Y(t,n){return n.charAt(0)[t]()+n.slice(1)}"undefined"!=typeof Deno&&Deno,B&&"nodejs"===window.name||"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var Z=Y.bind(null,"toUpperCase"),Q=Y.bind(null,"toLowerCase");function tt(t,n){void 0===n&&(n=!0);var e=function(t){return it(t)?Z("null"):"object"==typeof t?function(t){return et(t.constructor)?t.constructor.name:null}(t):Object.prototype.toString.call(t).slice(8,-1)}(t);return n?Q(e):e}function nt(t,n){return typeof n===t}var et=nt.bind(null,"function"),rt=nt.bind(null,"string");function it(t){return null===t}function ot(t,n){if("object"!=typeof n||it(n))return!1;if(n instanceof t)return!0;var e=tt(new t(""));if(function(t){return t instanceof Error||rt(t.message)&&t.constructor&&function(t){return"number"===tt(t)&&!isNaN(t)}(t.constructor.stackTraceLimit)}(n))for(;n;){if(tt(n)===e)return!0;n=Object.getPrototypeOf(n)}return!1}function ut(t,n){var e=t instanceof Element||t instanceof HTMLDocument;return e&&n?function(t,n){return void 0===n&&(n=""),t&&t.nodeName===n.toUpperCase()}(t,n):e}function at(t){var n=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(n))}}nt.bind(null,"undefined"),nt.bind(null,"boolean"),nt.bind(null,"symbol"),ot.bind(null,TypeError),ot.bind(null,SyntaxError),at(ut,"form"),at(ut,"button"),at(ut,"input"),at(ut,"select");var ct="global",st="__global__",ft=typeof self===K&&self.self===self&&self||typeof global===K&&global.global===global&&global||void 0;function lt(t){return ft[st][t]}function dt(t,n){return ft[st][t]=n}function ht(t){delete ft[st][t]}function vt(t,n,e){var r;try{if(wt(t)){var i=window[t];r=i[n].bind(i)}}catch(t){}return r||e}ft[st]||(ft[st]={});var pt={};function wt(t){if(typeof pt[t]!==X)return pt[t];try{var n=window[t];n.setItem(X,X),n.removeItem(X)}catch(n){return pt[t]=!1}return pt[t]=!0}"undefined"==typeof process||process;var mt="undefined"!=typeof window;function bt(t,n){return typeof n===t}"undefined"!=typeof Deno&&Deno,mt&&"nodejs"===window.name||"undefined"!=typeof navigator&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var yt=bt.bind(null,"function"),gt=bt.bind(null,"string");bt.bind(null,"undefined");var jt=bt.bind(null,"boolean");function Ot(t){if(!function(t){return t&&("object"==typeof t||null!==t)}(t))return!1;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}function St(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function kt(t,n){if(t){if("string"==typeof t)return St(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?St(t,n):void 0}}function Et(t){return function(t){if(Array.isArray(t))return St(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||kt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function It(t,n,e,r,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void e(t)}a.done?n(c):Promise.resolve(c).then(r,i)}function xt(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function u(t){It(o,r,i,u,a,"next",t)}function a(t){It(o,r,i,u,a,"throw",t)}u(void 0)}))}}function Tt(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Nt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function _t(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Nt(Object(e),!0).forEach((function(n){Tt(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Nt(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var Pt={};!function(){var t=function(t){var n,e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function s(t,n,e,r){var i=Object.create((n&&n.prototype instanceof w?n:w).prototype),o=new x(r||[]);return i._invoke=function(t,n,e){var r=l;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===v){if("throw"===i)throw o;return N()}for(e.method=i,e.arg=o;;){var u=e.delegate;if(u){var a=E(u,e);if(a){if(a===p)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===l)throw r=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var c=f(t,n,e);if("normal"===c.type){if(r=e.done?v:d,c.arg===p)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=v,e.method="throw",e.arg=c.arg)}}}(t,e,o),i}function f(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",d="suspendedYield",h="executing",v="completed",p={};function w(){}function m(){}function b(){}var y={};c(y,o,(function(){return this}));var g=Object.getPrototypeOf,j=g&&g(g(T([])));j&&j!==e&&r.call(j,o)&&(y=j);var O=b.prototype=w.prototype=Object.create(y);function S(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function k(t,n){function e(i,o,u,a){var c=f(t[i],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?n.resolve(l.__await).then((function(t){e("next",t,u,a)}),(function(t){e("throw",t,u,a)})):n.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return e("throw",t,u,a)}))}a(c.arg)}var i;this._invoke=function(t,r){function o(){return new n((function(n,i){e(t,r,n,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=f(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function A(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function I(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,u=function e(){for(;++i<t.length;)if(r.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=n,e.done=!0,e};return u.next=u}}return{next:N}}function N(){return{value:n,done:!0}}return m.prototype=b,c(O,"constructor",b),c(b,"constructor",m),m.displayName=c(b,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===m||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,a,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},S(k.prototype),c(k.prototype,u,(function(){return this})),t.AsyncIterator=k,t.async=function(n,e,r,i,o){void 0===o&&(o=Promise);var u=new k(s(n,e,r,i),o);return t.isGeneratorFunction(e)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},S(O),c(O,a,"Generator"),c(O,o,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(r,i){return a.type="throw",a.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),s=r.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),p},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),I(e),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;I(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),p}},t}(Pt);try{regeneratorRuntime=t}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}();var Mt=Pt,Ct="function",Dt="undefined",Lt="reducer",zt="@@redux/",$t=zt+"INIT",Ut=zt+Math.random().toString(36),Rt=function(){return("undefined"==typeof Symbol?"undefined":At(Symbol))===Ct&&Symbol.observable||"@@observable"}(),Wt=" != "+Ct;function Ht(t,n,e){if(At(n)===Ct&&At(e)===Dt&&(e=n,n=void 0),At(e)!==Dt){if(At(e)!==Ct)throw new Error("enhancer"+Wt);return e(Ht)(t,n)}if(At(t)!==Ct)throw new Error(Lt+Wt);var r=t,i=n,o=[],u=o,a=!1;function c(){u===o&&(u=o.slice())}function s(){return i}function f(t){if(At(t)!==Ct)throw new Error("Listener"+Wt);var n=!0;return c(),u.push(t),function(){if(n){n=!1,c();var e=u.indexOf(t);u.splice(e,1)}}}function l(t){if(!Ot(t))throw new Error("Act != obj");if(At(t.type)===Dt)throw new Error("ActType "+Dt);if(a)throw new Error("Dispatch in "+Lt);try{a=!0,i=r(i,t)}finally{a=!1}for(var n=o=u,e=0;e<n.length;e++)(0,n[e])();return t}return l({type:$t}),Tt({dispatch:l,subscribe:f,getState:s,replaceReducer:function(t){if(At(t)!==Ct)throw new Error("next "+Lt+Wt);r=t,l({type:$t})}},Rt,(function(){var t=f;return Tt({subscribe:function(n){if("object"!==At(n))throw new TypeError("Observer != obj");function e(){n.next&&n.next(s())}return e(),{unsubscribe:t(e)}}},Rt,(function(){return this}))}))}function qt(t,n){var e=n&&n.type;return"action "+(e&&e.toString()||"?")+Lt+" "+t+" returns "+Dt}function Vt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return 0===n.length?function(t){return t}:1===n.length?n[0]:n.reduce((function(t,n){return function(){return t(n.apply(void 0,arguments))}}))}function Ft(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return function(t){return function(e,r,i){var o,u=t(e,r,i),a=u.dispatch,c={getState:u.getState,dispatch:function(t){return a(t)}};return o=n.map((function(t){return t(c)})),a=Vt.apply(void 0,Et(o))(u.dispatch),_t(_t({},u),{},{dispatch:a})}}}var Gt="__anon_id",Jt="__user_id",Xt="__user_traits",Kt="analytics",Bt="userId",Yt="anonymousId",Zt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Qt=["name","EVENTS","config","loaded"],tn=Zt.reduce((function(t,n){return t[n]=n,t}),{registerPluginType:function(t){return"registerPlugin:".concat(t)},pluginReadyType:function(t){return"ready:".concat(t)}}),nn=/^utm_/,en=/^an_prop_/,rn=/^an_trait_/;function on(t){var n=t.storage.setItem;return function(e){return function(r){return function(i){if(i.type===tn.bootstrap){var o=i.params,u=i.user,a=i.persistedUser,c=i.initialUser,s=a.userId===u.userId;a.anonymousId!==u.anonymousId&&n(Gt,u.anonymousId),s||n(Jt,u.userId),c.traits&&n(Xt,_t(_t({},s&&a.traits?a.traits:{}),c.traits));var f=Object.keys(i.params);if(f.length){var l=o.an_uid,d=o.an_event,h=f.reduce((function(t,n){if(n.match(nn)||n.match(/^(d|g)clid/)){var e=n.replace(nn,"");t.campaign["campaign"===e?"name":e]=o[n]}return n.match(en)&&(t.props[n.replace(en,"")]=o[n]),n.match(rn)&&(t.traits[n.replace(rn,"")]=o[n]),t}),{campaign:{},props:{},traits:{}});e.dispatch(_t(_t({type:tn.params,raw:o},h),l?{userId:l}:{})),l&&setTimeout((function(){return t.identify(l,h.traits)}),0),d&&setTimeout((function(){return t.track(d,h.props)}),0),Object.keys(h.campaign).length&&e.dispatch({type:tn.campaign,campaign:h.campaign})}}return r(i)}}}}function un(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.type===tn.setItemEnd){if(e.key===Gt)return _t(_t({},n),{anonymousId:e.value});if(e.key===Jt)return _t(_t({},n),{userId:e.value})}switch(e.type){case tn.identify:return Object.assign({},n,{userId:e.userId,traits:_t(_t({},n.traits),e.traits)});case tn.reset:return[Jt,Gt,Xt].forEach((function(n){t.removeItem(n)})),Object.assign({},n,{userId:null,anonymousId:null,traits:{}});default:return n}}}function an(t){return{userId:t.getItem(Jt),anonymousId:t.getItem(Gt),traits:t.getItem(Xt)}}var cn=function(t){return"__TEMP__"+t};function sn(t){var n=t.storage,e=n.setItem,r=n.removeItem,i=n.getItem;return function(t){return function(n){return function(o){var u=o.userId,a=o.traits,c=o.options;if(o.type===tn.reset&&([Jt,Xt,Gt].forEach((function(t){r(t)})),[Bt,Yt,"traits"].forEach((function(t){ht(cn(t))}))),o.type===tn.identify){i(Gt)||e(Gt,J());var s=i(Jt),f=i(Xt)||{};s&&s!==u&&t.dispatch({type:tn.userIdChanged,old:{userId:s,traits:f},new:{userId:u,traits:a},options:c}),u&&e(Jt,u),a&&e(Xt,_t(_t({},f),a))}return n(o)}}}}var fn={};function ln(t,n){fn[t]&&yt(fn[t])&&(fn[t](n),delete fn[t])}function dn(t,n,e){return new Promise((function(r,i){return n()?r(t):e<1?i(_t(_t({},t),{},{queue:!0})):new Promise((function(t){return setTimeout(t,10)})).then((function(){return dn(t,n,e-10).then(r,i)}))}))}function hn(t,n,e){var r=n(),i=t.getState(),o=i.plugins,u=i.queue,a=i.user;if(!i.context.offline&&u&&u.actions&&u.actions.length){var c=u.actions.reduce((function(t,n,e){return o[n.plugin].loaded?(t.process.push(n),t.processIndex.push(e)):(t.requeue.push(n),t.requeueIndex.push(e)),t}),{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(c.processIndex&&c.processIndex.length){c.processIndex.forEach((function(n){var i=u.actions[n],c=i.plugin,s=i.payload.type,f=r[c][s];if(f&&yt(f)){var l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[Bt,Yt].reduce((function(e,r){return t.hasOwnProperty(r)&&n[r]&&n[r]!==t[r]&&(e[r]=n[r]),e}),t)}(i.payload,a);f({payload:l,config:o[c].config,instance:e});var d="".concat(s,":").concat(c);t.dispatch(_t(_t({},l),{},{type:d,_:{called:d,from:"queueDrain"}}))}}));var s=u.actions.filter((function(t,n){return!~c.processIndex.indexOf(n)}));u.actions=s}}}function vn(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(t).filter((function(t){var r=e.plugins||{};return jt(r[t])?r[t]:!1!==r.all&&(!n[t]||!1!==n[t].enabled)})).map((function(n){return t[n]}))}var pn=/Start$/,wn=/^bootstrap/,mn=/^ready/;function bn(t,n,e,r,i){return yn.apply(this,arguments)}function yn(){return yn=xt(Mt.mark((function t(n,e,r,i,o){var u,a,c,s,f,l,d,h,v,p,w;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=yt(e)?e():e,c=(a=n.type).replace(pn,""),!n._||!n._.called){t.next=5;break}return t.abrupt("return",n);case 5:return s=r.getState(),f=vn(u,s.plugins,n.options),a===tn.initializeStart&&n.fromEnable&&(f=Object.keys(s.plugins).filter((function(t){var e=s.plugins[t];return n.plugins.includes(t)&&!e.initialized})).map((function(t){return u[t]}))),l=f.map((function(t){return t.name})),d=An(a,f),t.next=12,gn({action:n,data:{exact:d.before,namespaced:d.beforeNS},state:s,allPlugins:u,allMatches:d,instance:r,store:i,EVENTS:o});case 12:if(!xn(h=t.sent,l.length)){t.next=15;break}return t.abrupt("return",h);case 15:if(a!==c){t.next=19;break}v=h,t.next=22;break;case 19:return t.next=21,gn({action:_t(_t({},h),{},{type:c}),data:{exact:d.during,namespaced:d.duringNS},state:s,allPlugins:u,allMatches:d,instance:r,store:i,EVENTS:o});case 21:v=t.sent;case 22:if(!a.match(pn)){t.next=28;break}return p="".concat(c,"End"),t.next=26,gn({action:_t(_t({},v),{},{type:p}),data:{exact:d.after,namespaced:d.afterNS},state:s,allPlugins:u,allMatches:d,instance:r,store:i,EVENTS:o});case 26:(w=t.sent).meta&&w.meta.hasCallback&&ln(w.meta.rid,{payload:w});case 28:return t.abrupt("return",h);case 29:case"end":return t.stop()}}),t)}))),yn.apply(this,arguments)}function gn(t){return jn.apply(this,arguments)}function jn(){return jn=xt(Mt.mark((function t(n){var e,r,i,o,u,a,c,s,f,l,d,h,v,p,w,m,b,y;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.data,i=n.instance,u=n.allPlugins,a=n.allMatches,c=n.store,s=n.EVENTS,f=(o=n.state).plugins,l=o.context,h=(d=(r=n.action).type).match(pn),v=e.exact.map((function(t){return t.pluginName})),h&&(v=a.during.map((function(t){return t.pluginName}))),p=_n(i,v),w=e.exact.reduce((function(t,n){var e=n.pluginName,r=n.methodName,i=!1;return r.match(/^initialize/)||r.match(/^reset/)||(i=!f[e].loaded),l.offline&&r.match(/^(page|track|identify)/)&&(i=!0),t["".concat(e)]=i,t}),{}),t.next=10,e.exact.reduce(function(){var t=xt(Mt.mark((function t(n,o){var a,c;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o.pluginName,t.next=3,n;case 3:if(c=t.sent,!e.namespaced||!e.namespaced[a]){t.next=11;break}return t.next=7,e.namespaced[a].reduce(function(){var t=xt(Mt.mark((function t(n,e){var r,o,c,s;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(t,n,e){return function(r,i){var o=e||n;return _t(_t({},t),{},{abort:{reason:r,plugins:i||[n],caller:d,from:o}})}},t.next=3,n;case 3:if(r=t.sent,e.method&&yt(e.method)){t.next=6;break}return t.abrupt("return",r);case 6:return Pn(e.methodName,e.pluginName),t.next=9,e.method({payload:r,instance:i,abort:o(r,a,e.pluginName),config:Sn(e.pluginName,f,u),plugins:f});case 9:return s=Ot(c=t.sent)?c:{},t.abrupt("return",Promise.resolve(_t(_t({},r),s)));case 12:case"end":return t.stop()}}),t)})));return function(n,e,r){return t.apply(this,arguments)}}(),Promise.resolve(r));case 7:c[a]=t.sent,t.next=12;break;case 11:c[a]=r;case 12:return t.abrupt("return",Promise.resolve(c));case 13:case"end":return t.stop()}}),t)})));return function(n,e,r){return t.apply(this,arguments)}}(),Promise.resolve({}));case 10:return m=t.sent,t.next=13,e.exact.reduce(function(){var t=xt(Mt.mark((function t(n,r,o){var a,s,l,v,b,y,g,j,O,S,k;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.exact.length===o+1,l=u[s=r.pluginName],t.next=5,n;case 5:if(v=t.sent,b=m[s]?m[s]:{},h&&(b=v),!In(b,s)){t.next=11;break}return On({data:b,method:d,instance:i,pluginName:s,store:c}),t.abrupt("return",Promise.resolve(v));case 11:if(!In(v,s)){t.next=14;break}return a&&On({data:v,method:d,instance:i,store:c}),t.abrupt("return",Promise.resolve(v));case 14:if(!w.hasOwnProperty(s)||!0!==w[s]){t.next=17;break}return c.dispatch({type:"queue",plugin:s,payload:b,_:{called:"queue",from:"queueMechanism"}}),t.abrupt("return",Promise.resolve(v));case 17:return y=p(m[s],u[s]),t.next=20,l[d]({abort:y.abort,payload:b,instance:i,config:Sn(s,f,u),plugins:f});case 20:return j=Ot(g=t.sent)?g:{},O=_t(_t({},v),j),In(S=m[s],s)?On({data:S,method:d,instance:i,pluginName:s,store:c}):((k="".concat(d,":").concat(s)).match(/:/g)||[]).length<2&&!d.match(wn)&&!d.match(mn)&&i.dispatch(_t(_t({},h?O:b),{},{type:k,_:{called:k,from:"submethod"}})),t.abrupt("return",Promise.resolve(O));case 26:case"end":return t.stop()}}),t)})));return function(n,e,r){return t.apply(this,arguments)}}(),Promise.resolve(r));case 13:if(b=t.sent,d.match(pn)||d.match(/^registerPlugin/)||d.match(mn)||d.match(wn)||d.match(/^params/)||d.match(/^userIdChanged/)){t.next=21;break}if(s.plugins.includes(d),!b._||b._.originalAction!==d){t.next=18;break}return t.abrupt("return",b);case 18:y=_t(_t({},b),{_:{originalAction:b.type,called:b.type,from:"engineEnd"}}),xn(b,e.exact.length)&&!d.match(/End$/)&&(y=_t(_t({},y),{type:b.type+"Aborted"})),c.dispatch(y);case 21:return t.abrupt("return",b);case 22:case"end":return t.stop()}}),t)}))),jn.apply(this,arguments)}function On(t){var n=t.pluginName,e=t.method+"Aborted"+(n?":"+n:"");t.store.dispatch(_t(_t({},t.data),{},{type:e,_:{called:e,from:"abort"}}))}function Sn(t,n,e){var r=n[t]||e[t];return r&&r.config?r.config:{}}function kn(t,n){return n.reduce((function(n,e){return e[t]?n.concat({methodName:t,pluginName:e.name,method:e[t]}):n}),[])}function En(t,n){var e=t.replace(pn,""),r=n?":".concat(n):"";return["".concat(t).concat(r),"".concat(e).concat(r),"".concat(e,"End").concat(r)]}function An(t,n){var e=En(t).map((function(t){return kn(t,n)}));return n.reduce((function(e,r){var i=r.name,o=function(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,i,o=[],u=!0,a=!1;try{for(e=e.call(t);!(u=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);u=!0);}catch(t){a=!0,i=t}finally{try{u||null==e.return||e.return()}finally{if(a)throw i}}return o}}(t,n)||kt(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(En(t,i).map((function(t){return kn(t,n)})),3),u=o[0],a=o[1],c=o[2];return u.length&&(e.beforeNS[i]=u),a.length&&(e.duringNS[i]=a),c.length&&(e.afterNS[i]=c),e}),{before:e[0],beforeNS:{},during:e[1],duringNS:{},after:e[2],afterNS:{}})}function In(t,n){var e=t.abort;return!!e&&(!0===e||Nn(e,n)||e&&Nn(e.plugins,n))}function xn(t,n){var e=t.abort;if(!e)return!1;if(!0===e||gt(e))return!0;var r=e.plugins;return Tn(e)&&e.length===n||Tn(r)&&r.length===n}function Tn(t){return Array.isArray(t)}function Nn(t,n){return!(!t||!Tn(t))&&t.includes(n)}function _n(t,n){return function(e,r,i){var o=r.config,u=r.name,a="".concat(u,".").concat(e.type);i&&(a=i.event);var c=e.type.match(pn)?function(t,n,e,r,i){return function(o,u){var a=r?r.name:t,c=u&&Tn(u)?u:e;if(r&&(!(c=u&&Tn(u)?u:[t]).includes(t)||1!==c.length))throw new Error("Method ".concat(n," can only abort ").concat(t," plugin. ").concat(JSON.stringify(c)," input valid"));return _t(_t({},i),{},{abort:{reason:o,plugins:c,caller:n,_:a}})}}(u,a,n,i,e):function(t,n){return function(){throw new Error(t.type+" action not cancellable. Remove abort in "+n)}}(e,a);return{payload:Cn(e),instance:t,config:o||{},abort:c}}}function Pn(t,n){var e=Mn(t);if(e&&e.name===n){var r=Mn(e.method),i=r?"or "+r.method:"";throw new Error([n+" plugin is calling method "+t,"Plugins cant call self","Use ".concat(e.method," ").concat(i," in ").concat(n," plugin insteadof ").concat(t)].join("\n"))}}function Mn(t){var n=t.match(/(.*):(.*)/);return!!n&&{method:n[1],name:n[2]}}function Cn(t){return Object.keys(t).reduce((function(n,e){return"type"===e||(n[e]=Ot(t[e])?Object.assign({},t[e]):t[e]),n}),{})}function Dn(t,n,e){var r={};return function(i){return function(o){return function(){var u=xt(Mt.mark((function u(a){var c,s,f,l,d,h,v,p,w,m;return Mt.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(c=a.type,s=a.plugins,f=a,!a.abort){u.next=4;break}return u.abrupt("return",o(a));case 4:if(c===tn.enablePlugin&&i.dispatch({type:tn.initializeStart,plugins:s,disabled:[],fromEnable:!0,meta:a.meta}),c===tn.disablePlugin&&setTimeout((function(){return ln(a.meta.rid,{payload:a})}),0),c===tn.initializeEnd&&(l=n(),d=Object.keys(l),h=d.filter((function(t){return s.includes(t)})).map((function(t){return l[t]})),v=[],p=[],w=a.disabled,m=h.map((function(t){var n=t.name;return dn(t,t.loaded,1e4).then((function(){return r[n]||(i.dispatch({type:tn.pluginReadyType(n),name:n,events:Object.keys(t).filter((function(t){return!Qt.includes(t)}))}),r[n]=!0),v=v.concat(n),t})).catch((function(t){if(t instanceof Error)throw new Error(t);return p=p.concat(t.name),t}))})),Promise.all(m).then((function(){var t={plugins:v,failed:p,disabled:w};setTimeout((function(){d.length===m.length+w.length&&i.dispatch(_t(_t({},{type:tn.ready}),t))}),0)}))),c===tn.bootstrap){u.next=13;break}return/^ready:([^:]*)$/.test(c)&&setTimeout((function(){return hn(i,n,t)}),0),u.next=11,bn(a,n,t,i,e);case 11:return u.abrupt("return",o(u.sent));case 13:return u.abrupt("return",o(f));case 14:case"end":return u.stop()}}),u)})));return function(t){return u.apply(this,arguments)}}()}}}function Ln(t){return function(){return function(n){return function(e){var r=e.type,i=e.key,o=e.value,u=e.options;if(r===tn.setItem||r===tn.removeItem){if(e.abort)return n(e);r===tn.setItem?t.setItem(i,o,u):t.removeItem(i,u)}return n(e)}}}}function zn(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $n(t,n,e){return n&&zn(t.prototype,n),e&&zn(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Un=$n((function t(){var n=this;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),Tt(this,"before",[]),Tt(this,"after",[]),Tt(this,"addMiddleware",(function(t,e){n[e]=n[e].concat(t)})),Tt(this,"removeMiddleware",(function(t,e){var r=n[e].findIndex((function(n){return n===t}));-1!==r&&(n[e]=[].concat(Et(n[e].slice(0,r)),Et(n[e].slice(r+1))))})),Tt(this,"dynamicMiddlewares",(function(t){return function(e){return function(r){return function(i){var o={getState:e.getState,dispatch:function(t){return e.dispatch(t)}},u=n[t].map((function(t){return t(o)}));return Vt.apply(void 0,Et(u))(r)(i)}}}}))}));function Rn(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r={};if("initialize:aborted"===e.type)return n;if(/^registerPlugin:([^:]*)$/.test(e.type)){var i=Wn(e.type,"registerPlugin"),o=t()[i];if(!o||!i)return n;var u=e.enabled;return r[i]={enabled:u,initialized:!!u&&Boolean(!o.initialize),loaded:!!u&&Boolean(o.loaded()),config:o.config||{}},_t(_t({},n),r)}if(/^initialize:([^:]*)$/.test(e.type)){var a=Wn(e.type,tn.initialize),c=t()[a];return c&&a?(r[a]=_t(_t({},n[a]),{initialized:!0,loaded:Boolean(c.loaded())}),_t(_t({},n),r)):n}if(/^ready:([^:]*)$/.test(e.type))return r[e.name]=_t(_t({},n[e.name]),{loaded:!0}),_t(_t({},n),r);switch(e.type){case tn.disablePlugin:return _t(_t({},n),Hn(e.plugins,!1,n));case tn.enablePlugin:return _t(_t({},n),Hn(e.plugins,!0,n));default:return n}}}function Wn(t,n){return t.substring(n.length+1,t.length)}function Hn(t,n,e){return t.reduce((function(t,r){return t[r]=_t(_t({},e[r]),{enabled:n}),t}),e)}function qn(t){try{return JSON.parse(JSON.stringify(t))}catch(t){}return t}var Vn={last:{},history:[]};function Fn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vn,n=arguments.length>1?arguments[1]:void 0,e=n.options,r=n.meta;if(n.type===tn.track){var i=qn(_t(_t({event:n.event,properties:n.properties},Object.keys(e).length&&{options:e}),{},{meta:r}));return _t(_t({},t),{last:i,history:t.history.concat(i)})}return t}var Gn={actions:[]};function Jn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gn,n=arguments.length>1?arguments[1]:void 0,e=n.payload;switch(n.type){case"queue":var r;return r=e&&e.type&&e.type===tn.identify?[n].concat(t.actions):t.actions.concat(n),_t(_t({},t),{},{actions:r});case"dequeue":return[];default:return t}}var Xn=/#.*$/;function Kn(t){var n=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);return"/"+(n&&n[3]?n[3].split("?")[0].replace(Xn,""):"")}var Bn,Yn,Zn,Qn,te=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt)return t;var n=document,e=n.title,r=n.referrer,i=window,o=i.location,u=i.innerWidth,a=i.innerHeight,c=o.hash,s=o.search,f=function(t){var n=function(){if(mt)for(var t,n=document.getElementsByTagName("link"),e=0;t=n[e];e++)if("canonical"===t.getAttribute("rel"))return t.getAttribute("href")}();return n?n.match(/\?/)?n:n+t:window.location.href.replace(Xn,"")}(s),l={title:e,url:f,path:Kn(f),hash:c,search:s,width:u,height:a};return r&&""!==r&&(l.referrer=r),_t(_t({},l),t)},ne={last:{},history:[]};function ee(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne,n=arguments.length>1?arguments[1]:void 0,e=n.options;if(n.type===tn.page){var r=qn(_t({properties:n.properties,meta:n.meta},Object.keys(e).length&&{options:e}));return _t(_t({},t),{last:r,history:t.history.concat(r)})}return t}Bn=function(){if(!mt)return!1;var t=navigator.appVersion;return~t.indexOf("Win")?"Windows":~t.indexOf("Mac")?"MacOS":~t.indexOf("X11")?"UNIX":~t.indexOf("Linux")?"Linux":"Unknown OS"}(),Yn=mt?document.referrer:null,Zn=function(){if(M){var t=navigator,n=t.languages;return t.userLanguage||(n&&n.length?n[0]:t.language)}}(),Qn=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}}();var re={initialized:!1,sessionId:J(),app:null,version:null,debug:!1,offline:!!mt&&!navigator.onLine,os:{name:Bn},userAgent:mt?navigator.userAgent:"node",library:{name:Kt,version:"0.10.22"},timezone:Qn,locale:Zn,campaign:{},referrer:Yn};function ie(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re,n=arguments.length>1?arguments[1]:void 0,e=t.initialized,r=n.campaign;switch(n.type){case tn.campaign:return _t(_t({},t),{campaign:r});case tn.offline:return _t(_t({},t),{offline:!0});case tn.online:return _t(_t({},t),{offline:!1});default:return e?t:_t(_t(_t({},re),t),{initialized:!0})}}var oe=["plugins","reducers","storage"];function ue(t,n,e){if(mt){var r=window[(e?"add":"remove")+"EventListener"];t.split(" ").forEach((function(t){r(t,n)}))}}function ae(t){var n=ue.bind(null,"online offline",(function(){return Promise.resolve(!navigator.onLine).then(t)}));return n(!0),function(){return n(!1)}}function ce(){return dt(Kt,[]),function(t){return function(n,e,r){var i=t(n,e,r),o=i.dispatch;return Object.assign(i,{dispatch:function(t){return ft[st][Kt].push(t.action||t),o(t)}})}}}function se(){return function(){return Vt(Vt.apply(null,arguments),ce())}}function fe(t){return t?function(t){return"[object Array]"===Object.prototype.toString.call(t)}(t)?t:[t]:[]}function le(){var t,n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,o=J();return r&&(fn[o]=(t=r,n=function(t){for(var n,e=t||Array.prototype.slice.call(arguments),r=0;r<e.length;r++)if(yt(e[r])){n=e[r];break}return n}(i),function(e){n&&n(e),t(e)})),_t(_t({},e),{},{rid:o,ts:(new Date).getTime()},r?{hasCallback:!0}:{})}function de(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.reducers||{},e=t.initialUser||{},r=(t.plugins||[]).reduce((function(t,n){if(yt(n))return t.middlewares=t.middlewares.concat(n),t;if(n.NAMESPACE&&(n.name=n.NAMESPACE),!n.name)throw new Error("https://lytics.dev/errors/1");var e=n.EVENTS?Object.keys(n.EVENTS).map((function(t){return n.EVENTS[t]})):[];t.pluginEnabled[n.name]=!(!1===n.enabled||n.config&&!1===n.config.enabled),delete n.enabled,n.methods&&(t.methods[n.name]=Object.keys(n.methods).reduce((function(t,e){var r;return t[e]=(r=n.methods[e],function(){for(var t=Array.prototype.slice.call(arguments),n=new Array(r.length),e=0;e<t.length;e++)n[e]=t[e];return n[n.length]=S,r.apply({instance:S},n)}),t}),{}),delete n.methods);var r=Object.keys(n).concat(e),i=new Set(t.events.concat(r));if(t.events=Array.from(i),t.pluginsArray=t.pluginsArray.concat(n),t.plugins[n.name])throw new Error(n.name+"AlreadyLoaded");return t.plugins[n.name]=n,t.plugins[n.name].loaded||(t.plugins[n.name].loaded=function(){return!0}),t}),{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),i=t.storage?t.storage:{getItem:lt,setItem:dt,removeItem:ht},o=function(t){return function(n,e,r){return e.getState("user")[n]||(r&&Ot(r)&&r[n]?r[n]:an(t)[n]||lt(cn(n))||null)}}(i),u=r.plugins,a=r.events.filter((function(t){return!Qt.includes(t)})).sort(),c=new Set(a.concat(Zt).filter((function(t){return!Qt.includes(t)}))),s=Array.from(c).sort(),f=function(){return u},l=new Un,d=l.addMiddleware,h=l.removeMiddleware,v=l.dynamicMiddlewares,p=function(){throw new Error("Abort disabled inListener")},w=function(t){for(var n,e=Object.create(null),r=/([^&=]+)=?([^&]*)/g;n=r.exec(t);){var i=F(n[1]),o=F(n[2]);if(i)if("[]"===i.substring(i.length-2)){var u=e[i=i.substring(0,i.length-2)]||(e[i]=[]);e[i]=Array.isArray(u)?u:[],e[i].push(o)}else e[i]=""===o||o}for(var a in e){var c=a.split("[");c.length>1&&(G(e,c.map((function(t){return t.replace(/[?[\]\\ ]/g,"")})),e[a]),delete e[a])}return e}(function(t){if(t){var n=t.match(/\?(.*)/);return n&&n[1]?n[1].split("#")[0]:""}return M&&window.location.search.substring(1)}(void 0)),m=an(i),b=_t(_t(_t(_t({},m),e),w.an_uid?{userId:w.an_uid}:{}),w.an_aid?{anonymousId:w.an_aid}:{});b.anonymousId||(b.anonymousId=J());var y,g,j,O=_t({enable:function(t,n){return new Promise((function(e){D.dispatch({type:tn.enablePlugin,plugins:fe(t),_:{originalAction:tn.enablePlugin}},e,[n])}))},disable:function(t,n){return new Promise((function(e){D.dispatch({type:tn.disablePlugin,plugins:fe(t),_:{originalAction:tn.disablePlugin}},e,[n])}))}},r.methods),S={identify:(j=xt(Mt.mark((function t(n,e,r,i){var u,a,c,s,f;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=gt(n)?n:null,a=Ot(n)?n:e,c=r||{},s=S.user(),dt(cn(Bt),u),f=u||a.userId||o(Bt,S,a),t.abrupt("return",new Promise((function(t){D.dispatch(_t({type:tn.identifyStart,userId:f,traits:a||{},options:c,anonymousId:s.anonymousId},s.id&&s.id!==u&&{previousId:s.id}),t,[e,r,i])})));case 7:case"end":return t.stop()}}),t)}))),function(t,n,e,r){return j.apply(this,arguments)}),track:(g=xt(Mt.mark((function t(n,e,r,i){var u,a,c;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((u=Ot(n)?n.event:n)&&gt(u)){t.next=3;break}throw new Error("EventMissing");case 3:return a=Ot(n)?n:e||{},c=Ot(r)?r:{},t.abrupt("return",new Promise((function(t){D.dispatch({type:tn.trackStart,event:u,properties:a,options:c,userId:o(Bt,S,e),anonymousId:o(Yt,S,e)},t,[e,r,i])})));case 6:case"end":return t.stop()}}),t)}))),function(t,n,e,r){return g.apply(this,arguments)}),page:(y=xt(Mt.mark((function t(n,e,r){var i,u;return Mt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Ot(n)?n:{},u=Ot(e)?e:{},t.abrupt("return",new Promise((function(t){D.dispatch({type:tn.pageStart,properties:te(i),options:u,userId:o(Bt,S,i),anonymousId:o(Yt,S,i)},t,[n,e,r])})));case 3:case"end":return t.stop()}}),t)}))),function(t,n,e){return y.apply(this,arguments)}),user:function(t){if(t===Bt||"id"===t)return o(Bt,S);if(t===Yt||"anonId"===t)return o(Yt,S);var n=S.getState("user");return t?P(n,t):n},reset:function(t){return new Promise((function(n){D.dispatch({type:tn.resetStart},n,t)}))},ready:function(t){return S.on(tn.ready,t)},on:function(t,n){if(!t||!yt(n))return!1;if(t===tn.bootstrap)throw new Error(".on disabled for "+t);var e=/Start$|Start:/;if("*"===t){var r=function(){return function(t){return function(r){return r.type.match(e)&&n({payload:r,instance:S,plugins:u}),t(r)}}},i=function(){return function(t){return function(r){return r.type.match(e)||n({payload:r,instance:S,plugins:u}),t(r)}}};return d(r,he),d(i,ve),function(){h(r,he),h(i,ve)}}var o=t.match(e)?he:ve,a=function(){return function(e){return function(r){return r.type===t&&n({payload:r,instance:S,plugins:u,abort:p}),e(r)}}};return d(a,o),function(){return h(a,o)}},once:function(t,n){if(!t||!yt(n))return!1;if(t===tn.bootstrap)throw new Error(".once disabled for "+t);var e=S.on(t,(function(t){n({payload:t.payload,instance:S,plugins:u,abort:p}),e()}));return e},getState:function(t){var n=D.getState();return t?P(n,t):Object.assign({},n)},dispatch:function(t){var n=gt(t)?{type:t}:t;if(Zt.includes(n.type))throw new Error("reserved action "+n.type);var e=t._||{},r=_t(_t({},n),{},{_:_t({originalAction:n.type},e)});D.dispatch(r)},enablePlugin:O.enable,disablePlugin:O.disable,plugins:O,storage:{getItem:i.getItem,setItem:function(t,n,e){D.dispatch({type:tn.setItemStart,key:t,value:n,options:e})},removeItem:function(t,n){D.dispatch({type:tn.removeItemStart,key:t,options:n})}},setAnonymousId:function(t,n){S.storage.setItem(Gt,t,n)},events:{all:s,core:Zt,plugins:a}},k=r.middlewares.concat([function(){return function(t){return function(n){return n.meta||(n.meta=le()),t(n)}}},v(he),Dn(S,f,{all:s,plugins:a}),Ln(i),on(S),sn(S),v(ve)]),E={context:ie,user:un(i),page:ee,track:Fn,plugins:Rn(f),queue:Jn},A=Vt,I=Vt;if(mt&&t.debug){var x=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;x&&(A=x({trace:!0,traceLimit:25})),I=function(){return 0===arguments.length?ce():Ot(At(arguments[0]))?se():se().apply(null,arguments)}}var T,N=function(t){return Object.keys(t).reduce((function(n,e){return oe.includes(e)||(n[e]=t[e]),n}),{})}(t),_=r.pluginsArray.reduce((function(t,n){var e=n.name,i=n.config,o=n.loaded,u=r.pluginEnabled[e];return t[e]={enabled:u,initialized:!!u&&Boolean(!n.initialize),loaded:Boolean(o()),config:i||{}},t}),{}),C={context:N,user:b,plugins:_},D=Ht(function(t){for(var n=Object.keys(t),e={},r=0;r<n.length;r++){var i=n[r];At(t[i])===Ct&&(e[i]=t[i])}var o,u=Object.keys(e);try{!function(t){Object.keys(t).forEach((function(n){var e=t[n];if(At(e(void 0,{type:$t}))===Dt||At(e(void 0,{type:Ut}))===Dt)throw new Error(Lt+" "+n+" "+Dt)}))}(e)}catch(t){o=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(o)throw o;for(var r=!1,i={},a=0;a<u.length;a++){var c=u[a],s=t[c],f=(0,e[c])(s,n);if(At(f)===Dt){var l=qt(c,n);throw new Error(l)}i[c]=f,r=r||f!==s}return r?i:t}}(_t(_t({},E),n)),C,I(A(Ft.apply(void 0,Et(k)))));D.dispatch=(T=D.dispatch,function(t,n,e){var r=le(t.meta,n,fe(e)),i=_t(_t({},t),{meta:r});return T.apply(null,[i])});var L=Object.keys(u);D.dispatch({type:tn.bootstrap,plugins:L,config:N,params:w,user:b,initialUser:e,persistedUser:m});var z=L.filter((function(t){return r.pluginEnabled[t]})),$=L.filter((function(t){return!r.pluginEnabled[t]}));return D.dispatch({type:tn.registerPlugins,plugins:L,enabled:r.pluginEnabled}),r.pluginsArray.map((function(t,n){var e=t.bootstrap,i=t.config,o=t.name;e&&yt(e)&&e({instance:S,config:i,payload:t}),D.dispatch({type:tn.registerPluginType(o),name:o,enabled:r.pluginEnabled[o],plugin:t}),r.pluginsArray.length===n+1&&D.dispatch({type:tn.initializeStart,plugins:z,disabled:$})})),ae((function(t){D.dispatch({type:t?tn.offline:tn.online})})),function(t,n,e){setInterval((function(){return hn(t,n,e)}),3e3)}(D,f,S),S}var he="before",ve="after",pe="cookie",we=ge(),me=je,be=je;function ye(t){return we?je(t,"",-1):ht(t)}function ge(){if(void 0!==we)return we;var t="cookiecookie";try{je(t,t),we=-1!==document.cookie.indexOf(t),ye(t)}catch(t){we=!1}return we}function je(t,n,e,r,i,o){if("undefined"!=typeof window){var u=arguments.length>1;return!1===we&&(u?dt(t,n):lt(t)),u?document.cookie=t+"="+encodeURIComponent(n)+(e?"; expires="+new Date(+new Date+1e3*e).toUTCString()+(r?"; path="+r:"")+(i?"; domain="+i:"")+(o?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0])}}var Oe="localStorage",Se=wt.bind(null,"localStorage"),ke=vt("localStorage","getItem",lt),Ee=vt("localStorage","setItem",dt),Ae=vt("localStorage","removeItem",ht),Ie="sessionStorage",xe=wt.bind(null,"sessionStorage");vt("sessionStorage","getItem",lt),vt("sessionStorage","setItem",dt),vt("sessionStorage","removeItem",ht);var Te="any",Ne="*";"undefined"==typeof process||process;var _e="undefined"!=typeof window;function Pe(t,n){return typeof n===t}"undefined"!=typeof Deno&&Deno,_e&&"nodejs"===window.name||"undefined"!=typeof navigator&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Pe.bind(null,"function");var Me=Pe.bind(null,"string"),Ce=Pe.bind(null,"undefined");function De(t){var n=t;try{if("true"===(n=JSON.parse(t)))return!0;if("false"===n)return!1;if(function(t){if(!function(t){return t&&("object"==typeof t||null!==t)}(t))return!1;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}(n))return n;parseFloat(n)===n&&(n=parseFloat(n))}catch(t){}if(null!==n&&""!==n)return n}Pe.bind(null,"boolean");var Le=Se(),ze=xe(),$e=ge();function Ue(t,n){if(t){var e=Re(n),r=!Ve(e),i=We(e)?De(localStorage.getItem(t)):void 0;if(r&&!Ce(i))return i;var o=He(e)?De(me(t)):void 0;if(r&&o)return o;var u=qe(e)?De(sessionStorage.getItem(t)):void 0;if(r&&u)return u;var a=lt(t);return r?a:{localStorage:i,sessionStorage:u,cookie:o,global:a}}}function Re(t){return t?Me(t)?t:t.storage:Te}function We(t){return Le&&Fe(t,Oe)}function He(t){return $e&&Fe(t,pe)}function qe(t){return ze&&Fe(t,Ie)}function Ve(t){return t===Ne||"all"===t}function Fe(t,n){return t===Te||t===n||Ve(t)}function Ge(t,n,e){return{location:t,current:n,previous:e}}var Je={setItem:function(t,n,e){if(t&&!Ce(n)){var r={},i=Re(e),o=JSON.stringify(n),u=!Ve(i);return We(i)&&(r[Oe]=Ge(Oe,n,De(localStorage.getItem(t))),localStorage.setItem(t,o),u)?r[Oe]:He(i)&&(r[pe]=Ge(pe,n,De(me(t))),be(t,o),u)?r[pe]:qe(i)&&(r[Ie]=Ge(Ie,n,De(sessionStorage.getItem(t))),sessionStorage.setItem(t,o),u)?r[Ie]:(r[ct]=Ge(ct,n,lt(t)),dt(t,n),u?r[ct]:r)}},getItem:Ue,removeItem:function(t,n){if(t){var e=Re(n),r=Ue(t,Ne),i={};return!Ce(r.localStorage)&&We(e)&&(localStorage.removeItem(t),i[Oe]=r.localStorage),!Ce(r.cookie)&&He(e)&&(ye(t),i[pe]=r.cookie),!Ce(r.sessionStorage)&&qe(e)&&(sessionStorage.removeItem(t),i[Ie]=r.sessionStorage),!Ce(r.global)&&Fe(e,ct)&&(ht(t),i[ct]=r.global),i}}};const Xe=Je;function Ke(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Be(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Ye(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Be(Object(e),!0).forEach((function(n){Ke(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Be(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var Ze={exports:{}};!function(t){var n=c.exports;function e(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}t.exports=function(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t},t.exports.__esModule=!0,t.exports.default=t.exports}(Ze);const Qe=u(Ze.exports);var tr={exports:{}};!function(t){var n=l.exports.default;function e(){t.exports=e=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var r,i={},o=Object.prototype,u=o.hasOwnProperty,a=Object.defineProperty||function(t,n,e){t[n]=e.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function d(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{d({},"")}catch(r){d=function(t,n,e){return t[n]=e}}function h(t,n,e,r){var i=Object.create((n&&n.prototype instanceof g?n:g).prototype),o=new M(r||[]);return a(i,"_invoke",{value:T(t,e,o)}),i}function v(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}i.wrap=h;var p="suspendedStart",w="suspendedYield",m="executing",b="completed",y={};function g(){}function j(){}function O(){}var S={};d(S,s,(function(){return this}));var k=Object.getPrototypeOf,E=k&&k(k(C([])));E&&E!==o&&u.call(E,s)&&(S=E);var A=O.prototype=g.prototype=Object.create(S);function I(t){["next","throw","return"].forEach((function(n){d(t,n,(function(t){return this._invoke(n,t)}))}))}function x(t,e){function r(i,o,a,c){var s=v(t[i],t,o);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==n(l)&&u.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function T(t,n,e){var i=p;return function(o,u){if(i===m)throw Error("Generator is already running");if(i===b){if("throw"===o)throw u;return{value:r,done:!0}}for(e.method=o,e.arg=u;;){var a=e.delegate;if(a){var c=N(a,e);if(c){if(c===y)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(i===p)throw i=b,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);i=m;var s=v(t,n,e);if("normal"===s.type){if(i=e.done?b:w,s.arg===y)continue;return{value:s.arg,done:e.done}}"throw"===s.type&&(i=b,e.method="throw",e.arg=s.arg)}}}function N(t,n){var e=n.method,i=t.iterator[e];if(i===r)return n.delegate=null,"throw"===e&&t.iterator.return&&(n.method="return",n.arg=r,N(t,n),"throw"===n.method)||"return"!==e&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+e+"' method")),y;var o=v(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,y):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function _(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function P(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function C(t){if(t||""===t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(u.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=r,n.done=!0,n};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return j.prototype=O,a(A,"constructor",{value:O,configurable:!0}),a(O,"constructor",{value:j,configurable:!0}),j.displayName=d(O,l,"GeneratorFunction"),i.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===j||"GeneratorFunction"===(n.displayName||n.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,d(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},i.awrap=function(t){return{__await:t}},I(x.prototype),d(x.prototype,f,(function(){return this})),i.AsyncIterator=x,i.async=function(t,n,e,r,o){void 0===o&&(o=Promise);var u=new x(h(t,n,e,r),o);return i.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},I(A),d(A,l,"Generator"),d(A,s,(function(){return this})),d(A,"toString",(function(){return"[object Generator]"})),i.keys=function(t){var n=Object(t),e=[];for(var r in n)e.push(r);return e.reverse(),function t(){for(;e.length;){var r=e.pop();if(r in n)return t.value=r,t.done=!1,t}return t.done=!0,t}},i.values=C,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&u.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function e(e,i){return a.type="throw",a.arg=t,n.next=e,i&&(n.method="next",n.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var c=u.call(o,"catchLoc"),s=u.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=n,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),y},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),y}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;P(e)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:C(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=r),y}},i}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(tr);var nr=tr.exports(),er=nr;try{regeneratorRuntime=nr}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=nr:Function("r","regeneratorRuntime = r")(nr)}var rr=function(){};wt.bind(null,"sessionStorage");var ir=vt("sessionStorage","getItem",lt),or=vt("sessionStorage","setItem",dt);vt("sessionStorage","removeItem",ht);var ur="__session",ar=["id","createdAt","created"];function cr(t){var n=t?new Date(t):new Date;return[n.toISOString(),n.getTime()]}function sr(){var t=cr(),n=t[0],e=t[1];return{id:J(),created:e,createdAt:n}}var fr={session:[ir,or],page:[lt,dt]};function lr(t,n){for(var e=fr[t],r=e[0],i=e[1],o=sr(),u=!1,a={},c=0;c<ar.length;c++){var s=ar[c],f="__"+t+"__session__"+s,l=r(f);u=n||!l,(n||!n&&!l)&&i(f,o[s]);var d=l&&!n?l:o[s],h="created"!==s?d:Number(d);a[s]=h}return dr(a,u)}function dr(t,n){var e=Date.now();return t.elapsed=e-t.created,t.expires&&(t.remaining=Math.max(t.expires-e,0),t.isExpired=0===t.remaining),t.isNew=n,t}function hr(t,n){void 0===t&&(t=30);var e=me(ur),r=e?JSON.parse(e):vr(t);return n?r:dr(r,!e)}function vr(t,n,e){void 0===t&&(t=30);var r=e?hr(t,!0):sr(),i=60*t,o=r.created;if(e){var u=cr(),a=u[0],c=u[1];r.modified=c,r.modifiedAt=a,o=c}var s=cr(o+1e3*i),f=s[0];return r.expires=s[1],r.expiresAt=f,r.duration=1e3*i,n&&(r=Object.assign(r,n)),be(ur,JSON.stringify(r),i),dr(r,!e)}var pr=lr.bind(null,"session"),wr=lr.bind(null,"session",!0),mr=lr.bind(null,"page"),br=lr.bind(null,"page",!0),yr="undefined"!=typeof window;function gr(t){return"boolean"==typeof t}var jr=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var n=Object.prototype.toString.call(t);return"[object RegExp]"===n||"[object Date]"===n||function(t){return t.$$typeof===Or}(t)}(t)},Or="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Sr(t,n){return!1!==n.clone&&n.isMergeableObject(t)?Ir(Array.isArray(t)?[]:{},t,n):t}function kr(t,n,e){return t.concat(n).map((function(t){return Sr(t,e)}))}function Er(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]}(t))}function Ar(t,n){try{return n in t}catch(t){return!1}}function Ir(t,n,e){(e=e||{}).arrayMerge=e.arrayMerge||kr,e.isMergeableObject=e.isMergeableObject||jr,e.cloneUnlessOtherwiseSpecified=Sr;var r=Array.isArray(n);return r===Array.isArray(t)?r?e.arrayMerge(t,n,e):function(t,n,e){var r={};return e.isMergeableObject(t)&&Er(t).forEach((function(n){r[n]=Sr(t[n],e)})),Er(n).forEach((function(i){(function(t,n){return Ar(t,n)&&!(Object.hasOwnProperty.call(t,n)&&Object.propertyIsEnumerable.call(t,n))})(t,i)||(r[i]=Ar(t,i)&&e.isMergeableObject(n[i])?function(t,n){if(!n.customMerge)return Ir;var e=n.customMerge(t);return"function"==typeof e?e:Ir}(i,e)(t[i],n[i],e):Sr(n[i],e))})),r}(t,n,e):Sr(n,e)}Ir.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,e){return Ir(t,e,n)}),{})};var xr=Ir,Tr={exports:{}};!function(t){
7
7
  /**
8
8
  * @license MIT <https://opensource.org/licenses/MIT>
9
9
  * @copyright Michael Hart 2024
@@ -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,c as i,h as o,g as e}from"./p-e996c38f.js";import{g as s}from"./p-7dc95675.js";import{l as n}from"./p-d001e961.js";import{a as l}from"./p-648b5a9e.js";import{L as a,g as r,f as d}from"./p-4695cfab.js";import{normalizeMessageBundleLocale as c}from"@arcgis/core/intl.js";import"./p-8717729a.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";const h=class{constructor(o){t(this,o),this.selectedLanguageUpdated=i(this,"selectedLanguageUpdated",7),this.icon="language",this.portalItem=void 0,this.view=void 0,this.locales=[],this.defaultLocale=void 0,this.selectedLanguage=null,this.calciteDropdownOverlayPositioning="absolute",this.messages=void 0,this.t9nData=null}async componentWillLoad(){var t,i,o,e,a,c,h,u,v,p,w,m;const[g,f,b]=await n(["esri/intl","esri/WebMap","esri/request"]);this.intl=g,this.request=b,this.messages=await s(document.createElement("instant-apps-language-translator"));try{this.portalItemResource=await r(this.portalItem);const t=await d(this.portalItemResource);this.t9nData=null!=t?t:{}}catch(t){this.t9nData={},console.error("NO PORTAL ITEM RESOURCE AVAILABLE.")}finally{this.userLocale=this.defaultLocale;const s=new URLSearchParams(window.location.search).get("locale"),n=(null===(o=null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>null==t?void 0:t.locale)))||void 0===i?void 0:i.filter((t=>t===s)))||void 0===o?void 0:o.length)>0,r=l(g,this.portalItem.portal),d=(null===(c=null===(a=null===(e=this.locales)||void 0===e?void 0:e.map((t=>null==t?void 0:t.locale)))||void 0===a?void 0:a.filter((t=>t===r)))||void 0===c?void 0:c.length)>0;this.selectedLanguage=n?s:d?r:this.userLocale;const b=this.selectedLanguage;if(b!==this.userLocale&&(this.calciteDropdownItemSelectCallback(b)(),this.selectedLanguageUpdated.emit({locale:b,data:null!==(u=null===(h=this.t9nData)||void 0===h?void 0:h[b])&&void 0!==u?u:null})),this.view){const t=this.view.map;this.defaultWebMapId=null===(v=null==t?void 0:t.portalItem)||void 0===v?void 0:v.id;const i=null===(m=null===(w=null===(p=this.locales)||void 0===p?void 0:p.filter((t=>(null==t?void 0:t.webmap)&&(null==t?void 0:t.webmap)!==this.defaultWebMapId&&(null==t?void 0:t.locale)===this.selectedLanguage)))||void 0===w?void 0:w[0])||void 0===m?void 0:m.webmap;i&&(this.view.map=new f({portalItem:{id:i}}))}}}render(){const t=this.renderTrigger(),i=this.renderDropdownItems(),e=this.renderDefaultLocale();return o("calcite-dropdown",{key:"8814c7a2d60f1eb1d47753b780dc501cd21a4304",onCalciteDropdownBeforeOpen:()=>this.trigger.iconEnd="chevron-up",onCalciteDropdownBeforeClose:()=>this.trigger.iconEnd="chevron-down","overlay-positioning":this.calciteDropdownOverlayPositioning,"width-scale":"m"},t,e,i)}renderDefaultLocale(){const{userLocale:t}=this;return o("calcite-dropdown-item",{key:`default-${t}`,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t),selected:this.selectedLanguage===this.userLocale},this.getSelectedLanguageText(t))}renderTrigger(){return o("calcite-button",{ref:t=>this.trigger=t,slot:"trigger","icon-start":this.icon,"icon-end":"chevron-down",width:"full",appearance:"outline"},this.getSelectedLanguageText(this.selectedLanguage))}renderDropdownItems(){var t,i;return null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>t.locale)))||void 0===i?void 0:i.map((t=>this.renderDropdownItem(t)))}renderDropdownItem(t){const i=this.getSelectedLanguageText(t);return o("calcite-dropdown-item",{key:t,selected:t===this.selectedLanguage,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t)},i)}calciteDropdownItemSelectCallback(t){return async()=>{var i,o,e,s,l;this.selectedLanguage=t;const{intl:r,selectedLanguage:d,t9nData:h,userLocale:u}=this,v=this.locales.filter((t=>t.locale===d))[0];d!==u&&(v.data=h[t]);const p=new URLSearchParams(window.location.search),w=function(t){if(!t)return"en";if(a?.partial?.[t])return t;{const i=c(t);return null==i?"en":i}}(this.selectedLanguage);if(r.setLocale(w),p.set("locale",w),this.view){const[t]=await n(["esri/WebMap"]),a=null===(o=null===(i=this.locales.filter((t=>t.locale===d)))||void 0===i?void 0:i[0])||void 0===o?void 0:o.webmap;if(a)this.view.map=new t({portalItem:{id:a}});else{const i=null===(l=null===(s=null===(e=this.view)||void 0===e?void 0:e.map)||void 0===s?void 0:s.portalItem)||void 0===l?void 0:l.id;i&&this.defaultWebMapId!==i&&(this.view.map=new t({portalItem:{id:this.defaultWebMapId}}))}}document.documentElement.setAttribute("lang",w),this.intl.prefersRTL()?document.documentElement.setAttribute("dir","rtl"):document.documentElement.setAttribute("dir","ltr"),window.history.replaceState({},"",decodeURIComponent(`${window.location.pathname}?${p}`)),this.selectedLanguageUpdated.emit(v)}}getSelectedLanguageText(t){const i=-1!==Object.keys(a.partial).indexOf(t),o=a[i?"partial":"full"],{language:e,translated:s}=o[t];return`${e} - ${s}`}async refresh(){try{const t=await r(this.portalItem),i=await d(t);this.t9nData=i,this.selectedLanguageUpdated.emit({locale:this.selectedLanguage,data:i[this.selectedLanguage]})}catch(t){}}get el(){return e(this)}};h.style=":host{display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);min-width:200px}:host calcite-dropdown{width:100%}:host calcite-button{--calcite-color-brand:var(--calcite-color-text-3);--calcite-color-brand-hover:var(--calcite-color-text-3)}";export{h as instant_apps_language_switcher}
6
+ import{r as t,c as i,h as o,g as e}from"./p-e996c38f.js";import{g as s}from"./p-b382fabf.js";import{l as n}from"./p-813c7077.js";import{a as l}from"./p-619fefa1.js";import{L as a,g as r,f as c}from"./p-a7824793.js";import{normalizeMessageBundleLocale as d}from"@arcgis/core/intl.js";import"./p-8717729a.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";const h=class{constructor(o){t(this,o),this.selectedLanguageUpdated=i(this,"selectedLanguageUpdated",7),this.icon="language",this.portalItem=void 0,this.view=void 0,this.locales=[],this.defaultLocale=void 0,this.selectedLanguage=null,this.calciteDropdownOverlayPositioning="absolute",this.messages=void 0,this.t9nData=null}async componentWillLoad(){var t,i,o,e,a,d,h,u,v,p,w,m;const[f,g,b]=await n(["esri/intl","esri/WebMap","esri/request"]);this.intl=f,this.request=b,this.messages=await s(document.createElement("instant-apps-language-translator"));try{this.portalItemResource=await r(this.portalItem);const t=await c(this.portalItemResource);this.t9nData=null!=t?t:{}}catch(t){this.t9nData={},console.error("NO PORTAL ITEM RESOURCE AVAILABLE.")}finally{this.userLocale=this.defaultLocale;const s=new URLSearchParams(window.location.search).get("locale"),n=(null===(o=null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>null==t?void 0:t.locale)))||void 0===i?void 0:i.filter((t=>t===s)))||void 0===o?void 0:o.length)>0,r=l(f,this.portalItem.portal),c=(null===(d=null===(a=null===(e=this.locales)||void 0===e?void 0:e.map((t=>null==t?void 0:t.locale)))||void 0===a?void 0:a.filter((t=>t===r)))||void 0===d?void 0:d.length)>0;this.selectedLanguage=n?s:c?r:this.userLocale;const b=this.selectedLanguage;if(b!==this.userLocale&&(this.calciteDropdownItemSelectCallback(b)(),this.selectedLanguageUpdated.emit({locale:b,data:null!==(u=null===(h=this.t9nData)||void 0===h?void 0:h[b])&&void 0!==u?u:null})),this.view){const t=this.view.map;this.defaultWebMapId=null===(v=null==t?void 0:t.portalItem)||void 0===v?void 0:v.id;const i=null===(m=null===(w=null===(p=this.locales)||void 0===p?void 0:p.filter((t=>(null==t?void 0:t.webmap)&&(null==t?void 0:t.webmap)!==this.defaultWebMapId&&(null==t?void 0:t.locale)===this.selectedLanguage)))||void 0===w?void 0:w[0])||void 0===m?void 0:m.webmap;i&&(this.view.map=new g({portalItem:{id:i}}))}}}render(){const t=this.renderTrigger(),i=this.renderDropdownItems(),e=this.renderDefaultLocale();return o("calcite-dropdown",{key:"8814c7a2d60f1eb1d47753b780dc501cd21a4304",onCalciteDropdownBeforeOpen:()=>this.trigger.iconEnd="chevron-up",onCalciteDropdownBeforeClose:()=>this.trigger.iconEnd="chevron-down","overlay-positioning":this.calciteDropdownOverlayPositioning,"width-scale":"m"},t,e,i)}renderDefaultLocale(){const{userLocale:t}=this;return o("calcite-dropdown-item",{key:`default-${t}`,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t),selected:this.selectedLanguage===this.userLocale},this.getSelectedLanguageText(t))}renderTrigger(){return o("calcite-button",{ref:t=>this.trigger=t,slot:"trigger","icon-start":this.icon,"icon-end":"chevron-down",width:"full",appearance:"outline"},this.getSelectedLanguageText(this.selectedLanguage))}renderDropdownItems(){var t,i;return null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>t.locale)))||void 0===i?void 0:i.map((t=>this.renderDropdownItem(t)))}renderDropdownItem(t){const i=this.getSelectedLanguageText(t);return o("calcite-dropdown-item",{key:t,selected:t===this.selectedLanguage,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t)},i)}calciteDropdownItemSelectCallback(t){return async()=>{var i,o,e,s,l;this.selectedLanguage=t;const{intl:r,selectedLanguage:c,t9nData:h,userLocale:u}=this,v=this.locales.filter((t=>t.locale===c))[0];c!==u&&(v.data=h[t]);const p=new URLSearchParams(window.location.search),w=function(t){if(!t)return"en";if(a?.partial?.[t])return t;{const i=d(t);return null==i?"en":i}}(this.selectedLanguage);if(r.setLocale(w),p.set("locale",w),this.view){const[t]=await n(["esri/WebMap"]),a=null===(o=null===(i=this.locales.filter((t=>t.locale===c)))||void 0===i?void 0:i[0])||void 0===o?void 0:o.webmap;if(a)this.view.map=new t({portalItem:{id:a}});else{const i=null===(l=null===(s=null===(e=this.view)||void 0===e?void 0:e.map)||void 0===s?void 0:s.portalItem)||void 0===l?void 0:l.id;i&&this.defaultWebMapId!==i&&(this.view.map=new t({portalItem:{id:this.defaultWebMapId}}))}}document.documentElement.setAttribute("lang",w),this.intl.prefersRTL()?document.documentElement.setAttribute("dir","rtl"):document.documentElement.setAttribute("dir","ltr"),window.history.replaceState({},"",decodeURIComponent(`${window.location.pathname}?${p}`)),this.selectedLanguageUpdated.emit(v)}}getSelectedLanguageText(t){const i=-1!==Object.keys(a.partial).indexOf(t),o=a[i?"partial":"full"],{language:e,translated:s}=o[t];return`${e} - ${s}`}async refresh(){try{const t=await r(this.portalItem),i=await c(t);this.t9nData=i,this.selectedLanguageUpdated.emit({locale:this.selectedLanguage,data:i[this.selectedLanguage]})}catch(t){}}get el(){return e(this)}};h.style=":host{display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);min-width:200px}:host calcite-dropdown{width:100%}:host calcite-button{--calcite-color-brand:var(--calcite-color-text-3);--calcite-color-brand-hover:var(--calcite-color-text-3)}";export{h as instant_apps_language_switcher}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{_ as t}from"./p-8d281f47.js";import{l as s}from"./p-404cbf48.js";
6
+ import{_ as t}from"./p-24b9d4b9.js";import{l as s}from"./p-4b2ec507.js";
7
7
  /** @license
8
8
  * Copyright 2022 Esri
9
9
  *
@@ -18,4 +18,4 @@ import{_ as t}from"./p-8d281f47.js";import{l as s}from"./p-404cbf48.js";
18
18
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
- */class i{arcade;intl;async getPopupTitle(s,i){this.arcade||await this._initModules();let e={};for(const[t,i]of Object.entries(s.attributes))e={...e,[`{${t.toUpperCase()}}`]:i};const a=s.layer,o=this._removeTags(a?.popupTemplate?.title);if(o.includes("{expression/expr")&&null!=a?.popupTemplate?.expressionInfos)for(let t=0;t<a.popupTemplate?.expressionInfos.length;t++){const o=a.popupTemplate.expressionInfos[t],n=this.arcade.createArcadeProfile("popup");try{const t=await this.arcade.createArcadeExecutor(o.expression,n),r=await t.executeAsync({$feature:s,$layer:a,$map:i});null==r&&""===r||(e[`{expression/${o.name}}`.toUpperCase()]=r)}catch(t){console.error(t);continue}}return a.popupTemplate?.fieldInfos&&a.fields.forEach((i=>{const o=s.attributes[i.name],n=a.popupTemplate.fieldInfos.find((t=>t.fieldName.toLowerCase()===i.name.toLowerCase())),r=t(o,i.type,i.domain,n?.format,this.intl);e[`{${i.name.toUpperCase()}}`]=r??o})),o?.replace(/{.*?}/g,(t=>null!=e[t.toUpperCase()]?e[t.toUpperCase()]:""))}_removeTags(t){return null==t||""===t?"":t.toString().replace(/(<([^>]+)>)/gi,"")}async _initModules(){const[t,i]=await s(["esri/arcade","esri/intl"]);this.arcade=t,this.intl=i}}export{i as P}
21
+ */class e{arcade;intl;async getPopupTitle(s,e){this.arcade||await this._initModules();let i={};for(const[t,e]of Object.entries(s.attributes))i={...i,[`{${t.toUpperCase()}}`]:e};const a=s.layer,o=this._removeTags(a?.popupTemplate?.title);if(o.includes("{expression/expr")&&null!=a?.popupTemplate?.expressionInfos)for(let t=0;t<a.popupTemplate?.expressionInfos.length;t++){const o=a.popupTemplate.expressionInfos[t],n=this.arcade.createArcadeProfile("popup");try{const t=await this.arcade.createArcadeExecutor(o.expression,n),r=await t.executeAsync({$feature:s,$layer:a,$map:e});null==r&&""===r||(i[`{expression/${o.name}}`.toUpperCase()]=r)}catch(t){console.error(t);continue}}return a.popupTemplate?.fieldInfos&&a.fields.forEach((e=>{const o=s.attributes[e.name],n=a.popupTemplate.fieldInfos.find((t=>t.fieldName.toLowerCase()===e.name.toLowerCase())),r=t(o,e.type,e.domain,n?.format,this.intl);i[`{${e.name.toUpperCase()}}`]=r??o})),o?.replace(/{.*?}/g,(t=>null!=i[t.toUpperCase()]?i[t.toUpperCase()]:""))}_removeTags(t){return null==t||""===t?"":t.toString().replace(/(<([^>]+)>)/gi,"")}async _initModules(){const[t,e]=await s(["esri/arcade","esri/intl"]);this.arcade=t,this.intl=e}}export{e as P}