@meetelise/chat 1.34.7 → 1.35.1

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 (282) hide show
  1. package/dist/src/MyPubnub.d.ts +116 -0
  2. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.d.ts +2 -0
  3. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.d.ts +28 -0
  4. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.d.ts +2 -0
  5. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.d.ts +18 -0
  6. package/dist/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.d.ts +2 -0
  7. package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.d.ts +2 -0
  8. package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.d.ts +22 -0
  9. package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.d.ts +2 -0
  10. package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +46 -0
  11. package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.d.ts +2 -0
  12. package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +21 -0
  13. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +2 -0
  14. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +13 -0
  15. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +2 -0
  16. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +34 -0
  17. package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.d.ts +2 -0
  18. package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.d.ts +18 -0
  19. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.d.ts +1 -0
  20. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.d.ts +8 -0
  21. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/index.d.ts +1 -0
  22. package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +5 -0
  23. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +2 -0
  24. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +13 -0
  25. package/dist/src/WebComponent/FeeCalculator/constants.d.ts +3 -0
  26. package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +1 -0
  27. package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +55 -0
  28. package/dist/src/WebComponent/FeeCalculator/index.d.ts +2 -0
  29. package/dist/src/WebComponent/FeeCalculator/model/building-fee-view.d.ts +41 -0
  30. package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +82 -0
  31. package/dist/src/WebComponent/FeeCalculator/model/desired-addon.d.ts +5 -0
  32. package/dist/src/WebComponent/FeeCalculator/model/desired-rentable-item.d.ts +4 -0
  33. package/dist/src/WebComponent/FeeCalculator/model/index.d.ts +13 -0
  34. package/dist/src/WebComponent/FeeCalculator/model/item-combination.d.ts +6 -0
  35. package/dist/src/WebComponent/FeeCalculator/model/item-quantity.d.ts +4 -0
  36. package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +18 -0
  37. package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +8 -0
  38. package/dist/src/WebComponent/FeeCalculator/model/rent-frequency.d.ts +1 -0
  39. package/dist/src/WebComponent/FeeCalculator/model/rentable-item-summary.d.ts +9 -0
  40. package/dist/src/WebComponent/FeeCalculator/model/rentable-item.d.ts +9 -0
  41. package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +23 -0
  42. package/dist/src/WebComponent/FeeCalculator/model/unit-fee-bundle.d.ts +31 -0
  43. package/dist/src/WebComponent/LeadSourceClient.d.ts +46 -0
  44. package/dist/src/WebComponent/OfficeHours.d.ts +21 -0
  45. package/dist/src/WebComponent/Scheduler/date-picker.d.ts +28 -0
  46. package/dist/src/WebComponent/Scheduler/time-picker.d.ts +16 -0
  47. package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +102 -0
  48. package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +13 -0
  49. package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +1 -0
  50. package/dist/src/WebComponent/actions/InputStyles.d.ts +1 -0
  51. package/dist/src/WebComponent/actions/action-confirm-button.d.ts +13 -0
  52. package/dist/src/WebComponent/actions/call-us-window.d.ts +37 -0
  53. package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +8 -0
  54. package/dist/src/WebComponent/actions/details-window.d.ts +14 -0
  55. package/dist/src/WebComponent/actions/email-us-window.d.ts +46 -0
  56. package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +17 -0
  57. package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +8 -0
  58. package/dist/src/WebComponent/chat-additional-actions.d.ts +28 -0
  59. package/dist/src/WebComponent/health-chat.d.ts +47 -0
  60. package/dist/src/WebComponent/healthchat-styles.d.ts +1 -0
  61. package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +2 -0
  62. package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +2 -0
  63. package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +2 -0
  64. package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +2 -0
  65. package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +2 -0
  66. package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +2 -0
  67. package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +2 -0
  68. package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +7 -0
  69. package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +2 -0
  70. package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +2 -0
  71. package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +2 -0
  72. package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +3 -0
  73. package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +2 -0
  74. package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +2 -0
  75. package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +2 -0
  76. package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +2 -0
  77. package/dist/src/WebComponent/index.d.ts +2 -0
  78. package/dist/src/WebComponent/launcher/Launcher.d.ts +99 -0
  79. package/dist/src/WebComponent/launcher/launcherStyles.d.ts +1 -0
  80. package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +27 -0
  81. package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +1 -0
  82. package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +1 -0
  83. package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +1 -0
  84. package/dist/src/WebComponent/leasing-chat-styles.d.ts +1 -0
  85. package/dist/src/WebComponent/loaders/index.d.ts +4 -0
  86. package/dist/src/WebComponent/loaders/mega-loader.d.ts +7 -0
  87. package/dist/src/WebComponent/loaders/skeleton-card.d.ts +12 -0
  88. package/dist/src/WebComponent/loaders/skeleton-loader-styles.d.ts +3 -0
  89. package/dist/src/WebComponent/loaders/skeleton-loader.d.ts +13 -0
  90. package/dist/src/WebComponent/me-chat.d.ts +91 -0
  91. package/dist/src/WebComponent/me-select.d.ts +24 -0
  92. package/dist/src/WebComponent/mini-loader.d.ts +5 -0
  93. package/dist/src/WebComponent/pubnub-chat-styles.d.ts +1 -0
  94. package/dist/src/WebComponent/pubnub-chat.d.ts +48 -0
  95. package/dist/src/WebComponent/pubnub-media.d.ts +14 -0
  96. package/dist/src/WebComponent/pubnub-message-styles.d.ts +1 -0
  97. package/dist/src/WebComponent/pubnub-message.d.ts +39 -0
  98. package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +1 -0
  99. package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +12 -0
  100. package/dist/src/WebComponent/utilities-chat.d.ts +47 -0
  101. package/dist/src/WebComponent/utilities-styles.d.ts +1 -0
  102. package/dist/src/WebComponent/utils.d.ts +31 -0
  103. package/dist/src/analytics.d.ts +64 -0
  104. package/dist/src/disclaimers.d.ts +16 -0
  105. package/dist/src/fetchBuildingABTestType.d.ts +8 -0
  106. package/dist/src/fetchBuildingInfo.d.ts +58 -0
  107. package/dist/src/fetchBuildingWebchatView.d.ts +124 -0
  108. package/dist/src/fetchFeatureFlag.d.ts +14 -0
  109. package/dist/src/fetchLeadSources.d.ts +4 -0
  110. package/dist/src/fetchPhoneNumberFromSource.d.ts +6 -0
  111. package/dist/src/getAvailabilities.d.ts +46 -0
  112. package/dist/src/getBuildingPhoneNumber.d.ts +1 -0
  113. package/dist/src/getShouldAllowScheduling.d.ts +1 -0
  114. package/dist/src/getShouldShowWebchat.d.ts +3 -0
  115. package/dist/src/getTimezoneString.d.ts +1 -0
  116. package/dist/src/globals.d.ts +2 -0
  117. package/dist/src/gtm.d.ts +6 -0
  118. package/dist/src/handleChatId.d.ts +11 -0
  119. package/dist/src/insertDNIIntoWebsite.d.ts +5 -0
  120. package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +4 -0
  121. package/dist/src/main/MEChat.d.ts +74 -0
  122. package/dist/src/main/utils.d.ts +2 -0
  123. package/dist/src/postLeadSources.d.ts +3 -0
  124. package/dist/src/rentgrata.d.ts +4 -0
  125. package/dist/src/replaceSelectButtonsWithNewLink.d.ts +5 -0
  126. package/dist/src/services/fees/calculateQuote.d.ts +14 -0
  127. package/dist/src/services/fees/fetchBuildingFeesV2.d.ts +10 -0
  128. package/dist/src/services/fees/fetchBuildingUnits.d.ts +29 -0
  129. package/dist/src/services/fees/utils.d.ts +1 -0
  130. package/dist/src/svgIcons.d.ts +5 -0
  131. package/dist/src/themes.d.ts +5 -0
  132. package/dist/src/types/incentive-v2.d.ts +23 -0
  133. package/dist/src/types/rest-sdk.types.d.ts +11 -0
  134. package/dist/src/types/webchat-no-show-reason.d.ts +1 -0
  135. package/dist/src/utils/getWidgetOverrides.d.ts +39 -0
  136. package/dist/src/utils/queryParamBuilder.d.ts +8 -0
  137. package/dist/src/utils.d.ts +13 -0
  138. package/package.json +1 -1
  139. package/public/dist/index.js +41 -41
  140. package/src/MyPubnub.ts +792 -0
  141. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.ts +35 -0
  142. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.ts +206 -0
  143. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.ts +6 -0
  144. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.ts +101 -0
  145. package/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.ts +82 -0
  146. package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.ts +9 -0
  147. package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.ts +124 -0
  148. package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +142 -0
  149. package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +243 -0
  150. package/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.ts +65 -0
  151. package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +91 -0
  152. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +44 -0
  153. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +38 -0
  154. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +151 -0
  155. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +248 -0
  156. package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.ts +82 -0
  157. package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts +76 -0
  158. package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.ts +40 -0
  159. package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.ts +43 -0
  160. package/src/WebComponent/FeeCalculator/components/incentive-banner/index.ts +1 -0
  161. package/src/WebComponent/FeeCalculator/components/index.ts +5 -0
  162. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +39 -0
  163. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +39 -0
  164. package/src/WebComponent/FeeCalculator/constants.ts +5 -0
  165. package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +310 -0
  166. package/src/WebComponent/FeeCalculator/fee-calculator.ts +341 -0
  167. package/src/WebComponent/FeeCalculator/index.ts +4 -0
  168. package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +84 -0
  169. package/src/WebComponent/FeeCalculator/model/building-fee.ts +126 -0
  170. package/src/WebComponent/FeeCalculator/model/desired-addon.ts +6 -0
  171. package/src/WebComponent/FeeCalculator/model/desired-rentable-item.ts +4 -0
  172. package/src/WebComponent/FeeCalculator/model/index.ts +13 -0
  173. package/src/WebComponent/FeeCalculator/model/item-combination.ts +16 -0
  174. package/src/WebComponent/FeeCalculator/model/item-quantity.ts +4 -0
  175. package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +45 -0
  176. package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +9 -0
  177. package/src/WebComponent/FeeCalculator/model/rent-frequency.ts +1 -0
  178. package/src/WebComponent/FeeCalculator/model/rentable-item-summary.ts +10 -0
  179. package/src/WebComponent/FeeCalculator/model/rentable-item.ts +10 -0
  180. package/src/WebComponent/FeeCalculator/model/transaction-category.ts +23 -0
  181. package/src/WebComponent/FeeCalculator/model/unit-fee-bundle.ts +54 -0
  182. package/src/WebComponent/LeadSourceClient.ts +332 -0
  183. package/src/WebComponent/MEChat.css +5 -0
  184. package/src/WebComponent/OfficeHours.ts +73 -0
  185. package/src/WebComponent/Scheduler/date-picker.ts +405 -0
  186. package/src/WebComponent/Scheduler/time-picker.ts +195 -0
  187. package/src/WebComponent/Scheduler/tour-scheduler.ts +1430 -0
  188. package/src/WebComponent/Scheduler/tour-type-option.ts +112 -0
  189. package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +418 -0
  190. package/src/WebComponent/actions/InputStyles.ts +57 -0
  191. package/src/WebComponent/actions/action-confirm-button.ts +125 -0
  192. package/src/WebComponent/actions/call-us-window.ts +467 -0
  193. package/src/WebComponent/actions/collapse-expand-button.ts +65 -0
  194. package/src/WebComponent/actions/details-window.ts +150 -0
  195. package/src/WebComponent/actions/email-us-window.ts +556 -0
  196. package/src/WebComponent/actions/formatPhoneNumber.ts +72 -0
  197. package/src/WebComponent/actions/minimize-expand-button.ts +93 -0
  198. package/src/WebComponent/chat-additional-actions.ts +135 -0
  199. package/src/WebComponent/health-chat.ts +270 -0
  200. package/src/WebComponent/healthchat-styles.ts +119 -0
  201. package/src/WebComponent/icons/ApplyOutlineIcon.ts +22 -0
  202. package/src/WebComponent/icons/BookTourOutlineIcon.ts +13 -0
  203. package/src/WebComponent/icons/CalculatorOutlineIcon.ts +22 -0
  204. package/src/WebComponent/icons/ChatOutlineIcon.ts +10 -0
  205. package/src/WebComponent/icons/ChevronLeftIcon.ts +7 -0
  206. package/src/WebComponent/icons/ChevronRightIcon.ts +7 -0
  207. package/src/WebComponent/icons/ContactResidentIcon.ts +9 -0
  208. package/src/WebComponent/icons/DollarOutlineIcon.ts +26 -0
  209. package/src/WebComponent/icons/EmailOutlineIcon.ts +7 -0
  210. package/src/WebComponent/icons/HeyThereEmojiIcon.ts +12 -0
  211. package/src/WebComponent/icons/PhoneOutlineIcon.ts +7 -0
  212. package/src/WebComponent/icons/SendMessageIcon.ts +17 -0
  213. package/src/WebComponent/icons/TourSelfGuidedIcon.ts +17 -0
  214. package/src/WebComponent/icons/TourVirtuallyIcon.ts +17 -0
  215. package/src/WebComponent/icons/TourWithAgentIcon.ts +17 -0
  216. package/src/WebComponent/icons/XOutlineIcon.ts +8 -0
  217. package/src/WebComponent/index.ts +2 -0
  218. package/src/WebComponent/launcher/Launcher.ts +1284 -0
  219. package/src/WebComponent/launcher/launcherStyles.ts +500 -0
  220. package/src/WebComponent/launcher/mobile-launcher.ts +162 -0
  221. package/src/WebComponent/launcher/typeEmojiStyles.ts +161 -0
  222. package/src/WebComponent/launcher/typeMiniStyles.ts +60 -0
  223. package/src/WebComponent/launcher/typeMobileStyles.ts +50 -0
  224. package/src/WebComponent/leasing-chat-styles.ts +114 -0
  225. package/src/WebComponent/loaders/index.ts +7 -0
  226. package/src/WebComponent/loaders/mega-loader.ts +36 -0
  227. package/src/WebComponent/loaders/skeleton-card.ts +31 -0
  228. package/src/WebComponent/loaders/skeleton-loader-styles.ts +112 -0
  229. package/src/WebComponent/loaders/skeleton-loader.ts +34 -0
  230. package/src/WebComponent/me-chat.ts +1264 -0
  231. package/src/WebComponent/me-select.ts +322 -0
  232. package/src/WebComponent/mini-loader.ts +28 -0
  233. package/src/WebComponent/pubnub-chat-styles.ts +204 -0
  234. package/src/WebComponent/pubnub-chat.ts +771 -0
  235. package/src/WebComponent/pubnub-media.ts +208 -0
  236. package/src/WebComponent/pubnub-message-styles.ts +54 -0
  237. package/src/WebComponent/pubnub-message.ts +431 -0
  238. package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +34 -0
  239. package/src/WebComponent/simple-launcher/simple-launcher.ts +100 -0
  240. package/src/WebComponent/utilities-chat.ts +270 -0
  241. package/src/WebComponent/utilities-styles.ts +110 -0
  242. package/src/WebComponent/utils.ts +82 -0
  243. package/src/analytics.ts +217 -0
  244. package/src/assetUrls.ts +6 -0
  245. package/src/disclaimers.ts +301 -0
  246. package/src/fetchBuildingABTestType.ts +21 -0
  247. package/src/fetchBuildingInfo.ts +88 -0
  248. package/src/fetchBuildingWebchatView.ts +176 -0
  249. package/src/fetchFeatureFlag.ts +250 -0
  250. package/src/fetchLeadSources.ts +98 -0
  251. package/src/fetchPhoneNumberFromSource.ts +31 -0
  252. package/src/fetchWebchatPreferences.ts +54 -0
  253. package/src/getAvailabilities.ts +189 -0
  254. package/src/getBuildingPhoneNumber.ts +26 -0
  255. package/src/getShouldAllowScheduling.ts +16 -0
  256. package/src/getShouldShowWebchat.ts +114 -0
  257. package/src/getTimezoneString.ts +40 -0
  258. package/src/globals.ts +3 -0
  259. package/src/gtm.ts +17 -0
  260. package/src/handleChatId.ts +101 -0
  261. package/src/insertDNIIntoWebsite.ts +146 -0
  262. package/src/insertLeadSourceIntoSchedulerLinks.ts +71 -0
  263. package/src/main/MEChat.test.ts +110 -0
  264. package/src/main/MEChat.ts +404 -0
  265. package/src/main/utils.ts +70 -0
  266. package/src/postLeadSources.ts +44 -0
  267. package/src/rentgrata.ts +74 -0
  268. package/src/replaceSelectButtonsWithNewLink.ts +91 -0
  269. package/src/services/fees/calculateQuote.ts +74 -0
  270. package/src/services/fees/fetchBuildingFees.ts +50 -0
  271. package/src/services/fees/fetchBuildingFeesV2.ts +56 -0
  272. package/src/services/fees/fetchBuildingFloorplans.ts +74 -0
  273. package/src/services/fees/fetchBuildingUnits.ts +86 -0
  274. package/src/services/fees/utils.ts +4 -0
  275. package/src/svgIcons.ts +14 -0
  276. package/src/themes.ts +65 -0
  277. package/src/types/incentive-v2.ts +24 -0
  278. package/src/types/rest-sdk.types.ts +13 -0
  279. package/src/types/webchat-no-show-reason.ts +6 -0
  280. package/src/utils/getWidgetOverrides.ts +91 -0
  281. package/src/utils/queryParamBuilder.ts +28 -0
  282. package/src/utils.ts +121 -0
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- var e={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{var i=n(4867),o=n(6026),r=n(4372),a=n(5327),s=n(4097),l=n(4109),u=n(7985),c=n(7874),d=n(2648),h=n(644),p=n(205);e.exports=function(e){return new Promise((function(t,n){var f,g=e.data,m=e.headers,b=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}i.isFormData(g)&&i.isStandardBrowserEnv()&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",C=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+C)}var x=s(e.baseURL,e.url);function A(){if(y){var i="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,r={data:b&&"text"!==b&&"json"!==b?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y};o((function(e){t(e),v()}),(function(e){n(e),v()}),r),y=null}}if(y.open(e.method.toUpperCase(),a(x,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=A:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(A)},y.onabort=function(){y&&(n(new d("Request aborted",d.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,i.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,y)),y=null},i.isStandardBrowserEnv()){var S=(e.withCredentials||u(x))&&e.xsrfCookieName?r.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in y&&i.forEach(m,(function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),b&&"json"!==b&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){y&&(n(!e||e&&e.type?new h:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),g||(g=null);var k=p(x);k&&-1===["http","https","file"].indexOf(k)?n(new d("Unsupported protocol "+k+":",d.ERR_BAD_REQUEST,e)):y.send(g)}))}},1609:(e,t,n)=>{var i=n(4867),o=n(1849),r=n(321),a=n(7185),s=function e(t){var n=new r(t),s=o(r.prototype.request,n);return i.extend(s,r.prototype,n),i.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(5546));s.Axios=r,s.CanceledError=n(644),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.toFormData=n(7675),s.AxiosError=n(2648),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(6268),e.exports=s,e.exports.default=s},4972:(e,t,n)=>{var i=n(644);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t<i;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,i=new Promise((function(e){n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},644:(e,t,n)=>{var i=n(2648);function o(e){i.call(this,null==e?"canceled":e,i.ERR_CANCELED),this.name="CanceledError"}n(4867).inherits(o,i,{__CANCEL__:!0}),e.exports=o},6502:e=>{e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{var i=n(4867),o=n(5327),r=n(782),a=n(3572),s=n(7185),l=n(4097),u=n(4875),c=u.validators;function d(e){this.defaults=e,this.interceptors={request:new r,response:new r}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var r,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,i),d=d.concat(l),r=Promise.resolve(t);d.length;)r=r.then(d.shift(),d.shift());return r}for(var h=t;i.length;){var p=i.shift(),f=i.shift();try{h=p(h)}catch(e){f(e);break}}try{r=a(h)}catch(e){return Promise.reject(e)}for(;l.length;)r=r.then(l.shift(),l.shift());return r},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},i.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,o){return this.request(s(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},2648:(e,t,n)=>{var i=n(4867);function o(e,t,n,i,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o)}i.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var r=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(o,a),Object.defineProperty(r,"isAxiosError",{value:!0}),o.from=function(e,t,n,a,s,l){var u=Object.create(r);return i.toFlatObject(e,u,(function(e){return e!==Error.prototype})),o.call(u,e.message,t,n,a,s),u.name=e.name,l&&Object.assign(u,l),u},e.exports=o},782:(e,t,n)=>{var i=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{var i=n(1793),o=n(7303);e.exports=function(e,t){return e&&!i(t)?o(e,t):t}},3572:(e,t,n)=>{var i=n(4867),o=n(8527),r=n(6502),a=n(5546),s=n(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7185:(e,t,n)=>{var i=n(4867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function r(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!i.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return i.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||r,o=t(e);i.isUndefined(o)&&t!==l||(n[e]=o)})),n}},6026:(e,t,n)=>{var i=n(2648);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new i("Request failed with status code "+n.status,[i.ERR_BAD_REQUEST,i.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},8527:(e,t,n)=>{var i=n(4867),o=n(5546);e.exports=function(e,t,n){var r=this||o;return i.forEach(n,(function(n){e=n.call(r,e,t)})),e}},5546:(e,t,n)=>{var i=n(4867),o=n(6016),r=n(2648),a=n(7874),s=n(7675),l={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,d={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,r=i.isObject(e),a=t&&t["Content-Type"];if((n=i.isFileList(e))||r&&"multipart/form-data"===a){var l=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,l&&new l)}return r||"application/json"===a?(u(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(0,JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw r.from(e,r.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(1623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){d.headers[e]=i.merge(l)})),e.exports=d},7874:e=>{e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.27.2"}},1849:e=>{e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},5327:(e,t,n)=>{var i=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=t.toString();else{var a=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),r=a.join("&")}if(r){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}},7303:e=>{e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{var i=n(4867);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,o,r,a){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(o)&&s.push("path="+o),i.isString(r)&&s.push("domain="+r),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,n)=>{var i=n(4867);e.exports=function(e){return i.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,n)=>{var i=n(4867);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=i.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{var i=n(4867);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},1623:e=>{e.exports=null},4109:(e,t,n)=>{var i=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,r,a={};return e?(i.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=i.trim(e.substr(0,r)).toLowerCase(),n=i.trim(e.substr(r+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},205:e=>{e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:e=>{e.exports=function(e){return function(t){return e.apply(null,t)}}},7675:(e,t,n)=>{var i=n(4867);e.exports=function(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":i.isDate(e)?e.toISOString():i.isArrayBuffer(e)||i.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(r,a){if(i.isPlainObject(r)||i.isArray(r)){if(-1!==n.indexOf(r))throw Error("Circular reference detected in "+a);n.push(r),i.forEach(r,(function(n,r){if(!i.isUndefined(n)){var s,l=a?a+"."+r:r;if(n&&!a&&"object"==typeof n)if(i.endsWith(r,"{}"))n=JSON.stringify(n);else if(i.endsWith(r,"[]")&&(s=i.toArray(n)))return void s.forEach((function(e){!i.isUndefined(e)&&t.append(l,o(e))}));e(n,l)}})),n.pop()}else t.append(a,o(r))}(e),t}},4875:(e,t,n)=>{var i=n(7288).version,o=n(2648),r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};r.transitional=function(e,t,n){function r(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,s){if(!1===e)throw new o(r(i," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!a[i]&&(a[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),r=i.length;r-- >0;){var a=i[r],s=t[a];if(s){var l=e[a],u=void 0===l||s(l,a,e);if(!0!==u)throw new o("option "+a+" must be "+u,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:r}},4867:(e,t,n)=>{var i,o=n(1849),r=Object.prototype.toString,a=(i=Object.create(null),function(e){var t=r.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function u(e){return void 0===e}var c=s("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function h(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),f=s("File"),g=s("Blob"),m=s("FileList");function b(e){return"[object Function]"===r.call(e)}var v=s("URLSearchParams");function y(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var w,C=(w="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return w&&e instanceof w});e.exports={isArray:l,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||r.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:d,isPlainObject:h,isUndefined:u,isDate:p,isFile:f,isBlob:g,isFunction:b,isStream:function(e){return d(e)&&b(e.pipe)},isURLSearchParams:v,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:y,merge:function e(){var t={};function n(n,i){h(t[i])&&h(n)?t[i]=e(t[i],n):h(n)?t[i]=e({},n):l(n)?t[i]=n.slice():t[i]=n}for(var i=0,o=arguments.length;i<o;i++)y(arguments[i],n);return t},extend:function(e,t,n){return y(t,(function(t,i){e[i]=n&&"function"==typeof t?o(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var i,o,r,a={};t=t||{};do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a[r=i[o]]||(t[r]=e[r],a[r]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;var t=e.length;if(u(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:C,isFileList:m}},4184:(e,t)=>{var n;!function(){var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var s in n)i.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},3631:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(8081),o=n.n(i),r=n(3645),a=n.n(r)()(o());a.push([e.id,"@media screen and (min-width: 767px) {\n .meetelise-chat.pane.launcher__desktop {\n right: -32px;\n }\n}\n",""]);const s=a},3645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);i&&a[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8081:e=>{e.exports=function(e){return e[1]}},7394:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i},e.exports=t.default},8609:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},e.exports=t.default},6420:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)({},e)};var i,o=(i=n(8609))&&i.__esModule?i:{default:i};e.exports=t.default},7100:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n(1603)),o=c(n(1354)),r=c(n(1370)),a=c(n(623)),s=c(n(6226)),l=c(n(7394)),u=c(n(2699));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=e>0?"-":"+",i=Math.abs(e),o=Math.floor(i/60),r=i%60;if(0===r)return n+String(o);var a=t||"";return n+String(o)+a+(0,l.default)(r,2)}function h(e,t){return e%60==0?(e>0?"-":"+")+(0,l.default)(Math.abs(e)/60,2):p(e,t)}function p(e,t){var n=t||"",i=e>0?"-":"+",o=Math.abs(e);return i+(0,l.default)(Math.floor(o/60),2)+n+(0,l.default)(o%60,2)}var f={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var i=e.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,i){var o=(0,s.default)(e,i),r=o>0?o:1-o;if("YY"===t){var a=r%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):(0,l.default)(r,t.length)},R:function(e,t){var n=(0,r.default)(e);return(0,l.default)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return(0,l.default)(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return(0,l.default)(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return(0,l.default)(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return u.default.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return(0,l.default)(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var o=(0,a.default)(e,i);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):(0,l.default)(o,t.length)},I:function(e,t,n){var i=(0,o.default)(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):(0,l.default)(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u.default.d(e,t)},D:function(e,t,n){var o=(0,i.default)(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):(0,l.default)(o,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var o=e.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return(0,l.default)(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var o=e.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return(0,l.default)(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),o=0===i?7:i;switch(t){case"i":return String(o);case"ii":return(0,l.default)(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i,o=e.getUTCHours();switch(i=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i,o=e.getUTCHours();switch(i=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var i=e.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return u.default.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u.default.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u.default.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u.default.s(e,t)},S:function(e,t){return u.default.S(e,t)},X:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return h(o);case"XXXX":case"XX":return p(o);default:return p(o,":")}},x:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();switch(t){case"x":return h(o);case"xxxx":case"xx":return p(o);default:return p(o,":")}},O:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+d(o,":");default:return"GMT"+p(o,":")}},z:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+d(o,":");default:return"GMT"+p(o,":")}},t:function(e,t,n,i){var o=i._originalDate||e,r=Math.floor(o.getTime()/1e3);return(0,l.default)(r,t.length)},T:function(e,t,n,i){var o=(i._originalDate||e).getTime();return(0,l.default)(o,t.length)}};t.default=f,e.exports=t.default},2699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(7394))&&i.__esModule?i:{default:i},r={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return(0,o.default)("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):(0,o.default)(n+1,2)},d:function(e,t){return(0,o.default)(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return(0,o.default)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,o.default)(e.getUTCHours(),t.length)},m:function(e,t){return(0,o.default)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,o.default)(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),r=Math.floor(i*Math.pow(10,n-3));return(0,o.default)(r,t.length)}};t.default=r,e.exports=t.default},5209:(e,t)=>{function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={p:i,P:function(e,t){var o,r=e.match(/(P+)(p+)?/)||[],a=r[1],s=r[2];if(!s)return n(e,t);switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",n(a,t)).replace("{{time}}",i(s,t))}};t.default=o,e.exports=t.default},3561:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()},e.exports=t.default},1603:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,i.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),s=n-r;return Math.floor(s/a)+1};var i=r(n(1171)),o=r(n(8734));function r(e){return e&&e.__esModule?e:{default:e}}var a=864e5;e.exports=t.default},1354:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,i.default)(e),n=(0,o.default)(t).getTime()-(0,r.default)(t).getTime();return Math.round(n/l)+1};var i=s(n(1171)),o=s(n(79)),r=s(n(4275)),a=s(n(8734));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},1370:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,i.default)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var s=(0,r.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,r.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var i=a(n(1171)),o=a(n(8734)),r=a(n(79));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},623:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(1,arguments);var n=(0,i.default)(e),s=(0,o.default)(n,t).getTime()-(0,r.default)(n,t).getTime();return Math.round(s/l)+1};var i=s(n(1171)),o=s(n(9209)),r=s(n(4118)),a=s(n(8734));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},6226:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(1,arguments);var n=(0,i.default)(e),s=n.getUTCFullYear(),l=t||{},u=l.locale,c=u&&u.options&&u.options.firstWeekContainsDate,d=null==c?1:(0,a.default)(c),h=null==l.firstWeekContainsDate?d:(0,a.default)(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(s+1,0,h),p.setUTCHours(0,0,0,0);var f=(0,r.default)(p,t),g=new Date(0);g.setUTCFullYear(s,0,h),g.setUTCHours(0,0,0,0);var m=(0,r.default)(g,t);return n.getTime()>=f.getTime()?s+1:n.getTime()>=m.getTime()?s:s-1};var i=s(n(1171)),o=s(n(8734)),r=s(n(9209)),a=s(n(2084));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},6736:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isProtectedDayOfYearToken=function(e){return-1!==n.indexOf(e)},t.isProtectedWeekYearToken=function(e){return-1!==i.indexOf(e)},t.throwProtectedError=function(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))};var n=["D","DD"],i=["YY","YYYY"]},8734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default},79:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=1,n=(0,i.default)(e),r=n.getUTCDay(),a=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n};var i=r(n(1171)),o=r(n(8734));function r(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},4275:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var a=(0,o.default)(n);return a};var i=a(n(1370)),o=a(n(79)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},9209:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(1,arguments);var n=t||{},a=n.locale,s=a&&a.options&&a.options.weekStartsOn,l=null==s?0:(0,r.default)(s),u=null==n.weekStartsOn?l:(0,r.default)(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=(0,i.default)(e),d=c.getUTCDay(),h=(d<u?7:0)+d-u;return c.setUTCDate(c.getUTCDate()-h),c.setUTCHours(0,0,0,0),c};var i=a(n(1171)),o=a(n(8734)),r=a(n(2084));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},4118:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(1,arguments);var n=t||{},s=n.locale,l=s&&s.options&&s.options.firstWeekContainsDate,u=null==l?1:(0,a.default)(l),c=null==n.firstWeekContainsDate?u:(0,a.default)(n.firstWeekContainsDate),d=(0,i.default)(e,t),h=new Date(0);h.setUTCFullYear(d,0,c),h.setUTCHours(0,0,0,0);var p=(0,r.default)(h,t);return p};var i=s(n(6226)),o=s(n(8734)),r=s(n(9209)),a=s(n(2084));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},2084:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default},5065:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(2,arguments);var n=(0,o.default)(e).getTime(),a=(0,i.default)(t);return new Date(n+a)};var i=a(n(2084)),o=a(n(1171)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5616:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){(0,h.default)(2,arguments);var p=String(t),m=n||{},b=m.locale||o.default,w=b.options&&b.options.firstWeekContainsDate,C=null==w?1:(0,d.default)(w),x=null==m.firstWeekContainsDate?C:(0,d.default)(m.firstWeekContainsDate);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=b.options&&b.options.weekStartsOn,S=null==A?0:(0,d.default)(A),k=null==m.weekStartsOn?S:(0,d.default)(m.weekStartsOn);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var T=(0,a.default)(e);if(!(0,i.default)(T))throw new RangeError("Invalid time value");var _=(0,u.default)(T),E=(0,r.default)(T,_),O={firstWeekContainsDate:x,weekStartsOn:k,locale:b,_originalDate:T},P=p.match(g).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,l.default[t])(e,b.formatLong,O):e})).join("").match(f).map((function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return y(n);var o=s.default[i];if(o)return!m.useAdditionalWeekYearTokens&&(0,c.isProtectedWeekYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),!m.useAdditionalDayOfYearTokens&&(0,c.isProtectedDayOfYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),o(E,n,b.localize,O);if(i.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n})).join("");return P};var i=p(n(9989)),o=p(n(2512)),r=p(n(3239)),a=p(n(1171)),s=p(n(7100)),l=p(n(5209)),u=p(n(3561)),c=n(6736),d=p(n(2084)),h=p(n(8734));function p(e){return e&&e.__esModule?e:{default:e}}var f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,b=/''/g,v=/[a-zA-Z]/;function y(e){return e.match(m)[1].replace(b,"'")}e.exports=t.default},2382:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)};var i,o=(i=n(8734))&&i.__esModule?i:{default:i};e.exports=t.default},9989:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(1,arguments),!(0,i.default)(e)&&"number"!=typeof e)return!1;var t=(0,o.default)(e);return!isNaN(Number(t))};var i=a(n(2382)),o=a(n(1171)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},289:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}},e.exports=t.default},6245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){var i,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,a=o.width?String(o.width):r;i=e.formattingValues[a]||e.formattingValues[r]}else{var s=e.defaultWidth,l=o.width?String(o.width):e.defaultWidth;i=e.values[l]||e.values[s]}return i[e.argumentCallback?e.argumentCallback(t):t]}},e.exports=t.default},3421:(e,t)=>{function n(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function i(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(a);if(!s)return null;var l,u=s[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?i(c,(function(e){return e.test(u)})):n(c,(function(e){return e.test(u)}));l=e.valueCallback?e.valueCallback(d):d,l=o.valueCallback?o.valueCallback(l):l;var h=t.slice(u.length);return{value:l,rest:h}}},e.exports=t.default},8926:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var o=i[0],r=t.match(e.parsePattern);if(!r)return null;var a=e.valueCallback?e.valueCallback(r[0]):r[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(o.length);return{value:a,rest:s}}},e.exports=t.default},1924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.default=function(e,t,i){var o,r=n[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},e.exports=t.default},6469:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(289))&&i.__esModule?i:{default:i},r={date:(0,o.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,o.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,o.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};t.default=r,e.exports=t.default},5102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.default=function(e,t,i,o){return n[e]},e.exports=t.default},7839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(6245))&&i.__esModule?i:{default:i},r={ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,o.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,o.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,o.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,o.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,o.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};t.default=r,e.exports=t.default},9796:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(3421));function o(e){return e&&e.__esModule?e:{default:e}}var r={ordinalNumber:(0,o(n(8926)).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,i.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,i.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};t.default=r,e.exports=t.default},2512:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(n(1924)),o=l(n(6469)),r=l(n(5102)),a=l(n(7839)),s=l(n(9796));function l(e){return e&&e.__esModule?e:{default:e}}var u={code:"en-US",formatDistance:i.default,formatLong:o.default,formatRelative:r.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=u,e.exports=t.default},3239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(2,arguments);var n=(0,i.default)(t);return(0,o.default)(e,-n)};var i=a(n(2084)),o=a(n(5065)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},1171:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))};var i,o=(i=n(8734))&&i.__esModule?i:{default:i};e.exports=t.default},7856:function(e){e.exports=function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object;let{freeze:r,seal:a,create:s}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;r||(r=function(e){return e}),a||(a=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const c=A(Array.prototype.forEach),d=A(Array.prototype.pop),h=A(Array.prototype.push),p=A(String.prototype.toLowerCase),f=A(String.prototype.toString),g=A(String.prototype.match),m=A(String.prototype.replace),b=A(String.prototype.indexOf),v=A(String.prototype.trim),y=A(Object.prototype.hasOwnProperty),w=A(RegExp.prototype.test),C=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(x,t)});var x;function A(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return l(e,t,i)}}function S(e,i){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let r=i.length;for(;r--;){let t=i[r];if("string"==typeof t){const e=o(t);e!==t&&(n(i)||(i[r]=e),t=e)}e[t]=!0}return e}function k(e){for(let t=0;t<e.length;t++)y(e,t)||(e[t]=null);return e}function T(t){const n=s(null);for(const[i,o]of e(t))y(t,i)&&(Array.isArray(o)?n[i]=k(o):o&&"object"==typeof o&&o.constructor===Object?n[i]=T(o):n[i]=o);return n}function _(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=i(e)}return function(){return null}}const E=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),N=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=r(["#text"]),U=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),L=r(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),R=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),H=a(/<%[\w\W]*|[\w\W]*%>/gm),F=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),$=a(/^aria-[\-\w]+$/),Q=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:H,TMPLIT_EXPR:F,DATA_ATTR:z,ARIA_ATTR:$,IS_ALLOWED_URI:Q,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:q,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const K=function(){return"undefined"==typeof window?null:window},X=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const i=e=>t(e);if(i.version="3.1.2",i.removed=[],!n||!n.document||9!==n.document.nodeType)return i.isSupported=!1,i;let{document:o}=n;const a=o,l=a.currentScript,{DocumentFragment:u,HTMLTemplateElement:x,Node:A,Element:k,NodeFilter:j,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,G=k.prototype,q=_(G,"cloneNode"),V=_(G,"nextSibling"),Z=_(G,"childNodes"),J=_(G,"parentNode");if("function"==typeof x){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ee,te="";const{implementation:ne,createNodeIterator:ie,createDocumentFragment:oe,getElementsByTagName:re}=o,{importNode:ae}=a;let se={};i.isSupported="function"==typeof e&&"function"==typeof J&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ue,TMPLIT_EXPR:ce,DATA_ATTR:de,ARIA_ATTR:he,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:ge}=Y;let{IS_ALLOWED_URI:me}=Y,be=null;const ve=S({},[...E,...O,...P,...M,...D]);let ye=null;const we=S({},[...U,...L,...B,...R]);let Ce=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Ae=null,Se=!0,ke=!0,Te=!1,_e=!0,Ee=!1,Oe=!0,Pe=!1,Ne=!1,Me=!1,Ie=!1,De=!1,Ue=!1,Le=!0,Be=!1;const Re="user-content-";let je=!0,He=!1,Fe={},ze=null;const $e=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qe=null;const Ge=S({},["audio","video","img","source","image","track"]);let qe=null;const We=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Xe=Ke,Ze=!1,Je=null;const et=S({},[Ve,Ye,Ke],f);let tt=null;const nt=["application/xhtml+xml","text/html"],it="text/html";let ot=null,rt=null;const at=255,st=o.createElement("form"),lt=function(e){return e instanceof RegExp||e instanceof Function},ut=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!rt||rt!==e){if(e&&"object"==typeof e||(e={}),e=T(e),tt=-1===nt.indexOf(e.PARSER_MEDIA_TYPE)?it:e.PARSER_MEDIA_TYPE,ot="application/xhtml+xml"===tt?f:p,be=y(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,ot):ve,ye=y(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,ot):we,Je=y(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,f):et,qe=y(e,"ADD_URI_SAFE_ATTR")?S(T(We),e.ADD_URI_SAFE_ATTR,ot):We,Qe=y(e,"ADD_DATA_URI_TAGS")?S(T(Ge),e.ADD_DATA_URI_TAGS,ot):Ge,ze=y(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,ot):$e,xe=y(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,ot):{},Ae=y(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,ot):{},Fe=!!y(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,_e=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Oe=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||Q,Xe=e.NAMESPACE||Ke,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&lt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&lt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(ke=!1),De&&(Ie=!0),Fe&&(be=S({},D),ye=[],!0===Fe.html&&(S(be,E),S(ye,U)),!0===Fe.svg&&(S(be,O),S(ye,L),S(ye,R)),!0===Fe.svgFilters&&(S(be,P),S(ye,L),S(ye,R)),!0===Fe.mathMl&&(S(be,M),S(ye,B),S(ye,R))),e.ADD_TAGS&&(be===ve&&(be=T(be)),S(be,e.ADD_TAGS,ot)),e.ADD_ATTR&&(ye===we&&(ye=T(ye)),S(ye,e.ADD_ATTR,ot)),e.ADD_URI_SAFE_ATTR&&S(qe,e.ADD_URI_SAFE_ATTR,ot),e.FORBID_CONTENTS&&(ze===$e&&(ze=T(ze)),S(ze,e.FORBID_CONTENTS,ot)),je&&(be["#text"]=!0),Pe&&S(be,["html","head","body"]),be.table&&(S(be,["tbody"]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=X($,l)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));r&&r(e),rt=e}},ct=S({},["mi","mo","mn","ms","mtext"]),dt=S({},["foreignobject","annotation-xml"]),ht=S({},["title","style","font","a","script"]),pt=S({},[...O,...P,...N]),ft=S({},[...M,...I]),gt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),i=p(t.tagName);return!!Je[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===i||ct[i]):Boolean(pt[n]):e.namespaceURI===Ve?t.namespaceURI===Ke?"math"===n:t.namespaceURI===Ye?"math"===n&&dt[i]:Boolean(ft[n]):e.namespaceURI===Ke?!(t.namespaceURI===Ye&&!dt[i])&&!(t.namespaceURI===Ve&&!ct[i])&&!ft[n]&&(ht[n]||!pt[n]):!("application/xhtml+xml"!==tt||!Je[e.namespaceURI]))},mt=function(e){h(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},bt=function(e,t){try{h(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Ie||De)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===tt&&Xe===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=ee?ee.createHTML(e):e;if(Xe===Ke)try{t=(new z).parseFromString(i,tt)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ze?te:i}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(o.createTextNode(n),r.childNodes[0]||null),Xe===Ke?re.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:r},yt=function(e){return ie.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof F&&(void 0!==e.__depth&&"number"!=typeof e.__depth||void 0!==e.__removalCount&&"number"!=typeof e.__removalCount||"string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ct=function(e){return"function"==typeof A&&e instanceof A},xt=function(e,t,n){se[e]&&c(se[e],(e=>{e.call(i,t,n,rt)}))},At=function(e){let t=null;if(xt("beforeSanitizeElements",e,null),wt(e))return mt(e),!0;const n=ot(e.nodeName);if(xt("uponSanitizeElement",e,{tagName:n,allowedTags:be}),e.hasChildNodes()&&!Ct(e.firstElementChild)&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(Oe&&8===e.nodeType&&w(/<[/\w]/g,e.data))return mt(e),!0;if(!be[n]||xe[n]){if(!xe[n]&&kt(n)){if(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(je&&!ze[n]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let i=n.length-1;i>=0;--i){const o=q(n[i],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,V(e))}}return mt(e),!0}return e instanceof k&&!gt(e)?(mt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!w(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,c([le,ue,ce],(e=>{t=m(t,e," ")})),e.textContent!==t&&(h(i.removed,{element:e.cloneNode()}),e.textContent=t)),xt("afterSanitizeElements",e,null),!1):(mt(e),!0)},St=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in o||n in st))return!1;if(ke&&!Ae[t]&&w(de,t));else if(Se&&w(he,t));else if(!ye[t]||Ae[t]){if(!(kt(e)&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&w(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(qe[t]);else if(w(me,m(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!Qe[e])if(Te&&!w(pe,m(n,fe,"")));else if(n)return!1;return!0},kt=function(e){return"annotation-xml"!==e&&g(e,ge)},Tt=function(e){xt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let o=t.length;for(;o--;){const r=t[o],{name:a,namespaceURI:s,value:l}=r,u=ot(a);let h="value"===a?l:v(l);if(n.attrName=u,n.attrValue=h,n.keepAttr=!0,n.forceKeepAttr=void 0,xt("uponSanitizeAttribute",e,n),h=n.attrValue,n.forceKeepAttr)continue;if(bt(a,e),!n.keepAttr)continue;if(!_e&&w(/\/>/i,h)){bt(a,e);continue}Ee&&c([le,ue,ce],(e=>{h=m(h,e," ")}));const p=ot(e.nodeName);if(St(p,u,h)){if(!Be||"id"!==u&&"name"!==u||(bt(a,e),h=Re+h),ee&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(s);else switch($.getAttributeType(p,u)){case"TrustedHTML":h=ee.createHTML(h);break;case"TrustedScriptURL":h=ee.createScriptURL(h)}try{s?e.setAttributeNS(s,a,h):e.setAttribute(a,h),d(i.removed)}catch(e){}}}xt("afterSanitizeAttributes",e,null)},_t=function e(t){let n=null;const i=yt(t);for(xt("beforeSanitizeShadowDOM",t,null);n=i.nextNode();){if(xt("uponSanitizeShadowNode",n,null),At(n))continue;const t=J(n);1===n.nodeType&&(t&&t.__depth?n.__depth=(n.__removalCount||0)+t.__depth+1:n.__depth=1),n.__depth>=at&&mt(n),n.content instanceof u&&(n.content.__depth=n.__depth,e(n.content)),Tt(n)}xt("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,r=null,s=null;if(Ze=!e,Ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ct(e)){if("function"!=typeof e.toString)throw C("toString is not a function");if("string"!=typeof(e=e.toString()))throw C("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Ne||ut(t),i.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=ot(e.nodeName);if(!be[t]||xe[t])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof A)n=vt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ie&&!Ee&&!Pe&&-1===e.indexOf("<"))return ee&&Ue?ee.createHTML(e):e;if(n=vt(e),!n)return Ie?null:Ue?te:""}n&&Me&&mt(n.firstChild);const l=yt(He?e:n);for(;r=l.nextNode();){if(At(r))continue;const e=J(r);1===r.nodeType&&(e&&e.__depth?r.__depth=(r.__removalCount||0)+e.__depth+1:r.__depth=1),r.__depth>=at&&mt(r),r.content instanceof u&&(r.content.__depth=r.__depth,_t(r.content)),Tt(r)}if(He)return e;if(Ie){if(De)for(s=oe.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ye.shadowroot||ye.shadowrootmode)&&(s=ae.call(a,s,!0)),s}let d=Pe?n.outerHTML:n.innerHTML;return Pe&&be["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&w(W,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),Ee&&c([le,ue,ce],(e=>{d=m(d,e," ")})),ee&&Ue?ee.createHTML(d):d},i.setConfig=function(){ut(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},i.clearConfig=function(){rt=null,Ne=!1},i.isValidAttribute=function(e,t,n){rt||ut({});const i=ot(e),o=ot(t);return St(i,o,n)},i.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],h(se[e],t))},i.removeHook=function(e){if(se[e])return d(se[e])},i.removeHooks=function(e){se[e]&&(se[e]=[])},i.removeAllHooks=function(){se={}},i}()}()},8552:(e,t,n)=>{var i=n(852)(n(5639),"DataView");e.exports=i},1989:(e,t,n)=>{var i=n(1789),o=n(401),r=n(7667),a=n(1327),s=n(1866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=a,l.prototype.set=s,e.exports=l},8407:(e,t,n)=>{var i=n(7040),o=n(4125),r=n(2117),a=n(7529),s=n(4705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=a,l.prototype.set=s,e.exports=l},7071:(e,t,n)=>{var i=n(852)(n(5639),"Map");e.exports=i},3369:(e,t,n)=>{var i=n(4785),o=n(1285),r=n(6e3),a=n(9916),s=n(5265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=a,l.prototype.set=s,e.exports=l},3818:(e,t,n)=>{var i=n(852)(n(5639),"Promise");e.exports=i},8525:(e,t,n)=>{var i=n(852)(n(5639),"Set");e.exports=i},8668:(e,t,n)=>{var i=n(3369),o=n(619),r=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=r,e.exports=a},6384:(e,t,n)=>{var i=n(8407),o=n(7465),r=n(3779),a=n(7599),s=n(4758),l=n(4309);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=r,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},2705:(e,t,n)=>{var i=n(5639).Symbol;e.exports=i},1149:(e,t,n)=>{var i=n(5639).Uint8Array;e.exports=i},577:(e,t,n)=>{var i=n(852)(n(5639),"WeakMap");e.exports=i},4174:e=>{e.exports=function(e,t,n,i){for(var o=-1,r=null==e?0:e.length;++o<r;){var a=e[o];t(i,a,n(a),e)}return i}},7412:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},4963:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n<i;){var a=e[n];t(a,n,e)&&(r[o++]=a)}return r}},4636:(e,t,n)=>{var i=n(2545),o=n(5694),r=n(1469),a=n(4144),s=n(5776),l=n(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=r(e),c=!n&&o(e),d=!n&&!c&&a(e),h=!n&&!c&&!d&&l(e),p=n||c||d||h,f=p?i(e.length,String):[],g=f.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g))||f.push(m);return f}},9932:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}},2488:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}},2663:e=>{e.exports=function(e,t,n,i){var o=-1,r=null==e?0:e.length;for(i&&r&&(n=e[++o]);++o<r;)n=t(n,e[o],o,e);return n}},2908:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},4286:e=>{e.exports=function(e){return e.split("")}},9029:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},8470:(e,t,n)=>{var i=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},1119:(e,t,n)=>{var i=n(9881);e.exports=function(e,t,n,o){return i(e,(function(e,i,r){t(o,e,n(e),r)})),o}},9465:(e,t,n)=>{var i=n(8777);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var i=n(3218),o=Object.create,r=function(){function e(){}return function(t){if(!i(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=r},9881:(e,t,n)=>{var i=n(7816),o=n(9291)(i);e.exports=o},8483:(e,t,n)=>{var i=n(5063)();e.exports=i},7816:(e,t,n)=>{var i=n(8483),o=n(3674);e.exports=function(e,t){return e&&i(e,t,o)}},7786:(e,t,n)=>{var i=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,r=(t=i(t,e)).length;null!=e&&n<r;)e=e[o(t[n++])];return n&&n==r?e:void 0}},8866:(e,t,n)=>{var i=n(2488),o=n(1469);e.exports=function(e,t,n){var r=t(e);return o(e)?r:i(r,n(e))}},4239:(e,t,n)=>{var i=n(2705),o=n(9607),r=n(2333),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):r(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,n)=>{var i=n(4239),o=n(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==i(e)}},939:(e,t,n)=>{var i=n(2492),o=n(7005);e.exports=function e(t,n,r,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:i(t,n,r,a,e,s))}},2492:(e,t,n)=>{var i=n(6384),o=n(7114),r=n(8351),a=n(6096),s=n(4160),l=n(1469),u=n(4144),c=n(6719),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,b){var v=l(e),y=l(t),w=v?h:s(e),C=y?h:s(t),x=(w=w==d?p:w)==p,A=(C=C==d?p:C)==p,S=w==C;if(S&&u(e)){if(!u(t))return!1;v=!0,x=!1}if(S&&!x)return b||(b=new i),v||c(e)?o(e,t,n,g,m,b):r(e,t,w,n,g,m,b);if(!(1&n)){var k=x&&f.call(e,"__wrapped__"),T=A&&f.call(t,"__wrapped__");if(k||T){var _=k?e.value():e,E=T?t.value():t;return b||(b=new i),m(_,E,n,g,b)}}return!!S&&(b||(b=new i),a(e,t,n,g,m,b))}},2958:(e,t,n)=>{var i=n(6384),o=n(939);e.exports=function(e,t,n,r){var a=n.length,s=a,l=!r;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var c=(u=n[a])[0],d=e[c],h=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var p=new i;if(r)var f=r(d,h,c,e,t,p);if(!(void 0===f?o(h,d,3,r,p):f))return!1}}return!0}},8458:(e,t,n)=>{var i=n(3560),o=n(5346),r=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,h=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!r(e)||o(e))&&(i(e)?h:s).test(a(e))}},8749:(e,t,n)=>{var i=n(4239),o=n(1780),r=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return r(e)&&o(e.length)&&!!a[i(e)]}},7206:(e,t,n)=>{var i=n(1573),o=n(6432),r=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?r:"object"==typeof e?a(e)?o(e[0],e[1]):i(e):s(e)}},280:(e,t,n)=>{var i=n(5726),o=n(6916),r=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=[];for(var n in Object(e))r.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1573:(e,t,n)=>{var i=n(2958),o=n(1499),r=n(2634);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?r(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}},6432:(e,t,n)=>{var i=n(939),o=n(7361),r=n(9095),a=n(5403),s=n(9162),l=n(2634),u=n(327);e.exports=function(e,t){return a(e)&&s(t)?l(u(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?r(n,e):i(t,a,3)}}},371:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var i=n(7786);e.exports=function(e){return function(t){return i(t,e)}}},8674:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},4259:e=>{e.exports=function(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(o);++i<o;)r[i]=e[i+t];return r}},2545:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},531:(e,t,n)=>{var i=n(2705),o=n(9932),r=n(1469),a=n(3448),s=i?i.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(r(t))return o(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var i=n(7990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(o,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},4757:e=>{e.exports=function(e,t){return e.has(t)}},1811:(e,t,n)=>{var i=n(1469),o=n(5403),r=n(5514),a=n(9833);e.exports=function(e,t){return i(e)?e:o(e,t)?[e]:r(a(e))}},180:(e,t,n)=>{var i=n(4259);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:i(e,t,n)}},4429:(e,t,n)=>{var i=n(5639)["__core-js_shared__"];e.exports=i},5189:(e,t,n)=>{var i=n(4174),o=n(1119),r=n(7206),a=n(1469);e.exports=function(e,t){return function(n,s){var l=a(n)?i:o,u=t?t():{};return l(n,e,r(s,2),u)}}},9291:(e,t,n)=>{var i=n(8612);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!i(n))return e(n,o);for(var r=n.length,a=t?r:-1,s=Object(n);(t?a--:++a<r)&&!1!==o(s[a],a,s););return n}}},5063:e=>{e.exports=function(e){return function(t,n,i){for(var o=-1,r=Object(t),a=i(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(r[l],l,r))break}return t}}},8805:(e,t,n)=>{var i=n(180),o=n(2689),r=n(3140),a=n(9833);e.exports=function(e){return function(t){t=a(t);var n=o(t)?r(t):void 0,s=n?n[0]:t.charAt(0),l=n?i(n,1).join(""):t.slice(1);return s[e]()+l}}},5393:(e,t,n)=>{var i=n(2663),o=n(3816),r=n(8748),a=RegExp("['’]","g");e.exports=function(e){return function(t){return i(r(o(t).replace(a,"")),e,"")}}},9389:(e,t,n)=>{var i=n(8674)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=i},8777:(e,t,n)=>{var i=n(852),o=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:(e,t,n)=>{var i=n(8668),o=n(2908),r=n(4757);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var b=e[f],v=t[f];if(a)var y=u?a(v,b,f,t,e,l):a(b,v,f,e,t,l);if(void 0!==y){if(y)continue;g=!1;break}if(m){if(!o(t,(function(e,t){if(!r(m,t)&&(b===e||s(b,e,n,a,l)))return m.push(t)}))){g=!1;break}}else if(b!==v&&!s(b,v,n,a,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},8351:(e,t,n)=>{var i=n(2705),o=n(1149),r=n(7813),a=n(7114),s=n(8776),l=n(1814),u=i?i.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&i;if(p||(p=l),e.size!=t.size&&!f)return!1;var g=h.get(e);if(g)return g==t;i|=2,h.set(e,t);var m=a(p(e),p(t),i,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},6096:(e,t,n)=>{var i=n(8234),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,r,a,s){var l=1&n,u=i(e),c=u.length;if(c!=i(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:o.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<c;){var b=e[h=u[d]],v=t[h];if(r)var y=l?r(v,b,h,t,e,s):r(b,v,h,e,t,s);if(!(void 0===y?b===v||a(b,v,n,r,s):y)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var w=e.constructor,C=t.constructor;w==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof C&&C instanceof C||(g=!1)}return s.delete(e),s.delete(t),g}},1957:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},8234:(e,t,n)=>{var i=n(8866),o=n(9551),r=n(3674);e.exports=function(e){return i(e,r,o)}},5050:(e,t,n)=>{var i=n(7019);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var i=n(9162),o=n(3674);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,i(a)]}return t}},852:(e,t,n)=>{var i=n(8458),o=n(7801);e.exports=function(e,t){var n=o(e,t);return i(n)?n:void 0}},5924:(e,t,n)=>{var i=n(5569)(Object.getPrototypeOf,Object);e.exports=i},9607:(e,t,n)=>{var i=n(2705),o=Object.prototype,r=o.hasOwnProperty,a=o.toString,s=i?i.toStringTag:void 0;e.exports=function(e){var t=r.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var o=a.call(e);return i&&(t?e[s]=n:delete e[s]),o}},9551:(e,t,n)=>{var i=n(4963),o=n(479),r=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),i(a(e),(function(t){return r.call(e,t)})))}:o;e.exports=s},4160:(e,t,n)=>{var i=n(8552),o=n(7071),r=n(3818),a=n(8525),s=n(577),l=n(4239),u=n(346),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(i),m=u(o),b=u(r),v=u(a),y=u(s),w=l;(i&&w(new i(new ArrayBuffer(1)))!=f||o&&w(new o)!=c||r&&w(r.resolve())!=d||a&&w(new a)!=h||s&&w(new s)!=p)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case g:return f;case m:return c;case b:return d;case v:return h;case y:return p}return t}),e.exports=w},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var i=n(1811),o=n(5694),r=n(1469),a=n(5776),s=n(1780),l=n(327);e.exports=function(e,t,n){for(var u=-1,c=(t=i(t,e)).length,d=!1;++u<c;){var h=l(t[u]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&s(c)&&a(h,c)&&(r(e)||o(e))}},2689:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3157:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},1789:(e,t,n)=>{var i=n(4536);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var i=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var i=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:o.call(t,e)}},1866:(e,t,n)=>{var i=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},5403:(e,t,n)=>{var i=n(1469),o=n(3448),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!r.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var i,o=n(4429),r=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!r&&r in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var i=n(3218);e.exports=function(e){return e==e&&!i(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var i=n(8470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var i=n(8470);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},7529:(e,t,n)=>{var i=n(8470);e.exports=function(e){return i(this.__data__,e)>-1}},4705:(e,t,n)=>{var i=n(8470);e.exports=function(e,t){var n=this.__data__,o=i(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:(e,t,n)=>{var i=n(1989),o=n(8407),r=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(r||o),string:new i}}},1285:(e,t,n)=>{var i=n(5050);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var i=n(5050);e.exports=function(e){return i(this,e).get(e)}},9916:(e,t,n)=>{var i=n(5050);e.exports=function(e){return i(this,e).has(e)}},5265:(e,t,n)=>{var i=n(5050);e.exports=function(e,t){var n=i(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var i=n(8306);e.exports=function(e){var t=i(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var i=n(852)(Object,"create");e.exports=i},6916:(e,t,n)=>{var i=n(5569)(Object.keys,Object);e.exports=i},1167:(e,t,n)=>{e=n.nmd(e);var i=n(1957),o=t&&!t.nodeType&&t,r=o&&e&&!e.nodeType&&e,a=r&&r.exports===o&&i.process,s=function(){try{return r&&r.require&&r.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5639:(e,t,n)=>{var i=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,r=i||o||Function("return this")();e.exports=r},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:(e,t,n)=>{var i=n(8407);e.exports=function(){this.__data__=new i,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var i=n(8407),o=n(7071),r=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new r(a)}return n.set(e,t),this.size=n.size,this}},3140:(e,t,n)=>{var i=n(4286),o=n(2689),r=n(676);e.exports=function(e){return o(e)?r(e):i(e)}},5514:(e,t,n)=>{var i=n(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,a=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,i,o){t.push(i?o.replace(r,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var i=n(3448);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},676:e=>{var t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",r="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+t+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",l=s+a+"(?:\\u200d(?:"+[i,o,r].join("|")+")"+s+a+")*",u="(?:"+[i+t+"?",t,o,r,"[\\ud800-\\udfff]"].join("|")+")",c=RegExp(n+"(?="+n+")|"+u+l,"g");e.exports=function(e){return e.match(c)||[]}},2757:e=>{var t="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+i+"]",r="\\d+",a="["+t+"]",s="[^\\ud800-\\udfff"+i+r+"\\u2700-\\u27bf"+t+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="["+n+"]",d="(?:"+a+"|"+s+")",h="(?:"+c+"|"+s+")",p="(?:['’](?:d|ll|m|re|s|t|ve))?",f="(?:['’](?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",m="[\\ufe0e\\ufe0f]?",b=m+g+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",l,u].join("|")+")"+m+g+")*",v="(?:"+["[\\u2700-\\u27bf]",l,u].join("|")+")"+b,y=RegExp([c+"?"+a+"+"+p+"(?="+[o,c,"$"].join("|")+")",h+"+"+f+"(?="+[o,c+d,"$"].join("|")+")",c+"?"+d+"+"+p,c+"+"+f,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",r,v].join("|"),"g");e.exports=function(e){return e.match(y)||[]}},8929:(e,t,n)=>{var i=n(8403),o=n(5393)((function(e,t,n){return t=t.toLowerCase(),e+(n?i(t):t)}));e.exports=o},8403:(e,t,n)=>{var i=n(9833),o=n(1700);e.exports=function(e){return o(i(e).toLowerCase())}},3279:(e,t,n)=>{var i=n(3218),o=n(7771),r=n(4841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,g=!1,m=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,i=u;return l=u=void 0,f=t,d=e.apply(i,n)}function y(e){return f=e,h=setTimeout(C,t),g?v(e):d}function w(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-f>=c}function C(){var e=o();if(w(e))return x(e);h=setTimeout(C,function(e){var n=t-(e-p);return m?s(n,c-(e-f)):n}(e))}function x(e){return h=void 0,b&&l?v(e):(l=u=void 0,d)}function A(){var e=o(),n=w(e);if(l=arguments,u=this,p=e,n){if(void 0===h)return y(p);if(m)return clearTimeout(h),h=setTimeout(C,t),v(p)}return void 0===h&&(h=setTimeout(C,t)),d}return t=r(t)||0,i(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(r(n.maxWait)||0,t):c,b="trailing"in n?!!n.trailing:b),A.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},A.flush=function(){return void 0===h?d:x(o())},A}},3816:(e,t,n)=>{var i=n(9389),o=n(9833),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(r,i).replace(a,"")}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7361:(e,t,n)=>{var i=n(7786);e.exports=function(e,t,n){var o=null==e?void 0:i(e,t);return void 0===o?n:o}},7739:(e,t,n)=>{var i=n(9465),o=n(5189),r=Object.prototype.hasOwnProperty,a=o((function(e,t,n){r.call(e,n)?e[n].push(t):i(e,n,[t])}));e.exports=a},9095:(e,t,n)=>{var i=n(13),o=n(222);e.exports=function(e,t){return null!=e&&o(e,t,i)}},6557:e=>{e.exports=function(e){return e}},5694:(e,t,n)=>{var i=n(9454),o=n(7005),r=Object.prototype,a=r.hasOwnProperty,s=r.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var i=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!i(e)}},4144:(e,t,n)=>{e=n.nmd(e);var i=n(5639),o=n(5062),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,s=a&&a.exports===r?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},8367:(e,t,n)=>{var i=n(280),o=n(4160),r=n(5694),a=n(1469),s=n(8612),l=n(4144),u=n(5726),c=n(6719),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||r(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!i(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var i=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},3448:(e,t,n)=>{var i=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==i(e)}},6719:(e,t,n)=>{var i=n(8749),o=n(7518),r=n(1167),a=r&&r.isTypedArray,s=a?o(a):i;e.exports=s},3674:(e,t,n)=>{var i=n(4636),o=n(280),r=n(8612);e.exports=function(e){return r(e)?i(e):o(e)}},6604:(e,t,n)=>{var i=n(9465),o=n(7816),r=n(7206);e.exports=function(e,t){var n={};return t=r(t,3),o(e,(function(e,o,r){i(n,o,t(e,o,r))})),n}},8306:(e,t,n)=>{var i=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var a=e.apply(this,i);return n.cache=r.set(o,a)||r,a};return n.cache=new(o.Cache||i),n}o.Cache=i,e.exports=o},308:e=>{e.exports=function(){}},7771:(e,t,n)=>{var i=n(5639);e.exports=function(){return i.Date.now()}},9601:(e,t,n)=>{var i=n(371),o=n(9152),r=n(5403),a=n(327);e.exports=function(e){return r(e)?i(a(e)):o(e)}},1865:(e,t,n)=>{var i=n(5393)((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));e.exports=i},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},4841:(e,t,n)=>{var i=n(7561),o=n(3218),r=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9833:(e,t,n)=>{var i=n(531);e.exports=function(e){return null==e?"":i(e)}},8718:(e,t,n)=>{var i=n(7412),o=n(3118),r=n(7816),a=n(7206),s=n(5924),l=n(1469),u=n(4144),c=n(3560),d=n(3218),h=n(6719);e.exports=function(e,t,n){var p=l(e),f=p||u(e)||h(e);if(t=a(t,4),null==n){var g=e&&e.constructor;n=f?p?new g:[]:d(e)&&c(g)?o(s(e)):{}}return(f?i:r)(e,(function(e,i,o){return t(n,e,i,o)})),n}},1700:(e,t,n)=>{var i=n(8805)("toUpperCase");e.exports=i},8748:(e,t,n)=>{var i=n(9029),o=n(3157),r=n(9833),a=n(2757);e.exports=function(e,t,n){return e=r(e),void 0===(t=n?void 0:t)?o(e)?a(e):i(e):e.match(t)||[]}},9594:function(e,t,n){e.exports=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function o(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function r(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function a(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function u(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},d={exports:{}};!function(e){!function(t,n){var i=Math.pow(2,-24),o=Math.pow(2,32),r=Math.pow(2,53),a={encode:function(e){var t,i=new ArrayBuffer(256),a=new DataView(i),s=0;function l(e){for(var n=i.byteLength,o=s+e;n<o;)n*=2;if(n!==i.byteLength){var r=a;i=new ArrayBuffer(n),a=new DataView(i);for(var l=s+3>>2,u=0;u<l;++u)a.setUint32(4*u,r.getUint32(4*u))}return t=e,a}function u(){s+=t}function c(e){u(l(1).setUint8(s,e))}function d(e){for(var t=l(e.length),n=0;n<e.length;++n)t.setUint8(s+n,e[n]);u()}function h(e,t){t<24?c(e<<5|t):t<256?(c(e<<5|24),c(t)):t<65536?(c(e<<5|25),function(e){u(l(2).setUint16(s,e))}(t)):t<4294967296?(c(e<<5|26),function(e){u(l(4).setUint32(s,e))}(t)):(c(e<<5|27),function(e){var t=e%o,n=(e-t)/o,i=l(8);i.setUint32(s,n),i.setUint32(s+4,t),u()}(t))}if(function e(t){var i;if(!1===t)return c(244);if(!0===t)return c(245);if(null===t)return c(246);if(t===n)return c(247);switch(typeof t){case"number":if(Math.floor(t)===t){if(0<=t&&t<=r)return h(0,t);if(-r<=t&&t<0)return h(1,-(t+1))}return c(251),function(e){u(l(8).setFloat64(s,e))}(t);case"string":var o=[];for(i=0;i<t.length;++i){var a=t.charCodeAt(i);a<128?o.push(a):a<2048?(o.push(192|a>>6),o.push(128|63&a)):a<55296?(o.push(224|a>>12),o.push(128|a>>6&63),o.push(128|63&a)):(a=(1023&a)<<10,a|=1023&t.charCodeAt(++i),a+=65536,o.push(240|a>>18),o.push(128|a>>12&63),o.push(128|a>>6&63),o.push(128|63&a))}return h(3,o.length),d(o);default:var p;if(Array.isArray(t))for(h(4,p=t.length),i=0;i<p;++i)e(t[i]);else if(t instanceof Uint8Array)h(2,t.length),d(t);else{var f=Object.keys(t);for(h(5,p=f.length),i=0;i<p;++i){var g=f[i];e(g),e(t[g])}}}}(e),"slice"in i)return i.slice(0,s);for(var p=new ArrayBuffer(s),f=new DataView(p),g=0;g<s;++g)f.setUint8(g,a.getUint8(g));return p},decode:function(e,t,r){var a=new DataView(e),s=0;function l(e,t){return s+=t,e}function u(t){return l(new Uint8Array(e,s,t),t)}function c(){return l(a.getUint8(s),1)}function d(){return l(a.getUint16(s),2)}function h(){return l(a.getUint32(s),4)}function p(){return 255===a.getUint8(s)&&(s+=1,!0)}function f(e){if(e<24)return e;if(24===e)return c();if(25===e)return d();if(26===e)return h();if(27===e)return h()*o+h();if(31===e)return-1;throw"Invalid length encoding"}function g(e){var t=c();if(255===t)return-1;var n=f(31&t);if(n<0||t>>5!==e)throw"Invalid indefinite length element";return n}function m(e,t){for(var n=0;n<t;++n){var i=c();128&i&&(i<224?(i=(31&i)<<6|63&c(),t-=1):i<240?(i=(15&i)<<12|(63&c())<<6|63&c(),t-=2):(i=(15&i)<<18|(63&c())<<12|(63&c())<<6|63&c(),t-=3)),i<65536?e.push(i):(i-=65536,e.push(55296|i>>10),e.push(56320|1023&i))}}"function"!=typeof t&&(t=function(e){return e}),"function"!=typeof r&&(r=function(){return n});var b=function e(){var o,h,b=c(),v=b>>5,y=31&b;if(7===v)switch(y){case 25:return function(){var e=new ArrayBuffer(4),t=new DataView(e),n=d(),o=32768&n,r=31744&n,a=1023&n;if(31744===r)r=261120;else if(0!==r)r+=114688;else if(0!==a)return a*i;return t.setUint32(0,o<<16|r<<13|a<<13),t.getFloat32(0)}();case 26:return l(a.getFloat32(s),4);case 27:return l(a.getFloat64(s),8)}if((h=f(y))<0&&(v<2||6<v))throw"Invalid length";switch(v){case 0:return h;case 1:return-1-h;case 2:if(h<0){for(var w=[],C=0;(h=g(v))>=0;)C+=h,w.push(u(h));var x=new Uint8Array(C),A=0;for(o=0;o<w.length;++o)x.set(w[o],A),A+=w[o].length;return x}return u(h);case 3:var S=[];if(h<0)for(;(h=g(v))>=0;)m(S,h);else m(S,h);return String.fromCharCode.apply(null,S);case 4:var k;if(h<0)for(k=[];!p();)k.push(e());else for(k=new Array(h),o=0;o<h;++o)k[o]=e();return k;case 5:var T={};for(o=0;o<h||h<0&&!p();++o)T[e()]=e();return T;case 6:return t(e(),h);case 7:switch(h){case 20:return!1;case 21:return!0;case 22:return null;case 23:return n;default:return r(h)}}}();if(s!==e.byteLength)throw"Remaining bytes";return b}};e.exports?e.exports=a:t.CBOR||(t.CBOR=a)}(c)}(d);var h=d.exports,p={exports:{}};!function(e,t){!function(e){var t={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function n(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}function i(e,n){var i=t[n||"all"];return i&&i.test(e)||!1}n.isUUID=i,n.VERSION="0.1.0",e.uuid=n,e.isUUID=i}(t),null!==e&&(e.exports=t.uuid)}(p,p.exports);var f=p.exports,g=function(){return f.uuid?f.uuid():f()},m=function(){function e(e){var t,n,i,o=e.setup;if(this._PNSDKSuffix={},this.instanceId="pn-".concat(g()),this.secretKey=o.secretKey||o.secret_key,this.subscribeKey=o.subscribeKey||o.subscribe_key,this.publishKey=o.publishKey||o.publish_key,this.sdkName=o.sdkName,this.sdkFamily=o.sdkFamily,this.partnerId=o.partnerId,this.setAuthKey(o.authKey),this.setCipherKey(o.cipherKey),this.setFilterExpression(o.filterExpression),"string"!=typeof o.origin&&!Array.isArray(o.origin)&&void 0!==o.origin)throw new Error("Origin must be either undefined, a string or a list of strings.");if(this.origin=o.origin||Array.from({length:20},(function(e,t){return"ps".concat(t+1,".pndsn.com")})),this.secure=o.ssl||!1,this.restore=o.restore||!1,this.proxy=o.proxy,this.keepAlive=o.keepAlive,this.keepAliveSettings=o.keepAliveSettings,this.autoNetworkDetection=o.autoNetworkDetection||!1,this.dedupeOnSubscribe=o.dedupeOnSubscribe||!1,this.maximumCacheSize=o.maximumCacheSize||100,this.customEncrypt=o.customEncrypt,this.customDecrypt=o.customDecrypt,this.fileUploadPublishRetryLimit=null!==(t=o.fileUploadPublishRetryLimit)&&void 0!==t?t:5,this.useRandomIVs=null===(n=o.useRandomIVs)||void 0===n||n,this.enableSubscribeBeta=null!==(i=o.enableSubscribeBeta)&&void 0!==i&&i,"undefined"!=typeof location&&"https:"===location.protocol&&(this.secure=!0),this.logVerbosity=o.logVerbosity||!1,this.suppressLeaveEvents=o.suppressLeaveEvents||!1,this.announceFailedHeartbeats=o.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=o.announceSuccessfulHeartbeats||!1,this.useInstanceId=o.useInstanceId||!1,this.useRequestId=o.useRequestId||!1,this.requestMessageCountThreshold=o.requestMessageCountThreshold,this.setTransactionTimeout(o.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(o.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(o.useSendBeacon||!0),o.presenceTimeout?this.setPresenceTimeout(o.presenceTimeout):this._presenceTimeout=300,null!=o.heartbeatInterval&&this.setHeartbeatInterval(o.heartbeatInterval),"string"==typeof o.userId){if("string"==typeof o.uuid)throw new Error("Only one of the following configuration options has to be provided: `uuid` or `userId`");this.setUserId(o.userId)}else{if("string"!=typeof o.uuid)throw new Error("One of the following configuration options has to be provided: `uuid` or `userId`");this.setUUID(o.uuid)}}return e.prototype.getAuthKey=function(){return this.authKey},e.prototype.setAuthKey=function(e){return this.authKey=e,this},e.prototype.setCipherKey=function(e){return this.cipherKey=e,this},e.prototype.getUUID=function(){return this.UUID},e.prototype.setUUID=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing uuid parameter. Provide a valid string uuid");return this.UUID=e,this},e.prototype.getUserId=function(){return this.UUID},e.prototype.setUserId=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");return this.UUID=e,this},e.prototype.getFilterExpression=function(){return this.filterExpression},e.prototype.setFilterExpression=function(e){return this.filterExpression=e,this},e.prototype.getPresenceTimeout=function(){return this._presenceTimeout},e.prototype.setPresenceTimeout=function(e){return e>=20?this._presenceTimeout=e:(this._presenceTimeout=20,console.log("WARNING: Presence timeout is less than the minimum. Using minimum value: ",this._presenceTimeout)),this.setHeartbeatInterval(this._presenceTimeout/2-1),this},e.prototype.setProxy=function(e){this.proxy=e},e.prototype.getHeartbeatInterval=function(){return this._heartbeatInterval},e.prototype.setHeartbeatInterval=function(e){return this._heartbeatInterval=e,this},e.prototype.getSubscribeTimeout=function(){return this._subscribeRequestTimeout},e.prototype.setSubscribeTimeout=function(e){return this._subscribeRequestTimeout=e,this},e.prototype.getTransactionTimeout=function(){return this._transactionalRequestTimeout},e.prototype.setTransactionTimeout=function(e){return this._transactionalRequestTimeout=e,this},e.prototype.isSendBeaconEnabled=function(){return this._useSendBeacon},e.prototype.setSendBeaconConfig=function(e){return this._useSendBeacon=e,this},e.prototype.getVersion=function(){return"7.2.2"},e.prototype._addPnsdkSuffix=function(e,t){this._PNSDKSuffix[e]=t},e.prototype._getPnsdkSuffix=function(e){var t=this;return Object.keys(this._PNSDKSuffix).reduce((function(n,i){return n+e+t._PNSDKSuffix[i]}),"")},e}();function b(e){var t=e.replace(/==?$/,""),n=Math.floor(t.length/4*3),i=new ArrayBuffer(n),o=new Uint8Array(i),r=0;function a(){var e=t.charAt(r++),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e);if(-1===n)throw new Error("Illegal character at ".concat(r,": ").concat(t.charAt(r-1)));return n}for(var s=0;s<n;s+=3){var l=a(),u=a(),c=a(),d=a(),h=(63&l)<<2|u>>4,p=(15&u)<<4|c>>2,f=(3&c)<<6|d>>0;o[s]=h,64!=c&&(o[s+1]=p),64!=d&&(o[s+2]=f)}return i}var v,y,w,C,x,A=A||function(e,t){var n={},i=n.lib={},o=function(){},r=i.Base={extend:function(e){o.prototype=this;var t=new o;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var o=0;o<e;o++)t[i+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535<n.length)for(o=0;o<e;o+=4)t[i+o>>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i<t;i+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),s=n.enc={},l=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new a.init(n,t/2)}},u=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++)n.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new a.init(n,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,r=this.blockSize,s=o/(4*r);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*r,o=e.min(4*t,o),t){for(var l=0;l<t;l+=r)this._doProcessBlock(i,l);l=i.splice(0,t),n.sigBytes-=o}return new a.init(l,o)},clone:function(){var e=r.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=d.extend({cfg:r.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=n.algo={};return n}(Math);!function(e){for(var t=A,n=(o=t.lib).WordArray,i=o.Hasher,o=t.algo,r=[],a=[],s=function(e){return 4294967296*(e-(0|e))|0},l=2,u=0;64>u;){var c;e:{c=l;for(var d=e.sqrt(c),h=2;h<=d;h++)if(!(c%h)){c=!1;break e}c=!0}c&&(8>u&&(r[u]=s(e.pow(l,.5))),a[u]=s(e.pow(l,1/3)),u++),l++}var p=[];o=o.SHA256=i.extend({_doReset:function(){this._hash=new n.init(r.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],r=n[2],s=n[3],l=n[4],u=n[5],c=n[6],d=n[7],h=0;64>h;h++){if(16>h)p[h]=0|e[t+h];else{var f=p[h-15],g=p[h-2];p[h]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+p[h-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[h-16]}f=d+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&u^~l&c)+a[h]+p[h],g=((i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22))+(i&o^i&r^o&r),d=c,c=u,u=l,l=s+f|0,s=r,r=o,o=i,i=f+g|0}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+c|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(i/4294967296),n[15+(o+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=i._createHelper(o),t.HmacSHA256=i._createHmacHelper(o)}(Math),y=(v=A).enc.Utf8,v.algo.HMAC=v.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=y.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),r=this._iKey=t.clone(),a=o.words,s=r.words,l=0;l<n;l++)a[l]^=1549556828,s[l]^=909522486;o.sigBytes=r.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}}),C=(w=A).lib.WordArray,w.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp(),e=[];for(var o=0;o<n;o+=3)for(var r=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;4>a&&o+.75*a<n;a++)e.push(i.charAt(r>>>6*(3-a)&63));if(t=i.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,n=this._map;(i=n.charAt(64))&&-1!=(i=e.indexOf(i))&&(t=i);for(var i=[],o=0,r=0;r<t;r++)if(r%4){var a=n.indexOf(e.charAt(r-1))<<r%4*2,s=n.indexOf(e.charAt(r))>>>6-r%4*2;i[o>>>2]|=(a|s)<<24-o%4*8,o++}return C.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,n,i,o,r,a){return((e=e+(t&n|~t&i)+o+a)<<r|e>>>32-r)+t}function n(e,t,n,i,o,r,a){return((e=e+(t&i|n&~i)+o+a)<<r|e>>>32-r)+t}function i(e,t,n,i,o,r,a){return((e=e+(t^n^i)+o+a)<<r|e>>>32-r)+t}function o(e,t,n,i,o,r,a){return((e=e+(n^(t|~i))+o+a)<<r|e>>>32-r)+t}for(var r=A,a=(l=r.lib).WordArray,s=l.Hasher,l=r.algo,u=[],c=0;64>c;c++)u[c]=4294967296*e.abs(e.sin(c+1))|0;l=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,r){for(var a=0;16>a;a++){var s=e[l=r+a];e[l]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}a=this._hash.words;var l=e[r+0],c=(s=e[r+1],e[r+2]),d=e[r+3],h=e[r+4],p=e[r+5],f=e[r+6],g=e[r+7],m=e[r+8],b=e[r+9],v=e[r+10],y=e[r+11],w=e[r+12],C=e[r+13],x=e[r+14],A=e[r+15],S=t(S=a[0],_=a[1],T=a[2],k=a[3],l,7,u[0]),k=t(k,S,_,T,s,12,u[1]),T=t(T,k,S,_,c,17,u[2]),_=t(_,T,k,S,d,22,u[3]);S=t(S,_,T,k,h,7,u[4]),k=t(k,S,_,T,p,12,u[5]),T=t(T,k,S,_,f,17,u[6]),_=t(_,T,k,S,g,22,u[7]),S=t(S,_,T,k,m,7,u[8]),k=t(k,S,_,T,b,12,u[9]),T=t(T,k,S,_,v,17,u[10]),_=t(_,T,k,S,y,22,u[11]),S=t(S,_,T,k,w,7,u[12]),k=t(k,S,_,T,C,12,u[13]),T=t(T,k,S,_,x,17,u[14]),S=n(S,_=t(_,T,k,S,A,22,u[15]),T,k,s,5,u[16]),k=n(k,S,_,T,f,9,u[17]),T=n(T,k,S,_,y,14,u[18]),_=n(_,T,k,S,l,20,u[19]),S=n(S,_,T,k,p,5,u[20]),k=n(k,S,_,T,v,9,u[21]),T=n(T,k,S,_,A,14,u[22]),_=n(_,T,k,S,h,20,u[23]),S=n(S,_,T,k,b,5,u[24]),k=n(k,S,_,T,x,9,u[25]),T=n(T,k,S,_,d,14,u[26]),_=n(_,T,k,S,m,20,u[27]),S=n(S,_,T,k,C,5,u[28]),k=n(k,S,_,T,c,9,u[29]),T=n(T,k,S,_,g,14,u[30]),S=i(S,_=n(_,T,k,S,w,20,u[31]),T,k,p,4,u[32]),k=i(k,S,_,T,m,11,u[33]),T=i(T,k,S,_,y,16,u[34]),_=i(_,T,k,S,x,23,u[35]),S=i(S,_,T,k,s,4,u[36]),k=i(k,S,_,T,h,11,u[37]),T=i(T,k,S,_,g,16,u[38]),_=i(_,T,k,S,v,23,u[39]),S=i(S,_,T,k,C,4,u[40]),k=i(k,S,_,T,l,11,u[41]),T=i(T,k,S,_,d,16,u[42]),_=i(_,T,k,S,f,23,u[43]),S=i(S,_,T,k,b,4,u[44]),k=i(k,S,_,T,w,11,u[45]),T=i(T,k,S,_,A,16,u[46]),S=o(S,_=i(_,T,k,S,c,23,u[47]),T,k,l,6,u[48]),k=o(k,S,_,T,g,10,u[49]),T=o(T,k,S,_,x,15,u[50]),_=o(_,T,k,S,p,21,u[51]),S=o(S,_,T,k,w,6,u[52]),k=o(k,S,_,T,d,10,u[53]),T=o(T,k,S,_,v,15,u[54]),_=o(_,T,k,S,s,21,u[55]),S=o(S,_,T,k,m,6,u[56]),k=o(k,S,_,T,A,10,u[57]),T=o(T,k,S,_,f,15,u[58]),_=o(_,T,k,S,C,21,u[59]),S=o(S,_,T,k,h,6,u[60]),k=o(k,S,_,T,y,10,u[61]),T=o(T,k,S,_,c,15,u[62]),_=o(_,T,k,S,b,21,u[63]),a[0]=a[0]+S|0,a[1]=a[1]+_|0,a[2]=a[2]+T|0,a[3]=a[3]+k|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var r=e.floor(i/4294967296);for(n[15+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process(),n=(t=this._hash).words,i=0;4>i;i++)o=n[i],n[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);return t},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),r.MD5=s._createHelper(l),r.HmacMD5=s._createHmacHelper(l)}(Math),function(){var e,t=A,n=(e=t.lib).Base,i=e.WordArray,o=(e=t.algo).EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(s=this.cfg).hasher.create(),o=i.create(),r=o.words,a=s.keySize,s=s.iterations;r.length<a;){l&&n.update(l);var l=n.update(e).finalize(t);n.reset();for(var u=1;u<s;u++)l=n.finalize(l),n.reset();o.concat(l)}return o.sigBytes=4*a,o}});t.EvpKDF=function(e,t,n){return o.create(n).compute(e,t)}}(),A.lib.Cipher||function(e){var t=(p=A).lib,n=t.Base,i=t.WordArray,o=t.BufferedBlockAlgorithm,r=p.enc.Base64,a=p.algo.EvpKDF,s=t.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,i){return("string"==typeof n?f:h).encrypt(e,t,n,i)},decrypt:function(t,n,i){return("string"==typeof n?f:h).decrypt(e,t,n,i)}}}});t.StreamCipher=s.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=p.mode={},u=function(e,t,n){var i=this._iv;i?this._iv=void 0:i=this._prevBlock;for(var o=0;o<n;o++)e[t+o]^=i[o]},c=(t.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();c.Encryptor=c.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;u.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),c.Decryptor=c.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),u.call(this,e,t,i),this._prevBlock=o}}),l=l.CBC=c,c=(p.pad={}).Pkcs7={pad:function(e,t){for(var n,o=(n=(n=4*t)-e.sigBytes%n)<<24|n<<16|n<<8|n,r=[],a=0;a<n;a+=4)r.push(o);n=i.create(r,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},t.BlockCipher=s.extend({cfg:s.cfg.extend({mode:l,padding:c}),reset:function(){s.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=t.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(l=(p.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?i.create([1398893684,1701076831]).concat(e).concat(t):t).toString(r)},parse:function(e){var t=(e=r.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var n=i.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:n})}},t.SerializableCipher=n.extend({cfg:n.extend({format:l}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var o=e.createEncryptor(n,i);return t=o.finalize(t),o=o.cfg,d.create({ciphertext:t,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),p=(p.kdf={}).OpenSSL={execute:function(e,t,n,o){return o||(o=i.random(8)),e=a.create({keySize:t+n}).compute(e,o),n=i.create(e.words.slice(t),4*n),e.sigBytes=4*t,d.create({key:e,iv:n,salt:o})}},f=t.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:p}),encrypt:function(e,t,n,i){return n=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize),i.iv=n.iv,(e=h.encrypt.call(this,e,t,n.key,i)).mixIn(n),e},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),n=i.kdf.execute(n,e.keySize,e.ivSize,t.salt),i.iv=n.iv,h.decrypt.call(this,e,t,n.key,i)}})}(),function(){for(var e=A,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],r=[],a=[],s=[],l=[],u=[],c=[],d=[],h=[],p=[],f=0;256>f;f++)p[f]=128>f?f<<1:f<<1^283;var g=0,m=0;for(f=0;256>f;f++){var b=(b=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&b^99;i[g]=b,o[b]=g;var v=p[g],y=p[v],w=p[y],C=257*p[b]^16843008*b;r[g]=C<<24|C>>>8,a[g]=C<<16|C>>>16,s[g]=C<<8|C>>>24,l[g]=C,C=16843009*w^65537*y^257*v^16843008*g,u[b]=C<<24|C>>>8,c[b]=C<<16|C>>>16,d[b]=C<<8|C>>>24,h[b]=C,g?(g=v^p[p[p[w^v]]],m^=p[p[m]]):g=m=1}var x=[0,1,2,4,8,16,32,64,128,27,54];n=n.AES=t.extend({_doReset:function(){for(var e=(n=this._key).words,t=n.sigBytes/4,n=4*((this._nRounds=t+6)+1),o=this._keySchedule=[],r=0;r<n;r++)if(r<t)o[r]=e[r];else{var a=o[r-1];r%t?6<t&&4==r%t&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=x[r/t|0]<<24),o[r]=o[r-t]^a}for(e=this._invKeySchedule=[],t=0;t<n;t++)r=n-t,a=t%4?o[r]:o[r-4],e[t]=4>t||4>=r?a:u[i[a>>>24]]^c[i[a>>>16&255]]^d[i[a>>>8&255]]^h[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,r,a,s,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,c,d,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,o,r,a,s){for(var l=this._nRounds,u=e[t]^n[0],c=e[t+1]^n[1],d=e[t+2]^n[2],h=e[t+3]^n[3],p=4,f=1;f<l;f++){var g=i[u>>>24]^o[c>>>16&255]^r[d>>>8&255]^a[255&h]^n[p++],m=i[c>>>24]^o[d>>>16&255]^r[h>>>8&255]^a[255&u]^n[p++],b=i[d>>>24]^o[h>>>16&255]^r[u>>>8&255]^a[255&c]^n[p++];h=i[h>>>24]^o[u>>>16&255]^r[c>>>8&255]^a[255&d]^n[p++],u=g,c=m,d=b}g=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^n[p++],m=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^n[p++],b=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^n[p++],h=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[p++],e[t]=g,e[t+1]=m,e[t+2]=b,e[t+3]=h},keySize:8}),e.AES=t._createHelper(n)}(),A.mode.ECB=((x=A.lib.BlockCipherMode.extend()).Encryptor=x.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),x.Decryptor=x.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),x);var S=A;function k(e){var t,n=[];for(t=0;t<e.length;t+=1)n[t/4|0]|=e[t]<<24-8*t;return S.lib.WordArray.create(n,e.length)}var T=function(){function e(e){var t=e.config;this._config=t,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return e.prototype.HMACSHA256=function(e){return S.HmacSHA256(e,this._config.secretKey).toString(S.enc.Base64)},e.prototype.SHA256=function(e){return S.SHA256(e).toString(S.enc.Hex)},e.prototype._parseOptions=function(e){var t=e||{};return t.hasOwnProperty("encryptKey")||(t.encryptKey=this._defaultOptions.encryptKey),t.hasOwnProperty("keyEncoding")||(t.keyEncoding=this._defaultOptions.keyEncoding),t.hasOwnProperty("keyLength")||(t.keyLength=this._defaultOptions.keyLength),t.hasOwnProperty("mode")||(t.mode=this._defaultOptions.mode),-1===this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase())&&(t.keyEncoding=this._defaultOptions.keyEncoding),-1===this._allowedKeyLengths.indexOf(parseInt(t.keyLength,10))&&(t.keyLength=this._defaultOptions.keyLength),-1===this._allowedModes.indexOf(t.mode.toLowerCase())&&(t.mode=this._defaultOptions.mode),t},e.prototype._decodeKey=function(e,t){return"base64"===t.keyEncoding?S.enc.Base64.parse(e):"hex"===t.keyEncoding?S.enc.Hex.parse(e):e},e.prototype._getPaddedKey=function(e,t){return e=this._decodeKey(e,t),t.encryptKey?S.enc.Utf8.parse(this.SHA256(e).slice(0,32)):e},e.prototype._getMode=function(e){return"ecb"===e.mode?S.mode.ECB:S.mode.CBC},e.prototype._getIV=function(e){return"cbc"===e.mode?S.enc.Utf8.parse(this._iv):null},e.prototype._getRandomIV=function(){return S.lib.WordArray.random(16)},e.prototype.encrypt=function(e,t,n){return this._config.customEncrypt?this._config.customEncrypt(e):this.pnEncrypt(e,t,n)},e.prototype.decrypt=function(e,t,n){return this._config.customDecrypt?this._config.customDecrypt(e):this.pnDecrypt(e,t,n)},e.prototype.pnEncrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),o=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var r=this._getRandomIV(),a=S.AES.encrypt(e,o,{iv:r,mode:i}).ciphertext;return r.clone().concat(a.clone()).toString(S.enc.Base64)}var s=this._getIV(n);return S.AES.encrypt(e,o,{iv:s,mode:i}).ciphertext.toString(S.enc.Base64)||e},e.prototype.pnDecrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),o=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var r=k((l=new Uint8ClampedArray(b(e))).slice(0,16)),a=k(l.slice(16));try{var s=S.AES.decrypt({ciphertext:a},o,{iv:r,mode:i}).toString(S.enc.Utf8);return JSON.parse(s)}catch(e){return null}}else{r=this._getIV(n);try{var l=S.enc.Base64.parse(e);return s=S.AES.decrypt({ciphertext:l},o,{iv:r,mode:i}).toString(S.enc.Utf8),JSON.parse(s)}catch(e){return null}}},e}(),_=function(){function e(e){var t=e.timeEndpoint;this._timeEndpoint=t}return e.prototype.onReconnection=function(e){this._reconnectionCallback=e},e.prototype.startPolling=function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)},e.prototype.stopPolling=function(){clearInterval(this._timeTimer)},e.prototype._performTimeLoop=function(){var e=this;this._timeEndpoint((function(t){t.error||(clearInterval(e._timeTimer),e._reconnectionCallback())}))},e}(),E=function(){function e(e){var t=e.config;this.hashHistory=[],this._config=t}return e.prototype.getKey=function(e){var t=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e.payload)).toString(),n=e.publishMetaData.publishTimetoken;return"".concat(n,"-").concat(t)},e.prototype.isDuplicate=function(e){return this.hashHistory.includes(this.getKey(e))},e.prototype.addEntry=function(e){this.hashHistory.length>=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))},e.prototype.clearHistory=function(){this.hashHistory=[]},e}();function O(e){return encodeURIComponent(e).replace(/[!~*'()]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}var P={signPamFromParams:function(e){return function(e){return function(e){var t=[];return Object.keys(e).forEach((function(e){return t.push(e)})),t}(e).sort()}(e).map((function(t){return"".concat(t,"=").concat(O(e[t]))})).join("&")},endsWith:function(e,t){return-1!==e.indexOf(t,this.length-t.length)},createPromise:function(){var e,t;return{promise:new Promise((function(n,i){e=n,t=i})),reject:t,fulfill:e}},encodeString:O},N={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory"},M=function(){function e(e){var t=e.subscribeEndpoint,n=e.leaveEndpoint,i=e.heartbeatEndpoint,o=e.setStateEndpoint,r=e.timeEndpoint,a=e.getFileUrl,s=e.config,l=e.crypto,u=e.listenerManager;this._listenerManager=u,this._config=s,this._leaveEndpoint=n,this._heartbeatEndpoint=i,this._setStateEndpoint=o,this._subscribeEndpoint=t,this._getFileUrl=a,this._crypto=l,this._channels={},this._presenceChannels={},this._heartbeatChannels={},this._heartbeatChannelGroups={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._currentTimetoken=0,this._lastTimetoken=0,this._storedTimetoken=null,this._subscriptionStatusAnnounced=!1,this._isOnline=!0,this._reconnectionManager=new _({timeEndpoint:r}),this._dedupingManager=new E({config:s})}return e.prototype.adaptStateChange=function(e,t){var n=this,i=e.state,o=e.channels,r=void 0===o?[]:o,a=e.channelGroups,s=void 0===a?[]:a;return r.forEach((function(e){e in n._channels&&(n._channels[e].state=i)})),s.forEach((function(e){e in n._channelGroups&&(n._channelGroups[e].state=i)})),this._setStateEndpoint({state:i,channels:r,channelGroups:s},t)},e.prototype.adaptPresenceChange=function(e){var t=this,n=e.connected,i=e.channels,o=void 0===i?[]:i,r=e.channelGroups,a=void 0===r?[]:r;n?(o.forEach((function(e){t._heartbeatChannels[e]={state:{}}})),a.forEach((function(e){t._heartbeatChannelGroups[e]={state:{}}}))):(o.forEach((function(e){e in t._heartbeatChannels&&delete t._heartbeatChannels[e]})),a.forEach((function(e){e in t._heartbeatChannelGroups&&delete t._heartbeatChannelGroups[e]})),!1===this._config.suppressLeaveEvents&&this._leaveEndpoint({channels:o,channelGroups:a},(function(e){t._listenerManager.announceStatus(e)}))),this.reconnect()},e.prototype.adaptSubscribeChange=function(e){var t=this,n=e.timetoken,i=e.channels,o=void 0===i?[]:i,r=e.channelGroups,a=void 0===r?[]:r,s=e.withPresence,l=void 0!==s&&s,u=e.withHeartbeats,c=void 0!==u&&u;this._config.subscribeKey&&""!==this._config.subscribeKey?(n&&(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=n),"0"!==this._currentTimetoken&&0!==this._currentTimetoken&&(this._storedTimetoken=this._currentTimetoken,this._currentTimetoken=0),o.forEach((function(e){t._channels[e]={state:{}},l&&(t._presenceChannels[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannels[e]={}),t._pendingChannelSubscriptions.push(e)})),a.forEach((function(e){t._channelGroups[e]={state:{}},l&&(t._presenceChannelGroups[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannelGroups[e]={}),t._pendingChannelGroupSubscriptions.push(e)})),this._subscriptionStatusAnnounced=!1,this.reconnect()):console&&console.log&&console.log("subscribe key missing; aborting subscribe")},e.prototype.adaptUnsubscribeChange=function(e,t){var n=this,i=e.channels,o=void 0===i?[]:i,r=e.channelGroups,a=void 0===r?[]:r,s=[],l=[];o.forEach((function(e){e in n._channels&&(delete n._channels[e],s.push(e),e in n._heartbeatChannels&&delete n._heartbeatChannels[e]),e in n._presenceChannels&&(delete n._presenceChannels[e],s.push(e))})),a.forEach((function(e){e in n._channelGroups&&(delete n._channelGroups[e],l.push(e),e in n._heartbeatChannelGroups&&delete n._heartbeatChannelGroups[e]),e in n._presenceChannelGroups&&(delete n._presenceChannelGroups[e],l.push(e))})),0===s.length&&0===l.length||(!1!==this._config.suppressLeaveEvents||t||this._leaveEndpoint({channels:s,channelGroups:l},(function(e){e.affectedChannels=s,e.affectedChannelGroups=l,e.currentTimetoken=n._currentTimetoken,e.lastTimetoken=n._lastTimetoken,n._listenerManager.announceStatus(e)})),0===Object.keys(this._channels).length&&0===Object.keys(this._presenceChannels).length&&0===Object.keys(this._channelGroups).length&&0===Object.keys(this._presenceChannelGroups).length&&(this._lastTimetoken=0,this._currentTimetoken=0,this._storedTimetoken=null,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect())},e.prototype.unsubscribeAll=function(e){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()},e)},e.prototype.getHeartbeatChannels=function(){return Object.keys(this._heartbeatChannels)},e.prototype.getHeartbeatChannelGroups=function(){return Object.keys(this._heartbeatChannelGroups)},e.prototype.getSubscribedChannels=function(){return Object.keys(this._channels)},e.prototype.getSubscribedChannelGroups=function(){return Object.keys(this._channelGroups)},e.prototype.reconnect=function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()},e.prototype.disconnect=function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()},e.prototype._registerHeartbeatTimer=function(){this._stopHeartbeatTimer(),0!==this._config.getHeartbeatInterval()&&void 0!==this._config.getHeartbeatInterval()&&(this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval()))},e.prototype._stopHeartbeatTimer=function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)},e.prototype._performHeartbeatLoop=function(){var e=this,t=this.getHeartbeatChannels(),n=this.getHeartbeatChannelGroups(),i={};0===t.length&&0===n.length||(this.getSubscribedChannels().forEach((function(t){var n=e._channels[t].state;Object.keys(n).length&&(i[t]=n)})),this.getSubscribedChannelGroups().forEach((function(t){var n=e._channelGroups[t].state;Object.keys(n).length&&(i[t]=n)})),this._heartbeatEndpoint({channels:t,channelGroups:n,state:i},function(t){t.error&&e._config.announceFailedHeartbeats&&e._listenerManager.announceStatus(t),t.error&&e._config.autoNetworkDetection&&e._isOnline&&(e._isOnline=!1,e.disconnect(),e._listenerManager.announceNetworkDown(),e.reconnect()),!t.error&&e._config.announceSuccessfulHeartbeats&&e._listenerManager.announceStatus(t)}.bind(this)))},e.prototype._startSubscribeLoop=function(){var e=this;this._stopSubscribeLoop();var t={},n=[],i=[];if(Object.keys(this._channels).forEach((function(i){var o=e._channels[i].state;Object.keys(o).length&&(t[i]=o),n.push(i)})),Object.keys(this._presenceChannels).forEach((function(e){n.push("".concat(e,"-pnpres"))})),Object.keys(this._channelGroups).forEach((function(n){var o=e._channelGroups[n].state;Object.keys(o).length&&(t[n]=o),i.push(n)})),Object.keys(this._presenceChannelGroups).forEach((function(e){i.push("".concat(e,"-pnpres"))})),0!==n.length||0!==i.length){var o={channels:n,channelGroups:i,state:t,timetoken:this._currentTimetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(o,this._processSubscribeResponse.bind(this))}},e.prototype._processSubscribeResponse=function(e,t){var n=this;if(e.error){if(e.errorData&&"Aborted"===e.errorData.message)return;e.category===N.PNTimeoutCategory?this._startSubscribeLoop():e.category===N.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this._config.autoNetworkDetection&&this._isOnline&&(this._isOnline=!1,this._listenerManager.announceNetworkDown()),this._reconnectionManager.onReconnection((function(){n._config.autoNetworkDetection&&!n._isOnline&&(n._isOnline=!0,n._listenerManager.announceNetworkUp()),n.reconnect(),n._subscriptionStatusAnnounced=!0;var t={category:N.PNReconnectedCategory,operation:e.operation,lastTimetoken:n._lastTimetoken,currentTimetoken:n._currentTimetoken};n._listenerManager.announceStatus(t)})),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(e)):e.category===N.PNBadRequestCategory?(this._stopHeartbeatTimer(),this._listenerManager.announceStatus(e)):this._listenerManager.announceStatus(e)}else{if(this._storedTimetoken?(this._currentTimetoken=this._storedTimetoken,this._storedTimetoken=null):(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=t.metadata.timetoken),!this._subscriptionStatusAnnounced){var r={};r.category=N.PNConnectedCategory,r.operation=e.operation,r.affectedChannels=this._pendingChannelSubscriptions,r.subscribedChannels=this.getSubscribedChannels(),r.affectedChannelGroups=this._pendingChannelGroupSubscriptions,r.lastTimetoken=this._lastTimetoken,r.currentTimetoken=this._currentTimetoken,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(r),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var a=t.messages||[],s=this._config,l=s.requestMessageCountThreshold,u=s.dedupeOnSubscribe;if(l&&a.length>=l){var c={};c.category=N.PNRequestMessageCountExceededCategory,c.operation=e.operation,this._listenerManager.announceStatus(c)}a.forEach((function(e){var t=e.channel,r=e.subscriptionMatch,a=e.publishMetaData;if(t===r&&(r=null),u){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}if(P.endsWith(e.channel,"-pnpres"))(g={channel:null,subscription:null}).actualChannel=null!=r?t:null,g.subscribedChannel=null!=r?r:t,t&&(g.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(g.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),g.action=e.payload.action,g.state=e.payload.data,g.timetoken=a.publishTimetoken,g.occupancy=e.payload.occupancy,g.uuid=e.payload.uuid,g.timestamp=e.payload.timestamp,e.payload.join&&(g.join=e.payload.join),e.payload.leave&&(g.leave=e.payload.leave),e.payload.timeout&&(g.timeout=e.payload.timeout),n._listenerManager.announcePresence(g);else if(1===e.messageType)(g={channel:null,subscription:null}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,e.userMetadata&&(g.userMetadata=e.userMetadata),g.message=e.payload,n._listenerManager.announceSignal(g);else if(2===e.messageType){if((g={channel:null,subscription:null}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,e.userMetadata&&(g.userMetadata=e.userMetadata),g.message={event:e.payload.event,type:e.payload.type,data:e.payload.data},n._listenerManager.announceObjects(g),"uuid"===e.payload.type){var s=n._renameChannelField(g);n._listenerManager.announceUser(i(i({},s),{message:i(i({},s.message),{event:n._renameEvent(s.message.event),type:"user"})}))}else if("channel"===e.payload.type)s=n._renameChannelField(g),n._listenerManager.announceSpace(i(i({},s),{message:i(i({},s.message),{event:n._renameEvent(s.message.event),type:"space"})}));else if("membership"===e.payload.type){var l=(s=n._renameChannelField(g)).message.data,c=l.uuid,d=l.channel,h=o(l,["uuid","channel"]);h.user=c,h.space=d,n._listenerManager.announceMembership(i(i({},s),{message:i(i({},s.message),{event:n._renameEvent(s.message.event),data:h})}))}}else if(3===e.messageType)(g={}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,g.data={messageTimetoken:e.payload.data.messageTimetoken,actionTimetoken:e.payload.data.actionTimetoken,type:e.payload.data.type,uuid:e.issuingClientId,value:e.payload.data.value},g.event=e.payload.event,n._listenerManager.announceMessageAction(g);else if(4===e.messageType){(g={}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId;var p=e.payload;if(n._config.cipherKey){var f=n._crypto.decrypt(e.payload);"object"==typeof f&&null!==f&&(p=f)}e.userMetadata&&(g.userMetadata=e.userMetadata),g.message=p.message,g.file={id:p.file.id,name:p.file.name,url:n._getFileUrl({id:p.file.id,name:p.file.name,channel:t})},n._listenerManager.announceFile(g)}else{var g;(g={channel:null,subscription:null}).actualChannel=null!=r?t:null,g.subscribedChannel=null!=r?r:t,g.channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,e.userMetadata&&(g.userMetadata=e.userMetadata),n._config.cipherKey?g.message=n._crypto.decrypt(e.payload):g.message=e.payload,n._listenerManager.announceMessage(g)}})),this._region=t.metadata.region,this._startSubscribeLoop()}},e.prototype._stopSubscribeLoop=function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)},e.prototype._renameEvent=function(e){return"set"===e?"updated":"removed"},e.prototype._renameChannelField=function(e){var t=e.channel,n=o(e,["channel"]);return n.spaceId=t,n},e}(),I={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNDeleteMessagesOperation:"PNDeleteMessagesOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNMessageCounts:"PNMessageCountsOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNSignalOperation:"PNSignalOperation",PNAddMessageActionOperation:"PNAddActionOperation",PNRemoveMessageActionOperation:"PNRemoveMessageActionOperation",PNGetMessageActionsOperation:"PNGetMessageActionsOperation",PNCreateUserOperation:"PNCreateUserOperation",PNUpdateUserOperation:"PNUpdateUserOperation",PNDeleteUserOperation:"PNDeleteUserOperation",PNGetUserOperation:"PNGetUsersOperation",PNGetUsersOperation:"PNGetUsersOperation",PNCreateSpaceOperation:"PNCreateSpaceOperation",PNUpdateSpaceOperation:"PNUpdateSpaceOperation",PNDeleteSpaceOperation:"PNDeleteSpaceOperation",PNGetSpaceOperation:"PNGetSpacesOperation",PNGetSpacesOperation:"PNGetSpacesOperation",PNGetMembersOperation:"PNGetMembersOperation",PNUpdateMembersOperation:"PNUpdateMembersOperation",PNGetMembershipsOperation:"PNGetMembershipsOperation",PNUpdateMembershipsOperation:"PNUpdateMembershipsOperation",PNListFilesOperation:"PNListFilesOperation",PNGenerateUploadUrlOperation:"PNGenerateUploadUrlOperation",PNPublishFileOperation:"PNPublishFileOperation",PNGetFileUrlOperation:"PNGetFileUrlOperation",PNDownloadFileOperation:"PNDownloadFileOperation",PNGetAllUUIDMetadataOperation:"PNGetAllUUIDMetadataOperation",PNGetUUIDMetadataOperation:"PNGetUUIDMetadataOperation",PNSetUUIDMetadataOperation:"PNSetUUIDMetadataOperation",PNRemoveUUIDMetadataOperation:"PNRemoveUUIDMetadataOperation",PNGetAllChannelMetadataOperation:"PNGetAllChannelMetadataOperation",PNGetChannelMetadataOperation:"PNGetChannelMetadataOperation",PNSetChannelMetadataOperation:"PNSetChannelMetadataOperation",PNRemoveChannelMetadataOperation:"PNRemoveChannelMetadataOperation",PNSetMembersOperation:"PNSetMembersOperation",PNSetMembershipsOperation:"PNSetMembershipsOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerGrantToken:"PNAccessManagerGrantToken",PNAccessManagerAudit:"PNAccessManagerAudit",PNAccessManagerRevokeToken:"PNAccessManagerRevokeToken",PNHandshakeOperation:"PNHandshakeOperation",PNReceiveMessagesOperation:"PNReceiveMessagesOperation"},D=function(){function e(e){this._maximumSamplesCount=100,this._trackedLatencies={},this._latencies={},this._maximumSamplesCount=e.maximumSamplesCount||this._maximumSamplesCount}return e.prototype.operationsLatencyForRequest=function(){var e=this,t={};return Object.keys(this._latencies).forEach((function(n){var i=e._latencies[n],o=e._averageLatency(i);o>0&&(t["l_".concat(n)]=o)})),t},e.prototype.startLatencyMeasure=function(e,t){e!==I.PNSubscribeOperation&&t&&(this._trackedLatencies[t]=Date.now())},e.prototype.stopLatencyMeasure=function(e,t){if(e!==I.PNSubscribeOperation&&t){var n=this._endpointName(e),i=this._latencies[n],o=this._trackedLatencies[t];i||(this._latencies[n]=[],i=this._latencies[n]),i.push(Date.now()-o),i.length>this._maximumSamplesCount&&i.splice(0,i.length-this._maximumSamplesCount),delete this._trackedLatencies[t]}},e.prototype._averageLatency=function(e){return Math.floor(e.reduce((function(e,t){return e+t}),0)/e.length)},e.prototype._endpointName=function(e){var t=null;switch(e){case I.PNPublishOperation:t="pub";break;case I.PNSignalOperation:t="sig";break;case I.PNHistoryOperation:case I.PNFetchMessagesOperation:case I.PNDeleteMessagesOperation:case I.PNMessageCounts:t="hist";break;case I.PNUnsubscribeOperation:case I.PNWhereNowOperation:case I.PNHereNowOperation:case I.PNHeartbeatOperation:case I.PNSetStateOperation:case I.PNGetStateOperation:t="pres";break;case I.PNAddChannelsToGroupOperation:case I.PNRemoveChannelsFromGroupOperation:case I.PNChannelGroupsOperation:case I.PNRemoveGroupOperation:case I.PNChannelsForGroupOperation:t="cg";break;case I.PNPushNotificationEnabledChannelsOperation:case I.PNRemoveAllPushNotificationsOperation:t="push";break;case I.PNCreateUserOperation:case I.PNUpdateUserOperation:case I.PNDeleteUserOperation:case I.PNGetUserOperation:case I.PNGetUsersOperation:case I.PNCreateSpaceOperation:case I.PNUpdateSpaceOperation:case I.PNDeleteSpaceOperation:case I.PNGetSpaceOperation:case I.PNGetSpacesOperation:case I.PNGetMembersOperation:case I.PNUpdateMembersOperation:case I.PNGetMembershipsOperation:case I.PNUpdateMembershipsOperation:t="obj";break;case I.PNAddMessageActionOperation:case I.PNRemoveMessageActionOperation:case I.PNGetMessageActionsOperation:t="msga";break;case I.PNAccessManagerGrant:case I.PNAccessManagerAudit:t="pam";break;case I.PNAccessManagerGrantToken:case I.PNAccessManagerRevokeToken:t="pamv3";break;default:t="time"}return t},e}(),U=function(){function e(e,t,n){this._payload=e,this._setDefaultPayloadStructure(),this.title=t,this.body=n}return Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this._title=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{set:function(e){this._subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{set:function(e){this._body=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{set:function(e){this._badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{set:function(e){this._sound=e},enumerable:!1,configurable:!0}),e.prototype._setDefaultPayloadStructure=function(){},e.prototype.toObject=function(){return{}},e}(),L=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"configurations",{set:function(e){e&&e.length&&(this._configurations=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.aps},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.aps.alert.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){e&&e.length&&(this._payload.aps.alert.subtitle=e,this._subtitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.aps.alert.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this._badge},set:function(e){null!=e&&(this._payload.aps.badge=e,this._badge=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.aps.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.aps={alert:{}}},n.prototype.toObject=function(){var e=this,t=i({},this._payload),n=t.aps,o=n.alert;if(this._isSilent&&(n["content-available"]=1),"apns2"===this._apnsPushType){if(!this._configurations||!this._configurations.length)throw new ReferenceError("APNS2 configuration is missing");var r=[];this._configurations.forEach((function(t){r.push(e._objectFromAPNS2Configuration(t))})),r.length&&(t.pn_push=r)}return o&&Object.keys(o).length||delete n.alert,this._isSilent&&(delete n.alert,delete n.badge,delete n.sound,o={}),this._isSilent||Object.keys(o).length?t:null},n.prototype._objectFromAPNS2Configuration=function(e){var t=this;if(!e.targets||!e.targets.length)throw new ReferenceError("At least one APNS2 target should be provided");var n=[];e.targets.forEach((function(e){n.push(t._objectFromAPNSTarget(e))}));var i=e.collapseId,o=e.expirationDate,r={auth_method:"token",targets:n,version:"v2"};return i&&i.length&&(r.collapse_id=i),o&&(r.expiration=o.toISOString()),r},n.prototype._objectFromAPNSTarget=function(e){if(!e.topic||!e.topic.length)throw new TypeError("Target 'topic' undefined.");var t=e.topic,n=e.environment,i=void 0===n?"development":n,o=e.excludedDevices,r=void 0===o?[]:o,a={topic:t,environment:i};return r.length&&(a.excluded_devices=r),a},n}(U),B=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"backContent",{get:function(){return this._backContent},set:function(e){e&&e.length&&(this._payload.back_content=e,this._backContent=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"backTitle",{get:function(){return this._backTitle},set:function(e){e&&e.length&&(this._payload.back_title=e,this._backTitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},set:function(e){null!=e&&(this._payload.count=e,this._count=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._type},set:function(e){e&&e.length&&(this._payload.type=e,this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this.backTitle},set:function(e){this.backTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this.backContent},set:function(e){this.backContent=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),n.prototype.toObject=function(){return Object.keys(this._payload).length?i({},this._payload):null},n}(U),R=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.notification},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this._payload.data},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.notification.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.notification.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.notification.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"icon",{get:function(){return this._icon},set:function(e){e&&e.length&&(this._payload.notification.icon=e,this._icon=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tag",{get:function(){return this._tag},set:function(e){e&&e.length&&(this._payload.notification.tag=e,this._tag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.notification={},this._payload.data={}},n.prototype.toObject=function(){var e=i({},this._payload.data),t=null,n={};if(Object.keys(this._payload).length>2){var r=this._payload;r.notification,r.data;var a=o(r,["notification","data"]);e=i(i({},e),a)}return this._isSilent?e.notification=this._payload.notification:t=this._payload.notification,Object.keys(e).length&&(n.data=e),t&&Object.keys(t).length&&(n.notification=t),Object.keys(n).length?n:null},n}(U),j=function(){function e(e,t){this._payload={apns:{},mpns:{},fcm:{}},this._title=e,this._body=t,this.apns=new L(this._payload.apns,e,t),this.mpns=new B(this._payload.mpns,e,t),this.fcm=new R(this._payload.fcm,e,t)}return Object.defineProperty(e.prototype,"debugging",{set:function(e){this._debugging=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){this._subtitle=e,this.apns.subtitle=e,this.mpns.subtitle=e,this.fcm.subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{get:function(){return this._badge},set:function(e){this._badge=e,this.apns.badge=e,this.mpns.badge=e,this.fcm.badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{get:function(){return this._sound},set:function(e){this._sound=e,this.apns.sound=e,this.mpns.sound=e,this.fcm.sound=e},enumerable:!1,configurable:!0}),e.prototype.buildPayload=function(e){var t={};if(e.includes("apns")||e.includes("apns2")){this.apns._apnsPushType=e.includes("apns")?"apns":"apns2";var n=this.apns.toObject();n&&Object.keys(n).length&&(t.pn_apns=n)}if(e.includes("mpns")){var i=this.mpns.toObject();i&&Object.keys(i).length&&(t.pn_mpns=i)}if(e.includes("fcm")){var o=this.fcm.toObject();o&&Object.keys(o).length&&(t.pn_gcm=o)}return Object.keys(t).length&&this._debugging&&(t.pn_debug=!0),t},e}(),H=function(){function e(){this._listeners=[]}return e.prototype.addListener=function(e){this._listeners.push(e)},e.prototype.removeListener=function(e){var t=[];this._listeners.forEach((function(n){n!==e&&t.push(n)})),this._listeners=t},e.prototype.removeAllListeners=function(){this._listeners=[]},e.prototype.announcePresence=function(e){this._listeners.forEach((function(t){t.presence&&t.presence(e)}))},e.prototype.announceStatus=function(e){this._listeners.forEach((function(t){t.status&&t.status(e)}))},e.prototype.announceMessage=function(e){this._listeners.forEach((function(t){t.message&&t.message(e)}))},e.prototype.announceSignal=function(e){this._listeners.forEach((function(t){t.signal&&t.signal(e)}))},e.prototype.announceMessageAction=function(e){this._listeners.forEach((function(t){t.messageAction&&t.messageAction(e)}))},e.prototype.announceFile=function(e){this._listeners.forEach((function(t){t.file&&t.file(e)}))},e.prototype.announceObjects=function(e){this._listeners.forEach((function(t){t.objects&&t.objects(e)}))},e.prototype.announceUser=function(e){this._listeners.forEach((function(t){t.user&&t.user(e)}))},e.prototype.announceSpace=function(e){this._listeners.forEach((function(t){t.space&&t.space(e)}))},e.prototype.announceMembership=function(e){this._listeners.forEach((function(t){t.membership&&t.membership(e)}))},e.prototype.announceNetworkUp=function(){var e={};e.category=N.PNNetworkUpCategory,this.announceStatus(e)},e.prototype.announceNetworkDown=function(){var e={};e.category=N.PNNetworkDownCategory,this.announceStatus(e)},e}(),F=function(){function e(e,t){this._config=e,this._cbor=t}return e.prototype.setToken=function(e){e&&e.length>0?this._token=e:this._token=void 0},e.prototype.getToken=function(){return this._token},e.prototype.extractPermissions=function(e){var t={read:!1,write:!1,manage:!1,delete:!1,get:!1,update:!1,join:!1};return 128==(128&e)&&(t.join=!0),64==(64&e)&&(t.update=!0),32==(32&e)&&(t.get=!0),8==(8&e)&&(t.delete=!0),4==(4&e)&&(t.manage=!0),2==(2&e)&&(t.write=!0),1==(1&e)&&(t.read=!0),t},e.prototype.parseToken=function(e){var t=this,n=this._cbor.decodeToken(e);if(void 0!==n){var i=n.res.uuid?Object.keys(n.res.uuid):[],o=Object.keys(n.res.chan),r=Object.keys(n.res.grp),a=n.pat.uuid?Object.keys(n.pat.uuid):[],s=Object.keys(n.pat.chan),l=Object.keys(n.pat.grp),u={version:n.v,timestamp:n.t,ttl:n.ttl,authorized_uuid:n.uuid},c=i.length>0,d=o.length>0,h=r.length>0;(c||d||h)&&(u.resources={},c&&(u.resources.uuids={},i.forEach((function(e){u.resources.uuids[e]=t.extractPermissions(n.res.uuid[e])}))),d&&(u.resources.channels={},o.forEach((function(e){u.resources.channels[e]=t.extractPermissions(n.res.chan[e])}))),h&&(u.resources.groups={},r.forEach((function(e){u.resources.groups[e]=t.extractPermissions(n.res.grp[e])}))));var p=a.length>0,f=s.length>0,g=l.length>0;return(p||f||g)&&(u.patterns={},p&&(u.patterns.uuids={},a.forEach((function(e){u.patterns.uuids[e]=t.extractPermissions(n.pat.uuid[e])}))),f&&(u.patterns.channels={},s.forEach((function(e){u.patterns.channels[e]=t.extractPermissions(n.pat.chan[e])}))),g&&(u.patterns.groups={},l.forEach((function(e){u.patterns.groups[e]=t.extractPermissions(n.pat.grp[e])})))),Object.keys(n.meta).length>0&&(u.meta=n.meta),u.signature=n.sig,u}},e}(),z=function(e){function n(t,n){var i=this.constructor,o=e.call(this,t)||this;return o.name=o.constructor.name,o.status=n,o.message=t,Object.setPrototypeOf(o,i.prototype),o}return t(n,e),n}(Error);function $(e){return(t={message:e}).type="validationError",t.error=!0,t;var t}function Q(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.usePatch&&e.usePatch(t,n)?e.patchURL(t,n):e.useGetFile&&e.useGetFile(t,n)?e.getFileURL(t,n):e.getURL(t,n)}function G(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-".concat(e.sdkFamily);e.partnerId&&(t+="-".concat(e.partnerId)),t+="/".concat(e.getVersion());var n=e._getPnsdkSuffix(" ");return n.length>0&&(t+=n),t}function q(e,t,n){return t.usePost&&t.usePost(e,n)?"POST":t.usePatch&&t.usePatch(e,n)?"PATCH":t.useDelete&&t.useDelete(e,n)?"DELETE":t.useGetFile&&t.useGetFile(e,n)?"GETFILE":"GET"}function W(e,t,n,i,o){var r=e.config,a=e.crypto,s=q(e,o,i);n.timestamp=Math.floor((new Date).getTime()/1e3),"PNPublishOperation"===o.getOperation()&&o.usePost&&o.usePost(e,i)&&(s="GET"),"GETFILE"===s&&(s="GET");var l="".concat(s,"\n").concat(r.publishKey,"\n").concat(t,"\n").concat(P.signPamFromParams(n),"\n");if("POST"===s)l+="string"==typeof(u=o.postPayload(e,i))?u:JSON.stringify(u);else if("PATCH"===s){var u;l+="string"==typeof(u=o.patchPayload(e,i))?u:JSON.stringify(u)}var c="v2.".concat(a.HMACSHA256(l));c=(c=(c=c.replace(/\+/g,"-")).replace(/\//g,"_")).replace(/=+$/,""),n.signature=c}function V(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=e.networking,a=e.config,s=e.telemetryManager,l=e.tokenManager,u=g(),c=null,d=null,h={};t.getOperation()===I.PNTimeOperation||t.getOperation()===I.PNChannelGroupsOperation?c=n[0]:(h=n[0],c=n[1]),"undefined"==typeof Promise||c||(d=P.createPromise());var p=t.validateParams(e,h);if(p)return c?c($(p)):d?(d.reject(new z("Validation failed, check status for details",$(p))),d.promise):void 0;var f,m=t.prepareParams(e,h),b=Q(t,e,h),v={url:b,operation:t.getOperation(),timeout:t.getRequestTimeout(e),headers:t.getRequestHeaders?t.getRequestHeaders():{},ignoreBody:"function"==typeof t.ignoreBody&&t.ignoreBody(e),forceBuffered:"function"==typeof t.forceBuffered?t.forceBuffered(e,h):null,abortSignal:"function"==typeof t.getAbortSignal?t.getAbortSignal(e,h):null};m.uuid=a.UUID,m.pnsdk=G(a);var y=s.operationsLatencyForRequest();if(Object.keys(y).length&&(m=i(i({},m),y)),a.useInstanceId&&(m.instanceid=a.instanceId),a.useRequestId&&(m.requestid=u),t.isAuthSupported()){var w=l.getToken()||a.getAuthKey();w&&(m.auth=w)}a.secretKey&&W(e,b,m,h,t);var C=function(n,i){if(n.error)return t.handleError&&t.handleError(e,h,n),void(c?c(n):d&&d.reject(new z("PubNub call failed, check status for details",n)));s.stopLatencyMeasure(t.getOperation(),u);var o=t.handleResponse(e,i,h);"function"!=typeof(null==o?void 0:o.then)&&(o=Promise.resolve(o)),o.then((function(e){c?c(n,e):d&&d.fulfill(e)})).catch((function(e){if(c){var n=e;t.getOperation()===I.PNSubscribeOperation&&(n={statusCode:400,error:!0,operation:t.getOperation(),errorData:e,category:N.PNUnknownCategory}),c(n,null)}else d&&d.reject(new z("PubNub call failed, check status for details",e))}))};if(s.startLatencyMeasure(t.getOperation(),u),"POST"===q(e,t,h)){var x=t.postPayload(e,h);f=r.POST(m,x,v,C)}else"PATCH"===q(e,t,h)?(x=t.patchPayload(e,h),f=r.PATCH(m,x,v,C)):f="DELETE"===q(e,t,h)?r.DELETE(m,v,C):"GETFILE"===q(e,t,h)?r.GETFILE(m,v,C):r.GET(m,v,C);return t.getOperation()===I.PNSubscribeOperation?f:d?d.promise:void 0}var Y=Object.freeze({__proto__:null,getOperation:function(){return I.PNAddChannelsToGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,o=e.config;return i?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),K=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveChannelsFromGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,o=e.config;return i?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),X=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n),"/remove")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},handleResponse:function(){return{}}}),Z=Object.freeze({__proto__:null,getOperation:function(){return I.PNChannelGroupsOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v1/channel-registration/sub-key/".concat(t.subscribeKey,"/channel-group")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{groups:t.payload.groups}}}),J=Object.freeze({__proto__:null,getOperation:function(){return I.PNChannelsForGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{channels:t.payload.channels}}}),ee=Object.freeze({__proto__:null,getOperation:function(){return I.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.channels,r=t.topic,a=e.config;return n?i?"apns2"!==i||r?o&&0!==o.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.channels,r=void 0===o?[]:o,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,add:r.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),te=Object.freeze({__proto__:null,getOperation:function(){return I.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.channels,r=t.topic,a=e.config;return n?i?"apns2"!==i||r?o&&0!==o.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.channels,r=void 0===o?[]:o,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,remove:r.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),ne=Object.freeze({__proto__:null,getOperation:function(){return I.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.topic,r=e.config;return n?i?"apns2"!==i||o?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.environment,r=void 0===o?"development":o,a=t.topic,s={type:n};return"apns2"===n&&delete(s=i(i({},s),{environment:r,topic:a})).type,s},handleResponse:function(e,t){return{channels:t}}}),ie=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveAllPushNotificationsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.topic,r=e.config;return n?i?"apns2"!==i||o?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n,"/remove"):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n,"/remove")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.environment,r=void 0===o?"development":o,a=t.topic,s={type:n};return"apns2"===n&&delete(s=i(i({},s),{environment:r,topic:a})).type,s},handleResponse:function(){return{}}}),oe=Object.freeze({__proto__:null,getOperation:function(){return I.PNUnsubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(r),"/leave")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,o={};return i.length>0&&(o["channel-group"]=i.join(",")),o},handleResponse:function(){return{}}}),re=Object.freeze({__proto__:null,getOperation:function(){return I.PNWhereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,o=void 0===i?n.UUID:i;return"/v2/presence/sub-key/".concat(n.subscribeKey,"/uuid/").concat(P.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}}),ae=Object.freeze({__proto__:null,getOperation:function(){return I.PNHeartbeatOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(r),"/heartbeat")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,o=t.state,r=void 0===o?{}:o,a=e.config,s={};return i.length>0&&(s["channel-group"]=i.join(",")),s.state=JSON.stringify(r),s.heartbeat=a.getPresenceTimeout(),s},handleResponse:function(){return{}}}),se=Object.freeze({__proto__:null,getOperation:function(){return I.PNGetStateOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,o=void 0===i?n.UUID:i,r=t.channels,a=void 0===r?[]:r,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(s),"/uuid/").concat(o)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,o={};return i.length>0&&(o["channel-group"]=i.join(",")),o},handleResponse:function(e,t,n){var i=n.channels,o=void 0===i?[]:i,r=n.channelGroups,a=void 0===r?[]:r,s={};return 1===o.length&&0===a.length?s[o[0]]=t.payload:s=t.payload,{channels:s}}}),le=Object.freeze({__proto__:null,getOperation:function(){return I.PNSetStateOperation},validateParams:function(e,t){var n=e.config,i=t.state,o=t.channels,r=void 0===o?[]:o,a=t.channelGroups,s=void 0===a?[]:a;return i?n.subscribeKey?0===r.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(r),"/uuid/").concat(P.encodeString(n.UUID),"/data")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.state,i=t.channelGroups,o=void 0===i?[]:i,r={};return r.state=JSON.stringify(n),o.length>0&&(r["channel-group"]=o.join(",")),r},handleResponse:function(e,t){return{state:t.payload}}}),ue=Object.freeze({__proto__:null,getOperation:function(){return I.PNHereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=t.channelGroups,a=void 0===r?[]:r,s="/v2/presence/sub-key/".concat(n.subscribeKey);if(o.length>0||a.length>0){var l=o.length>0?o.join(","):",";s+="/channel/".concat(P.encodeString(l))}return s},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,o=void 0===n?[]:n,r=t.includeUUIDs,a=void 0===r||r,s=t.includeState,l=void 0!==s&&s,u=t.queryParameters,c=void 0===u?{}:u,d={};return a||(d.disable_uuids=1),l&&(d.state=1),o.length>0&&(d["channel-group"]=o.join(",")),i(i({},d),c)},handleResponse:function(e,t,n){var i=n.channels,o=void 0===i?[]:i,r=n.channelGroups,a=void 0===r?[]:r,s=n.includeUUIDs,l=void 0===s||s,u=n.includeState,c=void 0!==u&&u;return o.length>1||a.length>0||0===a.length&&0===o.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach((function(n){var i=t.payload.channels[n],o=[];return e.channels[n]={occupants:o,name:n,occupancy:i.occupancy},l&&i.uuids.forEach((function(e){c?o.push({state:e.state,uuid:e.uuid}):o.push({state:null,uuid:e})})),e})),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[o[0]]={occupants:n,name:o[0],occupancy:t.occupancy},l&&t.uuids&&t.uuids.forEach((function(e){c?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})})),e}()},handleError:function(e,t,n){402!==n.statusCode||this.getURL(e,t).includes("channel")||(n.errorData.message="You have tried to perform a Global Here Now operation, your keyset configuration does not support that. Please provide a channel, or enable the Global Here Now feature from the Portal.")}}),ce=Object.freeze({__proto__:null,getOperation:function(){return I.PNAddMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.action,o=t.channel;return t.messageTimetoken?n.subscribeKey?o?i?i.value?i.type?i.type.length>15?"Action.type value exceed maximum length of 15":void 0:"Missing Action.type":"Missing Action.value":"Missing Action":"Missing message channel":"Missing Subscribe Key":"Missing message timetoken"},usePost:function(){return!0},postURL:function(e,t){var n=e.config,i=t.channel,o=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(i),"/message/").concat(o)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},getRequestHeaders:function(){return{"Content-Type":"application/json"}},isAuthSupported:function(){return!0},prepareParams:function(){return{}},postPayload:function(e,t){return t.action},handleResponse:function(e,t){return{data:t.data}}}),de=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.channel,o=t.actionTimetoken;return t.messageTimetoken?o?n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key":"Missing action timetoken":"Missing message timetoken"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config,i=t.channel,o=t.actionTimetoken,r=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(i),"/message/").concat(r,"/action/").concat(o)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{data:t.data}}}),he=Object.freeze({__proto__:null,getOperation:function(){return I.PNGetMessageActionsOperation},validateParams:function(e,t){var n=e.config,i=t.channel;return n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channel;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(i))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.limit,i=t.start,o=t.end,r={};return n&&(r.limit=n),i&&(r.start=i),o&&(r.end=o),r},handleResponse:function(e,t){var n={data:t.data,start:null,end:null};return n.data.length&&(n.end=n.data[n.data.length-1].actionTimetoken,n.start=n.data[0].actionTimetoken),n}}),pe={getOperation:function(){return I.PNListFilesOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"channel can't be empty"},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/files")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.limit&&(n.limit=t.limit),t.next&&(n.next=t.next),n},handleResponse:function(e,t){return{status:t.status,data:t.data,next:t.next,count:t.count}}},fe={getOperation:function(){return I.PNGenerateUploadUrlOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?void 0:"name can't be empty":"channel can't be empty"},usePost:function(){return!0},postURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/generate-upload-url")},postPayload:function(e,t){return{name:t.name}},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data,file_upload_request:t.file_upload_request}}},ge={getOperation:function(){return I.PNPublishFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.fileId)?(null==t?void 0:t.fileName)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},getURL:function(e,t){var n=e.config,i=n.publishKey,o=n.subscribeKey,r=function(e,t){var n=e.crypto,i=e.config,o=JSON.stringify(t);return i.cipherKey&&(o=n.encrypt(o),o=JSON.stringify(o)),o||""}(e,{message:t.message,file:{name:t.fileName,id:t.fileId}});return"/v1/files/publish-file/".concat(i,"/").concat(o,"/0/").concat(P.encodeString(t.channel),"/0/").concat(P.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.ttl&&(n.ttl=t.ttl),void 0!==t.storeInHistory&&(n.store=t.storeInHistory?"1":"0"),t.meta&&"object"==typeof t.meta&&(n.meta=JSON.stringify(t.meta)),n},handleResponse:function(e,t){return{timetoken:t[2]}}},me=function(e){var t=function(e){var t=this,n=e.generateUploadUrl,i=e.publishFile,o=e.modules,s=o.PubNubFile,l=o.config,u=o.cryptography,c=o.networking;return function(e){var o=e.channel,d=e.file,h=e.message,p=e.cipherKey,f=e.meta,g=e.ttl,m=e.storeInHistory;return r(t,void 0,void 0,(function(){var e,t,r,b,v,y,w,C,x,A,S,k,T,_,E,O,P,N,M,I,D,U,L,B,R,j,H,F;return a(this,(function(a){switch(a.label){case 0:if(!o)throw new z("Validation failed, check status for details",$("channel can't be empty"));if(!d)throw new z("Validation failed, check status for details",$("file can't be empty"));return e=s.create(d),[4,n({channel:o,name:e.name})];case 1:return t=a.sent(),r=t.file_upload_request,b=r.url,v=r.form_fields,y=t.data,w=y.id,C=y.name,s.supportsEncryptFile&&(null!=p?p:l.cipherKey)?[4,u.encryptFile(null!=p?p:l.cipherKey,e,s)]:[3,3];case 2:e=a.sent(),a.label=3;case 3:x=v,e.mimeType&&(x=v.map((function(t){return"Content-Type"===t.key?{key:t.key,value:e.mimeType}:t}))),a.label=4;case 4:return a.trys.push([4,18,,22]),s.supportsFileUri&&d.uri?(k=(S=c).POSTFILE,T=[b,x],[4,e.toFileUri()]):[3,7];case 5:return[4,k.apply(S,T.concat([a.sent()]))];case 6:return A=a.sent(),[3,17];case 7:return s.supportsFile?(E=(_=c).POSTFILE,O=[b,x],[4,e.toFile()]):[3,10];case 8:return[4,E.apply(_,O.concat([a.sent()]))];case 9:return A=a.sent(),[3,17];case 10:return s.supportsBuffer?(N=(P=c).POSTFILE,M=[b,x],[4,e.toBuffer()]):[3,13];case 11:return[4,N.apply(P,M.concat([a.sent()]))];case 12:return A=a.sent(),[3,17];case 13:return s.supportsBlob?(D=(I=c).POSTFILE,U=[b,x],[4,e.toBlob()]):[3,16];case 14:return[4,D.apply(I,U.concat([a.sent()]))];case 15:return A=a.sent(),[3,17];case 16:throw new Error("Unsupported environment");case 17:return[3,22];case 18:return(L=a.sent()).response?[4,(Q=L.response,new Promise((function(e){var t="";Q.on("data",(function(e){t+=e.toString("utf8")})),Q.on("end",(function(){e(t)}))})))]:[3,20];case 19:throw B=a.sent(),R=/<Message>(.*)<\/Message>/gi.exec(B),new z(R?"Upload to bucket failed: ".concat(R[1]):"Upload to bucket failed.",L);case 20:throw new z("Upload to bucket failed.",L);case 21:return[3,22];case 22:if(204!==A.status)throw new z("Upload to bucket was unsuccessful",A);j=l.fileUploadPublishRetryLimit,H=!1,F={timetoken:"0"},a.label=23;case 23:return a.trys.push([23,25,,26]),[4,i({channel:o,message:h,fileId:w,fileName:C,meta:f,storeInHistory:m,ttl:g})];case 24:return F=a.sent(),H=!0,[3,26];case 25:return a.sent(),j-=1,[3,26];case 26:if(!H&&j>0)return[3,23];a.label=27;case 27:if(H)return[2,{timetoken:F.timetoken,id:w,name:C}];throw new z("Publish failed. You may want to execute that operation manually using pubnub.publishFile",{channel:o,id:w,name:C})}var Q}))}))}}(e);return function(e,n){var i=t(e);return"function"==typeof n?(i.then((function(e){return n(null,e)})).catch((function(e){return n(e,null)})),i):i}},be=function(e,t){var n=t.channel,i=t.id,o=t.name,r=e.config,a=e.networking,s=e.tokenManager;if(!n)throw new z("Validation failed, check status for details",$("channel can't be empty"));if(!i)throw new z("Validation failed, check status for details",$("file id can't be empty"));if(!o)throw new z("Validation failed, check status for details",$("file name can't be empty"));var l="/v1/files/".concat(r.subscribeKey,"/channels/").concat(P.encodeString(n),"/files/").concat(i,"/").concat(o),u={};u.uuid=r.getUUID(),u.pnsdk=G(r);var c=s.getToken()||r.getAuthKey();c&&(u.auth=c),r.secretKey&&W(e,l,u,{},{getOperation:function(){return"PubNubGetFileUrlOperation"}});var d=Object.keys(u).map((function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(u[e]))})).join("&");return""!==d?"".concat(a.getStandardOrigin()).concat(l,"?").concat(d):"".concat(a.getStandardOrigin()).concat(l)},ve={getOperation:function(){return I.PNDownloadFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?(null==t?void 0:t.id)?void 0:"id can't be empty":"name can't be empty":"channel can't be empty"},useGetFile:function(){return!0},getFileURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},ignoreBody:function(){return!0},forceBuffered:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t,n){var i=e.PubNubFile,o=e.config,s=e.cryptography;return r(void 0,void 0,void 0,(function(){var e,r,l,u;return a(this,(function(a){switch(a.label){case 0:return e=t.response.body,i.supportsEncryptFile&&(null!==(r=n.cipherKey)&&void 0!==r?r:o.cipherKey)?[4,s.decrypt(null!==(l=n.cipherKey)&&void 0!==l?l:o.cipherKey,e)]:[3,2];case 1:e=a.sent(),a.label=2;case 2:return[2,i.create({data:e,name:null!==(u=t.response.name)&&void 0!==u?u:n.name,mimeType:t.response.type})]}}))}))}},ye={getOperation:function(){return I.PNListFilesOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.id)?(null==t?void 0:t.name)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status}}},we={getOperation:function(){return I.PNGetAllUUIDMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(o=t.include)||void 0===o?void 0:o.totalCount),(null===(r=null==t?void 0:t.page)||void 0===r?void 0:r.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,next:t.next,prev:t.prev}}},Ce={getOperation:function(){return I.PNGetUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o=e.config,r={};return r.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:o.getUUID(),r.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&r.include.pop(),r.include=r.include.join(","),r},handleResponse:function(e,t){return{status:t.status,data:t.data}}},xe={getOperation:function(){return I.PNSetUUIDMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.data))return"Data cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o=e.config,r={};return r.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:o.getUUID(),r.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&r.include.pop(),r.include=r.include.join(","),r},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Ae={getOperation:function(){return I.PNRemoveUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i=e.config;return{uuid:null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Se={getOperation:function(){return I.PNGetAllChannelMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(o=t.include)||void 0===o?void 0:o.totalCount),(null===(r=null==t?void 0:t.page)||void 0===r?void 0:r.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},ke={getOperation:function(){return I.PNGetChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Te={getOperation:function(){return I.PNSetChannelMetadataOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.data)?void 0:"Data cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},_e={getOperation:function(){return I.PNRemoveChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Ee={getOperation:function(){return I.PNGetMembersOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"UUID cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h,p,f,g={include:["uuid.status","uuid.type","type"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&g.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customUUIDFields)&&g.include.push("uuid.custom"),(null===(r=null===(o=t.include)||void 0===o?void 0:o.UUIDFields)||void 0===r||r)&&g.include.push("uuid")),g.include=g.include.join(","),(null===(a=null==t?void 0:t.include)||void 0===a?void 0:a.totalCount)&&(g.count=null===(s=t.include)||void 0===s?void 0:s.totalCount),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.next)&&(g.start=null===(c=t.page)||void 0===c?void 0:c.next),(null===(d=null==t?void 0:t.page)||void 0===d?void 0:d.prev)&&(g.end=null===(h=t.page)||void 0===h?void 0:h.prev),(null==t?void 0:t.filter)&&(g.filter=t.filter),g.limit=null!==(p=null==t?void 0:t.limit)&&void 0!==p?p:100,(null==t?void 0:t.sort)&&(g.sort=Object.entries(null!==(f=t.sort)&&void 0!==f?f:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),g},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Oe={getOperation:function(){return I.PNSetMembersOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.uuids)&&0!==(null==t?void 0:t.uuids.length)?void 0:"UUIDs cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/uuids")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.uuids.map((function(e){return"string"==typeof e?{uuid:{id:e}}:{uuid:{id:e.id},custom:e.custom,status:e.status}})),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["uuid.status","uuid.type","type"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customUUIDFields)&&h.include.push("uuid.custom"),(null===(o=t.include)||void 0===o?void 0:o.UUIDFields)&&h.include.push("uuid")),h.include=h.include.join(","),(null===(r=null==t?void 0:t.include)||void 0===r?void 0:r.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Pe={getOperation:function(){return I.PNGetMembershipsOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h,p,f={include:["channel.status","channel.type","status"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&f.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customChannelFields)&&f.include.push("channel.custom"),(null===(o=t.include)||void 0===o?void 0:o.channelFields)&&f.include.push("channel")),f.include=f.include.join(","),(null===(r=null==t?void 0:t.include)||void 0===r?void 0:r.totalCount)&&(f.count=null===(a=t.include)||void 0===a?void 0:a.totalCount),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.next)&&(f.start=null===(u=t.page)||void 0===u?void 0:u.next),(null===(c=null==t?void 0:t.page)||void 0===c?void 0:c.prev)&&(f.end=null===(d=t.page)||void 0===d?void 0:d.prev),(null==t?void 0:t.filter)&&(f.filter=t.filter),f.limit=null!==(h=null==t?void 0:t.limit)&&void 0!==h?h:100,(null==t?void 0:t.sort)&&(f.sort=Object.entries(null!==(p=t.sort)&&void 0!==p?p:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),f},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ne={getOperation:function(){return I.PNSetMembershipsOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)||0===(null==t?void 0:t.channels.length))return"Channels cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.channels.map((function(e){return"string"==typeof e?{channel:{id:e}}:{channel:{id:e.id},custom:e.custom,status:e.status}})),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["channel.status","channel.type","status"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customChannelFields)&&h.include.push("channel.custom"),(null===(o=t.include)||void 0===o?void 0:o.channelFields)&&h.include.push("channel")),h.include=h.include.join(","),(null===(r=null==t?void 0:t.include)||void 0===r?void 0:r.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Me=Object.freeze({__proto__:null,getOperation:function(){return I.PNAccessManagerAudit},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/audit/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channel,i=t.channelGroup,o=t.authKeys,r=void 0===o?[]:o,a={};return n&&(a.channel=n),i&&(a["channel-group"]=i),r.length>0&&(a.auth=r.join(",")),a},handleResponse:function(e,t){return t.payload}}),Ie=Object.freeze({__proto__:null,getOperation:function(){return I.PNAccessManagerGrant},validateParams:function(e,t){var n=e.config;return n.subscribeKey?n.publishKey?n.secretKey?null==t.uuids||t.authKeys?null==t.uuids||null==t.channels&&null==t.channelGroups?void 0:"Both channel/channelgroup and uuid cannot be used in the same request":"authKeys are required for grant request on uuids":"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/grant/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channels,i=void 0===n?[]:n,o=t.channelGroups,r=void 0===o?[]:o,a=t.uuids,s=void 0===a?[]:a,l=t.ttl,u=t.read,c=void 0!==u&&u,d=t.write,h=void 0!==d&&d,p=t.manage,f=void 0!==p&&p,g=t.get,m=void 0!==g&&g,b=t.join,v=void 0!==b&&b,y=t.update,w=void 0!==y&&y,C=t.authKeys,x=void 0===C?[]:C,A=t.delete,S={};return S.r=c?"1":"0",S.w=h?"1":"0",S.m=f?"1":"0",S.d=A?"1":"0",S.g=m?"1":"0",S.j=v?"1":"0",S.u=w?"1":"0",i.length>0&&(S.channel=i.join(",")),r.length>0&&(S["channel-group"]=r.join(",")),x.length>0&&(S.auth=x.join(",")),s.length>0&&(S["target-uuid"]=s.join(",")),(l||0===l)&&(S.ttl=l),S},handleResponse:function(){return{}}});function De(e){var t,n,i,o,r=void 0!==(null==e?void 0:e.authorizedUserId),a=void 0!==(null===(t=null==e?void 0:e.resources)||void 0===t?void 0:t.users),s=void 0!==(null===(n=null==e?void 0:e.resources)||void 0===n?void 0:n.spaces),l=void 0!==(null===(i=null==e?void 0:e.patterns)||void 0===i?void 0:i.users),u=void 0!==(null===(o=null==e?void 0:e.patterns)||void 0===o?void 0:o.spaces);return l||a||u||s||r}function Ue(e){var t=0;return e.join&&(t|=128),e.update&&(t|=64),e.get&&(t|=32),e.delete&&(t|=8),e.manage&&(t|=4),e.write&&(t|=2),e.read&&(t|=1),t}var Le=Object.freeze({__proto__:null,getOperation:function(){return I.PNAccessManagerGrantToken},extractPermissions:Ue,validateParams:function(e,t){var n,i,o,r,a,s,l=e.config;if(!l.subscribeKey)return"Missing Subscribe Key";if(!l.publishKey)return"Missing Publish Key";if(!l.secretKey)return"Missing Secret Key";if(!t.resources&&!t.patterns)return"Missing either Resources or Patterns.";var u=void 0!==(null==t?void 0:t.authorized_uuid),c=void 0!==(null===(n=null==t?void 0:t.resources)||void 0===n?void 0:n.uuids),d=void 0!==(null===(i=null==t?void 0:t.resources)||void 0===i?void 0:i.channels),h=void 0!==(null===(o=null==t?void 0:t.resources)||void 0===o?void 0:o.groups),p=void 0!==(null===(r=null==t?void 0:t.patterns)||void 0===r?void 0:r.uuids),f=void 0!==(null===(a=null==t?void 0:t.patterns)||void 0===a?void 0:a.channels),g=void 0!==(null===(s=null==t?void 0:t.patterns)||void 0===s?void 0:s.groups),m=u||c||p||d||f||h||g;return De(t)&&m?"Cannot mix `users`, `spaces` and `authorizedUserId` with `uuids`, `channels`, `groups` and `authorized_uuid`":(!t.resources||t.resources.uuids&&0!==Object.keys(t.resources.uuids).length||t.resources.channels&&0!==Object.keys(t.resources.channels).length||t.resources.groups&&0!==Object.keys(t.resources.groups).length||t.resources.users&&0!==Object.keys(t.resources.users).length||t.resources.spaces&&0!==Object.keys(t.resources.spaces).length)&&(!t.patterns||t.patterns.uuids&&0!==Object.keys(t.patterns.uuids).length||t.patterns.channels&&0!==Object.keys(t.patterns.channels).length||t.patterns.groups&&0!==Object.keys(t.patterns.groups).length||t.patterns.users&&0!==Object.keys(t.patterns.users).length||t.patterns.spaces&&0!==Object.keys(t.patterns.spaces).length)?void 0:"Missing values for either Resources or Patterns."},postURL:function(e){var t=e.config;return"/v3/pam/".concat(t.subscribeKey,"/grant")},usePost:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(){return{}},postPayload:function(e,t){return function(e,t){if(De(t))return function(e,t){var n=t.ttl,i=t.resources,o=t.patterns,r=t.meta,a=t.authorizedUserId,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.users,u=i.spaces,c=i.groups;l&&Object.keys(l).forEach((function(e){s.permissions.resources.uuids[e]=Ue(l[e])})),u&&Object.keys(u).forEach((function(e){s.permissions.resources.channels[e]=Ue(u[e])})),c&&Object.keys(c).forEach((function(e){s.permissions.resources.groups[e]=Ue(c[e])}))}if(o){var d=o.users,h=o.spaces,p=o.groups;d&&Object.keys(d).forEach((function(e){s.permissions.patterns.uuids[e]=Ue(d[e])})),h&&Object.keys(h).forEach((function(e){s.permissions.patterns.channels[e]=Ue(h[e])})),p&&Object.keys(p).forEach((function(e){s.permissions.patterns.groups[e]=Ue(p[e])}))}return(n||0===n)&&(s.ttl=n),r&&(s.permissions.meta=r),a&&(s.permissions.uuid="".concat(a)),s}(0,t);var n=t.ttl,i=t.resources,o=t.patterns,r=t.meta,a=t.authorized_uuid,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.uuids,u=i.channels,c=i.groups;l&&Object.keys(l).forEach((function(e){s.permissions.resources.uuids[e]=Ue(l[e])})),u&&Object.keys(u).forEach((function(e){s.permissions.resources.channels[e]=Ue(u[e])})),c&&Object.keys(c).forEach((function(e){s.permissions.resources.groups[e]=Ue(c[e])}))}if(o){var d=o.uuids,h=o.channels,p=o.groups;d&&Object.keys(d).forEach((function(e){s.permissions.patterns.uuids[e]=Ue(d[e])})),h&&Object.keys(h).forEach((function(e){s.permissions.patterns.channels[e]=Ue(h[e])})),p&&Object.keys(p).forEach((function(e){s.permissions.patterns.groups[e]=Ue(p[e])}))}return(n||0===n)&&(s.ttl=n),r&&(s.permissions.meta=r),a&&(s.permissions.uuid="".concat(a)),s}(0,t)},handleResponse:function(e,t){return t.data.token}}),Be={getOperation:function(){return I.PNAccessManagerRevokeToken},validateParams:function(e,t){return e.config.secretKey?t?void 0:"token can't be empty":"Missing Secret Key"},getURL:function(e,t){var n=e.config;return"/v3/pam/".concat(n.subscribeKey,"/grant/").concat(P.encodeString(t))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e){return{uuid:e.config.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}};function Re(e,t){var n=e.crypto,i=e.config,o=JSON.stringify(t);return i.cipherKey&&(o=n.encrypt(o),o=JSON.stringify(o)),o}var je=Object.freeze({__proto__:null,getOperation:function(){return I.PNPublishOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},usePost:function(e,t){var n=t.sendByPost;return void 0!==n&&n},getURL:function(e,t){var n=e.config,i=t.channel,o=Re(e,t.message);return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(P.encodeString(i),"/0/").concat(P.encodeString(o))},postURL:function(e,t){var n=e.config,i=t.channel;return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(P.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},postPayload:function(e,t){return Re(e,t.message)},prepareParams:function(e,t){var n=t.meta,i=t.replicate,o=void 0===i||i,r=t.storeInHistory,a=t.ttl,s={};return null!=r&&(s.store=r?"1":"0"),a&&(s.ttl=a),!1===o&&(s.norep="true"),n&&"object"==typeof n&&(s.meta=JSON.stringify(n)),s},handleResponse:function(e,t){return{timetoken:t[2]}}}),He=Object.freeze({__proto__:null,getOperation:function(){return I.PNSignalOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},getURL:function(e,t){var n,i=e.config,o=t.channel,r=(n=t.message,JSON.stringify(n));return"/signal/".concat(i.publishKey,"/").concat(i.subscribeKey,"/0/").concat(P.encodeString(o),"/0/").concat(P.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{timetoken:t[2]}}});function Fe(e,t){var n=e.config,i=e.crypto;if(!n.cipherKey)return t;try{return i.decrypt(t)}catch(e){return t}}var ze=Object.freeze({__proto__:null,getOperation:function(){return I.PNHistoryOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channel,i=e.config;return"/v2/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,o=t.reverse,r=t.count,a=void 0===r?100:r,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d={include_token:"true"};return d.count=a,n&&(d.start=n),i&&(d.end=i),l&&(d.string_message_token="true"),null!=o&&(d.reverse=o.toString()),c&&(d.include_meta="true"),d},handleResponse:function(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return Array.isArray(t[0])&&t[0].forEach((function(t){var i={timetoken:t.timetoken,entry:Fe(e,t.message)};t.meta&&(i.meta=t.meta),n.messages.push(i)})),n}}),$e=Object.freeze({__proto__:null,getOperation:function(){return I.PNDeleteMessagesOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},useDelete:function(){return!0},getURL:function(e,t){var n=t.channel,i=e.config;return"/v3/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,o={};return n&&(o.start=n),i&&(o.end=i),o},handleResponse:function(e,t){return t.payload}}),Qe=Object.freeze({__proto__:null,getOperation:function(){return I.PNMessageCounts},validateParams:function(e,t){var n=t.channels,i=t.timetoken,o=t.channelTimetokens,r=e.config;return n?i&&o?"timetoken and channelTimetokens are incompatible together":i&&o&&o.length>1&&n.length!==o.length?"Length of channelTimetokens and channels do not match":r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channels,i=e.config,o=n.join(",");return"/v3/history/sub-key/".concat(i.subscribeKey,"/message-counts/").concat(P.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.timetoken,i=t.channelTimetokens,o={};if(i&&1===i.length){var r=l(i,1)[0];o.timetoken=r}else i?o.channelsTimetoken=i.join(","):n&&(o.timetoken=n);return o},handleResponse:function(e,t){return{channels:t.channels}}}),Ge=Object.freeze({__proto__:null,getOperation:function(){return I.PNFetchMessagesOperation},validateParams:function(e,t){var n=t.channels,i=t.includeMessageActions,o=void 0!==i&&i,r=e.config;if(!n||0===n.length)return"Missing channels";if(!r.subscribeKey)return"Missing Subscribe Key";if(o&&n.length>1)throw new TypeError("History can return actions data for a single channel only. Either pass a single channel or disable the includeMessageActions flag.")},getURL:function(e,t){var n=t.channels,i=void 0===n?[]:n,o=t.includeMessageActions,r=void 0!==o&&o,a=e.config,s=r?"history-with-actions":"history",l=i.length>0?i.join(","):",";return"/v3/".concat(s,"/sub-key/").concat(a.subscribeKey,"/channel/").concat(P.encodeString(l))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels,i=t.start,o=t.end,r=t.includeMessageActions,a=t.count,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d=t.includeUuid,h=t.includeUUID,p=void 0===h||h,f=t.includeMessageType,g=void 0===f||f,m={};return m.max=a||(n.length>1||!0===r?25:100),i&&(m.start=i),o&&(m.end=o),l&&(m.string_message_token="true"),c&&(m.include_meta="true"),p&&!1!==d&&(m.include_uuid="true"),g&&(m.include_message_type="true"),m},handleResponse:function(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach((function(i){n.channels[i]=[],(t.channels[i]||[]).forEach((function(t){var o={};o.channel=i,o.timetoken=t.timetoken,o.message=function(e,t){var n=e.config,i=e.crypto;if(!n.cipherKey)return t;try{return i.decrypt(t)}catch(e){return t}}(e,t.message),o.messageType=t.message_type,o.uuid=t.uuid,t.actions&&(o.actions=t.actions,o.data=t.actions),t.meta&&(o.meta=t.meta),n.channels[i].push(o)}))})),t.more&&(n.more=t.more),n}}),qe=Object.freeze({__proto__:null,getOperation:function(){return I.PNTimeOperation},getURL:function(){return"/time/0"},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},isAuthSupported:function(){return!1},handleResponse:function(e,t){return{timetoken:t[0]}},validateParams:function(){}}),We=Object.freeze({__proto__:null,getOperation:function(){return I.PNSubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(P.encodeString(r),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=e.config,i=t.state,o=t.channelGroups,r=void 0===o?[]:o,a=t.timetoken,s=t.filterExpression,l=t.region,u={heartbeat:n.getPresenceTimeout()};return r.length>0&&(u["channel-group"]=r.join(",")),s&&s.length>0&&(u["filter-expr"]=s),Object.keys(i).length&&(u.state=JSON.stringify(i)),a&&(u.tt=a),l&&(u.tr=l),u},handleResponse:function(e,t){var n=[];t.m.forEach((function(e){var t={publishTimetoken:e.p.t,region:e.p.r},i={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(i)}));var i={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:i}}}),Ve={getOperation:function(){return I.PNHandshakeOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)&&!(null==t?void 0:t.channelGroups))return"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels?t.channels.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(P.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),n.tt=0,n},handleResponse:function(e,t){return{region:t.t.r,timetoken:t.t.t}}},Ye={getOperation:function(){return I.PNReceiveMessagesOperation},validateParams:function(e,t){return(null==t?void 0:t.channels)||(null==t?void 0:t.channelGroups)?(null==t?void 0:t.timetoken)?(null==t?void 0:t.region)?void 0:"region can not be empty":"timetoken can not be empty":"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels?t.channels.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(P.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},getAbortSignal:function(e,t){return t.abortSignal},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),n.tt=t.timetoken,n.tr=t.region,n},handleResponse:function(e,t){var n=[];return t.m.forEach((function(e){var t={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,publishMetaData:{timetoken:e.p.t,region:e.p.r}};n.push(t)})),{messages:n,metadata:{region:t.t.r,timetoken:t.t.t}}}},Ke=function(){function e(e){void 0===e&&(e=!1),this.sync=e,this.listeners=new Set}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},e.prototype.notify=function(e){var t=this,n=function(){t.listeners.forEach((function(t){t(e)}))};this.sync?n():setTimeout(n,0)},e}(),Xe=function(){function e(e){this.label=e,this.transitionMap=new Map,this.enterEffects=[],this.exitEffects=[]}return e.prototype.transition=function(e,t){var n;if(this.transitionMap.has(t.type))return null===(n=this.transitionMap.get(t.type))||void 0===n?void 0:n(e,t)},e.prototype.on=function(e,t){return this.transitionMap.set(e,t),this},e.prototype.with=function(e,t){return[this,e,null!=t?t:[]]},e.prototype.onEnter=function(e){return this.enterEffects.push(e),this},e.prototype.onExit=function(e){return this.exitEffects.push(e),this},e}(),Ze=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.describe=function(e){return new Xe(e)},n.prototype.start=function(e,t){this.currentState=e,this.currentContext=t,this.notify({type:"engineStarted",state:e,context:t})},n.prototype.transition=function(e){var t,n,i,o,r,a;if(!this.currentState)throw new Error("Start the engine first");this.notify({type:"eventReceived",event:e});var u=this.currentState.transition(this.currentContext,e);if(u){var c=l(u,3),d=c[0],h=c[1],p=c[2];try{for(var f=s(this.currentState.exitEffects),g=f.next();!g.done;g=f.next()){var m=g.value;this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}var b=this.currentState;this.currentState=d;var v=this.currentContext;this.currentContext=h,this.notify({type:"transitionDone",fromState:b,fromContext:v,toState:d,toContext:h,event:e});try{for(var y=s(p),w=y.next();!w.done;w=y.next())m=w.value,this.notify({type:"invocationDispatched",invocation:m})}catch(e){i={error:e}}finally{try{w&&!w.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}try{for(var C=s(this.currentState.enterEffects),x=C.next();!x.done;x=C.next())m=x.value,this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}catch(e){r={error:e}}finally{try{x&&!x.done&&(a=C.return)&&a.call(C)}finally{if(r)throw r.error}}}},n}(Ke),Je=function(){function e(e){this.dependencies=e,this.instances=new Map,this.handlers=new Map}return e.prototype.on=function(e,t){this.handlers.set(e,t)},e.prototype.dispatch=function(e){if("CANCEL"!==e.type){var t=this.handlers.get(e.type);if(!t)throw new Error("Unhandled invocation '".concat(e.type,"'"));var n=t(e.payload,this.dependencies);e.managed&&this.instances.set(e.type,n),n.start()}else if(this.instances.has(e.payload)){var i=this.instances.get(e.payload);null==i||i.cancel(),this.instances.delete(e.payload)}},e}();function et(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:null==t?void 0:t.apply(void 0,u([],l(n),!1))}};return n.type=e,n}function tt(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:t.apply(void 0,u([],l(n),!1)),managed:!0}};return n.type=e,n.cancel={type:"CANCEL",payload:e,managed:!1},n}var nt,it,ot,rt=function(e){function n(){var t=this.constructor,n=e.call(this,"The operation was aborted.")||this;return n.name="AbortError",Object.setPrototypeOf(n,t.prototype),n}return t(n,e),n}(Error),at=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._aborted=!1,t}return t(n,e),Object.defineProperty(n.prototype,"aborted",{get:function(){return this._aborted},enumerable:!1,configurable:!0}),n.prototype.throwIfAborted=function(){if(this._aborted)throw new rt},n.prototype.abort=function(){this._aborted=!0,this.notify(new rt)},n}(Ke),st=function(e){function n(t,n,i){var o=e.call(this,t,n)||this;return o.asyncFunction=i,o.abortSignal=new at,o}return t(n,e),n.prototype.start=function(){this.asyncFunction(this.payload,this.abortSignal,this.dependencies)},n.prototype.cancel=function(){this.abortSignal.abort()},n}((function(e,t){this.payload=e,this.dependencies=t})),lt=function(e){return function(t,n){return new st(t,n,e)}},ut=tt("HANDSHAKE",(function(e,t){return{channels:e,groups:t}})),ct=tt("RECEIVE_EVENTS",(function(e,t,n){return{channels:e,groups:t,cursor:n}})),dt=(it=function(e){return e},ot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{type:nt,payload:it.apply(void 0,u([],l(e),!1)),managed:!1}},ot.type=nt="EMIT_EVENTS",ot),ht=tt("RECONNECT",(function(e){return e})),pt=tt("HANDSHAKE_RECONNECT",(function(e){return e})),ft=et("SUBSCRIPTION_CHANGE",(function(e,t){return{channels:e,groups:t}})),gt=et("DISCONNECT",(function(){return{}})),mt=et("RECONNECT",(function(){return{}}));et("RESTORE",(function(e,t,n,i){return{channels:e,groups:t,timetoken:n,region:i}}));var bt=et("HANDSHAKING_SUCCESS",(function(e){return e})),vt=et("HANDSHAKING_FAILURE",(function(e){return e})),yt=et("HANDSHAKING_RECONNECTING_SUCCESS",(function(e){return{cursor:e}})),wt=et("HANDSHAKING_RECONNECTING_FAILURE",(function(e){return e})),Ct=et("HANDSHAKING_RECONNECTING_GIVEUP",(function(){return{}})),xt=et("HANDSHAKING_RECONNECTING_RETRY",(function(){return{}})),At=et("RECEIVING_SUCCESS",(function(e,t){return{cursor:e,events:t}})),St=et("RECEIVING_FAILURE",(function(e){return e})),kt=et("RECONNECTING_SUCCESS",(function(e,t){return{cursor:e,events:t}})),Tt=et("RECONNECTING_FAILURE",(function(e){return e})),_t=et("RECONNECTING_GIVEUP",(function(){return{}})),Et=et("RECONNECTING_RETRY",(function(){return{}})),Ot=function(e){function n(t,n){var i=e.call(this,n)||this;return i.on(ut.type,lt((function(e,n,o){var s=o.handshake;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:n.throwIfAborted(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups})];case 2:return i=r.sent(),t.transition(bt(i)),[3,4];case 3:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(vt(o))]:[3,4];case 4:return[2]}}))}))}))),i.on(ct.type,lt((function(e,n,o){var s=o.receiveEvents;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:n.throwIfAborted(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region})];case 2:return i=r.sent(),t.transition(At(i.metadata,i.messages)),[3,4];case 3:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(St(o))]:[3,4];case 4:return[2]}}))}))}))),i.on(dt.type,lt((function(e,t,n){return n.receiveEvents,r(i,void 0,void 0,(function(){return a(this,(function(t){return e.length>0&&console.log(e),[2]}))}))}))),i.on(ht.type,lt((function(e,n,o){var s=o.receiveEvents,l=o.shouldRetry,u=o.getRetryDelay,c=o.delay;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:return l(e.reason,e.attempts)?(n.throwIfAborted(),[4,c(u(e.attempts))]):[2,t.transition(_t())];case 1:r.sent(),n.throwIfAborted(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region})];case 3:return i=r.sent(),[2,t.transition(kt(i.metadata,i.messages))];case 4:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(Tt(o))]:[3,5];case 5:return[2]}}))}))}))),i.on(pt.type,lt((function(e,n,o){var s=o.handshake,l=o.shouldRetry,u=o.getRetryDelay,c=o.delay;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:return l(e.reason,e.attempts)?(n.throwIfAborted(),[4,c(u(e.attempts))]):[2,t.transition(Ct())];case 1:r.sent(),n.throwIfAborted(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups})];case 3:return i=r.sent(),[2,t.transition(yt(i.metadata))];case 4:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(wt(o))]:[3,5];case 5:return[2]}}))}))}))),i}return t(n,e),n}(Je),Pt=new Xe("STOPPED");Pt.on(ft.type,(function(e,t){return Pt.with({channels:t.payload.channels,groups:t.payload.groups})})),Pt.on(mt.type,(function(e){return Bt.with(i({},e))}));var Nt=new Xe("HANDSHAKE_FAILURE");Nt.on(xt.type,(function(e){return Lt.with(i(i({},e),{attempts:0}))})),Nt.on(gt.type,(function(e){return Pt.with({channels:e.channels,groups:e.groups})}));var Mt=new Xe("STOPPED");Mt.on(ft.type,(function(e,t){return Mt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})})),Mt.on(mt.type,(function(e){return Ut.with(i({},e))}));var It=new Xe("RECEIVE_FAILURE");It.on(Et.type,(function(e){return Dt.with(i(i({},e),{attempts:0}))})),It.on(gt.type,(function(e){return Mt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}));var Dt=new Xe("RECEIVE_RECONNECTING");Dt.onEnter((function(e){return ht(e)})),Dt.onExit((function(){return ht.cancel})),Dt.on(kt.type,(function(e,t){return Ut.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[dt(t.payload.events)])})),Dt.on(Tt.type,(function(e,t){return Dt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))})),Dt.on(_t.type,(function(e){return It.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:e.reason})})),Dt.on(gt.type,(function(e){return Mt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}));var Ut=new Xe("RECEIVING");Ut.onEnter((function(e){return ct(e.channels,e.groups,e.cursor)})),Ut.onExit((function(){return ct.cancel})),Ut.on(At.type,(function(e,t){return Ut.with(i(i({},e),{cursor:t.payload.cursor}),[dt(t.payload.events)])})),Ut.on(ft.type,(function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Rt.with(void 0):Ut.with(i(i({},e),{channels:t.payload.channels,groups:t.payload.groups}))})),Ut.on(St.type,(function(e,t){return Dt.with(i(i({},e),{attempts:0,reason:t.payload}))})),Ut.on(gt.type,(function(e){return Mt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}));var Lt=new Xe("HANDSHAKE_RECONNECTING");Lt.onEnter((function(e){return pt(e)})),Lt.onExit((function(){return ht.cancel})),Lt.on(kt.type,(function(e,t){return Ut.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[dt(t.payload.events)])})),Lt.on(Tt.type,(function(e,t){return Lt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))})),Lt.on(_t.type,(function(e){return Nt.with({groups:e.groups,channels:e.channels,reason:e.reason})})),Lt.on(gt.type,(function(e){return Pt.with({channels:e.channels,groups:e.groups})}));var Bt=new Xe("HANDSHAKING");Bt.onEnter((function(e){return ut(e.channels,e.groups)})),Bt.onExit((function(){return ut.cancel})),Bt.on(ft.type,(function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Rt.with(void 0):Bt.with({channels:t.payload.channels,groups:t.payload.groups})})),Bt.on(bt.type,(function(e,t){return Ut.with({channels:e.channels,groups:e.groups,cursor:t.payload})})),Bt.on(vt.type,(function(e,t){return Lt.with(i(i({},e),{attempts:0,reason:t.payload}))})),Bt.on(gt.type,(function(e){return Pt.with({channels:e.channels,groups:e.groups})}));var Rt=new Xe("UNSUBSCRIBED");Rt.on(ft.type,(function(e,t){return Bt.with({channels:t.payload.channels,groups:t.payload.groups})}));var jt=function(){function e(e){var t=this;this.engine=new Ze,this.channels=[],this.groups=[],this.dispatcher=new Ot(this.engine,e),this.engine.subscribe((function(e){"invocationDispatched"===e.type&&t.dispatcher.dispatch(e.invocation)})),this.engine.start(Rt,void 0)}return Object.defineProperty(e.prototype,"_engine",{get:function(){return this.engine},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){var t=e.channels,n=e.groups;this.channels=u(u([],l(this.channels),!1),l(null!=t?t:[]),!1),this.groups=u(u([],l(this.groups),!1),l(null!=n?n:[]),!1),this.engine.transition(ft(this.channels,this.groups))},e.prototype.unsubscribe=function(e){var t=e.channels,n=e.groups;this.channels=this.channels.filter((function(e){var n;return null===(n=!(null==t?void 0:t.includes(e)))||void 0===n||n})),this.groups=this.groups.filter((function(e){var t;return null===(t=!(null==n?void 0:n.includes(e)))||void 0===t||t})),this.engine.transition(ft(this.channels.slice(0),this.groups.slice(0)))},e.prototype.unsubscribeAll=function(){this.channels=[],this.groups=[],this.engine.transition(ft(this.channels.slice(0),this.groups.slice(0)))},e.prototype.reconnect=function(){this.engine.transition(mt())},e.prototype.disconnect=function(){this.engine.transition(gt())},e}(),Ht=function(){function e(e){var t=this,n=e.networking,o=e.cbor,r=new m({setup:e});this._config=r;var a=new T({config:r}),s=e.cryptography;n.init(r);var c=new F(r,o);this._tokenManager=c;var d=new D({maximumSamplesCount:6e4});this._telemetryManager=d;var h={config:r,networking:n,crypto:a,cryptography:s,tokenManager:c,telemetryManager:d,PubNubFile:e.PubNubFile};this.File=e.PubNubFile,this.encryptFile=function(e,n){return s.encryptFile(e,n,t.File)},this.decryptFile=function(e,n){return s.decryptFile(e,n,t.File)};var p=V.bind(this,h,qe),f=V.bind(this,h,oe),g=V.bind(this,h,ae),b=V.bind(this,h,le),v=V.bind(this,h,We),y=new H;if(this._listenerManager=y,this.iAmHere=V.bind(this,h,ae),this.iAmAway=V.bind(this,h,oe),this.setPresenceState=V.bind(this,h,le),this.handshake=V.bind(this,h,Ve),this.receiveMessages=V.bind(this,h,Ye),!0===r.enableSubscribeBeta){var w=new jt({handshake:this.handshake,receiveEvents:this.receiveMessages});this.subscribe=w.subscribe.bind(w),this.unsubscribe=w.unsubscribe.bind(w),this.eventEngine=w}else{var C=new M({timeEndpoint:p,leaveEndpoint:f,heartbeatEndpoint:g,setStateEndpoint:b,subscribeEndpoint:v,crypto:h.crypto,config:h.config,listenerManager:y,getFileUrl:function(e){return be(h,e)}});this.subscribe=C.adaptSubscribeChange.bind(C),this.unsubscribe=C.adaptUnsubscribeChange.bind(C),this.disconnect=C.disconnect.bind(C),this.reconnect=C.reconnect.bind(C),this.unsubscribeAll=C.unsubscribeAll.bind(C),this.getSubscribedChannels=C.getSubscribedChannels.bind(C),this.getSubscribedChannelGroups=C.getSubscribedChannelGroups.bind(C),this.setState=C.adaptStateChange.bind(C),this.presence=C.adaptPresenceChange.bind(C),this.destroy=function(e){C.unsubscribeAll(e),C.disconnect()}}this.addListener=y.addListener.bind(y),this.removeListener=y.removeListener.bind(y),this.removeAllListeners=y.removeAllListeners.bind(y),this.parseToken=c.parseToken.bind(c),this.setToken=c.setToken.bind(c),this.getToken=c.getToken.bind(c),this.channelGroups={listGroups:V.bind(this,h,Z),listChannels:V.bind(this,h,J),addChannels:V.bind(this,h,Y),removeChannels:V.bind(this,h,K),deleteGroup:V.bind(this,h,X)},this.push={addChannels:V.bind(this,h,ee),removeChannels:V.bind(this,h,te),deleteDevice:V.bind(this,h,ie),listChannels:V.bind(this,h,ne)},this.hereNow=V.bind(this,h,ue),this.whereNow=V.bind(this,h,re),this.getState=V.bind(this,h,se),this.grant=V.bind(this,h,Ie),this.grantToken=V.bind(this,h,Le),this.audit=V.bind(this,h,Me),this.revokeToken=V.bind(this,h,Be),this.publish=V.bind(this,h,je),this.fire=function(e,n){return e.replicate=!1,e.storeInHistory=!1,t.publish(e,n)},this.signal=V.bind(this,h,He),this.history=V.bind(this,h,ze),this.deleteMessages=V.bind(this,h,$e),this.messageCounts=V.bind(this,h,Qe),this.fetchMessages=V.bind(this,h,Ge),this.addMessageAction=V.bind(this,h,ce),this.removeMessageAction=V.bind(this,h,de),this.getMessageActions=V.bind(this,h,he),this.listFiles=V.bind(this,h,pe);var x=V.bind(this,h,fe);this.publishFile=V.bind(this,h,ge),this.sendFile=me({generateUploadUrl:x,publishFile:this.publishFile,modules:h}),this.getFileUrl=function(e){return be(h,e)},this.downloadFile=V.bind(this,h,ve),this.deleteFile=V.bind(this,h,ye),this.objects={getAllUUIDMetadata:V.bind(this,h,we),getUUIDMetadata:V.bind(this,h,Ce),setUUIDMetadata:V.bind(this,h,xe),removeUUIDMetadata:V.bind(this,h,Ae),getAllChannelMetadata:V.bind(this,h,Se),getChannelMetadata:V.bind(this,h,ke),setChannelMetadata:V.bind(this,h,Te),removeChannelMetadata:V.bind(this,h,_e),getChannelMembers:V.bind(this,h,Ee),setChannelMembers:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Oe,i({type:"set"},e)],l(n),!1))},removeChannelMembers:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Oe,i({type:"delete"},e)],l(n),!1))},getMemberships:V.bind(this,h,Pe),setMemberships:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Ne,i({type:"set"},e)],l(n),!1))},removeMemberships:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Ne,i({type:"delete"},e)],l(n),!1))}},this.createUser=function(e){return t.objects.setUUIDMetadata({uuid:e.userId,data:e.data,include:e.include})},this.updateUser=this.createUser,this.removeUser=function(e){return t.objects.removeUUIDMetadata({uuid:null==e?void 0:e.userId})},this.fetchUser=function(e){return t.objects.getUUIDMetadata({uuid:null==e?void 0:e.userId,include:null==e?void 0:e.include})},this.fetchUsers=this.objects.getAllUUIDMetadata,this.createSpace=function(e){return t.objects.setChannelMetadata({channel:e.spaceId,data:e.data,include:e.include})},this.updateSpace=this.createSpace,this.removeSpace=function(e){return t.objects.removeChannelMetadata({channel:e.spaceId})},this.fetchSpace=function(e){return t.objects.getChannelMetadata({channel:e.spaceId,include:e.include})},this.fetchSpaces=this.objects.getAllChannelMetadata,this.addMemberships=function(e){var n,i;return"string"==typeof e.spaceId?t.objects.setChannelMembers({channel:e.spaceId,uuids:null===(n=e.users)||void 0===n?void 0:n.map((function(e){return"string"==typeof e?e:{id:e.userId,custom:e.custom,status:e.status}})),limit:0}):t.objects.setMemberships({uuid:e.userId,channels:null===(i=e.spaces)||void 0===i?void 0:i.map((function(e){return"string"==typeof e?e:{id:e.spaceId,custom:e.custom,status:e.status}})),limit:0})},this.updateMemberships=this.addMemberships,this.removeMemberships=function(e){return"string"==typeof e.spaceId?t.objects.removeChannelMembers({channel:e.spaceId,uuids:e.userIds,limit:0}):t.objects.removeMemberships({uuid:e.userId,channels:e.spaceIds,limit:0})},this.fetchMemberships=function(e){return"string"==typeof e.spaceId?t.objects.getChannelMembers({channel:e.spaceId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,UUIDFields:e.include.userFields,customUUIDFields:e.include.customUserFields,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map((function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("user","uuid"),i]}))):null}).then((function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{user:e.uuid,custom:e.custom,updated:e.updated,eTag:e.eTag}})),e})):t.objects.getMemberships({uuid:e.userId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,channelFields:e.include.spaceFields,customChannelFields:e.include.customSpaceFields,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map((function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("space","channel"),i]}))):null}).then((function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{space:e.channel,custom:e.custom,updated:e.updated,eTag:e.eTag}})),e}))},this.time=p,this.stop=this.destroy,this.encrypt=a.encrypt.bind(a),this.decrypt=a.decrypt.bind(a),this.getAuthKey=h.config.getAuthKey.bind(h.config),this.setAuthKey=h.config.setAuthKey.bind(h.config),this.setCipherKey=h.config.setCipherKey.bind(h.config),this.getUUID=h.config.getUUID.bind(h.config),this.setUUID=h.config.setUUID.bind(h.config),this.getFilterExpression=h.config.getFilterExpression.bind(h.config),this.setFilterExpression=h.config.setFilterExpression.bind(h.config),this.setHeartbeatInterval=h.config.setHeartbeatInterval.bind(h.config),n.hasModule("proxy")&&(this.setProxy=function(e){h.config.setProxy(e),t.reconnect()})}return e.prototype.getVersion=function(){return this._config.getVersion()},e.prototype._addPnsdkSuffix=function(e,t){this._config._addPnsdkSuffix(e,t)},e.prototype.networkDownDetected=function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy(!0)},e.prototype.networkUpDetected=function(){this._listenerManager.announceNetworkUp(),this.reconnect()},e.notificationPayload=function(e,t){return new j(e,t)},e.generateUUID=function(){return g()},e.OPERATIONS=I,e.CATEGORIES=N,e}(),Ft=function(){function e(e){var t=this;this._modules={},Object.keys(e).forEach((function(n){t._modules[n]=e[n].bind(t)}))}return e.prototype.init=function(e){this._config=e,Array.isArray(this._config.origin)?this._currentSubDomain=Math.floor(Math.random()*this._config.origin.length):this._currentSubDomain=0,this._coreParams={},this.shiftStandardOrigin()},e.prototype.nextOrigin=function(){var e=this._config.secure?"https://":"http://";if("string"==typeof this._config.origin)return"".concat(e).concat(this._config.origin);this._currentSubDomain+=1,this._currentSubDomain>=this._config.origin.length&&(this._currentSubDomain=0);var t=this._config.origin[this._currentSubDomain];return"".concat(e).concat(t)},e.prototype.hasModule=function(e){return e in this._modules},e.prototype.shiftStandardOrigin=function(){return this._standardOrigin=this.nextOrigin(),this._standardOrigin},e.prototype.getStandardOrigin=function(){return this._standardOrigin},e.prototype.POSTFILE=function(e,t,n){return this._modules.postfile(e,t,n)},e.prototype.GETFILE=function(e,t,n){return this._modules.getfile(e,t,n)},e.prototype.POST=function(e,t,n,i){return this._modules.post(e,t,n,i)},e.prototype.PATCH=function(e,t,n,i){return this._modules.patch(e,t,n,i)},e.prototype.GET=function(e,t,n){return this._modules.get(e,t,n)},e.prototype.DELETE=function(e,t,n){return this._modules.del(e,t,n)},e.prototype._detectErrorCategory=function(e){if("ENOTFOUND"===e.code)return N.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return N.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return N.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return N.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return N.PNNetworkIssuesCategory;if(e.timeout)return N.PNTimeoutCategory;if("ETIMEDOUT"===e.code)return N.PNNetworkIssuesCategory;if(e.response){if(e.response.badRequest)return N.PNBadRequestCategory;if(e.response.forbidden)return N.PNAccessDeniedCategory}return N.PNUnknownCategory},e}();function zt(e){var t=function(e){return e&&"object"==typeof e&&e.constructor===Object};if(!t(e))return e;var n={};return Object.keys(e).forEach((function(i){var o=function(e){return"string"==typeof e||e instanceof String}(i),r=i,a=e[i];Array.isArray(i)||o&&i.indexOf(",")>=0?r=(o?i.split(","):i).reduce((function(e,t){return e+String.fromCharCode(t)}),""):(function(e){return"number"==typeof e&&isFinite(e)}(i)||o&&!isNaN(i))&&(r=String.fromCharCode(o?parseInt(i,10):10)),n[r]=t(a)?zt(a):a})),n}var $t=function(){function e(e,t){this._base64ToBinary=t,this._decode=e}return e.prototype.decodeToken=function(e){var t="";e.length%4==3?t="=":e.length%4==2&&(t="==");var n=e.replace(/-/gi,"+").replace(/_/gi,"/")+t,i=this._decode(this._base64ToBinary(n));if("object"==typeof i)return i},e}(),Qt={exports:{}},Gt={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<i.length;o++)if((n=i[o])===t||n.fn===t){i.splice(o,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var o=(n=n.slice(0)).length;i<o;++i)n[i].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(Gt);var qt=Zt;Zt.default=Zt,Zt.stable=nn,Zt.stableStringify=nn;var Wt="[...]",Vt="[Circular]",Yt=[],Kt=[];function Xt(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Zt(e,t,n,i){var o;void 0===i&&(i=Xt()),en(e,"",0,[],void 0,0,i);try{o=0===Kt.length?JSON.stringify(e,t,n):JSON.stringify(e,rn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==Yt.length;){var r=Yt.pop();4===r.length?Object.defineProperty(r[0],r[1],r[3]):r[0][r[1]]=r[2]}}return o}function Jt(e,t,n,i){var o=Object.getOwnPropertyDescriptor(i,n);void 0!==o.get?o.configurable?(Object.defineProperty(i,n,{value:e}),Yt.push([i,n,t,o])):Kt.push([t,n,e]):(i[n]=e,Yt.push([i,n,t]))}function en(e,t,n,i,o,r,a){var s;if(r+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Jt(Vt,e,t,o);if(void 0!==a.depthLimit&&r>a.depthLimit)return void Jt(Wt,e,t,o);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Jt(Wt,e,t,o);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)en(e[s],s,s,i,e,r,a);else{var l=Object.keys(e);for(s=0;s<l.length;s++){var u=l[s];en(e[u],u,s,i,e,r,a)}}i.pop()}}function tn(e,t){return e<t?-1:e>t?1:0}function nn(e,t,n,i){void 0===i&&(i=Xt());var o,r=on(e,"",0,[],void 0,0,i)||e;try{o=0===Kt.length?JSON.stringify(r,t,n):JSON.stringify(r,rn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==Yt.length;){var a=Yt.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return o}function on(e,t,n,i,o,r,a){var s;if(r+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Jt(Vt,e,t,o);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==a.depthLimit&&r>a.depthLimit)return void Jt(Wt,e,t,o);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Jt(Wt,e,t,o);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)on(e[s],s,s,i,e,r,a);else{var l={},u=Object.keys(e).sort(tn);for(s=0;s<u.length;s++){var c=u[s];on(e[c],c,s,i,e,r,a),l[c]=e[c]}if(void 0===o)return l;Yt.push([o,t,e]),o[t]=l}i.pop()}}function rn(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(Kt.length>0)for(var i=0;i<Kt.length;i++){var o=Kt[i];if(o[1]===t&&o[0]===n){n=o[2],Kt.splice(i,1);break}}return e.call(this,t,n)}}var an=String.prototype.replace,sn=/%20/g,ln="RFC3986",un={default:ln,formatters:{RFC1738:function(e){return an.call(e,sn,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:ln},cn=un,dn=Object.prototype.hasOwnProperty,hn=Array.isArray,pn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),fn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)void 0!==e[i]&&(n[i]=e[i]);return n},gn={arrayToObject:fn,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var o=t[i],r=o.obj[o.prop],a=Object.keys(r),s=0;s<a.length;++s){var l=a[s],u=r[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:r,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(hn(n)){for(var i=[],o=0;o<n.length;++o)void 0!==n[o]&&i.push(n[o]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,n){var i=e.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(e){return i}},encode:function(e,t,n,i,o){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",s=0;s<r.length;++s){var l=r.charCodeAt(s);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===cn.RFC1738&&(40===l||41===l)?a+=r.charAt(s):l<128?a+=pn[l]:l<2048?a+=pn[192|l>>6]+pn[128|63&l]:l<55296||l>=57344?a+=pn[224|l>>12]+pn[128|l>>6&63]+pn[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&r.charCodeAt(s)),a+=pn[240|l>>18]+pn[128|l>>12&63]+pn[128|l>>6&63]+pn[128|63&l])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(hn(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(hn(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!dn.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return hn(t)&&!hn(n)&&(o=fn(t,i)),hn(t)&&hn(n)?(n.forEach((function(n,o){if(dn.call(t,o)){var r=t[o];r&&"object"==typeof r&&n&&"object"==typeof n?t[o]=e(r,n,i):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var r=n[o];return dn.call(t,o)?t[o]=e(t[o],r,i):t[o]=r,t}),o)}},mn=gn,bn=un,vn=Object.prototype.hasOwnProperty,yn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},wn=Array.isArray,Cn=String.prototype.split,xn=Array.prototype.push,An=function(e,t){xn.apply(e,wn(t)?t:[t])},Sn=Date.prototype.toISOString,kn=bn.default,Tn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:mn.encode,encodeValuesOnly:!1,format:kn,formatter:bn.formatters[kn],indices:!1,serializeDate:function(e){return Sn.call(e)},skipNulls:!1,strictNullHandling:!1},_n=function e(t,n,i,o,r,a,s,l,u,c,d,h,p,f){var g,m=t;if("function"==typeof s?m=s(n,m):m instanceof Date?m=c(m):"comma"===i&&wn(m)&&(m=mn.maybeMap(m,(function(e){return e instanceof Date?c(e):e}))),null===m){if(o)return a&&!p?a(n,Tn.encoder,f,"key",d):n;m=""}if("string"==typeof(g=m)||"number"==typeof g||"boolean"==typeof g||"symbol"==typeof g||"bigint"==typeof g||mn.isBuffer(m)){if(a){var b=p?n:a(n,Tn.encoder,f,"key",d);if("comma"===i&&p){for(var v=Cn.call(String(m),","),y="",w=0;w<v.length;++w)y+=(0===w?"":",")+h(a(v[w],Tn.encoder,f,"value",d));return[h(b)+"="+y]}return[h(b)+"="+h(a(m,Tn.encoder,f,"value",d))]}return[h(n)+"="+h(String(m))]}var C,x=[];if(void 0===m)return x;if("comma"===i&&wn(m))C=[{value:m.length>0?m.join(",")||null:void 0}];else if(wn(s))C=s;else{var A=Object.keys(m);C=l?A.sort(l):A}for(var S=0;S<C.length;++S){var k=C[S],T="object"==typeof k&&void 0!==k.value?k.value:m[k];if(!r||null!==T){var _=wn(m)?"function"==typeof i?i(n,k):n:n+(u?"."+k:"["+k+"]");An(x,e(T,_,i,o,r,a,s,l,u,c,d,h,p,f))}}return x},En=gn,On=Object.prototype.hasOwnProperty,Pn=Array.isArray,Nn={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:En.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Mn=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},In=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Dn=function(e,t,n,i){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,r=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,l=[];if(s){if(!n.plainObjects&&On.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var u=0;n.depth>0&&null!==(a=r.exec(o))&&u<n.depth;){if(u+=1,!n.plainObjects&&On.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+o.slice(a.index)+"]"),function(e,t,n,i){for(var o=i?t:In(t,n),r=e.length-1;r>=0;--r){var a,s=e[r];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(l,t,n,i)}},Un={formats:un,parse:function(e,t){var n=function(e){if(!e)return Nn;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?Nn.charset:e.charset;return{allowDots:void 0===e.allowDots?Nn.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Nn.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Nn.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Nn.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Nn.comma,decoder:"function"==typeof e.decoder?e.decoder:Nn.decoder,delimiter:"string"==typeof e.delimiter||En.isRegExp(e.delimiter)?e.delimiter:Nn.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Nn.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Nn.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Nn.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Nn.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Nn.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var i="string"==typeof e?function(e,t){var n,i={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,r=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,r),s=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?l="utf-8":"utf8=%26%2310003%3B"===a[n]&&(l="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var u,c,d=a[n],h=d.indexOf("]="),p=-1===h?d.indexOf("="):h+1;-1===p?(u=t.decoder(d,Nn.decoder,l,"key"),c=t.strictNullHandling?null:""):(u=t.decoder(d.slice(0,p),Nn.decoder,l,"key"),c=En.maybeMap(In(d.slice(p+1),t),(function(e){return t.decoder(e,Nn.decoder,l,"value")}))),c&&t.interpretNumericEntities&&"iso-8859-1"===l&&(c=Mn(c)),d.indexOf("[]=")>-1&&(c=Pn(c)?[c]:c),On.call(i,u)?i[u]=En.combine(i[u],c):i[u]=c}return i}(e,n):e,o=n.plainObjects?Object.create(null):{},r=Object.keys(i),a=0;a<r.length;++a){var s=r[a],l=Dn(s,i[s],n,"string"==typeof e);o=En.merge(o,l,n)}return En.compact(o)},stringify:function(e,t){var n,i=e,o=function(e){if(!e)return Tn;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||Tn.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=bn.default;if(void 0!==e.format){if(!vn.call(bn.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=bn.formatters[n],o=Tn.filter;return("function"==typeof e.filter||wn(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:Tn.addQueryPrefix,allowDots:void 0===e.allowDots?Tn.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Tn.charsetSentinel,delimiter:void 0===e.delimiter?Tn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:Tn.encode,encoder:"function"==typeof e.encoder?e.encoder:Tn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:Tn.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:Tn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:Tn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Tn.strictNullHandling}}(t);"function"==typeof o.filter?i=(0,o.filter)("",i):wn(o.filter)&&(n=o.filter);var r,a=[];if("object"!=typeof i||null===i)return"";r=t&&t.arrayFormat in yn?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=yn[r];n||(n=Object.keys(i)),o.sort&&n.sort(o.sort);for(var l=0;l<n.length;++l){var u=n[l];o.skipNulls&&null===i[u]||An(a,_n(i[u],u,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset))}var c=a.join(o.delimiter),d=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),c.length>0?d+c:""}};function Ln(e){return Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ln(e)}var Bn=function(e){return null!==e&&"object"===Ln(e)};function Rn(e){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(e)}var jn=Bn,Hn=Fn;function Fn(e){if(e)return function(e){for(var t in Fn.prototype)Object.prototype.hasOwnProperty.call(Fn.prototype,t)&&(e[t]=Fn.prototype[t]);return e}(e)}Fn.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},Fn.prototype.parse=function(e){return this._parser=e,this},Fn.prototype.responseType=function(e){return this._responseType=e,this},Fn.prototype.serialize=function(e){return this._serializer=e,this},Fn.prototype.timeout=function(e){if(!e||"object"!==Rn(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},Fn.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var zn=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),$n=new Set([408,413,429,500,502,503,504,521,522,524]);Fn.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&$n.has(t.status))return!0;if(e){if(e.code&&zn.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},Fn.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},Fn.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var i=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){i.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),i.end((function(n,i){n?t(n):e(i)}))}))}return this._fullfilledPromise.then(e,t)},Fn.prototype.catch=function(e){return this.then(void 0,e)},Fn.prototype.use=function(e){return e(this),this},Fn.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},Fn.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},Fn.prototype.get=function(e){return this._header[e.toLowerCase()]},Fn.prototype.getHeader=Fn.prototype.get,Fn.prototype.set=function(e,t){if(jn(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},Fn.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},Fn.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(jn(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.field(e,t[i]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},Fn.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},Fn.prototype._auth=function(e,t,n,i){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(i("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},Fn.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},Fn.prototype.redirects=function(e){return this._maxRedirects=e,this},Fn.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},Fn.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},Fn.prototype.send=function(e){var t=jn(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&jn(this._data))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(this._data[i]=e[i]);else"string"==typeof e?(n||this.type("form"),(n=this._header["content-type"])&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},Fn.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},Fn.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},Fn.prototype._appendQueryString=function(){console.warn("Unsupported")},Fn.prototype._timeoutError=function(e,t,n){if(!this._aborted){var i=new Error("".concat(e+t,"ms exceeded"));i.timeout=t,i.code="ECONNABORTED",i.errno=n,this.timedout=!0,this.timedoutError=i,this.abort(),this.callback(i)}},Fn.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var Qn={};function Gn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}Qn.type=function(e){return e.split(/ *; */).shift()},Qn.params=function(e){var t,n={},i=Gn(e.split(/ *; */));try{for(i.s();!(t=i.n()).done;){var o=t.value.split(/ *= */),r=o.shift(),a=o.shift();r&&a&&(n[r]=a)}}catch(e){i.e(e)}finally{i.f()}return n},Qn.parseLinks=function(e){var t,n={},i=Gn(e.split(/ *, */));try{for(i.s();!(t=i.n()).done;){var o=t.value.split(/ *; */),r=o[0].slice(1,-1);n[o[1].split(/ *= */)[1].slice(1,-1)]=r}}catch(e){i.e(e)}finally{i.f()}return n},Qn.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e};var Wn=Qn,Vn=Yn;function Yn(e){if(e)return function(e){for(var t in Yn.prototype)Object.prototype.hasOwnProperty.call(Yn.prototype,t)&&(e[t]=Yn.prototype[t]);return e}(e)}function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Xn(){this._defaults=[]}Yn.prototype.get=function(e){return this.header[e.toLowerCase()]},Yn.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=Wn.type(t);var n=Wn.params(t);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(this[i]=n[i]);this.links={};try{e.link&&(this.links=Wn.parseLinks(e.link))}catch(e){}},Yn.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(e){Xn.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._defaults.push({fn:e,args:n}),this}})),Xn.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,function(e){return function(e){if(Array.isArray(e))return Kn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kn(e,t):void 0}}(e)||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.")}()}(t.args))}))};var Zn=Xn;!function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i;"undefined"!=typeof window?i=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),i=void 0):i=self;var o=Gt.exports,r=qt,a=Un,s=Hn,l=Bn,u=Vn,c=Zn;function d(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var h=t=e.exports;t.Request=y,h.getXHR=function(){if(i.XMLHttpRequest&&(!i.location||"file:"!==i.location.protocol||!i.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function f(e){if(!l(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&g(t,n,e[n]);return t.join("&")}function g(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){g(e,t,n)}));else if(l(n))for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&g(e,"".concat(t,"[").concat(i,"]"),n[i]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function m(e){for(var t,n,i={},o=e.split("&"),r=0,a=o.length;r<a;++r)-1===(n=(t=o[r]).indexOf("="))?i[decodeURIComponent(t)]="":i[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return i}function b(e){return/[/+]json($|[^-\w])/i.test(e)}function v(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,i,o,r=e.split(/\r?\n/),a={},s=0,l=r.length;s<l;++s)-1!==(t=(n=r[s]).indexOf(":"))&&(i=n.slice(0,t).toLowerCase(),o=p(n.slice(t+1)),a[i]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function y(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,i=null;try{i=new v(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",i);try{n._isResponseOK(i)||(e=new Error(i.statusText||i.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=i.status,n.callback(e,i)):n.callback(null,i)}))}function w(e,t,n){var i=h("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}h.serializeObject=f,h.parseString=m,h.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},h.serialize={"application/x-www-form-urlencoded":a.stringify,"application/json":r},h.parse={"application/x-www-form-urlencoded":m,"application/json":JSON.parse},u(v.prototype),v.prototype._parseBody=function(e){var t=h.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&b(this.type)&&(t=h.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},v.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,i="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(i);return o.status=this.status,o.method=t,o.url=n,o},h.Response=v,o(y.prototype),s(y.prototype),y.prototype.type=function(e){return this.set("Content-Type",h.types[e]||e),this},y.prototype.accept=function(e){return this.set("Accept",h.types[e]||e),this},y.prototype.auth=function(e,t,i){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(i=t,t=""),i||(i={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,i,o)},y.prototype.query=function(e){return"string"!=typeof e&&(e=f(e)),e&&this._query.push(e),this},y.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},y.prototype._getFormData=function(){return this._formData||(this._formData=new i.FormData),this._formData},y.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},y.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},y.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},y.prototype.ca=y.prototype.agent,y.prototype.buffer=y.prototype.ca,y.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},y.prototype.pipe=y.prototype.write,y.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},y.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||d,this._finalizeQueryString(),this._end()},y.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},y.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=h.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var i=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",i.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",i.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],r=this._serializer||h.serialize[o?o.split(";")[0]:""];!r&&b(o)&&(r=h.serialize["application/json"]),r&&(n=r(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&t.setRequestHeader(a,this.header[a]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},h.agent=function(){return new c},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){c.prototype[e.toLowerCase()]=function(t,n){var i=new h.Request(e,t);return this._setDefaults(i),n&&i.end(n),i}})),c.prototype.del=c.prototype.delete,h.get=function(e,t,n){var i=h("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},h.head=function(e,t,n){var i=h("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},h.options=function(e,t,n){var i=h("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},h.del=w,h.delete=w,h.patch=function(e,t,n){var i=h("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},h.post=function(e,t,n){var i=h("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},h.put=function(e,t,n){var i=h("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}}(Qt,Qt.exports);var Jn=Qt.exports;function ei(e){var t=(new Date).getTime(),n=(new Date).toISOString(),i=console&&console.log?console:window&&window.console&&window.console.log?window.console:console;i.log("<<<<<"),i.log("[".concat(n,"]"),"\n",e.url,"\n",e.qs),i.log("-----"),e.on("response",(function(n){var o=(new Date).getTime()-t,r=(new Date).toISOString();i.log(">>>>>>"),i.log("[".concat(r," / ").concat(o,"]"),"\n",e.url,"\n",e.qs,"\n",n.text),i.log("-----")}))}function ti(e,t,n){var i=this;this._config.logVerbosity&&(e=e.use(ei)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e));var o=e;if(t.abortSignal)var r=t.abortSignal.subscribe((function(){o.abort(),r()}));return!0===t.forceBuffered?o="undefined"==typeof Blob?o.buffer().responseType("arraybuffer"):o.responseType("arraybuffer"):!1===t.forceBuffered&&(o=o.buffer(!1)),(o=o.timeout(t.timeout)).on("abort",(function(){return n({category:N.PNUnknownCategory,error:!0,operation:t.operation,errorData:new Error("Aborted")},null)})),o.end((function(e,o){var r,a={};if(a.error=null!==e,a.operation=t.operation,o&&o.status&&(a.statusCode=o.status),e){if(e.response&&e.response.text&&!i._config.logVerbosity)try{a.errorData=JSON.parse(e.response.text)}catch(t){a.errorData=e}else a.errorData=e;return a.category=i._detectErrorCategory(e),n(a,null)}if(t.ignoreBody)r={headers:o.headers,redirects:o.redirects,response:o};else try{r=JSON.parse(o.text)}catch(e){return a.errorData=o,a.error=!0,n(a,null)}return r.error&&1===r.error&&r.status&&r.message&&r.service?(a.errorData=r,a.statusCode=r.status,a.error=!0,a.category=i._detectErrorCategory(a),n(a,null)):(r.error&&r.error.message&&(a.errorData=r.error),n(a,r))})),o}function ni(e,t,n){return r(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:return i=Jn.post(e),t.forEach((function(e){var t=e.key,n=e.value;i=i.field(t,n)})),i.attach("file",n,{contentType:"application/octet-stream"}),[4,i];case 1:return[2,o.sent()]}}))}))}function ii(e,t,n){var i=Jn.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return ti.call(this,i,t,n)}function oi(e,t,n){var i=Jn.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return ti.call(this,i,t,n)}function ri(e,t,n,i){var o=Jn.post(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return ti.call(this,o,n,i)}function ai(e,t,n,i){var o=Jn.patch(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return ti.call(this,o,n,i)}function si(e,t,n){var i=Jn.delete(this.getStandardOrigin()+t.url).set(t.headers).query(e);return ti.call(this,i,t,n)}function li(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer}var ui,ci=function(){function e(){}return Object.defineProperty(e.prototype,"algo",{get:function(){return"aes-256-cbc"},enumerable:!1,configurable:!0}),e.prototype.encrypt=function(e,t){return r(this,void 0,void 0,(function(){var n;return a(this,(function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.encryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.encryptString(n,t)];throw new Error("Cannot encrypt this file. In browsers file encryption supports only string or ArrayBuffer")}}))}))},e.prototype.decrypt=function(e,t){return r(this,void 0,void 0,(function(){var n;return a(this,(function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.decryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.decryptString(n,t)];throw new Error("Cannot decrypt this file. In browsers file decryption supports only string or ArrayBuffer")}}))}))},e.prototype.encryptFile=function(e,t,n){return r(this,void 0,void 0,(function(){var i,o,r;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.toArrayBuffer()];case 2:return o=a.sent(),[4,this.encryptArrayBuffer(i,o)];case 3:return r=a.sent(),[2,n.create({name:t.name,mimeType:"application/octet-stream",data:r})]}}))}))},e.prototype.decryptFile=function(e,t,n){return r(this,void 0,void 0,(function(){var i,o,r;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.toArrayBuffer()];case 2:return o=a.sent(),[4,this.decryptArrayBuffer(i,o)];case 3:return r=a.sent(),[2,n.create({name:t.name,data:r})]}}))}))},e.prototype.getKey=function(e){return r(this,void 0,void 0,(function(){var t,n,i;return a(this,(function(o){switch(o.label){case 0:return t=Buffer.from(e),[4,crypto.subtle.digest("SHA-256",t.buffer)];case 1:return n=o.sent(),i=Buffer.from(Buffer.from(n).toString("hex").slice(0,32),"utf8").buffer,[2,crypto.subtle.importKey("raw",i,"AES-CBC",!0,["encrypt","decrypt"])]}}))}))},e.prototype.encryptArrayBuffer=function(e,t){return r(this,void 0,void 0,(function(){var n,i,o;return a(this,(function(r){switch(r.label){case 0:return n=crypto.getRandomValues(new Uint8Array(16)),i=li,o=[n.buffer],[4,crypto.subtle.encrypt({name:"AES-CBC",iv:n},e,t)];case 1:return[2,i.apply(void 0,o.concat([r.sent()]))]}}))}))},e.prototype.decryptArrayBuffer=function(e,t){return r(this,void 0,void 0,(function(){var n;return a(this,(function(i){return n=t.slice(0,16),[2,crypto.subtle.decrypt({name:"AES-CBC",iv:n},e,t.slice(16))]}))}))},e.prototype.encryptString=function(e,t){return r(this,void 0,void 0,(function(){var n,i,o,r;return a(this,(function(a){switch(a.label){case 0:return n=crypto.getRandomValues(new Uint8Array(16)),i=Buffer.from(t).buffer,[4,crypto.subtle.encrypt({name:"AES-CBC",iv:n},e,i)];case 1:return o=a.sent(),r=li(n.buffer,o),[2,Buffer.from(r).toString("utf8")]}}))}))},e.prototype.decryptString=function(e,t){return r(this,void 0,void 0,(function(){var n,i,o,r;return a(this,(function(a){switch(a.label){case 0:return n=Buffer.from(t),i=n.slice(0,16),o=n.slice(16),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:i},e,o)];case 1:return r=a.sent(),[2,Buffer.from(r).toString("utf8")]}}))}))},e.IV_LENGTH=16,e}(),di=(ui=function(){function e(e){if(e instanceof File)this.data=e,this.name=this.data.name,this.mimeType=this.data.type;else if(e.data){var t=e.data;this.data=new File([t],e.name,{type:e.mimeType}),this.name=e.name,e.mimeType&&(this.mimeType=e.mimeType)}if(void 0===this.data)throw new Error("Couldn't construct a file out of supplied options.");if(void 0===this.name)throw new Error("Couldn't guess filename out of the options. Please provide one.")}return e.create=function(e){return new this(e)},e.prototype.toBuffer=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){throw new Error("This feature is only supported in Node.js environments.")}))}))},e.prototype.toStream=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){throw new Error("This feature is only supported in Node.js environments.")}))}))},e.prototype.toFileUri=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){throw new Error("This feature is only supported in react native environments.")}))}))},e.prototype.toBlob=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.data]}))}))},e.prototype.toArrayBuffer=function(){return r(this,void 0,void 0,(function(){var e=this;return a(this,(function(t){return[2,new Promise((function(t,n){var i=new FileReader;i.addEventListener("load",(function(){if(i.result instanceof ArrayBuffer)return t(i.result)})),i.addEventListener("error",(function(){n(i.error)})),i.readAsArrayBuffer(e.data)}))]}))}))},e.prototype.toString=function(){return r(this,void 0,void 0,(function(){var e=this;return a(this,(function(t){return[2,new Promise((function(t,n){var i=new FileReader;i.addEventListener("load",(function(){if("string"==typeof i.result)return t(i.result)})),i.addEventListener("error",(function(){n(i.error)})),i.readAsBinaryString(e.data)}))]}))}))},e.prototype.toFile=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.data]}))}))},e}(),ui.supportsFile="undefined"!=typeof File,ui.supportsBlob="undefined"!=typeof Blob,ui.supportsArrayBuffer="undefined"!=typeof ArrayBuffer,ui.supportsBuffer=!1,ui.supportsStream=!1,ui.supportsString=!0,ui.supportsEncryptFile=!0,ui.supportsFileUri=!1,ui);function hi(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}var pi=function(e){function n(t){var n=this,i=t.listenToBrowserNetworkEvents,o=void 0===i||i;return t.sdkFamily="Web",t.networking=new Ft({del:si,get:oi,post:ri,patch:ai,sendBeacon:hi,getfile:ii,postfile:ni}),t.cbor=new $t((function(e){return zt(h.decode(e))}),b),t.PubNubFile=di,t.cryptography=new ci,n=e.call(this,t)||this,o&&(window.addEventListener("offline",(function(){n.networkDownDetected()})),window.addEventListener("online",(function(){n.networkUpDetected()}))),n}return t(n,e),n}(Ht);return pi}()},3379:e=>{var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var r={},a=[],s=0;s<e.length;s++){var l=e[s],u=i.base?l[0]+i.base:l[0],c=r[u]||0,d="".concat(u," ").concat(c);r[u]=c+1;var h=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=o(p,i);i.byIndex=s,t.splice(s,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var r=i(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=n(r[a]);t[s].references--}for(var l=i(e,o),u=0;u<r.length;u++){var c=n(r[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}r=l}}},569:e=>{var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},9216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};(()=>{n.d(i,{l:()=>Is,Z:()=>Ms});var e=n(9669),t=n.n(e);const o=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),a=new Map;class s{constructor(e,t){if(this._$cssResult$=!0,t!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=a.get(this.cssText);return o&&void 0===e&&(a.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const l=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1]),e[0]);return new s(n,r)},u=o?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new s("string"==typeof e?e:e+"",r))(t)})(e):e;var c;const d=window.trustedTypes,h=d?d.emptyScript:"",p=window.reactiveElementPolyfillSupport,f={toAttribute(e,t){switch(t){case Boolean:e=e?h:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},g=(e,t)=>t!==e&&(t==t||e==e),m={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:g};class b extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const i=this._$Eh(n,t);void 0!==i&&(this._$Eu.set(i,n),e.push(i))})),e}static createProperty(e,t=m){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const o=this[e];this[t]=i,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||m}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(u(e))}else void 0!==e&&t.push(u(e));return t}static _$Eh(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{o?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),i=window.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=t.cssText,e.appendChild(n)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ES(e,t,n=m){var i,o;const r=this.constructor._$Eh(e,n);if(void 0!==r&&!0===n.reflect){const a=(null!==(o=null===(i=n.converter)||void 0===i?void 0:i.toAttribute)&&void 0!==o?o:f.toAttribute)(t,n.type);this._$Ei=e,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$Ei=null}}_$AK(e,t){var n,i,o;const r=this.constructor,a=r._$Eu.get(e);if(void 0!==a&&this._$Ei!==a){const e=r.getPropertyOptions(a),s=e.converter,l=null!==(o=null!==(i=null===(n=s)||void 0===n?void 0:n.fromAttribute)&&void 0!==i?i:"function"==typeof s?s:null)&&void 0!==o?o:f.fromAttribute;this._$Ei=a,this[a]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,n){let i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||g)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Ei!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((e,t)=>this[t]=e)),this._$Et=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$ES(t,this[t],e))),this._$EC=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var v;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==p||p({ReactiveElement:b}),(null!==(c=globalThis.reactiveElementVersions)&&void 0!==c?c:globalThis.reactiveElementVersions=[]).push("1.3.1");const y=globalThis.trustedTypes,w=y?y.createPolicy("lit-html",{createHTML:e=>e}):void 0,C=`lit$${(Math.random()+"").slice(9)}$`,x="?"+C,A=`<${x}>`,S=document,k=(e="")=>S.createComment(e),T=e=>null===e||"object"!=typeof e&&"function"!=typeof e,_=Array.isArray,E=e=>{var t;return _(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,M=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,I=/'/g,D=/"/g,U=/^(?:script|style|textarea|title)$/i,L=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),B=L(1),R=L(2),j=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),F=new WeakMap,z=S.createTreeWalker(S,129,null,!1),$=(e,t)=>{const n=e.length-1,i=[];let o,r=2===t?"<svg>":"",a=O;for(let t=0;t<n;t++){const n=e[t];let s,l,u=-1,c=0;for(;c<n.length&&(a.lastIndex=c,l=a.exec(n),null!==l);)c=a.lastIndex,a===O?"!--"===l[1]?a=P:void 0!==l[1]?a=N:void 0!==l[2]?(U.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=M):void 0!==l[3]&&(a=M):a===M?">"===l[0]?(a=null!=o?o:O,u=-1):void 0===l[1]?u=-2:(u=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?M:'"'===l[3]?D:I):a===D||a===I?a=M:a===P||a===N?a=O:(a=M,o=void 0);const d=a===M&&e[t+1].startsWith("/>")?" ":"";r+=a===O?n+A:u>=0?(i.push(s),n.slice(0,u)+"$lit$"+n.slice(u)+C+d):n+C+(-2===u?(i.push(void 0),t):d)}const s=r+(e[n]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(s):s,i]};class Q{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let o=0,r=0;const a=e.length-1,s=this.parts,[l,u]=$(e,t);if(this.el=Q.createElement(l,n),z.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=z.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(C)){const n=u[r++];if(e.push(t),void 0!==n){const e=i.getAttribute(n.toLowerCase()+"$lit$").split(C),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:o,name:t[2],strings:e,ctor:"."===t[1]?Y:"?"===t[1]?X:"@"===t[1]?Z:V})}else s.push({type:6,index:o})}for(const t of e)i.removeAttribute(t)}if(U.test(i.tagName)){const e=i.textContent.split(C),t=e.length-1;if(t>0){i.textContent=y?y.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],k()),z.nextNode(),s.push({type:2,index:++o});i.append(e[t],k())}}}else if(8===i.nodeType)if(i.data===x)s.push({type:2,index:o});else{let e=-1;for(;-1!==(e=i.data.indexOf(C,e+1));)s.push({type:7,index:o}),e+=C.length-1}o++}}static createElement(e,t){const n=S.createElement("template");return n.innerHTML=e,n}}function G(e,t,n=e,i){var o,r,a,s;if(t===j)return t;let l=void 0!==i?null===(o=n._$Cl)||void 0===o?void 0:o[i]:n._$Cu;const u=T(t)?void 0:t._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===u?l=void 0:(l=new u(e),l._$AT(e,n,i)),void 0!==i?(null!==(a=(s=n)._$Cl)&&void 0!==a?a:s._$Cl=[])[i]=l:n._$Cu=l),void 0!==l&&(t=G(e,l._$AS(e,t.values),l,i)),t}class q{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:n},parts:i}=this._$AD,o=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:S).importNode(n,!0);z.currentNode=o;let r=z.nextNode(),a=0,s=0,l=i[0];for(;void 0!==l;){if(a===l.index){let t;2===l.type?t=new W(r,r.nextSibling,this,e):1===l.type?t=new l.ctor(r,l.name,l.strings,this,e):6===l.type&&(t=new J(r,this,e)),this.v.push(t),l=i[++s]}a!==(null==l?void 0:l.index)&&(r=z.nextNode(),a++)}return o}m(e){let t=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class W{constructor(e,t,n,i){var o;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cg=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cg}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=G(this,e,t),T(e)?e===H||null==e||""===e?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==j&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.k(e):E(e)?this.S(e):this.$(e)}M(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.M(e))}$(e){this._$AH!==H&&T(this._$AH)?this._$AA.nextSibling.data=e:this.k(S.createTextNode(e)),this._$AH=e}T(e){var t;const{values:n,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Q.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===o)this._$AH.m(n);else{const e=new q(o,this),t=e.p(this.options);e.m(n),this.k(t),this._$AH=e}}_$AC(e){let t=F.get(e.strings);return void 0===t&&F.set(e.strings,t=new Q(e)),t}S(e){_(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const o of e)i===t.length?t.push(n=new W(this.M(k()),this.M(k()),this,this.options)):n=t[i],n._$AI(o),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cg=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class V{constructor(e,t,n,i,o){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){const o=this.strings;let r=!1;if(void 0===o)e=G(this,e,t,0),r=!T(e)||e!==this._$AH&&e!==j,r&&(this._$AH=e);else{const i=e;let a,s;for(e=o[0],a=0;a<o.length-1;a++)s=G(this,i[n+a],t,a),s===j&&(s=this._$AH[a]),r||(r=!T(s)||s!==this._$AH[a]),s===H?e=H:e!==H&&(e+=(null!=s?s:"")+o[a+1]),this._$AH[a]=s}r&&!i&&this.C(e)}C(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class Y extends V{constructor(){super(...arguments),this.type=3}C(e){this.element[this.name]=e===H?void 0:e}}const K=y?y.emptyScript:"";class X extends V{constructor(){super(...arguments),this.type=4}C(e){e&&e!==H?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class Z extends V{constructor(e,t,n,i,o){super(e,t,n,i,o),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=G(this,e,t,0))&&void 0!==n?n:H)===j)return;const i=this._$AH,o=e===H&&i!==H||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==H&&(i===H||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class J{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){G(this,e)}}const ee={L:"$lit$",P:C,V:x,I:1,N:$,R:q,j:E,D:G,H:W,F:V,O:X,W:Z,B:Y,Z:J},te=window.litHtmlPolyfillSupport;var ne,ie;null==te||te(Q,W),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.2.2");class oe extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=((e,t,n)=>{var i,o;const r=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t;let a=r._$litPart$;if(void 0===a){const e=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;r._$litPart$=a=new W(t.insertBefore(k(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return j}}oe.finalized=!0,oe._$litElement$=!0,null===(ne=globalThis.litElementHydrateSupport)||void 0===ne||ne.call(globalThis,{LitElement:oe});const re=globalThis.litElementPolyfillSupport;null==re||re({LitElement:oe}),(null!==(ie=globalThis.litElementVersions)&&void 0!==ie?ie:globalThis.litElementVersions=[]).push("3.2.0");const ae=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:i}=t;return{kind:n,elements:i,finisher(t){window.customElements.define(e,t)}}})(e,t),se=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(n){n.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function le(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):se(e,t)}function ue(e){return le({...e,state:!0})}function ce(e,t){return(({finisher:e,descriptor:t})=>(n,i)=>{var o;if(void 0===i){const i=null!==(o=n.originalKey)&&void 0!==o?o:n.key,r=null!=t?{kind:"method",placement:"prototype",key:i,descriptor:t(n.key)}:{...n,key:i};return null!=e&&(r.finisher=function(t){e(t,i)}),r}{const o=n.constructor;void 0!==t&&Object.defineProperty(n,i,t(i)),null==e||e(o,i)}})({descriptor:n=>{const i={get(){var t,n;return null!==(n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof n?Symbol():"__"+n;i.get=function(){var n,i;return void 0===this[t]&&(this[t]=null!==(i=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(e))&&void 0!==i?i:null),this[t]}}return i}})}var de;null===(de=window.HTMLSlotElement)||void 0===de||de.prototype.assignedElements;const he=e=>(...t)=>({_$litDirective$:e,values:t});class pe{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const fe=he(class extends pe{constructor(e){var t;if(super(e),1!==e.type||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.et){this.et=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(n=this.st)||void 0===n?void 0:n.has(e))&&this.et.add(e);return this.render(t)}const o=e.element.classList;this.et.forEach((e=>{e in t||(o.remove(e),this.et.delete(e))}));for(const e in t){const n=!!t[e];n===this.et.has(e)||(null===(i=this.st)||void 0===i?void 0:i.has(e))||(n?(o.add(e),this.et.add(e)):(o.remove(e),this.et.delete(e)))}return j}}),{H:ge}=ee,me=(e,t)=>{var n,i;const o=e._$AN;if(void 0===o)return!1;for(const e of o)null===(i=(n=e)._$AO)||void 0===i||i.call(n,t,!1),me(e,t);return!0},be=e=>{let t,n;do{if(void 0===(t=e._$AM))break;n=t._$AN,n.delete(e),e=t}while(0===(null==n?void 0:n.size))},ve=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Ce(t)}};function ye(e){void 0!==this._$AN?(be(this),this._$AM=e,ve(this)):this._$AM=e}function we(e,t=!1,n=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)me(i[e],!1),be(i[e]);else null!=i&&(me(i,!1),be(i));else me(this,e)}const Ce=e=>{var t,n,i,o;2==e.type&&(null!==(t=(i=e)._$AP)&&void 0!==t||(i._$AP=we),null!==(n=(o=e)._$AQ)&&void 0!==n||(o._$AQ=ye))};class xe extends pe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),ve(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n,i;e!==this.isConnected&&(this.isConnected=e,e?null===(n=this.reconnected)||void 0===n||n.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),t&&(me(this,e),be(this))}setValue(e){if((e=>void 0===this._$Ct.strings)())this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const Ae=()=>new Se;class Se{}const ke=new WeakMap,Te=he(class extends xe{render(e){return H}update(e,[t]){var n;const i=t!==this.U;return i&&void 0!==this.U&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.U=t,this.ht=null===(n=e.options)||void 0===n?void 0:n.host,this.ot(this.lt=e.element)),H}ot(e){var t;if("function"==typeof this.U){const n=null!==(t=this.ht)&&void 0!==t?t:globalThis;let i=ke.get(n);void 0===i&&(i=new WeakMap,ke.set(n,i)),void 0!==i.get(this.U)&&this.U.call(this.ht,void 0),i.set(this.U,e),void 0!==e&&this.U.call(this.ht,e)}else this.U.value=e}get rt(){var e,t,n;return"function"==typeof this.U?null===(t=ke.get(null!==(e=this.ht)&&void 0!==e?e:globalThis))||void 0===t?void 0:t.get(this.U):null===(n=this.U)||void 0===n?void 0:n.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),_e=e=>{const t=e.replace(/\D/g,"").substring(0,10),n=t.substring(0,3),i=t.substring(3,6),o=t.substring(6,10);return t.length>5?`(${n}) ${i}-${o}`:t.length>2?`(${n}) ${i}`:t.length>0?`(${n}`:""},Ee=e=>{const t=(""+e).replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);return t?[t[1]?"+1 ":"","(",t[2],") ",t[3],"-",t[4]].join(""):e},Oe=e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105},Pe=e=>e.altKey||e.ctrlKey||e.metaKey,Ne=e=>{const t=e.keyCode;return e.shiftKey||35===t||36===t||8===t||9===t||13===t||46===t||t>36&&t<41||(e.ctrlKey||e.metaKey)&&(65===t||67===t||76===t||86===t||88===t||90===t)},Me=he(class extends pe{constructor(e){var t;if(super(e),1!==e.type||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,n)=>{const i=e[n];return null==i?t:t+`${n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(e,[t]){const{style:n}=e.element;if(void 0===this.ct){this.ct=new Set;for(const e in t)this.ct.add(e);return this.render(t)}this.ct.forEach((e=>{null==t[e]&&(this.ct.delete(e),e.includes("-")?n.removeProperty(e):n[e]="")}));for(const e in t){const i=t[e];null!=i&&(this.ct.add(e),e.includes("-")?n.setProperty(e,i):n[e]=i)}return j}}),Ie="#646987",De="#ffffff",Ue=(e,t)=>{let n=parseInt(e.substr(1,2),16),i=parseInt(e.substr(3,2),16),o=parseInt(e.substr(5,2),16);return n=Math.round(n*(1-t)+255*t),i=Math.round(i*(1-t)+255*t),o=Math.round(o*(1-t)+255*t),"#"+n.toString(16).padStart(2,"0")+i.toString(16).padStart(2,"0")+o.toString(16).padStart(2,"0")},Le=(e,t)=>2===e||70392===t;var Be=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Re=class extends oe{constructor(){super(...arguments),this.heading="",this.subtitle="",this.selected=!1,this.primaryColor=Ie,this.backgroundColor=De,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black"}render(){return B`
2
+ var e={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{var i=n(4867),o=n(6026),r=n(4372),a=n(5327),s=n(4097),l=n(4109),u=n(7985),c=n(7874),d=n(2648),h=n(644),p=n(205);e.exports=function(e){return new Promise((function(t,n){var f,g=e.data,m=e.headers,b=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}i.isFormData(g)&&i.isStandardBrowserEnv()&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",C=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+C)}var x=s(e.baseURL,e.url);function A(){if(y){var i="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,r={data:b&&"text"!==b&&"json"!==b?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y};o((function(e){t(e),v()}),(function(e){n(e),v()}),r),y=null}}if(y.open(e.method.toUpperCase(),a(x,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=A:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(A)},y.onabort=function(){y&&(n(new d("Request aborted",d.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,i.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,y)),y=null},i.isStandardBrowserEnv()){var S=(e.withCredentials||u(x))&&e.xsrfCookieName?r.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in y&&i.forEach(m,(function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),b&&"json"!==b&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){y&&(n(!e||e&&e.type?new h:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),g||(g=null);var k=p(x);k&&-1===["http","https","file"].indexOf(k)?n(new d("Unsupported protocol "+k+":",d.ERR_BAD_REQUEST,e)):y.send(g)}))}},1609:(e,t,n)=>{var i=n(4867),o=n(1849),r=n(321),a=n(7185),s=function e(t){var n=new r(t),s=o(r.prototype.request,n);return i.extend(s,r.prototype,n),i.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(5546));s.Axios=r,s.CanceledError=n(644),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.toFormData=n(7675),s.AxiosError=n(2648),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(6268),e.exports=s,e.exports.default=s},4972:(e,t,n)=>{var i=n(644);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t<i;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,i=new Promise((function(e){n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},644:(e,t,n)=>{var i=n(2648);function o(e){i.call(this,null==e?"canceled":e,i.ERR_CANCELED),this.name="CanceledError"}n(4867).inherits(o,i,{__CANCEL__:!0}),e.exports=o},6502:e=>{e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{var i=n(4867),o=n(5327),r=n(782),a=n(3572),s=n(7185),l=n(4097),u=n(4875),c=u.validators;function d(e){this.defaults=e,this.interceptors={request:new r,response:new r}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var r,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,i),d=d.concat(l),r=Promise.resolve(t);d.length;)r=r.then(d.shift(),d.shift());return r}for(var h=t;i.length;){var p=i.shift(),f=i.shift();try{h=p(h)}catch(e){f(e);break}}try{r=a(h)}catch(e){return Promise.reject(e)}for(;l.length;)r=r.then(l.shift(),l.shift());return r},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},i.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,o){return this.request(s(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},2648:(e,t,n)=>{var i=n(4867);function o(e,t,n,i,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o)}i.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var r=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(o,a),Object.defineProperty(r,"isAxiosError",{value:!0}),o.from=function(e,t,n,a,s,l){var u=Object.create(r);return i.toFlatObject(e,u,(function(e){return e!==Error.prototype})),o.call(u,e.message,t,n,a,s),u.name=e.name,l&&Object.assign(u,l),u},e.exports=o},782:(e,t,n)=>{var i=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{var i=n(1793),o=n(7303);e.exports=function(e,t){return e&&!i(t)?o(e,t):t}},3572:(e,t,n)=>{var i=n(4867),o=n(8527),r=n(6502),a=n(5546),s=n(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7185:(e,t,n)=>{var i=n(4867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function r(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!i.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return i.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||r,o=t(e);i.isUndefined(o)&&t!==l||(n[e]=o)})),n}},6026:(e,t,n)=>{var i=n(2648);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new i("Request failed with status code "+n.status,[i.ERR_BAD_REQUEST,i.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},8527:(e,t,n)=>{var i=n(4867),o=n(5546);e.exports=function(e,t,n){var r=this||o;return i.forEach(n,(function(n){e=n.call(r,e,t)})),e}},5546:(e,t,n)=>{var i=n(4867),o=n(6016),r=n(2648),a=n(7874),s=n(7675),l={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,d={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,r=i.isObject(e),a=t&&t["Content-Type"];if((n=i.isFileList(e))||r&&"multipart/form-data"===a){var l=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,l&&new l)}return r||"application/json"===a?(u(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(0,JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw r.from(e,r.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(1623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){d.headers[e]=i.merge(l)})),e.exports=d},7874:e=>{e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.27.2"}},1849:e=>{e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},5327:(e,t,n)=>{var i=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=t.toString();else{var a=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),r=a.join("&")}if(r){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}},7303:e=>{e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{var i=n(4867);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,o,r,a){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(o)&&s.push("path="+o),i.isString(r)&&s.push("domain="+r),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,n)=>{var i=n(4867);e.exports=function(e){return i.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,n)=>{var i=n(4867);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=i.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{var i=n(4867);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},1623:e=>{e.exports=null},4109:(e,t,n)=>{var i=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,r,a={};return e?(i.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=i.trim(e.substr(0,r)).toLowerCase(),n=i.trim(e.substr(r+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},205:e=>{e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:e=>{e.exports=function(e){return function(t){return e.apply(null,t)}}},7675:(e,t,n)=>{var i=n(4867);e.exports=function(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":i.isDate(e)?e.toISOString():i.isArrayBuffer(e)||i.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(r,a){if(i.isPlainObject(r)||i.isArray(r)){if(-1!==n.indexOf(r))throw Error("Circular reference detected in "+a);n.push(r),i.forEach(r,(function(n,r){if(!i.isUndefined(n)){var s,l=a?a+"."+r:r;if(n&&!a&&"object"==typeof n)if(i.endsWith(r,"{}"))n=JSON.stringify(n);else if(i.endsWith(r,"[]")&&(s=i.toArray(n)))return void s.forEach((function(e){!i.isUndefined(e)&&t.append(l,o(e))}));e(n,l)}})),n.pop()}else t.append(a,o(r))}(e),t}},4875:(e,t,n)=>{var i=n(7288).version,o=n(2648),r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};r.transitional=function(e,t,n){function r(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,s){if(!1===e)throw new o(r(i," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!a[i]&&(a[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),r=i.length;r-- >0;){var a=i[r],s=t[a];if(s){var l=e[a],u=void 0===l||s(l,a,e);if(!0!==u)throw new o("option "+a+" must be "+u,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:r}},4867:(e,t,n)=>{var i,o=n(1849),r=Object.prototype.toString,a=(i=Object.create(null),function(e){var t=r.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function u(e){return void 0===e}var c=s("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function h(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),f=s("File"),g=s("Blob"),m=s("FileList");function b(e){return"[object Function]"===r.call(e)}var v=s("URLSearchParams");function y(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var w,C=(w="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return w&&e instanceof w});e.exports={isArray:l,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||r.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:d,isPlainObject:h,isUndefined:u,isDate:p,isFile:f,isBlob:g,isFunction:b,isStream:function(e){return d(e)&&b(e.pipe)},isURLSearchParams:v,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:y,merge:function e(){var t={};function n(n,i){h(t[i])&&h(n)?t[i]=e(t[i],n):h(n)?t[i]=e({},n):l(n)?t[i]=n.slice():t[i]=n}for(var i=0,o=arguments.length;i<o;i++)y(arguments[i],n);return t},extend:function(e,t,n){return y(t,(function(t,i){e[i]=n&&"function"==typeof t?o(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var i,o,r,a={};t=t||{};do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a[r=i[o]]||(t[r]=e[r],a[r]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;var t=e.length;if(u(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:C,isFileList:m}},4184:(e,t)=>{var n;!function(){var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var s in n)i.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},3631:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(8081),o=n.n(i),r=n(3645),a=n.n(r)()(o());a.push([e.id,"@media screen and (min-width: 767px) {\n .meetelise-chat.pane.launcher__desktop {\n right: -32px;\n }\n}\n",""]);const s=a},3645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);i&&a[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8081:e=>{e.exports=function(e){return e[1]}},7394:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i},e.exports=t.default},8609:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},e.exports=t.default},6420:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)({},e)};var i,o=(i=n(8609))&&i.__esModule?i:{default:i};e.exports=t.default},7100:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n(1603)),o=c(n(1354)),r=c(n(1370)),a=c(n(623)),s=c(n(6226)),l=c(n(7394)),u=c(n(2699));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=e>0?"-":"+",i=Math.abs(e),o=Math.floor(i/60),r=i%60;if(0===r)return n+String(o);var a=t||"";return n+String(o)+a+(0,l.default)(r,2)}function h(e,t){return e%60==0?(e>0?"-":"+")+(0,l.default)(Math.abs(e)/60,2):p(e,t)}function p(e,t){var n=t||"",i=e>0?"-":"+",o=Math.abs(e);return i+(0,l.default)(Math.floor(o/60),2)+n+(0,l.default)(o%60,2)}var f={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var i=e.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,i){var o=(0,s.default)(e,i),r=o>0?o:1-o;if("YY"===t){var a=r%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):(0,l.default)(r,t.length)},R:function(e,t){var n=(0,r.default)(e);return(0,l.default)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return(0,l.default)(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return(0,l.default)(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return(0,l.default)(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return u.default.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return(0,l.default)(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var o=(0,a.default)(e,i);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):(0,l.default)(o,t.length)},I:function(e,t,n){var i=(0,o.default)(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):(0,l.default)(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u.default.d(e,t)},D:function(e,t,n){var o=(0,i.default)(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):(0,l.default)(o,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var o=e.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return(0,l.default)(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var o=e.getUTCDay(),r=(o-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return(0,l.default)(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),o=0===i?7:i;switch(t){case"i":return String(o);case"ii":return(0,l.default)(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i,o=e.getUTCHours();switch(i=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i,o=e.getUTCHours();switch(i=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var i=e.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return u.default.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u.default.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u.default.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u.default.s(e,t)},S:function(e,t){return u.default.S(e,t)},X:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return h(o);case"XXXX":case"XX":return p(o);default:return p(o,":")}},x:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();switch(t){case"x":return h(o);case"xxxx":case"xx":return p(o);default:return p(o,":")}},O:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+d(o,":");default:return"GMT"+p(o,":")}},z:function(e,t,n,i){var o=(i._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+d(o,":");default:return"GMT"+p(o,":")}},t:function(e,t,n,i){var o=i._originalDate||e,r=Math.floor(o.getTime()/1e3);return(0,l.default)(r,t.length)},T:function(e,t,n,i){var o=(i._originalDate||e).getTime();return(0,l.default)(o,t.length)}};t.default=f,e.exports=t.default},2699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(7394))&&i.__esModule?i:{default:i},r={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return(0,o.default)("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):(0,o.default)(n+1,2)},d:function(e,t){return(0,o.default)(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return(0,o.default)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,o.default)(e.getUTCHours(),t.length)},m:function(e,t){return(0,o.default)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,o.default)(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),r=Math.floor(i*Math.pow(10,n-3));return(0,o.default)(r,t.length)}};t.default=r,e.exports=t.default},5209:(e,t)=>{function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={p:i,P:function(e,t){var o,r=e.match(/(P+)(p+)?/)||[],a=r[1],s=r[2];if(!s)return n(e,t);switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",n(a,t)).replace("{{time}}",i(s,t))}};t.default=o,e.exports=t.default},3561:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()},e.exports=t.default},1603:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,i.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),s=n-r;return Math.floor(s/a)+1};var i=r(n(1171)),o=r(n(8734));function r(e){return e&&e.__esModule?e:{default:e}}var a=864e5;e.exports=t.default},1354:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,i.default)(e),n=(0,o.default)(t).getTime()-(0,r.default)(t).getTime();return Math.round(n/l)+1};var i=s(n(1171)),o=s(n(79)),r=s(n(4275)),a=s(n(8734));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},1370:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,i.default)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var s=(0,r.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,r.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var i=a(n(1171)),o=a(n(8734)),r=a(n(79));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},623:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(1,arguments);var n=(0,i.default)(e),s=(0,o.default)(n,t).getTime()-(0,r.default)(n,t).getTime();return Math.round(s/l)+1};var i=s(n(1171)),o=s(n(9209)),r=s(n(4118)),a=s(n(8734));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},6226:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(1,arguments);var n=(0,i.default)(e),s=n.getUTCFullYear(),l=t||{},u=l.locale,c=u&&u.options&&u.options.firstWeekContainsDate,d=null==c?1:(0,a.default)(c),h=null==l.firstWeekContainsDate?d:(0,a.default)(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(s+1,0,h),p.setUTCHours(0,0,0,0);var f=(0,r.default)(p,t),g=new Date(0);g.setUTCFullYear(s,0,h),g.setUTCHours(0,0,0,0);var m=(0,r.default)(g,t);return n.getTime()>=f.getTime()?s+1:n.getTime()>=m.getTime()?s:s-1};var i=s(n(1171)),o=s(n(8734)),r=s(n(9209)),a=s(n(2084));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},6736:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isProtectedDayOfYearToken=function(e){return-1!==n.indexOf(e)},t.isProtectedWeekYearToken=function(e){return-1!==i.indexOf(e)},t.throwProtectedError=function(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))};var n=["D","DD"],i=["YY","YYYY"]},8734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default},79:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=1,n=(0,i.default)(e),r=n.getUTCDay(),a=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n};var i=r(n(1171)),o=r(n(8734));function r(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},4275:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var a=(0,o.default)(n);return a};var i=a(n(1370)),o=a(n(79)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},9209:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(1,arguments);var n=t||{},a=n.locale,s=a&&a.options&&a.options.weekStartsOn,l=null==s?0:(0,r.default)(s),u=null==n.weekStartsOn?l:(0,r.default)(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=(0,i.default)(e),d=c.getUTCDay(),h=(d<u?7:0)+d-u;return c.setUTCDate(c.getUTCDate()-h),c.setUTCHours(0,0,0,0),c};var i=a(n(1171)),o=a(n(8734)),r=a(n(2084));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},4118:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(1,arguments);var n=t||{},s=n.locale,l=s&&s.options&&s.options.firstWeekContainsDate,u=null==l?1:(0,a.default)(l),c=null==n.firstWeekContainsDate?u:(0,a.default)(n.firstWeekContainsDate),d=(0,i.default)(e,t),h=new Date(0);h.setUTCFullYear(d,0,c),h.setUTCHours(0,0,0,0);var p=(0,r.default)(h,t);return p};var i=s(n(6226)),o=s(n(8734)),r=s(n(9209)),a=s(n(2084));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},2084:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default},5065:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(2,arguments);var n=(0,o.default)(e).getTime(),a=(0,i.default)(t);return new Date(n+a)};var i=a(n(2084)),o=a(n(1171)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5616:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){(0,h.default)(2,arguments);var p=String(t),m=n||{},b=m.locale||o.default,w=b.options&&b.options.firstWeekContainsDate,C=null==w?1:(0,d.default)(w),x=null==m.firstWeekContainsDate?C:(0,d.default)(m.firstWeekContainsDate);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=b.options&&b.options.weekStartsOn,S=null==A?0:(0,d.default)(A),k=null==m.weekStartsOn?S:(0,d.default)(m.weekStartsOn);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var T=(0,a.default)(e);if(!(0,i.default)(T))throw new RangeError("Invalid time value");var _=(0,u.default)(T),E=(0,r.default)(T,_),O={firstWeekContainsDate:x,weekStartsOn:k,locale:b,_originalDate:T},P=p.match(g).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,l.default[t])(e,b.formatLong,O):e})).join("").match(f).map((function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return y(n);var o=s.default[i];if(o)return!m.useAdditionalWeekYearTokens&&(0,c.isProtectedWeekYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),!m.useAdditionalDayOfYearTokens&&(0,c.isProtectedDayOfYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),o(E,n,b.localize,O);if(i.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n})).join("");return P};var i=p(n(9989)),o=p(n(2512)),r=p(n(3239)),a=p(n(1171)),s=p(n(7100)),l=p(n(5209)),u=p(n(3561)),c=n(6736),d=p(n(2084)),h=p(n(8734));function p(e){return e&&e.__esModule?e:{default:e}}var f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,b=/''/g,v=/[a-zA-Z]/;function y(e){return e.match(m)[1].replace(b,"'")}e.exports=t.default},2382:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)};var i,o=(i=n(8734))&&i.__esModule?i:{default:i};e.exports=t.default},9989:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(1,arguments),!(0,i.default)(e)&&"number"!=typeof e)return!1;var t=(0,o.default)(e);return!isNaN(Number(t))};var i=a(n(2382)),o=a(n(1171)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},289:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}},e.exports=t.default},6245:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){var i,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,a=o.width?String(o.width):r;i=e.formattingValues[a]||e.formattingValues[r]}else{var s=e.defaultWidth,l=o.width?String(o.width):e.defaultWidth;i=e.values[l]||e.values[s]}return i[e.argumentCallback?e.argumentCallback(t):t]}},e.exports=t.default},3421:(e,t)=>{function n(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function i(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(a);if(!s)return null;var l,u=s[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?i(c,(function(e){return e.test(u)})):n(c,(function(e){return e.test(u)}));l=e.valueCallback?e.valueCallback(d):d,l=o.valueCallback?o.valueCallback(l):l;var h=t.slice(u.length);return{value:l,rest:h}}},e.exports=t.default},8926:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var o=i[0],r=t.match(e.parsePattern);if(!r)return null;var a=e.valueCallback?e.valueCallback(r[0]):r[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(o.length);return{value:a,rest:s}}},e.exports=t.default},1924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.default=function(e,t,i){var o,r=n[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},e.exports=t.default},6469:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(289))&&i.__esModule?i:{default:i},r={date:(0,o.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,o.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,o.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};t.default=r,e.exports=t.default},5102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.default=function(e,t,i,o){return n[e]},e.exports=t.default},7839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(6245))&&i.__esModule?i:{default:i},r={ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,o.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,o.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,o.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,o.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,o.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};t.default=r,e.exports=t.default},9796:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(3421));function o(e){return e&&e.__esModule?e:{default:e}}var r={ordinalNumber:(0,o(n(8926)).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,i.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,i.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};t.default=r,e.exports=t.default},2512:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(n(1924)),o=l(n(6469)),r=l(n(5102)),a=l(n(7839)),s=l(n(9796));function l(e){return e&&e.__esModule?e:{default:e}}var u={code:"en-US",formatDistance:i.default,formatLong:o.default,formatRelative:r.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=u,e.exports=t.default},3239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(2,arguments);var n=(0,i.default)(t);return(0,o.default)(e,-n)};var i=a(n(2084)),o=a(n(5065)),r=a(n(8734));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},1171:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))};var i,o=(i=n(8734))&&i.__esModule?i:{default:i};e.exports=t.default},7856:function(e){e.exports=function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object;let{freeze:r,seal:a,create:s}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;r||(r=function(e){return e}),a||(a=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const c=A(Array.prototype.forEach),d=A(Array.prototype.pop),h=A(Array.prototype.push),p=A(String.prototype.toLowerCase),f=A(String.prototype.toString),g=A(String.prototype.match),m=A(String.prototype.replace),b=A(String.prototype.indexOf),v=A(String.prototype.trim),y=A(Object.prototype.hasOwnProperty),w=A(RegExp.prototype.test),C=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(x,t)});var x;function A(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return l(e,t,i)}}function S(e,i){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let r=i.length;for(;r--;){let t=i[r];if("string"==typeof t){const e=o(t);e!==t&&(n(i)||(i[r]=e),t=e)}e[t]=!0}return e}function k(e){for(let t=0;t<e.length;t++)y(e,t)||(e[t]=null);return e}function T(t){const n=s(null);for(const[i,o]of e(t))y(t,i)&&(Array.isArray(o)?n[i]=k(o):o&&"object"==typeof o&&o.constructor===Object?n[i]=T(o):n[i]=o);return n}function _(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=i(e)}return function(){return null}}const E=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),N=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=r(["#text"]),U=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),L=r(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),R=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),H=a(/<%[\w\W]*|[\w\W]*%>/gm),F=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),$=a(/^aria-[\-\w]+$/),Q=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:H,TMPLIT_EXPR:F,DATA_ATTR:z,ARIA_ATTR:$,IS_ALLOWED_URI:Q,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:q,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const K=function(){return"undefined"==typeof window?null:window},X=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const i=e=>t(e);if(i.version="3.1.2",i.removed=[],!n||!n.document||9!==n.document.nodeType)return i.isSupported=!1,i;let{document:o}=n;const a=o,l=a.currentScript,{DocumentFragment:u,HTMLTemplateElement:x,Node:A,Element:k,NodeFilter:j,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,G=k.prototype,q=_(G,"cloneNode"),V=_(G,"nextSibling"),Z=_(G,"childNodes"),J=_(G,"parentNode");if("function"==typeof x){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ee,te="";const{implementation:ne,createNodeIterator:ie,createDocumentFragment:oe,getElementsByTagName:re}=o,{importNode:ae}=a;let se={};i.isSupported="function"==typeof e&&"function"==typeof J&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ue,TMPLIT_EXPR:ce,DATA_ATTR:de,ARIA_ATTR:he,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:ge}=Y;let{IS_ALLOWED_URI:me}=Y,be=null;const ve=S({},[...E,...O,...P,...M,...D]);let ye=null;const we=S({},[...U,...L,...B,...R]);let Ce=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Ae=null,Se=!0,ke=!0,Te=!1,_e=!0,Ee=!1,Oe=!0,Pe=!1,Ne=!1,Me=!1,Ie=!1,De=!1,Ue=!1,Le=!0,Be=!1;const Re="user-content-";let je=!0,He=!1,Fe={},ze=null;const $e=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qe=null;const Ge=S({},["audio","video","img","source","image","track"]);let qe=null;const We=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Xe=Ke,Ze=!1,Je=null;const et=S({},[Ve,Ye,Ke],f);let tt=null;const nt=["application/xhtml+xml","text/html"],it="text/html";let ot=null,rt=null;const at=255,st=o.createElement("form"),lt=function(e){return e instanceof RegExp||e instanceof Function},ut=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!rt||rt!==e){if(e&&"object"==typeof e||(e={}),e=T(e),tt=-1===nt.indexOf(e.PARSER_MEDIA_TYPE)?it:e.PARSER_MEDIA_TYPE,ot="application/xhtml+xml"===tt?f:p,be=y(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,ot):ve,ye=y(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,ot):we,Je=y(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,f):et,qe=y(e,"ADD_URI_SAFE_ATTR")?S(T(We),e.ADD_URI_SAFE_ATTR,ot):We,Qe=y(e,"ADD_DATA_URI_TAGS")?S(T(Ge),e.ADD_DATA_URI_TAGS,ot):Ge,ze=y(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,ot):$e,xe=y(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,ot):{},Ae=y(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,ot):{},Fe=!!y(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,_e=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Oe=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Le=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||Q,Xe=e.NAMESPACE||Ke,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&lt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&lt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(ke=!1),De&&(Ie=!0),Fe&&(be=S({},D),ye=[],!0===Fe.html&&(S(be,E),S(ye,U)),!0===Fe.svg&&(S(be,O),S(ye,L),S(ye,R)),!0===Fe.svgFilters&&(S(be,P),S(ye,L),S(ye,R)),!0===Fe.mathMl&&(S(be,M),S(ye,B),S(ye,R))),e.ADD_TAGS&&(be===ve&&(be=T(be)),S(be,e.ADD_TAGS,ot)),e.ADD_ATTR&&(ye===we&&(ye=T(ye)),S(ye,e.ADD_ATTR,ot)),e.ADD_URI_SAFE_ATTR&&S(qe,e.ADD_URI_SAFE_ATTR,ot),e.FORBID_CONTENTS&&(ze===$e&&(ze=T(ze)),S(ze,e.FORBID_CONTENTS,ot)),je&&(be["#text"]=!0),Pe&&S(be,["html","head","body"]),be.table&&(S(be,["tbody"]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=X($,l)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));r&&r(e),rt=e}},ct=S({},["mi","mo","mn","ms","mtext"]),dt=S({},["foreignobject","annotation-xml"]),ht=S({},["title","style","font","a","script"]),pt=S({},[...O,...P,...N]),ft=S({},[...M,...I]),gt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),i=p(t.tagName);return!!Je[e.namespaceURI]&&(e.namespaceURI===Ye?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===i||ct[i]):Boolean(pt[n]):e.namespaceURI===Ve?t.namespaceURI===Ke?"math"===n:t.namespaceURI===Ye?"math"===n&&dt[i]:Boolean(ft[n]):e.namespaceURI===Ke?!(t.namespaceURI===Ye&&!dt[i])&&!(t.namespaceURI===Ve&&!ct[i])&&!ft[n]&&(ht[n]||!pt[n]):!("application/xhtml+xml"!==tt||!Je[e.namespaceURI]))},mt=function(e){h(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},bt=function(e,t){try{h(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Ie||De)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){let t=null,n=null;if(Me)e="<remove></remove>"+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===tt&&Xe===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=ee?ee.createHTML(e):e;if(Xe===Ke)try{t=(new z).parseFromString(i,tt)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ze?te:i}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(o.createTextNode(n),r.childNodes[0]||null),Xe===Ke?re.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:r},yt=function(e){return ie.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof F&&(void 0!==e.__depth&&"number"!=typeof e.__depth||void 0!==e.__removalCount&&"number"!=typeof e.__removalCount||"string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ct=function(e){return"function"==typeof A&&e instanceof A},xt=function(e,t,n){se[e]&&c(se[e],(e=>{e.call(i,t,n,rt)}))},At=function(e){let t=null;if(xt("beforeSanitizeElements",e,null),wt(e))return mt(e),!0;const n=ot(e.nodeName);if(xt("uponSanitizeElement",e,{tagName:n,allowedTags:be}),e.hasChildNodes()&&!Ct(e.firstElementChild)&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(Oe&&8===e.nodeType&&w(/<[/\w]/g,e.data))return mt(e),!0;if(!be[n]||xe[n]){if(!xe[n]&&kt(n)){if(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(je&&!ze[n]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let i=n.length-1;i>=0;--i){const o=q(n[i],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,V(e))}}return mt(e),!0}return e instanceof k&&!gt(e)?(mt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!w(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,c([le,ue,ce],(e=>{t=m(t,e," ")})),e.textContent!==t&&(h(i.removed,{element:e.cloneNode()}),e.textContent=t)),xt("afterSanitizeElements",e,null),!1):(mt(e),!0)},St=function(e,t,n){if(Le&&("id"===t||"name"===t)&&(n in o||n in st))return!1;if(ke&&!Ae[t]&&w(de,t));else if(Se&&w(he,t));else if(!ye[t]||Ae[t]){if(!(kt(e)&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&w(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(qe[t]);else if(w(me,m(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!Qe[e])if(Te&&!w(pe,m(n,fe,"")));else if(n)return!1;return!0},kt=function(e){return"annotation-xml"!==e&&g(e,ge)},Tt=function(e){xt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let o=t.length;for(;o--;){const r=t[o],{name:a,namespaceURI:s,value:l}=r,u=ot(a);let h="value"===a?l:v(l);if(n.attrName=u,n.attrValue=h,n.keepAttr=!0,n.forceKeepAttr=void 0,xt("uponSanitizeAttribute",e,n),h=n.attrValue,n.forceKeepAttr)continue;if(bt(a,e),!n.keepAttr)continue;if(!_e&&w(/\/>/i,h)){bt(a,e);continue}Ee&&c([le,ue,ce],(e=>{h=m(h,e," ")}));const p=ot(e.nodeName);if(St(p,u,h)){if(!Be||"id"!==u&&"name"!==u||(bt(a,e),h=Re+h),ee&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(s);else switch($.getAttributeType(p,u)){case"TrustedHTML":h=ee.createHTML(h);break;case"TrustedScriptURL":h=ee.createScriptURL(h)}try{s?e.setAttributeNS(s,a,h):e.setAttribute(a,h),d(i.removed)}catch(e){}}}xt("afterSanitizeAttributes",e,null)},_t=function e(t){let n=null;const i=yt(t);for(xt("beforeSanitizeShadowDOM",t,null);n=i.nextNode();){if(xt("uponSanitizeShadowNode",n,null),At(n))continue;const t=J(n);1===n.nodeType&&(t&&t.__depth?n.__depth=(n.__removalCount||0)+t.__depth+1:n.__depth=1),n.__depth>=at&&mt(n),n.content instanceof u&&(n.content.__depth=n.__depth,e(n.content)),Tt(n)}xt("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,r=null,s=null;if(Ze=!e,Ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ct(e)){if("function"!=typeof e.toString)throw C("toString is not a function");if("string"!=typeof(e=e.toString()))throw C("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Ne||ut(t),i.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=ot(e.nodeName);if(!be[t]||xe[t])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof A)n=vt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ie&&!Ee&&!Pe&&-1===e.indexOf("<"))return ee&&Ue?ee.createHTML(e):e;if(n=vt(e),!n)return Ie?null:Ue?te:""}n&&Me&&mt(n.firstChild);const l=yt(He?e:n);for(;r=l.nextNode();){if(At(r))continue;const e=J(r);1===r.nodeType&&(e&&e.__depth?r.__depth=(r.__removalCount||0)+e.__depth+1:r.__depth=1),r.__depth>=at&&mt(r),r.content instanceof u&&(r.content.__depth=r.__depth,_t(r.content)),Tt(r)}if(He)return e;if(Ie){if(De)for(s=oe.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ye.shadowroot||ye.shadowrootmode)&&(s=ae.call(a,s,!0)),s}let d=Pe?n.outerHTML:n.innerHTML;return Pe&&be["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&w(W,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),Ee&&c([le,ue,ce],(e=>{d=m(d,e," ")})),ee&&Ue?ee.createHTML(d):d},i.setConfig=function(){ut(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},i.clearConfig=function(){rt=null,Ne=!1},i.isValidAttribute=function(e,t,n){rt||ut({});const i=ot(e),o=ot(t);return St(i,o,n)},i.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],h(se[e],t))},i.removeHook=function(e){if(se[e])return d(se[e])},i.removeHooks=function(e){se[e]&&(se[e]=[])},i.removeAllHooks=function(){se={}},i}()}()},8552:(e,t,n)=>{var i=n(852)(n(5639),"DataView");e.exports=i},1989:(e,t,n)=>{var i=n(1789),o=n(401),r=n(7667),a=n(1327),s=n(1866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=a,l.prototype.set=s,e.exports=l},8407:(e,t,n)=>{var i=n(7040),o=n(4125),r=n(2117),a=n(7529),s=n(4705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=a,l.prototype.set=s,e.exports=l},7071:(e,t,n)=>{var i=n(852)(n(5639),"Map");e.exports=i},3369:(e,t,n)=>{var i=n(4785),o=n(1285),r=n(6e3),a=n(9916),s=n(5265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=r,l.prototype.has=a,l.prototype.set=s,e.exports=l},3818:(e,t,n)=>{var i=n(852)(n(5639),"Promise");e.exports=i},8525:(e,t,n)=>{var i=n(852)(n(5639),"Set");e.exports=i},8668:(e,t,n)=>{var i=n(3369),o=n(619),r=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=r,e.exports=a},6384:(e,t,n)=>{var i=n(8407),o=n(7465),r=n(3779),a=n(7599),s=n(4758),l=n(4309);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=r,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},2705:(e,t,n)=>{var i=n(5639).Symbol;e.exports=i},1149:(e,t,n)=>{var i=n(5639).Uint8Array;e.exports=i},577:(e,t,n)=>{var i=n(852)(n(5639),"WeakMap");e.exports=i},4174:e=>{e.exports=function(e,t,n,i){for(var o=-1,r=null==e?0:e.length;++o<r;){var a=e[o];t(i,a,n(a),e)}return i}},7412:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},4963:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n<i;){var a=e[n];t(a,n,e)&&(r[o++]=a)}return r}},4636:(e,t,n)=>{var i=n(2545),o=n(5694),r=n(1469),a=n(4144),s=n(5776),l=n(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=r(e),c=!n&&o(e),d=!n&&!c&&a(e),h=!n&&!c&&!d&&l(e),p=n||c||d||h,f=p?i(e.length,String):[],g=f.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g))||f.push(m);return f}},9932:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}},2488:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}},2663:e=>{e.exports=function(e,t,n,i){var o=-1,r=null==e?0:e.length;for(i&&r&&(n=e[++o]);++o<r;)n=t(n,e[o],o,e);return n}},2908:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},4286:e=>{e.exports=function(e){return e.split("")}},9029:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},8470:(e,t,n)=>{var i=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},1119:(e,t,n)=>{var i=n(9881);e.exports=function(e,t,n,o){return i(e,(function(e,i,r){t(o,e,n(e),r)})),o}},9465:(e,t,n)=>{var i=n(8777);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var i=n(3218),o=Object.create,r=function(){function e(){}return function(t){if(!i(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=r},9881:(e,t,n)=>{var i=n(7816),o=n(9291)(i);e.exports=o},8483:(e,t,n)=>{var i=n(5063)();e.exports=i},7816:(e,t,n)=>{var i=n(8483),o=n(3674);e.exports=function(e,t){return e&&i(e,t,o)}},7786:(e,t,n)=>{var i=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,r=(t=i(t,e)).length;null!=e&&n<r;)e=e[o(t[n++])];return n&&n==r?e:void 0}},8866:(e,t,n)=>{var i=n(2488),o=n(1469);e.exports=function(e,t,n){var r=t(e);return o(e)?r:i(r,n(e))}},4239:(e,t,n)=>{var i=n(2705),o=n(9607),r=n(2333),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):r(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},9454:(e,t,n)=>{var i=n(4239),o=n(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==i(e)}},939:(e,t,n)=>{var i=n(2492),o=n(7005);e.exports=function e(t,n,r,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:i(t,n,r,a,e,s))}},2492:(e,t,n)=>{var i=n(6384),o=n(7114),r=n(8351),a=n(6096),s=n(4160),l=n(1469),u=n(4144),c=n(6719),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,b){var v=l(e),y=l(t),w=v?h:s(e),C=y?h:s(t),x=(w=w==d?p:w)==p,A=(C=C==d?p:C)==p,S=w==C;if(S&&u(e)){if(!u(t))return!1;v=!0,x=!1}if(S&&!x)return b||(b=new i),v||c(e)?o(e,t,n,g,m,b):r(e,t,w,n,g,m,b);if(!(1&n)){var k=x&&f.call(e,"__wrapped__"),T=A&&f.call(t,"__wrapped__");if(k||T){var _=k?e.value():e,E=T?t.value():t;return b||(b=new i),m(_,E,n,g,b)}}return!!S&&(b||(b=new i),a(e,t,n,g,m,b))}},2958:(e,t,n)=>{var i=n(6384),o=n(939);e.exports=function(e,t,n,r){var a=n.length,s=a,l=!r;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var c=(u=n[a])[0],d=e[c],h=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var p=new i;if(r)var f=r(d,h,c,e,t,p);if(!(void 0===f?o(h,d,3,r,p):f))return!1}}return!0}},8458:(e,t,n)=>{var i=n(3560),o=n(5346),r=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,h=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!r(e)||o(e))&&(i(e)?h:s).test(a(e))}},8749:(e,t,n)=>{var i=n(4239),o=n(1780),r=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return r(e)&&o(e.length)&&!!a[i(e)]}},7206:(e,t,n)=>{var i=n(1573),o=n(6432),r=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?r:"object"==typeof e?a(e)?o(e[0],e[1]):i(e):s(e)}},280:(e,t,n)=>{var i=n(5726),o=n(6916),r=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=[];for(var n in Object(e))r.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1573:(e,t,n)=>{var i=n(2958),o=n(1499),r=n(2634);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?r(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}},6432:(e,t,n)=>{var i=n(939),o=n(7361),r=n(9095),a=n(5403),s=n(9162),l=n(2634),u=n(327);e.exports=function(e,t){return a(e)&&s(t)?l(u(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?r(n,e):i(t,a,3)}}},371:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var i=n(7786);e.exports=function(e){return function(t){return i(t,e)}}},8674:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},4259:e=>{e.exports=function(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(o);++i<o;)r[i]=e[i+t];return r}},2545:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},531:(e,t,n)=>{var i=n(2705),o=n(9932),r=n(1469),a=n(3448),s=i?i.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(r(t))return o(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var i=n(7990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(o,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},4757:e=>{e.exports=function(e,t){return e.has(t)}},1811:(e,t,n)=>{var i=n(1469),o=n(5403),r=n(5514),a=n(9833);e.exports=function(e,t){return i(e)?e:o(e,t)?[e]:r(a(e))}},180:(e,t,n)=>{var i=n(4259);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:i(e,t,n)}},4429:(e,t,n)=>{var i=n(5639)["__core-js_shared__"];e.exports=i},5189:(e,t,n)=>{var i=n(4174),o=n(1119),r=n(7206),a=n(1469);e.exports=function(e,t){return function(n,s){var l=a(n)?i:o,u=t?t():{};return l(n,e,r(s,2),u)}}},9291:(e,t,n)=>{var i=n(8612);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!i(n))return e(n,o);for(var r=n.length,a=t?r:-1,s=Object(n);(t?a--:++a<r)&&!1!==o(s[a],a,s););return n}}},5063:e=>{e.exports=function(e){return function(t,n,i){for(var o=-1,r=Object(t),a=i(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(r[l],l,r))break}return t}}},8805:(e,t,n)=>{var i=n(180),o=n(2689),r=n(3140),a=n(9833);e.exports=function(e){return function(t){t=a(t);var n=o(t)?r(t):void 0,s=n?n[0]:t.charAt(0),l=n?i(n,1).join(""):t.slice(1);return s[e]()+l}}},5393:(e,t,n)=>{var i=n(2663),o=n(3816),r=n(8748),a=RegExp("['’]","g");e.exports=function(e){return function(t){return i(r(o(t).replace(a,"")),e,"")}}},9389:(e,t,n)=>{var i=n(8674)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=i},8777:(e,t,n)=>{var i=n(852),o=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:(e,t,n)=>{var i=n(8668),o=n(2908),r=n(4757);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var b=e[f],v=t[f];if(a)var y=u?a(v,b,f,t,e,l):a(b,v,f,e,t,l);if(void 0!==y){if(y)continue;g=!1;break}if(m){if(!o(t,(function(e,t){if(!r(m,t)&&(b===e||s(b,e,n,a,l)))return m.push(t)}))){g=!1;break}}else if(b!==v&&!s(b,v,n,a,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},8351:(e,t,n)=>{var i=n(2705),o=n(1149),r=n(7813),a=n(7114),s=n(8776),l=n(1814),u=i?i.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&i;if(p||(p=l),e.size!=t.size&&!f)return!1;var g=h.get(e);if(g)return g==t;i|=2,h.set(e,t);var m=a(p(e),p(t),i,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},6096:(e,t,n)=>{var i=n(8234),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,r,a,s){var l=1&n,u=i(e),c=u.length;if(c!=i(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:o.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<c;){var b=e[h=u[d]],v=t[h];if(r)var y=l?r(v,b,h,t,e,s):r(b,v,h,e,t,s);if(!(void 0===y?b===v||a(b,v,n,r,s):y)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var w=e.constructor,C=t.constructor;w==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof C&&C instanceof C||(g=!1)}return s.delete(e),s.delete(t),g}},1957:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},8234:(e,t,n)=>{var i=n(8866),o=n(9551),r=n(3674);e.exports=function(e){return i(e,r,o)}},5050:(e,t,n)=>{var i=n(7019);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var i=n(9162),o=n(3674);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,i(a)]}return t}},852:(e,t,n)=>{var i=n(8458),o=n(7801);e.exports=function(e,t){var n=o(e,t);return i(n)?n:void 0}},5924:(e,t,n)=>{var i=n(5569)(Object.getPrototypeOf,Object);e.exports=i},9607:(e,t,n)=>{var i=n(2705),o=Object.prototype,r=o.hasOwnProperty,a=o.toString,s=i?i.toStringTag:void 0;e.exports=function(e){var t=r.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var o=a.call(e);return i&&(t?e[s]=n:delete e[s]),o}},9551:(e,t,n)=>{var i=n(4963),o=n(479),r=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),i(a(e),(function(t){return r.call(e,t)})))}:o;e.exports=s},4160:(e,t,n)=>{var i=n(8552),o=n(7071),r=n(3818),a=n(8525),s=n(577),l=n(4239),u=n(346),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(i),m=u(o),b=u(r),v=u(a),y=u(s),w=l;(i&&w(new i(new ArrayBuffer(1)))!=f||o&&w(new o)!=c||r&&w(r.resolve())!=d||a&&w(new a)!=h||s&&w(new s)!=p)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case g:return f;case m:return c;case b:return d;case v:return h;case y:return p}return t}),e.exports=w},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var i=n(1811),o=n(5694),r=n(1469),a=n(5776),s=n(1780),l=n(327);e.exports=function(e,t,n){for(var u=-1,c=(t=i(t,e)).length,d=!1;++u<c;){var h=l(t[u]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&s(c)&&a(h,c)&&(r(e)||o(e))}},2689:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3157:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},1789:(e,t,n)=>{var i=n(4536);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var i=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var i=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:o.call(t,e)}},1866:(e,t,n)=>{var i=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},5403:(e,t,n)=>{var i=n(1469),o=n(3448),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!r.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var i,o=n(4429),r=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!r&&r in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var i=n(3218);e.exports=function(e){return e==e&&!i(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var i=n(8470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var i=n(8470);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},7529:(e,t,n)=>{var i=n(8470);e.exports=function(e){return i(this.__data__,e)>-1}},4705:(e,t,n)=>{var i=n(8470);e.exports=function(e,t){var n=this.__data__,o=i(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:(e,t,n)=>{var i=n(1989),o=n(8407),r=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(r||o),string:new i}}},1285:(e,t,n)=>{var i=n(5050);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var i=n(5050);e.exports=function(e){return i(this,e).get(e)}},9916:(e,t,n)=>{var i=n(5050);e.exports=function(e){return i(this,e).has(e)}},5265:(e,t,n)=>{var i=n(5050);e.exports=function(e,t){var n=i(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var i=n(8306);e.exports=function(e){var t=i(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var i=n(852)(Object,"create");e.exports=i},6916:(e,t,n)=>{var i=n(5569)(Object.keys,Object);e.exports=i},1167:(e,t,n)=>{e=n.nmd(e);var i=n(1957),o=t&&!t.nodeType&&t,r=o&&e&&!e.nodeType&&e,a=r&&r.exports===o&&i.process,s=function(){try{return r&&r.require&&r.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5639:(e,t,n)=>{var i=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,r=i||o||Function("return this")();e.exports=r},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:(e,t,n)=>{var i=n(8407);e.exports=function(){this.__data__=new i,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var i=n(8407),o=n(7071),r=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new r(a)}return n.set(e,t),this.size=n.size,this}},3140:(e,t,n)=>{var i=n(4286),o=n(2689),r=n(676);e.exports=function(e){return o(e)?r(e):i(e)}},5514:(e,t,n)=>{var i=n(4523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,a=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,i,o){t.push(i?o.replace(r,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var i=n(3448);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},676:e=>{var t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",r="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+t+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",l=s+a+"(?:\\u200d(?:"+[i,o,r].join("|")+")"+s+a+")*",u="(?:"+[i+t+"?",t,o,r,"[\\ud800-\\udfff]"].join("|")+")",c=RegExp(n+"(?="+n+")|"+u+l,"g");e.exports=function(e){return e.match(c)||[]}},2757:e=>{var t="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+i+"]",r="\\d+",a="["+t+"]",s="[^\\ud800-\\udfff"+i+r+"\\u2700-\\u27bf"+t+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="["+n+"]",d="(?:"+a+"|"+s+")",h="(?:"+c+"|"+s+")",p="(?:['’](?:d|ll|m|re|s|t|ve))?",f="(?:['’](?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",m="[\\ufe0e\\ufe0f]?",b=m+g+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",l,u].join("|")+")"+m+g+")*",v="(?:"+["[\\u2700-\\u27bf]",l,u].join("|")+")"+b,y=RegExp([c+"?"+a+"+"+p+"(?="+[o,c,"$"].join("|")+")",h+"+"+f+"(?="+[o,c+d,"$"].join("|")+")",c+"?"+d+"+"+p,c+"+"+f,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",r,v].join("|"),"g");e.exports=function(e){return e.match(y)||[]}},8929:(e,t,n)=>{var i=n(8403),o=n(5393)((function(e,t,n){return t=t.toLowerCase(),e+(n?i(t):t)}));e.exports=o},8403:(e,t,n)=>{var i=n(9833),o=n(1700);e.exports=function(e){return o(i(e).toLowerCase())}},3279:(e,t,n)=>{var i=n(3218),o=n(7771),r=n(4841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,g=!1,m=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,i=u;return l=u=void 0,f=t,d=e.apply(i,n)}function y(e){return f=e,h=setTimeout(C,t),g?v(e):d}function w(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-f>=c}function C(){var e=o();if(w(e))return x(e);h=setTimeout(C,function(e){var n=t-(e-p);return m?s(n,c-(e-f)):n}(e))}function x(e){return h=void 0,b&&l?v(e):(l=u=void 0,d)}function A(){var e=o(),n=w(e);if(l=arguments,u=this,p=e,n){if(void 0===h)return y(p);if(m)return clearTimeout(h),h=setTimeout(C,t),v(p)}return void 0===h&&(h=setTimeout(C,t)),d}return t=r(t)||0,i(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(r(n.maxWait)||0,t):c,b="trailing"in n?!!n.trailing:b),A.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},A.flush=function(){return void 0===h?d:x(o())},A}},3816:(e,t,n)=>{var i=n(9389),o=n(9833),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(r,i).replace(a,"")}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7361:(e,t,n)=>{var i=n(7786);e.exports=function(e,t,n){var o=null==e?void 0:i(e,t);return void 0===o?n:o}},7739:(e,t,n)=>{var i=n(9465),o=n(5189),r=Object.prototype.hasOwnProperty,a=o((function(e,t,n){r.call(e,n)?e[n].push(t):i(e,n,[t])}));e.exports=a},9095:(e,t,n)=>{var i=n(13),o=n(222);e.exports=function(e,t){return null!=e&&o(e,t,i)}},6557:e=>{e.exports=function(e){return e}},5694:(e,t,n)=>{var i=n(9454),o=n(7005),r=Object.prototype,a=r.hasOwnProperty,s=r.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var i=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!i(e)}},4144:(e,t,n)=>{e=n.nmd(e);var i=n(5639),o=n(5062),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,s=a&&a.exports===r?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},8367:(e,t,n)=>{var i=n(280),o=n(4160),r=n(5694),a=n(1469),s=n(8612),l=n(4144),u=n(5726),c=n(6719),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||r(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!i(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var i=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},3448:(e,t,n)=>{var i=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==i(e)}},6719:(e,t,n)=>{var i=n(8749),o=n(7518),r=n(1167),a=r&&r.isTypedArray,s=a?o(a):i;e.exports=s},3674:(e,t,n)=>{var i=n(4636),o=n(280),r=n(8612);e.exports=function(e){return r(e)?i(e):o(e)}},6604:(e,t,n)=>{var i=n(9465),o=n(7816),r=n(7206);e.exports=function(e,t){var n={};return t=r(t,3),o(e,(function(e,o,r){i(n,o,t(e,o,r))})),n}},8306:(e,t,n)=>{var i=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var a=e.apply(this,i);return n.cache=r.set(o,a)||r,a};return n.cache=new(o.Cache||i),n}o.Cache=i,e.exports=o},308:e=>{e.exports=function(){}},7771:(e,t,n)=>{var i=n(5639);e.exports=function(){return i.Date.now()}},9601:(e,t,n)=>{var i=n(371),o=n(9152),r=n(5403),a=n(327);e.exports=function(e){return r(e)?i(a(e)):o(e)}},1865:(e,t,n)=>{var i=n(5393)((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));e.exports=i},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},4841:(e,t,n)=>{var i=n(7561),o=n(3218),r=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9833:(e,t,n)=>{var i=n(531);e.exports=function(e){return null==e?"":i(e)}},8718:(e,t,n)=>{var i=n(7412),o=n(3118),r=n(7816),a=n(7206),s=n(5924),l=n(1469),u=n(4144),c=n(3560),d=n(3218),h=n(6719);e.exports=function(e,t,n){var p=l(e),f=p||u(e)||h(e);if(t=a(t,4),null==n){var g=e&&e.constructor;n=f?p?new g:[]:d(e)&&c(g)?o(s(e)):{}}return(f?i:r)(e,(function(e,i,o){return t(n,e,i,o)})),n}},1700:(e,t,n)=>{var i=n(8805)("toUpperCase");e.exports=i},8748:(e,t,n)=>{var i=n(9029),o=n(3157),r=n(9833),a=n(2757);e.exports=function(e,t,n){return e=r(e),void 0===(t=n?void 0:t)?o(e)?a(e):i(e):e.match(t)||[]}},9594:function(e,t,n){e.exports=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function o(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function r(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function a(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function u(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},d={exports:{}};!function(e){!function(t,n){var i=Math.pow(2,-24),o=Math.pow(2,32),r=Math.pow(2,53),a={encode:function(e){var t,i=new ArrayBuffer(256),a=new DataView(i),s=0;function l(e){for(var n=i.byteLength,o=s+e;n<o;)n*=2;if(n!==i.byteLength){var r=a;i=new ArrayBuffer(n),a=new DataView(i);for(var l=s+3>>2,u=0;u<l;++u)a.setUint32(4*u,r.getUint32(4*u))}return t=e,a}function u(){s+=t}function c(e){u(l(1).setUint8(s,e))}function d(e){for(var t=l(e.length),n=0;n<e.length;++n)t.setUint8(s+n,e[n]);u()}function h(e,t){t<24?c(e<<5|t):t<256?(c(e<<5|24),c(t)):t<65536?(c(e<<5|25),function(e){u(l(2).setUint16(s,e))}(t)):t<4294967296?(c(e<<5|26),function(e){u(l(4).setUint32(s,e))}(t)):(c(e<<5|27),function(e){var t=e%o,n=(e-t)/o,i=l(8);i.setUint32(s,n),i.setUint32(s+4,t),u()}(t))}if(function e(t){var i;if(!1===t)return c(244);if(!0===t)return c(245);if(null===t)return c(246);if(t===n)return c(247);switch(typeof t){case"number":if(Math.floor(t)===t){if(0<=t&&t<=r)return h(0,t);if(-r<=t&&t<0)return h(1,-(t+1))}return c(251),function(e){u(l(8).setFloat64(s,e))}(t);case"string":var o=[];for(i=0;i<t.length;++i){var a=t.charCodeAt(i);a<128?o.push(a):a<2048?(o.push(192|a>>6),o.push(128|63&a)):a<55296?(o.push(224|a>>12),o.push(128|a>>6&63),o.push(128|63&a)):(a=(1023&a)<<10,a|=1023&t.charCodeAt(++i),a+=65536,o.push(240|a>>18),o.push(128|a>>12&63),o.push(128|a>>6&63),o.push(128|63&a))}return h(3,o.length),d(o);default:var p;if(Array.isArray(t))for(h(4,p=t.length),i=0;i<p;++i)e(t[i]);else if(t instanceof Uint8Array)h(2,t.length),d(t);else{var f=Object.keys(t);for(h(5,p=f.length),i=0;i<p;++i){var g=f[i];e(g),e(t[g])}}}}(e),"slice"in i)return i.slice(0,s);for(var p=new ArrayBuffer(s),f=new DataView(p),g=0;g<s;++g)f.setUint8(g,a.getUint8(g));return p},decode:function(e,t,r){var a=new DataView(e),s=0;function l(e,t){return s+=t,e}function u(t){return l(new Uint8Array(e,s,t),t)}function c(){return l(a.getUint8(s),1)}function d(){return l(a.getUint16(s),2)}function h(){return l(a.getUint32(s),4)}function p(){return 255===a.getUint8(s)&&(s+=1,!0)}function f(e){if(e<24)return e;if(24===e)return c();if(25===e)return d();if(26===e)return h();if(27===e)return h()*o+h();if(31===e)return-1;throw"Invalid length encoding"}function g(e){var t=c();if(255===t)return-1;var n=f(31&t);if(n<0||t>>5!==e)throw"Invalid indefinite length element";return n}function m(e,t){for(var n=0;n<t;++n){var i=c();128&i&&(i<224?(i=(31&i)<<6|63&c(),t-=1):i<240?(i=(15&i)<<12|(63&c())<<6|63&c(),t-=2):(i=(15&i)<<18|(63&c())<<12|(63&c())<<6|63&c(),t-=3)),i<65536?e.push(i):(i-=65536,e.push(55296|i>>10),e.push(56320|1023&i))}}"function"!=typeof t&&(t=function(e){return e}),"function"!=typeof r&&(r=function(){return n});var b=function e(){var o,h,b=c(),v=b>>5,y=31&b;if(7===v)switch(y){case 25:return function(){var e=new ArrayBuffer(4),t=new DataView(e),n=d(),o=32768&n,r=31744&n,a=1023&n;if(31744===r)r=261120;else if(0!==r)r+=114688;else if(0!==a)return a*i;return t.setUint32(0,o<<16|r<<13|a<<13),t.getFloat32(0)}();case 26:return l(a.getFloat32(s),4);case 27:return l(a.getFloat64(s),8)}if((h=f(y))<0&&(v<2||6<v))throw"Invalid length";switch(v){case 0:return h;case 1:return-1-h;case 2:if(h<0){for(var w=[],C=0;(h=g(v))>=0;)C+=h,w.push(u(h));var x=new Uint8Array(C),A=0;for(o=0;o<w.length;++o)x.set(w[o],A),A+=w[o].length;return x}return u(h);case 3:var S=[];if(h<0)for(;(h=g(v))>=0;)m(S,h);else m(S,h);return String.fromCharCode.apply(null,S);case 4:var k;if(h<0)for(k=[];!p();)k.push(e());else for(k=new Array(h),o=0;o<h;++o)k[o]=e();return k;case 5:var T={};for(o=0;o<h||h<0&&!p();++o)T[e()]=e();return T;case 6:return t(e(),h);case 7:switch(h){case 20:return!1;case 21:return!0;case 22:return null;case 23:return n;default:return r(h)}}}();if(s!==e.byteLength)throw"Remaining bytes";return b}};e.exports?e.exports=a:t.CBOR||(t.CBOR=a)}(c)}(d);var h=d.exports,p={exports:{}};!function(e,t){!function(e){var t={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function n(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}function i(e,n){var i=t[n||"all"];return i&&i.test(e)||!1}n.isUUID=i,n.VERSION="0.1.0",e.uuid=n,e.isUUID=i}(t),null!==e&&(e.exports=t.uuid)}(p,p.exports);var f=p.exports,g=function(){return f.uuid?f.uuid():f()},m=function(){function e(e){var t,n,i,o=e.setup;if(this._PNSDKSuffix={},this.instanceId="pn-".concat(g()),this.secretKey=o.secretKey||o.secret_key,this.subscribeKey=o.subscribeKey||o.subscribe_key,this.publishKey=o.publishKey||o.publish_key,this.sdkName=o.sdkName,this.sdkFamily=o.sdkFamily,this.partnerId=o.partnerId,this.setAuthKey(o.authKey),this.setCipherKey(o.cipherKey),this.setFilterExpression(o.filterExpression),"string"!=typeof o.origin&&!Array.isArray(o.origin)&&void 0!==o.origin)throw new Error("Origin must be either undefined, a string or a list of strings.");if(this.origin=o.origin||Array.from({length:20},(function(e,t){return"ps".concat(t+1,".pndsn.com")})),this.secure=o.ssl||!1,this.restore=o.restore||!1,this.proxy=o.proxy,this.keepAlive=o.keepAlive,this.keepAliveSettings=o.keepAliveSettings,this.autoNetworkDetection=o.autoNetworkDetection||!1,this.dedupeOnSubscribe=o.dedupeOnSubscribe||!1,this.maximumCacheSize=o.maximumCacheSize||100,this.customEncrypt=o.customEncrypt,this.customDecrypt=o.customDecrypt,this.fileUploadPublishRetryLimit=null!==(t=o.fileUploadPublishRetryLimit)&&void 0!==t?t:5,this.useRandomIVs=null===(n=o.useRandomIVs)||void 0===n||n,this.enableSubscribeBeta=null!==(i=o.enableSubscribeBeta)&&void 0!==i&&i,"undefined"!=typeof location&&"https:"===location.protocol&&(this.secure=!0),this.logVerbosity=o.logVerbosity||!1,this.suppressLeaveEvents=o.suppressLeaveEvents||!1,this.announceFailedHeartbeats=o.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=o.announceSuccessfulHeartbeats||!1,this.useInstanceId=o.useInstanceId||!1,this.useRequestId=o.useRequestId||!1,this.requestMessageCountThreshold=o.requestMessageCountThreshold,this.setTransactionTimeout(o.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(o.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(o.useSendBeacon||!0),o.presenceTimeout?this.setPresenceTimeout(o.presenceTimeout):this._presenceTimeout=300,null!=o.heartbeatInterval&&this.setHeartbeatInterval(o.heartbeatInterval),"string"==typeof o.userId){if("string"==typeof o.uuid)throw new Error("Only one of the following configuration options has to be provided: `uuid` or `userId`");this.setUserId(o.userId)}else{if("string"!=typeof o.uuid)throw new Error("One of the following configuration options has to be provided: `uuid` or `userId`");this.setUUID(o.uuid)}}return e.prototype.getAuthKey=function(){return this.authKey},e.prototype.setAuthKey=function(e){return this.authKey=e,this},e.prototype.setCipherKey=function(e){return this.cipherKey=e,this},e.prototype.getUUID=function(){return this.UUID},e.prototype.setUUID=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing uuid parameter. Provide a valid string uuid");return this.UUID=e,this},e.prototype.getUserId=function(){return this.UUID},e.prototype.setUserId=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");return this.UUID=e,this},e.prototype.getFilterExpression=function(){return this.filterExpression},e.prototype.setFilterExpression=function(e){return this.filterExpression=e,this},e.prototype.getPresenceTimeout=function(){return this._presenceTimeout},e.prototype.setPresenceTimeout=function(e){return e>=20?this._presenceTimeout=e:(this._presenceTimeout=20,console.log("WARNING: Presence timeout is less than the minimum. Using minimum value: ",this._presenceTimeout)),this.setHeartbeatInterval(this._presenceTimeout/2-1),this},e.prototype.setProxy=function(e){this.proxy=e},e.prototype.getHeartbeatInterval=function(){return this._heartbeatInterval},e.prototype.setHeartbeatInterval=function(e){return this._heartbeatInterval=e,this},e.prototype.getSubscribeTimeout=function(){return this._subscribeRequestTimeout},e.prototype.setSubscribeTimeout=function(e){return this._subscribeRequestTimeout=e,this},e.prototype.getTransactionTimeout=function(){return this._transactionalRequestTimeout},e.prototype.setTransactionTimeout=function(e){return this._transactionalRequestTimeout=e,this},e.prototype.isSendBeaconEnabled=function(){return this._useSendBeacon},e.prototype.setSendBeaconConfig=function(e){return this._useSendBeacon=e,this},e.prototype.getVersion=function(){return"7.2.2"},e.prototype._addPnsdkSuffix=function(e,t){this._PNSDKSuffix[e]=t},e.prototype._getPnsdkSuffix=function(e){var t=this;return Object.keys(this._PNSDKSuffix).reduce((function(n,i){return n+e+t._PNSDKSuffix[i]}),"")},e}();function b(e){var t=e.replace(/==?$/,""),n=Math.floor(t.length/4*3),i=new ArrayBuffer(n),o=new Uint8Array(i),r=0;function a(){var e=t.charAt(r++),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e);if(-1===n)throw new Error("Illegal character at ".concat(r,": ").concat(t.charAt(r-1)));return n}for(var s=0;s<n;s+=3){var l=a(),u=a(),c=a(),d=a(),h=(63&l)<<2|u>>4,p=(15&u)<<4|c>>2,f=(3&c)<<6|d>>0;o[s]=h,64!=c&&(o[s+1]=p),64!=d&&(o[s+2]=f)}return i}var v,y,w,C,x,A=A||function(e,t){var n={},i=n.lib={},o=function(){},r=i.Base={extend:function(e){o.prototype=this;var t=new o;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var o=0;o<e;o++)t[i+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535<n.length)for(o=0;o<e;o+=4)t[i+o>>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i<t;i+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),s=n.enc={},l=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new a.init(n,t/2)}},u=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++)n.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new a.init(n,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,r=this.blockSize,s=o/(4*r);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*r,o=e.min(4*t,o),t){for(var l=0;l<t;l+=r)this._doProcessBlock(i,l);l=i.splice(0,t),n.sigBytes-=o}return new a.init(l,o)},clone:function(){var e=r.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=d.extend({cfg:r.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=n.algo={};return n}(Math);!function(e){for(var t=A,n=(o=t.lib).WordArray,i=o.Hasher,o=t.algo,r=[],a=[],s=function(e){return 4294967296*(e-(0|e))|0},l=2,u=0;64>u;){var c;e:{c=l;for(var d=e.sqrt(c),h=2;h<=d;h++)if(!(c%h)){c=!1;break e}c=!0}c&&(8>u&&(r[u]=s(e.pow(l,.5))),a[u]=s(e.pow(l,1/3)),u++),l++}var p=[];o=o.SHA256=i.extend({_doReset:function(){this._hash=new n.init(r.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],r=n[2],s=n[3],l=n[4],u=n[5],c=n[6],d=n[7],h=0;64>h;h++){if(16>h)p[h]=0|e[t+h];else{var f=p[h-15],g=p[h-2];p[h]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+p[h-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[h-16]}f=d+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&u^~l&c)+a[h]+p[h],g=((i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22))+(i&o^i&r^o&r),d=c,c=u,u=l,l=s+f|0,s=r,r=o,o=i,i=f+g|0}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+c|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(i/4294967296),n[15+(o+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=i._createHelper(o),t.HmacSHA256=i._createHmacHelper(o)}(Math),y=(v=A).enc.Utf8,v.algo.HMAC=v.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=y.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),r=this._iKey=t.clone(),a=o.words,s=r.words,l=0;l<n;l++)a[l]^=1549556828,s[l]^=909522486;o.sigBytes=r.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}}),C=(w=A).lib.WordArray,w.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp(),e=[];for(var o=0;o<n;o+=3)for(var r=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;4>a&&o+.75*a<n;a++)e.push(i.charAt(r>>>6*(3-a)&63));if(t=i.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,n=this._map;(i=n.charAt(64))&&-1!=(i=e.indexOf(i))&&(t=i);for(var i=[],o=0,r=0;r<t;r++)if(r%4){var a=n.indexOf(e.charAt(r-1))<<r%4*2,s=n.indexOf(e.charAt(r))>>>6-r%4*2;i[o>>>2]|=(a|s)<<24-o%4*8,o++}return C.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,n,i,o,r,a){return((e=e+(t&n|~t&i)+o+a)<<r|e>>>32-r)+t}function n(e,t,n,i,o,r,a){return((e=e+(t&i|n&~i)+o+a)<<r|e>>>32-r)+t}function i(e,t,n,i,o,r,a){return((e=e+(t^n^i)+o+a)<<r|e>>>32-r)+t}function o(e,t,n,i,o,r,a){return((e=e+(n^(t|~i))+o+a)<<r|e>>>32-r)+t}for(var r=A,a=(l=r.lib).WordArray,s=l.Hasher,l=r.algo,u=[],c=0;64>c;c++)u[c]=4294967296*e.abs(e.sin(c+1))|0;l=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,r){for(var a=0;16>a;a++){var s=e[l=r+a];e[l]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}a=this._hash.words;var l=e[r+0],c=(s=e[r+1],e[r+2]),d=e[r+3],h=e[r+4],p=e[r+5],f=e[r+6],g=e[r+7],m=e[r+8],b=e[r+9],v=e[r+10],y=e[r+11],w=e[r+12],C=e[r+13],x=e[r+14],A=e[r+15],S=t(S=a[0],_=a[1],T=a[2],k=a[3],l,7,u[0]),k=t(k,S,_,T,s,12,u[1]),T=t(T,k,S,_,c,17,u[2]),_=t(_,T,k,S,d,22,u[3]);S=t(S,_,T,k,h,7,u[4]),k=t(k,S,_,T,p,12,u[5]),T=t(T,k,S,_,f,17,u[6]),_=t(_,T,k,S,g,22,u[7]),S=t(S,_,T,k,m,7,u[8]),k=t(k,S,_,T,b,12,u[9]),T=t(T,k,S,_,v,17,u[10]),_=t(_,T,k,S,y,22,u[11]),S=t(S,_,T,k,w,7,u[12]),k=t(k,S,_,T,C,12,u[13]),T=t(T,k,S,_,x,17,u[14]),S=n(S,_=t(_,T,k,S,A,22,u[15]),T,k,s,5,u[16]),k=n(k,S,_,T,f,9,u[17]),T=n(T,k,S,_,y,14,u[18]),_=n(_,T,k,S,l,20,u[19]),S=n(S,_,T,k,p,5,u[20]),k=n(k,S,_,T,v,9,u[21]),T=n(T,k,S,_,A,14,u[22]),_=n(_,T,k,S,h,20,u[23]),S=n(S,_,T,k,b,5,u[24]),k=n(k,S,_,T,x,9,u[25]),T=n(T,k,S,_,d,14,u[26]),_=n(_,T,k,S,m,20,u[27]),S=n(S,_,T,k,C,5,u[28]),k=n(k,S,_,T,c,9,u[29]),T=n(T,k,S,_,g,14,u[30]),S=i(S,_=n(_,T,k,S,w,20,u[31]),T,k,p,4,u[32]),k=i(k,S,_,T,m,11,u[33]),T=i(T,k,S,_,y,16,u[34]),_=i(_,T,k,S,x,23,u[35]),S=i(S,_,T,k,s,4,u[36]),k=i(k,S,_,T,h,11,u[37]),T=i(T,k,S,_,g,16,u[38]),_=i(_,T,k,S,v,23,u[39]),S=i(S,_,T,k,C,4,u[40]),k=i(k,S,_,T,l,11,u[41]),T=i(T,k,S,_,d,16,u[42]),_=i(_,T,k,S,f,23,u[43]),S=i(S,_,T,k,b,4,u[44]),k=i(k,S,_,T,w,11,u[45]),T=i(T,k,S,_,A,16,u[46]),S=o(S,_=i(_,T,k,S,c,23,u[47]),T,k,l,6,u[48]),k=o(k,S,_,T,g,10,u[49]),T=o(T,k,S,_,x,15,u[50]),_=o(_,T,k,S,p,21,u[51]),S=o(S,_,T,k,w,6,u[52]),k=o(k,S,_,T,d,10,u[53]),T=o(T,k,S,_,v,15,u[54]),_=o(_,T,k,S,s,21,u[55]),S=o(S,_,T,k,m,6,u[56]),k=o(k,S,_,T,A,10,u[57]),T=o(T,k,S,_,f,15,u[58]),_=o(_,T,k,S,C,21,u[59]),S=o(S,_,T,k,h,6,u[60]),k=o(k,S,_,T,y,10,u[61]),T=o(T,k,S,_,c,15,u[62]),_=o(_,T,k,S,b,21,u[63]),a[0]=a[0]+S|0,a[1]=a[1]+_|0,a[2]=a[2]+T|0,a[3]=a[3]+k|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var r=e.floor(i/4294967296);for(n[15+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process(),n=(t=this._hash).words,i=0;4>i;i++)o=n[i],n[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);return t},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),r.MD5=s._createHelper(l),r.HmacMD5=s._createHmacHelper(l)}(Math),function(){var e,t=A,n=(e=t.lib).Base,i=e.WordArray,o=(e=t.algo).EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(s=this.cfg).hasher.create(),o=i.create(),r=o.words,a=s.keySize,s=s.iterations;r.length<a;){l&&n.update(l);var l=n.update(e).finalize(t);n.reset();for(var u=1;u<s;u++)l=n.finalize(l),n.reset();o.concat(l)}return o.sigBytes=4*a,o}});t.EvpKDF=function(e,t,n){return o.create(n).compute(e,t)}}(),A.lib.Cipher||function(e){var t=(p=A).lib,n=t.Base,i=t.WordArray,o=t.BufferedBlockAlgorithm,r=p.enc.Base64,a=p.algo.EvpKDF,s=t.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,i){return("string"==typeof n?f:h).encrypt(e,t,n,i)},decrypt:function(t,n,i){return("string"==typeof n?f:h).decrypt(e,t,n,i)}}}});t.StreamCipher=s.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=p.mode={},u=function(e,t,n){var i=this._iv;i?this._iv=void 0:i=this._prevBlock;for(var o=0;o<n;o++)e[t+o]^=i[o]},c=(t.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();c.Encryptor=c.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;u.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),c.Decryptor=c.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),u.call(this,e,t,i),this._prevBlock=o}}),l=l.CBC=c,c=(p.pad={}).Pkcs7={pad:function(e,t){for(var n,o=(n=(n=4*t)-e.sigBytes%n)<<24|n<<16|n<<8|n,r=[],a=0;a<n;a+=4)r.push(o);n=i.create(r,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},t.BlockCipher=s.extend({cfg:s.cfg.extend({mode:l,padding:c}),reset:function(){s.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=t.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(l=(p.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?i.create([1398893684,1701076831]).concat(e).concat(t):t).toString(r)},parse:function(e){var t=(e=r.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var n=i.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:n})}},t.SerializableCipher=n.extend({cfg:n.extend({format:l}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var o=e.createEncryptor(n,i);return t=o.finalize(t),o=o.cfg,d.create({ciphertext:t,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),p=(p.kdf={}).OpenSSL={execute:function(e,t,n,o){return o||(o=i.random(8)),e=a.create({keySize:t+n}).compute(e,o),n=i.create(e.words.slice(t),4*n),e.sigBytes=4*t,d.create({key:e,iv:n,salt:o})}},f=t.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:p}),encrypt:function(e,t,n,i){return n=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize),i.iv=n.iv,(e=h.encrypt.call(this,e,t,n.key,i)).mixIn(n),e},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),n=i.kdf.execute(n,e.keySize,e.ivSize,t.salt),i.iv=n.iv,h.decrypt.call(this,e,t,n.key,i)}})}(),function(){for(var e=A,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],r=[],a=[],s=[],l=[],u=[],c=[],d=[],h=[],p=[],f=0;256>f;f++)p[f]=128>f?f<<1:f<<1^283;var g=0,m=0;for(f=0;256>f;f++){var b=(b=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&b^99;i[g]=b,o[b]=g;var v=p[g],y=p[v],w=p[y],C=257*p[b]^16843008*b;r[g]=C<<24|C>>>8,a[g]=C<<16|C>>>16,s[g]=C<<8|C>>>24,l[g]=C,C=16843009*w^65537*y^257*v^16843008*g,u[b]=C<<24|C>>>8,c[b]=C<<16|C>>>16,d[b]=C<<8|C>>>24,h[b]=C,g?(g=v^p[p[p[w^v]]],m^=p[p[m]]):g=m=1}var x=[0,1,2,4,8,16,32,64,128,27,54];n=n.AES=t.extend({_doReset:function(){for(var e=(n=this._key).words,t=n.sigBytes/4,n=4*((this._nRounds=t+6)+1),o=this._keySchedule=[],r=0;r<n;r++)if(r<t)o[r]=e[r];else{var a=o[r-1];r%t?6<t&&4==r%t&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=x[r/t|0]<<24),o[r]=o[r-t]^a}for(e=this._invKeySchedule=[],t=0;t<n;t++)r=n-t,a=t%4?o[r]:o[r-4],e[t]=4>t||4>=r?a:u[i[a>>>24]]^c[i[a>>>16&255]]^d[i[a>>>8&255]]^h[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,r,a,s,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,c,d,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,o,r,a,s){for(var l=this._nRounds,u=e[t]^n[0],c=e[t+1]^n[1],d=e[t+2]^n[2],h=e[t+3]^n[3],p=4,f=1;f<l;f++){var g=i[u>>>24]^o[c>>>16&255]^r[d>>>8&255]^a[255&h]^n[p++],m=i[c>>>24]^o[d>>>16&255]^r[h>>>8&255]^a[255&u]^n[p++],b=i[d>>>24]^o[h>>>16&255]^r[u>>>8&255]^a[255&c]^n[p++];h=i[h>>>24]^o[u>>>16&255]^r[c>>>8&255]^a[255&d]^n[p++],u=g,c=m,d=b}g=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^n[p++],m=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^n[p++],b=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^n[p++],h=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[p++],e[t]=g,e[t+1]=m,e[t+2]=b,e[t+3]=h},keySize:8}),e.AES=t._createHelper(n)}(),A.mode.ECB=((x=A.lib.BlockCipherMode.extend()).Encryptor=x.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),x.Decryptor=x.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),x);var S=A;function k(e){var t,n=[];for(t=0;t<e.length;t+=1)n[t/4|0]|=e[t]<<24-8*t;return S.lib.WordArray.create(n,e.length)}var T=function(){function e(e){var t=e.config;this._config=t,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return e.prototype.HMACSHA256=function(e){return S.HmacSHA256(e,this._config.secretKey).toString(S.enc.Base64)},e.prototype.SHA256=function(e){return S.SHA256(e).toString(S.enc.Hex)},e.prototype._parseOptions=function(e){var t=e||{};return t.hasOwnProperty("encryptKey")||(t.encryptKey=this._defaultOptions.encryptKey),t.hasOwnProperty("keyEncoding")||(t.keyEncoding=this._defaultOptions.keyEncoding),t.hasOwnProperty("keyLength")||(t.keyLength=this._defaultOptions.keyLength),t.hasOwnProperty("mode")||(t.mode=this._defaultOptions.mode),-1===this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase())&&(t.keyEncoding=this._defaultOptions.keyEncoding),-1===this._allowedKeyLengths.indexOf(parseInt(t.keyLength,10))&&(t.keyLength=this._defaultOptions.keyLength),-1===this._allowedModes.indexOf(t.mode.toLowerCase())&&(t.mode=this._defaultOptions.mode),t},e.prototype._decodeKey=function(e,t){return"base64"===t.keyEncoding?S.enc.Base64.parse(e):"hex"===t.keyEncoding?S.enc.Hex.parse(e):e},e.prototype._getPaddedKey=function(e,t){return e=this._decodeKey(e,t),t.encryptKey?S.enc.Utf8.parse(this.SHA256(e).slice(0,32)):e},e.prototype._getMode=function(e){return"ecb"===e.mode?S.mode.ECB:S.mode.CBC},e.prototype._getIV=function(e){return"cbc"===e.mode?S.enc.Utf8.parse(this._iv):null},e.prototype._getRandomIV=function(){return S.lib.WordArray.random(16)},e.prototype.encrypt=function(e,t,n){return this._config.customEncrypt?this._config.customEncrypt(e):this.pnEncrypt(e,t,n)},e.prototype.decrypt=function(e,t,n){return this._config.customDecrypt?this._config.customDecrypt(e):this.pnDecrypt(e,t,n)},e.prototype.pnEncrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),o=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var r=this._getRandomIV(),a=S.AES.encrypt(e,o,{iv:r,mode:i}).ciphertext;return r.clone().concat(a.clone()).toString(S.enc.Base64)}var s=this._getIV(n);return S.AES.encrypt(e,o,{iv:s,mode:i}).ciphertext.toString(S.enc.Base64)||e},e.prototype.pnDecrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),o=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var r=k((l=new Uint8ClampedArray(b(e))).slice(0,16)),a=k(l.slice(16));try{var s=S.AES.decrypt({ciphertext:a},o,{iv:r,mode:i}).toString(S.enc.Utf8);return JSON.parse(s)}catch(e){return null}}else{r=this._getIV(n);try{var l=S.enc.Base64.parse(e);return s=S.AES.decrypt({ciphertext:l},o,{iv:r,mode:i}).toString(S.enc.Utf8),JSON.parse(s)}catch(e){return null}}},e}(),_=function(){function e(e){var t=e.timeEndpoint;this._timeEndpoint=t}return e.prototype.onReconnection=function(e){this._reconnectionCallback=e},e.prototype.startPolling=function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)},e.prototype.stopPolling=function(){clearInterval(this._timeTimer)},e.prototype._performTimeLoop=function(){var e=this;this._timeEndpoint((function(t){t.error||(clearInterval(e._timeTimer),e._reconnectionCallback())}))},e}(),E=function(){function e(e){var t=e.config;this.hashHistory=[],this._config=t}return e.prototype.getKey=function(e){var t=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e.payload)).toString(),n=e.publishMetaData.publishTimetoken;return"".concat(n,"-").concat(t)},e.prototype.isDuplicate=function(e){return this.hashHistory.includes(this.getKey(e))},e.prototype.addEntry=function(e){this.hashHistory.length>=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))},e.prototype.clearHistory=function(){this.hashHistory=[]},e}();function O(e){return encodeURIComponent(e).replace(/[!~*'()]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}var P={signPamFromParams:function(e){return function(e){return function(e){var t=[];return Object.keys(e).forEach((function(e){return t.push(e)})),t}(e).sort()}(e).map((function(t){return"".concat(t,"=").concat(O(e[t]))})).join("&")},endsWith:function(e,t){return-1!==e.indexOf(t,this.length-t.length)},createPromise:function(){var e,t;return{promise:new Promise((function(n,i){e=n,t=i})),reject:t,fulfill:e}},encodeString:O},N={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory"},M=function(){function e(e){var t=e.subscribeEndpoint,n=e.leaveEndpoint,i=e.heartbeatEndpoint,o=e.setStateEndpoint,r=e.timeEndpoint,a=e.getFileUrl,s=e.config,l=e.crypto,u=e.listenerManager;this._listenerManager=u,this._config=s,this._leaveEndpoint=n,this._heartbeatEndpoint=i,this._setStateEndpoint=o,this._subscribeEndpoint=t,this._getFileUrl=a,this._crypto=l,this._channels={},this._presenceChannels={},this._heartbeatChannels={},this._heartbeatChannelGroups={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._currentTimetoken=0,this._lastTimetoken=0,this._storedTimetoken=null,this._subscriptionStatusAnnounced=!1,this._isOnline=!0,this._reconnectionManager=new _({timeEndpoint:r}),this._dedupingManager=new E({config:s})}return e.prototype.adaptStateChange=function(e,t){var n=this,i=e.state,o=e.channels,r=void 0===o?[]:o,a=e.channelGroups,s=void 0===a?[]:a;return r.forEach((function(e){e in n._channels&&(n._channels[e].state=i)})),s.forEach((function(e){e in n._channelGroups&&(n._channelGroups[e].state=i)})),this._setStateEndpoint({state:i,channels:r,channelGroups:s},t)},e.prototype.adaptPresenceChange=function(e){var t=this,n=e.connected,i=e.channels,o=void 0===i?[]:i,r=e.channelGroups,a=void 0===r?[]:r;n?(o.forEach((function(e){t._heartbeatChannels[e]={state:{}}})),a.forEach((function(e){t._heartbeatChannelGroups[e]={state:{}}}))):(o.forEach((function(e){e in t._heartbeatChannels&&delete t._heartbeatChannels[e]})),a.forEach((function(e){e in t._heartbeatChannelGroups&&delete t._heartbeatChannelGroups[e]})),!1===this._config.suppressLeaveEvents&&this._leaveEndpoint({channels:o,channelGroups:a},(function(e){t._listenerManager.announceStatus(e)}))),this.reconnect()},e.prototype.adaptSubscribeChange=function(e){var t=this,n=e.timetoken,i=e.channels,o=void 0===i?[]:i,r=e.channelGroups,a=void 0===r?[]:r,s=e.withPresence,l=void 0!==s&&s,u=e.withHeartbeats,c=void 0!==u&&u;this._config.subscribeKey&&""!==this._config.subscribeKey?(n&&(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=n),"0"!==this._currentTimetoken&&0!==this._currentTimetoken&&(this._storedTimetoken=this._currentTimetoken,this._currentTimetoken=0),o.forEach((function(e){t._channels[e]={state:{}},l&&(t._presenceChannels[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannels[e]={}),t._pendingChannelSubscriptions.push(e)})),a.forEach((function(e){t._channelGroups[e]={state:{}},l&&(t._presenceChannelGroups[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannelGroups[e]={}),t._pendingChannelGroupSubscriptions.push(e)})),this._subscriptionStatusAnnounced=!1,this.reconnect()):console&&console.log&&console.log("subscribe key missing; aborting subscribe")},e.prototype.adaptUnsubscribeChange=function(e,t){var n=this,i=e.channels,o=void 0===i?[]:i,r=e.channelGroups,a=void 0===r?[]:r,s=[],l=[];o.forEach((function(e){e in n._channels&&(delete n._channels[e],s.push(e),e in n._heartbeatChannels&&delete n._heartbeatChannels[e]),e in n._presenceChannels&&(delete n._presenceChannels[e],s.push(e))})),a.forEach((function(e){e in n._channelGroups&&(delete n._channelGroups[e],l.push(e),e in n._heartbeatChannelGroups&&delete n._heartbeatChannelGroups[e]),e in n._presenceChannelGroups&&(delete n._presenceChannelGroups[e],l.push(e))})),0===s.length&&0===l.length||(!1!==this._config.suppressLeaveEvents||t||this._leaveEndpoint({channels:s,channelGroups:l},(function(e){e.affectedChannels=s,e.affectedChannelGroups=l,e.currentTimetoken=n._currentTimetoken,e.lastTimetoken=n._lastTimetoken,n._listenerManager.announceStatus(e)})),0===Object.keys(this._channels).length&&0===Object.keys(this._presenceChannels).length&&0===Object.keys(this._channelGroups).length&&0===Object.keys(this._presenceChannelGroups).length&&(this._lastTimetoken=0,this._currentTimetoken=0,this._storedTimetoken=null,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect())},e.prototype.unsubscribeAll=function(e){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()},e)},e.prototype.getHeartbeatChannels=function(){return Object.keys(this._heartbeatChannels)},e.prototype.getHeartbeatChannelGroups=function(){return Object.keys(this._heartbeatChannelGroups)},e.prototype.getSubscribedChannels=function(){return Object.keys(this._channels)},e.prototype.getSubscribedChannelGroups=function(){return Object.keys(this._channelGroups)},e.prototype.reconnect=function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()},e.prototype.disconnect=function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()},e.prototype._registerHeartbeatTimer=function(){this._stopHeartbeatTimer(),0!==this._config.getHeartbeatInterval()&&void 0!==this._config.getHeartbeatInterval()&&(this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval()))},e.prototype._stopHeartbeatTimer=function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)},e.prototype._performHeartbeatLoop=function(){var e=this,t=this.getHeartbeatChannels(),n=this.getHeartbeatChannelGroups(),i={};0===t.length&&0===n.length||(this.getSubscribedChannels().forEach((function(t){var n=e._channels[t].state;Object.keys(n).length&&(i[t]=n)})),this.getSubscribedChannelGroups().forEach((function(t){var n=e._channelGroups[t].state;Object.keys(n).length&&(i[t]=n)})),this._heartbeatEndpoint({channels:t,channelGroups:n,state:i},function(t){t.error&&e._config.announceFailedHeartbeats&&e._listenerManager.announceStatus(t),t.error&&e._config.autoNetworkDetection&&e._isOnline&&(e._isOnline=!1,e.disconnect(),e._listenerManager.announceNetworkDown(),e.reconnect()),!t.error&&e._config.announceSuccessfulHeartbeats&&e._listenerManager.announceStatus(t)}.bind(this)))},e.prototype._startSubscribeLoop=function(){var e=this;this._stopSubscribeLoop();var t={},n=[],i=[];if(Object.keys(this._channels).forEach((function(i){var o=e._channels[i].state;Object.keys(o).length&&(t[i]=o),n.push(i)})),Object.keys(this._presenceChannels).forEach((function(e){n.push("".concat(e,"-pnpres"))})),Object.keys(this._channelGroups).forEach((function(n){var o=e._channelGroups[n].state;Object.keys(o).length&&(t[n]=o),i.push(n)})),Object.keys(this._presenceChannelGroups).forEach((function(e){i.push("".concat(e,"-pnpres"))})),0!==n.length||0!==i.length){var o={channels:n,channelGroups:i,state:t,timetoken:this._currentTimetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(o,this._processSubscribeResponse.bind(this))}},e.prototype._processSubscribeResponse=function(e,t){var n=this;if(e.error){if(e.errorData&&"Aborted"===e.errorData.message)return;e.category===N.PNTimeoutCategory?this._startSubscribeLoop():e.category===N.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this._config.autoNetworkDetection&&this._isOnline&&(this._isOnline=!1,this._listenerManager.announceNetworkDown()),this._reconnectionManager.onReconnection((function(){n._config.autoNetworkDetection&&!n._isOnline&&(n._isOnline=!0,n._listenerManager.announceNetworkUp()),n.reconnect(),n._subscriptionStatusAnnounced=!0;var t={category:N.PNReconnectedCategory,operation:e.operation,lastTimetoken:n._lastTimetoken,currentTimetoken:n._currentTimetoken};n._listenerManager.announceStatus(t)})),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(e)):e.category===N.PNBadRequestCategory?(this._stopHeartbeatTimer(),this._listenerManager.announceStatus(e)):this._listenerManager.announceStatus(e)}else{if(this._storedTimetoken?(this._currentTimetoken=this._storedTimetoken,this._storedTimetoken=null):(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=t.metadata.timetoken),!this._subscriptionStatusAnnounced){var r={};r.category=N.PNConnectedCategory,r.operation=e.operation,r.affectedChannels=this._pendingChannelSubscriptions,r.subscribedChannels=this.getSubscribedChannels(),r.affectedChannelGroups=this._pendingChannelGroupSubscriptions,r.lastTimetoken=this._lastTimetoken,r.currentTimetoken=this._currentTimetoken,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(r),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var a=t.messages||[],s=this._config,l=s.requestMessageCountThreshold,u=s.dedupeOnSubscribe;if(l&&a.length>=l){var c={};c.category=N.PNRequestMessageCountExceededCategory,c.operation=e.operation,this._listenerManager.announceStatus(c)}a.forEach((function(e){var t=e.channel,r=e.subscriptionMatch,a=e.publishMetaData;if(t===r&&(r=null),u){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}if(P.endsWith(e.channel,"-pnpres"))(g={channel:null,subscription:null}).actualChannel=null!=r?t:null,g.subscribedChannel=null!=r?r:t,t&&(g.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(g.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),g.action=e.payload.action,g.state=e.payload.data,g.timetoken=a.publishTimetoken,g.occupancy=e.payload.occupancy,g.uuid=e.payload.uuid,g.timestamp=e.payload.timestamp,e.payload.join&&(g.join=e.payload.join),e.payload.leave&&(g.leave=e.payload.leave),e.payload.timeout&&(g.timeout=e.payload.timeout),n._listenerManager.announcePresence(g);else if(1===e.messageType)(g={channel:null,subscription:null}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,e.userMetadata&&(g.userMetadata=e.userMetadata),g.message=e.payload,n._listenerManager.announceSignal(g);else if(2===e.messageType){if((g={channel:null,subscription:null}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,e.userMetadata&&(g.userMetadata=e.userMetadata),g.message={event:e.payload.event,type:e.payload.type,data:e.payload.data},n._listenerManager.announceObjects(g),"uuid"===e.payload.type){var s=n._renameChannelField(g);n._listenerManager.announceUser(i(i({},s),{message:i(i({},s.message),{event:n._renameEvent(s.message.event),type:"user"})}))}else if("channel"===e.payload.type)s=n._renameChannelField(g),n._listenerManager.announceSpace(i(i({},s),{message:i(i({},s.message),{event:n._renameEvent(s.message.event),type:"space"})}));else if("membership"===e.payload.type){var l=(s=n._renameChannelField(g)).message.data,c=l.uuid,d=l.channel,h=o(l,["uuid","channel"]);h.user=c,h.space=d,n._listenerManager.announceMembership(i(i({},s),{message:i(i({},s.message),{event:n._renameEvent(s.message.event),data:h})}))}}else if(3===e.messageType)(g={}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,g.data={messageTimetoken:e.payload.data.messageTimetoken,actionTimetoken:e.payload.data.actionTimetoken,type:e.payload.data.type,uuid:e.issuingClientId,value:e.payload.data.value},g.event=e.payload.event,n._listenerManager.announceMessageAction(g);else if(4===e.messageType){(g={}).channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId;var p=e.payload;if(n._config.cipherKey){var f=n._crypto.decrypt(e.payload);"object"==typeof f&&null!==f&&(p=f)}e.userMetadata&&(g.userMetadata=e.userMetadata),g.message=p.message,g.file={id:p.file.id,name:p.file.name,url:n._getFileUrl({id:p.file.id,name:p.file.name,channel:t})},n._listenerManager.announceFile(g)}else{var g;(g={channel:null,subscription:null}).actualChannel=null!=r?t:null,g.subscribedChannel=null!=r?r:t,g.channel=t,g.subscription=r,g.timetoken=a.publishTimetoken,g.publisher=e.issuingClientId,e.userMetadata&&(g.userMetadata=e.userMetadata),n._config.cipherKey?g.message=n._crypto.decrypt(e.payload):g.message=e.payload,n._listenerManager.announceMessage(g)}})),this._region=t.metadata.region,this._startSubscribeLoop()}},e.prototype._stopSubscribeLoop=function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)},e.prototype._renameEvent=function(e){return"set"===e?"updated":"removed"},e.prototype._renameChannelField=function(e){var t=e.channel,n=o(e,["channel"]);return n.spaceId=t,n},e}(),I={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNDeleteMessagesOperation:"PNDeleteMessagesOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNMessageCounts:"PNMessageCountsOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNSignalOperation:"PNSignalOperation",PNAddMessageActionOperation:"PNAddActionOperation",PNRemoveMessageActionOperation:"PNRemoveMessageActionOperation",PNGetMessageActionsOperation:"PNGetMessageActionsOperation",PNCreateUserOperation:"PNCreateUserOperation",PNUpdateUserOperation:"PNUpdateUserOperation",PNDeleteUserOperation:"PNDeleteUserOperation",PNGetUserOperation:"PNGetUsersOperation",PNGetUsersOperation:"PNGetUsersOperation",PNCreateSpaceOperation:"PNCreateSpaceOperation",PNUpdateSpaceOperation:"PNUpdateSpaceOperation",PNDeleteSpaceOperation:"PNDeleteSpaceOperation",PNGetSpaceOperation:"PNGetSpacesOperation",PNGetSpacesOperation:"PNGetSpacesOperation",PNGetMembersOperation:"PNGetMembersOperation",PNUpdateMembersOperation:"PNUpdateMembersOperation",PNGetMembershipsOperation:"PNGetMembershipsOperation",PNUpdateMembershipsOperation:"PNUpdateMembershipsOperation",PNListFilesOperation:"PNListFilesOperation",PNGenerateUploadUrlOperation:"PNGenerateUploadUrlOperation",PNPublishFileOperation:"PNPublishFileOperation",PNGetFileUrlOperation:"PNGetFileUrlOperation",PNDownloadFileOperation:"PNDownloadFileOperation",PNGetAllUUIDMetadataOperation:"PNGetAllUUIDMetadataOperation",PNGetUUIDMetadataOperation:"PNGetUUIDMetadataOperation",PNSetUUIDMetadataOperation:"PNSetUUIDMetadataOperation",PNRemoveUUIDMetadataOperation:"PNRemoveUUIDMetadataOperation",PNGetAllChannelMetadataOperation:"PNGetAllChannelMetadataOperation",PNGetChannelMetadataOperation:"PNGetChannelMetadataOperation",PNSetChannelMetadataOperation:"PNSetChannelMetadataOperation",PNRemoveChannelMetadataOperation:"PNRemoveChannelMetadataOperation",PNSetMembersOperation:"PNSetMembersOperation",PNSetMembershipsOperation:"PNSetMembershipsOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerGrantToken:"PNAccessManagerGrantToken",PNAccessManagerAudit:"PNAccessManagerAudit",PNAccessManagerRevokeToken:"PNAccessManagerRevokeToken",PNHandshakeOperation:"PNHandshakeOperation",PNReceiveMessagesOperation:"PNReceiveMessagesOperation"},D=function(){function e(e){this._maximumSamplesCount=100,this._trackedLatencies={},this._latencies={},this._maximumSamplesCount=e.maximumSamplesCount||this._maximumSamplesCount}return e.prototype.operationsLatencyForRequest=function(){var e=this,t={};return Object.keys(this._latencies).forEach((function(n){var i=e._latencies[n],o=e._averageLatency(i);o>0&&(t["l_".concat(n)]=o)})),t},e.prototype.startLatencyMeasure=function(e,t){e!==I.PNSubscribeOperation&&t&&(this._trackedLatencies[t]=Date.now())},e.prototype.stopLatencyMeasure=function(e,t){if(e!==I.PNSubscribeOperation&&t){var n=this._endpointName(e),i=this._latencies[n],o=this._trackedLatencies[t];i||(this._latencies[n]=[],i=this._latencies[n]),i.push(Date.now()-o),i.length>this._maximumSamplesCount&&i.splice(0,i.length-this._maximumSamplesCount),delete this._trackedLatencies[t]}},e.prototype._averageLatency=function(e){return Math.floor(e.reduce((function(e,t){return e+t}),0)/e.length)},e.prototype._endpointName=function(e){var t=null;switch(e){case I.PNPublishOperation:t="pub";break;case I.PNSignalOperation:t="sig";break;case I.PNHistoryOperation:case I.PNFetchMessagesOperation:case I.PNDeleteMessagesOperation:case I.PNMessageCounts:t="hist";break;case I.PNUnsubscribeOperation:case I.PNWhereNowOperation:case I.PNHereNowOperation:case I.PNHeartbeatOperation:case I.PNSetStateOperation:case I.PNGetStateOperation:t="pres";break;case I.PNAddChannelsToGroupOperation:case I.PNRemoveChannelsFromGroupOperation:case I.PNChannelGroupsOperation:case I.PNRemoveGroupOperation:case I.PNChannelsForGroupOperation:t="cg";break;case I.PNPushNotificationEnabledChannelsOperation:case I.PNRemoveAllPushNotificationsOperation:t="push";break;case I.PNCreateUserOperation:case I.PNUpdateUserOperation:case I.PNDeleteUserOperation:case I.PNGetUserOperation:case I.PNGetUsersOperation:case I.PNCreateSpaceOperation:case I.PNUpdateSpaceOperation:case I.PNDeleteSpaceOperation:case I.PNGetSpaceOperation:case I.PNGetSpacesOperation:case I.PNGetMembersOperation:case I.PNUpdateMembersOperation:case I.PNGetMembershipsOperation:case I.PNUpdateMembershipsOperation:t="obj";break;case I.PNAddMessageActionOperation:case I.PNRemoveMessageActionOperation:case I.PNGetMessageActionsOperation:t="msga";break;case I.PNAccessManagerGrant:case I.PNAccessManagerAudit:t="pam";break;case I.PNAccessManagerGrantToken:case I.PNAccessManagerRevokeToken:t="pamv3";break;default:t="time"}return t},e}(),U=function(){function e(e,t,n){this._payload=e,this._setDefaultPayloadStructure(),this.title=t,this.body=n}return Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this._title=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{set:function(e){this._subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{set:function(e){this._body=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{set:function(e){this._badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{set:function(e){this._sound=e},enumerable:!1,configurable:!0}),e.prototype._setDefaultPayloadStructure=function(){},e.prototype.toObject=function(){return{}},e}(),L=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"configurations",{set:function(e){e&&e.length&&(this._configurations=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.aps},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.aps.alert.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){e&&e.length&&(this._payload.aps.alert.subtitle=e,this._subtitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.aps.alert.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this._badge},set:function(e){null!=e&&(this._payload.aps.badge=e,this._badge=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.aps.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.aps={alert:{}}},n.prototype.toObject=function(){var e=this,t=i({},this._payload),n=t.aps,o=n.alert;if(this._isSilent&&(n["content-available"]=1),"apns2"===this._apnsPushType){if(!this._configurations||!this._configurations.length)throw new ReferenceError("APNS2 configuration is missing");var r=[];this._configurations.forEach((function(t){r.push(e._objectFromAPNS2Configuration(t))})),r.length&&(t.pn_push=r)}return o&&Object.keys(o).length||delete n.alert,this._isSilent&&(delete n.alert,delete n.badge,delete n.sound,o={}),this._isSilent||Object.keys(o).length?t:null},n.prototype._objectFromAPNS2Configuration=function(e){var t=this;if(!e.targets||!e.targets.length)throw new ReferenceError("At least one APNS2 target should be provided");var n=[];e.targets.forEach((function(e){n.push(t._objectFromAPNSTarget(e))}));var i=e.collapseId,o=e.expirationDate,r={auth_method:"token",targets:n,version:"v2"};return i&&i.length&&(r.collapse_id=i),o&&(r.expiration=o.toISOString()),r},n.prototype._objectFromAPNSTarget=function(e){if(!e.topic||!e.topic.length)throw new TypeError("Target 'topic' undefined.");var t=e.topic,n=e.environment,i=void 0===n?"development":n,o=e.excludedDevices,r=void 0===o?[]:o,a={topic:t,environment:i};return r.length&&(a.excluded_devices=r),a},n}(U),B=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"backContent",{get:function(){return this._backContent},set:function(e){e&&e.length&&(this._payload.back_content=e,this._backContent=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"backTitle",{get:function(){return this._backTitle},set:function(e){e&&e.length&&(this._payload.back_title=e,this._backTitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},set:function(e){null!=e&&(this._payload.count=e,this._count=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._type},set:function(e){e&&e.length&&(this._payload.type=e,this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this.backTitle},set:function(e){this.backTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this.backContent},set:function(e){this.backContent=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),n.prototype.toObject=function(){return Object.keys(this._payload).length?i({},this._payload):null},n}(U),R=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.notification},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this._payload.data},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.notification.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.notification.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.notification.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"icon",{get:function(){return this._icon},set:function(e){e&&e.length&&(this._payload.notification.icon=e,this._icon=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tag",{get:function(){return this._tag},set:function(e){e&&e.length&&(this._payload.notification.tag=e,this._tag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.notification={},this._payload.data={}},n.prototype.toObject=function(){var e=i({},this._payload.data),t=null,n={};if(Object.keys(this._payload).length>2){var r=this._payload;r.notification,r.data;var a=o(r,["notification","data"]);e=i(i({},e),a)}return this._isSilent?e.notification=this._payload.notification:t=this._payload.notification,Object.keys(e).length&&(n.data=e),t&&Object.keys(t).length&&(n.notification=t),Object.keys(n).length?n:null},n}(U),j=function(){function e(e,t){this._payload={apns:{},mpns:{},fcm:{}},this._title=e,this._body=t,this.apns=new L(this._payload.apns,e,t),this.mpns=new B(this._payload.mpns,e,t),this.fcm=new R(this._payload.fcm,e,t)}return Object.defineProperty(e.prototype,"debugging",{set:function(e){this._debugging=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){this._subtitle=e,this.apns.subtitle=e,this.mpns.subtitle=e,this.fcm.subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{get:function(){return this._badge},set:function(e){this._badge=e,this.apns.badge=e,this.mpns.badge=e,this.fcm.badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{get:function(){return this._sound},set:function(e){this._sound=e,this.apns.sound=e,this.mpns.sound=e,this.fcm.sound=e},enumerable:!1,configurable:!0}),e.prototype.buildPayload=function(e){var t={};if(e.includes("apns")||e.includes("apns2")){this.apns._apnsPushType=e.includes("apns")?"apns":"apns2";var n=this.apns.toObject();n&&Object.keys(n).length&&(t.pn_apns=n)}if(e.includes("mpns")){var i=this.mpns.toObject();i&&Object.keys(i).length&&(t.pn_mpns=i)}if(e.includes("fcm")){var o=this.fcm.toObject();o&&Object.keys(o).length&&(t.pn_gcm=o)}return Object.keys(t).length&&this._debugging&&(t.pn_debug=!0),t},e}(),H=function(){function e(){this._listeners=[]}return e.prototype.addListener=function(e){this._listeners.push(e)},e.prototype.removeListener=function(e){var t=[];this._listeners.forEach((function(n){n!==e&&t.push(n)})),this._listeners=t},e.prototype.removeAllListeners=function(){this._listeners=[]},e.prototype.announcePresence=function(e){this._listeners.forEach((function(t){t.presence&&t.presence(e)}))},e.prototype.announceStatus=function(e){this._listeners.forEach((function(t){t.status&&t.status(e)}))},e.prototype.announceMessage=function(e){this._listeners.forEach((function(t){t.message&&t.message(e)}))},e.prototype.announceSignal=function(e){this._listeners.forEach((function(t){t.signal&&t.signal(e)}))},e.prototype.announceMessageAction=function(e){this._listeners.forEach((function(t){t.messageAction&&t.messageAction(e)}))},e.prototype.announceFile=function(e){this._listeners.forEach((function(t){t.file&&t.file(e)}))},e.prototype.announceObjects=function(e){this._listeners.forEach((function(t){t.objects&&t.objects(e)}))},e.prototype.announceUser=function(e){this._listeners.forEach((function(t){t.user&&t.user(e)}))},e.prototype.announceSpace=function(e){this._listeners.forEach((function(t){t.space&&t.space(e)}))},e.prototype.announceMembership=function(e){this._listeners.forEach((function(t){t.membership&&t.membership(e)}))},e.prototype.announceNetworkUp=function(){var e={};e.category=N.PNNetworkUpCategory,this.announceStatus(e)},e.prototype.announceNetworkDown=function(){var e={};e.category=N.PNNetworkDownCategory,this.announceStatus(e)},e}(),F=function(){function e(e,t){this._config=e,this._cbor=t}return e.prototype.setToken=function(e){e&&e.length>0?this._token=e:this._token=void 0},e.prototype.getToken=function(){return this._token},e.prototype.extractPermissions=function(e){var t={read:!1,write:!1,manage:!1,delete:!1,get:!1,update:!1,join:!1};return 128==(128&e)&&(t.join=!0),64==(64&e)&&(t.update=!0),32==(32&e)&&(t.get=!0),8==(8&e)&&(t.delete=!0),4==(4&e)&&(t.manage=!0),2==(2&e)&&(t.write=!0),1==(1&e)&&(t.read=!0),t},e.prototype.parseToken=function(e){var t=this,n=this._cbor.decodeToken(e);if(void 0!==n){var i=n.res.uuid?Object.keys(n.res.uuid):[],o=Object.keys(n.res.chan),r=Object.keys(n.res.grp),a=n.pat.uuid?Object.keys(n.pat.uuid):[],s=Object.keys(n.pat.chan),l=Object.keys(n.pat.grp),u={version:n.v,timestamp:n.t,ttl:n.ttl,authorized_uuid:n.uuid},c=i.length>0,d=o.length>0,h=r.length>0;(c||d||h)&&(u.resources={},c&&(u.resources.uuids={},i.forEach((function(e){u.resources.uuids[e]=t.extractPermissions(n.res.uuid[e])}))),d&&(u.resources.channels={},o.forEach((function(e){u.resources.channels[e]=t.extractPermissions(n.res.chan[e])}))),h&&(u.resources.groups={},r.forEach((function(e){u.resources.groups[e]=t.extractPermissions(n.res.grp[e])}))));var p=a.length>0,f=s.length>0,g=l.length>0;return(p||f||g)&&(u.patterns={},p&&(u.patterns.uuids={},a.forEach((function(e){u.patterns.uuids[e]=t.extractPermissions(n.pat.uuid[e])}))),f&&(u.patterns.channels={},s.forEach((function(e){u.patterns.channels[e]=t.extractPermissions(n.pat.chan[e])}))),g&&(u.patterns.groups={},l.forEach((function(e){u.patterns.groups[e]=t.extractPermissions(n.pat.grp[e])})))),Object.keys(n.meta).length>0&&(u.meta=n.meta),u.signature=n.sig,u}},e}(),z=function(e){function n(t,n){var i=this.constructor,o=e.call(this,t)||this;return o.name=o.constructor.name,o.status=n,o.message=t,Object.setPrototypeOf(o,i.prototype),o}return t(n,e),n}(Error);function $(e){return(t={message:e}).type="validationError",t.error=!0,t;var t}function Q(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.usePatch&&e.usePatch(t,n)?e.patchURL(t,n):e.useGetFile&&e.useGetFile(t,n)?e.getFileURL(t,n):e.getURL(t,n)}function G(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-".concat(e.sdkFamily);e.partnerId&&(t+="-".concat(e.partnerId)),t+="/".concat(e.getVersion());var n=e._getPnsdkSuffix(" ");return n.length>0&&(t+=n),t}function q(e,t,n){return t.usePost&&t.usePost(e,n)?"POST":t.usePatch&&t.usePatch(e,n)?"PATCH":t.useDelete&&t.useDelete(e,n)?"DELETE":t.useGetFile&&t.useGetFile(e,n)?"GETFILE":"GET"}function W(e,t,n,i,o){var r=e.config,a=e.crypto,s=q(e,o,i);n.timestamp=Math.floor((new Date).getTime()/1e3),"PNPublishOperation"===o.getOperation()&&o.usePost&&o.usePost(e,i)&&(s="GET"),"GETFILE"===s&&(s="GET");var l="".concat(s,"\n").concat(r.publishKey,"\n").concat(t,"\n").concat(P.signPamFromParams(n),"\n");if("POST"===s)l+="string"==typeof(u=o.postPayload(e,i))?u:JSON.stringify(u);else if("PATCH"===s){var u;l+="string"==typeof(u=o.patchPayload(e,i))?u:JSON.stringify(u)}var c="v2.".concat(a.HMACSHA256(l));c=(c=(c=c.replace(/\+/g,"-")).replace(/\//g,"_")).replace(/=+$/,""),n.signature=c}function V(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=e.networking,a=e.config,s=e.telemetryManager,l=e.tokenManager,u=g(),c=null,d=null,h={};t.getOperation()===I.PNTimeOperation||t.getOperation()===I.PNChannelGroupsOperation?c=n[0]:(h=n[0],c=n[1]),"undefined"==typeof Promise||c||(d=P.createPromise());var p=t.validateParams(e,h);if(p)return c?c($(p)):d?(d.reject(new z("Validation failed, check status for details",$(p))),d.promise):void 0;var f,m=t.prepareParams(e,h),b=Q(t,e,h),v={url:b,operation:t.getOperation(),timeout:t.getRequestTimeout(e),headers:t.getRequestHeaders?t.getRequestHeaders():{},ignoreBody:"function"==typeof t.ignoreBody&&t.ignoreBody(e),forceBuffered:"function"==typeof t.forceBuffered?t.forceBuffered(e,h):null,abortSignal:"function"==typeof t.getAbortSignal?t.getAbortSignal(e,h):null};m.uuid=a.UUID,m.pnsdk=G(a);var y=s.operationsLatencyForRequest();if(Object.keys(y).length&&(m=i(i({},m),y)),a.useInstanceId&&(m.instanceid=a.instanceId),a.useRequestId&&(m.requestid=u),t.isAuthSupported()){var w=l.getToken()||a.getAuthKey();w&&(m.auth=w)}a.secretKey&&W(e,b,m,h,t);var C=function(n,i){if(n.error)return t.handleError&&t.handleError(e,h,n),void(c?c(n):d&&d.reject(new z("PubNub call failed, check status for details",n)));s.stopLatencyMeasure(t.getOperation(),u);var o=t.handleResponse(e,i,h);"function"!=typeof(null==o?void 0:o.then)&&(o=Promise.resolve(o)),o.then((function(e){c?c(n,e):d&&d.fulfill(e)})).catch((function(e){if(c){var n=e;t.getOperation()===I.PNSubscribeOperation&&(n={statusCode:400,error:!0,operation:t.getOperation(),errorData:e,category:N.PNUnknownCategory}),c(n,null)}else d&&d.reject(new z("PubNub call failed, check status for details",e))}))};if(s.startLatencyMeasure(t.getOperation(),u),"POST"===q(e,t,h)){var x=t.postPayload(e,h);f=r.POST(m,x,v,C)}else"PATCH"===q(e,t,h)?(x=t.patchPayload(e,h),f=r.PATCH(m,x,v,C)):f="DELETE"===q(e,t,h)?r.DELETE(m,v,C):"GETFILE"===q(e,t,h)?r.GETFILE(m,v,C):r.GET(m,v,C);return t.getOperation()===I.PNSubscribeOperation?f:d?d.promise:void 0}var Y=Object.freeze({__proto__:null,getOperation:function(){return I.PNAddChannelsToGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,o=e.config;return i?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),K=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveChannelsFromGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,o=e.config;return i?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),X=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n),"/remove")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},handleResponse:function(){return{}}}),Z=Object.freeze({__proto__:null,getOperation:function(){return I.PNChannelGroupsOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v1/channel-registration/sub-key/".concat(t.subscribeKey,"/channel-group")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{groups:t.payload.groups}}}),J=Object.freeze({__proto__:null,getOperation:function(){return I.PNChannelsForGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{channels:t.payload.channels}}}),ee=Object.freeze({__proto__:null,getOperation:function(){return I.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.channels,r=t.topic,a=e.config;return n?i?"apns2"!==i||r?o&&0!==o.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.channels,r=void 0===o?[]:o,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,add:r.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),te=Object.freeze({__proto__:null,getOperation:function(){return I.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.channels,r=t.topic,a=e.config;return n?i?"apns2"!==i||r?o&&0!==o.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.channels,r=void 0===o?[]:o,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,remove:r.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),ne=Object.freeze({__proto__:null,getOperation:function(){return I.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.topic,r=e.config;return n?i?"apns2"!==i||o?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.environment,r=void 0===o?"development":o,a=t.topic,s={type:n};return"apns2"===n&&delete(s=i(i({},s),{environment:r,topic:a})).type,s},handleResponse:function(e,t){return{channels:t}}}),ie=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveAllPushNotificationsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,o=t.topic,r=e.config;return n?i?"apns2"!==i||o?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,o=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(o.subscribeKey,"/devices-apns2/").concat(n,"/remove"):"/v1/push/sub-key/".concat(o.subscribeKey,"/devices/").concat(n,"/remove")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,o=t.environment,r=void 0===o?"development":o,a=t.topic,s={type:n};return"apns2"===n&&delete(s=i(i({},s),{environment:r,topic:a})).type,s},handleResponse:function(){return{}}}),oe=Object.freeze({__proto__:null,getOperation:function(){return I.PNUnsubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(r),"/leave")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,o={};return i.length>0&&(o["channel-group"]=i.join(",")),o},handleResponse:function(){return{}}}),re=Object.freeze({__proto__:null,getOperation:function(){return I.PNWhereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,o=void 0===i?n.UUID:i;return"/v2/presence/sub-key/".concat(n.subscribeKey,"/uuid/").concat(P.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}}),ae=Object.freeze({__proto__:null,getOperation:function(){return I.PNHeartbeatOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(r),"/heartbeat")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,o=t.state,r=void 0===o?{}:o,a=e.config,s={};return i.length>0&&(s["channel-group"]=i.join(",")),s.state=JSON.stringify(r),s.heartbeat=a.getPresenceTimeout(),s},handleResponse:function(){return{}}}),se=Object.freeze({__proto__:null,getOperation:function(){return I.PNGetStateOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,o=void 0===i?n.UUID:i,r=t.channels,a=void 0===r?[]:r,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(s),"/uuid/").concat(o)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,o={};return i.length>0&&(o["channel-group"]=i.join(",")),o},handleResponse:function(e,t,n){var i=n.channels,o=void 0===i?[]:i,r=n.channelGroups,a=void 0===r?[]:r,s={};return 1===o.length&&0===a.length?s[o[0]]=t.payload:s=t.payload,{channels:s}}}),le=Object.freeze({__proto__:null,getOperation:function(){return I.PNSetStateOperation},validateParams:function(e,t){var n=e.config,i=t.state,o=t.channels,r=void 0===o?[]:o,a=t.channelGroups,s=void 0===a?[]:a;return i?n.subscribeKey?0===r.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(r),"/uuid/").concat(P.encodeString(n.UUID),"/data")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.state,i=t.channelGroups,o=void 0===i?[]:i,r={};return r.state=JSON.stringify(n),o.length>0&&(r["channel-group"]=o.join(",")),r},handleResponse:function(e,t){return{state:t.payload}}}),ue=Object.freeze({__proto__:null,getOperation:function(){return I.PNHereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=t.channelGroups,a=void 0===r?[]:r,s="/v2/presence/sub-key/".concat(n.subscribeKey);if(o.length>0||a.length>0){var l=o.length>0?o.join(","):",";s+="/channel/".concat(P.encodeString(l))}return s},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,o=void 0===n?[]:n,r=t.includeUUIDs,a=void 0===r||r,s=t.includeState,l=void 0!==s&&s,u=t.queryParameters,c=void 0===u?{}:u,d={};return a||(d.disable_uuids=1),l&&(d.state=1),o.length>0&&(d["channel-group"]=o.join(",")),i(i({},d),c)},handleResponse:function(e,t,n){var i=n.channels,o=void 0===i?[]:i,r=n.channelGroups,a=void 0===r?[]:r,s=n.includeUUIDs,l=void 0===s||s,u=n.includeState,c=void 0!==u&&u;return o.length>1||a.length>0||0===a.length&&0===o.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach((function(n){var i=t.payload.channels[n],o=[];return e.channels[n]={occupants:o,name:n,occupancy:i.occupancy},l&&i.uuids.forEach((function(e){c?o.push({state:e.state,uuid:e.uuid}):o.push({state:null,uuid:e})})),e})),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[o[0]]={occupants:n,name:o[0],occupancy:t.occupancy},l&&t.uuids&&t.uuids.forEach((function(e){c?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})})),e}()},handleError:function(e,t,n){402!==n.statusCode||this.getURL(e,t).includes("channel")||(n.errorData.message="You have tried to perform a Global Here Now operation, your keyset configuration does not support that. Please provide a channel, or enable the Global Here Now feature from the Portal.")}}),ce=Object.freeze({__proto__:null,getOperation:function(){return I.PNAddMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.action,o=t.channel;return t.messageTimetoken?n.subscribeKey?o?i?i.value?i.type?i.type.length>15?"Action.type value exceed maximum length of 15":void 0:"Missing Action.type":"Missing Action.value":"Missing Action":"Missing message channel":"Missing Subscribe Key":"Missing message timetoken"},usePost:function(){return!0},postURL:function(e,t){var n=e.config,i=t.channel,o=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(i),"/message/").concat(o)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},getRequestHeaders:function(){return{"Content-Type":"application/json"}},isAuthSupported:function(){return!0},prepareParams:function(){return{}},postPayload:function(e,t){return t.action},handleResponse:function(e,t){return{data:t.data}}}),de=Object.freeze({__proto__:null,getOperation:function(){return I.PNRemoveMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.channel,o=t.actionTimetoken;return t.messageTimetoken?o?n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key":"Missing action timetoken":"Missing message timetoken"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config,i=t.channel,o=t.actionTimetoken,r=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(i),"/message/").concat(r,"/action/").concat(o)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{data:t.data}}}),he=Object.freeze({__proto__:null,getOperation:function(){return I.PNGetMessageActionsOperation},validateParams:function(e,t){var n=e.config,i=t.channel;return n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channel;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(P.encodeString(i))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.limit,i=t.start,o=t.end,r={};return n&&(r.limit=n),i&&(r.start=i),o&&(r.end=o),r},handleResponse:function(e,t){var n={data:t.data,start:null,end:null};return n.data.length&&(n.end=n.data[n.data.length-1].actionTimetoken,n.start=n.data[0].actionTimetoken),n}}),pe={getOperation:function(){return I.PNListFilesOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"channel can't be empty"},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/files")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.limit&&(n.limit=t.limit),t.next&&(n.next=t.next),n},handleResponse:function(e,t){return{status:t.status,data:t.data,next:t.next,count:t.count}}},fe={getOperation:function(){return I.PNGenerateUploadUrlOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?void 0:"name can't be empty":"channel can't be empty"},usePost:function(){return!0},postURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/generate-upload-url")},postPayload:function(e,t){return{name:t.name}},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data,file_upload_request:t.file_upload_request}}},ge={getOperation:function(){return I.PNPublishFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.fileId)?(null==t?void 0:t.fileName)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},getURL:function(e,t){var n=e.config,i=n.publishKey,o=n.subscribeKey,r=function(e,t){var n=e.crypto,i=e.config,o=JSON.stringify(t);return i.cipherKey&&(o=n.encrypt(o),o=JSON.stringify(o)),o||""}(e,{message:t.message,file:{name:t.fileName,id:t.fileId}});return"/v1/files/publish-file/".concat(i,"/").concat(o,"/0/").concat(P.encodeString(t.channel),"/0/").concat(P.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.ttl&&(n.ttl=t.ttl),void 0!==t.storeInHistory&&(n.store=t.storeInHistory?"1":"0"),t.meta&&"object"==typeof t.meta&&(n.meta=JSON.stringify(t.meta)),n},handleResponse:function(e,t){return{timetoken:t[2]}}},me=function(e){var t=function(e){var t=this,n=e.generateUploadUrl,i=e.publishFile,o=e.modules,s=o.PubNubFile,l=o.config,u=o.cryptography,c=o.networking;return function(e){var o=e.channel,d=e.file,h=e.message,p=e.cipherKey,f=e.meta,g=e.ttl,m=e.storeInHistory;return r(t,void 0,void 0,(function(){var e,t,r,b,v,y,w,C,x,A,S,k,T,_,E,O,P,N,M,I,D,U,L,B,R,j,H,F;return a(this,(function(a){switch(a.label){case 0:if(!o)throw new z("Validation failed, check status for details",$("channel can't be empty"));if(!d)throw new z("Validation failed, check status for details",$("file can't be empty"));return e=s.create(d),[4,n({channel:o,name:e.name})];case 1:return t=a.sent(),r=t.file_upload_request,b=r.url,v=r.form_fields,y=t.data,w=y.id,C=y.name,s.supportsEncryptFile&&(null!=p?p:l.cipherKey)?[4,u.encryptFile(null!=p?p:l.cipherKey,e,s)]:[3,3];case 2:e=a.sent(),a.label=3;case 3:x=v,e.mimeType&&(x=v.map((function(t){return"Content-Type"===t.key?{key:t.key,value:e.mimeType}:t}))),a.label=4;case 4:return a.trys.push([4,18,,22]),s.supportsFileUri&&d.uri?(k=(S=c).POSTFILE,T=[b,x],[4,e.toFileUri()]):[3,7];case 5:return[4,k.apply(S,T.concat([a.sent()]))];case 6:return A=a.sent(),[3,17];case 7:return s.supportsFile?(E=(_=c).POSTFILE,O=[b,x],[4,e.toFile()]):[3,10];case 8:return[4,E.apply(_,O.concat([a.sent()]))];case 9:return A=a.sent(),[3,17];case 10:return s.supportsBuffer?(N=(P=c).POSTFILE,M=[b,x],[4,e.toBuffer()]):[3,13];case 11:return[4,N.apply(P,M.concat([a.sent()]))];case 12:return A=a.sent(),[3,17];case 13:return s.supportsBlob?(D=(I=c).POSTFILE,U=[b,x],[4,e.toBlob()]):[3,16];case 14:return[4,D.apply(I,U.concat([a.sent()]))];case 15:return A=a.sent(),[3,17];case 16:throw new Error("Unsupported environment");case 17:return[3,22];case 18:return(L=a.sent()).response?[4,(Q=L.response,new Promise((function(e){var t="";Q.on("data",(function(e){t+=e.toString("utf8")})),Q.on("end",(function(){e(t)}))})))]:[3,20];case 19:throw B=a.sent(),R=/<Message>(.*)<\/Message>/gi.exec(B),new z(R?"Upload to bucket failed: ".concat(R[1]):"Upload to bucket failed.",L);case 20:throw new z("Upload to bucket failed.",L);case 21:return[3,22];case 22:if(204!==A.status)throw new z("Upload to bucket was unsuccessful",A);j=l.fileUploadPublishRetryLimit,H=!1,F={timetoken:"0"},a.label=23;case 23:return a.trys.push([23,25,,26]),[4,i({channel:o,message:h,fileId:w,fileName:C,meta:f,storeInHistory:m,ttl:g})];case 24:return F=a.sent(),H=!0,[3,26];case 25:return a.sent(),j-=1,[3,26];case 26:if(!H&&j>0)return[3,23];a.label=27;case 27:if(H)return[2,{timetoken:F.timetoken,id:w,name:C}];throw new z("Publish failed. You may want to execute that operation manually using pubnub.publishFile",{channel:o,id:w,name:C})}var Q}))}))}}(e);return function(e,n){var i=t(e);return"function"==typeof n?(i.then((function(e){return n(null,e)})).catch((function(e){return n(e,null)})),i):i}},be=function(e,t){var n=t.channel,i=t.id,o=t.name,r=e.config,a=e.networking,s=e.tokenManager;if(!n)throw new z("Validation failed, check status for details",$("channel can't be empty"));if(!i)throw new z("Validation failed, check status for details",$("file id can't be empty"));if(!o)throw new z("Validation failed, check status for details",$("file name can't be empty"));var l="/v1/files/".concat(r.subscribeKey,"/channels/").concat(P.encodeString(n),"/files/").concat(i,"/").concat(o),u={};u.uuid=r.getUUID(),u.pnsdk=G(r);var c=s.getToken()||r.getAuthKey();c&&(u.auth=c),r.secretKey&&W(e,l,u,{},{getOperation:function(){return"PubNubGetFileUrlOperation"}});var d=Object.keys(u).map((function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(u[e]))})).join("&");return""!==d?"".concat(a.getStandardOrigin()).concat(l,"?").concat(d):"".concat(a.getStandardOrigin()).concat(l)},ve={getOperation:function(){return I.PNDownloadFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?(null==t?void 0:t.id)?void 0:"id can't be empty":"name can't be empty":"channel can't be empty"},useGetFile:function(){return!0},getFileURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},ignoreBody:function(){return!0},forceBuffered:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t,n){var i=e.PubNubFile,o=e.config,s=e.cryptography;return r(void 0,void 0,void 0,(function(){var e,r,l,u;return a(this,(function(a){switch(a.label){case 0:return e=t.response.body,i.supportsEncryptFile&&(null!==(r=n.cipherKey)&&void 0!==r?r:o.cipherKey)?[4,s.decrypt(null!==(l=n.cipherKey)&&void 0!==l?l:o.cipherKey,e)]:[3,2];case 1:e=a.sent(),a.label=2;case 2:return[2,i.create({data:e,name:null!==(u=t.response.name)&&void 0!==u?u:n.name,mimeType:t.response.type})]}}))}))}},ye={getOperation:function(){return I.PNListFilesOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.id)?(null==t?void 0:t.name)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status}}},we={getOperation:function(){return I.PNGetAllUUIDMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(o=t.include)||void 0===o?void 0:o.totalCount),(null===(r=null==t?void 0:t.page)||void 0===r?void 0:r.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,next:t.next,prev:t.prev}}},Ce={getOperation:function(){return I.PNGetUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o=e.config,r={};return r.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:o.getUUID(),r.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&r.include.pop(),r.include=r.include.join(","),r},handleResponse:function(e,t){return{status:t.status,data:t.data}}},xe={getOperation:function(){return I.PNSetUUIDMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.data))return"Data cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o=e.config,r={};return r.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:o.getUUID(),r.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&r.include.pop(),r.include=r.include.join(","),r},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Ae={getOperation:function(){return I.PNRemoveUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i=e.config;return{uuid:null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Se={getOperation:function(){return I.PNGetAllChannelMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(o=t.include)||void 0===o?void 0:o.totalCount),(null===(r=null==t?void 0:t.page)||void 0===r?void 0:r.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},ke={getOperation:function(){return I.PNGetChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Te={getOperation:function(){return I.PNSetChannelMetadataOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.data)?void 0:"Data cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},_e={getOperation:function(){return I.PNRemoveChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Ee={getOperation:function(){return I.PNGetMembersOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"UUID cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h,p,f,g={include:["uuid.status","uuid.type","type"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&g.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customUUIDFields)&&g.include.push("uuid.custom"),(null===(r=null===(o=t.include)||void 0===o?void 0:o.UUIDFields)||void 0===r||r)&&g.include.push("uuid")),g.include=g.include.join(","),(null===(a=null==t?void 0:t.include)||void 0===a?void 0:a.totalCount)&&(g.count=null===(s=t.include)||void 0===s?void 0:s.totalCount),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.next)&&(g.start=null===(c=t.page)||void 0===c?void 0:c.next),(null===(d=null==t?void 0:t.page)||void 0===d?void 0:d.prev)&&(g.end=null===(h=t.page)||void 0===h?void 0:h.prev),(null==t?void 0:t.filter)&&(g.filter=t.filter),g.limit=null!==(p=null==t?void 0:t.limit)&&void 0!==p?p:100,(null==t?void 0:t.sort)&&(g.sort=Object.entries(null!==(f=t.sort)&&void 0!==f?f:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),g},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Oe={getOperation:function(){return I.PNSetMembersOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.uuids)&&0!==(null==t?void 0:t.uuids.length)?void 0:"UUIDs cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(P.encodeString(t.channel),"/uuids")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.uuids.map((function(e){return"string"==typeof e?{uuid:{id:e}}:{uuid:{id:e.id},custom:e.custom,status:e.status}})),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["uuid.status","uuid.type","type"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customUUIDFields)&&h.include.push("uuid.custom"),(null===(o=t.include)||void 0===o?void 0:o.UUIDFields)&&h.include.push("uuid")),h.include=h.include.join(","),(null===(r=null==t?void 0:t.include)||void 0===r?void 0:r.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Pe={getOperation:function(){return I.PNGetMembershipsOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h,p,f={include:["channel.status","channel.type","status"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&f.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customChannelFields)&&f.include.push("channel.custom"),(null===(o=t.include)||void 0===o?void 0:o.channelFields)&&f.include.push("channel")),f.include=f.include.join(","),(null===(r=null==t?void 0:t.include)||void 0===r?void 0:r.totalCount)&&(f.count=null===(a=t.include)||void 0===a?void 0:a.totalCount),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.next)&&(f.start=null===(u=t.page)||void 0===u?void 0:u.next),(null===(c=null==t?void 0:t.page)||void 0===c?void 0:c.prev)&&(f.end=null===(d=t.page)||void 0===d?void 0:d.prev),(null==t?void 0:t.filter)&&(f.filter=t.filter),f.limit=null!==(h=null==t?void 0:t.limit)&&void 0!==h?h:100,(null==t?void 0:t.sort)&&(f.sort=Object.entries(null!==(p=t.sort)&&void 0!==p?p:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),f},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ne={getOperation:function(){return I.PNSetMembershipsOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)||0===(null==t?void 0:t.channels.length))return"Channels cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(P.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.channels.map((function(e){return"string"==typeof e?{channel:{id:e}}:{channel:{id:e.id},custom:e.custom,status:e.status}})),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,o,r,a,s,u,c,d,h={include:["channel.status","channel.type","status"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customChannelFields)&&h.include.push("channel.custom"),(null===(o=t.include)||void 0===o?void 0:o.channelFields)&&h.include.push("channel")),h.include=h.include.join(","),(null===(r=null==t?void 0:t.include)||void 0===r?void 0:r.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map((function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n}))),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Me=Object.freeze({__proto__:null,getOperation:function(){return I.PNAccessManagerAudit},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/audit/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channel,i=t.channelGroup,o=t.authKeys,r=void 0===o?[]:o,a={};return n&&(a.channel=n),i&&(a["channel-group"]=i),r.length>0&&(a.auth=r.join(",")),a},handleResponse:function(e,t){return t.payload}}),Ie=Object.freeze({__proto__:null,getOperation:function(){return I.PNAccessManagerGrant},validateParams:function(e,t){var n=e.config;return n.subscribeKey?n.publishKey?n.secretKey?null==t.uuids||t.authKeys?null==t.uuids||null==t.channels&&null==t.channelGroups?void 0:"Both channel/channelgroup and uuid cannot be used in the same request":"authKeys are required for grant request on uuids":"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/grant/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channels,i=void 0===n?[]:n,o=t.channelGroups,r=void 0===o?[]:o,a=t.uuids,s=void 0===a?[]:a,l=t.ttl,u=t.read,c=void 0!==u&&u,d=t.write,h=void 0!==d&&d,p=t.manage,f=void 0!==p&&p,g=t.get,m=void 0!==g&&g,b=t.join,v=void 0!==b&&b,y=t.update,w=void 0!==y&&y,C=t.authKeys,x=void 0===C?[]:C,A=t.delete,S={};return S.r=c?"1":"0",S.w=h?"1":"0",S.m=f?"1":"0",S.d=A?"1":"0",S.g=m?"1":"0",S.j=v?"1":"0",S.u=w?"1":"0",i.length>0&&(S.channel=i.join(",")),r.length>0&&(S["channel-group"]=r.join(",")),x.length>0&&(S.auth=x.join(",")),s.length>0&&(S["target-uuid"]=s.join(",")),(l||0===l)&&(S.ttl=l),S},handleResponse:function(){return{}}});function De(e){var t,n,i,o,r=void 0!==(null==e?void 0:e.authorizedUserId),a=void 0!==(null===(t=null==e?void 0:e.resources)||void 0===t?void 0:t.users),s=void 0!==(null===(n=null==e?void 0:e.resources)||void 0===n?void 0:n.spaces),l=void 0!==(null===(i=null==e?void 0:e.patterns)||void 0===i?void 0:i.users),u=void 0!==(null===(o=null==e?void 0:e.patterns)||void 0===o?void 0:o.spaces);return l||a||u||s||r}function Ue(e){var t=0;return e.join&&(t|=128),e.update&&(t|=64),e.get&&(t|=32),e.delete&&(t|=8),e.manage&&(t|=4),e.write&&(t|=2),e.read&&(t|=1),t}var Le=Object.freeze({__proto__:null,getOperation:function(){return I.PNAccessManagerGrantToken},extractPermissions:Ue,validateParams:function(e,t){var n,i,o,r,a,s,l=e.config;if(!l.subscribeKey)return"Missing Subscribe Key";if(!l.publishKey)return"Missing Publish Key";if(!l.secretKey)return"Missing Secret Key";if(!t.resources&&!t.patterns)return"Missing either Resources or Patterns.";var u=void 0!==(null==t?void 0:t.authorized_uuid),c=void 0!==(null===(n=null==t?void 0:t.resources)||void 0===n?void 0:n.uuids),d=void 0!==(null===(i=null==t?void 0:t.resources)||void 0===i?void 0:i.channels),h=void 0!==(null===(o=null==t?void 0:t.resources)||void 0===o?void 0:o.groups),p=void 0!==(null===(r=null==t?void 0:t.patterns)||void 0===r?void 0:r.uuids),f=void 0!==(null===(a=null==t?void 0:t.patterns)||void 0===a?void 0:a.channels),g=void 0!==(null===(s=null==t?void 0:t.patterns)||void 0===s?void 0:s.groups),m=u||c||p||d||f||h||g;return De(t)&&m?"Cannot mix `users`, `spaces` and `authorizedUserId` with `uuids`, `channels`, `groups` and `authorized_uuid`":(!t.resources||t.resources.uuids&&0!==Object.keys(t.resources.uuids).length||t.resources.channels&&0!==Object.keys(t.resources.channels).length||t.resources.groups&&0!==Object.keys(t.resources.groups).length||t.resources.users&&0!==Object.keys(t.resources.users).length||t.resources.spaces&&0!==Object.keys(t.resources.spaces).length)&&(!t.patterns||t.patterns.uuids&&0!==Object.keys(t.patterns.uuids).length||t.patterns.channels&&0!==Object.keys(t.patterns.channels).length||t.patterns.groups&&0!==Object.keys(t.patterns.groups).length||t.patterns.users&&0!==Object.keys(t.patterns.users).length||t.patterns.spaces&&0!==Object.keys(t.patterns.spaces).length)?void 0:"Missing values for either Resources or Patterns."},postURL:function(e){var t=e.config;return"/v3/pam/".concat(t.subscribeKey,"/grant")},usePost:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(){return{}},postPayload:function(e,t){return function(e,t){if(De(t))return function(e,t){var n=t.ttl,i=t.resources,o=t.patterns,r=t.meta,a=t.authorizedUserId,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.users,u=i.spaces,c=i.groups;l&&Object.keys(l).forEach((function(e){s.permissions.resources.uuids[e]=Ue(l[e])})),u&&Object.keys(u).forEach((function(e){s.permissions.resources.channels[e]=Ue(u[e])})),c&&Object.keys(c).forEach((function(e){s.permissions.resources.groups[e]=Ue(c[e])}))}if(o){var d=o.users,h=o.spaces,p=o.groups;d&&Object.keys(d).forEach((function(e){s.permissions.patterns.uuids[e]=Ue(d[e])})),h&&Object.keys(h).forEach((function(e){s.permissions.patterns.channels[e]=Ue(h[e])})),p&&Object.keys(p).forEach((function(e){s.permissions.patterns.groups[e]=Ue(p[e])}))}return(n||0===n)&&(s.ttl=n),r&&(s.permissions.meta=r),a&&(s.permissions.uuid="".concat(a)),s}(0,t);var n=t.ttl,i=t.resources,o=t.patterns,r=t.meta,a=t.authorized_uuid,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.uuids,u=i.channels,c=i.groups;l&&Object.keys(l).forEach((function(e){s.permissions.resources.uuids[e]=Ue(l[e])})),u&&Object.keys(u).forEach((function(e){s.permissions.resources.channels[e]=Ue(u[e])})),c&&Object.keys(c).forEach((function(e){s.permissions.resources.groups[e]=Ue(c[e])}))}if(o){var d=o.uuids,h=o.channels,p=o.groups;d&&Object.keys(d).forEach((function(e){s.permissions.patterns.uuids[e]=Ue(d[e])})),h&&Object.keys(h).forEach((function(e){s.permissions.patterns.channels[e]=Ue(h[e])})),p&&Object.keys(p).forEach((function(e){s.permissions.patterns.groups[e]=Ue(p[e])}))}return(n||0===n)&&(s.ttl=n),r&&(s.permissions.meta=r),a&&(s.permissions.uuid="".concat(a)),s}(0,t)},handleResponse:function(e,t){return t.data.token}}),Be={getOperation:function(){return I.PNAccessManagerRevokeToken},validateParams:function(e,t){return e.config.secretKey?t?void 0:"token can't be empty":"Missing Secret Key"},getURL:function(e,t){var n=e.config;return"/v3/pam/".concat(n.subscribeKey,"/grant/").concat(P.encodeString(t))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e){return{uuid:e.config.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}};function Re(e,t){var n=e.crypto,i=e.config,o=JSON.stringify(t);return i.cipherKey&&(o=n.encrypt(o),o=JSON.stringify(o)),o}var je=Object.freeze({__proto__:null,getOperation:function(){return I.PNPublishOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},usePost:function(e,t){var n=t.sendByPost;return void 0!==n&&n},getURL:function(e,t){var n=e.config,i=t.channel,o=Re(e,t.message);return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(P.encodeString(i),"/0/").concat(P.encodeString(o))},postURL:function(e,t){var n=e.config,i=t.channel;return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(P.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},postPayload:function(e,t){return Re(e,t.message)},prepareParams:function(e,t){var n=t.meta,i=t.replicate,o=void 0===i||i,r=t.storeInHistory,a=t.ttl,s={};return null!=r&&(s.store=r?"1":"0"),a&&(s.ttl=a),!1===o&&(s.norep="true"),n&&"object"==typeof n&&(s.meta=JSON.stringify(n)),s},handleResponse:function(e,t){return{timetoken:t[2]}}}),He=Object.freeze({__proto__:null,getOperation:function(){return I.PNSignalOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},getURL:function(e,t){var n,i=e.config,o=t.channel,r=(n=t.message,JSON.stringify(n));return"/signal/".concat(i.publishKey,"/").concat(i.subscribeKey,"/0/").concat(P.encodeString(o),"/0/").concat(P.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{timetoken:t[2]}}});function Fe(e,t){var n=e.config,i=e.crypto;if(!n.cipherKey)return t;try{return i.decrypt(t)}catch(e){return t}}var ze=Object.freeze({__proto__:null,getOperation:function(){return I.PNHistoryOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channel,i=e.config;return"/v2/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,o=t.reverse,r=t.count,a=void 0===r?100:r,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d={include_token:"true"};return d.count=a,n&&(d.start=n),i&&(d.end=i),l&&(d.string_message_token="true"),null!=o&&(d.reverse=o.toString()),c&&(d.include_meta="true"),d},handleResponse:function(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return Array.isArray(t[0])&&t[0].forEach((function(t){var i={timetoken:t.timetoken,entry:Fe(e,t.message)};t.meta&&(i.meta=t.meta),n.messages.push(i)})),n}}),$e=Object.freeze({__proto__:null,getOperation:function(){return I.PNDeleteMessagesOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},useDelete:function(){return!0},getURL:function(e,t){var n=t.channel,i=e.config;return"/v3/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(P.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,o={};return n&&(o.start=n),i&&(o.end=i),o},handleResponse:function(e,t){return t.payload}}),Qe=Object.freeze({__proto__:null,getOperation:function(){return I.PNMessageCounts},validateParams:function(e,t){var n=t.channels,i=t.timetoken,o=t.channelTimetokens,r=e.config;return n?i&&o?"timetoken and channelTimetokens are incompatible together":i&&o&&o.length>1&&n.length!==o.length?"Length of channelTimetokens and channels do not match":r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channels,i=e.config,o=n.join(",");return"/v3/history/sub-key/".concat(i.subscribeKey,"/message-counts/").concat(P.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.timetoken,i=t.channelTimetokens,o={};if(i&&1===i.length){var r=l(i,1)[0];o.timetoken=r}else i?o.channelsTimetoken=i.join(","):n&&(o.timetoken=n);return o},handleResponse:function(e,t){return{channels:t.channels}}}),Ge=Object.freeze({__proto__:null,getOperation:function(){return I.PNFetchMessagesOperation},validateParams:function(e,t){var n=t.channels,i=t.includeMessageActions,o=void 0!==i&&i,r=e.config;if(!n||0===n.length)return"Missing channels";if(!r.subscribeKey)return"Missing Subscribe Key";if(o&&n.length>1)throw new TypeError("History can return actions data for a single channel only. Either pass a single channel or disable the includeMessageActions flag.")},getURL:function(e,t){var n=t.channels,i=void 0===n?[]:n,o=t.includeMessageActions,r=void 0!==o&&o,a=e.config,s=r?"history-with-actions":"history",l=i.length>0?i.join(","):",";return"/v3/".concat(s,"/sub-key/").concat(a.subscribeKey,"/channel/").concat(P.encodeString(l))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels,i=t.start,o=t.end,r=t.includeMessageActions,a=t.count,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d=t.includeUuid,h=t.includeUUID,p=void 0===h||h,f=t.includeMessageType,g=void 0===f||f,m={};return m.max=a||(n.length>1||!0===r?25:100),i&&(m.start=i),o&&(m.end=o),l&&(m.string_message_token="true"),c&&(m.include_meta="true"),p&&!1!==d&&(m.include_uuid="true"),g&&(m.include_message_type="true"),m},handleResponse:function(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach((function(i){n.channels[i]=[],(t.channels[i]||[]).forEach((function(t){var o={};o.channel=i,o.timetoken=t.timetoken,o.message=function(e,t){var n=e.config,i=e.crypto;if(!n.cipherKey)return t;try{return i.decrypt(t)}catch(e){return t}}(e,t.message),o.messageType=t.message_type,o.uuid=t.uuid,t.actions&&(o.actions=t.actions,o.data=t.actions),t.meta&&(o.meta=t.meta),n.channels[i].push(o)}))})),t.more&&(n.more=t.more),n}}),qe=Object.freeze({__proto__:null,getOperation:function(){return I.PNTimeOperation},getURL:function(){return"/time/0"},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},isAuthSupported:function(){return!1},handleResponse:function(e,t){return{timetoken:t[0]}},validateParams:function(){}}),We=Object.freeze({__proto__:null,getOperation:function(){return I.PNSubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,o=void 0===i?[]:i,r=o.length>0?o.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(P.encodeString(r),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=e.config,i=t.state,o=t.channelGroups,r=void 0===o?[]:o,a=t.timetoken,s=t.filterExpression,l=t.region,u={heartbeat:n.getPresenceTimeout()};return r.length>0&&(u["channel-group"]=r.join(",")),s&&s.length>0&&(u["filter-expr"]=s),Object.keys(i).length&&(u.state=JSON.stringify(i)),a&&(u.tt=a),l&&(u.tr=l),u},handleResponse:function(e,t){var n=[];t.m.forEach((function(e){var t={publishTimetoken:e.p.t,region:e.p.r},i={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(i)}));var i={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:i}}}),Ve={getOperation:function(){return I.PNHandshakeOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)&&!(null==t?void 0:t.channelGroups))return"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels?t.channels.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(P.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),n.tt=0,n},handleResponse:function(e,t){return{region:t.t.r,timetoken:t.t.t}}},Ye={getOperation:function(){return I.PNReceiveMessagesOperation},validateParams:function(e,t){return(null==t?void 0:t.channels)||(null==t?void 0:t.channelGroups)?(null==t?void 0:t.timetoken)?(null==t?void 0:t.region)?void 0:"region can not be empty":"timetoken can not be empty":"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels?t.channels.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(P.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},getAbortSignal:function(e,t){return t.abortSignal},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),n.tt=t.timetoken,n.tr=t.region,n},handleResponse:function(e,t){var n=[];return t.m.forEach((function(e){var t={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,publishMetaData:{timetoken:e.p.t,region:e.p.r}};n.push(t)})),{messages:n,metadata:{region:t.t.r,timetoken:t.t.t}}}},Ke=function(){function e(e){void 0===e&&(e=!1),this.sync=e,this.listeners=new Set}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},e.prototype.notify=function(e){var t=this,n=function(){t.listeners.forEach((function(t){t(e)}))};this.sync?n():setTimeout(n,0)},e}(),Xe=function(){function e(e){this.label=e,this.transitionMap=new Map,this.enterEffects=[],this.exitEffects=[]}return e.prototype.transition=function(e,t){var n;if(this.transitionMap.has(t.type))return null===(n=this.transitionMap.get(t.type))||void 0===n?void 0:n(e,t)},e.prototype.on=function(e,t){return this.transitionMap.set(e,t),this},e.prototype.with=function(e,t){return[this,e,null!=t?t:[]]},e.prototype.onEnter=function(e){return this.enterEffects.push(e),this},e.prototype.onExit=function(e){return this.exitEffects.push(e),this},e}(),Ze=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.describe=function(e){return new Xe(e)},n.prototype.start=function(e,t){this.currentState=e,this.currentContext=t,this.notify({type:"engineStarted",state:e,context:t})},n.prototype.transition=function(e){var t,n,i,o,r,a;if(!this.currentState)throw new Error("Start the engine first");this.notify({type:"eventReceived",event:e});var u=this.currentState.transition(this.currentContext,e);if(u){var c=l(u,3),d=c[0],h=c[1],p=c[2];try{for(var f=s(this.currentState.exitEffects),g=f.next();!g.done;g=f.next()){var m=g.value;this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}var b=this.currentState;this.currentState=d;var v=this.currentContext;this.currentContext=h,this.notify({type:"transitionDone",fromState:b,fromContext:v,toState:d,toContext:h,event:e});try{for(var y=s(p),w=y.next();!w.done;w=y.next())m=w.value,this.notify({type:"invocationDispatched",invocation:m})}catch(e){i={error:e}}finally{try{w&&!w.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}try{for(var C=s(this.currentState.enterEffects),x=C.next();!x.done;x=C.next())m=x.value,this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}catch(e){r={error:e}}finally{try{x&&!x.done&&(a=C.return)&&a.call(C)}finally{if(r)throw r.error}}}},n}(Ke),Je=function(){function e(e){this.dependencies=e,this.instances=new Map,this.handlers=new Map}return e.prototype.on=function(e,t){this.handlers.set(e,t)},e.prototype.dispatch=function(e){if("CANCEL"!==e.type){var t=this.handlers.get(e.type);if(!t)throw new Error("Unhandled invocation '".concat(e.type,"'"));var n=t(e.payload,this.dependencies);e.managed&&this.instances.set(e.type,n),n.start()}else if(this.instances.has(e.payload)){var i=this.instances.get(e.payload);null==i||i.cancel(),this.instances.delete(e.payload)}},e}();function et(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:null==t?void 0:t.apply(void 0,u([],l(n),!1))}};return n.type=e,n}function tt(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:t.apply(void 0,u([],l(n),!1)),managed:!0}};return n.type=e,n.cancel={type:"CANCEL",payload:e,managed:!1},n}var nt,it,ot,rt=function(e){function n(){var t=this.constructor,n=e.call(this,"The operation was aborted.")||this;return n.name="AbortError",Object.setPrototypeOf(n,t.prototype),n}return t(n,e),n}(Error),at=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._aborted=!1,t}return t(n,e),Object.defineProperty(n.prototype,"aborted",{get:function(){return this._aborted},enumerable:!1,configurable:!0}),n.prototype.throwIfAborted=function(){if(this._aborted)throw new rt},n.prototype.abort=function(){this._aborted=!0,this.notify(new rt)},n}(Ke),st=function(e){function n(t,n,i){var o=e.call(this,t,n)||this;return o.asyncFunction=i,o.abortSignal=new at,o}return t(n,e),n.prototype.start=function(){this.asyncFunction(this.payload,this.abortSignal,this.dependencies)},n.prototype.cancel=function(){this.abortSignal.abort()},n}((function(e,t){this.payload=e,this.dependencies=t})),lt=function(e){return function(t,n){return new st(t,n,e)}},ut=tt("HANDSHAKE",(function(e,t){return{channels:e,groups:t}})),ct=tt("RECEIVE_EVENTS",(function(e,t,n){return{channels:e,groups:t,cursor:n}})),dt=(it=function(e){return e},ot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{type:nt,payload:it.apply(void 0,u([],l(e),!1)),managed:!1}},ot.type=nt="EMIT_EVENTS",ot),ht=tt("RECONNECT",(function(e){return e})),pt=tt("HANDSHAKE_RECONNECT",(function(e){return e})),ft=et("SUBSCRIPTION_CHANGE",(function(e,t){return{channels:e,groups:t}})),gt=et("DISCONNECT",(function(){return{}})),mt=et("RECONNECT",(function(){return{}}));et("RESTORE",(function(e,t,n,i){return{channels:e,groups:t,timetoken:n,region:i}}));var bt=et("HANDSHAKING_SUCCESS",(function(e){return e})),vt=et("HANDSHAKING_FAILURE",(function(e){return e})),yt=et("HANDSHAKING_RECONNECTING_SUCCESS",(function(e){return{cursor:e}})),wt=et("HANDSHAKING_RECONNECTING_FAILURE",(function(e){return e})),Ct=et("HANDSHAKING_RECONNECTING_GIVEUP",(function(){return{}})),xt=et("HANDSHAKING_RECONNECTING_RETRY",(function(){return{}})),At=et("RECEIVING_SUCCESS",(function(e,t){return{cursor:e,events:t}})),St=et("RECEIVING_FAILURE",(function(e){return e})),kt=et("RECONNECTING_SUCCESS",(function(e,t){return{cursor:e,events:t}})),Tt=et("RECONNECTING_FAILURE",(function(e){return e})),_t=et("RECONNECTING_GIVEUP",(function(){return{}})),Et=et("RECONNECTING_RETRY",(function(){return{}})),Ot=function(e){function n(t,n){var i=e.call(this,n)||this;return i.on(ut.type,lt((function(e,n,o){var s=o.handshake;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:n.throwIfAborted(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups})];case 2:return i=r.sent(),t.transition(bt(i)),[3,4];case 3:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(vt(o))]:[3,4];case 4:return[2]}}))}))}))),i.on(ct.type,lt((function(e,n,o){var s=o.receiveEvents;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:n.throwIfAborted(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region})];case 2:return i=r.sent(),t.transition(At(i.metadata,i.messages)),[3,4];case 3:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(St(o))]:[3,4];case 4:return[2]}}))}))}))),i.on(dt.type,lt((function(e,t,n){return n.receiveEvents,r(i,void 0,void 0,(function(){return a(this,(function(t){return e.length>0&&console.log(e),[2]}))}))}))),i.on(ht.type,lt((function(e,n,o){var s=o.receiveEvents,l=o.shouldRetry,u=o.getRetryDelay,c=o.delay;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:return l(e.reason,e.attempts)?(n.throwIfAborted(),[4,c(u(e.attempts))]):[2,t.transition(_t())];case 1:r.sent(),n.throwIfAborted(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region})];case 3:return i=r.sent(),[2,t.transition(kt(i.metadata,i.messages))];case 4:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(Tt(o))]:[3,5];case 5:return[2]}}))}))}))),i.on(pt.type,lt((function(e,n,o){var s=o.handshake,l=o.shouldRetry,u=o.getRetryDelay,c=o.delay;return r(i,void 0,void 0,(function(){var i,o;return a(this,(function(r){switch(r.label){case 0:return l(e.reason,e.attempts)?(n.throwIfAborted(),[4,c(u(e.attempts))]):[2,t.transition(Ct())];case 1:r.sent(),n.throwIfAborted(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups})];case 3:return i=r.sent(),[2,t.transition(yt(i.metadata))];case 4:return(o=r.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof z?[2,t.transition(wt(o))]:[3,5];case 5:return[2]}}))}))}))),i}return t(n,e),n}(Je),Pt=new Xe("STOPPED");Pt.on(ft.type,(function(e,t){return Pt.with({channels:t.payload.channels,groups:t.payload.groups})})),Pt.on(mt.type,(function(e){return Bt.with(i({},e))}));var Nt=new Xe("HANDSHAKE_FAILURE");Nt.on(xt.type,(function(e){return Lt.with(i(i({},e),{attempts:0}))})),Nt.on(gt.type,(function(e){return Pt.with({channels:e.channels,groups:e.groups})}));var Mt=new Xe("STOPPED");Mt.on(ft.type,(function(e,t){return Mt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})})),Mt.on(mt.type,(function(e){return Ut.with(i({},e))}));var It=new Xe("RECEIVE_FAILURE");It.on(Et.type,(function(e){return Dt.with(i(i({},e),{attempts:0}))})),It.on(gt.type,(function(e){return Mt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}));var Dt=new Xe("RECEIVE_RECONNECTING");Dt.onEnter((function(e){return ht(e)})),Dt.onExit((function(){return ht.cancel})),Dt.on(kt.type,(function(e,t){return Ut.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[dt(t.payload.events)])})),Dt.on(Tt.type,(function(e,t){return Dt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))})),Dt.on(_t.type,(function(e){return It.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:e.reason})})),Dt.on(gt.type,(function(e){return Mt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}));var Ut=new Xe("RECEIVING");Ut.onEnter((function(e){return ct(e.channels,e.groups,e.cursor)})),Ut.onExit((function(){return ct.cancel})),Ut.on(At.type,(function(e,t){return Ut.with(i(i({},e),{cursor:t.payload.cursor}),[dt(t.payload.events)])})),Ut.on(ft.type,(function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Rt.with(void 0):Ut.with(i(i({},e),{channels:t.payload.channels,groups:t.payload.groups}))})),Ut.on(St.type,(function(e,t){return Dt.with(i(i({},e),{attempts:0,reason:t.payload}))})),Ut.on(gt.type,(function(e){return Mt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}));var Lt=new Xe("HANDSHAKE_RECONNECTING");Lt.onEnter((function(e){return pt(e)})),Lt.onExit((function(){return ht.cancel})),Lt.on(kt.type,(function(e,t){return Ut.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[dt(t.payload.events)])})),Lt.on(Tt.type,(function(e,t){return Lt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))})),Lt.on(_t.type,(function(e){return Nt.with({groups:e.groups,channels:e.channels,reason:e.reason})})),Lt.on(gt.type,(function(e){return Pt.with({channels:e.channels,groups:e.groups})}));var Bt=new Xe("HANDSHAKING");Bt.onEnter((function(e){return ut(e.channels,e.groups)})),Bt.onExit((function(){return ut.cancel})),Bt.on(ft.type,(function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Rt.with(void 0):Bt.with({channels:t.payload.channels,groups:t.payload.groups})})),Bt.on(bt.type,(function(e,t){return Ut.with({channels:e.channels,groups:e.groups,cursor:t.payload})})),Bt.on(vt.type,(function(e,t){return Lt.with(i(i({},e),{attempts:0,reason:t.payload}))})),Bt.on(gt.type,(function(e){return Pt.with({channels:e.channels,groups:e.groups})}));var Rt=new Xe("UNSUBSCRIBED");Rt.on(ft.type,(function(e,t){return Bt.with({channels:t.payload.channels,groups:t.payload.groups})}));var jt=function(){function e(e){var t=this;this.engine=new Ze,this.channels=[],this.groups=[],this.dispatcher=new Ot(this.engine,e),this.engine.subscribe((function(e){"invocationDispatched"===e.type&&t.dispatcher.dispatch(e.invocation)})),this.engine.start(Rt,void 0)}return Object.defineProperty(e.prototype,"_engine",{get:function(){return this.engine},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){var t=e.channels,n=e.groups;this.channels=u(u([],l(this.channels),!1),l(null!=t?t:[]),!1),this.groups=u(u([],l(this.groups),!1),l(null!=n?n:[]),!1),this.engine.transition(ft(this.channels,this.groups))},e.prototype.unsubscribe=function(e){var t=e.channels,n=e.groups;this.channels=this.channels.filter((function(e){var n;return null===(n=!(null==t?void 0:t.includes(e)))||void 0===n||n})),this.groups=this.groups.filter((function(e){var t;return null===(t=!(null==n?void 0:n.includes(e)))||void 0===t||t})),this.engine.transition(ft(this.channels.slice(0),this.groups.slice(0)))},e.prototype.unsubscribeAll=function(){this.channels=[],this.groups=[],this.engine.transition(ft(this.channels.slice(0),this.groups.slice(0)))},e.prototype.reconnect=function(){this.engine.transition(mt())},e.prototype.disconnect=function(){this.engine.transition(gt())},e}(),Ht=function(){function e(e){var t=this,n=e.networking,o=e.cbor,r=new m({setup:e});this._config=r;var a=new T({config:r}),s=e.cryptography;n.init(r);var c=new F(r,o);this._tokenManager=c;var d=new D({maximumSamplesCount:6e4});this._telemetryManager=d;var h={config:r,networking:n,crypto:a,cryptography:s,tokenManager:c,telemetryManager:d,PubNubFile:e.PubNubFile};this.File=e.PubNubFile,this.encryptFile=function(e,n){return s.encryptFile(e,n,t.File)},this.decryptFile=function(e,n){return s.decryptFile(e,n,t.File)};var p=V.bind(this,h,qe),f=V.bind(this,h,oe),g=V.bind(this,h,ae),b=V.bind(this,h,le),v=V.bind(this,h,We),y=new H;if(this._listenerManager=y,this.iAmHere=V.bind(this,h,ae),this.iAmAway=V.bind(this,h,oe),this.setPresenceState=V.bind(this,h,le),this.handshake=V.bind(this,h,Ve),this.receiveMessages=V.bind(this,h,Ye),!0===r.enableSubscribeBeta){var w=new jt({handshake:this.handshake,receiveEvents:this.receiveMessages});this.subscribe=w.subscribe.bind(w),this.unsubscribe=w.unsubscribe.bind(w),this.eventEngine=w}else{var C=new M({timeEndpoint:p,leaveEndpoint:f,heartbeatEndpoint:g,setStateEndpoint:b,subscribeEndpoint:v,crypto:h.crypto,config:h.config,listenerManager:y,getFileUrl:function(e){return be(h,e)}});this.subscribe=C.adaptSubscribeChange.bind(C),this.unsubscribe=C.adaptUnsubscribeChange.bind(C),this.disconnect=C.disconnect.bind(C),this.reconnect=C.reconnect.bind(C),this.unsubscribeAll=C.unsubscribeAll.bind(C),this.getSubscribedChannels=C.getSubscribedChannels.bind(C),this.getSubscribedChannelGroups=C.getSubscribedChannelGroups.bind(C),this.setState=C.adaptStateChange.bind(C),this.presence=C.adaptPresenceChange.bind(C),this.destroy=function(e){C.unsubscribeAll(e),C.disconnect()}}this.addListener=y.addListener.bind(y),this.removeListener=y.removeListener.bind(y),this.removeAllListeners=y.removeAllListeners.bind(y),this.parseToken=c.parseToken.bind(c),this.setToken=c.setToken.bind(c),this.getToken=c.getToken.bind(c),this.channelGroups={listGroups:V.bind(this,h,Z),listChannels:V.bind(this,h,J),addChannels:V.bind(this,h,Y),removeChannels:V.bind(this,h,K),deleteGroup:V.bind(this,h,X)},this.push={addChannels:V.bind(this,h,ee),removeChannels:V.bind(this,h,te),deleteDevice:V.bind(this,h,ie),listChannels:V.bind(this,h,ne)},this.hereNow=V.bind(this,h,ue),this.whereNow=V.bind(this,h,re),this.getState=V.bind(this,h,se),this.grant=V.bind(this,h,Ie),this.grantToken=V.bind(this,h,Le),this.audit=V.bind(this,h,Me),this.revokeToken=V.bind(this,h,Be),this.publish=V.bind(this,h,je),this.fire=function(e,n){return e.replicate=!1,e.storeInHistory=!1,t.publish(e,n)},this.signal=V.bind(this,h,He),this.history=V.bind(this,h,ze),this.deleteMessages=V.bind(this,h,$e),this.messageCounts=V.bind(this,h,Qe),this.fetchMessages=V.bind(this,h,Ge),this.addMessageAction=V.bind(this,h,ce),this.removeMessageAction=V.bind(this,h,de),this.getMessageActions=V.bind(this,h,he),this.listFiles=V.bind(this,h,pe);var x=V.bind(this,h,fe);this.publishFile=V.bind(this,h,ge),this.sendFile=me({generateUploadUrl:x,publishFile:this.publishFile,modules:h}),this.getFileUrl=function(e){return be(h,e)},this.downloadFile=V.bind(this,h,ve),this.deleteFile=V.bind(this,h,ye),this.objects={getAllUUIDMetadata:V.bind(this,h,we),getUUIDMetadata:V.bind(this,h,Ce),setUUIDMetadata:V.bind(this,h,xe),removeUUIDMetadata:V.bind(this,h,Ae),getAllChannelMetadata:V.bind(this,h,Se),getChannelMetadata:V.bind(this,h,ke),setChannelMetadata:V.bind(this,h,Te),removeChannelMetadata:V.bind(this,h,_e),getChannelMembers:V.bind(this,h,Ee),setChannelMembers:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Oe,i({type:"set"},e)],l(n),!1))},removeChannelMembers:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Oe,i({type:"delete"},e)],l(n),!1))},getMemberships:V.bind(this,h,Pe),setMemberships:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Ne,i({type:"set"},e)],l(n),!1))},removeMemberships:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return V.call.apply(V,u([t,h,Ne,i({type:"delete"},e)],l(n),!1))}},this.createUser=function(e){return t.objects.setUUIDMetadata({uuid:e.userId,data:e.data,include:e.include})},this.updateUser=this.createUser,this.removeUser=function(e){return t.objects.removeUUIDMetadata({uuid:null==e?void 0:e.userId})},this.fetchUser=function(e){return t.objects.getUUIDMetadata({uuid:null==e?void 0:e.userId,include:null==e?void 0:e.include})},this.fetchUsers=this.objects.getAllUUIDMetadata,this.createSpace=function(e){return t.objects.setChannelMetadata({channel:e.spaceId,data:e.data,include:e.include})},this.updateSpace=this.createSpace,this.removeSpace=function(e){return t.objects.removeChannelMetadata({channel:e.spaceId})},this.fetchSpace=function(e){return t.objects.getChannelMetadata({channel:e.spaceId,include:e.include})},this.fetchSpaces=this.objects.getAllChannelMetadata,this.addMemberships=function(e){var n,i;return"string"==typeof e.spaceId?t.objects.setChannelMembers({channel:e.spaceId,uuids:null===(n=e.users)||void 0===n?void 0:n.map((function(e){return"string"==typeof e?e:{id:e.userId,custom:e.custom,status:e.status}})),limit:0}):t.objects.setMemberships({uuid:e.userId,channels:null===(i=e.spaces)||void 0===i?void 0:i.map((function(e){return"string"==typeof e?e:{id:e.spaceId,custom:e.custom,status:e.status}})),limit:0})},this.updateMemberships=this.addMemberships,this.removeMemberships=function(e){return"string"==typeof e.spaceId?t.objects.removeChannelMembers({channel:e.spaceId,uuids:e.userIds,limit:0}):t.objects.removeMemberships({uuid:e.userId,channels:e.spaceIds,limit:0})},this.fetchMemberships=function(e){return"string"==typeof e.spaceId?t.objects.getChannelMembers({channel:e.spaceId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,UUIDFields:e.include.userFields,customUUIDFields:e.include.customUserFields,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map((function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("user","uuid"),i]}))):null}).then((function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{user:e.uuid,custom:e.custom,updated:e.updated,eTag:e.eTag}})),e})):t.objects.getMemberships({uuid:e.userId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,channelFields:e.include.spaceFields,customChannelFields:e.include.customSpaceFields,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map((function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("space","channel"),i]}))):null}).then((function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map((function(e){return{space:e.channel,custom:e.custom,updated:e.updated,eTag:e.eTag}})),e}))},this.time=p,this.stop=this.destroy,this.encrypt=a.encrypt.bind(a),this.decrypt=a.decrypt.bind(a),this.getAuthKey=h.config.getAuthKey.bind(h.config),this.setAuthKey=h.config.setAuthKey.bind(h.config),this.setCipherKey=h.config.setCipherKey.bind(h.config),this.getUUID=h.config.getUUID.bind(h.config),this.setUUID=h.config.setUUID.bind(h.config),this.getFilterExpression=h.config.getFilterExpression.bind(h.config),this.setFilterExpression=h.config.setFilterExpression.bind(h.config),this.setHeartbeatInterval=h.config.setHeartbeatInterval.bind(h.config),n.hasModule("proxy")&&(this.setProxy=function(e){h.config.setProxy(e),t.reconnect()})}return e.prototype.getVersion=function(){return this._config.getVersion()},e.prototype._addPnsdkSuffix=function(e,t){this._config._addPnsdkSuffix(e,t)},e.prototype.networkDownDetected=function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy(!0)},e.prototype.networkUpDetected=function(){this._listenerManager.announceNetworkUp(),this.reconnect()},e.notificationPayload=function(e,t){return new j(e,t)},e.generateUUID=function(){return g()},e.OPERATIONS=I,e.CATEGORIES=N,e}(),Ft=function(){function e(e){var t=this;this._modules={},Object.keys(e).forEach((function(n){t._modules[n]=e[n].bind(t)}))}return e.prototype.init=function(e){this._config=e,Array.isArray(this._config.origin)?this._currentSubDomain=Math.floor(Math.random()*this._config.origin.length):this._currentSubDomain=0,this._coreParams={},this.shiftStandardOrigin()},e.prototype.nextOrigin=function(){var e=this._config.secure?"https://":"http://";if("string"==typeof this._config.origin)return"".concat(e).concat(this._config.origin);this._currentSubDomain+=1,this._currentSubDomain>=this._config.origin.length&&(this._currentSubDomain=0);var t=this._config.origin[this._currentSubDomain];return"".concat(e).concat(t)},e.prototype.hasModule=function(e){return e in this._modules},e.prototype.shiftStandardOrigin=function(){return this._standardOrigin=this.nextOrigin(),this._standardOrigin},e.prototype.getStandardOrigin=function(){return this._standardOrigin},e.prototype.POSTFILE=function(e,t,n){return this._modules.postfile(e,t,n)},e.prototype.GETFILE=function(e,t,n){return this._modules.getfile(e,t,n)},e.prototype.POST=function(e,t,n,i){return this._modules.post(e,t,n,i)},e.prototype.PATCH=function(e,t,n,i){return this._modules.patch(e,t,n,i)},e.prototype.GET=function(e,t,n){return this._modules.get(e,t,n)},e.prototype.DELETE=function(e,t,n){return this._modules.del(e,t,n)},e.prototype._detectErrorCategory=function(e){if("ENOTFOUND"===e.code)return N.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return N.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return N.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return N.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return N.PNNetworkIssuesCategory;if(e.timeout)return N.PNTimeoutCategory;if("ETIMEDOUT"===e.code)return N.PNNetworkIssuesCategory;if(e.response){if(e.response.badRequest)return N.PNBadRequestCategory;if(e.response.forbidden)return N.PNAccessDeniedCategory}return N.PNUnknownCategory},e}();function zt(e){var t=function(e){return e&&"object"==typeof e&&e.constructor===Object};if(!t(e))return e;var n={};return Object.keys(e).forEach((function(i){var o=function(e){return"string"==typeof e||e instanceof String}(i),r=i,a=e[i];Array.isArray(i)||o&&i.indexOf(",")>=0?r=(o?i.split(","):i).reduce((function(e,t){return e+String.fromCharCode(t)}),""):(function(e){return"number"==typeof e&&isFinite(e)}(i)||o&&!isNaN(i))&&(r=String.fromCharCode(o?parseInt(i,10):10)),n[r]=t(a)?zt(a):a})),n}var $t=function(){function e(e,t){this._base64ToBinary=t,this._decode=e}return e.prototype.decodeToken=function(e){var t="";e.length%4==3?t="=":e.length%4==2&&(t="==");var n=e.replace(/-/gi,"+").replace(/_/gi,"/")+t,i=this._decode(this._base64ToBinary(n));if("object"==typeof i)return i},e}(),Qt={exports:{}},Gt={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<i.length;o++)if((n=i[o])===t||n.fn===t){i.splice(o,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var o=(n=n.slice(0)).length;i<o;++i)n[i].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(Gt);var qt=Zt;Zt.default=Zt,Zt.stable=nn,Zt.stableStringify=nn;var Wt="[...]",Vt="[Circular]",Yt=[],Kt=[];function Xt(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Zt(e,t,n,i){var o;void 0===i&&(i=Xt()),en(e,"",0,[],void 0,0,i);try{o=0===Kt.length?JSON.stringify(e,t,n):JSON.stringify(e,rn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==Yt.length;){var r=Yt.pop();4===r.length?Object.defineProperty(r[0],r[1],r[3]):r[0][r[1]]=r[2]}}return o}function Jt(e,t,n,i){var o=Object.getOwnPropertyDescriptor(i,n);void 0!==o.get?o.configurable?(Object.defineProperty(i,n,{value:e}),Yt.push([i,n,t,o])):Kt.push([t,n,e]):(i[n]=e,Yt.push([i,n,t]))}function en(e,t,n,i,o,r,a){var s;if(r+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Jt(Vt,e,t,o);if(void 0!==a.depthLimit&&r>a.depthLimit)return void Jt(Wt,e,t,o);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Jt(Wt,e,t,o);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)en(e[s],s,s,i,e,r,a);else{var l=Object.keys(e);for(s=0;s<l.length;s++){var u=l[s];en(e[u],u,s,i,e,r,a)}}i.pop()}}function tn(e,t){return e<t?-1:e>t?1:0}function nn(e,t,n,i){void 0===i&&(i=Xt());var o,r=on(e,"",0,[],void 0,0,i)||e;try{o=0===Kt.length?JSON.stringify(r,t,n):JSON.stringify(r,rn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==Yt.length;){var a=Yt.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return o}function on(e,t,n,i,o,r,a){var s;if(r+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Jt(Vt,e,t,o);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==a.depthLimit&&r>a.depthLimit)return void Jt(Wt,e,t,o);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Jt(Wt,e,t,o);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)on(e[s],s,s,i,e,r,a);else{var l={},u=Object.keys(e).sort(tn);for(s=0;s<u.length;s++){var c=u[s];on(e[c],c,s,i,e,r,a),l[c]=e[c]}if(void 0===o)return l;Yt.push([o,t,e]),o[t]=l}i.pop()}}function rn(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(Kt.length>0)for(var i=0;i<Kt.length;i++){var o=Kt[i];if(o[1]===t&&o[0]===n){n=o[2],Kt.splice(i,1);break}}return e.call(this,t,n)}}var an=String.prototype.replace,sn=/%20/g,ln="RFC3986",un={default:ln,formatters:{RFC1738:function(e){return an.call(e,sn,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:ln},cn=un,dn=Object.prototype.hasOwnProperty,hn=Array.isArray,pn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),fn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)void 0!==e[i]&&(n[i]=e[i]);return n},gn={arrayToObject:fn,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var o=t[i],r=o.obj[o.prop],a=Object.keys(r),s=0;s<a.length;++s){var l=a[s],u=r[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:r,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(hn(n)){for(var i=[],o=0;o<n.length;++o)void 0!==n[o]&&i.push(n[o]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,n){var i=e.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(e){return i}},encode:function(e,t,n,i,o){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",s=0;s<r.length;++s){var l=r.charCodeAt(s);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===cn.RFC1738&&(40===l||41===l)?a+=r.charAt(s):l<128?a+=pn[l]:l<2048?a+=pn[192|l>>6]+pn[128|63&l]:l<55296||l>=57344?a+=pn[224|l>>12]+pn[128|l>>6&63]+pn[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&r.charCodeAt(s)),a+=pn[240|l>>18]+pn[128|l>>12&63]+pn[128|l>>6&63]+pn[128|63&l])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(hn(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(hn(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!dn.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return hn(t)&&!hn(n)&&(o=fn(t,i)),hn(t)&&hn(n)?(n.forEach((function(n,o){if(dn.call(t,o)){var r=t[o];r&&"object"==typeof r&&n&&"object"==typeof n?t[o]=e(r,n,i):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var r=n[o];return dn.call(t,o)?t[o]=e(t[o],r,i):t[o]=r,t}),o)}},mn=gn,bn=un,vn=Object.prototype.hasOwnProperty,yn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},wn=Array.isArray,Cn=String.prototype.split,xn=Array.prototype.push,An=function(e,t){xn.apply(e,wn(t)?t:[t])},Sn=Date.prototype.toISOString,kn=bn.default,Tn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:mn.encode,encodeValuesOnly:!1,format:kn,formatter:bn.formatters[kn],indices:!1,serializeDate:function(e){return Sn.call(e)},skipNulls:!1,strictNullHandling:!1},_n=function e(t,n,i,o,r,a,s,l,u,c,d,h,p,f){var g,m=t;if("function"==typeof s?m=s(n,m):m instanceof Date?m=c(m):"comma"===i&&wn(m)&&(m=mn.maybeMap(m,(function(e){return e instanceof Date?c(e):e}))),null===m){if(o)return a&&!p?a(n,Tn.encoder,f,"key",d):n;m=""}if("string"==typeof(g=m)||"number"==typeof g||"boolean"==typeof g||"symbol"==typeof g||"bigint"==typeof g||mn.isBuffer(m)){if(a){var b=p?n:a(n,Tn.encoder,f,"key",d);if("comma"===i&&p){for(var v=Cn.call(String(m),","),y="",w=0;w<v.length;++w)y+=(0===w?"":",")+h(a(v[w],Tn.encoder,f,"value",d));return[h(b)+"="+y]}return[h(b)+"="+h(a(m,Tn.encoder,f,"value",d))]}return[h(n)+"="+h(String(m))]}var C,x=[];if(void 0===m)return x;if("comma"===i&&wn(m))C=[{value:m.length>0?m.join(",")||null:void 0}];else if(wn(s))C=s;else{var A=Object.keys(m);C=l?A.sort(l):A}for(var S=0;S<C.length;++S){var k=C[S],T="object"==typeof k&&void 0!==k.value?k.value:m[k];if(!r||null!==T){var _=wn(m)?"function"==typeof i?i(n,k):n:n+(u?"."+k:"["+k+"]");An(x,e(T,_,i,o,r,a,s,l,u,c,d,h,p,f))}}return x},En=gn,On=Object.prototype.hasOwnProperty,Pn=Array.isArray,Nn={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:En.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Mn=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},In=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Dn=function(e,t,n,i){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,r=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,l=[];if(s){if(!n.plainObjects&&On.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var u=0;n.depth>0&&null!==(a=r.exec(o))&&u<n.depth;){if(u+=1,!n.plainObjects&&On.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+o.slice(a.index)+"]"),function(e,t,n,i){for(var o=i?t:In(t,n),r=e.length-1;r>=0;--r){var a,s=e[r];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(l,t,n,i)}},Un={formats:un,parse:function(e,t){var n=function(e){if(!e)return Nn;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?Nn.charset:e.charset;return{allowDots:void 0===e.allowDots?Nn.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Nn.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Nn.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Nn.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Nn.comma,decoder:"function"==typeof e.decoder?e.decoder:Nn.decoder,delimiter:"string"==typeof e.delimiter||En.isRegExp(e.delimiter)?e.delimiter:Nn.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Nn.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Nn.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Nn.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Nn.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Nn.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var i="string"==typeof e?function(e,t){var n,i={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,r=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,r),s=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?l="utf-8":"utf8=%26%2310003%3B"===a[n]&&(l="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var u,c,d=a[n],h=d.indexOf("]="),p=-1===h?d.indexOf("="):h+1;-1===p?(u=t.decoder(d,Nn.decoder,l,"key"),c=t.strictNullHandling?null:""):(u=t.decoder(d.slice(0,p),Nn.decoder,l,"key"),c=En.maybeMap(In(d.slice(p+1),t),(function(e){return t.decoder(e,Nn.decoder,l,"value")}))),c&&t.interpretNumericEntities&&"iso-8859-1"===l&&(c=Mn(c)),d.indexOf("[]=")>-1&&(c=Pn(c)?[c]:c),On.call(i,u)?i[u]=En.combine(i[u],c):i[u]=c}return i}(e,n):e,o=n.plainObjects?Object.create(null):{},r=Object.keys(i),a=0;a<r.length;++a){var s=r[a],l=Dn(s,i[s],n,"string"==typeof e);o=En.merge(o,l,n)}return En.compact(o)},stringify:function(e,t){var n,i=e,o=function(e){if(!e)return Tn;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||Tn.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=bn.default;if(void 0!==e.format){if(!vn.call(bn.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=bn.formatters[n],o=Tn.filter;return("function"==typeof e.filter||wn(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:Tn.addQueryPrefix,allowDots:void 0===e.allowDots?Tn.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Tn.charsetSentinel,delimiter:void 0===e.delimiter?Tn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:Tn.encode,encoder:"function"==typeof e.encoder?e.encoder:Tn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:Tn.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:Tn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:Tn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Tn.strictNullHandling}}(t);"function"==typeof o.filter?i=(0,o.filter)("",i):wn(o.filter)&&(n=o.filter);var r,a=[];if("object"!=typeof i||null===i)return"";r=t&&t.arrayFormat in yn?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=yn[r];n||(n=Object.keys(i)),o.sort&&n.sort(o.sort);for(var l=0;l<n.length;++l){var u=n[l];o.skipNulls&&null===i[u]||An(a,_n(i[u],u,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset))}var c=a.join(o.delimiter),d=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),c.length>0?d+c:""}};function Ln(e){return Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ln(e)}var Bn=function(e){return null!==e&&"object"===Ln(e)};function Rn(e){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(e)}var jn=Bn,Hn=Fn;function Fn(e){if(e)return function(e){for(var t in Fn.prototype)Object.prototype.hasOwnProperty.call(Fn.prototype,t)&&(e[t]=Fn.prototype[t]);return e}(e)}Fn.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},Fn.prototype.parse=function(e){return this._parser=e,this},Fn.prototype.responseType=function(e){return this._responseType=e,this},Fn.prototype.serialize=function(e){return this._serializer=e,this},Fn.prototype.timeout=function(e){if(!e||"object"!==Rn(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},Fn.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var zn=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),$n=new Set([408,413,429,500,502,503,504,521,522,524]);Fn.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&$n.has(t.status))return!0;if(e){if(e.code&&zn.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},Fn.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},Fn.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var i=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){i.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),i.end((function(n,i){n?t(n):e(i)}))}))}return this._fullfilledPromise.then(e,t)},Fn.prototype.catch=function(e){return this.then(void 0,e)},Fn.prototype.use=function(e){return e(this),this},Fn.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},Fn.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},Fn.prototype.get=function(e){return this._header[e.toLowerCase()]},Fn.prototype.getHeader=Fn.prototype.get,Fn.prototype.set=function(e,t){if(jn(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},Fn.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},Fn.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(jn(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.field(e,t[i]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},Fn.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},Fn.prototype._auth=function(e,t,n,i){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(i("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},Fn.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},Fn.prototype.redirects=function(e){return this._maxRedirects=e,this},Fn.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},Fn.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},Fn.prototype.send=function(e){var t=jn(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&jn(this._data))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(this._data[i]=e[i]);else"string"==typeof e?(n||this.type("form"),(n=this._header["content-type"])&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},Fn.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},Fn.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},Fn.prototype._appendQueryString=function(){console.warn("Unsupported")},Fn.prototype._timeoutError=function(e,t,n){if(!this._aborted){var i=new Error("".concat(e+t,"ms exceeded"));i.timeout=t,i.code="ECONNABORTED",i.errno=n,this.timedout=!0,this.timedoutError=i,this.abort(),this.callback(i)}},Fn.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var Qn={};function Gn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}Qn.type=function(e){return e.split(/ *; */).shift()},Qn.params=function(e){var t,n={},i=Gn(e.split(/ *; */));try{for(i.s();!(t=i.n()).done;){var o=t.value.split(/ *= */),r=o.shift(),a=o.shift();r&&a&&(n[r]=a)}}catch(e){i.e(e)}finally{i.f()}return n},Qn.parseLinks=function(e){var t,n={},i=Gn(e.split(/ *, */));try{for(i.s();!(t=i.n()).done;){var o=t.value.split(/ *; */),r=o[0].slice(1,-1);n[o[1].split(/ *= */)[1].slice(1,-1)]=r}}catch(e){i.e(e)}finally{i.f()}return n},Qn.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e};var Wn=Qn,Vn=Yn;function Yn(e){if(e)return function(e){for(var t in Yn.prototype)Object.prototype.hasOwnProperty.call(Yn.prototype,t)&&(e[t]=Yn.prototype[t]);return e}(e)}function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Xn(){this._defaults=[]}Yn.prototype.get=function(e){return this.header[e.toLowerCase()]},Yn.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=Wn.type(t);var n=Wn.params(t);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(this[i]=n[i]);this.links={};try{e.link&&(this.links=Wn.parseLinks(e.link))}catch(e){}},Yn.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(e){Xn.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._defaults.push({fn:e,args:n}),this}})),Xn.prototype._setDefaults=function(e){this._defaults.forEach((function(t){e[t.fn].apply(e,function(e){return function(e){if(Array.isArray(e))return Kn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kn(e,t):void 0}}(e)||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.")}()}(t.args))}))};var Zn=Xn;!function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i;"undefined"!=typeof window?i=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),i=void 0):i=self;var o=Gt.exports,r=qt,a=Un,s=Hn,l=Bn,u=Vn,c=Zn;function d(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var h=t=e.exports;t.Request=y,h.getXHR=function(){if(i.XMLHttpRequest&&(!i.location||"file:"!==i.location.protocol||!i.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function f(e){if(!l(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&g(t,n,e[n]);return t.join("&")}function g(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){g(e,t,n)}));else if(l(n))for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&g(e,"".concat(t,"[").concat(i,"]"),n[i]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function m(e){for(var t,n,i={},o=e.split("&"),r=0,a=o.length;r<a;++r)-1===(n=(t=o[r]).indexOf("="))?i[decodeURIComponent(t)]="":i[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return i}function b(e){return/[/+]json($|[^-\w])/i.test(e)}function v(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,i,o,r=e.split(/\r?\n/),a={},s=0,l=r.length;s<l;++s)-1!==(t=(n=r[s]).indexOf(":"))&&(i=n.slice(0,t).toLowerCase(),o=p(n.slice(t+1)),a[i]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function y(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,i=null;try{i=new v(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",i);try{n._isResponseOK(i)||(e=new Error(i.statusText||i.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=i.status,n.callback(e,i)):n.callback(null,i)}))}function w(e,t,n){var i=h("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}h.serializeObject=f,h.parseString=m,h.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},h.serialize={"application/x-www-form-urlencoded":a.stringify,"application/json":r},h.parse={"application/x-www-form-urlencoded":m,"application/json":JSON.parse},u(v.prototype),v.prototype._parseBody=function(e){var t=h.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&b(this.type)&&(t=h.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},v.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,i="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(i);return o.status=this.status,o.method=t,o.url=n,o},h.Response=v,o(y.prototype),s(y.prototype),y.prototype.type=function(e){return this.set("Content-Type",h.types[e]||e),this},y.prototype.accept=function(e){return this.set("Accept",h.types[e]||e),this},y.prototype.auth=function(e,t,i){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(i=t,t=""),i||(i={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,i,o)},y.prototype.query=function(e){return"string"!=typeof e&&(e=f(e)),e&&this._query.push(e),this},y.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},y.prototype._getFormData=function(){return this._formData||(this._formData=new i.FormData),this._formData},y.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},y.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},y.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},y.prototype.ca=y.prototype.agent,y.prototype.buffer=y.prototype.ca,y.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},y.prototype.pipe=y.prototype.write,y.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},y.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||d,this._finalizeQueryString(),this._end()},y.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},y.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=h.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var i=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",i.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",i.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],r=this._serializer||h.serialize[o?o.split(";")[0]:""];!r&&b(o)&&(r=h.serialize["application/json"]),r&&(n=r(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&t.setRequestHeader(a,this.header[a]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},h.agent=function(){return new c},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){c.prototype[e.toLowerCase()]=function(t,n){var i=new h.Request(e,t);return this._setDefaults(i),n&&i.end(n),i}})),c.prototype.del=c.prototype.delete,h.get=function(e,t,n){var i=h("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},h.head=function(e,t,n){var i=h("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},h.options=function(e,t,n){var i=h("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},h.del=w,h.delete=w,h.patch=function(e,t,n){var i=h("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},h.post=function(e,t,n){var i=h("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},h.put=function(e,t,n){var i=h("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}}(Qt,Qt.exports);var Jn=Qt.exports;function ei(e){var t=(new Date).getTime(),n=(new Date).toISOString(),i=console&&console.log?console:window&&window.console&&window.console.log?window.console:console;i.log("<<<<<"),i.log("[".concat(n,"]"),"\n",e.url,"\n",e.qs),i.log("-----"),e.on("response",(function(n){var o=(new Date).getTime()-t,r=(new Date).toISOString();i.log(">>>>>>"),i.log("[".concat(r," / ").concat(o,"]"),"\n",e.url,"\n",e.qs,"\n",n.text),i.log("-----")}))}function ti(e,t,n){var i=this;this._config.logVerbosity&&(e=e.use(ei)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e));var o=e;if(t.abortSignal)var r=t.abortSignal.subscribe((function(){o.abort(),r()}));return!0===t.forceBuffered?o="undefined"==typeof Blob?o.buffer().responseType("arraybuffer"):o.responseType("arraybuffer"):!1===t.forceBuffered&&(o=o.buffer(!1)),(o=o.timeout(t.timeout)).on("abort",(function(){return n({category:N.PNUnknownCategory,error:!0,operation:t.operation,errorData:new Error("Aborted")},null)})),o.end((function(e,o){var r,a={};if(a.error=null!==e,a.operation=t.operation,o&&o.status&&(a.statusCode=o.status),e){if(e.response&&e.response.text&&!i._config.logVerbosity)try{a.errorData=JSON.parse(e.response.text)}catch(t){a.errorData=e}else a.errorData=e;return a.category=i._detectErrorCategory(e),n(a,null)}if(t.ignoreBody)r={headers:o.headers,redirects:o.redirects,response:o};else try{r=JSON.parse(o.text)}catch(e){return a.errorData=o,a.error=!0,n(a,null)}return r.error&&1===r.error&&r.status&&r.message&&r.service?(a.errorData=r,a.statusCode=r.status,a.error=!0,a.category=i._detectErrorCategory(a),n(a,null)):(r.error&&r.error.message&&(a.errorData=r.error),n(a,r))})),o}function ni(e,t,n){return r(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:return i=Jn.post(e),t.forEach((function(e){var t=e.key,n=e.value;i=i.field(t,n)})),i.attach("file",n,{contentType:"application/octet-stream"}),[4,i];case 1:return[2,o.sent()]}}))}))}function ii(e,t,n){var i=Jn.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return ti.call(this,i,t,n)}function oi(e,t,n){var i=Jn.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return ti.call(this,i,t,n)}function ri(e,t,n,i){var o=Jn.post(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return ti.call(this,o,n,i)}function ai(e,t,n,i){var o=Jn.patch(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return ti.call(this,o,n,i)}function si(e,t,n){var i=Jn.delete(this.getStandardOrigin()+t.url).set(t.headers).query(e);return ti.call(this,i,t,n)}function li(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer}var ui,ci=function(){function e(){}return Object.defineProperty(e.prototype,"algo",{get:function(){return"aes-256-cbc"},enumerable:!1,configurable:!0}),e.prototype.encrypt=function(e,t){return r(this,void 0,void 0,(function(){var n;return a(this,(function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.encryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.encryptString(n,t)];throw new Error("Cannot encrypt this file. In browsers file encryption supports only string or ArrayBuffer")}}))}))},e.prototype.decrypt=function(e,t){return r(this,void 0,void 0,(function(){var n;return a(this,(function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.decryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.decryptString(n,t)];throw new Error("Cannot decrypt this file. In browsers file decryption supports only string or ArrayBuffer")}}))}))},e.prototype.encryptFile=function(e,t,n){return r(this,void 0,void 0,(function(){var i,o,r;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.toArrayBuffer()];case 2:return o=a.sent(),[4,this.encryptArrayBuffer(i,o)];case 3:return r=a.sent(),[2,n.create({name:t.name,mimeType:"application/octet-stream",data:r})]}}))}))},e.prototype.decryptFile=function(e,t,n){return r(this,void 0,void 0,(function(){var i,o,r;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.toArrayBuffer()];case 2:return o=a.sent(),[4,this.decryptArrayBuffer(i,o)];case 3:return r=a.sent(),[2,n.create({name:t.name,data:r})]}}))}))},e.prototype.getKey=function(e){return r(this,void 0,void 0,(function(){var t,n,i;return a(this,(function(o){switch(o.label){case 0:return t=Buffer.from(e),[4,crypto.subtle.digest("SHA-256",t.buffer)];case 1:return n=o.sent(),i=Buffer.from(Buffer.from(n).toString("hex").slice(0,32),"utf8").buffer,[2,crypto.subtle.importKey("raw",i,"AES-CBC",!0,["encrypt","decrypt"])]}}))}))},e.prototype.encryptArrayBuffer=function(e,t){return r(this,void 0,void 0,(function(){var n,i,o;return a(this,(function(r){switch(r.label){case 0:return n=crypto.getRandomValues(new Uint8Array(16)),i=li,o=[n.buffer],[4,crypto.subtle.encrypt({name:"AES-CBC",iv:n},e,t)];case 1:return[2,i.apply(void 0,o.concat([r.sent()]))]}}))}))},e.prototype.decryptArrayBuffer=function(e,t){return r(this,void 0,void 0,(function(){var n;return a(this,(function(i){return n=t.slice(0,16),[2,crypto.subtle.decrypt({name:"AES-CBC",iv:n},e,t.slice(16))]}))}))},e.prototype.encryptString=function(e,t){return r(this,void 0,void 0,(function(){var n,i,o,r;return a(this,(function(a){switch(a.label){case 0:return n=crypto.getRandomValues(new Uint8Array(16)),i=Buffer.from(t).buffer,[4,crypto.subtle.encrypt({name:"AES-CBC",iv:n},e,i)];case 1:return o=a.sent(),r=li(n.buffer,o),[2,Buffer.from(r).toString("utf8")]}}))}))},e.prototype.decryptString=function(e,t){return r(this,void 0,void 0,(function(){var n,i,o,r;return a(this,(function(a){switch(a.label){case 0:return n=Buffer.from(t),i=n.slice(0,16),o=n.slice(16),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:i},e,o)];case 1:return r=a.sent(),[2,Buffer.from(r).toString("utf8")]}}))}))},e.IV_LENGTH=16,e}(),di=(ui=function(){function e(e){if(e instanceof File)this.data=e,this.name=this.data.name,this.mimeType=this.data.type;else if(e.data){var t=e.data;this.data=new File([t],e.name,{type:e.mimeType}),this.name=e.name,e.mimeType&&(this.mimeType=e.mimeType)}if(void 0===this.data)throw new Error("Couldn't construct a file out of supplied options.");if(void 0===this.name)throw new Error("Couldn't guess filename out of the options. Please provide one.")}return e.create=function(e){return new this(e)},e.prototype.toBuffer=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){throw new Error("This feature is only supported in Node.js environments.")}))}))},e.prototype.toStream=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){throw new Error("This feature is only supported in Node.js environments.")}))}))},e.prototype.toFileUri=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){throw new Error("This feature is only supported in react native environments.")}))}))},e.prototype.toBlob=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.data]}))}))},e.prototype.toArrayBuffer=function(){return r(this,void 0,void 0,(function(){var e=this;return a(this,(function(t){return[2,new Promise((function(t,n){var i=new FileReader;i.addEventListener("load",(function(){if(i.result instanceof ArrayBuffer)return t(i.result)})),i.addEventListener("error",(function(){n(i.error)})),i.readAsArrayBuffer(e.data)}))]}))}))},e.prototype.toString=function(){return r(this,void 0,void 0,(function(){var e=this;return a(this,(function(t){return[2,new Promise((function(t,n){var i=new FileReader;i.addEventListener("load",(function(){if("string"==typeof i.result)return t(i.result)})),i.addEventListener("error",(function(){n(i.error)})),i.readAsBinaryString(e.data)}))]}))}))},e.prototype.toFile=function(){return r(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.data]}))}))},e}(),ui.supportsFile="undefined"!=typeof File,ui.supportsBlob="undefined"!=typeof Blob,ui.supportsArrayBuffer="undefined"!=typeof ArrayBuffer,ui.supportsBuffer=!1,ui.supportsStream=!1,ui.supportsString=!0,ui.supportsEncryptFile=!0,ui.supportsFileUri=!1,ui);function hi(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}var pi=function(e){function n(t){var n=this,i=t.listenToBrowserNetworkEvents,o=void 0===i||i;return t.sdkFamily="Web",t.networking=new Ft({del:si,get:oi,post:ri,patch:ai,sendBeacon:hi,getfile:ii,postfile:ni}),t.cbor=new $t((function(e){return zt(h.decode(e))}),b),t.PubNubFile=di,t.cryptography=new ci,n=e.call(this,t)||this,o&&(window.addEventListener("offline",(function(){n.networkDownDetected()})),window.addEventListener("online",(function(){n.networkUpDetected()}))),n}return t(n,e),n}(Ht);return pi}()},3379:e=>{var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var r={},a=[],s=0;s<e.length;s++){var l=e[s],u=i.base?l[0]+i.base:l[0],c=r[u]||0,d="".concat(u," ").concat(c);r[u]=c+1;var h=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=o(p,i);i.byIndex=s,t.splice(s,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var r=i(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=n(r[a]);t[s].references--}for(var l=i(e,o),u=0;u<r.length;u++){var c=n(r[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}r=l}}},569:e=>{var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},9216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};(()=>{n.d(i,{l:()=>Us,Z:()=>Ds});var e=n(9669),t=n.n(e);const o=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),a=new Map;class s{constructor(e,t){if(this._$cssResult$=!0,t!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=a.get(this.cssText);return o&&void 0===e&&(a.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const l=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1]),e[0]);return new s(n,r)},u=o?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new s("string"==typeof e?e:e+"",r))(t)})(e):e;var c;const d=window.trustedTypes,h=d?d.emptyScript:"",p=window.reactiveElementPolyfillSupport,f={toAttribute(e,t){switch(t){case Boolean:e=e?h:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},g=(e,t)=>t!==e&&(t==t||e==e),m={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:g};class b extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const i=this._$Eh(n,t);void 0!==i&&(this._$Eu.set(i,n),e.push(i))})),e}static createProperty(e,t=m){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const o=this[e];this[t]=i,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||m}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(u(e))}else void 0!==e&&t.push(u(e));return t}static _$Eh(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{o?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),i=window.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=t.cssText,e.appendChild(n)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ES(e,t,n=m){var i,o;const r=this.constructor._$Eh(e,n);if(void 0!==r&&!0===n.reflect){const a=(null!==(o=null===(i=n.converter)||void 0===i?void 0:i.toAttribute)&&void 0!==o?o:f.toAttribute)(t,n.type);this._$Ei=e,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$Ei=null}}_$AK(e,t){var n,i,o;const r=this.constructor,a=r._$Eu.get(e);if(void 0!==a&&this._$Ei!==a){const e=r.getPropertyOptions(a),s=e.converter,l=null!==(o=null!==(i=null===(n=s)||void 0===n?void 0:n.fromAttribute)&&void 0!==i?i:"function"==typeof s?s:null)&&void 0!==o?o:f.fromAttribute;this._$Ei=a,this[a]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,n){let i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||g)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Ei!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((e,t)=>this[t]=e)),this._$Et=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$ES(t,this[t],e))),this._$EC=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var v;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==p||p({ReactiveElement:b}),(null!==(c=globalThis.reactiveElementVersions)&&void 0!==c?c:globalThis.reactiveElementVersions=[]).push("1.3.1");const y=globalThis.trustedTypes,w=y?y.createPolicy("lit-html",{createHTML:e=>e}):void 0,C=`lit$${(Math.random()+"").slice(9)}$`,x="?"+C,A=`<${x}>`,S=document,k=(e="")=>S.createComment(e),T=e=>null===e||"object"!=typeof e&&"function"!=typeof e,_=Array.isArray,E=e=>{var t;return _(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,M=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,I=/'/g,D=/"/g,U=/^(?:script|style|textarea|title)$/i,L=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),B=L(1),R=L(2),j=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),F=new WeakMap,z=S.createTreeWalker(S,129,null,!1),$=(e,t)=>{const n=e.length-1,i=[];let o,r=2===t?"<svg>":"",a=O;for(let t=0;t<n;t++){const n=e[t];let s,l,u=-1,c=0;for(;c<n.length&&(a.lastIndex=c,l=a.exec(n),null!==l);)c=a.lastIndex,a===O?"!--"===l[1]?a=P:void 0!==l[1]?a=N:void 0!==l[2]?(U.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=M):void 0!==l[3]&&(a=M):a===M?">"===l[0]?(a=null!=o?o:O,u=-1):void 0===l[1]?u=-2:(u=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?M:'"'===l[3]?D:I):a===D||a===I?a=M:a===P||a===N?a=O:(a=M,o=void 0);const d=a===M&&e[t+1].startsWith("/>")?" ":"";r+=a===O?n+A:u>=0?(i.push(s),n.slice(0,u)+"$lit$"+n.slice(u)+C+d):n+C+(-2===u?(i.push(void 0),t):d)}const s=r+(e[n]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(s):s,i]};class Q{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let o=0,r=0;const a=e.length-1,s=this.parts,[l,u]=$(e,t);if(this.el=Q.createElement(l,n),z.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=z.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(C)){const n=u[r++];if(e.push(t),void 0!==n){const e=i.getAttribute(n.toLowerCase()+"$lit$").split(C),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:o,name:t[2],strings:e,ctor:"."===t[1]?Y:"?"===t[1]?X:"@"===t[1]?Z:V})}else s.push({type:6,index:o})}for(const t of e)i.removeAttribute(t)}if(U.test(i.tagName)){const e=i.textContent.split(C),t=e.length-1;if(t>0){i.textContent=y?y.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],k()),z.nextNode(),s.push({type:2,index:++o});i.append(e[t],k())}}}else if(8===i.nodeType)if(i.data===x)s.push({type:2,index:o});else{let e=-1;for(;-1!==(e=i.data.indexOf(C,e+1));)s.push({type:7,index:o}),e+=C.length-1}o++}}static createElement(e,t){const n=S.createElement("template");return n.innerHTML=e,n}}function G(e,t,n=e,i){var o,r,a,s;if(t===j)return t;let l=void 0!==i?null===(o=n._$Cl)||void 0===o?void 0:o[i]:n._$Cu;const u=T(t)?void 0:t._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===u?l=void 0:(l=new u(e),l._$AT(e,n,i)),void 0!==i?(null!==(a=(s=n)._$Cl)&&void 0!==a?a:s._$Cl=[])[i]=l:n._$Cu=l),void 0!==l&&(t=G(e,l._$AS(e,t.values),l,i)),t}class q{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:n},parts:i}=this._$AD,o=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:S).importNode(n,!0);z.currentNode=o;let r=z.nextNode(),a=0,s=0,l=i[0];for(;void 0!==l;){if(a===l.index){let t;2===l.type?t=new W(r,r.nextSibling,this,e):1===l.type?t=new l.ctor(r,l.name,l.strings,this,e):6===l.type&&(t=new J(r,this,e)),this.v.push(t),l=i[++s]}a!==(null==l?void 0:l.index)&&(r=z.nextNode(),a++)}return o}m(e){let t=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class W{constructor(e,t,n,i){var o;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cg=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cg}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=G(this,e,t),T(e)?e===H||null==e||""===e?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==j&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.k(e):E(e)?this.S(e):this.$(e)}M(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.M(e))}$(e){this._$AH!==H&&T(this._$AH)?this._$AA.nextSibling.data=e:this.k(S.createTextNode(e)),this._$AH=e}T(e){var t;const{values:n,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Q.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===o)this._$AH.m(n);else{const e=new q(o,this),t=e.p(this.options);e.m(n),this.k(t),this._$AH=e}}_$AC(e){let t=F.get(e.strings);return void 0===t&&F.set(e.strings,t=new Q(e)),t}S(e){_(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const o of e)i===t.length?t.push(n=new W(this.M(k()),this.M(k()),this,this.options)):n=t[i],n._$AI(o),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cg=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class V{constructor(e,t,n,i,o){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){const o=this.strings;let r=!1;if(void 0===o)e=G(this,e,t,0),r=!T(e)||e!==this._$AH&&e!==j,r&&(this._$AH=e);else{const i=e;let a,s;for(e=o[0],a=0;a<o.length-1;a++)s=G(this,i[n+a],t,a),s===j&&(s=this._$AH[a]),r||(r=!T(s)||s!==this._$AH[a]),s===H?e=H:e!==H&&(e+=(null!=s?s:"")+o[a+1]),this._$AH[a]=s}r&&!i&&this.C(e)}C(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class Y extends V{constructor(){super(...arguments),this.type=3}C(e){this.element[this.name]=e===H?void 0:e}}const K=y?y.emptyScript:"";class X extends V{constructor(){super(...arguments),this.type=4}C(e){e&&e!==H?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class Z extends V{constructor(e,t,n,i,o){super(e,t,n,i,o),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=G(this,e,t,0))&&void 0!==n?n:H)===j)return;const i=this._$AH,o=e===H&&i!==H||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==H&&(i===H||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class J{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){G(this,e)}}const ee={L:"$lit$",P:C,V:x,I:1,N:$,R:q,j:E,D:G,H:W,F:V,O:X,W:Z,B:Y,Z:J},te=window.litHtmlPolyfillSupport;var ne,ie;null==te||te(Q,W),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.2.2");class oe extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=((e,t,n)=>{var i,o;const r=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t;let a=r._$litPart$;if(void 0===a){const e=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;r._$litPart$=a=new W(t.insertBefore(k(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return j}}oe.finalized=!0,oe._$litElement$=!0,null===(ne=globalThis.litElementHydrateSupport)||void 0===ne||ne.call(globalThis,{LitElement:oe});const re=globalThis.litElementPolyfillSupport;null==re||re({LitElement:oe}),(null!==(ie=globalThis.litElementVersions)&&void 0!==ie?ie:globalThis.litElementVersions=[]).push("3.2.0");const ae=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:i}=t;return{kind:n,elements:i,finisher(t){window.customElements.define(e,t)}}})(e,t),se=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(n){n.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function le(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):se(e,t)}function ue(e){return le({...e,state:!0})}function ce(e,t){return(({finisher:e,descriptor:t})=>(n,i)=>{var o;if(void 0===i){const i=null!==(o=n.originalKey)&&void 0!==o?o:n.key,r=null!=t?{kind:"method",placement:"prototype",key:i,descriptor:t(n.key)}:{...n,key:i};return null!=e&&(r.finisher=function(t){e(t,i)}),r}{const o=n.constructor;void 0!==t&&Object.defineProperty(n,i,t(i)),null==e||e(o,i)}})({descriptor:n=>{const i={get(){var t,n;return null!==(n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof n?Symbol():"__"+n;i.get=function(){var n,i;return void 0===this[t]&&(this[t]=null!==(i=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(e))&&void 0!==i?i:null),this[t]}}return i}})}var de;null===(de=window.HTMLSlotElement)||void 0===de||de.prototype.assignedElements;const he=e=>(...t)=>({_$litDirective$:e,values:t});class pe{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const fe=he(class extends pe{constructor(e){var t;if(super(e),1!==e.type||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.et){this.et=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(n=this.st)||void 0===n?void 0:n.has(e))&&this.et.add(e);return this.render(t)}const o=e.element.classList;this.et.forEach((e=>{e in t||(o.remove(e),this.et.delete(e))}));for(const e in t){const n=!!t[e];n===this.et.has(e)||(null===(i=this.st)||void 0===i?void 0:i.has(e))||(n?(o.add(e),this.et.add(e)):(o.remove(e),this.et.delete(e)))}return j}}),{H:ge}=ee,me=(e,t)=>{var n,i;const o=e._$AN;if(void 0===o)return!1;for(const e of o)null===(i=(n=e)._$AO)||void 0===i||i.call(n,t,!1),me(e,t);return!0},be=e=>{let t,n;do{if(void 0===(t=e._$AM))break;n=t._$AN,n.delete(e),e=t}while(0===(null==n?void 0:n.size))},ve=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Ce(t)}};function ye(e){void 0!==this._$AN?(be(this),this._$AM=e,ve(this)):this._$AM=e}function we(e,t=!1,n=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)me(i[e],!1),be(i[e]);else null!=i&&(me(i,!1),be(i));else me(this,e)}const Ce=e=>{var t,n,i,o;2==e.type&&(null!==(t=(i=e)._$AP)&&void 0!==t||(i._$AP=we),null!==(n=(o=e)._$AQ)&&void 0!==n||(o._$AQ=ye))};class xe extends pe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),ve(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n,i;e!==this.isConnected&&(this.isConnected=e,e?null===(n=this.reconnected)||void 0===n||n.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),t&&(me(this,e),be(this))}setValue(e){if((e=>void 0===this._$Ct.strings)())this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const Ae=()=>new Se;class Se{}const ke=new WeakMap,Te=he(class extends xe{render(e){return H}update(e,[t]){var n;const i=t!==this.U;return i&&void 0!==this.U&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.U=t,this.ht=null===(n=e.options)||void 0===n?void 0:n.host,this.ot(this.lt=e.element)),H}ot(e){var t;if("function"==typeof this.U){const n=null!==(t=this.ht)&&void 0!==t?t:globalThis;let i=ke.get(n);void 0===i&&(i=new WeakMap,ke.set(n,i)),void 0!==i.get(this.U)&&this.U.call(this.ht,void 0),i.set(this.U,e),void 0!==e&&this.U.call(this.ht,e)}else this.U.value=e}get rt(){var e,t,n;return"function"==typeof this.U?null===(t=ke.get(null!==(e=this.ht)&&void 0!==e?e:globalThis))||void 0===t?void 0:t.get(this.U):null===(n=this.U)||void 0===n?void 0:n.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),_e=e=>{const t=e.replace(/\D/g,"").substring(0,10),n=t.substring(0,3),i=t.substring(3,6),o=t.substring(6,10);return t.length>5?`(${n}) ${i}-${o}`:t.length>2?`(${n}) ${i}`:t.length>0?`(${n}`:""},Ee=e=>{const t=(""+e).replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);return t?[t[1]?"+1 ":"","(",t[2],") ",t[3],"-",t[4]].join(""):e},Oe=e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105},Pe=e=>e.altKey||e.ctrlKey||e.metaKey,Ne=e=>{const t=e.keyCode;return e.shiftKey||35===t||36===t||8===t||9===t||13===t||46===t||t>36&&t<41||(e.ctrlKey||e.metaKey)&&(65===t||67===t||76===t||86===t||88===t||90===t)},Me=he(class extends pe{constructor(e){var t;if(super(e),1!==e.type||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,n)=>{const i=e[n];return null==i?t:t+`${n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(e,[t]){const{style:n}=e.element;if(void 0===this.ct){this.ct=new Set;for(const e in t)this.ct.add(e);return this.render(t)}this.ct.forEach((e=>{null==t[e]&&(this.ct.delete(e),e.includes("-")?n.removeProperty(e):n[e]="")}));for(const e in t){const i=t[e];null!=i&&(this.ct.add(e),e.includes("-")?n.setProperty(e,i):n[e]=i)}return j}}),Ie="#646987",De="#ffffff",Ue=(e,t)=>{let n=parseInt(e.substr(1,2),16),i=parseInt(e.substr(3,2),16),o=parseInt(e.substr(5,2),16);return n=Math.round(n*(1-t)+255*t),i=Math.round(i*(1-t)+255*t),o=Math.round(o*(1-t)+255*t),"#"+n.toString(16).padStart(2,"0")+i.toString(16).padStart(2,"0")+o.toString(16).padStart(2,"0")},Le=(e,t)=>2===e||70392===t;var Be=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Re=class extends oe{constructor(){super(...arguments),this.heading="",this.subtitle="",this.selected=!1,this.primaryColor=Ie,this.backgroundColor=De,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black"}render(){return B`
3
3
  <div
4
4
  class="tour-type-option"
5
5
  tabindex="0"
@@ -5105,7 +5105,7 @@ xmlns="http://www.w3.org/2000/svg"
5105
5105
  ${_o}
5106
5106
  ${Eo}
5107
5107
  ${Oo}
5108
- `,da([le({attribute:!0})],ha.prototype,"isMinimized",void 0),da([le()],ha.prototype,"mobileStyles",void 0),da([le({type:Boolean})],ha.prototype,"isFirstMount",void 0),da([le({attribute:!1})],ha.prototype,"autoOpenChatWidget",void 0),da([le()],ha.prototype,"phoneNumber",void 0),da([le({attribute:!0})],ha.prototype,"buildingName",void 0),da([le({attribute:!0})],ha.prototype,"chatId",void 0),da([le({attribute:!0})],ha.prototype,"orgLegalName",void 0),da([le({attribute:!0})],ha.prototype,"chatCallUsHeader",void 0),da([le({attribute:!1})],ha.prototype,"buildingId",void 0),da([le({attribute:!0})],ha.prototype,"buildingSlug",void 0),da([le({attribute:!0})],ha.prototype,"orgSlug",void 0),da([le({attribute:!0})],ha.prototype,"sgtUrl",void 0),da([le({attribute:!0})],ha.prototype,"selfGuidedTourEnabled",void 0),da([le({attribute:!0})],ha.prototype,"selfGuidedToursTypeOffered",void 0),da([le({attribute:!0})],ha.prototype,"designConcept",void 0),da([le({attribute:!0})],ha.prototype,"featureFlagShowDropdown",void 0),da([le({attribute:!1})],ha.prototype,"leadSources",void 0),da([le({attribute:!0})],ha.prototype,"currentLeadSource",void 0),da([le({attribute:!0})],ha.prototype,"escortedToursLink",void 0),da([le({attribute:!0})],ha.prototype,"virtualToursLink",void 0),da([le({attribute:!0})],ha.prototype,"virtualToursTypeOffered",void 0),da([le({type:Boolean})],ha.prototype,"hasChatEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasChatEnabledMobile",void 0),da([le({type:Boolean})],ha.prototype,"hasEmailEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasEmailEnabledMobile",void 0),da([le({attribute:!0})],ha.prototype,"hasApplyNowEnabledDesktop",void 0),da([le({attribute:!0})],ha.prototype,"hasApplyNowEnabledMobile",void 0),da([le({attribute:!0})],ha.prototype,"applicationLink",void 0),da([le({type:Boolean})],ha.prototype,"hasCallUsEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasCallUsEnabledMobile",void 0),da([le({type:Boolean})],ha.prototype,"hasTextUsEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasTextUsEnabledMobile",void 0),da([le({type:Boolean})],ha.prototype,"hasSSTEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasSSTEnabledMobile",void 0),da([le({attribute:!1})],ha.prototype,"tourTypeOptions",void 0),da([le({attribute:!0})],ha.prototype,"hasDynamicSchedulingEnabled",void 0),da([le({attribute:!0})],ha.prototype,"hasPricingCalculatorEnabledDesktop",void 0),da([le({attribute:!0})],ha.prototype,"hasPricingCalculatorEnabledMobile",void 0),da([le({attribute:!1})],ha.prototype,"hasHideMobileFeatures",void 0),da([le({type:Number})],ha.prototype,"right",void 0),da([le({type:Number})],ha.prototype,"bottom",void 0),da([le({type:Number})],ha.prototype,"top",void 0),da([le({type:Number})],ha.prototype,"left",void 0),da([le({attribute:!0})],ha.prototype,"showTourNextToChat",void 0),da([le({attribute:!1})],ha.prototype,"onChatTapped",void 0),da([le({attribute:!0})],ha.prototype,"onClickMinimize",void 0),da([le({attribute:!0})],ha.prototype,"onSstClose",void 0),da([le({attribute:!0})],ha.prototype,"overrideRentgrata",void 0),da([le({attribute:!1})],ha.prototype,"launcherStyles",void 0),da([le({attribute:!0})],ha.prototype,"primaryColor",void 0),da([le({attribute:!0})],ha.prototype,"backgroundColor",void 0),da([le({attribute:!0})],ha.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),da([le({attribute:!0})],ha.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),da([le({attribute:!0})],ha.prototype,"leadSourceClient",void 0),da([ue()],ha.prototype,"isEmailWindowOpen",void 0),da([ue()],ha.prototype,"isCallUsWindowOpen",void 0),da([ue()],ha.prototype,"isSSTWindowOpen",void 0),da([ue()],ha.prototype,"isTextUsWindowOpen",void 0),da([ue()],ha.prototype,"isCalculatorWindowOpen",void 0),da([ue()],ha.prototype,"isMobileFeaturesExpanded",void 0),ha=da([ae("meetelise-launcher")],ha);const pa=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",ha)};var fa=n(3379),ga=n.n(fa),ma=n(7795),ba=n.n(ma),va=n(569),ya=n.n(va),wa=n(3565),Ca=n.n(wa),xa=n(9216),Aa=n.n(xa),Sa=n(4589),ka=n.n(Sa),Ta=n(3631),_a={};async function Ea(e,n){try{const i=await t().get(`https://app.meetelise.com/platformApi/webchat/${n}/lead-sources`);if(i.data){if("7e352741-1120-4ccf-9929-5dc99193a908"===e){const e=["Zillow","Apartments.com","Google PPC","Google Maps","Apple Maps","Social Media","Print Marketing"];return i.data.filter((t=>e.includes(t)))}return Oa(i.data,n)}return[]}catch(e){return[]}}_a.styleTagTransform=ka(),_a.setAttributes=Ca(),_a.insert=ya().bind(null,"head"),_a.domAPI=ba(),_a.insertStyleElement=Aa(),ga()(Ta.Z,_a),Ta.Z&&Ta.Z.locals&&Ta.Z.locals;const Oa=(e,t)=>{let n=[];switch(t){case"d41619ec-0f79-11ee-8439-93855926ad58":n=["Forthea - PPC","HotPads","Forthea","Locator","Website-apartmentguide.com","Forthea - organic search","Tdc employee","University newspaper","Nashville apartment locators","Forthea - paid social","Apartment list","Off campus partners","Waze ads","Athletic event","Website-apartment guide"];break;case"d4160560-0f79-11ee-8438-fba837bf3a46":n=["Forthea - PPC","Rentgrata","Website-ApartmentFinder.com","Word of Mouth","Texas A&M A-Frame on Campus","Rent.com","Website-craigslist","Apartment List","Website-apartments.com","Forthea - paid social","Forthea - organic search","Website-apartmentguide.com","Forthea","Uhomes","Phone book","Property - website"];break;default:n=[]}return e.sort(),e.filter((e=>{const t=e.toLowerCase();return!n.map((e=>e.toLowerCase())).includes(t)}))};var Pa,Na=n(9594),Ma=n.n(Na),Ia=new Uint8Array(16);function Da(){if(!Pa&&!(Pa="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pa(Ia)}const Ua=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,La=function(e){return"string"==typeof e&&Ua.test(e)};for(var Ba=[],Ra=0;Ra<256;++Ra)Ba.push((Ra+256).toString(16).substr(1));const ja=function(e,t,n){var i=(e=e||{}).random||(e.rng||Da)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=i[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ba[e[t+0]]+Ba[e[t+1]]+Ba[e[t+2]]+Ba[e[t+3]]+"-"+Ba[e[t+4]]+Ba[e[t+5]]+"-"+Ba[e[t+6]]+Ba[e[t+7]]+"-"+Ba[e[t+8]]+Ba[e[t+9]]+"-"+Ba[e[t+10]]+Ba[e[t+11]]+Ba[e[t+12]]+Ba[e[t+13]]+Ba[e[t+14]]+Ba[e[t+15]]).toLowerCase();if(!La(n))throw TypeError("Stringified UUID is invalid");return n}(i)},Ha=e=>localStorage.removeItem("com.elise.webchat.slug="+e),Fa=(e,t,n)=>{const i=kn(new Date),o=n||`lead_${ja()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:o,timestamp:i,initiatedChat:t})),{leadId:o,timestamp:Mn(i),buildingSlug:e,initiatedChat:t}},za=e=>{const t=localStorage.getItem("com.elise.webchat.slug="+e);if(t)try{const n=JSON.parse(t),i={leadId:n.leadId,timestamp:new Date(n.timestamp),buildingSlug:n.buildingSlug,initiatedChat:n.initiatedChat};if($a(e,i))return i}catch(e){console.warn("Error getting chat storage key")}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},$a=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if(pn(t.timestamp,e))return!1}}catch(e){console.warn("Error checking chat storage key validity")}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp||vn(t.timestamp,24))};var Qa;!function(e){e.noReply="no-reply",e.text="text",e.media="media"}(Qa||(Qa={}));const Ga=e=>e.type===Wa.text,qa=e=>e.type===Wa.media;var Wa;!function(e){e.text="text",e.media="media"}(Wa||(Wa={}));const Va=class{constructor(e,t,n,i=null,o,r=null,a=Is.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.widgetType=Is.Default,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t,n;const i={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,i],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter((e=>e.message.messageType!==Qa.noReply)),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const o="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:o}),!o&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=o,"ai_message"===e.message.customType&&this.simpleChatMessages.some((e=>e.type===Wa.text&&e.message.includes("confirmed for your tour")))&&ui("scheduledTourEvent",{tourDetails:e.message,buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.checkAndHandleGTMForLeadEmail(e)}},this.isLoadingMessages=!1,this.isFirstChatMessageSent=!1,this.streamingMessageTimeout=null,this.checkAndHandleDelayStreamingMessages=({delayToFetchHistoryInMs:e=1e4}={})=>{this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null);const t=this.simpleChatMessages.some((e=>{if(!Ga(e))return!1;const t=e.chunks.find((e=>e.isDone));return!t||e.chunks.length===t.order}));t&&(this.streamingMessageTimeout=setTimeout((()=>{xi({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:Ci.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),console.warn(`PUBNUB_WARN_DELAYED_STREAMING_MESSAGES: ${e}`),this.getChannelHistory()}),e))},this.checkAndHandleGTMForLeadEmail=e=>{var t;try{if("lead_message"!==e.message.customType)return;if(!(e=>{try{return/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b/.test(e)}catch(e){return console.warn("Error checking if message contains email",e),!1}})(e.message.text))return;ui("leadProvidedEmail",{buildingId:null===(t=this.buildingWebchatView)||void 0===t?void 0:t.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel})}catch(e){return}},this.markEveryPreviousNoReplyMessageDone=e=>{var t,n;for(let i=e.length-1;i>=0;i--){const o=null===(t=e[i])||void 0===t?void 0:t.message,r=i>0&&(null===(n=e[i-1])||void 0===n?void 0:n.message);(null==o?void 0:o.messageType)===Qa.noReply&&r&&(r.is_done=!0)}},this.checkMessageChunkValid=e=>{try{return!!e.message&&!!e.message.text&&e.message.text.length>0&&!!e.message.customType}catch(e){return!1}},this.handleChatListeners=()=>{if(this.pubnub&&this.channel)try{this.pubnub.subscribe({channels:[this.channel]}),this.pubnub.addListener(this.listenerParams)}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}},this.handleDisconnect=()=>{this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null),this.removeChatListeners()},this.removeChatListeners=()=>{this.pubnub&&this.channel&&(this.pubnub.unsubscribe({channels:[this.channel]}),this.pubnub.removeListener(this.listenerParams))},this.sendMessage=async e=>{if(e){if(!this.pubnub){const e=Fa(this.buildingSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken((async()=>{var t,n,i,o,r;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout((()=>{console.error("Elise AI did not respond in time..."),this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}),9e4),0===this.simpleChatMessages.length&&(null===(t=this.leadSourceClient)||void 0===t||t.checkAndHandleForLogLeadSource({webchatAction:"chat",stateId:null})),this.widgetType===Is.Utilities?await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState(),orgSlug:this.orgSlug}}):await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,userId:null===(i=this.buildingWebchatView)||void 0===i?void 0:i.userId,leadSource:this.leadSource,widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState()}}),this.isFirstChatMessageSent||(ui("firstChatMessageSent",{message:e,buildingId:null===(o=this.buildingWebchatView)||void 0===o?void 0:o.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),ui("chatMessageSent",{message:e,buildingId:null===(r=this.buildingWebchatView)||void 0===r?void 0:r.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))})),!1===this.isLoadingMessages&&(this.isLoadingMessages=!0)}},this.isLeadMessage=e=>e.publisher.includes("lead_")&&"lead_message"===e.message.customType,this.removeDuplicatedRawPubnubMessages=e=>{const t=new Set;return e.filter((e=>{if("lead_message"===e.message.customType||!e.message.stream_id||!e.message.order)return!0;const n=`${e.message.stream_id}-${e.message.order}-${e.message.messageType}`;return t.has(n)?(xi({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:Ci.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),!1):(t.add(n),!0)}))},this.translatePubnubMessagesIntoSimpleChatMessages=e=>{const t=[],n={};return this.removeDuplicatedRawPubnubMessages(e).forEach((e=>{var i;"media"===e.message.messageType?t.push({timestamp:e.timetoken,media:null!==(i=e.message.media)&&void 0!==i?i:[],isLeadMessage:this.isLeadMessage(e),type:Wa.media}):!e.message.stream_id||e.message.is_done&&0===e.message.order?t.push({timestamp:e.timetoken,message:e.message.text,isLeadMessage:this.isLeadMessage(e),chunks:[{text:e.message.text,order:0,isDone:!0}],type:Wa.text}):n[e.message.stream_id]?n[e.message.stream_id].push(e):n[e.message.stream_id]=[e]})),Object.keys(n).forEach((e=>{const i=n[e],o=this.getConsecutiveChunks(i.sort(((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}))),r=o.map((e=>e.message.text)).join(""),a=o[0],s={timestamp:a.timetoken,message:r,isLeadMessage:this.isLeadMessage(a),chunks:o.map((e=>{var t,n;return{text:e.message.text,order:null!==(t=e.message.order)&&void 0!==t?t:0,isDone:null!==(n=e.message.is_done)&&void 0!==n&&n}})),type:Wa.text};this.isCurrentlyStreamingMessage=this.isMessageStillStreamingChunks(o),t.push(s)})),t.sort(((e,t)=>e.timestamp-t.timestamp)),t},this.getConsecutiveChunks=e=>{var t,n;const i=e.sort(((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)})),o=[];let r=null!==(t=i[0].message.order)&&void 0!==t?t:0;for(const e of i){if((null!==(n=e.message.order)&&void 0!==n?n:-1)!==r)break;o.push(e),r++}return o},this.isMessageStillStreamingChunks=e=>{const t=e.find((e=>e.message.is_done));return!t||e.length===t.message.order},this.buildingSlug=e,this.buildingWebchatView=t,this.orgSlug=n,this.leadSource=i,this.leadUserId=o,this.channel=`webchat_${o}`,this.leadSourceClient=r,this.widgetType=a}addChatListener(e){this.chatListener=e}async initializePubnub(e){if(!e.leadId)return;this.leadUserId=e.leadId;const t=await this.fetchToken(this.leadUserId,this.channel);return t?(this.pubnub=new(Ma())({publishKey:t.keys.publish_key,subscribeKey:t.keys.subscribe_key,userId:this.leadUserId,authKey:t.auth.result.token,origin:"meetelise.pubnubapi.com"}),this.withAuthToken((()=>new Promise((()=>this.handleChatListeners())))),await this.withAuthToken((()=>this.getChannelHistory())),this.pubnub):void 0}async fetchToken(e,n){try{return(await t().get(`${this.apiHost}/platformApi/webchat/pn/request-token?user_id=${e}&channel=${n}&${"healthcare"===this.widgetType?"industry=health_care":""}`)).data}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}return null}async fetchChannelExists(e){try{return(await t().get(`${this.apiHost}/platformApi/webchat/check-channel-exists?channel_name=${e}`)).data}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}return!1}async withAuthToken(t){try{await t()}catch(n){if(n instanceof e.AxiosError&&n&&n.response&&403===n.response.status)try{if(!this.pubnub||!this.leadUserId||!this.channel)return;const e=await this.fetchToken(this.leadUserId,this.channel);if(!e)return;this.pubnub.setAuthKey(e.auth.result.token),await t()}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}}async getChannelHistory(e=1500){var t;try{let n=[],i=null;const o=100;for(let t=0;t<e;t+=o){const r=await new Promise(((n,r)=>{if(!this.pubnub||!this.channel)return[];const a=Math.min(o,e-t);this.pubnub.fetchMessages({channels:[this.channel],count:a,start:null!=i?i:void 0},((e,t)=>{e.error?r(e):n(t)}))})),a=r.channels[this.channel];if(!a)break;if(a.sort(((e,t)=>+e.timetoken-+t.timetoken)),!a||0===a.length)break;if(this.channel&&0!==Object.keys(r.channels).length){const e=r.channels[this.channel],t=[];e.forEach((e=>{e.uuid&&t.push({channel:e.channel,message:e.message,publisher:e.uuid,subscription:e.channel,timetoken:+e.timetoken})})),this.markEveryPreviousNoReplyMessageDone(t),n=n.concat(t.filter((e=>e.message.messageType!==Qa.noReply)))}if(i=a[0].timetoken,n.length>=e||a.length<o)break}this.rawPubnubMessages=n.slice(0,e),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:!1})}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:Ci.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}shouldCreateAsDevState(){return location.href.startsWith("https://app.meetelise.com/settings/widgets")||location.href.includes("demo/utilities")}},Ya=(e,t,n)=>{const i=`tel:${e}`,o=`sms:${e}`,r=`whatsapp://send?phone=${e}}`,a=`facetime:${e}`,s=`facetime-audio:${e}`,l=/(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,u=/(tel|sms):(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,c=/whatsapp:\/\/send\?phone=\d+/g,d=/(facetime|facetime-audio):\d+/g,h=document.body.getElementsByTagName("*");let p=!1;const f=e.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let g=!1,m=!1,b=0;for(let e=0;e<h.length;e++)if(h[e].nodeType===Node.ELEMENT_NODE){if(1===h[e].childNodes.length&&h[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=h[e].innerHTML,n=t.replace(l,f);t!==n&&b++,h[e].innerHTML=n,p=!0,g||(g=!0)}if(h[e].hasAttribute("href")){const t=h[e].getAttribute("href");if(!t)continue;let n="",l=u;t.startsWith("sms:")?n=o:t.startsWith("whatsapp:")?(n=r,l=c):t.startsWith("facetime:")?(n=a,l=d):t.startsWith("facetime-audio:")?(n=s,l=d):n=i;const p=t.replace(l,n);h[e].setAttribute("href",p),m||(m=!0)}}return g&&xi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:f,website:window.location.href},logType:Ci.info,buildingSlug:n,orgSlug:t}),m&&xi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:f,website:window.location.href},logType:Ci.info,buildingSlug:n,orgSlug:t}),p||xi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:Ci.warn,buildingSlug:n,orgSlug:t}),b};var Ka=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Xa=class extends oe{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=Ie,this.toExpand=!1}render(){return B`
5108
+ `,da([le({attribute:!0})],ha.prototype,"isMinimized",void 0),da([le()],ha.prototype,"mobileStyles",void 0),da([le({type:Boolean})],ha.prototype,"isFirstMount",void 0),da([le({attribute:!1})],ha.prototype,"autoOpenChatWidget",void 0),da([le()],ha.prototype,"phoneNumber",void 0),da([le({attribute:!0})],ha.prototype,"buildingName",void 0),da([le({attribute:!0})],ha.prototype,"chatId",void 0),da([le({attribute:!0})],ha.prototype,"orgLegalName",void 0),da([le({attribute:!0})],ha.prototype,"chatCallUsHeader",void 0),da([le({attribute:!1})],ha.prototype,"buildingId",void 0),da([le({attribute:!0})],ha.prototype,"buildingSlug",void 0),da([le({attribute:!0})],ha.prototype,"orgSlug",void 0),da([le({attribute:!0})],ha.prototype,"sgtUrl",void 0),da([le({attribute:!0})],ha.prototype,"selfGuidedTourEnabled",void 0),da([le({attribute:!0})],ha.prototype,"selfGuidedToursTypeOffered",void 0),da([le({attribute:!0})],ha.prototype,"designConcept",void 0),da([le({attribute:!0})],ha.prototype,"featureFlagShowDropdown",void 0),da([le({attribute:!1})],ha.prototype,"leadSources",void 0),da([le({attribute:!0})],ha.prototype,"currentLeadSource",void 0),da([le({attribute:!0})],ha.prototype,"escortedToursLink",void 0),da([le({attribute:!0})],ha.prototype,"virtualToursLink",void 0),da([le({attribute:!0})],ha.prototype,"virtualToursTypeOffered",void 0),da([le({type:Boolean})],ha.prototype,"hasChatEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasChatEnabledMobile",void 0),da([le({type:Boolean})],ha.prototype,"hasEmailEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasEmailEnabledMobile",void 0),da([le({attribute:!0})],ha.prototype,"hasApplyNowEnabledDesktop",void 0),da([le({attribute:!0})],ha.prototype,"hasApplyNowEnabledMobile",void 0),da([le({attribute:!0})],ha.prototype,"applicationLink",void 0),da([le({type:Boolean})],ha.prototype,"hasCallUsEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasCallUsEnabledMobile",void 0),da([le({type:Boolean})],ha.prototype,"hasTextUsEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasTextUsEnabledMobile",void 0),da([le({type:Boolean})],ha.prototype,"hasSSTEnabledDesktop",void 0),da([le({type:Boolean})],ha.prototype,"hasSSTEnabledMobile",void 0),da([le({attribute:!1})],ha.prototype,"tourTypeOptions",void 0),da([le({attribute:!0})],ha.prototype,"hasDynamicSchedulingEnabled",void 0),da([le({attribute:!0})],ha.prototype,"hasPricingCalculatorEnabledDesktop",void 0),da([le({attribute:!0})],ha.prototype,"hasPricingCalculatorEnabledMobile",void 0),da([le({attribute:!1})],ha.prototype,"hasHideMobileFeatures",void 0),da([le({type:Number})],ha.prototype,"right",void 0),da([le({type:Number})],ha.prototype,"bottom",void 0),da([le({type:Number})],ha.prototype,"top",void 0),da([le({type:Number})],ha.prototype,"left",void 0),da([le({attribute:!0})],ha.prototype,"showTourNextToChat",void 0),da([le({attribute:!1})],ha.prototype,"onChatTapped",void 0),da([le({attribute:!0})],ha.prototype,"onClickMinimize",void 0),da([le({attribute:!0})],ha.prototype,"onSstClose",void 0),da([le({attribute:!0})],ha.prototype,"overrideRentgrata",void 0),da([le({attribute:!1})],ha.prototype,"launcherStyles",void 0),da([le({attribute:!0})],ha.prototype,"primaryColor",void 0),da([le({attribute:!0})],ha.prototype,"backgroundColor",void 0),da([le({attribute:!0})],ha.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),da([le({attribute:!0})],ha.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),da([le({attribute:!0})],ha.prototype,"leadSourceClient",void 0),da([ue()],ha.prototype,"isEmailWindowOpen",void 0),da([ue()],ha.prototype,"isCallUsWindowOpen",void 0),da([ue()],ha.prototype,"isSSTWindowOpen",void 0),da([ue()],ha.prototype,"isTextUsWindowOpen",void 0),da([ue()],ha.prototype,"isCalculatorWindowOpen",void 0),da([ue()],ha.prototype,"isMobileFeaturesExpanded",void 0),ha=da([ae("meetelise-launcher")],ha);const pa=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",ha)},fa=["app.meetelise.com","staging.eliseai.com","localhost"],ga={calculator:{desktop:"calcDesktop",mobile:"calcMobile"},email:{desktop:"emailDesktop",mobile:"emailMobile"},call:{desktop:"callDesktop",mobile:"callMobile"},text:{desktop:"textDesktop",mobile:"textMobile"},sst:{desktop:"sstDesktop",mobile:"sstMobile"}};var ma=n(3379),ba=n.n(ma),va=n(7795),ya=n.n(va),wa=n(569),Ca=n.n(wa),xa=n(3565),Aa=n.n(xa),Sa=n(9216),ka=n.n(Sa),Ta=n(4589),_a=n.n(Ta),Ea=n(3631),Oa={};async function Pa(e,n){try{const i=await t().get(`https://app.meetelise.com/platformApi/webchat/${n}/lead-sources`);if(i.data){if("7e352741-1120-4ccf-9929-5dc99193a908"===e){const e=["Zillow","Apartments.com","Google PPC","Google Maps","Apple Maps","Social Media","Print Marketing"];return i.data.filter((t=>e.includes(t)))}return Na(i.data,n)}return[]}catch(e){return[]}}Oa.styleTagTransform=_a(),Oa.setAttributes=Aa(),Oa.insert=Ca().bind(null,"head"),Oa.domAPI=ya(),Oa.insertStyleElement=ka(),ba()(Ea.Z,Oa),Ea.Z&&Ea.Z.locals&&Ea.Z.locals;const Na=(e,t)=>{let n=[];switch(t){case"d41619ec-0f79-11ee-8439-93855926ad58":n=["Forthea - PPC","HotPads","Forthea","Locator","Website-apartmentguide.com","Forthea - organic search","Tdc employee","University newspaper","Nashville apartment locators","Forthea - paid social","Apartment list","Off campus partners","Waze ads","Athletic event","Website-apartment guide"];break;case"d4160560-0f79-11ee-8438-fba837bf3a46":n=["Forthea - PPC","Rentgrata","Website-ApartmentFinder.com","Word of Mouth","Texas A&M A-Frame on Campus","Rent.com","Website-craigslist","Apartment List","Website-apartments.com","Forthea - paid social","Forthea - organic search","Website-apartmentguide.com","Forthea","Uhomes","Phone book","Property - website"];break;default:n=[]}return e.sort(),e.filter((e=>{const t=e.toLowerCase();return!n.map((e=>e.toLowerCase())).includes(t)}))};var Ma,Ia=n(9594),Da=n.n(Ia),Ua=new Uint8Array(16);function La(){if(!Ma&&!(Ma="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ma(Ua)}const Ba=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ra=function(e){return"string"==typeof e&&Ba.test(e)};for(var ja=[],Ha=0;Ha<256;++Ha)ja.push((Ha+256).toString(16).substr(1));const Fa=function(e,t,n){var i=(e=e||{}).random||(e.rng||La)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=i[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ja[e[t+0]]+ja[e[t+1]]+ja[e[t+2]]+ja[e[t+3]]+"-"+ja[e[t+4]]+ja[e[t+5]]+"-"+ja[e[t+6]]+ja[e[t+7]]+"-"+ja[e[t+8]]+ja[e[t+9]]+"-"+ja[e[t+10]]+ja[e[t+11]]+ja[e[t+12]]+ja[e[t+13]]+ja[e[t+14]]+ja[e[t+15]]).toLowerCase();if(!Ra(n))throw TypeError("Stringified UUID is invalid");return n}(i)},za=e=>localStorage.removeItem("com.elise.webchat.slug="+e),$a=(e,t,n)=>{const i=kn(new Date),o=n||`lead_${Fa()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:o,timestamp:i,initiatedChat:t})),{leadId:o,timestamp:Mn(i),buildingSlug:e,initiatedChat:t}},Qa=e=>{const t=localStorage.getItem("com.elise.webchat.slug="+e);if(t)try{const n=JSON.parse(t),i={leadId:n.leadId,timestamp:new Date(n.timestamp),buildingSlug:n.buildingSlug,initiatedChat:n.initiatedChat};if(Ga(e,i))return i}catch(e){console.warn("Error getting chat storage key")}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},Ga=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if(pn(t.timestamp,e))return!1}}catch(e){console.warn("Error checking chat storage key validity")}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp||vn(t.timestamp,24))};var qa;!function(e){e.noReply="no-reply",e.text="text",e.media="media"}(qa||(qa={}));const Wa=e=>e.type===Ya.text,Va=e=>e.type===Ya.media;var Ya;!function(e){e.text="text",e.media="media"}(Ya||(Ya={}));const Ka=class{constructor(e,t,n,i=null,o,r=null,a=Us.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.widgetType=Us.Default,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t,n;const i={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,i],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter((e=>e.message.messageType!==qa.noReply)),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const o="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:o}),!o&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=o,"ai_message"===e.message.customType&&this.simpleChatMessages.some((e=>e.type===Ya.text&&e.message.includes("confirmed for your tour")))&&ui("scheduledTourEvent",{tourDetails:e.message,buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.checkAndHandleGTMForLeadEmail(e)}},this.isLoadingMessages=!1,this.isFirstChatMessageSent=!1,this.streamingMessageTimeout=null,this.checkAndHandleDelayStreamingMessages=({delayToFetchHistoryInMs:e=1e4}={})=>{this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null);const t=this.simpleChatMessages.some((e=>{if(!Wa(e))return!1;const t=e.chunks.find((e=>e.isDone));return!t||e.chunks.length===t.order}));t&&(this.streamingMessageTimeout=setTimeout((()=>{xi({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:Ci.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),console.warn(`PUBNUB_WARN_DELAYED_STREAMING_MESSAGES: ${e}`),this.getChannelHistory()}),e))},this.checkAndHandleGTMForLeadEmail=e=>{var t;try{if("lead_message"!==e.message.customType)return;if(!(e=>{try{return/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b/.test(e)}catch(e){return console.warn("Error checking if message contains email",e),!1}})(e.message.text))return;ui("leadProvidedEmail",{buildingId:null===(t=this.buildingWebchatView)||void 0===t?void 0:t.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel})}catch(e){return}},this.markEveryPreviousNoReplyMessageDone=e=>{var t,n;for(let i=e.length-1;i>=0;i--){const o=null===(t=e[i])||void 0===t?void 0:t.message,r=i>0&&(null===(n=e[i-1])||void 0===n?void 0:n.message);(null==o?void 0:o.messageType)===qa.noReply&&r&&(r.is_done=!0)}},this.checkMessageChunkValid=e=>{try{return!!e.message&&!!e.message.text&&e.message.text.length>0&&!!e.message.customType}catch(e){return!1}},this.handleChatListeners=()=>{if(this.pubnub&&this.channel)try{this.pubnub.subscribe({channels:[this.channel]}),this.pubnub.addListener(this.listenerParams)}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}},this.handleDisconnect=()=>{this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null),this.removeChatListeners()},this.removeChatListeners=()=>{this.pubnub&&this.channel&&(this.pubnub.unsubscribe({channels:[this.channel]}),this.pubnub.removeListener(this.listenerParams))},this.sendMessage=async e=>{if(e){if(!this.pubnub){const e=$a(this.buildingSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken((async()=>{var t,n,i,o,r;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout((()=>{console.error("Elise AI did not respond in time..."),this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}),9e4),0===this.simpleChatMessages.length&&(null===(t=this.leadSourceClient)||void 0===t||t.checkAndHandleForLogLeadSource({webchatAction:"chat",stateId:null})),this.widgetType===Us.Utilities?await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState(),orgSlug:this.orgSlug}}):await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,userId:null===(i=this.buildingWebchatView)||void 0===i?void 0:i.userId,leadSource:this.leadSource,widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState()}}),this.isFirstChatMessageSent||(ui("firstChatMessageSent",{message:e,buildingId:null===(o=this.buildingWebchatView)||void 0===o?void 0:o.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),ui("chatMessageSent",{message:e,buildingId:null===(r=this.buildingWebchatView)||void 0===r?void 0:r.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))})),!1===this.isLoadingMessages&&(this.isLoadingMessages=!0)}},this.isLeadMessage=e=>e.publisher.includes("lead_")&&"lead_message"===e.message.customType,this.removeDuplicatedRawPubnubMessages=e=>{const t=new Set;return e.filter((e=>{if("lead_message"===e.message.customType||!e.message.stream_id||!e.message.order)return!0;const n=`${e.message.stream_id}-${e.message.order}-${e.message.messageType}`;return t.has(n)?(xi({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:Ci.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),!1):(t.add(n),!0)}))},this.translatePubnubMessagesIntoSimpleChatMessages=e=>{const t=[],n={};return this.removeDuplicatedRawPubnubMessages(e).forEach((e=>{var i;"media"===e.message.messageType?t.push({timestamp:e.timetoken,media:null!==(i=e.message.media)&&void 0!==i?i:[],isLeadMessage:this.isLeadMessage(e),type:Ya.media}):!e.message.stream_id||e.message.is_done&&0===e.message.order?t.push({timestamp:e.timetoken,message:e.message.text,isLeadMessage:this.isLeadMessage(e),chunks:[{text:e.message.text,order:0,isDone:!0}],type:Ya.text}):n[e.message.stream_id]?n[e.message.stream_id].push(e):n[e.message.stream_id]=[e]})),Object.keys(n).forEach((e=>{const i=n[e],o=this.getConsecutiveChunks(i.sort(((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}))),r=o.map((e=>e.message.text)).join(""),a=o[0],s={timestamp:a.timetoken,message:r,isLeadMessage:this.isLeadMessage(a),chunks:o.map((e=>{var t,n;return{text:e.message.text,order:null!==(t=e.message.order)&&void 0!==t?t:0,isDone:null!==(n=e.message.is_done)&&void 0!==n&&n}})),type:Ya.text};this.isCurrentlyStreamingMessage=this.isMessageStillStreamingChunks(o),t.push(s)})),t.sort(((e,t)=>e.timestamp-t.timestamp)),t},this.getConsecutiveChunks=e=>{var t,n;const i=e.sort(((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)})),o=[];let r=null!==(t=i[0].message.order)&&void 0!==t?t:0;for(const e of i){if((null!==(n=e.message.order)&&void 0!==n?n:-1)!==r)break;o.push(e),r++}return o},this.isMessageStillStreamingChunks=e=>{const t=e.find((e=>e.message.is_done));return!t||e.length===t.message.order},this.buildingSlug=e,this.buildingWebchatView=t,this.orgSlug=n,this.leadSource=i,this.leadUserId=o,this.channel=`webchat_${o}`,this.leadSourceClient=r,this.widgetType=a}addChatListener(e){this.chatListener=e}async initializePubnub(e){if(!e.leadId)return;this.leadUserId=e.leadId;const t=await this.fetchToken(this.leadUserId,this.channel);return t?(this.pubnub=new(Da())({publishKey:t.keys.publish_key,subscribeKey:t.keys.subscribe_key,userId:this.leadUserId,authKey:t.auth.result.token,origin:"meetelise.pubnubapi.com"}),this.withAuthToken((()=>new Promise((()=>this.handleChatListeners())))),await this.withAuthToken((()=>this.getChannelHistory())),this.pubnub):void 0}async fetchToken(e,n){try{return(await t().get(`${this.apiHost}/platformApi/webchat/pn/request-token?user_id=${e}&channel=${n}&${"healthcare"===this.widgetType?"industry=health_care":""}`)).data}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}return null}async fetchChannelExists(e){try{return(await t().get(`${this.apiHost}/platformApi/webchat/check-channel-exists?channel_name=${e}`)).data}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}return!1}async withAuthToken(t){try{await t()}catch(n){if(n instanceof e.AxiosError&&n&&n.response&&403===n.response.status)try{if(!this.pubnub||!this.leadUserId||!this.channel)return;const e=await this.fetchToken(this.leadUserId,this.channel);if(!e)return;this.pubnub.setAuthKey(e.auth.result.token),await t()}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:Ci.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}}async getChannelHistory(e=1500){var t;try{let n=[],i=null;const o=100;for(let t=0;t<e;t+=o){const r=await new Promise(((n,r)=>{if(!this.pubnub||!this.channel)return[];const a=Math.min(o,e-t);this.pubnub.fetchMessages({channels:[this.channel],count:a,start:null!=i?i:void 0},((e,t)=>{e.error?r(e):n(t)}))})),a=r.channels[this.channel];if(!a)break;if(a.sort(((e,t)=>+e.timetoken-+t.timetoken)),!a||0===a.length)break;if(this.channel&&0!==Object.keys(r.channels).length){const e=r.channels[this.channel],t=[];e.forEach((e=>{e.uuid&&t.push({channel:e.channel,message:e.message,publisher:e.uuid,subscription:e.channel,timetoken:+e.timetoken})})),this.markEveryPreviousNoReplyMessageDone(t),n=n.concat(t.filter((e=>e.message.messageType!==qa.noReply)))}if(i=a[0].timetoken,n.length>=e||a.length<o)break}this.rawPubnubMessages=n.slice(0,e),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:!1})}catch(e){this.buildingWebchatView&&xi({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:Ci.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}shouldCreateAsDevState(){return location.href.startsWith("https://app.meetelise.com/settings/widgets")||location.href.includes("demo/utilities")}},Xa=(e,t,n)=>{const i=`tel:${e}`,o=`sms:${e}`,r=`whatsapp://send?phone=${e}}`,a=`facetime:${e}`,s=`facetime-audio:${e}`,l=/(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,u=/(tel|sms):(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,c=/whatsapp:\/\/send\?phone=\d+/g,d=/(facetime|facetime-audio):\d+/g,h=document.body.getElementsByTagName("*");let p=!1;const f=e.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let g=!1,m=!1,b=0;for(let e=0;e<h.length;e++)if(h[e].nodeType===Node.ELEMENT_NODE){if(1===h[e].childNodes.length&&h[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=h[e].innerHTML,n=t.replace(l,f);t!==n&&b++,h[e].innerHTML=n,p=!0,g||(g=!0)}if(h[e].hasAttribute("href")){const t=h[e].getAttribute("href");if(!t)continue;let n="",l=u;t.startsWith("sms:")?n=o:t.startsWith("whatsapp:")?(n=r,l=c):t.startsWith("facetime:")?(n=a,l=d):t.startsWith("facetime-audio:")?(n=s,l=d):n=i;const p=t.replace(l,n);h[e].setAttribute("href",p),m||(m=!0)}}return g&&xi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:f,website:window.location.href},logType:Ci.info,buildingSlug:n,orgSlug:t}),m&&xi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:f,website:window.location.href},logType:Ci.info,buildingSlug:n,orgSlug:t}),p||xi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:Ci.warn,buildingSlug:n,orgSlug:t}),b};var Za=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Ja=class extends oe{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=Ie,this.toExpand=!1}render(){return B`
5109
5109
  <div
5110
5110
  class=${this.toExpand?"button-container mini":"button-container"}
5111
5111
  @click=${this.onClick}
@@ -5117,7 +5117,7 @@ xmlns="http://www.w3.org/2000/svg"
5117
5117
  ${this.toExpand?B`<div class="chevron-up">${na("white")}</div>`:B` <div class="x-icon">${Jo("white")}</div>`}
5118
5118
  </div>
5119
5119
  </div>
5120
- `}};Xa.styles=[l`
5120
+ `}};Ja.styles=[l`
5121
5121
  .button-container {
5122
5122
  width: 56px;
5123
5123
  height: 56px;
@@ -5166,7 +5166,7 @@ xmlns="http://www.w3.org/2000/svg"
5166
5166
  cursor: pointer;
5167
5167
  filter: brightness(90%);
5168
5168
  }
5169
- `],Ka([le({attribute:!0})],Xa.prototype,"onClick",void 0),Ka([le({attribute:!0})],Xa.prototype,"primaryColor",void 0),Ka([le({attribute:!0})],Xa.prototype,"toExpand",void 0),Xa=Ka([ae("minimize-expand-button")],Xa);const Za=l`
5169
+ `],Za([le({attribute:!0})],Ja.prototype,"onClick",void 0),Za([le({attribute:!0})],Ja.prototype,"primaryColor",void 0),Za([le({attribute:!0})],Ja.prototype,"toExpand",void 0),Ja=Za([ae("minimize-expand-button")],Ja);const es=l`
5170
5170
  #healthchat-container {
5171
5171
  position: fixed;
5172
5172
 
@@ -5282,7 +5282,7 @@ xmlns="http://www.w3.org/2000/svg"
5282
5282
  .health-bttn-allow-access {
5283
5283
  padding-right: 28px;
5284
5284
  }
5285
- `,Ja=l`
5285
+ `,ts=l`
5286
5286
  #pubnub-chat-container {
5287
5287
  position: fixed;
5288
5288
 
@@ -5393,7 +5393,7 @@ xmlns="http://www.w3.org/2000/svg"
5393
5393
  border: none;
5394
5394
  cursor: pointer;
5395
5395
  }
5396
- `,es=l`
5396
+ `,ns=l`
5397
5397
  #header-text {
5398
5398
  font-size: 12px;
5399
5399
  font-weight: 700;
@@ -5594,7 +5594,7 @@ xmlns="http://www.w3.org/2000/svg"
5594
5594
  .checkbox:hover {
5595
5595
  opacity: 0.5;
5596
5596
  }
5597
- `;var ts=n(7856),ns=n.n(ts);class is extends pe{constructor(e){if(super(e),this.it=H,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===H||null==e)return this.ft=void 0,this.it=e;if(e===j)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this.ft;this.it=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}is.directiveName="unsafeHTML",is.resultType=1;const os=he(is);let rs=class extends oe{render(){return B`<div class="spinner"></div>`}};rs.styles=l`
5597
+ `;var is=n(7856),os=n.n(is);class rs extends pe{constructor(e){if(super(e),this.it=H,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===H||null==e)return this.ft=void 0,this.it=e;if(e===j)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this.ft;this.it=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}rs.directiveName="unsafeHTML",rs.resultType=1;const as=he(rs);let ss=class extends oe{render(){return B`<div class="spinner"></div>`}};ss.styles=l`
5598
5598
  .spinner {
5599
5599
  border: 2px solid rgba(0, 0, 0, 0.2);
5600
5600
  border-top: 2px solid #c057ff;
@@ -5612,7 +5612,7 @@ xmlns="http://www.w3.org/2000/svg"
5612
5612
  transform: rotate(360deg);
5613
5613
  }
5614
5614
  }
5615
- `,rs=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}([ae("mini-loader")],rs);var as=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let ss=class extends oe{constructor(){super(...arguments),this.onMount=()=>({}),this.loadingPreviews=!0,this.websitePreviewInfo=[],this.imagesToDisplay=[],this.imageUrlError=[],this.isLeadMessage=!1,this.widgetType=Is.Default}isMessageStillStreamingChunks(){if(!this.message)return!1;const e=this.message.chunks.find((e=>e.isDone));return!e||this.message.chunks.length===e.order}updated(e){var t;if(this.onMount(),!e.has("message"))return;if(!this.message)return;try{this.isMessageStillStreamingChunks()||this.isLeadMessage||!this.invalidMarkdownText(this.message.message)||xi({logType:Ci.error,logTitle:"INVALID_MARKDOWN",logData:{message:this.message.message,chatId:null===(t=this.myPubnub)||void 0===t?void 0:t.channel},buildingSlug:this.buildingSlug})}catch(e){console.error("Error parsing markdown:",e)}const{hyperlinks:n,markedText:i}=this.mapAndMarkHyperLinks(this.message.message),o=/(https?:\/\/[^\s]+)/g,r=[],a=[];this.parsedMessage=B`${i.trim().split("\n").map((e=>{const t=this.sanitizeMarkdownText(e),i=this.preserveHTMLTags(t);return i?B`${i.map((e=>{if(n.find((t=>t.id===e))){const t=n.find((t=>t.id===e));if(!t)return;return a.push({redirectTo:null==t?void 0:t.link,source:null==t?void 0:t.link}),B`<a
5615
+ `,ss=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}([ae("mini-loader")],ss);var ls=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let us=class extends oe{constructor(){super(...arguments),this.onMount=()=>({}),this.loadingPreviews=!0,this.websitePreviewInfo=[],this.imagesToDisplay=[],this.imageUrlError=[],this.isLeadMessage=!1,this.widgetType=Us.Default}isMessageStillStreamingChunks(){if(!this.message)return!1;const e=this.message.chunks.find((e=>e.isDone));return!e||this.message.chunks.length===e.order}updated(e){var t;if(this.onMount(),!e.has("message"))return;if(!this.message)return;try{this.isMessageStillStreamingChunks()||this.isLeadMessage||!this.invalidMarkdownText(this.message.message)||xi({logType:Ci.error,logTitle:"INVALID_MARKDOWN",logData:{message:this.message.message,chatId:null===(t=this.myPubnub)||void 0===t?void 0:t.channel},buildingSlug:this.buildingSlug})}catch(e){console.error("Error parsing markdown:",e)}const{hyperlinks:n,markedText:i}=this.mapAndMarkHyperLinks(this.message.message),o=/(https?:\/\/[^\s]+)/g,r=[],a=[];this.parsedMessage=B`${i.trim().split("\n").map((e=>{const t=this.sanitizeMarkdownText(e),i=this.preserveHTMLTags(t);return i?B`${i.map((e=>{if(n.find((t=>t.id===e))){const t=n.find((t=>t.id===e));if(!t)return;return a.push({redirectTo:null==t?void 0:t.link,source:null==t?void 0:t.link}),B`<a
5616
5616
  class="redirect-link"
5617
5617
  href="${null==t?void 0:t.link}"
5618
5618
  target="_blank"
@@ -5624,10 +5624,10 @@ xmlns="http://www.w3.org/2000/svg"
5624
5624
  target="_blank"
5625
5625
  rel="noopener noreferrer"
5626
5626
  >${t}
5627
- </a>`}return B`${os(ns().sanitize(e))} `}))}<br />`:B``}))}`,this.imagesToDisplay=a,Promise.all(r).then((e=>{this.websitePreviewInfo=e}))}invalidMarkdownText(e){try{return[/\*\*[^*\n]*\*$/,/__[^_\n]*_$/,/`[^`\n]*`$/,/\[[^\]\n]*\]$/,/\[[^\]]*\]\([^)\n]*\)$/,/^(#+)\s*$/,/(^|[^!])\[[^\]]*\]\(([^)]+)\s*\)$/,/(?:^|\s)[*_]{1,2}(?:\s|$)/].some((t=>t.test(e)))}catch(e){return!1}}preserveHTMLTags(e){var t;const n=e.match(/(<\/?[a-z][^>]*>[^<]*<\/?[a-z]*>|[^\s]+[.,?!]?|\S)/gi);return null!==(t=null==n?void 0:n.filter((e=>""!==e.trim())))&&void 0!==t?t:[]}sanitizeMarkdownText(e){return e.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*?)\*\*/gim,"<b>$1</b>").replace(/\*(.*?)\*/gim,"<i>$1</i>").trim()}removeTrailingPunctuation(e){return[".",",","!","?",":",";"].includes(e[e.length-1])?this.removeTrailingPunctuation(e.slice(0,-1)):e}mapAndMarkHyperLinks(e){const t=Array.from(e.matchAll(/<https?:\/\/[^|]+\|[^>]+>|<a href="[^"]+"(?: target="[^"]*")?>[^<]+<\/a>|\[.*?\]\([^)]*\.[^)]*\)/g)),n=[],i=t.map((t=>{const n=t[0];if(void 0===t.index)return;const i=e[t.index-1],o=e[t.index+n.length];if(n.startsWith("<https")||n.startsWith("<http"))return{matchedLink:n,link:n.split("|")[0].replace("<",""),hyperlink:n.split("|")[1].replace(">",""),addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!o||" "===o)};if(n.startsWith("<a href=")){const e=n.match(/href="([^"]+)"/),t=n.match(/>[^<]+</);return{matchedLink:n,link:e?e[1]:"",hyperlink:t?t[0].slice(1,-1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!o||" "===o)}}{const[e,t]=n.split("](");return{matchedLink:n,link:t?t.slice(0,-1):"",hyperlink:e?e.slice(1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!o||" "===o)}}}));return i.forEach((t=>{if(t&&t.link&&t.hyperlink){const i=ja().replace(/-/g,"");n.push({link:this.removeTrailingPunctuation(t.link),hyperlink:this.removeTrailingPunctuation(t.hyperlink),mark:t.matchedLink,id:i}),e=e.replace(t.matchedLink,`${t.addSpaceBefore?" ":""}${i}${t.addSpaceAfter?" ":""}`)}})),{hyperlinks:n,markedText:e}}async getLinkData(e){var n,i,o,r;try{const a=(await t().get(e)).data,s=(new DOMParser).parseFromString(a,"text/html");return s?{title:null!==(i=null===(n=s.querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:null,description:(null===(o=s.querySelector('meta[name="description"]'))||void 0===o?void 0:o.getAttribute("content"))||null,image:(null===(r=s.querySelector('meta[property="og:image"]'))||void 0===r?void 0:r.getAttribute("content"))||null,favicon:null,link:e}:{title:null,description:null,image:null,favicon:null,link:e}}catch(t){return console.error("Error fetching website details:",t),{title:null,description:null,image:null,favicon:null,link:e}}}render(){return this.message?B`<div class="message-inner-body">
5627
+ </a>`}return B`${as(os().sanitize(e))} `}))}<br />`:B``}))}`,this.imagesToDisplay=a,Promise.all(r).then((e=>{this.websitePreviewInfo=e}))}invalidMarkdownText(e){try{return[/\*\*[^*\n]*\*$/,/__[^_\n]*_$/,/`[^`\n]*`$/,/\[[^\]\n]*\]$/,/\[[^\]]*\]\([^)\n]*\)$/,/^(#+)\s*$/,/(^|[^!])\[[^\]]*\]\(([^)]+)\s*\)$/,/(?:^|\s)[*_]{1,2}(?:\s|$)/].some((t=>t.test(e)))}catch(e){return!1}}preserveHTMLTags(e){var t;const n=e.match(/(<\/?[a-z][^>]*>[^<]*<\/?[a-z]*>|[^\s]+[.,?!]?|\S)/gi);return null!==(t=null==n?void 0:n.filter((e=>""!==e.trim())))&&void 0!==t?t:[]}sanitizeMarkdownText(e){return e.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*?)\*\*/gim,"<b>$1</b>").replace(/\*(.*?)\*/gim,"<i>$1</i>").trim()}removeTrailingPunctuation(e){return[".",",","!","?",":",";"].includes(e[e.length-1])?this.removeTrailingPunctuation(e.slice(0,-1)):e}mapAndMarkHyperLinks(e){const t=Array.from(e.matchAll(/<https?:\/\/[^|]+\|[^>]+>|<a href="[^"]+"(?: target="[^"]*")?>[^<]+<\/a>|\[.*?\]\([^)]*\.[^)]*\)/g)),n=[],i=t.map((t=>{const n=t[0];if(void 0===t.index)return;const i=e[t.index-1],o=e[t.index+n.length];if(n.startsWith("<https")||n.startsWith("<http"))return{matchedLink:n,link:n.split("|")[0].replace("<",""),hyperlink:n.split("|")[1].replace(">",""),addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!o||" "===o)};if(n.startsWith("<a href=")){const e=n.match(/href="([^"]+)"/),t=n.match(/>[^<]+</);return{matchedLink:n,link:e?e[1]:"",hyperlink:t?t[0].slice(1,-1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!o||" "===o)}}{const[e,t]=n.split("](");return{matchedLink:n,link:t?t.slice(0,-1):"",hyperlink:e?e.slice(1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!o||" "===o)}}}));return i.forEach((t=>{if(t&&t.link&&t.hyperlink){const i=Fa().replace(/-/g,"");n.push({link:this.removeTrailingPunctuation(t.link),hyperlink:this.removeTrailingPunctuation(t.hyperlink),mark:t.matchedLink,id:i}),e=e.replace(t.matchedLink,`${t.addSpaceBefore?" ":""}${i}${t.addSpaceAfter?" ":""}`)}})),{hyperlinks:n,markedText:e}}async getLinkData(e){var n,i,o,r;try{const a=(await t().get(e)).data,s=(new DOMParser).parseFromString(a,"text/html");return s?{title:null!==(i=null===(n=s.querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:null,description:(null===(o=s.querySelector('meta[name="description"]'))||void 0===o?void 0:o.getAttribute("content"))||null,image:(null===(r=s.querySelector('meta[property="og:image"]'))||void 0===r?void 0:r.getAttribute("content"))||null,favicon:null,link:e}:{title:null,description:null,image:null,favicon:null,link:e}}catch(t){return console.error("Error fetching website details:",t),{title:null,description:null,image:null,favicon:null,link:e}}}render(){return this.message?B`<div class="message-inner-body">
5628
5628
  ${this.isMessageStillStreamingChunks()?B`<div class="message-loader"><mini-loader></mini-loader></div>`:""}
5629
5629
  <p
5630
- class=${fe({"message-text":this.widgetType!==Is.Utilities,"message-text-large":this.widgetType===Is.Utilities,"webchat-font__desktop":!bn(),"webchat-font__mobile":bn()})}
5630
+ class=${fe({"message-text":this.widgetType!==Us.Utilities,"message-text-large":this.widgetType===Us.Utilities,"webchat-font__desktop":!bn(),"webchat-font__mobile":bn()})}
5631
5631
  >
5632
5632
  ${this.parsedMessage}
5633
5633
  </p>
@@ -5658,16 +5658,16 @@ xmlns="http://www.w3.org/2000/svg"
5658
5658
  />`:""}
5659
5659
 
5660
5660
  <div class="website-preview-body">
5661
- <p class=${fe({"message-text":this.widgetType!==Is.Utilities,"message-text-large":this.widgetType===Is.Utilities,"website-preview-title":!0,"webchat-font__desktop":!bn(),"webchat-font__mobile":bn()})}>${e.title}</p>
5661
+ <p class=${fe({"message-text":this.widgetType!==Us.Utilities,"message-text-large":this.widgetType===Us.Utilities,"website-preview-title":!0,"webchat-font__desktop":!bn(),"webchat-font__mobile":bn()})}>${e.title}</p>
5662
5662
  ${e.description?B`<p
5663
- class=${fe({"message-text":this.widgetType!==Is.Utilities,"message-text-large":this.widgetType===Is.Utilities,"website-preview-description":!0,"webchat-font__desktop":!bn(),"webchat-font__mobile":bn()})}
5663
+ class=${fe({"message-text":this.widgetType!==Us.Utilities,"message-text-large":this.widgetType===Us.Utilities,"website-preview-description":!0,"webchat-font__desktop":!bn(),"webchat-font__mobile":bn()})}
5664
5664
  >
5665
5665
  ${e.description}
5666
5666
  </p>`:""}
5667
5667
  </div>
5668
5668
  </div>
5669
5669
  </a></div> `}))}
5670
- </div>`:B``}};ss.styles=[xn,es,l`
5670
+ </div>`:B``}};us.styles=[xn,ns,l`
5671
5671
  .message-inner-body {
5672
5672
  position: relative;
5673
5673
  }
@@ -5676,7 +5676,7 @@ xmlns="http://www.w3.org/2000/svg"
5676
5676
  bottom: -2px;
5677
5677
  right: -2px;
5678
5678
  }
5679
- `],as([le({attribute:!0})],ss.prototype,"buildingSlug",void 0),as([le({attribute:!0})],ss.prototype,"message",void 0),as([le({attribute:!0})],ss.prototype,"myPubnub",void 0),as([le({attribute:!0})],ss.prototype,"onMount",void 0),as([ue()],ss.prototype,"loadingPreviews",void 0),as([ue()],ss.prototype,"parsedMessage",void 0),as([ue()],ss.prototype,"websitePreviewInfo",void 0),as([ue()],ss.prototype,"imagesToDisplay",void 0),as([ue()],ss.prototype,"imageUrlError",void 0),as([le({type:Boolean})],ss.prototype,"isLeadMessage",void 0),as([le({attribute:!0})],ss.prototype,"widgetType",void 0),ss=as([ae("pubnub-message")],ss);var ls=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let us=class extends oe{constructor(){super(...arguments),this.onMount=()=>({}),this.showMediaAsCarousel=!0,this.activeIndex=0}updated(e){this.onMount(),e.has("message")}prevImage(){this.message&&(0===this.activeIndex?this.activeIndex=this.message.media.length-1:this.activeIndex-=1)}nextImage(){this.message&&(this.activeIndex===this.message.media.length-1?this.activeIndex=0:this.activeIndex+=1)}render(){return this.message?this.showMediaAsCarousel?B`<div class="message-inner-body">
5679
+ `],ls([le({attribute:!0})],us.prototype,"buildingSlug",void 0),ls([le({attribute:!0})],us.prototype,"message",void 0),ls([le({attribute:!0})],us.prototype,"myPubnub",void 0),ls([le({attribute:!0})],us.prototype,"onMount",void 0),ls([ue()],us.prototype,"loadingPreviews",void 0),ls([ue()],us.prototype,"parsedMessage",void 0),ls([ue()],us.prototype,"websitePreviewInfo",void 0),ls([ue()],us.prototype,"imagesToDisplay",void 0),ls([ue()],us.prototype,"imageUrlError",void 0),ls([le({type:Boolean})],us.prototype,"isLeadMessage",void 0),ls([le({attribute:!0})],us.prototype,"widgetType",void 0),us=ls([ae("pubnub-message")],us);var cs=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let ds=class extends oe{constructor(){super(...arguments),this.onMount=()=>({}),this.showMediaAsCarousel=!0,this.activeIndex=0}updated(e){this.onMount(),e.has("message")}prevImage(){this.message&&(0===this.activeIndex?this.activeIndex=this.message.media.length-1:this.activeIndex-=1)}nextImage(){this.message&&(this.activeIndex===this.message.media.length-1?this.activeIndex=0:this.activeIndex+=1)}render(){return this.message?this.showMediaAsCarousel?B`<div class="message-inner-body">
5680
5680
  <div class="carousel">
5681
5681
  <div
5682
5682
  class="image-container"
@@ -5717,7 +5717,7 @@ xmlns="http://www.w3.org/2000/svg"
5717
5717
  rel="noopener noreferrer"
5718
5718
  ><img class=${"displayed-message-image"} src=${e.url} alt=""
5719
5719
  /></a>`))}
5720
- </div>`:B``}};us.styles=[xn,es,l`
5720
+ </div>`:B``}};ds.styles=[xn,ns,l`
5721
5721
  .carousel {
5722
5722
  position: relative;
5723
5723
  max-width: 400px;
@@ -5809,7 +5809,7 @@ xmlns="http://www.w3.org/2000/svg"
5809
5809
  max-height: 200px;
5810
5810
  overflow-y: auto;
5811
5811
  }
5812
- `],ls([le({attribute:!0})],us.prototype,"message",void 0),ls([le({attribute:!0})],us.prototype,"myPubnub",void 0),ls([le({attribute:!0})],us.prototype,"onMount",void 0),ls([ue()],us.prototype,"showMediaAsCarousel",void 0),ls([ue()],us.prototype,"activeIndex",void 0),us=ls([ae("pubnub-media")],us);var cs=864e5;function ds(e,t){je(2,arguments);var n=Tn(e),i=Tn(t),o=n.getTime()-Nt(n),r=i.getTime()-Nt(i);return Math.round((o-r)/cs)}function hs(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}const ps=l`
5812
+ `],cs([le({attribute:!0})],ds.prototype,"message",void 0),cs([le({attribute:!0})],ds.prototype,"myPubnub",void 0),cs([le({attribute:!0})],ds.prototype,"onMount",void 0),cs([ue()],ds.prototype,"showMediaAsCarousel",void 0),cs([ue()],ds.prototype,"activeIndex",void 0),ds=cs([ae("pubnub-media")],ds);var hs=864e5;function ps(e,t){je(2,arguments);var n=Tn(e),i=Tn(t),o=n.getTime()-Nt(n),r=i.getTime()-Nt(i);return Math.round((o-r)/hs)}function fs(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}const gs=l`
5813
5813
  #utilities-container {
5814
5814
  position: fixed;
5815
5815
 
@@ -5916,17 +5916,17 @@ xmlns="http://www.w3.org/2000/svg"
5916
5916
  .health-bttn-allow-access {
5917
5917
  padding-right: 28px;
5918
5918
  }
5919
- `,fs=(e="black")=>R`
5919
+ `,ms=(e="black")=>R`
5920
5920
  <svg width="32" height="32" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5921
5921
  <path fill-rule="evenodd" clip-rule="evenodd" d="M15 0C17.7614 0 20 2.23858 20 5V15C20 17.7614 17.7614 20 15 20H5C2.23858 20 0 17.7614 0 15V5C0 2.23858 2.23858 0 5 0H15ZM18 5C18 3.34315 16.6569 2 15 2H5C3.34315 2 2 3.34315 2 5V15C2 16.6569 3.34315 18 5 18H15C16.6569 18 18 16.6569 18 15V5Z" fill="${e}"/>
5922
5922
  <path d="M12.1893 9.25L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L13.8232 8.76256C14.5066 9.44598 14.5066 10.554 13.8232 11.2374L11.5303 13.5303C11.2374 13.8232 10.7626 13.8232 10.4697 13.5303C10.1768 13.2374 10.1768 12.7626 10.4697 12.4697L12.1893 10.75L6 10.75C5.58579 10.75 5.25 10.4142 5.25 10C5.25 9.58579 5.58579 9.25 6 9.25L12.1893 9.25Z" fill="${e}"/>
5923
5923
  </svg>
5924
- `,gs=(e="black")=>R`
5924
+ `,bs=(e="black")=>R`
5925
5925
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5926
5926
  <path fill-rule="evenodd" clip-rule="evenodd" d="M15 0C17.7614 0 20 2.23858 20 5V15C20 17.7614 17.7614 20 15 20H5C2.23858 20 0 17.7614 0 15V5C0 2.23858 2.23858 0 5 0H15ZM18 5C18 3.34315 16.6569 2 15 2H5C3.34315 2 2 3.34315 2 5V15C2 16.6569 3.34315 18 5 18H15C16.6569 18 18 16.6569 18 15V5Z" fill="${e}"/>
5927
5927
  <path d="M12.1893 9.25L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L13.8232 8.76256C14.5066 9.44598 14.5066 10.554 13.8232 11.2374L11.5303 13.5303C11.2374 13.8232 10.7626 13.8232 10.4697 13.5303C10.1768 13.2374 10.1768 12.7626 10.4697 12.4697L12.1893 10.75L6 10.75C5.58579 10.75 5.25 10.4142 5.25 10C5.25 9.58579 5.58579 9.25 6 9.25L12.1893 9.25Z" fill="${e}"/>
5928
5928
  </svg>
5929
- `;var ms=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let bs=class extends oe{constructor(){super(...arguments),this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.onMount=()=>({}),this.isHealthChat=!1,this.widgetType=Is.Default,this.primaryColor=Ie,this.backgroundColor=De,this.onClickExit=()=>{localStorage.setItem("isChatOpen","false")},this.requiresConsent=!1,this.messages=[],this.isLoadingMessages=!1,this.hasReceivedConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.websitePreviewMapping={},this.sendMessage=async e=>{var t;0!==e.length&&(this.messageInput.value="",this.autoResizeMessageInput(),0===this.messages.length&&(this.messages=[{timestamp:0,message:e,isLeadMessage:!0,chunks:[{text:e,order:0,isDone:!0}],type:Wa.text}]),await(null===(t=this.myPubnub)||void 0===t?void 0:t.sendMessage(e)))},this.scrollToChatBottom=()=>{this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"smooth"})},this.autoResizeMessageInput=()=>{this.messageInput.style.height="auto",this.messageInput.style.height=this.messageInput.scrollHeight+"px"},this.needsConsent=()=>this.requiresConsent&&!this.hasReceivedConsent}get consentKey(){return`${this.orgSlug}Consent`}firstUpdated(){var e,t;this.messages=(null===(e=this.myPubnub)||void 0===e?void 0:e.simpleChatMessages)||[],null===(t=this.myPubnub)||void 0===t||t.addChatListener((e=>{this.messages=e.messages,this.isLoadingMessages=e.isLoading})),this.onMount();const n=localStorage.getItem(this.consentKey);if(!n)return void(this.hasReceivedConsent=!1);const i=JSON.parse(n),{timestamp:o,consentId:r}=i,a=function(e,t){je(2,arguments);var n=He(e),i=He(t),o=hs(n,i),r=Math.abs(ds(n,i));n.setDate(n.getDate()-o*r);var a=Number(hs(n,i)===-o),s=o*(r-a);return 0===s?0:s}(new Date,new Date(o));a<7&&r===fi?this.hasReceivedConsent=!0:(this.hasReceivedConsent=!1,localStorage.removeItem(this.consentKey))}async updated(){this.scrollToChatBottom();try{const e=document.getElementById("#healthchat-container");if(!e)return;e.focus()}catch(e){console.error(e)}}render(){var e,t,n,i,o,r,a,s,l,u,c,d,h,p;if(!this.buildingSlug)return B``;const f=null===(e=this.building)||void 0===e?void 0:e.id;let g={};if(g=bn()?{top:void 0,bottom:0,left:void 0,right:0}:{top:void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:void 0===this.bottom||isNaN(this.bottom)?"130px":`${this.bottom}px`,left:void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:void 0===this.right||isNaN(this.right)?"18px":`${this.right}px`},22320===f&&(g={...g,fontFamily:'"Helvetica Neue", Arial'}),this.widgetType===Is.Utilities)return B`
5929
+ `;var vs=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let ys=class extends oe{constructor(){super(...arguments),this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.onMount=()=>({}),this.isHealthChat=!1,this.widgetType=Us.Default,this.primaryColor=Ie,this.backgroundColor=De,this.onClickExit=()=>{localStorage.setItem("isChatOpen","false")},this.requiresConsent=!1,this.messages=[],this.isLoadingMessages=!1,this.hasReceivedConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.websitePreviewMapping={},this.sendMessage=async e=>{var t;0!==e.length&&(this.messageInput.value="",this.autoResizeMessageInput(),0===this.messages.length&&(this.messages=[{timestamp:0,message:e,isLeadMessage:!0,chunks:[{text:e,order:0,isDone:!0}],type:Ya.text}]),await(null===(t=this.myPubnub)||void 0===t?void 0:t.sendMessage(e)))},this.scrollToChatBottom=()=>{this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"smooth"})},this.autoResizeMessageInput=()=>{this.messageInput.style.height="auto",this.messageInput.style.height=this.messageInput.scrollHeight+"px"},this.needsConsent=()=>this.requiresConsent&&!this.hasReceivedConsent}get consentKey(){return`${this.orgSlug}Consent`}firstUpdated(){var e,t;this.messages=(null===(e=this.myPubnub)||void 0===e?void 0:e.simpleChatMessages)||[],null===(t=this.myPubnub)||void 0===t||t.addChatListener((e=>{this.messages=e.messages,this.isLoadingMessages=e.isLoading})),this.onMount();const n=localStorage.getItem(this.consentKey);if(!n)return void(this.hasReceivedConsent=!1);const i=JSON.parse(n),{timestamp:o,consentId:r}=i,a=function(e,t){je(2,arguments);var n=He(e),i=He(t),o=fs(n,i),r=Math.abs(ps(n,i));n.setDate(n.getDate()-o*r);var a=Number(fs(n,i)===-o),s=o*(r-a);return 0===s?0:s}(new Date,new Date(o));a<7&&r===fi?this.hasReceivedConsent=!0:(this.hasReceivedConsent=!1,localStorage.removeItem(this.consentKey))}async updated(){this.scrollToChatBottom();try{const e=document.getElementById("#healthchat-container");if(!e)return;e.focus()}catch(e){console.error(e)}}render(){var e,t,n,i,o,r,a,s,l,u,c,d,h,p;if(!this.buildingSlug)return B``;const f=null===(e=this.building)||void 0===e?void 0:e.id;let g={};if(g=bn()?{top:void 0,bottom:0,left:void 0,right:0}:{top:void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:void 0===this.bottom||isNaN(this.bottom)?"130px":`${this.bottom}px`,left:void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:void 0===this.right||isNaN(this.right)?"18px":`${this.right}px`},22320===f&&(g={...g,fontFamily:'"Helvetica Neue", Arial'}),this.widgetType===Us.Utilities)return B`
5930
5930
  <div
5931
5931
  id="utilities-container"
5932
5932
  class=${fe({"pubnub-container__mobile":bn(),"utilities-container__desktop":!bn()})}
@@ -5972,13 +5972,13 @@ xmlns="http://www.w3.org/2000/svg"
5972
5972
  class=${e.isLeadMessage?"message-container lead-message":"message-container ai-message"}
5973
5973
  key=${e.timestamp}
5974
5974
  >
5975
- ${qa(e)?B` <pubnub-media
5975
+ ${Va(e)?B` <pubnub-media
5976
5976
  .message=${e}
5977
5977
  .myPubnub=${this.myPubnub}
5978
5978
  .onMount=${()=>this.scrollToChatBottom()}
5979
5979
  >
5980
5980
  </pubnub-media>`:""}
5981
- ${Ga(e)?B` <pubnub-message
5981
+ ${Wa(e)?B` <pubnub-message
5982
5982
  .message=${e}
5983
5983
  .myPubnub=${this.myPubnub}
5984
5984
  .onMount=${()=>this.scrollToChatBottom()}
@@ -6021,12 +6021,12 @@ xmlns="http://www.w3.org/2000/svg"
6021
6021
  class=${fe({"health-bttn-allow-access":bn()})}
6022
6022
  @click=${()=>this.sendMessage(this.messageInput.value)}
6023
6023
  >
6024
- ${fs("black")}
6024
+ ${ms("black")}
6025
6025
  </button>
6026
6026
  </div>
6027
6027
  </div>
6028
6028
  </div>
6029
- `;if(this.widgetType===Is.Healthcare)return B`
6029
+ `;if(this.widgetType===Us.Healthcare)return B`
6030
6030
  <div
6031
6031
  id="healthchat-container"
6032
6032
  class=${fe({"pubnub-container__mobile":bn(),"healthchat-container__desktop":!bn()})}
@@ -6077,13 +6077,13 @@ xmlns="http://www.w3.org/2000/svg"
6077
6077
  class=${e.isLeadMessage?"message-container lead-message":"message-container ai-message"}
6078
6078
  key=${e.timestamp}
6079
6079
  >
6080
- ${qa(e)?B` <pubnub-media
6080
+ ${Va(e)?B` <pubnub-media
6081
6081
  .message=${e}
6082
6082
  .myPubnub=${this.myPubnub}
6083
6083
  .onMount=${()=>this.scrollToChatBottom()}
6084
6084
  >
6085
6085
  </pubnub-media>`:""}
6086
- ${Ga(e)?B` <pubnub-message
6086
+ ${Wa(e)?B` <pubnub-message
6087
6087
  .message=${e}
6088
6088
  .myPubnub=${this.myPubnub}
6089
6089
  .onMount=${()=>this.scrollToChatBottom()}
@@ -6126,7 +6126,7 @@ xmlns="http://www.w3.org/2000/svg"
6126
6126
  class=${fe({"health-bttn-allow-access":bn()})}
6127
6127
  @click=${()=>this.sendMessage(this.messageInput.value)}
6128
6128
  >
6129
- ${bn()?fs("black"):gs("black")}
6129
+ ${bn()?ms("black"):bs("black")}
6130
6130
  </button>
6131
6131
  </div>
6132
6132
  </div>
@@ -6181,13 +6181,13 @@ xmlns="http://www.w3.org/2000/svg"
6181
6181
  class=${ti()("message-container",{"lead-message":e.isLeadMessage,"ai-message":!e.isLeadMessage,"with-box-shadow":444===m})}
6182
6182
  key=${e.timestamp}
6183
6183
  >
6184
- ${qa(e)?B` <pubnub-media
6184
+ ${Va(e)?B` <pubnub-media
6185
6185
  .message=${e}
6186
6186
  .myPubnub=${this.myPubnub}
6187
6187
  .onMount=${()=>this.scrollToChatBottom()}
6188
6188
  >
6189
6189
  </pubnub-media>`:""}
6190
- ${Ga(e)?B` <pubnub-message
6190
+ ${Wa(e)?B` <pubnub-message
6191
6191
  .message=${e}
6192
6192
  .myPubnub=${this.myPubnub}
6193
6193
  .onMount=${()=>this.scrollToChatBottom()}
@@ -6230,11 +6230,11 @@ xmlns="http://www.w3.org/2000/svg"
6230
6230
  aria-label="Send message"
6231
6231
  aria-describedby="Send message"
6232
6232
  >
6233
- ${Le(this.building.orgId,this.building.id)&&this.primaryColor!==Ie?gs("black"):gs("white")}
6233
+ ${Le(this.building.orgId,this.building.id)&&this.primaryColor!==Ie?bs("black"):bs("white")}
6234
6234
  </button>
6235
6235
  </div>
6236
6236
  </div>
6237
- `}};bs.styles=[xn,es,Ja,Za,ps],ms([le({type:Number})],bs.prototype,"right",void 0),ms([le({type:Number})],bs.prototype,"bottom",void 0),ms([le({type:Number})],bs.prototype,"top",void 0),ms([le({type:Number})],bs.prototype,"left",void 0),ms([le({attribute:!0})],bs.prototype,"onMount",void 0),ms([le({attribute:!0})],bs.prototype,"channel",void 0),ms([le({attribute:!0})],bs.prototype,"isHealthChat",void 0),ms([le({attribute:!0})],bs.prototype,"myPubnub",void 0),ms([le({attribute:!0})],bs.prototype,"orgSlug",void 0),ms([le({attribute:!0})],bs.prototype,"buildingSlug",void 0),ms([le({attribute:!0})],bs.prototype,"widgetType",void 0),ms([le({attribute:!0})],bs.prototype,"building",void 0),ms([le({attribute:!0})],bs.prototype,"primaryColor",void 0),ms([le({attribute:!0})],bs.prototype,"backgroundColor",void 0),ms([le({attribute:!0})],bs.prototype,"onClickExit",void 0),ms([le({attribute:!0})],bs.prototype,"requiresConsent",void 0),ms([ce("#message-input",!0)],bs.prototype,"messageInput",void 0),ms([ce("#conversation-body",!0)],bs.prototype,"messageBody",void 0),ms([ue()],bs.prototype,"messages",void 0),ms([ue()],bs.prototype,"isLoadingMessages",void 0),ms([ue()],bs.prototype,"hasReceivedConsent",void 0),ms([ue()],bs.prototype,"privacyPolicyUrl",void 0),ms([ue()],bs.prototype,"websitePreviewMapping",void 0),bs=ms([ae("pubnub-chat")],bs);const vs=(e,t)=>["floor plan","floorplan","floor plans","floorplans"].some((t=>e.toLowerCase().includes(t)))?`${t}/units`:t;var ys=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let ws=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=ii.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=Is.Default,this.onWidgetLoaded=ua(),this.onSstClose=ua(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=Ae(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await Di(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,n)=>{const i=window.rentgrata;if(!i)return;const o=i.Widget;if(!o)return;const r=o.config;if(!r)return;const a=r.widgetKey;a&&await t().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=n?n:""}})})(this.buildingSlug,this.orgSlug)}catch(e){console.warn("Error updating rentgrata token",e)}await(async(e,n,i)=>{const o=.01;if(!e)return console.warn("MeetElise Chat will NOT appear. Building does NOT exist."),To(i,n,!0,!1,"building_does_not_exist",o),!1;if(!e.launchedDateTime)return console.warn("MeetElise Chat will NOT appear. Building is NOT launched (based on launched date time)."),To(i,n,!0,!1,"building_not_launched",o),!1;if(!e.active)return console.warn("MeetElise Chat will NOT appear. Building is NOT active."),To(i,n,!0,!1,"building_not_active",o),!1;if(!e.webchatScopeConfigured)return console.warn("MeetElise Chat will NOT appear. Building is NOT webchat scope configured."),To(i,n,!0,!1,"building_not_webchat_scope_configured",o),!1;const r=await async function(e){if(!e)return!1;try{return(await t().get(ni(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-leasing-in-maintenance-mode",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(n);return!r||(console.warn("MeetElise Chat will NOT appear. Chat is in maintenance mode."),To(i,n,!0,!1,"building_in_maintenance_mode",o),!1)})(e,this.buildingSlug,this.orgSlug)&&(Ai({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==e?void 0:e.launchedDateTime)?.01:.05}),this.buildingWebchatView=e,await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)&&(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.updateAlreadyAutoOpenedTimestamp()),this.isLoading=!1,"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0))},this.setBuildingDerivedInfo=async()=>{var e,n,i,o,r,a,s,l,u,c,d,h,p,f,g,m,b,v,y,w,C,x,A,S,k,T,_,E,O,P,N,M,I,D,U,L,B,R,j,H,F,z,$,Q,G,q,W,V;const Y=this.buildingWebchatView;if(!Y)return;Y&&this.orgSlug&&xs(this.orgSlug,null!==(n=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==n?n:null,this.sampleRateToUse,this.buildingSlug,null!==(o=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==o?o:null);const[K,X,Z,J,ee,te,ne]=await Promise.all([ko(this.buildingSlug),Ea(this.orgSlug,this.buildingSlug),oi(this.buildingSlug),ri(this.buildingSlug),ai(this.buildingSlug),si(this.buildingSlug),li(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Ee(Y.phoneNumber)),this.designConcept=null!==(r=null==K?void 0:K.abTestType)&&void 0!==r?r:"",this.leadSources=X,this.featureFlagShowDropdown=Z;const ie=Y.textWithUsPhoneNumber?Y.textWithUsPhoneNumber:await(async e=>{try{const n="https://app.meetelise.com",i=await t().get(`${n}/platformApi/webchat/${e}/phone-number`);if(i.data)return i.data}catch(t){return xi({logType:Ci.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug),oe=null!==(s=null===(a=this.buildingWebchatView)||void 0===a?void 0:a.shouldShowPricingCalculatorDesktop)&&void 0!==s&&s,re=null!==(u=null===(l=this.buildingWebchatView)||void 0===l?void 0:l.shouldShowPricingCalculatorMobile)&&void 0!==u&&u;var ae,se;this.enabledChatWidgets={callDesktop:null!==(d=null===(c=this.buildingWebchatView)||void 0===c?void 0:c.shouldShowPhoneDesktop)&&void 0!==d&&d,callMobile:null!==(p=null===(h=this.buildingWebchatView)||void 0===h?void 0:h.shouldShowPhoneMobile)&&void 0!==p&&p,chatDesktop:null!==(g=null===(f=this.buildingWebchatView)||void 0===f?void 0:f.shouldShowChatDesktop)&&void 0!==g&&g,chatMobile:null!==(b=null===(m=this.buildingWebchatView)||void 0===m?void 0:m.shouldShowChatMobile)&&void 0!==b&&b,emailDesktop:null!==(y=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailDesktop)&&void 0!==y&&y,emailMobile:null!==(C=null===(w=this.buildingWebchatView)||void 0===w?void 0:w.shouldShowEmailMobile)&&void 0!==C&&C,textDesktop:null!==(A=(null===(x=this.buildingWebchatView)||void 0===x?void 0:x.shouldShowTextDesktop)&&!!ie)&&void 0!==A&&A,textMobile:null!==(k=(null===(S=this.buildingWebchatView)||void 0===S?void 0:S.shouldShowTextMobile)&&!!ie)&&void 0!==k&&k,sstDesktop:null!==(_=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstDesktop)&&void 0!==_&&_,sstMobile:null!==(O=null===(E=this.buildingWebchatView)||void 0===E?void 0:E.shouldShowSstMobile)&&void 0!==O&&O,calcDesktop:oe,calcMobile:re},this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(se=this.handleTourClicked,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",(e=>{e.preventDefault(),se(e)}))})),te&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach((t=>{t&&t.addEventListener("click",(t=>{t.preventDefault(),e(t)}))}))})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach((t=>{var n;if(!t)return;const i=document.createElement("a");i.innerHTML=t.innerHTML,i.style.cursor="pointer",i.addEventListener("click",(t=>{t.preventDefault(),e(t)})),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)}))})(this.handleTourClicked)):(null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&(ae=null!==(M=null===(N=this.LeadSourceClient)||void 0===N?void 0:N.leadSource)&&void 0!==M?M:null,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(ae)}`)}}))),this.buildingWebchatView&&(this.primaryColor=null!==(I=this.buildingWebchatView.primaryColor)&&void 0!==I?I:null,this.backgroundColor=null!==(D=this.buildingWebchatView.secondaryColor)&&void 0!==D?D:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(U=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==U?U:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(L=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==L?L:null,this.webchatConfigHasAutoOpenChat=null!==(B=this.buildingWebchatView.autoOpenChat)&&void 0!==B&&B,this.requiresConsent=null!==(R=this.buildingWebchatView.requiresConsentForChat)&&void 0!==R&&R,this.hideMobileFeatures=null!==(j=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==j&&j,this.privacyPolicyUrl=null!==(H=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==H?H:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===Pi.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===Pi.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===Pi.EMOJI&&(this.designConcept=Pi.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Ie),null===this.backgroundColor&&(this.backgroundColor=De);const le=null!==(z=null===(F=this.buildingWebchatView)||void 0===F?void 0:F.phoneNumber)&&void 0!==z?z:"";let ue=null;if(J&&(ue=await async function(e,n){try{const i=await t().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source?source=${n}`);return i.data?{number:Ee(i.data.number),isMatch:i.data.match,isPropertyWebsiteCatchall:i.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(Q=null===($=this.LeadSourceClient)||void 0===$?void 0:$.leadSource)&&void 0!==Q?Q:null),ue&&!ue.isMatch&&(ue.number=le),!(null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&ue&&(ue.number=le)),ee&&(null==ue?void 0:ue.number)){const e=Ya(ue.number,this.orgSlug,this.buildingSlug);e>0&&Ai({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const ce=localStorage.getItem("eliseai_phone_number_devtest");ce&&(console.info("Using dev test phone number: ",ce),Ya(ce,this.orgSlug,this.buildingSlug)),this.phoneNumberForSource=ue||{number:le,isMatch:!1,isPropertyWebsiteCatchall:!0};const de=null!==(W=null===(q=this.LeadSourceClient)||void 0===q?void 0:q.leadSource)&&void 0!==W?W:null;if(de&&(this.leadSources.includes(de)||this.leadSources.push(de)),Wn(Y.id),ne&&this.buildingSlug&&(null===(V=this.buildingWebchatView)||void 0===V?void 0:V.isLiveOnApplications)){const e=((e,t,n)=>{var i;const o=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/],r=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<r.length;s++){const l=r[s];if(l.nodeType===Node.ELEMENT_NODE&&o.some((e=>e.test(l.href)))){const o=l.getAttribute("href"),r=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=vs(r,e);l.setAttribute("href",s),a++,xi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:o,newHref:s,website:window.location.href},logType:Ci.info,buildingSlug:n,orgSlug:t})}}return 0===a&&xi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:Ci.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}`,this.orgSlug,this.buildingSlug);e>0&&Ai({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}},this.initializeChatVariables=async()=>{var e,n,i,o,r,a,s,l;if(!this.buildingWebchatView)return;const u=za(this.buildingSlug),c=$a(this.buildingSlug,u)?u:Fa(this.buildingSlug,!1);if(!c.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,o)=>{const r=Si();if(this.leadSourceInput={websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:r,referrer:document.referrer,parsedUtmSource:r?r.utm_source:null,campaignSources:Object.values(wi()).filter((e=>e))},i)return;if(!o){const t=this.getLeadSourceBodyIfValid(e);if(t&&!vn(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:Mn(t.timestamp)}}const a={leadSource:t,leadId:n,buildingSlug:e,timestamp:kn(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:Mn(a.timestamp)}},this.getLeadSourceBodyIfValid=e=>{const t=localStorage.getItem("com.elise.webchat.leadsource.slug="+e);if(t)try{const n=JSON.parse(t);if(n.buildingSlug===e&&n.leadSource&&n.leadId&&n.timestamp&&!vn(Mn(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){console.error("Error parsing leadSourceInput from localStorage")}return n}}catch(e){return null}return null}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:n,referrer:i,campaignSources:o}){try{return(await t().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,{query_params:n,building_slug:e,referrer:i,campaign_sources:o})).data}catch(e){return null}}async checkAndHandleForLogLeadSource({webchatAction:e,stateId:n}){var i,o,r,a,s,l,u;try{if(!this.chatId)return console.error("chatId is not set"),null;if(!this.orgSlug)return console.error("orgId is not set"),null;let c=null,d=null;try{if("f1ba5a20-d207-4e5a-879e-65199e7d0a53"===this.orgSlug){const e=await this.getCookieValue("_ga");e&&(c=e),d=null===(i=window.dataLayer.find((e=>{var t;return"gtagApiGet"==(null===(t=e.value)||void 0===t?void 0:t.event)})))||void 0===i?void 0:i.value}}catch(e){console.error("error getting cookie")}return await t().post(`${this.apiHost}/platformApi/webchat/log/lead-source`,{chat_id:this.chatId,webchat_action:e,state_id:n,building_id:this.buildingId,org_slug:this.orgSlug,building_slug:this.buildingSlug,website_origin:null===(o=this.leadSourceInput)||void 0===o?void 0:o.websiteOrigin,website_search:null===(r=this.leadSourceInput)||void 0===r?void 0:r.websiteSearch,query_parameters:null===(a=this.leadSourceInput)||void 0===a?void 0:a.queryParameters,referrer:null===(s=this.leadSourceInput)||void 0===s?void 0:s.referrer,parsed_utm_source:null===(l=this.leadSourceInput)||void 0===l?void 0:l.parsedUtmSource,campaign_sources:null===(u=this.leadSourceInput)||void 0===u?void 0:u.campaignSources,lead_source_output:this.leadSource,google_analytics_client_id:_i()(c)?null:c,extras:null!=d?d:null}),null}catch(e){return null}}async getCookieValue(e){try{const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const i=t[n].trim();if(i.startsWith(e+"="))return i.substring((e+"=").length,-1===i.indexOf(";")?void 0:i.indexOf(";"))}return null}catch(e){console.error("error getting cookie value")}return null}async generateUserLeadSource({leadId:e,orgSlug:t,buildingSlug:n}){try{const i={queryParams:Si(),buildingSlug:n,referrer:document.referrer,campaignSources:wi()};let o=!1;const r=n?this.getLeadSourceBodyIfValid(n):null;if(r){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=r.leadSource,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(i);if(!e)return this.leadSource=r.leadSource,this.leadSource;this.leadSource=e,o=!0}}const a=await this.fetchCurrentParsedLeadSource(i);if(this.leadSource=a,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!a){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSource}if(n){const t=!!a&&a.length>0;this.updateLeadSourceLocalStorage(n,a,e,!t&&!o,o)}return a}catch(e){console.error(e)}return null}},this.myPubnub=new Va(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,c.leadId,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel,await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(i=null===(n=this.myPubnub)||void 0===n?void 0:n.leadUserId)&&void 0!==i?i:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug})),console.log("EliseAI Mapped Lead Source source: ",null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource),"property-website"!==Ei(this.orgSlug)?this.myPubnub.leadSource=null!==(a=null===(r=this.LeadSourceClient)||void 0===r?void 0:r.leadSource)&&void 0!==a?a:Ei(this.orgSlug):this.myPubnub.leadSource=null!==(l=null===(s=this.LeadSourceClient)||void 0===s?void 0:s.leadSource)&&void 0!==l?l:null,c.initiatedChat&&await this.myPubnub.initializePubnub(u)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!Pn(Mn(t)));return!!e&&!!n&&!bn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",kn(function(e,t){je(2,arguments);var n=nt(t);return it(e,6e4*n)}(new Date,15)))},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const o=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!o)return;const r=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==r?void 0:r.getBoundingClientRect();a&&(o.style.left=`${a.left}px`,o.style.top=`${a.bottom}px`)},this.handleKeydownTab=e=>{var t,n,i,o,r,a,s,l,u,c,d,h,p,f,g,m,b,v,y,w;if("Tab"===e.key){const C=this.displayPubnubChat?null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"):null!==(g=null!==(u=null===(l=null===(s=null===(a=null===(r=null===(o=this.shadowRoot)||void 0===o?void 0:o.getElementById("meetelise-launcher"))||void 0===r?void 0:r.shadowRoot)||void 0===a?void 0:a.getElementById("email-us-window"))||void 0===s?void 0:s.shadowRoot)||void 0===l?void 0:l.getElementById("email-us-form"))&&void 0!==u?u:null===(f=null===(p=null===(h=null===(d=null===(c=this.shadowRoot)||void 0===c?void 0:c.getElementById("meetelise-launcher"))||void 0===d?void 0:d.shadowRoot)||void 0===h?void 0:h.getElementById("tour-scheduler-window"))||void 0===p?void 0:p.shadowRoot)||void 0===f?void 0:f.getElementById("scheduler-container"))&&void 0!==g?g:null===(w=null===(y=null===(v=null===(b=null===(m=this.shadowRoot)||void 0===m?void 0:m.getElementById("meetelise-launcher"))||void 0===b?void 0:b.shadowRoot)||void 0===v?void 0:v.getElementById("call-us-window"))||void 0===y?void 0:y.shadowRoot)||void 0===w?void 0:w.getElementById("details-window");if(!C)return;e.preventDefault();const x=C.querySelectorAll("input, me-select, textarea, action-confirm-button, [tabindex]"),A=Array.from(x),S=A.findIndex((e=>e.matches(":focus")));A[(S+1)%A.length].focus()}},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false")}}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new yi(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),Ha(this.buildingSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),window.addEventListener("keydown",this.handleKeydownTab)}getDeepActiveElement(){let e=document.activeElement,t=0;for(;(null==e?void 0:e.shadowRoot)&&(null==e?void 0:e.shadowRoot.activeElement);)if(t+=1,e=null==e?void 0:e.shadowRoot.activeElement,t>100){xi({logType:Ci.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_GETTING_DEEP_ELEMENT]",logData:{message:"error getting deep active element"}});break}return e}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),super.disconnectedCallback()}render(){var e,t,n,i,o,r,a,s,l,u,c,d,h,p,f,g,m,b,v,y,w,C,x,A,S,k,T,_,E,O,P,N,M,I,D,U;pa();const L=this.hideLauncher&&!this.isLoading&&!bn();return B`
6237
+ `}};ys.styles=[xn,ns,ts,es,gs],vs([le({type:Number})],ys.prototype,"right",void 0),vs([le({type:Number})],ys.prototype,"bottom",void 0),vs([le({type:Number})],ys.prototype,"top",void 0),vs([le({type:Number})],ys.prototype,"left",void 0),vs([le({attribute:!0})],ys.prototype,"onMount",void 0),vs([le({attribute:!0})],ys.prototype,"channel",void 0),vs([le({attribute:!0})],ys.prototype,"isHealthChat",void 0),vs([le({attribute:!0})],ys.prototype,"myPubnub",void 0),vs([le({attribute:!0})],ys.prototype,"orgSlug",void 0),vs([le({attribute:!0})],ys.prototype,"buildingSlug",void 0),vs([le({attribute:!0})],ys.prototype,"widgetType",void 0),vs([le({attribute:!0})],ys.prototype,"building",void 0),vs([le({attribute:!0})],ys.prototype,"primaryColor",void 0),vs([le({attribute:!0})],ys.prototype,"backgroundColor",void 0),vs([le({attribute:!0})],ys.prototype,"onClickExit",void 0),vs([le({attribute:!0})],ys.prototype,"requiresConsent",void 0),vs([ce("#message-input",!0)],ys.prototype,"messageInput",void 0),vs([ce("#conversation-body",!0)],ys.prototype,"messageBody",void 0),vs([ue()],ys.prototype,"messages",void 0),vs([ue()],ys.prototype,"isLoadingMessages",void 0),vs([ue()],ys.prototype,"hasReceivedConsent",void 0),vs([ue()],ys.prototype,"privacyPolicyUrl",void 0),vs([ue()],ys.prototype,"websitePreviewMapping",void 0),ys=vs([ae("pubnub-chat")],ys);const ws=(e,t)=>["floor plan","floorplan","floor plans","floorplans"].some((t=>e.toLowerCase().includes(t)))?`${t}/units`:t;var Cs=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let xs=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=ii.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=Us.Default,this.onWidgetLoaded=ua(),this.onSstClose=ua(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=Ae(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await Di(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,n)=>{const i=window.rentgrata;if(!i)return;const o=i.Widget;if(!o)return;const r=o.config;if(!r)return;const a=r.widgetKey;a&&await t().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=n?n:""}})})(this.buildingSlug,this.orgSlug)}catch(e){console.warn("Error updating rentgrata token",e)}await(async(e,n,i)=>{const o=.01;if(!e)return console.warn("MeetElise Chat will NOT appear. Building does NOT exist."),To(i,n,!0,!1,"building_does_not_exist",o),!1;if(!e.launchedDateTime)return console.warn("MeetElise Chat will NOT appear. Building is NOT launched (based on launched date time)."),To(i,n,!0,!1,"building_not_launched",o),!1;if(!e.active)return console.warn("MeetElise Chat will NOT appear. Building is NOT active."),To(i,n,!0,!1,"building_not_active",o),!1;if(!e.webchatScopeConfigured)return console.warn("MeetElise Chat will NOT appear. Building is NOT webchat scope configured."),To(i,n,!0,!1,"building_not_webchat_scope_configured",o),!1;const r=await async function(e){if(!e)return!1;try{return(await t().get(ni(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-leasing-in-maintenance-mode",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(n);return!r||(console.warn("MeetElise Chat will NOT appear. Chat is in maintenance mode."),To(i,n,!0,!1,"building_in_maintenance_mode",o),!1)})(e,this.buildingSlug,this.orgSlug)&&(Ai({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==e?void 0:e.launchedDateTime)?.01:.05}),this.buildingWebchatView=e,await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)&&(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.updateAlreadyAutoOpenedTimestamp()),this.isLoading=!1,"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0))},this.setBuildingDerivedInfo=async()=>{var e,n,i,o,r,a,s,l,u,c,d,h,p,f,g,m,b,v,y,w,C,x,A,S,k,T,_,E,O,P,N,M,I,D,U,L,B,R,j,H,F,z,$,Q,G,q,W,V;const Y=this.buildingWebchatView;if(!Y)return;Y&&this.orgSlug&&Ss(this.orgSlug,null!==(n=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==n?n:null,this.sampleRateToUse,this.buildingSlug,null!==(o=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==o?o:null);const[K,X,Z,J,ee,te,ne]=await Promise.all([ko(this.buildingSlug),Pa(this.orgSlug,this.buildingSlug),oi(this.buildingSlug),ri(this.buildingSlug),ai(this.buildingSlug),si(this.buildingSlug),li(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Ee(Y.phoneNumber)),this.designConcept=null!==(r=null==K?void 0:K.abTestType)&&void 0!==r?r:"",this.leadSources=X,this.featureFlagShowDropdown=Z;const ie=Y.textWithUsPhoneNumber?Y.textWithUsPhoneNumber:await(async e=>{try{const n="https://app.meetelise.com",i=await t().get(`${n}/platformApi/webchat/${e}/phone-number`);if(i.data)return i.data}catch(t){return xi({logType:Ci.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug),oe=null!==(s=null===(a=this.buildingWebchatView)||void 0===a?void 0:a.shouldShowPricingCalculatorDesktop)&&void 0!==s&&s,re=null!==(u=null===(l=this.buildingWebchatView)||void 0===l?void 0:l.shouldShowPricingCalculatorMobile)&&void 0!==u&&u,ae={callDesktop:null!==(d=null===(c=this.buildingWebchatView)||void 0===c?void 0:c.shouldShowPhoneDesktop)&&void 0!==d&&d,callMobile:null!==(p=null===(h=this.buildingWebchatView)||void 0===h?void 0:h.shouldShowPhoneMobile)&&void 0!==p&&p,chatDesktop:null!==(g=null===(f=this.buildingWebchatView)||void 0===f?void 0:f.shouldShowChatDesktop)&&void 0!==g&&g,chatMobile:null!==(b=null===(m=this.buildingWebchatView)||void 0===m?void 0:m.shouldShowChatMobile)&&void 0!==b&&b,emailDesktop:null!==(y=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailDesktop)&&void 0!==y&&y,emailMobile:null!==(C=null===(w=this.buildingWebchatView)||void 0===w?void 0:w.shouldShowEmailMobile)&&void 0!==C&&C,textDesktop:null!==(A=(null===(x=this.buildingWebchatView)||void 0===x?void 0:x.shouldShowTextDesktop)&&!!ie)&&void 0!==A&&A,textMobile:null!==(k=(null===(S=this.buildingWebchatView)||void 0===S?void 0:S.shouldShowTextMobile)&&!!ie)&&void 0!==k&&k,sstDesktop:null!==(_=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstDesktop)&&void 0!==_&&_,sstMobile:null!==(O=null===(E=this.buildingWebchatView)||void 0===E?void 0:E.shouldShowSstMobile)&&void 0!==O&&O,calcDesktop:oe,calcMobile:re};var se,le;this.enabledChatWidgets=(e=>{const t=window.location.hostname;if(!fa.includes(t))return e;const n=(e=>{if(!e)return{};try{return e.split(",").reduce(((e,t)=>{const[n,i]=t.split(":");return n&&i&&n in ga&&(e[n]="true"===i.toLowerCase()),e}),{})}catch(e){return console.warn("Error parsing widget overrides:",e),{}}})(new URLSearchParams(window.location.search).get("widgets"));if(0===Object.keys(n).length)return e;const i={...e};return Object.entries(n).forEach((([e,t])=>{const n=ga[e];n&&(i[n.desktop]=t,i[n.mobile]=t)})),console.info("Applied widget overrides:",n),i})(ae),this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(le=this.handleTourClicked,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",(e=>{e.preventDefault(),le(e)}))})),te&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach((t=>{t&&t.addEventListener("click",(t=>{t.preventDefault(),e(t)}))}))})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach((t=>{var n;if(!t)return;const i=document.createElement("a");i.innerHTML=t.innerHTML,i.style.cursor="pointer",i.addEventListener("click",(t=>{t.preventDefault(),e(t)})),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)}))})(this.handleTourClicked)):(null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&(se=null!==(M=null===(N=this.LeadSourceClient)||void 0===N?void 0:N.leadSource)&&void 0!==M?M:null,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(se)}`)}}))),this.buildingWebchatView&&(this.primaryColor=null!==(I=this.buildingWebchatView.primaryColor)&&void 0!==I?I:null,this.backgroundColor=null!==(D=this.buildingWebchatView.secondaryColor)&&void 0!==D?D:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(U=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==U?U:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(L=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==L?L:null,this.webchatConfigHasAutoOpenChat=null!==(B=this.buildingWebchatView.autoOpenChat)&&void 0!==B&&B,this.requiresConsent=null!==(R=this.buildingWebchatView.requiresConsentForChat)&&void 0!==R&&R,this.hideMobileFeatures=null!==(j=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==j&&j,this.privacyPolicyUrl=null!==(H=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==H?H:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===Pi.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===Pi.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===Pi.EMOJI&&(this.designConcept=Pi.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Ie),null===this.backgroundColor&&(this.backgroundColor=De);const ue=null!==(z=null===(F=this.buildingWebchatView)||void 0===F?void 0:F.phoneNumber)&&void 0!==z?z:"";let ce=null;if(J&&(ce=await async function(e,n){try{const i=await t().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source?source=${n}`);return i.data?{number:Ee(i.data.number),isMatch:i.data.match,isPropertyWebsiteCatchall:i.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(Q=null===($=this.LeadSourceClient)||void 0===$?void 0:$.leadSource)&&void 0!==Q?Q:null),ce&&!ce.isMatch&&(ce.number=ue),!(null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&ce&&(ce.number=ue)),ee&&(null==ce?void 0:ce.number)){const e=Xa(ce.number,this.orgSlug,this.buildingSlug);e>0&&Ai({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const de=localStorage.getItem("eliseai_phone_number_devtest");de&&(console.info("Using dev test phone number: ",de),Xa(de,this.orgSlug,this.buildingSlug)),this.phoneNumberForSource=ce||{number:ue,isMatch:!1,isPropertyWebsiteCatchall:!0};const he=null!==(W=null===(q=this.LeadSourceClient)||void 0===q?void 0:q.leadSource)&&void 0!==W?W:null;if(he&&(this.leadSources.includes(he)||this.leadSources.push(he)),Wn(Y.id),ne&&this.buildingSlug&&(null===(V=this.buildingWebchatView)||void 0===V?void 0:V.isLiveOnApplications)){const e=((e,t,n)=>{var i;const o=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/],r=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<r.length;s++){const l=r[s];if(l.nodeType===Node.ELEMENT_NODE&&o.some((e=>e.test(l.href)))){const o=l.getAttribute("href"),r=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=ws(r,e);l.setAttribute("href",s),a++,xi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:o,newHref:s,website:window.location.href},logType:Ci.info,buildingSlug:n,orgSlug:t})}}return 0===a&&xi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:Ci.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}`,this.orgSlug,this.buildingSlug);e>0&&Ai({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}},this.initializeChatVariables=async()=>{var e,n,i,o,r,a,s,l;if(!this.buildingWebchatView)return;const u=Qa(this.buildingSlug),c=Ga(this.buildingSlug,u)?u:$a(this.buildingSlug,!1);if(!c.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,o)=>{const r=Si();if(this.leadSourceInput={websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:r,referrer:document.referrer,parsedUtmSource:r?r.utm_source:null,campaignSources:Object.values(wi()).filter((e=>e))},i)return;if(!o){const t=this.getLeadSourceBodyIfValid(e);if(t&&!vn(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:Mn(t.timestamp)}}const a={leadSource:t,leadId:n,buildingSlug:e,timestamp:kn(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:Mn(a.timestamp)}},this.getLeadSourceBodyIfValid=e=>{const t=localStorage.getItem("com.elise.webchat.leadsource.slug="+e);if(t)try{const n=JSON.parse(t);if(n.buildingSlug===e&&n.leadSource&&n.leadId&&n.timestamp&&!vn(Mn(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){console.error("Error parsing leadSourceInput from localStorage")}return n}}catch(e){return null}return null}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:n,referrer:i,campaignSources:o}){try{return(await t().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,{query_params:n,building_slug:e,referrer:i,campaign_sources:o})).data}catch(e){return null}}async checkAndHandleForLogLeadSource({webchatAction:e,stateId:n}){var i,o,r,a,s,l,u;try{if(!this.chatId)return console.error("chatId is not set"),null;if(!this.orgSlug)return console.error("orgId is not set"),null;let c=null,d=null;try{if("f1ba5a20-d207-4e5a-879e-65199e7d0a53"===this.orgSlug){const e=await this.getCookieValue("_ga");e&&(c=e),d=null===(i=window.dataLayer.find((e=>{var t;return"gtagApiGet"==(null===(t=e.value)||void 0===t?void 0:t.event)})))||void 0===i?void 0:i.value}}catch(e){console.error("error getting cookie")}return await t().post(`${this.apiHost}/platformApi/webchat/log/lead-source`,{chat_id:this.chatId,webchat_action:e,state_id:n,building_id:this.buildingId,org_slug:this.orgSlug,building_slug:this.buildingSlug,website_origin:null===(o=this.leadSourceInput)||void 0===o?void 0:o.websiteOrigin,website_search:null===(r=this.leadSourceInput)||void 0===r?void 0:r.websiteSearch,query_parameters:null===(a=this.leadSourceInput)||void 0===a?void 0:a.queryParameters,referrer:null===(s=this.leadSourceInput)||void 0===s?void 0:s.referrer,parsed_utm_source:null===(l=this.leadSourceInput)||void 0===l?void 0:l.parsedUtmSource,campaign_sources:null===(u=this.leadSourceInput)||void 0===u?void 0:u.campaignSources,lead_source_output:this.leadSource,google_analytics_client_id:_i()(c)?null:c,extras:null!=d?d:null}),null}catch(e){return null}}async getCookieValue(e){try{const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const i=t[n].trim();if(i.startsWith(e+"="))return i.substring((e+"=").length,-1===i.indexOf(";")?void 0:i.indexOf(";"))}return null}catch(e){console.error("error getting cookie value")}return null}async generateUserLeadSource({leadId:e,orgSlug:t,buildingSlug:n}){try{const i={queryParams:Si(),buildingSlug:n,referrer:document.referrer,campaignSources:wi()};let o=!1;const r=n?this.getLeadSourceBodyIfValid(n):null;if(r){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=r.leadSource,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(i);if(!e)return this.leadSource=r.leadSource,this.leadSource;this.leadSource=e,o=!0}}const a=await this.fetchCurrentParsedLeadSource(i);if(this.leadSource=a,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!a){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSource}if(n){const t=!!a&&a.length>0;this.updateLeadSourceLocalStorage(n,a,e,!t&&!o,o)}return a}catch(e){console.error(e)}return null}},this.myPubnub=new Ka(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,c.leadId,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel,await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(i=null===(n=this.myPubnub)||void 0===n?void 0:n.leadUserId)&&void 0!==i?i:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug})),console.log("EliseAI Mapped Lead Source source: ",null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource),"property-website"!==Ei(this.orgSlug)?this.myPubnub.leadSource=null!==(a=null===(r=this.LeadSourceClient)||void 0===r?void 0:r.leadSource)&&void 0!==a?a:Ei(this.orgSlug):this.myPubnub.leadSource=null!==(l=null===(s=this.LeadSourceClient)||void 0===s?void 0:s.leadSource)&&void 0!==l?l:null,c.initiatedChat&&await this.myPubnub.initializePubnub(u)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!Pn(Mn(t)));return!!e&&!!n&&!bn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",kn(function(e,t){je(2,arguments);var n=nt(t);return it(e,6e4*n)}(new Date,15)))},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const o=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!o)return;const r=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==r?void 0:r.getBoundingClientRect();a&&(o.style.left=`${a.left}px`,o.style.top=`${a.bottom}px`)},this.handleKeydownTab=e=>{var t,n,i,o,r,a,s,l,u,c,d,h,p,f,g,m,b,v,y,w;if("Tab"===e.key){const C=this.displayPubnubChat?null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"):null!==(g=null!==(u=null===(l=null===(s=null===(a=null===(r=null===(o=this.shadowRoot)||void 0===o?void 0:o.getElementById("meetelise-launcher"))||void 0===r?void 0:r.shadowRoot)||void 0===a?void 0:a.getElementById("email-us-window"))||void 0===s?void 0:s.shadowRoot)||void 0===l?void 0:l.getElementById("email-us-form"))&&void 0!==u?u:null===(f=null===(p=null===(h=null===(d=null===(c=this.shadowRoot)||void 0===c?void 0:c.getElementById("meetelise-launcher"))||void 0===d?void 0:d.shadowRoot)||void 0===h?void 0:h.getElementById("tour-scheduler-window"))||void 0===p?void 0:p.shadowRoot)||void 0===f?void 0:f.getElementById("scheduler-container"))&&void 0!==g?g:null===(w=null===(y=null===(v=null===(b=null===(m=this.shadowRoot)||void 0===m?void 0:m.getElementById("meetelise-launcher"))||void 0===b?void 0:b.shadowRoot)||void 0===v?void 0:v.getElementById("call-us-window"))||void 0===y?void 0:y.shadowRoot)||void 0===w?void 0:w.getElementById("details-window");if(!C)return;e.preventDefault();const x=C.querySelectorAll("input, me-select, textarea, action-confirm-button, [tabindex]"),A=Array.from(x),S=A.findIndex((e=>e.matches(":focus")));A[(S+1)%A.length].focus()}},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false")}}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new yi(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),za(this.buildingSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),window.addEventListener("keydown",this.handleKeydownTab)}getDeepActiveElement(){let e=document.activeElement,t=0;for(;(null==e?void 0:e.shadowRoot)&&(null==e?void 0:e.shadowRoot.activeElement);)if(t+=1,e=null==e?void 0:e.shadowRoot.activeElement,t>100){xi({logType:Ci.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_GETTING_DEEP_ELEMENT]",logData:{message:"error getting deep active element"}});break}return e}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),super.disconnectedCallback()}render(){var e,t,n,i,o,r,a,s,l,u,c,d,h,p,f,g,m,b,v,y,w,C,x,A,S,k,T,_,E,O,P,N,M,I,D,U;pa();const L=this.hideLauncher&&!this.isLoading&&!bn();return B`
6238
6238
  <meta name="viewport" content="width=device-width, initial-scale=1">
6239
6239
  <div id="aria-describe-info" style="display: none;">
6240
6240
  EliseAI widget that allows you to chat with a virtual assistant, book
@@ -6249,7 +6249,7 @@ xmlns="http://www.w3.org/2000/svg"
6249
6249
  .myPubnub=${this.myPubnub}
6250
6250
  .orgSlug=${this.orgSlug}
6251
6251
  .buildingSlug=${this.buildingSlug}
6252
- .widgetType=${Is.Default}
6252
+ .widgetType=${Us.Default}
6253
6253
  .building=${this.buildingWebchatView}
6254
6254
  .primaryColor=${this.primaryColor}
6255
6255
  .backgroundColor=${this.backgroundColor}
@@ -6345,7 +6345,7 @@ xmlns="http://www.w3.org/2000/svg"
6345
6345
  </meetelise-launcher>`:""}
6346
6346
  </div>
6347
6347
  </meta>
6348
- `}};ws.styles=l`
6348
+ `}};xs.styles=l`
6349
6349
  :host {
6350
6350
  all: initial;
6351
6351
  }
@@ -6394,7 +6394,7 @@ xmlns="http://www.w3.org/2000/svg"
6394
6394
  position: fixed;
6395
6395
  bottom: 0;
6396
6396
  }
6397
- `,ys([le({type:String})],ws.prototype,"buildingSlug",void 0),ys([le({type:String})],ws.prototype,"orgSlug",void 0),ys([le({type:Object})],ws.prototype,"launcherStyles",void 0),ys([le()],ws.prototype,"mobileStyles",void 0),ys([le({type:Boolean})],ws.prototype,"isMinimized",void 0),ys([le({type:String})],ws.prototype,"primaryColor",void 0),ys([le({type:String})],ws.prototype,"backgroundColor",void 0),ys([le({type:String})],ws.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),ys([le({type:String})],ws.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),ys([ue()],ws.prototype,"chatId",void 0),ys([ue()],ws.prototype,"analytics",void 0),ys([ue()],ws.prototype,"launcher",void 0),ys([ue()],ws.prototype,"buildingWebchatView",void 0),ys([ue()],ws.prototype,"designConcept",void 0),ys([ue()],ws.prototype,"leadSources",void 0),ys([ue()],ws.prototype,"currentLeadSource",void 0),ys([ue()],ws.prototype,"featureFlagShowDropdown",void 0),ys([ue()],ws.prototype,"phoneNumberForSource",void 0),ys([ue()],ws.prototype,"hasMounted",void 0),ys([ue()],ws.prototype,"hideLauncher",void 0),ys([ue()],ws.prototype,"isLoading",void 0),ys([ue()],ws.prototype,"showTourNextToChat",void 0),ys([ue()],ws.prototype,"displayPubnubChat",void 0),ys([ue()],ws.prototype,"myPubnub",void 0),ys([ue()],ws.prototype,"LeadSourceClient",void 0),ys([ue()],ws.prototype,"sampleRateToUse",void 0),ys([le({type:Number})],ws.prototype,"right",void 0),ys([le({type:Number})],ws.prototype,"bottom",void 0),ys([le({type:Number})],ws.prototype,"top",void 0),ys([le({type:Number})],ws.prototype,"left",void 0),ys([le({attribute:!0})],ws.prototype,"overrideRentgrata",void 0),ys([le({attribute:!0})],ws.prototype,"widgetType",void 0),ys([le()],ws.prototype,"onWidgetLoaded",void 0),ys([le({attribute:!0})],ws.prototype,"onSstClose",void 0),ys([ue()],ws.prototype,"enabledChatWidgets",void 0),ys([ue()],ws.prototype,"webchatConfigHasAutoOpenChat",void 0),ys([ue()],ws.prototype,"requiresConsent",void 0),ys([ue()],ws.prototype,"hideMobileFeatures",void 0),ys([ue()],ws.prototype,"privacyPolicyUrl",void 0),ws=ys([ae("me-chat")],ws);const Cs=e=>{for(const t of e){const e=document.getElementById(t);if(e)return e}return null},xs=async(e,n,i,o,r)=>{var a;if(!o||!e)return;const s=await async function(e){if(!e)return!1;try{return(await t().get(ni(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-override-contact-us-form",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(o);if(!s)return;const l=Cs(["myContactForm","contactus","fpa-myContactForm"]);let u;if(!(l&&l instanceof HTMLFormElement)){const t=document.querySelector("form");return void(window.location.pathname.toLowerCase().includes("contactus")&&As(o,e,"Could not find form",t?{id:t.id}:void 0))}try{if(l.parentElement&&"scheduleTourForm"===l.parentElement.id)return As(o,e,"Form is apart of schedule tour form!")}catch(e){console.error("error",e)}for(let e=0;e<l.elements.length;e++){const t=l.elements[e];if("button"===t.tagName.toLowerCase()&&"fakebutton"===t.getAttribute("data-selenium-id")){u=t;break}if("fpa-contact-submit"===t.getAttribute("id")){u=t;break}}if(!u)return As(o,e,"Could not find submit button");const c=()=>({firstName:Cs(["firstname","txtName","fpa-firstname","Form_FirstName"]),lastName:Cs(["lastname","txtName2","fpa-lastname","Form_LastName"]),email:Cs(["email","txtEmail","fpa-email","Form_Email"]),phone:Cs(["phonenumber","txtPhone","fpa-phonenumber","Form_Phone"]),message:Cs(["message","txtComments","fpa-email","Form_Message"])});if(Object.values(c()).some((e=>null===e))){const t=Object.entries(c()).filter((([,e])=>null===e)).map((([e])=>e));return As(o,e,"Missing the following form elements: "+t.join(", "))}const d=u.textContent,h=u.cloneNode(!0);null===(a=u.parentNode)||void 0===a||a.replaceChild(h,u),h&&Ai({params:{chat_id:n,org_slug:e,building_slug:o,is_form_override_success:!0},sampleRate:i}),h.onclick=async function(t){if(Object.values(c()).forEach((e=>{"true"!==(null==e?void 0:e.getAttribute("aria-required"))||e.value||(e.className="form-control required is-invalid")})),!Object.values(c()).every((e=>null!==e&&!("true"===e.getAttribute("aria-required")&&!e.value)&&("email"!==e.id&&"phonenumber"!==e.id||"true"!==e.getAttribute("aria-invalid")))))return;t.preventDefault(),h.textContent="Processing request...",h.disabled=!0;const n={};Object.entries(c()).forEach((([e,t])=>n[e]=null==t?void 0:t.value));const i=await Di(e,o);if(!i)return As(o,e,"Could not find building"),null;const a={email_address:n.email,first_name:n.firstName,last_name:n.lastName,phone_number:n.phone,first_message:n.message,building_id:i.id,is_external_form:!0,lead_sources:[...new Set(r?[r,Ei(e)]:[Ei(e)])]},s=JSON.stringify(a);fetch("https://app.meetelise.com/platformApi/state/create/contactMe",{method:"POST",headers:{"Content-Type":"application/json","building-slug":o,"org-slug":e},body:s}).then((e=>{if(!e.ok)throw new Error(`HTTP error ${e.status}`);return l&&l.reset(),Object.values(c()).forEach((e=>{e&&(e.disabled=!0)})),h.textContent="Submitted",h.disabled=!0,e.json()})).catch((()=>{h.textContent=d}))}},As=(e,t,n,i)=>{const o=JSON.stringify({orgSlug:t,buildingSlug:e,reason:n,url:window.location.href,formIdInfo:i});fetch("https://app.meetelise.com/platformApi/webchat/form-override-error",{method:"POST",headers:{"Content-Type":"application/json","building-slug":e,"org-slug":t},body:o})},Ss=l`
6397
+ `,Cs([le({type:String})],xs.prototype,"buildingSlug",void 0),Cs([le({type:String})],xs.prototype,"orgSlug",void 0),Cs([le({type:Object})],xs.prototype,"launcherStyles",void 0),Cs([le()],xs.prototype,"mobileStyles",void 0),Cs([le({type:Boolean})],xs.prototype,"isMinimized",void 0),Cs([le({type:String})],xs.prototype,"primaryColor",void 0),Cs([le({type:String})],xs.prototype,"backgroundColor",void 0),Cs([le({type:String})],xs.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Cs([le({type:String})],xs.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),Cs([ue()],xs.prototype,"chatId",void 0),Cs([ue()],xs.prototype,"analytics",void 0),Cs([ue()],xs.prototype,"launcher",void 0),Cs([ue()],xs.prototype,"buildingWebchatView",void 0),Cs([ue()],xs.prototype,"designConcept",void 0),Cs([ue()],xs.prototype,"leadSources",void 0),Cs([ue()],xs.prototype,"currentLeadSource",void 0),Cs([ue()],xs.prototype,"featureFlagShowDropdown",void 0),Cs([ue()],xs.prototype,"phoneNumberForSource",void 0),Cs([ue()],xs.prototype,"hasMounted",void 0),Cs([ue()],xs.prototype,"hideLauncher",void 0),Cs([ue()],xs.prototype,"isLoading",void 0),Cs([ue()],xs.prototype,"showTourNextToChat",void 0),Cs([ue()],xs.prototype,"displayPubnubChat",void 0),Cs([ue()],xs.prototype,"myPubnub",void 0),Cs([ue()],xs.prototype,"LeadSourceClient",void 0),Cs([ue()],xs.prototype,"sampleRateToUse",void 0),Cs([le({type:Number})],xs.prototype,"right",void 0),Cs([le({type:Number})],xs.prototype,"bottom",void 0),Cs([le({type:Number})],xs.prototype,"top",void 0),Cs([le({type:Number})],xs.prototype,"left",void 0),Cs([le({attribute:!0})],xs.prototype,"overrideRentgrata",void 0),Cs([le({attribute:!0})],xs.prototype,"widgetType",void 0),Cs([le()],xs.prototype,"onWidgetLoaded",void 0),Cs([le({attribute:!0})],xs.prototype,"onSstClose",void 0),Cs([ue()],xs.prototype,"enabledChatWidgets",void 0),Cs([ue()],xs.prototype,"webchatConfigHasAutoOpenChat",void 0),Cs([ue()],xs.prototype,"requiresConsent",void 0),Cs([ue()],xs.prototype,"hideMobileFeatures",void 0),Cs([ue()],xs.prototype,"privacyPolicyUrl",void 0),xs=Cs([ae("me-chat")],xs);const As=e=>{for(const t of e){const e=document.getElementById(t);if(e)return e}return null},Ss=async(e,n,i,o,r)=>{var a;if(!o||!e)return;const s=await async function(e){if(!e)return!1;try{return(await t().get(ni(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-override-contact-us-form",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(o);if(!s)return;const l=As(["myContactForm","contactus","fpa-myContactForm"]);let u;if(!(l&&l instanceof HTMLFormElement)){const t=document.querySelector("form");return void(window.location.pathname.toLowerCase().includes("contactus")&&ks(o,e,"Could not find form",t?{id:t.id}:void 0))}try{if(l.parentElement&&"scheduleTourForm"===l.parentElement.id)return ks(o,e,"Form is apart of schedule tour form!")}catch(e){console.error("error",e)}for(let e=0;e<l.elements.length;e++){const t=l.elements[e];if("button"===t.tagName.toLowerCase()&&"fakebutton"===t.getAttribute("data-selenium-id")){u=t;break}if("fpa-contact-submit"===t.getAttribute("id")){u=t;break}}if(!u)return ks(o,e,"Could not find submit button");const c=()=>({firstName:As(["firstname","txtName","fpa-firstname","Form_FirstName"]),lastName:As(["lastname","txtName2","fpa-lastname","Form_LastName"]),email:As(["email","txtEmail","fpa-email","Form_Email"]),phone:As(["phonenumber","txtPhone","fpa-phonenumber","Form_Phone"]),message:As(["message","txtComments","fpa-email","Form_Message"])});if(Object.values(c()).some((e=>null===e))){const t=Object.entries(c()).filter((([,e])=>null===e)).map((([e])=>e));return ks(o,e,"Missing the following form elements: "+t.join(", "))}const d=u.textContent,h=u.cloneNode(!0);null===(a=u.parentNode)||void 0===a||a.replaceChild(h,u),h&&Ai({params:{chat_id:n,org_slug:e,building_slug:o,is_form_override_success:!0},sampleRate:i}),h.onclick=async function(t){if(Object.values(c()).forEach((e=>{"true"!==(null==e?void 0:e.getAttribute("aria-required"))||e.value||(e.className="form-control required is-invalid")})),!Object.values(c()).every((e=>null!==e&&!("true"===e.getAttribute("aria-required")&&!e.value)&&("email"!==e.id&&"phonenumber"!==e.id||"true"!==e.getAttribute("aria-invalid")))))return;t.preventDefault(),h.textContent="Processing request...",h.disabled=!0;const n={};Object.entries(c()).forEach((([e,t])=>n[e]=null==t?void 0:t.value));const i=await Di(e,o);if(!i)return ks(o,e,"Could not find building"),null;const a={email_address:n.email,first_name:n.firstName,last_name:n.lastName,phone_number:n.phone,first_message:n.message,building_id:i.id,is_external_form:!0,lead_sources:[...new Set(r?[r,Ei(e)]:[Ei(e)])]},s=JSON.stringify(a);fetch("https://app.meetelise.com/platformApi/state/create/contactMe",{method:"POST",headers:{"Content-Type":"application/json","building-slug":o,"org-slug":e},body:s}).then((e=>{if(!e.ok)throw new Error(`HTTP error ${e.status}`);return l&&l.reset(),Object.values(c()).forEach((e=>{e&&(e.disabled=!0)})),h.textContent="Submitted",h.disabled=!0,e.json()})).catch((()=>{h.textContent=d}))}},ks=(e,t,n,i)=>{const o=JSON.stringify({orgSlug:t,buildingSlug:e,reason:n,url:window.location.href,formIdInfo:i});fetch("https://app.meetelise.com/platformApi/webchat/form-override-error",{method:"POST",headers:{"Content-Type":"application/json","building-slug":e,"org-slug":t},body:o})},Ts=l`
6398
6398
  .chat-launcher {
6399
6399
  position: fixed;
6400
6400
  }
@@ -6425,7 +6425,7 @@ xmlns="http://www.w3.org/2000/svg"
6425
6425
  filter: brightness(1.1);
6426
6426
  }
6427
6427
  }
6428
- `;var ks=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Ts=class extends oe{constructor(){super(...arguments),this.right=0,this.bottom=0,this.top=0,this.left=0,this.isChatOpen=!1,this.onClickCloseChat=()=>({}),this.onClickOpenChat=()=>({})}render(){return this.isChatOpen?B`
6428
+ `;var _s=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Es=class extends oe{constructor(){super(...arguments),this.right=0,this.bottom=0,this.top=0,this.left=0,this.isChatOpen=!1,this.onClickCloseChat=()=>({}),this.onClickOpenChat=()=>({})}render(){return this.isChatOpen?B`
6429
6429
  <div
6430
6430
  class="chat-launcher"
6431
6431
  style=${Me({top:bn()||isNaN(this.top)?void 0:`${this.top+432}px`,bottom:bn()||isNaN(this.bottom)?"72px":this.bottom-60+"px",left:bn()||isNaN(this.left)?void 0:`${this.left}px`,right:bn()||isNaN(this.right)?"18px":`${this.right}px`})}
@@ -6467,7 +6467,7 @@ xmlns="http://www.w3.org/2000/svg"
6467
6467
  />
6468
6468
  </svg>
6469
6469
  </button>
6470
- </div>`}};Ts.styles=[Ss],ks([le({type:Number})],Ts.prototype,"right",void 0),ks([le({type:Number})],Ts.prototype,"bottom",void 0),ks([le({type:Number})],Ts.prototype,"top",void 0),ks([le({type:Number})],Ts.prototype,"left",void 0),ks([le({attribute:!0})],Ts.prototype,"isChatOpen",void 0),ks([le({attribute:!0})],Ts.prototype,"onClickCloseChat",void 0),ks([le({attribute:!0})],Ts.prototype,"onClickOpenChat",void 0),Ts=ks([ae("simple-launcher")],Ts);var _s=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Es=class extends oe{constructor(){super(...arguments),this.healthcareId="",this.right=0,this.bottom=0,this.top=0,this.left=0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Ae(),this.firstUpdated=async()=>{await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=za(this.healthcareId),t=$a(this.healthcareId,e)?e:Fa(this.healthcareId,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Va(this.healthcareId,null,"",this.currentLeadSource,t.leadId,null,Is.Healthcare),t.initiatedChat&&await this.myPubnub.initializePubnub(e),bn()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),Ha(this.healthcareId),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return pa(),this.isLoading?B``:B`
6470
+ </div>`}};Es.styles=[Ts],_s([le({type:Number})],Es.prototype,"right",void 0),_s([le({type:Number})],Es.prototype,"bottom",void 0),_s([le({type:Number})],Es.prototype,"top",void 0),_s([le({type:Number})],Es.prototype,"left",void 0),_s([le({attribute:!0})],Es.prototype,"isChatOpen",void 0),_s([le({attribute:!0})],Es.prototype,"onClickCloseChat",void 0),_s([le({attribute:!0})],Es.prototype,"onClickOpenChat",void 0),Es=_s([ae("simple-launcher")],Es);var Os=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Ps=class extends oe{constructor(){super(...arguments),this.healthcareId="",this.right=0,this.bottom=0,this.top=0,this.left=0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Ae(),this.firstUpdated=async()=>{await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=Qa(this.healthcareId),t=Ga(this.healthcareId,e)?e:$a(this.healthcareId,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Ka(this.healthcareId,null,"",this.currentLeadSource,t.leadId,null,Us.Healthcare),t.initiatedChat&&await this.myPubnub.initializePubnub(e),bn()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),za(this.healthcareId),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return pa(),this.isLoading?B``:B`
6471
6471
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
6472
6472
  <div id="aria-describe-info" style="display: none;">
6473
6473
  EliseAI widget that allows you to chat with a virtual assistant, book
@@ -6476,7 +6476,7 @@ xmlns="http://www.w3.org/2000/svg"
6476
6476
  ${this.displayPubnubChat?B`
6477
6477
  <pubnub-chat
6478
6478
  id="pubnub-chat"
6479
- .widgetType=${Is.Healthcare}
6479
+ .widgetType=${Us.Healthcare}
6480
6480
  .channel=${null===(e=this.myPubnub)||void 0===e?void 0:e.channel}
6481
6481
  .myPubnub=${this.myPubnub}
6482
6482
  .buildingSlug=${this.healthcareId}
@@ -6502,7 +6502,7 @@ xmlns="http://www.w3.org/2000/svg"
6502
6502
  ></simple-launcher>
6503
6503
 
6504
6504
  </meta>
6505
- `}};Es.styles=l`
6505
+ `}};Ps.styles=l`
6506
6506
  :host {
6507
6507
  all: initial;
6508
6508
  }
@@ -6555,7 +6555,7 @@ xmlns="http://www.w3.org/2000/svg"
6555
6555
  line-height: 150%;
6556
6556
  font-size: 16px;
6557
6557
  }
6558
- `,_s([le({type:String})],Es.prototype,"healthcareId",void 0),_s([le({type:Number})],Es.prototype,"right",void 0),_s([le({type:Number})],Es.prototype,"bottom",void 0),_s([le({type:Number})],Es.prototype,"top",void 0),_s([le({type:Number})],Es.prototype,"left",void 0),_s([ue()],Es.prototype,"launcher",void 0),_s([ue()],Es.prototype,"currentLeadSource",void 0),_s([ue()],Es.prototype,"displayPubnubChat",void 0),_s([ue()],Es.prototype,"myPubnub",void 0),_s([ue()],Es.prototype,"requiresConsent",void 0),_s([ue()],Es.prototype,"privacyPolicyUrl",void 0),_s([ue()],Es.prototype,"isLoading",void 0),Es=_s([ae("health-chat")],Es);var Os=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Ps=class extends oe{constructor(){super(...arguments),this.orgSlug="",this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Ae(),this.firstUpdated=async()=>{(await async function(e){if(!e)return!1;const n="e2e-test-yardi-building";try{return(await t().get(ni(n),{params:{building_slug:n,flag_type:"bool",feature_flag:"enable-show-utilities-webchat",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(this.orgSlug)||location.href.includes("demo/utilities"))&&await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=za(this.orgSlug),t=$a(this.orgSlug,e)?e:Fa(this.orgSlug,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Va(this.orgSlug,null,this.orgSlug,this.currentLeadSource,t.leadId,null,Is.Utilities),t.initiatedChat&&await this.myPubnub.initializePubnub(e),bn()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),Ha(this.orgSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return pa(),this.isLoading?B``:B`
6558
+ `,Os([le({type:String})],Ps.prototype,"healthcareId",void 0),Os([le({type:Number})],Ps.prototype,"right",void 0),Os([le({type:Number})],Ps.prototype,"bottom",void 0),Os([le({type:Number})],Ps.prototype,"top",void 0),Os([le({type:Number})],Ps.prototype,"left",void 0),Os([ue()],Ps.prototype,"launcher",void 0),Os([ue()],Ps.prototype,"currentLeadSource",void 0),Os([ue()],Ps.prototype,"displayPubnubChat",void 0),Os([ue()],Ps.prototype,"myPubnub",void 0),Os([ue()],Ps.prototype,"requiresConsent",void 0),Os([ue()],Ps.prototype,"privacyPolicyUrl",void 0),Os([ue()],Ps.prototype,"isLoading",void 0),Ps=Os([ae("health-chat")],Ps);var Ns=function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};let Ms=class extends oe{constructor(){super(...arguments),this.orgSlug="",this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Ae(),this.firstUpdated=async()=>{(await async function(e){if(!e)return!1;const n="e2e-test-yardi-building";try{return(await t().get(ni(n),{params:{building_slug:n,flag_type:"bool",feature_flag:"enable-show-utilities-webchat",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(this.orgSlug)||location.href.includes("demo/utilities"))&&await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=Qa(this.orgSlug),t=Ga(this.orgSlug,e)?e:$a(this.orgSlug,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Ka(this.orgSlug,null,this.orgSlug,this.currentLeadSource,t.leadId,null,Us.Utilities),t.initiatedChat&&await this.myPubnub.initializePubnub(e),bn()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),za(this.orgSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return pa(),this.isLoading?B``:B`
6559
6559
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
6560
6560
  <div id="aria-describe-info" style="display: none;">
6561
6561
  EliseAI widget that allows you to chat with a virtual assistant, book
@@ -6567,7 +6567,7 @@ xmlns="http://www.w3.org/2000/svg"
6567
6567
  <pubnub-chat
6568
6568
  id="pubnub-chat"
6569
6569
  .channel=${null===(e=this.myPubnub)||void 0===e?void 0:e.channel}
6570
- .widgetType=${Is.Utilities}
6570
+ .widgetType=${Us.Utilities}
6571
6571
  .myPubnub=${this.myPubnub}
6572
6572
  .buildingSlug=${this.orgSlug}
6573
6573
  .onClickExit=${()=>{this.displayPubnubChat=!1}}
@@ -6591,7 +6591,7 @@ xmlns="http://www.w3.org/2000/svg"
6591
6591
 
6592
6592
  ></simple-launcher>
6593
6593
  </meta>
6594
- `}};Ps.styles=l`
6594
+ `}};Ms.styles=l`
6595
6595
  :host {
6596
6596
  all: initial;
6597
6597
  }
@@ -6644,4 +6644,4 @@ xmlns="http://www.w3.org/2000/svg"
6644
6644
  line-height: 150%;
6645
6645
  font-size: 16px;
6646
6646
  }
6647
- `,Os([le({type:String})],Ps.prototype,"orgSlug",void 0),Os([le({type:Number})],Ps.prototype,"right",void 0),Os([le({type:Number})],Ps.prototype,"bottom",void 0),Os([le({type:Number})],Ps.prototype,"top",void 0),Os([le({type:Number})],Ps.prototype,"left",void 0),Os([ue()],Ps.prototype,"launcher",void 0),Os([ue()],Ps.prototype,"currentLeadSource",void 0),Os([ue()],Ps.prototype,"displayPubnubChat",void 0),Os([ue()],Ps.prototype,"myPubnub",void 0),Os([ue()],Ps.prototype,"requiresConsent",void 0),Os([ue()],Ps.prototype,"privacyPolicyUrl",void 0),Os([ue()],Ps.prototype,"isLoading",void 0),Ps=Os([ae("utilities-chat")],Ps);const Ns=async e=>{const n=window.location.href,i=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(n)}`,o=await t().get(i,{headers:{"org-slug":e}});return Math.random()<.2&&xi({logType:o&&o.data?Ci.info:Ci.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${o?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:o.data,url:n,orgSlug:e,givenBuildingSlug:null,reason:o&&o.data?null:"No match found"}}),o.data};class Ms{static healthcareStart(e,t=!0){var n,i,o,r;t&&(this.healthcareId=e.id,this.overridePlacement={right:e.right,bottom:e.bottom,top:e.top,left:e.left}),Ds();const a=document.createElement("health-chat");a.setAttribute("class","health-chat"),a.setAttribute("role","dialog"),a.setAttribute("aria-label","EliseAI Healthcare Widget"),a.setAttribute("aria-describedby","aria-describe-info"),a.setAttribute("aria-modal","true"),a.setAttribute("healthcareId",e.id),a.setAttribute("right",(null===(n=e.right)||void 0===n?void 0:n.toString())||"unset"),a.setAttribute("bottom",(null===(i=e.bottom)||void 0===i?void 0:i.toString())||"unset"),a.setAttribute("top",(null===(o=e.top)||void 0===o?void 0:o.toString())||"unset"),a.setAttribute("left",(null===(r=e.left)||void 0===r?void 0:r.toString())||"unset"),document.body.appendChild(a),Ms.healthChat=a}static start(e,t=!0){var n,i,o,r,a,s,l,u;if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;t&&(this.orgSlug="Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization,this.hasBuildingSlug=!!e.building,this.overridePlacement={right:null===(n=null==e?void 0:e.position)||void 0===n?void 0:n.right,bottom:null===(i=null==e?void 0:e.position)||void 0===i?void 0:i.bottom,top:null===(o=null==e?void 0:e.position)||void 0===o?void 0:o.top,left:null===(r=null==e?void 0:e.position)||void 0===r?void 0:r.left}),Ds();let c=null;switch(e.widgetType){case Is.Healthcare:throw new Error("Healthcare widget is not supported yet, please use the healthcareStart method instead.");case Is.Default:c=document.createElement("me-chat");break;case Is.Utilities:c=document.createElement("utilities-chat");break;default:c=document.createElement("me-chat")}if(!c)throw new Error("Invalid widget type");c.setAttribute("orgSlug","Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization),c.setAttribute("widgetType",e.widgetType||Is.Default),c.setAttribute("class","meetelise-chat"),c.setAttribute("role","dialog"),c.setAttribute("aria-label","EliseAI Widget"),c.setAttribute("aria-describedby","aria-describe-info"),c.setAttribute("aria-modal","true"),e.brandColor&&(this.brandColor=e.brandColor,c.setAttribute("primaryColor",((e,t)=>{const n=(o=e,{r:parseInt(o.substring(1,3),16),g:parseInt(o.substring(3,5),16),b:parseInt(o.substring(5,7),16)}),i={r:n.r+Math.round(.3*(0-n.r)),g:n.g+Math.round(.3*(0-n.g)),b:n.b+Math.round(.3*(0-n.b))};var o;return((e,t,n)=>"#"+[e,t,n].map((e=>{const t=e.toString(16);return 1===t.length?"0"+t:t})).join(""))(i.r,i.g,i.b)})(e.brandColor))),e.backgroundColor&&(this.backgroundColor=e.backgroundColor),c instanceof ws&&(this.handleBuildingslug(c,e.organization,e.building),e.launcherStyles&&(c.launcherStyles=e.launcherStyles),e.mobileStyles&&(c.mobileStyles=e.mobileStyles),e.onWidgetLoaded&&(c.onWidgetLoaded=e.onWidgetLoaded),e.overrideRentgrata&&((async()=>{const e=await(async(e,t=5e3)=>new Promise(((n,i)=>{const o=new MutationObserver(((t,i)=>{const o=document.getElementById(e);o&&(i.disconnect(),n(o))}));o.observe(document.body,{childList:!0,subtree:!0});const r=setTimeout((()=>{o.disconnect(),i(new Error(`Element ${e} did not appear within ${t}ms`))}),t),a=document.querySelector(e);a&&(clearTimeout(r),o.disconnect(),n(a))})))("rg-widget-compact");e&&e.setAttribute("style","display: none")})(),c.overrideRentgrata=!0),e.onSstClose&&(c.onSstClose=e.onSstClose)),e.position&&(c.setAttribute("right",(null===(a=e.position.right)||void 0===a?void 0:a.toString())||"unset"),c.setAttribute("bottom",(null===(s=e.position.bottom)||void 0===s?void 0:s.toString())||"unset"),c.setAttribute("top",(null===(l=e.position.top)||void 0===l?void 0:l.toString())||"unset"),c.setAttribute("left",(null===(u=e.position.left)||void 0===u?void 0:u.toString())||"unset")),window.eliseAi={},document.body.appendChild(c),c instanceof ws&&(Ms.meChat=c),c instanceof Ps&&(Ms.utilitiesChat=c)}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.meChat&&(await this.meChat.remove(),document.body.removeChild(this.meChat),Ms.meChat=null)}static async handleBuildingslug(e,t,n){if(n)return void e.setAttribute("buildingSlug",n);if(this.mutationObserver)return;if(!t)return;const i=await Ns(t);if(i){const e={organization:t,building:i,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(e,!1)}this.previousUrl=window.location.href,document.body.addEventListener("click",(()=>{requestAnimationFrame((()=>{this.previousUrl===window.location.href||this.hasBuildingSlug||(this.previousUrl=window.location.href,Ns(t).then((e=>{if(!e)return;const n={organization:t,building:e,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(n,!1)})))}))}),!0)}static async handleSingleFamilyUrl(){if(this.hasBuildingSlug)return;this.remove();const e=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(e)}`,i=await t().get(n,{headers:{"org-slug":this.orgSlug}});if(Math.random()<.2&&xi({logType:i&&i.data?Ci.info:Ci.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:e,orgSlug:this.orgSlug,givenBuildingSlug:null,reason:i&&i.data?null:"No match found"}}),!i||!i.data)return;const o={organization:this.orgSlug,building:i.data,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(o,!1)}static async calculateBuildingSlugForLogging(e){const n=window.location.href,i=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(n)}`,o=await t().get(i,{headers:{"org-slug":this.orgSlug}});Math.random()<.2&&xi({logType:o&&o.data===e?Ci.info:Ci.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${o&&o.data===e?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:o.data,url:n,orgSlug:this.orgSlug,givenBuildingSlug:e,reason:o&&o.data===e?null:o&&!o.data?"No match found":o&&o.data!==e?"Mismatch":"No match found"}}),o&&o.data}}var Is;Ms.meChat=null,Ms.healthChat=null,Ms.utilitiesChat=null,Ms.orgSlug="",Ms.mutationObserver=null,Ms.previousUrl="",Ms.hasBuildingSlug=null,Ms.brandColor="",Ms.backgroundColor="",Ms.healthcareId="",Ms.overridePlacement={},function(e){e.Default="default",e.Healthcare="healthcare",e.Utilities="utilities"}(Is||(Is={}));const Ds=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),document.head.appendChild(e)}})();var o=i.l,r=i.Z;export{o as WidgetType,r as default};
6647
+ `,Ns([le({type:String})],Ms.prototype,"orgSlug",void 0),Ns([le({type:Number})],Ms.prototype,"right",void 0),Ns([le({type:Number})],Ms.prototype,"bottom",void 0),Ns([le({type:Number})],Ms.prototype,"top",void 0),Ns([le({type:Number})],Ms.prototype,"left",void 0),Ns([ue()],Ms.prototype,"launcher",void 0),Ns([ue()],Ms.prototype,"currentLeadSource",void 0),Ns([ue()],Ms.prototype,"displayPubnubChat",void 0),Ns([ue()],Ms.prototype,"myPubnub",void 0),Ns([ue()],Ms.prototype,"requiresConsent",void 0),Ns([ue()],Ms.prototype,"privacyPolicyUrl",void 0),Ns([ue()],Ms.prototype,"isLoading",void 0),Ms=Ns([ae("utilities-chat")],Ms);const Is=async e=>{const n=window.location.href,i=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(n)}`,o=await t().get(i,{headers:{"org-slug":e}});return Math.random()<.2&&xi({logType:o&&o.data?Ci.info:Ci.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${o?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:o.data,url:n,orgSlug:e,givenBuildingSlug:null,reason:o&&o.data?null:"No match found"}}),o.data};class Ds{static healthcareStart(e,t=!0){var n,i,o,r;t&&(this.healthcareId=e.id,this.overridePlacement={right:e.right,bottom:e.bottom,top:e.top,left:e.left}),Ls();const a=document.createElement("health-chat");a.setAttribute("class","health-chat"),a.setAttribute("role","dialog"),a.setAttribute("aria-label","EliseAI Healthcare Widget"),a.setAttribute("aria-describedby","aria-describe-info"),a.setAttribute("aria-modal","true"),a.setAttribute("healthcareId",e.id),a.setAttribute("right",(null===(n=e.right)||void 0===n?void 0:n.toString())||"unset"),a.setAttribute("bottom",(null===(i=e.bottom)||void 0===i?void 0:i.toString())||"unset"),a.setAttribute("top",(null===(o=e.top)||void 0===o?void 0:o.toString())||"unset"),a.setAttribute("left",(null===(r=e.left)||void 0===r?void 0:r.toString())||"unset"),document.body.appendChild(a),Ds.healthChat=a}static start(e,t=!0){var n,i,o,r,a,s,l,u;if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;t&&(this.orgSlug="Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization,this.hasBuildingSlug=!!e.building,this.overridePlacement={right:null===(n=null==e?void 0:e.position)||void 0===n?void 0:n.right,bottom:null===(i=null==e?void 0:e.position)||void 0===i?void 0:i.bottom,top:null===(o=null==e?void 0:e.position)||void 0===o?void 0:o.top,left:null===(r=null==e?void 0:e.position)||void 0===r?void 0:r.left}),Ls();let c=null;switch(e.widgetType){case Us.Healthcare:throw new Error("Healthcare widget is not supported yet, please use the healthcareStart method instead.");case Us.Default:c=document.createElement("me-chat");break;case Us.Utilities:c=document.createElement("utilities-chat");break;default:c=document.createElement("me-chat")}if(!c)throw new Error("Invalid widget type");c.setAttribute("orgSlug","Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization),c.setAttribute("widgetType",e.widgetType||Us.Default),c.setAttribute("class","meetelise-chat"),c.setAttribute("role","dialog"),c.setAttribute("aria-label","EliseAI Widget"),c.setAttribute("aria-describedby","aria-describe-info"),c.setAttribute("aria-modal","true"),e.brandColor&&(this.brandColor=e.brandColor,c.setAttribute("primaryColor",((e,t)=>{const n=(o=e,{r:parseInt(o.substring(1,3),16),g:parseInt(o.substring(3,5),16),b:parseInt(o.substring(5,7),16)}),i={r:n.r+Math.round(.3*(0-n.r)),g:n.g+Math.round(.3*(0-n.g)),b:n.b+Math.round(.3*(0-n.b))};var o;return((e,t,n)=>"#"+[e,t,n].map((e=>{const t=e.toString(16);return 1===t.length?"0"+t:t})).join(""))(i.r,i.g,i.b)})(e.brandColor))),e.backgroundColor&&(this.backgroundColor=e.backgroundColor),c instanceof xs&&(this.handleBuildingslug(c,e.organization,e.building),e.launcherStyles&&(c.launcherStyles=e.launcherStyles),e.mobileStyles&&(c.mobileStyles=e.mobileStyles),e.onWidgetLoaded&&(c.onWidgetLoaded=e.onWidgetLoaded),e.overrideRentgrata&&((async()=>{const e=await(async(e,t=5e3)=>new Promise(((n,i)=>{const o=new MutationObserver(((t,i)=>{const o=document.getElementById(e);o&&(i.disconnect(),n(o))}));o.observe(document.body,{childList:!0,subtree:!0});const r=setTimeout((()=>{o.disconnect(),i(new Error(`Element ${e} did not appear within ${t}ms`))}),t),a=document.querySelector(e);a&&(clearTimeout(r),o.disconnect(),n(a))})))("rg-widget-compact");e&&e.setAttribute("style","display: none")})(),c.overrideRentgrata=!0),e.onSstClose&&(c.onSstClose=e.onSstClose)),e.position&&(c.setAttribute("right",(null===(a=e.position.right)||void 0===a?void 0:a.toString())||"unset"),c.setAttribute("bottom",(null===(s=e.position.bottom)||void 0===s?void 0:s.toString())||"unset"),c.setAttribute("top",(null===(l=e.position.top)||void 0===l?void 0:l.toString())||"unset"),c.setAttribute("left",(null===(u=e.position.left)||void 0===u?void 0:u.toString())||"unset")),window.eliseAi={},document.body.appendChild(c),c instanceof xs&&(Ds.meChat=c),c instanceof Ms&&(Ds.utilitiesChat=c)}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.meChat&&(await this.meChat.remove(),document.body.removeChild(this.meChat),Ds.meChat=null)}static async handleBuildingslug(e,t,n){if(n)return void e.setAttribute("buildingSlug",n);if(this.mutationObserver)return;if(!t)return;const i=await Is(t);if(i){const e={organization:t,building:i,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(e,!1)}this.previousUrl=window.location.href,document.body.addEventListener("click",(()=>{requestAnimationFrame((()=>{this.previousUrl===window.location.href||this.hasBuildingSlug||(this.previousUrl=window.location.href,Is(t).then((e=>{if(!e)return;const n={organization:t,building:e,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(n,!1)})))}))}),!0)}static async handleSingleFamilyUrl(){if(this.hasBuildingSlug)return;this.remove();const e=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(e)}`,i=await t().get(n,{headers:{"org-slug":this.orgSlug}});if(Math.random()<.2&&xi({logType:i&&i.data?Ci.info:Ci.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:e,orgSlug:this.orgSlug,givenBuildingSlug:null,reason:i&&i.data?null:"No match found"}}),!i||!i.data)return;const o={organization:this.orgSlug,building:i.data,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(o,!1)}static async calculateBuildingSlugForLogging(e){const n=window.location.href,i=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(n)}`,o=await t().get(i,{headers:{"org-slug":this.orgSlug}});Math.random()<.2&&xi({logType:o&&o.data===e?Ci.info:Ci.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${o&&o.data===e?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:o.data,url:n,orgSlug:this.orgSlug,givenBuildingSlug:e,reason:o&&o.data===e?null:o&&!o.data?"No match found":o&&o.data!==e?"Mismatch":"No match found"}}),o&&o.data}}var Us;Ds.meChat=null,Ds.healthChat=null,Ds.utilitiesChat=null,Ds.orgSlug="",Ds.mutationObserver=null,Ds.previousUrl="",Ds.hasBuildingSlug=null,Ds.brandColor="",Ds.backgroundColor="",Ds.healthcareId="",Ds.overridePlacement={},function(e){e.Default="default",e.Healthcare="healthcare",e.Utilities="utilities"}(Us||(Us={}));const Ls=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),document.head.appendChild(e)}})();var o=i.l,r=i.Z;export{o as WidgetType,r as default};