@roomstay/frontend 2.6.76 → 2.6.77-0

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 (350) hide show
  1. package/dist/153.bundle.js +1 -0
  2. package/dist/176.bundle.js +1 -0
  3. package/dist/273.bundle.js +1 -0
  4. package/dist/292.bundle.js +1 -0
  5. package/dist/316.bundle.js +1 -0
  6. package/dist/349.bundle.js +2 -0
  7. package/dist/{535.bundle.js.LICENSE.txt → 349.bundle.js.LICENSE.txt} +1 -1
  8. package/dist/352.bundle.js +1 -0
  9. package/dist/41.bundle.js +1 -0
  10. package/dist/{151.bundle.js → 451.bundle.js} +1 -1
  11. package/dist/479.bundle.js +1 -0
  12. package/dist/534.bundle.js +1 -0
  13. package/dist/557.bundle.js +1 -0
  14. package/dist/620.bundle.js +1 -0
  15. package/dist/696.bundle.js +1 -0
  16. package/dist/734.bundle.js +1 -0
  17. package/dist/83.bundle.js +1 -0
  18. package/dist/910.bundle.js +1 -0
  19. package/dist/922.bundle.js +1 -0
  20. package/dist/99.bundle.js +1 -0
  21. package/dist/main.bundle.js +1 -1
  22. package/dist/src/animations/AutoAutoHeight.d.ts +1 -1
  23. package/dist/src/api/HotelAPI.d.ts +2 -0
  24. package/dist/src/api/HotelAPI.js +7 -0
  25. package/dist/src/api/HotelAPI.js.map +1 -1
  26. package/dist/src/api/ReservationAPI.js +12 -9
  27. package/dist/src/api/ReservationAPI.js.map +1 -1
  28. package/dist/src/components/User/Forms/ForgotPasswordForm.d.ts +2 -1
  29. package/dist/src/components/User/Forms/SignUpForm.d.ts +2 -1
  30. package/dist/src/components/User/Forms/VerifyEmailForm.d.ts +2 -1
  31. package/dist/src/components/generic/AgedBetweenLabel/AgedBetweenLabel.d.ts +2 -1
  32. package/dist/src/components/generic/Alert.d.ts +2 -2
  33. package/dist/src/components/generic/BEButton.d.ts +1 -1
  34. package/dist/src/components/generic/BackButton.d.ts +2 -1
  35. package/dist/src/components/generic/BookingWizard/BookingWizard.d.ts +1 -0
  36. package/dist/src/components/generic/BookingWizard/BookingWizard.js +7 -1
  37. package/dist/src/components/generic/BookingWizard/BookingWizard.js.map +1 -1
  38. package/dist/src/components/generic/BookingWizard/BookingWizardBottomSheet/BookingWizardBottomSheet.d.ts +2 -2
  39. package/dist/src/components/generic/BookingWizard/BookingWizardBottomSheet/BookingWizardBottomSheet.js +0 -1
  40. package/dist/src/components/generic/BookingWizard/BookingWizardBottomSheet/BookingWizardBottomSheet.js.map +1 -1
  41. package/dist/src/components/generic/BookingWizard/BookingWizardContent.d.ts +14 -5
  42. package/dist/src/components/generic/BookingWizard/BookingWizardContent.js +24 -10
  43. package/dist/src/components/generic/BookingWizard/BookingWizardContent.js.map +1 -1
  44. package/dist/src/components/generic/BookingWizard/BookingWizardDateSelector/BookingWizardDateSelector.js +1 -1
  45. package/dist/src/components/generic/BookingWizard/BookingWizardDateSelector/BookingWizardDateSelector.js.map +1 -1
  46. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.d.ts +10 -2
  47. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js +187 -22
  48. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js.map +1 -1
  49. package/dist/src/components/generic/Card/IconNavCard/IconNavCard.d.ts +2 -2
  50. package/dist/src/components/generic/Countdown.d.ts +2 -1
  51. package/dist/src/components/generic/Currency.d.ts +2 -1
  52. package/dist/src/components/generic/DateRangePicker/DateRangePicker.d.ts +2 -1
  53. package/dist/src/components/generic/DateRangePicker/DateRangePickerDay.d.ts +2 -1
  54. package/dist/src/components/generic/DateRangePicker/DateRangePickerDays.d.ts +2 -1
  55. package/dist/src/components/generic/DateRangePicker/DateRangePickerMonth.d.ts +2 -1
  56. package/dist/src/components/generic/Distance.d.ts +2 -1
  57. package/dist/src/components/generic/Headline.d.ts +1 -1
  58. package/dist/src/components/generic/HtmlContentViewer.d.ts +2 -1
  59. package/dist/src/components/generic/InputGroup/InputGroup.d.ts +2 -2
  60. package/dist/src/components/generic/LineBreak.d.ts +2 -1
  61. package/dist/src/components/generic/Notification.d.ts +1 -1
  62. package/dist/src/components/generic/NumberIncrement.d.ts +2 -1
  63. package/dist/src/components/generic/Overlay/Overlay.d.ts +2 -2
  64. package/dist/src/components/generic/PageTitle/index.d.ts +2 -1
  65. package/dist/src/components/generic/PaymentCard/PaymentCard.d.ts +2 -1
  66. package/dist/src/components/generic/Pill.d.ts +1 -1
  67. package/dist/src/components/generic/Placeholder.d.ts +2 -1
  68. package/dist/src/components/generic/PromoCodeInput.d.ts +2 -1
  69. package/dist/src/components/generic/RecentSearchesCard.d.ts +2 -1
  70. package/dist/src/components/generic/RoomstayMark.d.ts +2 -1
  71. package/dist/src/components/generic/Select/Select.d.ts +2 -1
  72. package/dist/src/components/generic/Select/Select.js +2 -2
  73. package/dist/src/components/generic/Select/Select.js.map +1 -1
  74. package/dist/src/components/generic/Slider/Slider.d.ts +1 -1
  75. package/dist/src/components/generic/Tabs/TabRouteContainer.d.ts +2 -2
  76. package/dist/src/components/generic/Tooltip/Tooltip.d.ts +2 -2
  77. package/dist/src/components/generic/badging/SSLSecureBadge.d.ts +2 -1
  78. package/dist/src/components/generic/buttons/NextStepButton.d.ts +2 -1
  79. package/dist/src/components/generic/date/DatePicker.d.ts +2 -1
  80. package/dist/src/components/generic/date/DatePickerDay.d.ts +2 -1
  81. package/dist/src/components/generic/date/DatePickerDays.d.ts +2 -1
  82. package/dist/src/components/generic/date/DatePickerMonth.d.ts +2 -1
  83. package/dist/src/components/generic/date/DatePickerWeek.d.ts +2 -1
  84. package/dist/src/components/generic/date/FloatingDatePicker.d.ts +1 -1
  85. package/dist/src/components/generic/date/WeekViewSkeleton.d.ts +2 -1
  86. package/dist/src/components/generic/loader/ImageLoader.d.ts +1 -1
  87. package/dist/src/components/generic/loader/LargeLoader.d.ts +2 -1
  88. package/dist/src/components/generic/loader/OverlayLoader.d.ts +2 -1
  89. package/dist/src/components/generic/loader/SmallSpinner.d.ts +2 -1
  90. package/dist/src/components/generic/map/HotelLocationMap.d.ts +2 -1
  91. package/dist/src/components/generic/modal/ConfirmationModal.d.ts +2 -1
  92. package/dist/src/components/generic/modal/ErrorModal.d.ts +1 -1
  93. package/dist/src/components/generic/modal/SigninModal/UnauthenticatedUserModal.d.ts +2 -1
  94. package/dist/src/components/generic/modal/SimpleModal.d.ts +1 -1
  95. package/dist/src/components/generic/modal/TabbedModal.d.ts +1 -1
  96. package/dist/src/components/generic/radio/RadioFields.d.ts +2 -1
  97. package/dist/src/components/graphics/TravelerNotfound.d.ts +2 -1
  98. package/dist/src/components/iconComponents/BookNowPayLaterIcon.d.ts +2 -1
  99. package/dist/src/components/members/InlineSignUpSection.d.ts +2 -1
  100. package/dist/src/components/members/SignInModal/ExternalMemberModal.d.ts +2 -1
  101. package/dist/src/components/members/SignInModal/InternalMemberSignInModal.d.ts +2 -1
  102. package/dist/src/components/members/SignInModal/MemberPortalSignInModal.d.ts +2 -1
  103. package/dist/src/components/members/SignInModal/MemberSignInModal.d.ts +2 -1
  104. package/dist/src/components/navigation/Header.d.ts +2 -1
  105. package/dist/src/components/navigation/StepSelector.d.ts +2 -1
  106. package/dist/src/components/navigation/StepSelectorModal.d.ts +2 -1
  107. package/dist/src/components/pages/Account/Card/MemberCardItem.d.ts +2 -1
  108. package/dist/src/components/pages/PageColorComponent.d.ts +2 -1
  109. package/dist/src/components/reservation/ReservationItem.d.ts +2 -1
  110. package/dist/src/components/steps/DaysSelectedInformer.d.ts +2 -1
  111. package/dist/src/components/steps/MinimumNightStayPill.d.ts +2 -1
  112. package/dist/src/components/steps/addons/AddonCard.d.ts +2 -1
  113. package/dist/src/components/steps/addons/AddonList.d.ts +2 -1
  114. package/dist/src/components/steps/addons/AddonsNotFoundBlock.d.ts +2 -1
  115. package/dist/src/components/steps/common/CommonAddonSummary/CommonAddonSummary.d.ts +2 -1
  116. package/dist/src/components/steps/common/ItemisedFeesListing/ItemisedFeesListing.d.ts +2 -1
  117. package/dist/src/components/steps/common/ItemisedFeesSummary/ItemisedFeesSummary.d.ts +2 -1
  118. package/dist/src/components/steps/confirmation/AccountDetails.d.ts +2 -1
  119. package/dist/src/components/steps/confirmation/PaymentDetails/ExistingCardPicker.d.ts +2 -1
  120. package/dist/src/components/steps/confirmation/PaymentInformation.d.ts +2 -1
  121. package/dist/src/components/steps/confirmation/PlanpayLabel.d.ts +2 -1
  122. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.d.ts +2 -1
  123. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js +11 -10
  124. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js.map +1 -1
  125. package/dist/src/components/steps/confirmation/StepConfirmationCheckoutDifferencesModal.d.ts +2 -1
  126. package/dist/src/components/steps/confirmation/StepConfirmationCommentsComponent.d.ts +2 -1
  127. package/dist/src/components/steps/confirmation/StepConfirmationForm.d.ts +2 -1
  128. package/dist/src/components/steps/confirmation/StepConfirmationForm.js +11 -4
  129. package/dist/src/components/steps/confirmation/StepConfirmationForm.js.map +1 -1
  130. package/dist/src/components/steps/confirmation/StepConfirmationFormProvider.d.ts +2 -1
  131. package/dist/src/components/steps/confirmation/StepConfirmationImportantInformation.d.ts +7 -0
  132. package/dist/src/components/steps/confirmation/StepConfirmationImportantInformation.js +54 -0
  133. package/dist/src/components/steps/confirmation/StepConfirmationImportantInformation.js.map +1 -0
  134. package/dist/src/components/steps/confirmation/StepConfirmationLimitedOffer.d.ts +2 -1
  135. package/dist/src/components/steps/confirmation/StepConfirmationPoliciesSection.d.ts +2 -1
  136. package/dist/src/components/steps/confirmation/StepConfirmationPolicyBlock.d.ts +2 -1
  137. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffers.d.ts +2 -1
  138. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersColumn.d.ts +2 -1
  139. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersModal.d.ts +2 -1
  140. package/dist/src/components/steps/date/OccupancyWarningBlock.d.ts +2 -1
  141. package/dist/src/components/steps/date/PeoplePicker.d.ts +2 -1
  142. package/dist/src/components/steps/date/PeoplePickerRow.d.ts +2 -1
  143. package/dist/src/components/steps/date/StepDatePricePerRoom.d.ts +2 -1
  144. package/dist/src/components/steps/date/StepOneDateRange.d.ts +2 -1
  145. package/dist/src/components/steps/date/StepOneDateRangePicker.d.ts +2 -1
  146. package/dist/src/components/steps/date/StepOneDateRangePickerLegend.d.ts +2 -1
  147. package/dist/src/components/steps/date/StepOneNextStepButton.d.ts +2 -1
  148. package/dist/src/components/steps/date/StepOneStatusPeople.d.ts +2 -1
  149. package/dist/src/components/steps/hotel/HotelCard.d.ts +2 -1
  150. package/dist/src/components/steps/hotel/HotelCardList.d.ts +2 -1
  151. package/dist/src/components/steps/hotel/HotelCardModal.d.ts +2 -1
  152. package/dist/src/components/steps/hotel/HotelInfoPerksRow.d.ts +2 -1
  153. package/dist/src/components/steps/hotel/HotelSearchParameters.d.ts +2 -1
  154. package/dist/src/components/steps/hotel/NoHotelsAvailable.d.ts +2 -1
  155. package/dist/src/components/steps/room/AvailableUpgradesModal.js +0 -5
  156. package/dist/src/components/steps/room/AvailableUpgradesModal.js.map +1 -1
  157. package/dist/src/components/steps/room/ImageGallerySlider.d.ts +2 -1
  158. package/dist/src/components/steps/room/InactivityWindow.d.ts +2 -1
  159. package/dist/src/components/steps/room/LargeRoomCard.d.ts +2 -1
  160. package/dist/src/components/steps/room/NoRoomsFoundBlock.d.ts +2 -1
  161. package/dist/src/components/steps/room/RatesNotFoundBlock.d.ts +2 -1
  162. package/dist/src/components/steps/room/RoomList.d.ts +2 -1
  163. package/dist/src/components/steps/room/RoomModal.d.ts +2 -1
  164. package/dist/src/components/steps/room/RoomModalPerkRow.d.ts +2 -1
  165. package/dist/src/components/steps/room/StepRoomAlertBlocks.d.ts +2 -1
  166. package/dist/src/components/steps/room/StepRoomBestRateAlert.d.ts +2 -1
  167. package/dist/src/components/steps/room/StepRoomErrorForm.d.ts +2 -1
  168. package/dist/src/components/steps/room/StepRoomHotelDetails.d.ts +2 -1
  169. package/dist/src/components/steps/room/StepRoomSortBy.d.ts +2 -1
  170. package/dist/src/components/steps/room/StepRoomSummaryAndButton.d.ts +2 -1
  171. package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.d.ts +2 -1
  172. package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRooms.d.ts +2 -1
  173. package/dist/src/components/steps/room/TripteaseLodgingSearchSchema.d.ts +2 -1
  174. package/dist/src/components/steps/room/UserSearchSummary/PromoCodeVerificationAlert.d.ts +2 -1
  175. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummary.d.ts +2 -1
  176. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryPromocodeInput.d.ts +2 -1
  177. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryRow.d.ts +2 -1
  178. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfAdultsPicker.d.ts +2 -1
  179. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfChildrenPicker.d.ts +2 -1
  180. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfInfantsPicker.d.ts +2 -1
  181. package/dist/src/components/steps/room/roomBuilderProgress/RoomBuilderProgress.d.ts +2 -1
  182. package/dist/src/components/steps/room/roomBuilderProgress/RoomBuilderProgressRow.d.ts +2 -1
  183. package/dist/src/components/steps/room/roomDetails/RoomDetails.d.ts +2 -1
  184. package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.d.ts +2 -1
  185. package/dist/src/components/steps/room/roomDetails/RoomDetailsPerkBlock.d.ts +2 -1
  186. package/dist/src/components/steps/room/roomDetails/RoomDetailsPriceBlock.d.ts +2 -1
  187. package/dist/src/components/steps/room/roomDetails/roomRates/BookNowButton.d.ts +2 -1
  188. package/dist/src/components/steps/room/roomDetails/roomRates/MembersOnlyRow.d.ts +2 -1
  189. package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.d.ts +3 -2
  190. package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.js +2 -2
  191. package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.js.map +1 -1
  192. package/dist/src/components/steps/room/roomDetails/roomRates/ReadMoreRoomRateRow.d.ts +2 -1
  193. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDescriptionTab.d.ts +3 -2
  194. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDetailsAndPriceBreakdownModal.d.ts +2 -1
  195. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateListPromotion/RoomRateListPromotion.d.ts +2 -1
  196. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRatePills.d.ts +2 -1
  197. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.d.ts +2 -1
  198. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRates.d.ts +2 -1
  199. package/dist/src/components/steps/room/roomDetails/unavailableRoom/UnavailableRoom.d.ts +2 -1
  200. package/dist/src/components/steps/room/roomFilter/AppliedFiltersBlock.d.ts +2 -1
  201. package/dist/src/components/steps/room/roomFilter/RoomFilterOverlay.d.ts +2 -1
  202. package/dist/src/components/steps/room/roomFilter/RoomFilterPriceSlider.d.ts +2 -1
  203. package/dist/src/components/steps/room/roomFilter/RoomFilterRateType.d.ts +2 -1
  204. package/dist/src/components/steps/room/roomFilter/RoomFilterRoomType.d.ts +2 -1
  205. package/dist/src/components/summary/BEMobileSummary.d.ts +2 -1
  206. package/dist/src/components/summary/BEMobileSummaryModal.d.ts +2 -1
  207. package/dist/src/components/summary/BESummary.d.ts +2 -1
  208. package/dist/src/components/summary/BESummaryAddonRow.d.ts +2 -1
  209. package/dist/src/components/summary/BESummaryPerkBlock.d.ts +2 -1
  210. package/dist/src/components/summary/BESummaryPrivacyPolicy.d.ts +2 -1
  211. package/dist/src/components/summary/BESummaryRoomRow.d.ts +2 -1
  212. package/dist/src/components/summary/BESummaryRoomRow.js +1 -1
  213. package/dist/src/components/summary/BESummaryRoomRow.js.map +1 -1
  214. package/dist/src/components/summary/TransportDistanceFromHotelBlock.d.ts +2 -1
  215. package/dist/src/contexts/BasketContext/BasketContextWrapper.d.ts +1 -1
  216. package/dist/src/contexts/BasketContext/BasketContextWrapper.js +63 -11
  217. package/dist/src/contexts/BasketContext/BasketContextWrapper.js.map +1 -1
  218. package/dist/src/contexts/BookingEngineContext/BookingEngineContextWrapper.d.ts +1 -1
  219. package/dist/src/contexts/CompanyContext/CompanyContextWrapper.d.ts +2 -2
  220. package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +1 -0
  221. package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js.map +1 -1
  222. package/dist/src/contexts/ConfirmationFormContext.d.ts +1 -1
  223. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js +3 -2
  224. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js.map +1 -1
  225. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepErrorModal.d.ts +2 -1
  226. package/dist/src/contexts/ErrorContext.d.ts +1 -1
  227. package/dist/src/contexts/FullPageEngineContext/EngineBodyLayout.d.ts +2 -1
  228. package/dist/src/contexts/FullPageEngineContext/EnginePageLayout.d.ts +2 -1
  229. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.d.ts +2 -1
  230. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js +10 -2
  231. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js.map +1 -1
  232. package/dist/src/contexts/HotelOverridesContext.d.ts +1 -1
  233. package/dist/src/contexts/ModalContext.d.ts +1 -1
  234. package/dist/src/contexts/NotificationContext.d.ts +1 -1
  235. package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.d.ts +7 -0
  236. package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.js.map +1 -1
  237. package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.d.ts +2 -1
  238. package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.js +1 -0
  239. package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.js.map +1 -1
  240. package/dist/src/engines/FullPageBookingEngine/FullPageBookingEngineElement.d.ts +2 -1
  241. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.d.ts +2 -2
  242. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.js +3 -0
  243. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.js.map +1 -1
  244. package/dist/src/engines/MemberPortalWidget/MemberPortalWidgetElement.d.ts +2 -1
  245. package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.d.ts +2 -1
  246. package/dist/src/hooks/RoomRateAvailabilityListFromApi.js +2 -1
  247. package/dist/src/hooks/RoomRateAvailabilityListFromApi.js.map +1 -1
  248. package/dist/src/hooks/useNextStepAction.d.ts +2 -1
  249. package/dist/src/icons/Check.d.ts +2 -1
  250. package/dist/src/index.d.ts +1 -0
  251. package/dist/src/index.js +4 -2
  252. package/dist/src/index.js.map +1 -1
  253. package/dist/src/models/Api/HotelDTO.d.ts +1 -0
  254. package/dist/src/models/Api/HotelDTO.js.map +1 -1
  255. package/dist/src/models/BasketRow.d.ts +2 -1
  256. package/dist/src/models/BasketRow.js +32 -2
  257. package/dist/src/models/BasketRow.js.map +1 -1
  258. package/dist/src/models/BookingWizard/BookingWizardProperty.d.ts +13 -0
  259. package/dist/src/models/BookingWizard/BookingWizardProperty.js.map +1 -1
  260. package/dist/src/models/Client/Hotel/Hotel.d.ts +1 -0
  261. package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
  262. package/dist/src/models/RoomstaySession.d.ts +1 -0
  263. package/dist/src/models/RoomstaySession.js.map +1 -1
  264. package/dist/src/pages/account/AccountHome/AccountHomePage.d.ts +2 -1
  265. package/dist/src/pages/account/AccountOutlet.d.ts +1 -1
  266. package/dist/src/pages/account/AccountRouter.d.ts +2 -1
  267. package/dist/src/pages/account/ChangePassword/AccountChangePasswordPage.d.ts +2 -1
  268. package/dist/src/pages/account/Details/AccountDetailsCardsPage.d.ts +2 -1
  269. package/dist/src/pages/account/Details/AccountDetailsProfilePage.d.ts +2 -1
  270. package/dist/src/pages/account/Help/AccountHelpPage.d.ts +2 -1
  271. package/dist/src/pages/account/Reservations/AccountReservationSinglePage.d.ts +2 -1
  272. package/dist/src/pages/account/Reservations/AccountReservationsPage.d.ts +2 -1
  273. package/dist/src/pages/findReservation/FindReservation.d.ts +2 -1
  274. package/dist/src/pages/findReservation/FindReservationResults.d.ts +2 -1
  275. package/dist/src/pages/findReservation/ReservationRow.d.ts +2 -1
  276. package/dist/src/pages/findReservation/ReservationRowModal.d.ts +2 -1
  277. package/dist/src/pages/hotel/HotelInfo.d.ts +2 -1
  278. package/dist/src/pages/hotel/HotelInfoPlaceholder.d.ts +2 -1
  279. package/dist/src/pages/steps/StepAddon/StepAddon.d.ts +2 -1
  280. package/dist/src/pages/steps/StepAddon/StepAddonComponent.d.ts +2 -1
  281. package/dist/src/pages/steps/StepAddon/StepAddonLoader.d.ts +2 -1
  282. package/dist/src/pages/steps/StepConfirmation/StepConfirmationComponent.d.ts +2 -1
  283. package/dist/src/pages/steps/StepConfirmation/StepConfirmationLoader.d.ts +2 -1
  284. package/dist/src/pages/steps/StepDate/StepDate.d.ts +2 -1
  285. package/dist/src/pages/steps/StepDate/StepDateComponent.d.ts +2 -1
  286. package/dist/src/pages/steps/StepGroupedRoom/StepGroupedRoomComponent.d.ts +2 -1
  287. package/dist/src/pages/steps/StepGroupedRoom/StepGroupedRoomLoader.d.ts +2 -1
  288. package/dist/src/pages/steps/StepGuide.d.ts +1 -1
  289. package/dist/src/pages/steps/StepHotel/StepHotel.d.ts +2 -1
  290. package/dist/src/pages/steps/StepHotel/StepHotelComponent.d.ts +2 -1
  291. package/dist/src/pages/steps/StepHotel/StepHotelLoader.d.ts +2 -1
  292. package/dist/src/pages/steps/StepRoom/StepRoomComponent.d.ts +2 -1
  293. package/dist/src/pages/steps/StepRoom/StepRoomLoader.d.ts +2 -1
  294. package/dist/src/pages/steps/StepThanks/StepThanksComponent.d.ts +2 -1
  295. package/dist/src/providers/DIProvider.d.ts +2 -1
  296. package/dist/src/providers/FeatureProvider.js +2 -0
  297. package/dist/src/providers/FeatureProvider.js.map +1 -1
  298. package/dist/src/providers/feature/ConfirmationImportantInformationFeature.d.ts +10 -0
  299. package/dist/src/providers/feature/ConfirmationImportantInformationFeature.js +13 -0
  300. package/dist/src/providers/feature/ConfirmationImportantInformationFeature.js.map +1 -0
  301. package/dist/src/providers/feature/Feature.d.ts +2 -0
  302. package/dist/src/providers/feature/Feature.js +4 -0
  303. package/dist/src/providers/feature/Feature.js.map +1 -1
  304. package/dist/src/providers/storage/SessionProvider.js +2 -0
  305. package/dist/src/providers/storage/SessionProvider.js.map +1 -1
  306. package/dist/src/routes/NaturallyProgressedStepRoute.d.ts +2 -1
  307. package/dist/src/stories/BookingWizard.stories.d.ts +1 -1
  308. package/dist/src/stories/ConfirmationModal.stories.d.ts +2 -1
  309. package/dist/src/stories/DateRangePicker.stories.d.ts +5 -4
  310. package/dist/src/stories/ErrorModal.stories.d.ts +2 -1
  311. package/dist/src/stories/EventCarousel.stories.d.ts +2 -2
  312. package/dist/src/stories/FloatingDateRangePicker.stories.d.ts +2 -2
  313. package/dist/src/stories/IconNavCard.stories.d.ts +2 -2
  314. package/dist/src/stories/NumberIncrement.stories.d.ts +2 -1
  315. package/dist/src/stories/PaymentCard.stories.d.ts +3 -2
  316. package/dist/src/stories/RadioButtonGroup.stories.d.ts +3 -3
  317. package/dist/src/stories/Select.stories.d.ts +3 -3
  318. package/dist/src/stories/SimpleModal.stories.d.ts +2 -1
  319. package/dist/src/stories/Slider.stories.d.ts +3 -2
  320. package/dist/src/stories/TabbedModal.stories.d.ts +2 -1
  321. package/dist/src/stories/Tabs.stories.d.ts +1 -1
  322. package/dist/src/translations/Translation.d.ts +6 -0
  323. package/dist/src/translations/Translation.js +6 -0
  324. package/dist/src/translations/Translation.js.map +1 -1
  325. package/dist/src/translations/languages/en-gb.js +6 -0
  326. package/dist/src/translations/languages/en-gb.js.map +1 -1
  327. package/dist/src/util/TotalCalculator.js.map +1 -1
  328. package/dist/test.bundle.js +1 -1
  329. package/dist/tests/offline/entry/config/hotelSpecDefault.d.ts +2 -1
  330. package/dist/vendors.bundle.js +1 -1
  331. package/dist/vendors.bundle.js.LICENSE.txt +6 -6
  332. package/package.json +2 -2
  333. package/dist/177.bundle.js +0 -1
  334. package/dist/279.bundle.js +0 -1
  335. package/dist/288.bundle.js +0 -1
  336. package/dist/370.bundle.js +0 -1
  337. package/dist/430.bundle.js +0 -1
  338. package/dist/439.bundle.js +0 -1
  339. package/dist/446.bundle.js +0 -1
  340. package/dist/449.bundle.js +0 -1
  341. package/dist/535.bundle.js +0 -2
  342. package/dist/537.bundle.js +0 -1
  343. package/dist/619.bundle.js +0 -1
  344. package/dist/625.bundle.js +0 -1
  345. package/dist/659.bundle.js +0 -1
  346. package/dist/686.bundle.js +0 -1
  347. package/dist/873.bundle.js +0 -1
  348. package/dist/972.bundle.js +0 -1
  349. package/dist/978.bundle.js +0 -1
  350. package/dist/984.bundle.js +0 -1
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 349.bundle.js.LICENSE.txt */
2
+ (("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[349],{251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*g}},920:(e,t,r)=>{"use strict";var n=r(69675),i=r(58859),o=r(14803),s=r(80507),a=r(72271)||s||o;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},3793:function(e,t,r){var n;e.exports=(n=r(19021),r(63009),r(51025),n.HmacSHA256)},6188:e=>{"use strict";e.exports=Math.max},6440:function(e,t,r){var n;e.exports=(n=r(19021),function(){if("function"==typeof ArrayBuffer){var e=n.lib.WordArray,t=e.init,r=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),n.lib.WordArray)},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},7176:(e,t,r)=>{"use strict";var n,i=r(73126),o=r(75795);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!n&&o&&o(Object.prototype,"__proto__"),a=Object,u=a.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof u&&function(e){return u(null==e?e:a(e))}},9957:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(66743);e.exports=o.call(n,i)},10076:e=>{"use strict";e.exports=Function.prototype.call},11002:e=>{"use strict";e.exports=Function.prototype.apply},12215:(e,t,r)=>{var n,i,o;void 0===(i="function"==typeof(n=o=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(r);/^[\{\[]/.test(s)&&(r=s)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=t+"="+r+a}}function s(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");r||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=t(a[0]);if(u=(n.read||n)(u,c)||t(u),r)try{u=JSON.parse(u)}catch(e){}if(i[c]=u,e===c)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}(function(){})})?n.call(t,r,t,e):n)||(e.exports=i),e.exports=o()},12550:(e,t,r)=>{var n=r(25814),i=r(60471);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},13144:(e,t,r)=>{"use strict";var n=r(66743),i=r(11002),o=r(10076),s=r(47119);e.exports=s||n.call(o,i)},13526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var n=r(15215),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function s(e){return e&&i.every(function(t){return"function"==typeof e[t]})}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&s(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=s,t.supportsZeroByteGCM=function(e){return n.__awaiter(this,void 0,void 0,function(){var t;return n.__generator(this,function(r){switch(r.label){case 0:if(!s(e))return[2,!1];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=r.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===r.sent().byteLength];case 4:return r.sent(),[2,!1];case 5:return[2]}})})}},14803:(e,t,r)=>{"use strict";var n=r(58859),i=r(69675),o=function(e,t,r){for(var n,i=e;null!=(n=i.next);i=n)if(n.key===t)return i.next=n.next,r||(n.next=e.next,e.next=n),n};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return o(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return function(e,t){if(e){var r=o(e,t);return r&&r.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!o(e,t)}(e,t)},set:function(t,r){e||(e={next:void 0}),function(e,t,r){var n=o(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(e,t,r)}};return t}},14955:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},15413:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},17620:(e,t,r)=>{"use strict";r.r(t),r.d(t,{fromUtf8:()=>n,toUtf8:()=>i});var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++r],e[++r],e[++r]].map(function(e){return e.toString(16)}).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}},18086:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15215);n.__exportStar(r(28904),t),n.__exportStar(r(58145),t),n.__exportStar(r(90304),t),n.__exportStar(r(39116),t),n.__exportStar(r(35660),t)},19021:function(e,t,r){var n;e.exports=(n=n||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==r.g&&r.g.crypto&&(t=r.g.crypto),!t)try{t=r(50477)}catch(e){}var n=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.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)}},u=s.WordArray=a.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,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var a=0;a<i;a+=4)t[n+a>>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;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,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},d=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var f=0;f<c;f+=s)this._doProcessBlock(i,f);r=i.splice(0,c),n.sigBytes-=l}return new u.init(r,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(s.Hasher=d.extend({cfg:a.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,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}}),o.algo={});return o}(Math),n)},19909:(e,t)=>{"use strict";t.q=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},s=e.split(";"),a=i.decode||r,u=0;u<s.length;u++){var c=s[u],l=c.indexOf("=");if(!(l<0)){var f=c.substring(0,l).trim();if(null==n[f]){var h=c.substring(l+1,c.length).trim();'"'===h[0]&&(h=h.slice(1,-1)),n[f]=o(h,a)}}}return n},t.l=function(e,t,r){var o=r||{},s=o.encode||n;if("function"!=typeof s)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var a=s(t);if(a&&!i.test(a))throw new TypeError("argument val is invalid");var u=e+"="+a;if(null!=o.maxAge){var c=o.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(c)}if(o.domain){if(!i.test(o.domain))throw new TypeError("option domain is invalid");u+="; Domain="+o.domain}if(o.path){if(!i.test(o.path))throw new TypeError("option path is invalid");u+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(u+="; HttpOnly"),o.secure&&(u+="; Secure"),o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return u};var r=decodeURIComponent,n=encodeURIComponent,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e,t){try{return t(e)}catch(t){return e}}},20871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(15215),i=r(65494),o=r(34602),s=r(65388),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,s.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n<i.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;for(this.hash.update(t),this.outer.update(r),n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,s.isEmptyData)(e)&&!this.error)try{this.hash.update((0,s.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(e){return[2,this.digestSync()]})})},e}();t.Sha256=a},23469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(15215).__exportStar(r(13526),t)},25814:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var n=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)3&t||(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}},28904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},30655:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},32038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(65388),i=r(14955),o=r(77226),s=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise(function(t,r){(0,o.locateWindow)().crypto.subtle.importKey("raw",(0,n.convertToBuffer)(e),i.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,r)}),this.key.catch(function(){}))}return e.prototype.update=function(e){if(!(0,n.isEmptyData)(e)){var t=(0,n.convertToBuffer)(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return(0,o.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then(function(e){return new Uint8Array(e)})}):(0,n.isEmptyData)(this.toHash)?Promise.resolve(i.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,o.locateWindow)().crypto.subtle.digest(i.SHA_256_HASH,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e}();t.Sha256=s},33523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(15215).__exportStar)(r(20871),t)},34602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(65494),i=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i<n.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<n.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(n.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=0;f<n.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var h=this.temp[f-2],d=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,p=((h=this.temp[f-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[f]=(d+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(l+(n.KEY[f]+this.temp[f]|0)|0)|0,y=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;l=c,c=u,u=a,a=s+g|0,s=o,o=i,i=r,r=g+y|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},35336:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},35345:e=>{"use strict";e.exports=URIError},35660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,i=t.subtle;return r.map(function(e){return i[e]}).concat(n).every(function(e){return"function"==typeof e})}return!1}},36556:(e,t,r)=>{"use strict";var n=r(70453),i=r(73126),o=i([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i([r]):r}},36634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,r(15215).__exportStar)(r(69258),t);var n=r(71195);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return n.Sha256}});var i=r(32038);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},37720:(e,t,r)=>{"use strict";var n=r(74765),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},u=1024;e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],s=i.obj[i.prop],a=Object.keys(s),u=0;u<a.length;++u){var c=a[u],l=s[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var c="",l=0;l<a.length;l+=u){for(var f=a.length>=u?a.slice(l,l+u):a,h=[],d=0;d<f.length;++d){var p=f.charCodeAt(d);45===p||46===p||95===p||126===p||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||o===n.RFC1738&&(40===p||41===p)?h[h.length]=f.charAt(d):p<128?h[h.length]=s[p]:p<2048?h[h.length]=s[192|p>>6]+s[128|63&p]:p<55296||p>=57344?h[h.length]=s[224|p>>12]+s[128|p>>6&63]+s[128|63&p]:(d+=1,p=65536+((1023&p)<<10|1023&f.charCodeAt(d)),h[h.length]=s[240|p>>18]+s[128|p>>12&63]+s[128|p>>6&63]+s[128|63&p])}c+=h.join("")}return c},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(o(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var s=t;return o(t)&&!o(r)&&(s=a(t,n)),o(t)&&o(r)?(r.forEach(function(r,o){if(i.call(t,o)){var s=t[o];s&&"object"==typeof s&&r&&"object"==typeof r?t[o]=e(s,r,n):t.push(r)}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){var s=r[o];return i.call(t,o)?t[o]=e(t[o],s,n):t[o]=s,t},s)}}},39116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39456:e=>{e.exports={name:"@aws-sdk/client-cognito-identity",description:"AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native",version:"3.6.1",scripts:{clean:"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./",prepublishOnly:"yarn build",pretest:"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test:e2e":"mocha **/cjs/**/*.ispec.js && karma start karma.conf.js",test:"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json",build:"yarn build:cjs && yarn build:es",postbuild:"downlevel-dts types types/ts3.4"},main:"./dist/cjs/index.js",types:"./types/index.d.ts",module:"./dist/es/index.js",browser:{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1",tslib:"^2.0.0"},devDependencies:{"@aws-sdk/client-documentation-generator":"3.6.1","@aws-sdk/client-iam":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0",jest:"^26.1.0",rimraf:"^3.0.0",typedoc:"^0.19.2",typescript:"~4.1.2"},engines:{node:">=10.0.0"},typesVersions:{"<4.0":{"types/*":["types/ts3.4/*"]}},author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-cognito-identity"}}},41033:(e,t,r)=>{var n,i,o=r(25814),s=r(60471),a=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,l=t||[],f=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==h){var d=o();null==f&&(f=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:u+1,y=p-a+(g-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>a)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,u=g,i=h;var v=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;l[c++]=v>>>24&255,l[c++]=v>>>16&255,l[c++]=v>>>8&255,l[c++]=255&v;var m=p/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>24&15|16,l[c++]=m>>>16&255,l[c++]=h>>>8|128,l[c++]=255&h;for(var w=0;w<6;++w)l[c+w]=f[w];return t||s(l)}},41237:e=>{"use strict";e.exports=EvalError},41333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},46880:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),s=Math.max(i,o),a=0,u=e.map([t,r],function(t){var r=s-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){n[t]=e[t]})};for(t=0,r=o.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),o=u(r(94)),s=u(r(95)),a=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(r[t]=s,n+=1)}),n>0){var s=Object.keys(r),u=a.default.find(s,function(e){return t.isOS(e)});if(u){var c=this.satisfies(r[u]);if(void 0!==c)return c}var l=a.default.find(s,function(e){return t.isPlatform(e)});if(l){var f=this.satisfies(r[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),r={type:o.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(r.model=t),r}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},47119:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},48287:(e,t,r)=>{"use strict";var n=r(67526),i=r(251),o=r(35336);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=a(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|d(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|d(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return q(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return U(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function b(e,t,r,n){return H(q(t,e.length-r),e,r,n)}function S(e,t,r,n){return H(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return S(e,t,r,n)}function A(e,t,r,n){return H(K(t),e,r,n)}function E(e,t,r,n){return H(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=P));return r}(n)}t.hp=u,t.IS=50,u.TYPED_ARRAY_SUPPORT=void 0!==r.g.TYPED_ARRAY_SUPPORT?r.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?a(e,t):void 0!==r?"string"==typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.IS;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=e.slice(t,r),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],s=l[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function U(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=B(e[o]);return i}function k(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function D(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function F(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,o){return o||F(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return o||F(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||x(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=u.isBuffer(e)?e:q(new u(e,n).toString()),a=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}},48648:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},50916:(e,t,r)=>{e.exports=self.fetch||(self.fetch=r(76782).default||r(76782))},51024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=r(80256),i="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},51025:function(e,t,r){var n,i,o;e.exports=(i=(n=r(19021)).lib.Base,o=n.enc.Utf8,void(n.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),s=this._iKey=t.clone(),a=i.words,u=s.words,c=0;c<r;c++)a[c]^=1549556828,u[c]^=909522486;i.sigBytes=s.sigBytes=n,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,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))},55373:(e,t,r)=>{"use strict";var n=r(98636),i=r(62642),o=r(74765);e.exports={formats:o,parse:i,stringify:n}},57349:(e,t,r)=>{"use strict";var n,i,o;function s(e){return e&&!!["provider"].find(function(t){return e.hasOwnProperty(t)})}function a(e){return void 0!==e.redirectSignIn}r.r(t),r.d(t,{Auth:()=>Fo,AuthErrorStrings:()=>So,CognitoHostedUIIdentityProvider:()=>n,CognitoUser:()=>Vi,CookieStorage:()=>uo,GRAPHQL_AUTH_MODE:()=>o,appendToCognitoUserAgent:()=>Yi,default:()=>No}),function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon",e.Apple="SignInWithApple"}(n||(n={})),function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError"}(i||(i={})),function(e){e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.OPENID_CONNECT="OPENID_CONNECT",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS",e.AWS_LAMBDA="AWS_LAMBDA"}(o||(o={}));var u,c=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},l=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e},f={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5};!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE"}(u||(u={}));var h=function(){function e(e,t){void 0===t&&(t=u.WARN),this.name=e,this.level=t,this._pluggables=[]}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype.configure=function(e){return e?(this._config=e,this._config):this._config},e.prototype._log=function(t){for(var r,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var s=this.level;if(e.LOG_LEVEL&&(s=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(s=window.LOG_LEVEL),f[t]>=f[s]){var a=console.log.bind(console);t===u.ERROR&&console.error&&(a=console.error.bind(console)),t===u.WARN&&console.warn&&(a=console.warn.bind(console));var c="["+t+"] "+this._ts()+" "+this.name,l="";if(1===i.length&&"string"==typeof i[0])a(l=c+" - "+i[0]);else if(1===i.length)l=c+" "+i[0],a(c,i[0]);else if("string"==typeof i[0]){var h=i.slice(1);1===h.length&&(h=h[0]),l=c+" - "+i[0]+" "+h,a(c+" - "+i[0],h)}else l=c+" "+i,a(c,i);try{for(var d=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._pluggables),p=d.next();!p.done;p=d.next()){var g=p.value,y={message:l,timestamp:Date.now()};g.pushLogs([y])}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,l([u.INFO],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,l([u.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,l([u.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,l([u.ERROR],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,l([u.DEBUG],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,l([u.VERBOSE],e))},e.prototype.addPluggable=function(e){e&&"Logging"===e.getCategoryName()&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}(),d=function(){return d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},d.apply(this,arguments)},p=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},g=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e},y=new h("Hub"),v="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",m=function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var r=this.patterns.find(function(t){return t.pattern.source===e.source});if(!r)return void y.warn("No listeners for "+e);this.patterns=g(this.patterns.filter(function(e){return e!==r}))}else{var n=this.listeners[e];if(!n)return void y.warn("No listeners for "+e);this.listeners[e]=g(n.filter(function(e){return e.callback!==t}))}},e.prototype.dispatch=function(e,t,r,n){void 0===r&&(r=""),this.protectedChannels.indexOf(e)>-1&&(n===v||y.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var i={channel:e,payload:d({},t),source:r,patternInfo:[]};try{this._toListeners(i)}catch(e){y.error(e)}},e.prototype.listen=function(e,t,r){var n,i=this;if(void 0===r&&(r="noname"),function(e){return void 0!==e.onHubCapsule}(t))y.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),n=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");n=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:n});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:r,callback:n})}return function(){i.remove(e,n)}},e.prototype._toListeners=function(e){var t=e.channel,r=e.payload,n=this.listeners[t];if(n&&n.forEach(function(n){y.debug("Dispatching to "+t+" with ",r);try{n.callback(e)}catch(e){y.error(e)}}),this.patterns.length>0){if(!r.message)return void y.warn("Cannot perform pattern matching without a message key");var i=r.message;this.patterns.forEach(function(t){var r=i.match(t.pattern);if(r){var n=p(r).slice(1),o=d(d({},e),{patternInfo:n});try{t.callback(o)}catch(e){y.error(e)}}})}},e}(),w=new m("__default__"),b={},S=function(){function e(){}return e.setItem=function(e,t){return b[e]=t,b[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(b,e)?b[e]:void 0},e.removeItem=function(e){return delete b[e]},e.clear=function(){return b={}},e}(),_=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=S}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),A=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],E=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},I=function(e,t,r){if(!e||!e.sort)return!1;var n=r&&"desc"===r?-1:1;return e.sort(function(e,r){var i=e[t],o=r[t];return void 0===o?void 0===i?0:1*n:void 0===i||i<o?-1*n:i>o?1*n:0}),!0},C=function(e,t){var r=Object.assign({},e);return t&&("string"==typeof t?delete r[t]:t.forEach(function(e){delete r[e]})),r},P=function(e,t){void 0===t&&(t="application/octet-stream");var r=e.toLowerCase(),n=A.filter(function(e){return r.endsWith("."+e.ext)});return n.length>0?n[0].type:t},T=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||"application/json"===t||"application/xml"===t||"application/sh"===t},U=function(){for(var e="",t=32;t>0;t-=1)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return e},O=function(e){if(e.isResolved)return e;var t=!0,r=!1,n=!1,i=e.then(function(e){return n=!0,t=!1,e},function(e){throw r=!0,t=!1,e});return i.isFullfilled=function(){return n},i.isPending=function(){return t},i.isRejected=function(){return r},i},k=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},M=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},x=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),!D(e))return e;var n={};for(var i in e)e.hasOwnProperty(i)&&(n[t.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=r.includes(i)?e[i]:x(e[i],t,r));return n},R=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=[]),!D(e))return e;var n={};for(var i in e)e.hasOwnProperty(i)&&(n[t.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=r.includes(i)?e[i]:R(e[i],t,r));return n},D=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)};!function(){function e(){}e.isEmpty=E,e.sortByField=I,e.objectLessAttributes=C,e.filenameToContentType=P,e.isTextFile=T,e.generateRandomString=U,e.makeQuerablePromise=O,e.isWebWorker=k,e.browserOrNode=M,e.transferKeyToLowerCase=x,e.transferKeyToUpperCase=R,e.isStrictObject=D}();var F=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),N=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})},j=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},L=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},B=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(L(arguments[t]));return e},q=new h("Util"),K=function(e){function t(t){var r=e.call(this,t)||this;return r.nonRetryable=!0,r}return F(t,e),t}(Error),H=3e5,V=new h("CognitoCredentials"),z=new Promise(function(e,t){return M().isBrowser?window.gapi&&window.gapi.auth2&&window.gapi.auth2?(V.debug("google api already loaded"),e()):void setTimeout(function(){return e()},2e3):(V.debug("not in the browser, directly resolved"),e())}),W=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return e=this,t=void 0,n=function(){return function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(V.debug("need to wait for the Google SDK loaded"),[4,z]);case 1:e.sent(),this.initialized=!0,V.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}})},new((r=void 0)||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())});var e,t,r,n},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return M().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise(function(t,r){e.getAuthInstance().then(function(e){e||(V.debug("google Auth undefined"),r(new K("google Auth undefined")));var n=e.currentUser.get();n.isSignedIn()?(V.debug("refreshing the google access token"),n.reloadAuthResponse().then(function(e){var r=e.id_token,n=e.expires_at;t({token:r,expires_at:n})}).catch(function(e){e&&"network_error"===e.error?r("Network error reloading google auth response"):r(new K("Failed to reload google auth response"))})):r(new K("User is not signed in with Google"))}).catch(function(e){V.debug("Failed to refresh google token",e),r(new K("Failed to refresh google token"))})}):(V.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),G=new h("CognitoCredentials"),Y=new Promise(function(e,t){return M().isBrowser?window.FB?(G.debug("FB SDK already loaded"),e()):void setTimeout(function(){return e()},2e3):(G.debug("not in the browser, directly resolved"),e())}),$=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return e=this,t=void 0,n=function(){return function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(G.debug("need to wait for the Facebook SDK loaded"),[4,Y]);case 1:e.sent(),this.initialized=!0,G.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}})},new((r=void 0)||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())});var e,t,r,n},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(M().isBrowser&&(e=window.FB),!e){var t="no fb sdk available";return G.debug(t),Promise.reject(new K(t))}return new Promise(function(t,r){e.getLoginStatus(function(e){if(e&&e.authResponse){var n=e.authResponse,i=n.accessToken,o=1e3*n.expiresIn+(new Date).getTime();i||(s="the jwtToken is undefined",G.debug(s),r(new K(s))),t({token:i,expires_at:o})}else{var s="no response from facebook when refreshing the jwt token";G.debug(s),r(new K(s))}},{scope:"public_profile,email"})})},e}(),J=new W,Z=new $,Q=new h("Amplify"),X=function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Geo=null,this.Logger=h,this.ServiceWorker=null}return e.prototype.register=function(e){Q.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):Q.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),Q.debug("amplify config",this._config),Object.entries(this._modules).forEach(function(e){var r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(e,2),n=(r[0],r[1]);Object.keys(n).forEach(function(e){t._modules[e]&&(n[e]=t._modules[e])})}),this._components.map(function(e){e.configure(t._config)}),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map(function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)})},e}(),ee=new X,te=r(15215),re=function(e,t){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},re(e,t)};function ne(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}re(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var ie,oe,se,ae,ue,ce,le,fe,he,de,pe,ge,ye,ve,me,we,be,Se,_e,Ae,Ee,Ie,Ce,Pe,Te,Ue,Oe,ke,Me,xe,Re,De,Fe,Ne,je,Le,Be,qe,Ke,He,Ve,ze,We,Ge,Ye,$e,Je,Ze,Qe,Xe,et,tt,rt,nt,it,ot,st,at=function(){return at=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},at.apply(this,arguments)};function ut(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function ct(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(ie||(ie={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(oe||(oe={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(se||(se={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(ae||(ae={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(ue||(ue={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(ce||(ce={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(le||(le={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(fe||(fe={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(he||(he={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(de||(de={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(pe||(pe={})),function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(ge||(ge={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(ye||(ye={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(ve||(ve={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(me||(me={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(we||(we={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(be||(be={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Se||(Se={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(_e||(_e={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ae||(Ae={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ee||(Ee={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ie||(Ie={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ce||(Ce={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Pe||(Pe={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Te||(Te={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ue||(Ue={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Oe||(Oe={})),function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(ke||(ke={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Me||(Me={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(xe||(xe={})),function(e){e.RULES="Rules",e.TOKEN="Token"}(Re||(Re={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(De||(De={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Fe||(Fe={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ne||(Ne={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(je||(je={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Le||(Le={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Be||(Be={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(qe||(qe={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ke||(Ke={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(He||(He={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ve||(Ve={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(ze||(ze={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(We||(We={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ge||(Ge={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ye||(Ye={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}($e||($e={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Je||(Je={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Ze||(Ze={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Qe||(Qe={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(Xe||(Xe={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(et||(et={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(tt||(tt={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(rt||(rt={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(nt||(nt={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(it||(it={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(ot||(ot={})),function(e){e.filterSensitiveLog=function(e){return at({},e)}}(st||(st={}));var lt=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),ft=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,r=new e((0,te.__assign)((0,te.__assign)({},this),{headers:(0,te.__assign)({},this.headers)}));return r.query&&(r.query=(t=r.query,Object.keys(t).reduce(function(e,r){var n,i=t[r];return(0,te.__assign)((0,te.__assign)({},e),((n={})[r]=Array.isArray(i)?(0,te.__spread)(i):i,n))},{}))),r},e}(),ht=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n,i,o,s,a,u,c,l,f,h,d,p,g,y;return ct(this,function(v){switch(v.label){case 0:return n=[at({},e)],y={},[4,Ft(e.body,t)];case 1:switch(r=at.apply(void 0,n.concat([(y.body=v.sent(),y)])),o="UnknownError",o=Nt(e,r.body)){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return s=[{}],[4,pt(r,t)];case 3:return i=at.apply(void 0,[at.apply(void 0,s.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 4:return a=[{}],[4,gt(r,t)];case 5:return i=at.apply(void 0,[at.apply(void 0,a.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 6:return u=[{}],[4,yt(r,t)];case 7:return i=at.apply(void 0,[at.apply(void 0,u.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 8:return c=[{}],[4,vt(r,t)];case 9:return i=at.apply(void 0,[at.apply(void 0,c.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 10:return l=[{}],[4,wt(r,t)];case 11:return i=at.apply(void 0,[at.apply(void 0,l.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 12:return f=[{}],[4,bt(r,t)];case 13:return i=at.apply(void 0,[at.apply(void 0,f.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 14:return h=[{}],[4,St(r,t)];case 15:return i=at.apply(void 0,[at.apply(void 0,h.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 16:return d=[{}],[4,_t(r,t)];case 17:return i=at.apply(void 0,[at.apply(void 0,d.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 18:p=r.body,o=p.code||p.Code||o,i=at(at({},p),{name:""+o,message:p.message||p.Message||o,$fault:"client",$metadata:Rt(e)}),v.label=19;case 19:return g=i.message||i.Message||o,i.message=g,delete i.Message,[2,Promise.reject(Object.assign(new Error(g),i))]}})})},dt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n,i,o,s,a,u,c,l,f,h,d,p,g,y;return ct(this,function(v){switch(v.label){case 0:return n=[at({},e)],y={},[4,Ft(e.body,t)];case 1:switch(r=at.apply(void 0,n.concat([(y.body=v.sent(),y)])),o="UnknownError",o=Nt(e,r.body)){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return s=[{}],[4,pt(r,t)];case 3:return i=at.apply(void 0,[at.apply(void 0,s.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 4:return a=[{}],[4,gt(r,t)];case 5:return i=at.apply(void 0,[at.apply(void 0,a.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 6:return u=[{}],[4,vt(r,t)];case 7:return i=at.apply(void 0,[at.apply(void 0,u.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 8:return c=[{}],[4,mt(r,t)];case 9:return i=at.apply(void 0,[at.apply(void 0,c.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 10:return l=[{}],[4,wt(r,t)];case 11:return i=at.apply(void 0,[at.apply(void 0,l.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 12:return f=[{}],[4,bt(r,t)];case 13:return i=at.apply(void 0,[at.apply(void 0,f.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 14:return h=[{}],[4,St(r,t)];case 15:return i=at.apply(void 0,[at.apply(void 0,h.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 16:return d=[{}],[4,_t(r,t)];case 17:return i=at.apply(void 0,[at.apply(void 0,d.concat([v.sent()])),{name:o,$metadata:Rt(e)}]),[3,19];case 18:p=r.body,o=p.code||p.Code||o,i=at(at({},p),{name:""+o,message:p.message||p.Message||o,$fault:"client",$metadata:Rt(e)}),v.label=19;case 19:return g=i.message||i.Message||o,i.message=g,delete i.Message,[2,Promise.reject(Object.assign(new Error(g),i))]}})})},pt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=It(r,t),[2,at({name:"ExternalServiceException",$fault:"client",$metadata:Rt(e)},n)]})})},gt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=Ct(r,t),[2,at({name:"InternalErrorException",$fault:"server",$metadata:Rt(e)},n)]})})},yt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=Pt(r,t),[2,at({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:Rt(e)},n)]})})},vt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=Tt(r,t),[2,at({name:"InvalidParameterException",$fault:"client",$metadata:Rt(e)},n)]})})},mt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=Ut(r,t),[2,at({name:"LimitExceededException",$fault:"client",$metadata:Rt(e)},n)]})})},wt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=Ot(r,t),[2,at({name:"NotAuthorizedException",$fault:"client",$metadata:Rt(e)},n)]})})},bt=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=kt(r,t),[2,at({name:"ResourceConflictException",$fault:"client",$metadata:Rt(e)},n)]})})},St=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=Mt(r,t),[2,at({name:"ResourceNotFoundException",$fault:"client",$metadata:Rt(e)},n)]})})},_t=function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r=e.body,n=xt(r,t),[2,at({name:"TooManyRequestsException",$fault:"client",$metadata:Rt(e)},n)]})})},At=function(e,t){return Object.entries(e).reduce(function(e,t){var r,n=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}(t,2),i=n[0],o=n[1];return null===o?e:at(at({},e),((r={})[i]=o,r))},{})},Et=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},It=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ct=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Pt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Tt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ut=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ot=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},kt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Mt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},xt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Rt=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Dt=function(e,t,r,n,i){return ut(void 0,void 0,void 0,function(){var o,s,a,u,c,l;return ct(this,function(f){switch(f.label){case 0:return[4,e.endpoint()];case 1:return o=f.sent(),s=o.hostname,a=o.protocol,u=void 0===a?"https":a,c=o.port,l={protocol:u,hostname:s,port:c,method:"POST",path:r,headers:t},void 0!==n&&(l.hostname=n),void 0!==i&&(l.body=i),[2,new ft(l)]}})})},Ft=function(e,t){return function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then(function(e){return t.utf8Encoder(e)})}(e,t).then(function(e){return e.length?JSON.parse(e):{}})},Nt=function(e,t){var r,n=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(r=e.headers,Object.keys(r).find(function(e){return e.toLowerCase()==="x-amzn-errortype".toLowerCase()}));return void 0!==i?n(e.headers[i]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):""},jt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Lt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Bt(e,t,r){return{applyToStack:function(n){n.add(function(e,t){return function(r,n){return function(n){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var i,o;return(0,te.__generator)(this,function(s){switch(s.label){case 0:return[4,r(n)];case 1:return i=s.sent().response,[4,t(i,e)];case 2:return o=s.sent(),[2,{response:i,output:o}]}})})}}}(e,r),jt),n.add(function(e,t){return function(r,n){return function(n){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var i;return(0,te.__generator)(this,function(o){switch(o.label){case 0:return[4,t(n.input,e)];case 1:return i=o.sent(),[2,r((0,te.__assign)((0,te.__assign)({},n),{request:i}))]}})})}}}(e,t),Lt)}}}var qt=function(){var e=[],t=[],r=new Set,n=function(r){return e.forEach(function(e){r.add(e.middleware,(0,te.__assign)({},e))}),t.forEach(function(e){r.addRelativeTo(e.middleware,(0,te.__assign)({},e))}),r},i=function(e){var t=[];return e.before.forEach(function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,(0,te.__spread)(i(e)))}),t.push(e),e.after.reverse().forEach(function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,(0,te.__spread)(i(e)))}),t},o={add:function(t,n){void 0===n&&(n={});var i=n.name,o=n.override,s=(0,te.__assign)({step:"initialize",priority:"normal",middleware:t},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=e.findIndex(function(e){return e.name===i}),u=e[a];if(u.step!==s.step||u.priority!==s.priority)throw new Error('"'+i+'" middleware with '+u.priority+" priority in "+u.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(a,1)}r.add(i)}e.push(s)},addRelativeTo:function(e,n){var i=n.name,o=n.override,s=(0,te.__assign)({middleware:e},n);if(i){if(r.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=t.findIndex(function(e){return e.name===i}),u=t[a];if(u.toMiddleware!==s.toMiddleware||u.relation!==s.relation)throw new Error('"'+i+'" middleware '+u.relation+' "'+u.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(a,1)}r.add(i)}t.push(s)},clone:function(){return n(qt())},use:function(e){e.applyToStack(o)},remove:function(n){return"string"==typeof n?function(n){var i=!1,o=function(e){return!e.name||e.name!==n||(i=!0,r.delete(n),!1)};return e=e.filter(o),t=t.filter(o),i}(n):function(n){var i=!1,o=function(e){return e.middleware!==n||(i=!0,e.name&&r.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(n)},removeByTag:function(n){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(n)||(o&&r.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=n(qt());return t.use(e),t},applyToStack:n,resolve:function(r,n){var o,s;try{for(var a=(0,te.__values)(function(){var r,n=[],o=[],s={};return e.forEach(function(e){var t=(0,te.__assign)((0,te.__assign)({},e),{before:[],after:[]});t.name&&(s[t.name]=t),n.push(t)}),t.forEach(function(e){var t=(0,te.__assign)((0,te.__assign)({},e),{before:[],after:[]});t.name&&(s[t.name]=t),o.push(t)}),o.forEach(function(e){if(e.toMiddleware){var t=s[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}),(r=n,r.sort(function(e,t){return Kt[t.step]-Kt[e.step]||Ht[t.priority||"normal"]-Ht[e.priority||"normal"]})).map(i).reduce(function(e,t){return e.push.apply(e,(0,te.__spread)(t)),e},[]).map(function(e){return e.middleware})}().reverse()),u=a.next();!u.done;u=a.next())r=(0,u.value)(r,n)}catch(e){o={error:e}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(o)throw o.error}}return r}};return o},Kt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ht={high:3,normal:2,low:1},Vt=function(){function e(e){this.middlewareStack=qt(),this.config=e}return e.prototype.send=function(e,t,r){var n="function"!=typeof t?t:void 0,i="function"==typeof t?t:r,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then(function(e){return e.output});o(e).then(function(e){return i(null,e.output)},function(e){return i(e)}).catch(function(){})},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),zt=function(){this.middlewareStack=qt()},Wt=function(){var e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,(0,te.__spread)([null],arguments)));return Object.setPrototypeOf(t,e.prototype),t};Wt.prototype=Object.create(String.prototype,{constructor:{value:Wt,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Wt,String),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,te.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(Wt);var Gt=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return ne(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Bt(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:Ee.filterSensitiveLog,outputFilterSensitiveLog:Ce.filterSensitiveLog},o=t.requestHandler;return n.resolve(function(e){return o.handle(e.request,r||{})},i)},t.prototype.serialize=function(e,t){return function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},n=JSON.stringify(function(e,t){return at(at(at({},void 0!==e.CustomRoleArn&&null!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&null!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:At(e.Logins,t)})}(e,t)),[2,Dt(t,r,"/",void 0,n)]})})}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ut(void 0,void 0,void 0,function(){var r,n,i;return ct(this,function(o){switch(o.label){case 0:return e.statusCode>=300?[2,ht(e,t)]:[4,Ft(e.body,t)];case 1:return r=o.sent(),n=function(e){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?Et(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}}(r),i=at({$metadata:Rt(e)},n),[2,Promise.resolve(i)]}})})}(e,t)},t}(zt),Yt=function(e){function t(t,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n.tryNextLink=r,n}return(0,te.__extends)(t,e),t}(Error);function $t(e){return Promise.all(Object.keys(e).reduce(function(t,r){var n=e[r];return"string"==typeof n?t.push([r,n]):t.push(n().then(function(e){return[r,e]})),t},[])).then(function(e){return e.reduce(function(e,t){var r=(0,te.__read)(t,2),n=r[0],i=r[1];return e[n]=i,e},{})})}function Jt(e){var t=this;return function(){return(0,te.__awaiter)(t,void 0,void 0,function(){var t,r,n,i,o,s,a,u,c,l,f,h,d;return(0,te.__generator)(this,function(p){switch(p.label){case 0:return l=(c=e.client).send,f=Gt.bind,d={CustomRoleArn:e.customRoleArn,IdentityId:e.identityId},e.logins?[4,$t(e.logins)]:[3,2];case 1:return h=p.sent(),[3,3];case 2:h=void 0,p.label=3;case 3:return[4,l.apply(c,[new(f.apply(Gt,[void 0,(d.Logins=h,d)]))])];case 4:return t=p.sent().Credentials,r=void 0===t?function(){throw new Yt("Response from Amazon Cognito contained no credentials")}():t,n=r.AccessKeyId,i=void 0===n?function(){throw new Yt("Response from Amazon Cognito contained no access key ID")}():n,o=r.Expiration,s=r.SecretKey,a=void 0===s?function(){throw new Yt("Response from Amazon Cognito contained no secret key")}():s,u=r.SessionToken,[2,{identityId:e.identityId,accessKeyId:i,secretAccessKey:a,sessionToken:u,expiration:o}]}})})}}var Zt=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return ne(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Bt(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:Te.filterSensitiveLog,outputFilterSensitiveLog:Ue.filterSensitiveLog},o=t.requestHandler;return n.resolve(function(e){return o.handle(e.request,r||{})},i)},t.prototype.serialize=function(e,t){return function(e,t){return ut(void 0,void 0,void 0,function(){var r,n;return ct(this,function(i){return r={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetId"},n=JSON.stringify(function(e,t){return at(at(at({},void 0!==e.AccountId&&null!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&null!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:At(e.Logins,t)})}(e,t)),[2,Dt(t,r,"/",void 0,n)]})})}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ut(void 0,void 0,void 0,function(){var r,n,i;return ct(this,function(o){switch(o.label){case 0:return e.statusCode>=300?[2,dt(e,t)]:[4,Ft(e.body,t)];case 1:return r=o.sent(),n=function(e){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}}(r),i=at({$metadata:Rt(e)},n),[2,Promise.resolve(i)]}})})}(e,t)},t}(zt),Qt="IdentityIds",Xt=function(){function e(e){void 0===e&&(e="aws:cognito-identity-ids"),this.dbName=e}return e.prototype.getItem=function(e){return this.withObjectStore("readonly",function(t){var r=t.get(e);return new Promise(function(e){r.onerror=function(){return e(null)},r.onsuccess=function(){return e(r.result?r.result.value:null)}})}).catch(function(){return null})},e.prototype.removeItem=function(e){return this.withObjectStore("readwrite",function(t){var r=t.delete(e);return new Promise(function(e,t){r.onerror=function(){return t(r.error)},r.onsuccess=function(){return e()}})})},e.prototype.setItem=function(e,t){return this.withObjectStore("readwrite",function(r){var n=r.put({id:e,value:t});return new Promise(function(e,t){n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e()}})})},e.prototype.getDb=function(){var e=self.indexedDB.open(this.dbName,1);return new Promise(function(t,r){e.onsuccess=function(){t(e.result)},e.onerror=function(){r(e.error)},e.onblocked=function(){r(new Error("Unable to access DB"))},e.onupgradeneeded=function(){var t=e.result;t.onerror=function(){r(new Error("Failed to create object store"))},t.createObjectStore(Qt,{keyPath:"id"})}})},e.prototype.withObjectStore=function(e,t){return this.getDb().then(function(r){var n=r.transaction(Qt,e);return n.oncomplete=function(){return r.close()},new Promise(function(e,r){n.onerror=function(){return r(n.error)},e(t(n.objectStore(Qt)))}).catch(function(e){throw r.close(),e})})},e}(),er=new(function(){function e(e){void 0===e&&(e={}),this.store=e}return e.prototype.getItem=function(e){return e in this.store?this.store[e]:null},e.prototype.removeItem=function(e){delete this.store[e]},e.prototype.setItem=function(e,t){this.store[e]=t},e}());for(var tr=r(39456),rr=r.n(tr),nr=r(36634),ir=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,or)},or=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()},sr=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=(void 0===t?{}:t).abortSignal,n=this.requestTimeout;if(null==r?void 0:r.aborted){var i=new Error("Request aborted");return i.name="AbortError",Promise.reject(i)}var o=e.path;if(e.query){var s=function(e){var t,r,n=[];try{for(var i=(0,te.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e[s];if(s=ir(s),Array.isArray(a))for(var u=0,c=a.length;u<c;u++)n.push(s+"="+ir(a[u]));else{var l=s;(a||"string"==typeof a)&&(l+="="+ir(a)),n.push(l)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}(e.query);s&&(o+="?"+s)}var a=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(a?":"+a:"")+o,l={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(l.signal=r);var f,h=new Request(c,l),d=[fetch(h).then(function(e){var t,r,n=e.headers,i={};try{for(var o=(0,te.__values)(n.entries()),s=o.next();!s.done;s=o.next()){var a=s.value;i[a[0]]=a[1]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new lt({headers:i,statusCode:e.status,body:e.body})}:e.blob().then(function(t){return{response:new lt({headers:i,statusCode:e.status,body:t})}})}),(f=n,void 0===f&&(f=0),new Promise(function(e,t){f&&setTimeout(function(){var e=new Error("Request did not complete within "+f+" ms");e.name="TimeoutError",t(e)},f)}))];return r&&d.push(new Promise(function(e,t){r.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}})),Promise.race(d)},e}(),ar={},ur=new Array(64),cr=0,lr="A".charCodeAt(0),fr="Z".charCodeAt(0);cr+lr<=fr;cr++){var hr=String.fromCharCode(cr+lr);ar[hr]=cr,ur[cr]=hr}for(cr=0,lr="a".charCodeAt(0),fr="z".charCodeAt(0);cr+lr<=fr;cr++){hr=String.fromCharCode(cr+lr);var dr=cr+26;ar[hr]=dr,ur[dr]=hr}for(cr=0;cr<10;cr++)ar[cr.toString(10)]=cr+52,hr=cr.toString(10),dr=cr+52,ar[hr]=dr,ur[dr]=hr;function pr(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var r=new ArrayBuffer(t),n=new DataView(r),i=0;i<e.length;i+=4){for(var o=0,s=0,a=i,u=i+3;a<=u;a++)"="!==e[a]?(o|=ar[e[a]]<<6*(u-a),s+=6):o>>=6;var c=i/4*3;o>>=s%8;for(var l=Math.floor(s/8),f=0;f<l;f++){var h=8*(l-f-1);n.setUint8(c+f,(o&255<<h)>>h)}}return new Uint8Array(r)}function gr(e){return new Promise(function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var i=null!==(e=n.result)&&void 0!==e?e:"",o=i.indexOf(","),s=o>-1?o+1:i.length;t(i.substring(s))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)})}ar["+"]=62,ur[62]="+",ar["/"]=63,ur[63]="/";for(var yr,vr,mr,wr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},br=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Sr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],_r=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],Ar=[500,502,503,504],Er=function(e){var t,r;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||Sr.includes(e.name)||1==(null===(r=e.$retryable)||void 0===r?void 0:r.throttling)},Ir=r(68414),Cr=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Pr=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return br.includes(e.name)}(e)||Er(e)||function(e){var t;return _r.includes(e.name)||Ar.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Tr=function(){function e(e,t){var r,n,i,o,s,a,u;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(r=null==t?void 0:t.retryDecider)&&void 0!==r?r:Pr,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:Cr,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:(o=500,s=500,a=function(e){return"TimeoutError"===e.name?10:5},u=function(e){return a(e)<=s},Object.freeze({hasRetryTokens:u,retrieveRetryTokens:function(e){if(!u(e))throw new Error("No retry token available");var t=a(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,o)}}))}return e.prototype.shouldRetry=function(e,t,r){return t<r&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return(0,te.__awaiter)(this,void 0,void 0,function(){var e;return(0,te.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}})})},e.prototype.retry=function(e,t){return(0,te.__awaiter)(this,void 0,void 0,function(){var r,n,i,o,s,a,u,c;return(0,te.__generator)(this,function(l){switch(l.label){case 0:return n=0,i=0,[4,this.getMaxAttempts()];case 1:o=l.sent(),s=t.request,ft.isInstance(s)&&(s.headers["amz-sdk-invocation-id"]=(0,Ir.v4)()),a=function(){var a,c,l,f,h;return(0,te.__generator)(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,5]),ft.isInstance(s)&&(s.headers["amz-sdk-request"]="attempt="+(n+1)+"; max="+o),[4,e(t)];case 1:return a=d.sent(),c=a.response,l=a.output,u.retryQuota.releaseRetryTokens(r),l.$metadata.attempts=n+1,l.$metadata.totalRetryDelay=i,[2,{value:{response:c,output:l}}];case 2:return f=d.sent(),n++,u.shouldRetry(f,n,o)?(r=u.retryQuota.retrieveRetryTokens(f),h=u.delayDecider(Er(f)?500:100,n),i+=h,[4,new Promise(function(e){return setTimeout(e,h)})]):[3,4];case 3:return d.sent(),[2,"continue"];case 4:throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=n,f.$metadata.totalRetryDelay=i,f;case 5:return[2]}})},u=this,l.label=2;case 2:return[5,a()];case 3:return"object"==typeof(c=l.sent())?[2,c.value]:[3,2];case 4:return[2]}})})},e}(),Ur=r(46880),Or=r.n(Ur),kr=r(17620),Mr="cognito-identity.{region}.amazonaws.com",xr=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Rr=new Set(["cn-north-1","cn-northwest-1"]),Dr=new Set(["us-iso-east-1"]),Fr=new Set(["us-isob-east-1"]),Nr=new Set(["us-gov-east-1","us-gov-west-1"]),jr={apiVersion:"2014-06-30",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;switch(e){case"ap-northeast-1":r={hostname:"cognito-identity.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":r={hostname:"cognito-identity.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":r={hostname:"cognito-identity.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":r={hostname:"cognito-identity.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":r={hostname:"cognito-identity.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":r={hostname:"cognito-identity.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":r={hostname:"cognito-identity.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":r={hostname:"cognito-identity.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":r={hostname:"cognito-identity.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":r={hostname:"cognito-identity.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":r={hostname:"cognito-identity.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":r={hostname:"cognito-identity.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":r={hostname:"cognito-identity-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":r={hostname:"cognito-identity-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-gov-west-1":r={hostname:"cognito-identity-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":r={hostname:"cognito-identity-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"sa-east-1":r={hostname:"cognito-identity.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":r={hostname:"cognito-identity.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":r={hostname:"cognito-identity.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-west-1":r={hostname:"cognito-identity.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-west-1":r={hostname:"cognito-identity.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":r={hostname:"cognito-identity.us-west-2.amazonaws.com",partition:"aws"};break;default:xr.has(e)&&(r={hostname:Mr.replace("{region}",e),partition:"aws"}),Rr.has(e)&&(r={hostname:"cognito-identity.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Dr.has(e)&&(r={hostname:"cognito-identity.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Fr.has(e)&&(r={hostname:"cognito-identity.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Nr.has(e)&&(r={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:Mr.replace("{region}",e),partition:"aws"})}return Promise.resolve(at({signingService:"cognito-identity"},r))},serviceId:"Cognito Identity",urlParser:function(e){var t,r=new URL(e),n=r.hostname,i=r.pathname,o=r.port,s=r.protocol,a=r.search;return a&&(t=function(e){var t,r,n={};if(e=e.replace(/^\?/,""))try{for(var i=(0,te.__values)(e.split("&")),o=i.next();!o.done;o=i.next()){var s=o.value,a=(0,te.__read)(s.split("="),2),u=a[0],c=a[1],l=void 0===c?null:c;u=decodeURIComponent(u),l&&(l=decodeURIComponent(l)),u in n?Array.isArray(n[u])?n[u].push(l):n[u]=[n[u],l]:n[u]=l}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(a)),{hostname:n,port:o?parseInt(o):void 0,protocol:s,path:i,query:t}}},Lr=at(at({},jr),{runtime:"browser",base64Decoder:pr,base64Encoder:function(e){for(var t="",r=0;r<e.length;r+=3){for(var n=0,i=0,o=r,s=Math.min(r+3,e.length);o<s;o++)n|=e[o]<<8*(s-o-1),i+=8;var a=Math.ceil(i/6);n<<=6*a-i;for(var u=1;u<=a;u++){var c=6*(a-u);t+=ur[(n&63<<c)>>c]}t+="==".slice(0,4-a)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,r=t-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(yr={serviceId:jr.serviceId,clientVersion:rr().version},vr=yr.serviceId,mr=yr.clientVersion,function(){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,s,a,u;return(0,te.__generator)(this,function(c){return e=(null===(r=null===window||void 0===window?void 0:window.navigator)||void 0===r?void 0:r.userAgent)?Or().parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",mr],["os/"+((null===(n=null==e?void 0:e.os)||void 0===n?void 0:n.name)||"other"),null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.version],["lang/js"],["md/browser",(null!==(s=null===(o=null==e?void 0:e.browser)||void 0===o?void 0:o.name)&&void 0!==s?s:"unknown")+"_"+(null!==(u=null===(a=null==e?void 0:e.browser)||void 0===a?void 0:a.version)&&void 0!==u?u:"unknown")]],vr&&t.push(["api/"+vr,mr]),[2,t]})})}),maxAttempts:3,region:function(){return Promise.reject("Region is missing")},requestHandler:new sr,sha256:nr.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return(0,te.__awaiter)(this,void 0,void 0,function(){var t,r;return(0,te.__generator)(this,function(n){switch(n.label){case 0:return[4,gr(e)];case 1:return t=n.sent(),r=pr(t),[2,new Uint8Array(r)]}})})}(e):function(e){return(0,te.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,s,a;return(0,te.__generator)(this,function(u){switch(u.label){case 0:t=new Uint8Array(0),r=e.getReader(),n=!1,u.label=1;case 1:return n?[3,3]:[4,r.read()];case 2:return i=u.sent(),o=i.done,(s=i.value)&&(a=t,(t=new Uint8Array(a.length+s.length)).set(a),t.set(s,a.length)),n=o,[3,1];case 3:return[2,t]}})})}(e)},utf8Decoder:kr.fromUtf8,utf8Encoder:kr.toUtf8}),Br=function(e){var t=e.endpoint,r=e.urlParser;if("string"==typeof t){var n=Promise.resolve(r(t));return function(){return n}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},qr=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Kr="content-length",Hr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Vr={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},zr={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Wr={},Gr={},Yr=0;Yr<256;Yr++){var $r=Yr.toString(16).toLowerCase();1===$r.length&&($r="0"+$r),Wr[Yr]=$r,Gr[$r]=Yr}function Jr(e){for(var t="",r=0;r<e.byteLength;r++)t+=Wr[e[r]];return t}var Zr="X-Amz-Date",Qr="X-Amz-Signature",Xr="X-Amz-Security-Token",en="authorization",tn=Zr.toLowerCase(),rn=[en,tn,"date"],nn=Qr.toLowerCase(),on="x-amz-content-sha256",sn=Xr.toLowerCase(),an={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},un=/^proxy-/,cn=/^sec-/,ln="AWS4-HMAC-SHA256",fn="AWS4-HMAC-SHA256-PAYLOAD",hn="aws4_request",dn={},pn=[];function gn(e,t,r){return e+"/"+t+"/"+r+"/"+hn}function yn(e,t,r){var n=new e(t);return n.update(r),n.digest()}function vn(e,t,r){var n,i,o=e.headers,s={};try{for(var a=(0,te.__values)(Object.keys(o).sort()),u=a.next();!u.done;u=a.next()){var c=u.value,l=c.toLowerCase();(l in an||(null==t?void 0:t.has(l))||un.test(l)||cn.test(l))&&(!r||r&&!r.has(l))||(s[l]=o[c].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s}function mn(e,t){var r=e.headers,n=e.body;return(0,te.__awaiter)(this,void 0,void 0,function(){var e,i,o,s,a,u,c;return(0,te.__generator)(this,function(l){switch(l.label){case 0:try{for(e=(0,te.__values)(Object.keys(r)),i=e.next();!i.done;i=e.next())if((o=i.value).toLowerCase()===on)return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(f=n,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((s=new t).update(n),a=Jr,[4,s.digest()]):[3,3];case 2:return[2,a.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f})})}function wn(e){var t=e.headers,r=e.query,n=(0,te.__rest)(e,["headers","query"]);return(0,te.__assign)((0,te.__assign)({},n),{headers:(0,te.__assign)({},t),query:r?bn(r):void 0})}function bn(e){return Object.keys(e).reduce(function(t,r){var n,i=e[r];return(0,te.__assign)((0,te.__assign)({},t),((n={})[r]=Array.isArray(i)?(0,te.__spread)(i):i,n))},{})}function Sn(e){var t,r;e="function"==typeof e.clone?e.clone():wn(e);try{for(var n=(0,te.__values)(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;rn.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}var _n=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,s=e.uriEscapePath,a=void 0===s||s;this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=In(n),this.credentialProvider=Cn(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),(0,te.__awaiter)(this,void 0,void 0,function(){var r,n,i,o,s,a,u,c,l,f,h,d,p,g,y,v,m,w,b,S,_,A,E,I;return(0,te.__generator)(this,function(C){switch(C.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,s=t.unsignableHeaders,a=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,l=t.signingService,[4,this.credentialProvider()];case 1:return f=C.sent(),null==c?[3,2]:(d=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:d=C.sent(),C.label=4;case 4:return h=d,p=An(n),g=p.longDate,y=p.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(v=gn(y,h,null!=l?l:this.service),m=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():wn(e),s=o.headers,a=o.query,u=void 0===a?{}:a;try{for(var c=(0,te.__values)(Object.keys(s)),l=c.next();!l.done;l=c.next()){var f=l.value,h=f.toLowerCase();"x-amz-"!==h.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(h))||(u[f]=s[f],delete s[f])}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return(0,te.__assign)((0,te.__assign)({},e),{headers:s,query:u})}(Sn(e),{unhoistableHeaders:a}),f.sessionToken&&(m.query[Xr]=f.sessionToken),m.query["X-Amz-Algorithm"]=ln,m.query["X-Amz-Credential"]=f.accessKeyId+"/"+v,m.query[Zr]=g,m.query["X-Amz-Expires"]=o.toString(10),w=vn(m,s,u),m.query["X-Amz-SignedHeaders"]=En(w),b=m.query,S=Qr,_=this.getSignature,A=[g,v,this.getSigningKey(f,h,y,l)],E=this.createCanonicalRequest,I=[m,w],[4,mn(e,this.sha256)]);case 5:return[4,_.apply(this,A.concat([E.apply(this,I.concat([C.sent()]))]))];case 6:return b[S]=C.sent(),[2,m]}})})},e.prototype.sign=function(e,t){return(0,te.__awaiter)(this,void 0,void 0,function(){return(0,te.__generator)(this,function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]})})},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,s=t.priorSignature,a=t.signingRegion,u=t.signingService;return(0,te.__awaiter)(this,void 0,void 0,function(){var e,t,i,c,l,f,h,d,p,g,y;return(0,te.__generator)(this,function(v){switch(v.label){case 0:return null==a?[3,1]:(t=a,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=v.sent(),v.label=3;case 3:return e=t,i=An(o),c=i.shortDate,l=i.longDate,f=gn(c,e,null!=u?u:this.service),[4,mn({headers:{},body:n},this.sha256)];case 4:return h=v.sent(),(d=new this.sha256).update(r),g=Jr,[4,d.digest()];case 5:return p=g.apply(void 0,[v.sent()]),y=[fn,l,f,s,p,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}})})},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,s=r.signingService;return(0,te.__awaiter)(this,void 0,void 0,function(){var t,r,n,a,u,c,l,f;return(0,te.__generator)(this,function(h){switch(h.label){case 0:return[4,this.credentialProvider()];case 1:return t=h.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=h.sent(),h.label=4;case 4:return r=n,a=An(i).shortDate,l=(c=this.sha256).bind,[4,this.getSigningKey(t,r,a,s)];case 5:return(u=new(l.apply(c,[void 0,h.sent()]))).update(e),f=Jr,[4,u.digest()];case 6:return[2,f.apply(void 0,[h.sent()])]}})})},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,s=r.unsignableHeaders,a=r.signingRegion,u=r.signingService;return(0,te.__awaiter)(this,void 0,void 0,function(){var t,r,n,c,l,f,h,d,p,g,y;return(0,te.__generator)(this,function(v){switch(v.label){case 0:return[4,this.credentialProvider()];case 1:return t=v.sent(),null==a?[3,2]:(n=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=v.sent(),v.label=4;case 4:return r=n,c=Sn(e),l=An(i),f=l.longDate,h=l.shortDate,d=gn(h,r,null!=u?u:this.service),c.headers[tn]=f,t.sessionToken&&(c.headers[sn]=t.sessionToken),[4,mn(c,this.sha256)];case 5:return p=v.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=(0,te.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next())if(e===o.value.toLowerCase())return!0}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}(on,c.headers)&&this.applyChecksum&&(c.headers[on]=p),g=vn(c,s,o),[4,this.getSignature(f,d,this.getSigningKey(t,r,h,u),this.createCanonicalRequest(c,g,p))];case 6:return y=v.sent(),c.headers[en]=ln+" Credential="+t.accessKeyId+"/"+d+", SignedHeaders="+En(g)+", Signature="+y,[2,c]}})})},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],s={},a=function(e){if(e.toLowerCase()===nn)return"continue";o.push(e);var t=i[e];"string"==typeof t?s[e]=ir(e)+"="+ir(t):Array.isArray(t)&&(s[e]=t.slice(0).sort().reduce(function(t,r){return t.concat([ir(e)+"="+ir(r)])},[]).join("&"))};try{for(var u=(0,te.__values)(Object.keys(i).sort()),c=u.next();!c.done;c=u.next())a(c.value)}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map(function(e){return s[e]}).filter(function(e){return e}).join("&")}(e)+"\n"+n.map(function(e){return e+":"+t[e]}).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return(0,te.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,te.__generator)(this,function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,ln+"\n"+e+"\n"+t+"\n"+Jr(i)]}})})},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return(0,te.__awaiter)(this,void 0,void 0,function(){var i,o,s,a,u;return(0,te.__generator)(this,function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),a=(s=this.sha256).bind,[4,r];case 2:return(o=new(a.apply(s,[void 0,c.sent()]))).update(i),u=Jr,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}})})},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var o,s,a,u,c,l,f,h,d;return(0,te.__generator)(this,function(p){switch(p.label){case 0:return[4,yn(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=p.sent(),(s=r+":"+n+":"+i+":"+Jr(o)+":"+t.sessionToken)in dn)return[2,dn[s]];for(pn.push(s);pn.length>50;)delete dn[pn.shift()];a="AWS4"+t.secretAccessKey,p.label=2;case 2:p.trys.push([2,7,8,9]),u=(0,te.__values)([r,n,i,hn]),c=u.next(),p.label=3;case 3:return c.done?[3,6]:(l=c.value,[4,yn(e,a,l)]);case 4:a=p.sent(),p.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return f=p.sent(),h={error:f},[3,9];case 8:try{c&&!c.done&&(d=u.return)&&d.call(u)}finally{if(h)throw h.error}return[7];case 9:return[2,dn[s]=a]}})})}(this.sha256,e,r,t,n||this.service)},e}(),An=function(e){var t,r=(t=e,function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e}(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.substr(0,8)}},En=function(e){return Object.keys(e).sort().join(";")},In=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Cn=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function Pn(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Tn="user-agent",Un=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,On=function(e){var t=(0,te.__read)(e,2),r=t[0],n=t[1],i=r.indexOf("/"),o=r.substring(0,i),s=r.substring(i+1);return"api"===o&&(s=s.toLowerCase()),[o,s,n].filter(function(e){return e&&e.length>0}).map(function(e){return null==e?void 0:e.replace(Un,"_")}).join("/")},kn={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Mn=function(e){function t(t){var r,n,i,o,s=this,a=function(e){if(!e.region)throw new Error("Region is missing");return(0,te.__assign)((0,te.__assign)({},e),{region:qr(e.region)})}(at(at({},Lr),t)),u=function(e){var t;return(0,te.__assign)((0,te.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Br(e):function(){return function(e){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var t,r,n,i,o;return(0,te.__generator)(this,function(s){switch(s.label){case 0:return t=e.tls,r=void 0===t||t,[4,e.region()];case 1:if(n=s.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(n)];case 2:if(!(i=(null!==(o=s.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+i)]}})})}(e)},isCustomEndpoint:!!e.endpoint})}(a),c=function(e){var t,r=this,n=Pn(e.credentials||e.credentialDefaultProvider(e)),i=e.signingEscapePath,o=void 0===i||i,s=e.systemClockOffset,a=void 0===s?e.systemClockOffset||0:s,u=e.sha256;return t=e.signer?Pn(e.signer):function(){return Pn(e.region)().then(function(t){return(0,te.__awaiter)(r,void 0,void 0,function(){return(0,te.__generator)(this,function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}})})}).then(function(t){var r=(0,te.__read)(t,2),i=r[0],s=r[1],a=i.signingRegion,c=i.signingService;return e.signingRegion=e.signingRegion||a||s,e.signingName=e.signingName||c||e.serviceId,new _n({credentials:n,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:o})})},(0,te.__assign)((0,te.__assign)({},e),{systemClockOffset:a,signingEscapePath:o,credentials:n,signer:t})}(u),l=function(e){return(0,te.__assign)((0,te.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((n=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}((r=c).maxAttempts),(0,te.__assign)((0,te.__assign)({},r),{maxAttempts:n,retryStrategy:r.retryStrategy||new Tr(n)})));return(s=e.call(this,l)||this).config=l,s.middlewareStack.use((o=s.config,{applyToStack:function(e){e.add(function(e){return function(t,r){return function(n){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var i;return(0,te.__generator)(this,function(o){return(null===(i=null==e?void 0:e.retryStrategy)||void 0===i?void 0:i.mode)&&(r.userAgent=(0,te.__spread)(r.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,n)]})})}}}(o),wr)}})),s.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return(0,te.__awaiter)(t,void 0,void 0,function(){var t,i,o,s,a;return(0,te.__generator)(this,function(u){return t=n.request,ft.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map(function(e){return e.toLowerCase()}).indexOf(Kr)&&void 0!==(s=e(i))&&(t.headers=(0,te.__assign)((0,te.__assign)({},t.headers),((a={})[Kr]=String(s),a)))),[2,r((0,te.__assign)((0,te.__assign)({},n),{request:t}))]})})}}}(e.bodyLengthChecker),Hr)}}}(s.config)),s.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var n,i;return(0,te.__generator)(this,function(o){return ft.isInstance(r.request)?(n=r.request,(void 0===(i=(e.requestHandler.metadata||{}).handlerProtocol)?"":i).indexOf("h2")>=0&&!n.headers[":authority"]?(delete n.headers.host,n.headers[":authority"]=""):n.headers.host||(n.headers.host=n.hostname),[2,t(r)]):[2,t(r)]})})}}}(e),Vr)}}}(s.config)),s.middlewareStack.use((s.config,{applyToStack:function(e){e.add(function(e,t){return function(r){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,s,a,u,c,l,f;return(0,te.__generator)(this,function(h){switch(h.label){case 0:return n=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,s=t.logger,a=t.outputFilterSensitiveLog,[4,e(r)];case 1:return u=h.sent(),s?("function"==typeof s.info&&(c=u.output,l=c.$metadata,f=(0,te.__rest)(c,["$metadata"]),s.info({clientName:n,commandName:i,input:o(r.input),output:a(f),metadata:l})),[2,u]):[2,u]}})})}},zr)}})),s.middlewareStack.use((i=s.config,{applyToStack:function(e){var t;e.add((t=i,function(e,r){return function(n){return(0,te.__awaiter)(void 0,void 0,void 0,function(){var i,o,s,a,u,c,l,f;return(0,te.__generator)(this,function(h){switch(h.label){case 0:return i=n.request,ft.isInstance(i)?(o=i.headers,s=(null===(l=null==r?void 0:r.userAgent)||void 0===l?void 0:l.map(On))||[],[4,t.defaultUserAgentProvider()]):[2,e(n)];case 1:return a=h.sent().map(On),u=(null===(f=null==t?void 0:t.customUserAgent)||void 0===f?void 0:f.map(On))||[],o["x-amz-user-agent"]=(0,te.__spread)(a,s,u).join(" "),c=(0,te.__spread)(a.filter(function(e){return e.startsWith("aws-sdk-")}),u).join(" "),"browser"!==t.runtime&&c&&(o[Tn]=o[Tn]?o[Tn]+" "+c:c),[2,e((0,te.__assign)((0,te.__assign)({},n),{request:i}))]}})})}}),kn)}})),s}return ne(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Vt),xn="aws-amplify/4.7.14",Rn={userAgent:xn+" js",product:"",navigator:null,isReactNative:!1};"undefined"!=typeof navigator&&navigator.product&&(Rn.product=navigator.product||"",Rn.navigator=navigator||null,"ReactNative"===navigator.product?(Rn.userAgent=xn+" react-native",Rn.isReactNative=!0):(Rn.userAgent=xn+" js",Rn.isReactNative=!1));var Dn=function(){return Dn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Dn.apply(this,arguments)};function Fn(e){var t=new Mn({region:e.region,customUserAgent:""+Rn.userAgent});return t.middlewareStack.add(function(e,t){return function(t){return e(function(e){return Dn(Dn({},e),{request:Dn(Dn({},e.request),{headers:Dn(Dn({},e.request.headers),{"cache-control":"no-store"})})})}(t))}},{step:"build",name:"cacheControlMiddleWare"}),t}var Nn=function(){return Nn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Nn.apply(this,arguments)},jn=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})},Ln=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Bn=new h("Credentials"),qn=function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=J.refreshGoogleToken,this._refreshHandlers.facebook=Z.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=Nn(Nn({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new _).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return Bn.debug("getting credentials"),this._pickupCredentials()},e.prototype._getCognitoIdentityIdStorageKey=function(e){return"CognitoIdentityId-"+e},e.prototype._pickupCredentials=function(){return Bn.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?Bn.debug("getting old cred promise"):(Bn.debug("getting new cred promise"),this._gettingCredPromise=O(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return jn(this,void 0,void 0,function(){var e,t,r,n,i,o,s;return Ln(this,function(a){switch(a.label){case 0:if(Bn.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return Bn.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(Bn.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(r=void 0===t?ee.Auth:t)||"function"!=typeof r.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];Bn.debug("ttl has passed but token is not yet expired"),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,r.currentUserPoolUser()];case 2:return n=a.sent(),[4,r.currentSession()];case 3:return i=a.sent(),o=i.refreshToken,[4,new Promise(function(e,t){n.refreshSession(o,function(r,n){return r?t(r):e(n)})})];case 4:return a.sent(),[3,6];case 5:return s=a.sent(),Bn.debug("Error attempting to refreshing the session",s),[3,6];case 6:return[2,r.currentUserCredentials()]}})})},e.prototype.refreshFederatedToken=function(e){Bn.debug("Getting federated credentials");var t=e.provider,r=e.user,n=e.token,i=e.identity_id,o=e.expires_at;o=1970===new Date(o).getFullYear()?1e3*o:o;var s=this;return Bn.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(Bn.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:n,user:r,identity_id:i,expires_at:o})):s._refreshHandlers[t]&&"function"==typeof s._refreshHandlers[t]?(Bn.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:s._refreshHandlers[t],provider:t,user:r})):(Bn.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t,r,n,i,o=this,s=e.refreshHandler,a=e.provider,u=e.user;return(t=s,r=[],n=1e4,void 0===n&&(n=H),function(e,t,r,n){return N(this,void 0,void 0,function(){var i=this;return j(this,function(o){if("function"!=typeof e)throw Error("functionToRetry must be a function");return[2,new Promise(function(o,s){return N(i,void 0,void 0,function(){var i,a,u,c,l,f,h;return j(this,function(d){switch(d.label){case 0:i=0,a=!1,c=function(){},n&&n.then(function(){a=!0,clearTimeout(u),c()}),f=function(){var n,f,h,d;return j(this,function(p){switch(p.label){case 0:i++,q.debug(e.name+" attempt #"+i+" with this vars: "+JSON.stringify(t)),p.label=1;case 1:return p.trys.push([1,3,,7]),n={},f=o,[4,e.apply(void 0,B(t))];case 2:return[2,(n.value=f.apply(void 0,[p.sent()]),n)];case 3:return h=p.sent(),l=h,q.debug("error on "+e.name,h),(g=h)&&g.nonRetryable?(q.debug(e.name+" non retryable error",h),[2,{value:s(h)}]):(d=r(i,t,h),q.debug(e.name+" retrying in "+d+" ms"),!1===d||a?[2,{value:s(h)}]:[3,4]);case 4:return[4,new Promise(function(e){c=e,u=setTimeout(c,d)})];case 5:p.sent(),p.label=6;case 6:return[3,7];case 7:return[2]}var g})},d.label=1;case 1:return a?[3,3]:[5,f()];case 2:return"object"==typeof(h=d.sent())?[2,h.value]:[3,1];case 3:return s(l),[2]}})})})]})})}(t,r,function(e){return void 0===e&&(e=H),function(t){var r=100*Math.pow(2,t)+100*Math.random();return!(r>e)&&r}}(n),i)).then(function(e){return Bn.debug("refresh federated token sucessfully",e),o._setCredentialsFromFederation({provider:a,token:e.token,user:u,identity_id:e.identity_id,expires_at:e.expires_at})}).catch(function(e){return"string"==typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||o.clear(),Bn.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)})},e.prototype._isExpired=function(e){if(!e)return Bn.debug("no credentials for expiration check"),!0;Bn.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return jn(this,void 0,void 0,function(){var e,t,r,n,i,o,s,a,u=this;return Ln(this,function(c){switch(c.label){case 0:return Bn.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,r=e.region,e.mandatorySignIn?[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")]:t?r?(i=this,[4,this._getGuestIdentityId()]):(Bn.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")]):(Bn.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")]);case 1:return n=i._identityId=c.sent(),o=Fn({region:r}),s=void 0,n?s=Jt({identityId:n,client:o})():(a=function(){return jn(u,void 0,void 0,function(){var e;return Ln(this,function(r){switch(r.label){case 0:return[4,o.send(new Zt({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,[2,Jt({client:o,identityId:e})()]}})})},s=a().catch(function(e){return jn(u,void 0,void 0,function(){return Ln(this,function(t){throw e})})})),[2,this._loadCredentials(s,"guest",!1,null).then(function(e){return e}).catch(function(e){return jn(u,void 0,void 0,function(){var r,i=this;return Ln(this,function(a){switch(a.label){case 0:return"ResourceNotFoundException"!==e.name||e.message!=="Identity '"+n+"' not found."?[3,2]:(Bn.debug("Failed to load guest credentials"),[4,this._removeGuestIdentityId()]);case 1:return a.sent(),r=function(){return jn(i,void 0,void 0,function(){var e;return Ln(this,function(r){switch(r.label){case 0:return[4,o.send(new Zt({IdentityPoolId:t}))];case 1:return e=r.sent().IdentityId,this._identityId=e,[2,Jt({client:o,identityId:e})()]}})})},s=r().catch(function(e){return jn(i,void 0,void 0,function(){return Ln(this,function(t){throw e})})}),[2,this._loadCredentials(s,"guest",!1,null)];case 2:return[2,e]}})})})]}})})},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,r=e.token,n=e.identity_id,i={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t;if(!i)return Promise.reject("You must specify a federated provider");var o={};o[i]=r;var s=this._config,a=s.identityPoolId,u=s.region;if(!a)return Bn.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!u)return Bn.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var c=Fn({region:u}),l=void 0;return l=n?Jt({identityId:n,logins:o,client:c})():function(e){var t=this,r=e.accountId,n=e.cache,i=void 0===n?"object"==typeof self&&self.indexedDB?new Xt:"object"==typeof window&&window.localStorage?window.localStorage:er:n,o=e.client,s=e.customRoleArn,a=e.identityPoolId,u=e.logins,c=e.userIdentifier,l=void 0===c?u&&0!==Object.keys(u).length?void 0:"ANONYMOUS":c,f=l?"aws:cognito-identity-credentials:"+a+":"+l:void 0,h=function(){return(0,te.__awaiter)(t,void 0,void 0,function(){var e,t,n,c,l,d,p,g,y;return(0,te.__generator)(this,function(v){switch(v.label){case 0:return(t=f)?[4,i.getItem(f)]:[3,2];case 1:t=v.sent(),v.label=2;case 2:return(e=t)?[3,7]:(d=(l=o).send,p=Zt.bind,y={AccountId:r,IdentityPoolId:a},u?[4,$t(u)]:[3,4]);case 3:return g=v.sent(),[3,5];case 4:g=void 0,v.label=5;case 5:return[4,d.apply(l,[new(p.apply(Zt,[void 0,(y.Logins=g,y)]))])];case 6:n=v.sent().IdentityId,c=void 0===n?function(){throw new Yt("Response from Amazon Cognito contained no identity ID")}():n,e=c,f&&Promise.resolve(i.setItem(f,e)).catch(function(){}),v.label=7;case 7:return[2,(h=Jt({client:o,customRoleArn:s,logins:u,identityId:e}))()]}})})};return function(){return h().catch(function(e){return(0,te.__awaiter)(t,void 0,void 0,function(){return(0,te.__generator)(this,function(t){throw f&&Promise.resolve(i.removeItem(f)).catch(function(){}),e})})})}}({logins:o,identityPoolId:a,client:c})(),this._loadCredentials(l,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;Bn.debug("set credentials from session");var r=e.getIdToken().getJwtToken(),n=this._config,i=n.region,o=n.userPoolId,s=n.identityPoolId;if(!s)return Bn.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!i)return Bn.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var a={};a["cognito-idp."+i+".amazonaws.com/"+o]=r;var u=Fn({region:i}),c=jn(t,void 0,void 0,function(){var e,t,r,n,i,o,c,l,f,h;return Ln(this,function(d){switch(d.label){case 0:return[4,this._getGuestIdentityId()];case 1:return(e=d.sent())?[3,3]:[4,u.send(new Zt({IdentityPoolId:s,Logins:a}))];case 2:r=d.sent().IdentityId,t=r,d.label=3;case 3:return[4,u.send(new Gt({IdentityId:e||t,Logins:a}))];case 4:return n=d.sent(),i=n.Credentials,o=i.AccessKeyId,c=i.Expiration,l=i.SecretKey,f=i.SessionToken,h=n.IdentityId,this._identityId=h,e?(Bn.debug("The guest identity "+e+" has been successfully linked to the logins"),e===h&&Bn.debug("The guest identity "+e+" has become the primary identity"),[4,this._removeGuestIdentityId()]):[3,6];case 5:d.sent(),d.label=6;case 6:return[2,{accessKeyId:o,secretAccessKey:l,sessionToken:f,expiration:c,identityId:h}]}})}).catch(function(e){return jn(t,void 0,void 0,function(){return Ln(this,function(t){throw e})})});return this._loadCredentials(c,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,r,n){var i=this,o=this;return new Promise(function(s,a){e.then(function(e){return jn(i,void 0,void 0,function(){var i,a,u,c,l;return Ln(this,function(f){switch(f.label){case 0:if(Bn.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),o._credentials=e,o._credentials.authenticated=r,o._credentials_source=t,o._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){i=Object.assign({id:this._credentials.identityId},n.user),a=n.provider,u=n.token,c=n.expires_at,l=n.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:a,token:u,user:i,expires_at:c,identity_id:l}))}catch(e){Bn.debug("Failed to put federated info into auth storage",e)}}return"guest"!==t?[3,2]:[4,this._setGuestIdentityId(e.identityId)];case 1:f.sent(),f.label=2;case 2:return s(o._credentials),[2]}})})}).catch(function(t){if(t)return Bn.debug("Failed to load credentials",e),Bn.debug("Error loading credentials",t),void a(t)})})},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(Bn.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return jn(this,void 0,void 0,function(){return Ln(this,function(e){return this._credentials=null,this._credentials_source=null,Bn.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]})})},e.prototype._getGuestIdentityId=function(){return jn(this,void 0,void 0,function(){var e,t;return Ln(this,function(r){switch(r.label){case 0:e=this._config.identityPoolId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),[2,this._storage.getItem(this._getCognitoIdentityIdStorageKey(e))];case 3:return t=r.sent(),Bn.debug("Failed to get the cached guest identityId",t),[3,4];case 4:return[2]}})})},e.prototype._setGuestIdentityId=function(e){return jn(this,void 0,void 0,function(){var t,r;return Ln(this,function(n){switch(n.label){case 0:t=this._config.identityPoolId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),this._storage.setItem(this._getCognitoIdentityIdStorageKey(t),e),[3,4];case 3:return r=n.sent(),Bn.debug("Failed to cache guest identityId",r),[3,4];case 4:return[2]}})})},e.prototype._removeGuestIdentityId=function(){return jn(this,void 0,void 0,function(){var e;return Ln(this,function(t){return e=this._config.identityPoolId,Bn.debug("removing "+this._getCognitoIdentityIdStorageKey(e)+" from storage"),this._storage.removeItem(this._getCognitoIdentityIdStorageKey(e)),[2]})})},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}(),Kn=new qn(null);ee.register(Kn);var Hn=function(){return Hn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Hn.apply(this,arguments)},Vn=new h("Parser"),zn=function(e){var t,r={};if(e.aws_mobile_analytics_app_id){var n={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};r.Analytics=n}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(r.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in,signUpVerificationMethod:e.aws_cognito_sign_up_verification_method||"code"}),t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},e.Logging&&(r.Logging=Hn(Hn({},e.Logging),{region:e.aws_project_region})),e.geo&&(r.Geo=Object.assign({},e.geo),e.geo.amazon_location_service&&(r.Geo={AmazonLocationService:e.geo.amazon_location_service})),r.Analytics=Object.assign({},r.Analytics,e.Analytics),r.Auth=Object.assign({},r.Auth,e.Auth),r.Storage=Object.assign({},t),r.Logging=Object.assign({},r.Logging,e.Logging),Vn.debug("parse config",e,"to amplifyconfig",r),r},Wn=function(){function e(){}return e.parseMobilehubConfig=zn,e}(),Gn=r(19909);function Yn(e,t){void 0===t&&(t={});var r=function(e){return e&&"j"===e[0]&&":"===e[1]?e.substr(2):e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(r,t.doNotParse))try{return JSON.parse(r)}catch(e){}return e}var $n=function(){return $n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$n.apply(this,arguments)},Jn=function(){function e(e,t){var r=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?Gn.q(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise(function(){r.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie}).catch(function(){})}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=Gn.q(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,r){return void 0===t&&(t={}),this._updateBrowserValues(r),Yn(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var r={};for(var n in this.cookies)r[n]=Yn(this.cookies[n],e);return r},e.prototype.set=function(e,t,r){var n;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=$n($n({},this.cookies),((n={})[e]=t,n)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=Gn.l(e,t,r)),this._emitChange({name:e,value:t,options:r})},e.prototype.remove=function(e,t){var r=t=$n($n({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=$n({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=Gn.l(e,"",r)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}();const Zn=Jn;var Qn,Xn=M().isBrowser,ei=function(){function e(e){void 0===e&&(e={}),this.cookies=new Zn,this.store=Xn?window.localStorage:Object.create(null),this.cookies=e.req?new Zn(e.req.headers.cookie):new Zn,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map(function(t,r){return e.key(r)}).forEach(function(t){return e.removeItem(t)})},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){switch(this.setLocalItem(e,t),e.split(".").pop()){case"LastAuthUser":case"accessToken":case"refreshToken":case"idToken":Xn?this.setUniversalItem(e,t):this.setLocalItem(e,t)}},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t){this.cookies.set(e,t,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},e}(),ti=function(){function e(e){var t=e||{},r=t.ValidationData,n=t.Username,i=t.Password,o=t.AuthParameters,s=t.ClientMetadata;this.validationData=r||{},this.authParameters=o||{},this.clientMetadata=s||{},this.username=n,this.password=i}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),ri=r(48287),ni=r(19021),ii=r.n(ni),oi=(r(6440),r(63009)),si=r.n(oi),ai=r(3793),ui=r.n(ai);if("undefined"!=typeof window&&window.crypto&&(Qn=window.crypto),!Qn&&"undefined"!=typeof window&&window.msCrypto&&(Qn=window.msCrypto),!Qn&&void 0!==r.g&&r.g.crypto&&(Qn=r.g.crypto),!Qn)try{Qn=r(45682)}catch(e){}function ci(){if(Qn){if("function"==typeof Qn.getRandomValues)try{return Qn.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof Qn.randomBytes)try{return Qn.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")}var li=function(){function e(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length}var t=e.prototype;return t.random=function(t){for(var r=[],n=0;n<t;n+=4)r.push(ci());return new e(r,t)},t.toString=function(){return function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;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("")}(this)},e}();const fi=hi;function hi(e,t){null!=e&&this.fromString(e,t)}function di(){return new hi(null)}var pi,gi="undefined"!=typeof navigator;gi&&"Microsoft Internet Explorer"==navigator.appName?(hi.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=a*u+c*s;i=((u=s*u+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),r[n++]=1073741823&u}return i},pi=30):gi&&"Netscape"!=navigator.appName?(hi.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},pi=26):(hi.prototype.am=function(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+a*c,r[n++]=268435455&u}return i},pi=28),hi.prototype.DB=pi,hi.prototype.DM=(1<<pi)-1,hi.prototype.DV=1<<pi,hi.prototype.FV=Math.pow(2,52),hi.prototype.F1=52-pi,hi.prototype.F2=2*pi-52;var yi,vi,mi=new Array;for(yi="0".charCodeAt(0),vi=0;vi<=9;++vi)mi[yi++]=vi;for(yi="a".charCodeAt(0),vi=10;vi<36;++vi)mi[yi++]=vi;for(yi="A".charCodeAt(0),vi=10;vi<36;++vi)mi[yi++]=vi;function wi(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function bi(e,t){var r=mi[e.charCodeAt(t)];return null==r?-1:r}function Si(e){var t=di();return t.fromInt(e),t}function _i(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function Ai(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function Ei(e){return ri.hp.from((new li).random(e).toString(),"hex")}Ai.prototype.convert=function(e){var t=di();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(hi.ZERO)>0&&this.m.subTo(t,t),t},Ai.prototype.revert=function(e){var t=di();return e.copyTo(t),this.reduce(t),t},Ai.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},Ai.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},Ai.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},hi.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},hi.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},hi.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var s=bi(e,n);s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}this.clamp(),i&&hi.ZERO.subTo(this,this)},hi.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},hi.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},hi.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},hi.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},hi.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&o)<<i,t[s-r]=this[s]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},hi.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},hi.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i<n.t;++i)t[i+r.t]=r.am(0,n[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&hi.ZERO.subTo(t,t)},hi.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},hi.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=di());var o=di(),s=this.s,a=e.s,u=this.DB-_i(n[n.t-1]);u>0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,l=o[c-1];if(0!=l){var f=l*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),h=this.FV/f,d=(1<<this.F1)/f,p=1<<this.F2,g=r.t,y=g-c,v=null==t?di():t;for(o.dlShiftTo(y,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),hi.ONE.dlShiftTo(c,v),v.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--y>=0;){var m=r[--g]==l?this.DM:Math.floor(r[g]*h+(r[g-1]+p)*d);if((r[g]+=o.am(0,m,r,y,0,c))<m)for(o.dlShiftTo(y,v),r.subTo(v,r);r[g]<--m;)r.subTo(v,r)}null!=t&&(r.drShiftTo(c,t),s!=a&&hi.ZERO.subTo(t,t)),r.t=c,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&hi.ZERO.subTo(r,r)}}},hi.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},hi.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},hi.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var r,n=(1<<t)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=wi(r));s>=0;)a<t?(r=(this[s]&(1<<a)-1)<<t-a,r|=this[--s]>>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=wi(r));return i?o:"0"},hi.prototype.negate=function(){var e=di();return hi.ZERO.subTo(this,e),e},hi.prototype.abs=function(){return this.s<0?this.negate():this},hi.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},hi.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+_i(this[this.t-1]^this.s&this.DM)},hi.prototype.mod=function(e){var t=di();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(hi.ZERO)>0&&e.subTo(t,t),t},hi.prototype.equals=function(e){return 0==this.compareTo(e)},hi.prototype.add=function(e){var t=di();return this.addTo(e,t),t},hi.prototype.subtract=function(e){var t=di();return this.subTo(e,t),t},hi.prototype.multiply=function(e){var t=di();return this.multiplyTo(e,t),t},hi.prototype.divide=function(e){var t=di();return this.divRemTo(e,t,null),t},hi.prototype.modPow=function(e,t,r){var n,i=e.bitLength(),o=Si(1),s=new Ai(t);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6;var a=new Array,u=3,c=n-1,l=(1<<n)-1;if(a[1]=s.convert(this),n>1){var f=di();for(s.sqrTo(a[1],f);u<=l;)a[u]=di(),s.mulTo(f,a[u-2],a[u]),u+=2}var h,d,p=e.t-1,g=!0,y=di();for(i=_i(e[p])-1;p>=0;){for(i>=c?h=e[p]>>i-c&l:(h=(e[p]&(1<<i+1)-1)<<c-i,p>0&&(h|=e[p-1]>>this.DB+i-c)),u=n;!(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),g)a[h].copyTo(o),g=!1;else{for(;u>1;)s.sqrTo(o,y),s.sqrTo(y,o),u-=2;u>0?s.sqrTo(o,y):(d=o,o=y,y=d),s.mulTo(y,a[h],o)}for(;p>=0&&!(e[p]&1<<i);)s.sqrTo(o,y),d=o,o=y,y=d,--i<0&&(i=this.DB-1,--p)}var v=s.revert(o);return r(null,v),v},hi.ZERO=Si(0),hi.ONE=Si(1);var Ii=/^[89a-f]/i,Ci=function(){function e(e){this.N=new fi("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),this.g=new fi("2",16),this.k=new fi(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue(function(){}),this.infoBits=ri.hp.from("Caldera Derived Key","utf8"),this.poolName=e}var t=e.prototype;return t.getSmallAValue=function(){return this.smallAValue},t.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,function(r,n){r&&e(r,null),t.largeAValue=n,e(null,t.largeAValue)})},t.generateRandomSmallA=function(){var e=Ei(128).toString("hex");return new fi(e,16)},t.generateRandomString=function(){return Ei(40).toString("base64")},t.getRandomPassword=function(){return this.randomPassword},t.getSaltDevices=function(){return this.SaltToHashDevices},t.getVerifierDevices=function(){return this.verifierDevices},t.generateHashDevice=function(e,t,r){var n=this;this.randomPassword=this.generateRandomString();var i=""+e+t+":"+this.randomPassword,o=this.hash(i),s=Ei(16).toString("hex");this.SaltToHashDevices=this.padHex(new fi(s,16)),this.g.modPow(new fi(this.hexHash(this.SaltToHashDevices+o),16),this.N,function(e,t){e&&r(e,null),n.verifierDevices=n.padHex(t),r(null,null)})},t.calculateA=function(e,t){var r=this;this.g.modPow(e,this.N,function(e,n){e&&t(e,null),n.mod(r.N).equals(fi.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,n)})},t.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new fi(this.UHexHash,16)},t.hash=function(e){var t=e instanceof ri.hp?ii().lib.WordArray.create(e):e,r=si()(t).toString();return new Array(64-r.length).join("0")+r},t.hexHash=function(e){return this.hash(ri.hp.from(e,"hex"))},t.computehkdf=function(e,t){var r=ii().lib.WordArray.create(ri.hp.concat([this.infoBits,ri.hp.from(String.fromCharCode(1),"utf8")])),n=e instanceof ri.hp?ii().lib.WordArray.create(e):e,i=t instanceof ri.hp?ii().lib.WordArray.create(t):t,o=ui()(n,i),s=ui()(r,o);return ri.hp.from(s.toString(),"hex").slice(0,16)},t.getPasswordAuthenticationKey=function(e,t,r,n,i){var o=this;if(r.mod(this.N).equals(fi.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,r),this.UValue.equals(fi.ZERO))throw new Error("U cannot be zero.");var s=""+this.poolName+e+":"+t,a=this.hash(s),u=new fi(this.hexHash(this.padHex(n)+a),16);this.calculateS(u,r,function(e,t){e&&i(e,null);var r=o.computehkdf(ri.hp.from(o.padHex(t),"hex"),ri.hp.from(o.padHex(o.UValue),"hex"));i(null,r)})},t.calculateS=function(e,t,r){var n=this;this.g.modPow(e,this.N,function(i,o){i&&r(i,null),t.subtract(n.k.multiply(o)).modPow(n.smallAValue.add(n.UValue.multiply(e)),n.N,function(e,t){e&&r(e,null),r(null,t.mod(n.N))})})},t.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return"userAttributes."},t.padHex=function(e){if(!(e instanceof fi))throw new Error("Not a BigInteger");var t=e.compareTo(fi.ZERO)<0,r=e.abs().toString(16);if(r=r.length%2!=0?"0"+r:r,r=Ii.test(r)?"00"+r:r,t){var n=r.split("").map(function(e){var t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join("");(r=new fi(n,16).add(fi.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(r=r.substring(2))}return r},e}(),Pi=function(){function e(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var t=e.prototype;return t.getJwtToken=function(){return this.jwtToken},t.getExpiration=function(){return this.payload.exp},t.getIssuedAt=function(){return this.payload.iat},t.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(ri.hp.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();function Ti(e,t){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ti(e,t)}var Ui=function(e){var t,r;function n(t){var r=(void 0===t?{}:t).AccessToken;return e.call(this,r||"")||this}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,Ti(t,r),n}(Pi);function Oi(e,t){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oi(e,t)}var ki=function(e){var t,r;function n(t){var r=(void 0===t?{}:t).IdToken;return e.call(this,r||"")||this}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,Oi(t,r),n}(Pi),Mi=function(){function e(e){var t=(void 0===e?{}:e).RefreshToken;this.token=t||""}return e.prototype.getToken=function(){return this.token},e}(),xi=r(80754),Ri=r.n(xi),Di=function(){function e(e){var t=void 0===e?{}:e,r=t.IdToken,n=t.RefreshToken,i=t.AccessToken,o=t.ClockDrift;if(null==i||null==r)throw new Error("Id token and Access Token must be present.");this.idToken=r,this.refreshToken=n,this.accessToken=i,this.clockDrift=void 0===o?this.calculateClockDrift():o}var t=e.prototype;return t.getIdToken=function(){return this.idToken},t.getRefreshToken=function(){return this.refreshToken},t.getAccessToken=function(){return this.accessToken},t.getClockDrift=function(){return this.clockDrift},t.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},t.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}(),Fi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ni=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ji=function(){function e(){}return e.prototype.getNowString=function(){var e=new Date,t=Ni[e.getUTCDay()],r=Fi[e.getUTCMonth()],n=e.getUTCDate(),i=e.getUTCHours();i<10&&(i="0"+i);var o=e.getUTCMinutes();o<10&&(o="0"+o);var s=e.getUTCSeconds();return s<10&&(s="0"+s),t+" "+r+" "+n+" "+i+":"+o+":"+s+" UTC "+e.getUTCFullYear()},e}(),Li=function(){function e(e){var t=void 0===e?{}:e,r=t.Name,n=t.Value;this.Name=r||"",this.Value=n||""}var t=e.prototype;return t.getValue=function(){return this.Value},t.setValue=function(e){return this.Value=e,this},t.getName=function(){return this.Name},t.setName=function(e){return this.Name=e,this},t.toString=function(){return JSON.stringify(this)},t.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}(),Bi={},qi=function(){function e(){}return e.setItem=function(e,t){return Bi[e]=t,Bi[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(Bi,e)?Bi[e]:void 0},e.removeItem=function(e){return delete Bi[e]},e.clear=function(){return Bi={}},e}(),Ki=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=qi}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),Hi="undefined"!=typeof navigator?navigator.userAgent:"nodejs",Vi=function(){function e(e){if(null==e||null==e.Username||null==e.Pool)throw new Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||(new Ki).getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var t=e.prototype;return t.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},t.getSignInUserSession=function(){return this.signInUserSession},t.getUsername=function(){return this.username},t.getAuthenticationFlowType=function(){return this.authenticationFlowType},t.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},t.initiateAuth=function(e,t){var r=this,n=e.getAuthParameters();n.USERNAME=this.username;var i=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),o={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:i};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",o,function(e,n){if(e)return t.onFailure(e);var i=n.ChallengeName,o=n.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(r.Session=n.Session,t.customChallenge(o)):(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),t.onSuccess(r.signInUserSession))})},t.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invalid."))},t.authenticateUserDefaultAuth=function(e,t){var r,n,i=this,o=new Ci(this.pool.getUserPoolName()),s=new ji,a={};null!=this.deviceKey&&(a.DEVICE_KEY=this.deviceKey),a.USERNAME=this.username,o.getLargeAValue(function(u,c){u&&t.onFailure(u),a.SRP_A=c.toString(16),"CUSTOM_AUTH"===i.authenticationFlowType&&(a.CHALLENGE_NAME="SRP_A");var l=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),f={AuthFlow:i.authenticationFlowType,ClientId:i.pool.getClientId(),AuthParameters:a,ClientMetadata:l};i.getUserContextData(i.username)&&(f.UserContextData=i.getUserContextData(i.username)),i.client.request("InitiateAuth",f,function(a,u){if(a)return t.onFailure(a);var c=u.ChallengeParameters;i.username=c.USER_ID_FOR_SRP,i.userDataKey=i.keyPrefix+"."+i.username+".userData",r=new fi(c.SRP_B,16),n=new fi(c.SALT,16),i.getCachedDeviceKeyAndPassword(),o.getPasswordAuthenticationKey(i.username,e.getPassword(),r,n,function(e,r){e&&t.onFailure(e);var n=s.getNowString(),a=ii().lib.WordArray.create(ri.hp.concat([ri.hp.from(i.pool.getUserPoolName(),"utf8"),ri.hp.from(i.username,"utf8"),ri.hp.from(c.SECRET_BLOCK,"base64"),ri.hp.from(n,"utf8")])),f=ii().lib.WordArray.create(r),h=Ri().stringify(ui()(a,f)),d={};d.USERNAME=i.username,d.PASSWORD_CLAIM_SECRET_BLOCK=c.SECRET_BLOCK,d.TIMESTAMP=n,d.PASSWORD_CLAIM_SIGNATURE=h,null!=i.deviceKey&&(d.DEVICE_KEY=i.deviceKey);var p={ChallengeName:"PASSWORD_VERIFIER",ClientId:i.pool.getClientId(),ChallengeResponses:d,Session:u.Session,ClientMetadata:l};i.getUserContextData()&&(p.UserContextData=i.getUserContextData()),function e(t,r){return i.client.request("RespondToAuthChallenge",t,function(n,o){return n&&"ResourceNotFoundException"===n.code&&-1!==n.message.toLowerCase().indexOf("device")?(d.DEVICE_KEY=null,i.deviceKey=null,i.randomPassword=null,i.deviceGroupKey=null,i.clearCachedDeviceKeyAndPassword(),e(t,r)):r(n,o)})}(p,function(e,r){return e?t.onFailure(e):i.authenticateUserInternal(r,o,t)})})})})},t.authenticateUserPlainUsernamePassword=function(e,t){var r=this,n={};if(n.USERNAME=this.username,n.PASSWORD=e.getPassword(),n.PASSWORD){var i=new Ci(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(n.DEVICE_KEY=this.deviceKey);var o=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),s={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:o};this.getUserContextData(this.username)&&(s.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",s,function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,i,t)})}else t.onFailure(new Error("PASSWORD parameter is required"))},t.authenticateUserInternal=function(e,t,r){var n=this,i=e.ChallengeName,o=e.ChallengeParameters;if("SMS_MFA"===i)return this.Session=e.Session,r.mfaRequired(i,o);if("SELECT_MFA_TYPE"===i)return this.Session=e.Session,r.selectMFAType(i,o);if("MFA_SETUP"===i)return this.Session=e.Session,r.mfaSetup(i,o);if("SOFTWARE_TOKEN_MFA"===i)return this.Session=e.Session,r.totpRequired(i,o);if("CUSTOM_CHALLENGE"===i)return this.Session=e.Session,r.customChallenge(o);if("NEW_PASSWORD_REQUIRED"===i){this.Session=e.Session;var s=null,a=null,u=[],c=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(o&&(s=JSON.parse(e.ChallengeParameters.userAttributes),a=JSON.parse(e.ChallengeParameters.requiredAttributes)),a)for(var l=0;l<a.length;l++)u[l]=a[l].substr(c.length);return r.newPasswordRequired(s,u)}if("DEVICE_SRP_AUTH"===i)return this.Session=e.Session,void this.getDeviceResponse(r);this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=i,this.cacheTokens();var f=e.AuthenticationResult.NewDeviceMetadata;if(null==f)return r.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(i){if(i)return r.onFailure(i);var o={Salt:ri.hp.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:ri.hp.from(t.getVerifierDevices(),"hex").toString("base64")};n.verifierDevices=o.PasswordVerifier,n.deviceGroupKey=f.DeviceGroupKey,n.randomPassword=t.getRandomPassword(),n.client.request("ConfirmDevice",{DeviceKey:f.DeviceKey,AccessToken:n.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:o,DeviceName:Hi},function(t,i){return t?r.onFailure(t):(n.deviceKey=e.AuthenticationResult.NewDeviceMetadata.DeviceKey,n.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary?r.onSuccess(n.signInUserSession,i.UserConfirmationNecessary):r.onSuccess(n.signInUserSession))})})},t.completeNewPasswordChallenge=function(e,t,r,n){var i=this;if(!e)return r.onFailure(new Error("New password is required."));var o=new Ci(this.pool.getUserPoolName()),s=o.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach(function(e){a[s+e]=t[e]}),a.NEW_PASSWORD=e,a.USERNAME=this.username;var u={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,function(e,t){return e?r.onFailure(e):i.authenticateUserInternal(t,o,r)})},t.getDeviceResponse=function(e,t){var r=this,n=new Ci(this.deviceGroupKey),i=new ji,o={};o.USERNAME=this.username,o.DEVICE_KEY=this.deviceKey,n.getLargeAValue(function(s,a){s&&e.onFailure(s),o.SRP_A=a.toString(16);var u={ChallengeName:"DEVICE_SRP_AUTH",ClientId:r.pool.getClientId(),ChallengeResponses:o,ClientMetadata:t,Session:r.Session};r.getUserContextData()&&(u.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",u,function(t,o){if(t)return e.onFailure(t);var s=o.ChallengeParameters,a=new fi(s.SRP_B,16),u=new fi(s.SALT,16);n.getPasswordAuthenticationKey(r.deviceKey,r.randomPassword,a,u,function(t,n){if(t)return e.onFailure(t);var a=i.getNowString(),u=ii().lib.WordArray.create(ri.hp.concat([ri.hp.from(r.deviceGroupKey,"utf8"),ri.hp.from(r.deviceKey,"utf8"),ri.hp.from(s.SECRET_BLOCK,"base64"),ri.hp.from(a,"utf8")])),c=ii().lib.WordArray.create(n),l=Ri().stringify(ui()(u,c)),f={};f.USERNAME=r.username,f.PASSWORD_CLAIM_SECRET_BLOCK=s.SECRET_BLOCK,f.TIMESTAMP=a,f.PASSWORD_CLAIM_SIGNATURE=l,f.DEVICE_KEY=r.deviceKey;var h={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:r.pool.getClientId(),ChallengeResponses:f,Session:o.Session};r.getUserContextData()&&(h.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",h,function(t,n){return t?e.onFailure(t):(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),e.onSuccess(r.signInUserSession))})})})})},t.confirmRegistration=function(e,t,r,n){var i={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t,ClientMetadata:n};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",i,function(e){return e?r(e,null):r(null,"SUCCESS")})},t.sendCustomChallengeAnswer=function(e,t,r){var n=this,i={};i.USERNAME=this.username,i.ANSWER=e;var o=new Ci(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(i.DEVICE_KEY=this.deviceKey);var s={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:i,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,o,t)})},t.sendMFACode=function(e,t,r,n){var i=this,o={};o.USERNAME=this.username,o.SMS_MFA_CODE=e;var s=r||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===s&&(o.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(o.DEVICE_KEY=this.deviceKey);var a={ChallengeName:s,ChallengeResponses:o,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(a.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",a,function(e,r){if(e)return t.onFailure(e);if("DEVICE_SRP_AUTH"!==r.ChallengeName){if(i.signInUserSession=i.getCognitoUserSession(r.AuthenticationResult),i.cacheTokens(),null==r.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(i.signInUserSession);var n=new Ci(i.pool.getUserPoolName());n.generateHashDevice(r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,r.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(e){if(e)return t.onFailure(e);var o={Salt:ri.hp.from(n.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:ri.hp.from(n.getVerifierDevices(),"hex").toString("base64")};i.verifierDevices=o.PasswordVerifier,i.deviceGroupKey=r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,i.randomPassword=n.getRandomPassword(),i.client.request("ConfirmDevice",{DeviceKey:r.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:i.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:o,DeviceName:Hi},function(e,n){return e?t.onFailure(e):(i.deviceKey=r.AuthenticationResult.NewDeviceMetadata.DeviceKey,i.cacheDeviceKeyAndPassword(),!0===n.UserConfirmationNecessary?t.onSuccess(i.signInUserSession,n.UserConfirmationNecessary):t.onSuccess(i.signInUserSession))})})}else i.getDeviceResponse(t)})},t.changePassword=function(e,t,r,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},function(e){return e?r(e,null):r(null,"SUCCESS")})},t.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];t.push({DeliveryMedium:"SMS",AttributeName:"phone_number"}),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},t.setUserMfaPreference=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?r(e,null):r(null,"SUCCESS")})},t.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("SetUserSettings",{MFAOptions:[],AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},t.deleteUser=function(e,t){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:t},function(t){return t?e(t,null):(r.clearCachedUser(),e(null,"SUCCESS"))})},t.updateAttributes=function(e,t,r){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:r},function(e){return e?t(e,null):n.getUserData(function(){return t(null,"SUCCESS")},{bypassCache:!0})})},t.getUserAttributes=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){if(t)return e(t,null);for(var n=[],i=0;i<r.UserAttributes.length;i++){var o={Name:r.UserAttributes[i].Name,Value:r.UserAttributes[i].Value},s=new Li(o);n.push(s)}return e(null,n)})},t.getMFAOptions=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){return t?e(t,null):e(null,r.MFAOptions)})},t.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},t.refreshSessionIfPossible=function(e){var t=this;return void 0===e&&(e={}),new Promise(function(r){var n=t.signInUserSession.getRefreshToken();n&&n.getToken()?t.refreshSession(n,r,e.clientMetadata):r()})},t.getUserData=function(e,t){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var n=this.getUserDataFromCache();if(n)if(this.isFetchUserDataAndTokenRequired(t))this.fetchUserData().then(function(e){return r.refreshSessionIfPossible(t).then(function(){return e})}).then(function(t){return e(null,t)}).catch(e);else try{return void e(null,JSON.parse(n))}catch(t){return this.clearCachedUserData(),void e(t,null)}else this.fetchUserData().then(function(t){e(null,t)}).catch(e)},t.getUserDataFromCache=function(){return this.storage.getItem(this.userDataKey)},t.isFetchUserDataAndTokenRequired=function(e){var t=(e||{}).bypassCache;return void 0!==t&&t},t.fetchUserData=function(){var e=this;return this.createGetUserRequest().then(function(t){return e.cacheUserData(t),t})},t.deleteAttributes=function(e,t){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?t(e,null):r.getUserData(function(){return t(null,"SUCCESS")},{bypassCache:!0})})},t.resendConfirmationCode=function(e,t){var r={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.client.request("ResendConfirmationCode",r,function(t,r){return t?e(t,null):e(null,r)})},t.getSession=function(e,t){if(void 0===t&&(t={}),null==this.username)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var r="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=r+".idToken",i=r+".accessToken",o=r+".refreshToken",s=r+".clockDrift";if(this.storage.getItem(n)){var a=new ki({IdToken:this.storage.getItem(n)}),u=new Ui({AccessToken:this.storage.getItem(i)}),c=new Mi({RefreshToken:this.storage.getItem(o)}),l=parseInt(this.storage.getItem(s),0)||0,f=new Di({IdToken:a,AccessToken:u,RefreshToken:c,ClockDrift:l});if(f.isValid())return this.signInUserSession=f,e(null,this.signInUserSession);if(!c.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(c,e,t.clientMetadata)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},t.refreshSession=function(e,t,r){var n=this,i=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(t):t,o={};o.REFRESH_TOKEN=e.getToken();var s="CognitoIdentityServiceProvider."+this.pool.getClientId(),a=s+".LastAuthUser";if(this.storage.getItem(a)){this.username=this.storage.getItem(a);var u=s+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(u),o.DEVICE_KEY=this.deviceKey}var c={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:o,ClientMetadata:r};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",c,function(t,r){if(t)return"NotAuthorizedException"===t.code&&n.clearCachedUser(),i(t,null);if(r){var o=r.AuthenticationResult;return Object.prototype.hasOwnProperty.call(o,"RefreshToken")||(o.RefreshToken=e.getToken()),n.signInUserSession=n.getCognitoUserSession(o),n.cacheTokens(),i(null,n.signInUserSession)}})},t.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",i=e+"."+this.username+".clockDrift",o=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(i,""+this.signInUserSession.getClockDrift()),this.storage.setItem(o,this.username)},t.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},t.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},t.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()},t.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(r,this.randomPassword),this.storage.setItem(n,this.deviceGroupKey)},t.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(r),this.deviceGroupKey=this.storage.getItem(n))},t.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n)},t.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",i=e+".LastAuthUser",o=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n),this.storage.removeItem(i),this.storage.removeItem(o)},t.getCognitoUserSession=function(e){var t=new ki(e),r=new Ui(e),n=new Mi(e);return new Di({IdToken:t,AccessToken:r,RefreshToken:n})},t.forgotPassword=function(e,t){var r={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.getUserContextData()&&(r.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",r,function(t,r){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(r):e.onSuccess(r)})},t.confirmPassword=function(e,t,r,n){var i={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t,ClientMetadata:n};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",i,function(e){return e?r.onFailure(e):r.onSuccess("SUCCESS")})},t.getAttributeVerificationCode=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:r},function(e,r){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(r):t.onSuccess("SUCCESS")})},t.verifyAttribute=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?r.onFailure(e):r.onSuccess("SUCCESS")})},t.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},function(t,r){return t?e.onFailure(t):e.onSuccess(r)})},t.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")})},t.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(r){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(r)}})},t.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},t.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},t.listDevices=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(new Error("User is not authenticated"));var n={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};t&&(n.PaginationToken=t),this.client.request("ListDevices",n,function(e,t){return e?r.onFailure(e):r.onSuccess(t)})},t.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(r){return r?e.onFailure(r):(t.clearCachedUser(),e.onSuccess("SUCCESS"))})},t.signOut=function(e){var t=this;e&&"function"==typeof e?this.getSession(function(r,n){if(r)return e(r);t.revokeTokens(function(r){t.cleanClientData(),e(r)})}):this.cleanClientData()},t.revokeTokens=function(e){if(void 0===e&&(e=function(){}),"function"!=typeof e)throw new Error("Invalid revokeTokenCallback. It should be a function.");if(!this.signInUserSession)return e(new Error("User is not authenticated"));if(!this.signInUserSession.getAccessToken())return e(new Error("No Access token available"));var t=this.signInUserSession.getRefreshToken().getToken(),r=this.signInUserSession.getAccessToken();if(this.isSessionRevocable(r)&&t)return this.revokeToken({token:t,callback:e});e()},t.isSessionRevocable=function(e){if(e&&"function"==typeof e.decodePayload)try{return!!e.decodePayload().origin_jti}catch(e){}return!1},t.cleanClientData=function(){this.signInUserSession=null,this.clearCachedUser()},t.revokeToken=function(e){var t=e.token,r=e.callback;this.client.requestWithRetry("RevokeToken",{Token:t,ClientId:this.pool.getClientId()},function(e){if(e)return r(e);r()})},t.sendMFASelectionAnswer=function(e,t){var r=this,n={};n.USERNAME=this.username,n.ANSWER=e;var i={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:n,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,function(n,i){return n?t.onFailure(n):(r.Session=i.Session,"SMS_MFA"===e?t.mfaRequired(i.ChallengeName,i.ChallengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(i.ChallengeName,i.ChallengeParameters):void 0)})},t.getUserContextData=function(){return this.pool.getUserContextData(this.username)},t.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){return t?e.onFailure(t):e.associateSecretCode(r.SecretCode)}):this.client.request("AssociateSoftwareToken",{Session:this.Session},function(r,n){return r?e.onFailure(r):(t.Session=n.Session,e.associateSecretCode(n.SecretCode))})},t.verifySoftwareToken=function(e,t,r){var n=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},function(e,t){return e?r.onFailure(e):r.onSuccess(t)}):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},function(e,t){if(e)return r.onFailure(e);n.Session=t.Session;var i={};i.USERNAME=n.username;var o={ChallengeName:"MFA_SETUP",ClientId:n.pool.getClientId(),ChallengeResponses:i,Session:n.Session};n.getUserContextData()&&(o.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",o,function(e,t){return e?r.onFailure(e):(n.signInUserSession=n.getCognitoUserSession(t.AuthenticationResult),n.cacheTokens(),r.onSuccess(n.signInUserSession))})})},e}(),zi=(r(50916),"aws-amplify/5.0.4"),Wi={userAgent:zi+" js",product:"",navigator:null,isReactNative:!1};function Gi(){}"undefined"!=typeof navigator&&navigator.product&&(Wi.product=navigator.product||"",Wi.navigator=navigator||null,"ReactNative"===navigator.product?(Wi.userAgent=zi+" react-native",Wi.isReactNative=!0):(Wi.userAgent=zi+" js",Wi.isReactNative=!1)),Gi.prototype.userAgent=Wi.userAgent;var Yi=function(e){e&&(Gi.prototype.userAgent&&!Gi.prototype.userAgent.includes(e)&&(Gi.prototype.userAgent=Gi.prototype.userAgent.concat(" ",e)),Gi.prototype.userAgent&&""!==Gi.prototype.userAgent||(Gi.prototype.userAgent=e))};const $i=Gi;function Ji(e){var t="function"==typeof Map?new Map:void 0;return Ji=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Zi(e,arguments,Xi(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Qi(n,e)},Ji(e)}function Zi(e,t,r){return Zi=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Qi(i,r.prototype),i},Zi.apply(null,arguments)}function Qi(e,t){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qi(e,t)}function Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xi(e)}var eo=function(e){function t(t,r,n,i){var o;return(o=e.call(this,t)||this).code=r,o.name=n,o.statusCode=i,o}return n=e,(r=t).prototype=Object.create(n.prototype),r.prototype.constructor=r,Qi(r,n),t;var r,n}(Ji(Error)),to=function(){function e(e,t,r){this.endpoint=t||"https://cognito-idp."+e+".amazonaws.com/";var n=(r||{}).credentials;this.fetchOptions=n?{credentials:n}:{}}var t=e.prototype;return t.promisifyRequest=function(e,t){var r=this;return new Promise(function(n,i){r.request(e,t,function(e,t){e?i(new eo(e.message,e.code,e.name,e.statusCode)):n(t)})})},t.requestWithRetry=function(e,t,r){var n,i,o=this;(n=[t],i=5e3,void 0===i&&(i=oo),io(function(t){return new Promise(function(r,n){o.request(e,t,function(e,t){e?n(e):r(t)})})},n,function(e){return function(t){var r=100*Math.pow(2,t)+100*Math.random();return!(r>e)&&r}}(i))).then(function(e){return r(null,e)}).catch(function(e){return r(e)})},t.request=function(e,t,r){var n,i={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":$i.prototype.userAgent,"Cache-Control":"no-store"},o=Object.assign({},this.fetchOptions,{headers:i,method:"POST",mode:"cors",body:JSON.stringify(t)});fetch(this.endpoint,o).then(function(e){return n=e,e},function(e){if(e instanceof TypeError)throw new Error("Network error");throw e}).then(function(e){return e.json().catch(function(){return{}})}).then(function(e){if(n.ok)return r(null,e);var t=(e.__type||e.code).split("#").pop(),i=new Error(e.message||e.Message||null);return i.name=t,i.code=t,r(i)}).catch(function(e){if(n&&n.headers&&n.headers.get("x-amzn-errortype"))try{var t=n.headers.get("x-amzn-errortype").split(":")[0],i=new Error(n.status?n.status.toString():null);return i.code=t,i.name=t,i.statusCode=n.status,r(i)}catch(t){return r(e)}else e instanceof Error&&"Network error"===e.message&&(e.code="NetworkError");return r(e)})},e}(),ro={debug:function(){}},no=function(e){return e&&e.nonRetryable};function io(e,t,r,n){if(void 0===n&&(n=1),"function"!=typeof e)throw Error("functionToRetry must be a function");return ro.debug(e.name+" attempt #"+n+" with args: "+JSON.stringify(t)),e.apply(void 0,t).catch(function(i){if(ro.debug("error on "+e.name,i),no(i))throw ro.debug(e.name+" non retryable error",i),i;var o=r(n,t,i);if(ro.debug(e.name+" retrying in "+o+" ms"),!1!==o)return new Promise(function(e){return setTimeout(e,o)}).then(function(){return io(e,t,r,n+1)});throw i})}var oo=3e5,so=function(){function e(e,t){var r=e||{},n=r.UserPoolId,i=r.ClientId,o=r.endpoint,s=r.fetchOptions,a=r.AdvancedSecurityDataCollectionFlag;if(!n||!i)throw new Error("Both UserPoolId and ClientId are required.");if(n.length>55||!/^[\w-]+_[0-9a-zA-Z]+$/.test(n))throw new Error("Invalid UserPoolId format.");var u=n.split("_")[0];this.userPoolId=n,this.clientId=i,this.client=new to(u,o,s),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=e.Storage||(new Ki).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getUserPoolName=function(){return this.getUserPoolId().split("_")[1]},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,r,n,i,o){var s=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:r,ValidationData:n,ClientMetadata:o};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,function(t,r){if(t)return i(t,null);var n={Username:e,Pool:s,Storage:s.storage},o={user:new Vi(n),userConfirmed:r.UserConfirmed,userSub:r.UserSub,codeDeliveryDetails:r.CodeDeliveryDetails};return i(null,o)})},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var r={Username:t,Pool:this,Storage:this.storage};return new Vi(r)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var r=t.getData(e,this.userPoolId,this.clientId);if(r)return{EncodedData:r}}return{}}},e}(),ao=r(12215),uo=function(){function e(e){if(!e.domain)throw new Error("The domain of cookieStorage can not be undefined.");if(this.domain=e.domain,e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var r={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(r.sameSite=this.sameSite),ao.set(e,t,r),ao.get(e)},t.getItem=function(e){return ao.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),ao.remove(e,t)},t.clear=function(){for(var e=ao.get(),t=Object.keys(e).length,r=0;r<t;++r)this.removeItem(Object.keys(e)[r]);return{}},e}(),co=r(88835),lo=function(e){var t=window.open(e,"_self");return t?Promise.resolve(t):Promise.reject()},fo=function(){return fo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fo.apply(this,arguments)},ho=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})},po=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},go=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},yo="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",vo=function(e,t,r){w.dispatch("auth",{event:e,data:t,message:r},"Auth",yo)},mo=new h("OAuth"),wo=function(){function e(e){var t=e.config,r=e.cognitoClientId,n=e.scopes,i=void 0===n?[]:n;if(this._urlOpener=t.urlOpener||lo,this._config=t,this._cognitoClientId=r,!this.isValidScopes(i))throw Error("scopes must be a String Array");this._scopes=i}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every(function(e){return"string"==typeof e})},e.prototype.oauthSignIn=function(e,t,r,i,o,s){void 0===e&&(e="code"),void 0===o&&(o=n.Cognito);var a=this._generateState(32),u=s?a+"-"+s.split("").map(function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")}).join(""):a;!function(e){window.sessionStorage.setItem("oauth_state",e)}(u);var c,l=this._generateRandom(128);c=l,window.sessionStorage.setItem("ouath_pkce_key",c);var f=this._generateChallenge(l),h=this._scopes.join(" "),d=Object.entries(fo(fo({redirect_uri:r,response_type:e,client_id:i,identity_provider:o,scope:h,state:u},"code"===e?{code_challenge:f}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map(function(e){var t=go(e,2),r=t[0],n=t[1];return encodeURIComponent(r)+"="+encodeURIComponent(n)}).join("&"),p="https://"+t+"/oauth2/authorize?"+d;mo.debug("Redirecting to "+p),this._urlOpener(p,r)},e.prototype._handleCodeFlow=function(e){return ho(this,void 0,void 0,function(){var t,r,n,i,o,s,u,c,l,f,h,d,p,g;return po(this,function(y){switch(y.label){case 0:return t=((0,co.qg)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r,n=go(t,2),i=n[0],o=n[1];return fo(fo({},e),((r={})[i]=o,r))},{code:void 0}).code,r=(0,co.qg)(e).pathname||"/",n=(0,co.qg)(this._config.redirectSignIn).pathname||"/",t&&r===n?(i="https://"+this._config.domain+"/oauth2/token",vo("codeFlow",{},"Retrieving tokens from "+i),o=a(this._config)?this._cognitoClientId:this._config.clientID,s=a(this._config)?this._config.redirectSignIn:this._config.redirectUri,v=window.sessionStorage.getItem("ouath_pkce_key"),window.sessionStorage.removeItem("ouath_pkce_key"),c=fo({grant_type:"authorization_code",code:t,client_id:o,redirect_uri:s},(u=v)?{code_verifier:u}:{}),mo.debug("Calling token endpoint: "+i+" with",c),l=Object.entries(c).map(function(e){var t=go(e,2),r=t[0],n=t[1];return encodeURIComponent(r)+"="+encodeURIComponent(n)}).join("&"),[4,fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:l})]):[2];case 1:return[4,y.sent().json()];case 2:if(f=y.sent(),h=f.access_token,d=f.refresh_token,p=f.id_token,g=f.error)throw new Error(g);return[2,{accessToken:h,refreshToken:d,idToken:p}]}var v})})},e.prototype._handleImplicitFlow=function(e){return ho(this,void 0,void 0,function(){var t,r,n;return po(this,function(i){return t=((0,co.qg)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r,n=go(t,2),i=n[0],o=n[1];return fo(fo({},e),((r={})[i]=o,r))},{id_token:void 0,access_token:void 0}),r=t.id_token,n=t.access_token,vo("implicitFlow",{},"Got tokens from "+e),mo.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:n,idToken:r,refreshToken:null}]})})},e.prototype.handleAuthResponse=function(e){return ho(this,void 0,void 0,function(){var t,r,n,i,o,s,a;return po(this,function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),t=e?fo(fo({},((0,co.qg)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r=go(t,2),n=r[0],i=r[1];return e[n]=i,e},{})),((0,co.qg)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r=go(t,2),n=r[0],i=r[1];return e[n]=i,e},{})):{},r=t.error,n=t.error_description,r)throw new Error(n);return i=this._validateState(t),mo.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,fo.apply(void 0,[fo.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return s=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,fo.apply(void 0,[fo.apply(void 0,s.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:throw a=u.sent(),mo.error("Error handling auth response.",a),a;case 6:return[2]}})})},e.prototype._validateState=function(e){if(e){var t,r=(t=window.sessionStorage.getItem("oauth_state"),window.sessionStorage.removeItem("oauth_state"),t),n=e.state;if(r&&r!==n)throw new Error("Invalid state in OAuth flow");return n}},e.prototype.signOut=function(){return ho(this,void 0,void 0,function(){var e,t,r;return po(this,function(n){return e="https://"+this._config.domain+"/logout?",t=a(this._config)?this._cognitoClientId:this._config.oauth.clientID,r=a(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(r)}).map(function(e){var t=go(e,2);return t[0]+"="+t[1]}).join("&"),vo("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),mo.debug("Signing out from "+e),[2,this._urlOpener(e,r)]})})},e.prototype._generateState=function(e){for(var t="",r=e;r>0;--r)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.round(61*Math.random())];return t},e.prototype._generateChallenge=function(e){return this._base64URL(si()(e))},e.prototype._base64URL=function(e){return e.toString(Ri()).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var r=0;r<e;r+=1)t[r]=66*Math.random()|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t=[],r=0;r<e.byteLength;r+=1){var n=e[r]%62;t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[n])}return t.join("")},e}();const bo=wo;var So;!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in"}(So||(So={}));var _o=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ao=new h("AuthError"),Eo=function(e){function t(r){var n=this,i=Co[r],o=i.message,s=i.log;return(n=e.call(this,o)||this).constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="AuthError",n.log=s||o,Ao.error(n.log),n}return _o(t,e),t}(Error),Io=function(e){function t(r){var n=e.call(this,r)||this;return n.constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="NoUserPoolError",n}return _o(t,e),t}(Eo),Co={noConfig:{message:So.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n "},missingAuthConfig:{message:So.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run `amplify push` after adding auth via `amplify add auth`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n "},emptyUsername:{message:So.EMPTY_USERNAME},invalidUsername:{message:So.INVALID_USERNAME},emptyPassword:{message:So.EMPTY_PASSWORD},emptyCode:{message:So.EMPTY_CODE},signUpError:{message:So.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:So.NO_MFA},invalidMFA:{message:So.INVALID_MFA},emptyChallengeResponse:{message:So.EMPTY_CHALLENGE},noUserSession:{message:So.NO_USER_SESSION},deviceConfig:{message:So.DEVICE_CONFIG},networkError:{message:So.NETWORK_ERROR},autoSignInError:{message:So.AUTOSIGNIN_ERROR},default:{message:So.DEFAULT_MSG}},Po=function(){return Po=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Po.apply(this,arguments)},To=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})},Uo=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Oo=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},ko=new h("AuthClass"),Mo="aws.cognito.signin.user.admin",xo="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Ro=function(e,t,r){w.dispatch("auth",{event:e,data:t,message:r},"Auth",xo)},Do=function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.autoSignInInitiated=!1,this.Credentials=Kn,this.wrapRefreshSessionCallback=function(e){return function(t,r){return r?Ro("tokenRefresh",void 0,"New token retrieved"):Ro("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,r)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),w.listen("auth",function(e){switch(e.payload.event){case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}})}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};ko.debug("configure Auth");var r=Object.assign({},this._config,Wn.parseMobilehubConfig(e).Auth,e);this._config=r;var n=this._config,o=n.userPoolId,s=n.userPoolWebClientId,u=n.cookieStorage,c=n.oauth,l=n.region,f=n.identityPoolId,h=n.mandatorySignIn,d=n.refreshHandlers,p=n.identityPoolRegion,g=n.clientMetadata,y=n.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw ko.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=u?new uo(u):e.ssr?new ei:(new _).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),o){var v={UserPoolId:o,ClientId:s,endpoint:y};v.Storage=this._storage,this.userPool=new so(v,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:h,region:p||l,userPoolId:o,identityPoolId:f,refreshHandlers:d,storage:this._storage});var m=c?a(this._config.oauth)?c:c.awsCognito:void 0;if(m){var w=Object.assign({cognitoClientId:s,UserPoolId:o,domain:m.domain,scopes:m.scope,redirectSignIn:m.redirectSignIn,redirectSignOut:m.redirectSignOut,responseType:m.responseType,Storage:this._storage,urlOpener:m.urlOpener,clientMetadata:g},m.options);this._oAuthHandler=new bo({scopes:w.scopes,config:w,cognitoClientId:w.cognitoClientId});var b={};!function(){if(M().isBrowser&&window.location)!function(e){var r=e.url;b[r]||(b[r]=!0,t._handleAuthResponse(r))}({url:window.location.href});else if(!M().isNode)throw new Error("Not supported")}()}return Ro("configured",null,"The Auth category has been configured successfully"),this.autoSignInInitiated||"function"!=typeof this._storage.getItem||(this.isTrueStorageValue("amplify-polling-started")&&(Ro("autoSignIn_failure",null,i.AutoSignInError),this._storage.removeItem("amplify-auto-sign-in")),this._storage.removeItem("amplify-polling-started")),this._config},e.prototype.signUp=function(e){for(var t,r,n,o=this,s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];if(!this.userPool)return this.rejectNoUserPool();var u,c=null,l=null,f=[],h=null,d={enabled:!1},p={},g={};if(e&&"string"==typeof e){c=e,l=s?s[0]:null;var y=s?s[1]:null,v=s?s[2]:null;y&&f.push(new Li({Name:"email",Value:y})),v&&f.push(new Li({Name:"phone_number",Value:v}))}else{if(!e||"object"!=typeof e)return this.rejectAuthError(i.SignUpError);c=e.username,l=e.password,e&&e.clientMetadata?u=e.clientMetadata:this._config.clientMetadata&&(u=this._config.clientMetadata);var m=e.attributes;m&&Object.keys(m).map(function(e){f.push(new Li({Name:e,Value:m[e]}))});var w=e.validationData;w&&(h=[],Object.keys(w).map(function(e){h.push(new Li({Name:e,Value:w[e]}))})),(d=null!==(t=e.autoSignIn)&&void 0!==t?t:{enabled:!1}).enabled&&(this._storage.setItem("amplify-auto-sign-in","true"),p=null!==(r=d.validationData)&&void 0!==r?r:{},g=null!==(n=d.clientMetaData)&&void 0!==n?n:{})}return c?l?(ko.debug("signUp attrs:",f),ko.debug("signUp validation data:",h),new Promise(function(e,t){o.userPool.signUp(c,l,f,h,function(r,n){r?(Ro("signUp_failure",r,c+" failed to signup"),t(r)):(Ro("signUp",n,c+" has signed up successfully"),d.enabled&&o.handleAutoSignIn(c,l,p,g,n),e(n))},u)})):this.rejectAuthError(i.EmptyPassword):this.rejectAuthError(i.EmptyUsername)},e.prototype.handleAutoSignIn=function(e,t,r,n,i){this.autoSignInInitiated=!0;var o=new ti({Username:e,Password:t,ValidationData:r,ClientMetadata:n});i.userConfirmed?this.signInAfterUserConfirmed(o):"link"===this._config.signUpVerificationMethod?this.handleLinkAutoSignIn(o):this.handleCodeAutoSignIn(o)},e.prototype.handleCodeAutoSignIn=function(e){var t=this,r=function(n){"confirmSignUp"===n.payload.event&&t.signInAfterUserConfirmed(e,r)};w.listen("auth",r)},e.prototype.handleLinkAutoSignIn=function(e){var t=this;this._storage.setItem("amplify-polling-started","true");var r=Date.now(),n=setInterval(function(){Date.now()-r>18e4?(clearInterval(n),Ro("autoSignIn_failure",null,"Please confirm your account and use your credentials to sign in."),t._storage.removeItem("amplify-auto-sign-in")):t.signInAfterUserConfirmed(e,null,n)},5e3)},e.prototype.signInAfterUserConfirmed=function(e,t,r){return To(this,void 0,void 0,function(){var n,i,o=this;return Uo(this,function(s){switch(s.label){case 0:n=this.createCognitoUser(e.getUsername()),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,n.authenticateUser(e,this.authCallbacks(n,function(n){Ro("autoSignIn",n,e.getUsername()+" has signed in successfully"),t&&w.remove("auth",t),r&&(clearInterval(r),o._storage.removeItem("amplify-polling-started")),o._storage.removeItem("amplify-auto-sign-in")},function(e){ko.error(e),o._storage.removeItem("amplify-auto-sign-in")}))];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),ko.error(i),[3,4];case 4:return[2]}})})},e.prototype.confirmSignUp=function(e,t,r){var n=this;if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);var o,s=this.createCognitoUser(e),a=!r||"boolean"!=typeof r.forceAliasCreation||r.forceAliasCreation;return r&&r.clientMetadata?o=r.clientMetadata:this._config.clientMetadata&&(o=this._config.clientMetadata),new Promise(function(r,u){s.confirmRegistration(t,a,function(t,o){t?u(t):(Ro("confirmSignUp",o,e+" has been confirmed successfully"),n.isTrueStorageValue("amplify-auto-sign-in")&&!n.autoSignInInitiated&&(Ro("autoSignIn_failure",null,i.AutoSignInError),n._storage.removeItem("amplify-auto-sign-in")),r(o))},o)})},e.prototype.isTrueStorageValue=function(e){var t=this._storage.getItem(e);return!!t&&"true"===t},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var r=this.createCognitoUser(e);return new Promise(function(e,n){r.resendConfirmationCode(function(t,r){t?n(t):e(r)},t)})},e.prototype.signIn=function(e,t,r){if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var n=null,o=null,s={};if("string"==typeof e)n=e,o=t;else{if(!e.username)return this.rejectAuthError(i.InvalidUsername);void 0!==t&&ko.warn("The password should be defined under the first parameter object!"),n=e.username,o=e.password,s=e.validationData}if(!n)return this.rejectAuthError(i.EmptyUsername);var a=new ti({Username:n,Password:o,ValidationData:s,ClientMetadata:r});return o?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,r){var n=this,i=this;return{onSuccess:function(o){return To(n,void 0,void 0,function(){var n,s,a,u;return Uo(this,function(c){switch(c.label){case 0:ko.debug(o),delete e.challengeName,delete e.challengeParam,c.label=1;case 1:return c.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return c.sent(),[4,this.Credentials.set(o,"session")];case 3:return n=c.sent(),ko.debug("succeed to get cognito credentials",n),[3,9];case 4:return s=c.sent(),ko.debug("cannot get cognito credentials",s),[3,9];case 5:return c.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return a=c.sent(),i.user=a,Ro("signIn",a,"A user "+e.getUsername()+" has been signed in"),t(a),[3,8];case 7:return u=c.sent(),ko.error("Failed to get the signed in user",u),r(u),[3,8];case 8:return[7];case 9:return[2]}})})},onFailure:function(t){ko.debug("signIn failure",t),Ro("signIn_failure",t,e.getUsername()+" failed to signin"),r(t)},customChallenge:function(r){ko.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=r,t(e)},mfaRequired:function(r,n){ko.debug("signIn MFA required"),e.challengeName=r,e.challengeParam=n,t(e)},mfaSetup:function(r,n){ko.debug("signIn mfa setup",r),e.challengeName=r,e.challengeParam=n,t(e)},newPasswordRequired:function(r,n){ko.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:r,requiredAttributes:n},t(e)},totpRequired:function(r,n){ko.debug("signIn totpRequired"),e.challengeName=r,e.challengeParam=n,t(e)},selectMFAType:function(r,n){ko.debug("signIn selectMFAType",r),e.challengeName=r,e.challengeParam=n,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw new Error("Pending sign-in attempt already in progress");var r=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise(function(n,i){r.authenticateUser(e,t.authCallbacks(r,function(e){t.pendingSignIn=null,n(e)},function(e){t.pendingSignIn=null,i(e)}))}),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,r=this.createCognitoUser(e.getUsername());return r.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise(function(n,i){r.initiateAuth(e,t.authCallbacks(r,n,i))})},e.prototype.getMFAOptions=function(e){return new Promise(function(t,r){e.getMFAOptions(function(e,n){if(e)return ko.debug("get MFA Options failed",e),void r(e);ko.debug("get MFA options success",n),t(n)})})},e.prototype.getPreferredMFA=function(e,t){var r=this,n=this;return new Promise(function(i,o){var s=r._config.clientMetadata,a=!!t&&t.bypassCache;e.getUserData(function(t,s){return To(r,void 0,void 0,function(){var r,a;return Uo(this,function(u){switch(u.label){case 0:if(!t)return[3,5];if(ko.debug("getting preferred mfa failed",t),!this.isSessionInvalid(t))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return u.sent(),[3,4];case 3:return r=u.sent(),o(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+r.message)),[2];case 4:return o(t),[2];case 5:return(a=n._getMfaTypeFromUserData(s))?(i(a),[2]):(o("invalid MFA Type"),[2])}})})},{bypassCache:a,clientMetadata:s})})},e.prototype._getMfaTypeFromUserData=function(e){var t=null,r=e.PreferredMfaSetting;if(r)t=r;else{var n=e.UserMFASettingList;n?0===n.length?t="NOMFA":ko.debug("invalid case for getPreferredMFA",e):t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){var r=this;return new Promise(function(n,i){e.getUserData(function(t,o){return To(r,void 0,void 0,function(){var r;return Uo(this,function(s){switch(s.label){case 0:if(!t)return[3,5];if(ko.debug("getting user data failed",t),!this.isSessionInvalid(t))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return r=s.sent(),i(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+r.message)),[2];case 4:return i(t),[2];case 5:n(o),s.label=6;case 6:return[2]}})})},t)})},e.prototype.setPreferredMFA=function(e,t){return To(this,void 0,void 0,function(){var r,n,o,s,a,u,c=this;return Uo(this,function(l){switch(l.label){case 0:return r=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:r})];case 1:switch(n=l.sent(),o=null,s=null,t){case"TOTP":case"SOFTWARE_TOKEN_MFA":return[3,2];case"SMS":case"SMS_MFA":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return s={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return a=n.UserMFASettingList,[4,this._getMfaTypeFromUserData(n)];case 5:if("NOMFA"===(u=l.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===u)o={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==u)return[2,this.rejectAuthError(i.InvalidMFA)];s={PreferredMfa:!1,Enabled:!1}}return a&&0!==a.length&&a.forEach(function(e){"SMS_MFA"===e?o={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(s={PreferredMfa:!1,Enabled:!1})}),[3,7];case 6:return ko.debug("no validmfa method provided"),[2,this.rejectAuthError(i.NoMFA)];case 7:return[2,new Promise(function(t,n){e.setUserMfaPreference(o,s,function(i,o){if(i)return ko.debug("Set user mfa preference error",i),n(i);ko.debug("Set user mfa success",o),ko.debug("Caching the latest user data into local"),e.getUserData(function(r,i){return To(c,void 0,void 0,function(){var i;return Uo(this,function(s){switch(s.label){case 0:if(!r)return[3,5];if(ko.debug("getting user data failed",r),!this.isSessionInvalid(r))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),n(new Error("Session is invalid due to: "+r.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,n(r)];case 5:return[2,t(o)]}})})},{bypassCache:!0,clientMetadata:r})})})]}})})},e.prototype.disableSMS=function(e){return new Promise(function(t,r){e.disableMFA(function(e,n){if(e)return ko.debug("disable mfa failed",e),void r(e);ko.debug("disable mfa succeed",n),t(n)})})},e.prototype.enableSMS=function(e){return new Promise(function(t,r){e.enableMFA(function(e,n){if(e)return ko.debug("enable mfa failed",e),void r(e);ko.debug("enable mfa succeed",n),t(n)})})},e.prototype.setupTOTP=function(e){return new Promise(function(t,r){e.associateSoftwareToken({onFailure:function(e){ko.debug("associateSoftwareToken failed",e),r(e)},associateSecretCode:function(e){ko.debug("associateSoftwareToken sucess",e),t(e)}})})},e.prototype.verifyTotpToken=function(e,t){return ko.debug("verification totp token",e,t),new Promise(function(r,n){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){ko.debug("verifyTotpToken failed",e),n(e)},onSuccess:function(t){Ro("signIn",e,"A user "+e.getUsername()+" has been signed in"),ko.debug("verifyTotpToken success",t),r(t)}})})},e.prototype.confirmSignIn=function(e,t,r,n){var o=this;if(void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyCode);var s=this;return new Promise(function(i,a){e.sendMFACode(t,{onSuccess:function(t){return To(o,void 0,void 0,function(){var r,n;return Uo(this,function(o){switch(o.label){case 0:ko.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return r=o.sent(),ko.debug("succeed to get cognito credentials",r),[3,6];case 4:return n=o.sent(),ko.debug("cannot get cognito credentials",n),[3,6];case 5:return s.user=e,Ro("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}})})},onFailure:function(e){ko.debug("confirm signIn failure",e),a(e)}},r,n)})},e.prototype.completeNewPassword=function(e,t,r,n){var o=this;if(void 0===r&&(r={}),void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyPassword);var s=this;return new Promise(function(i,a){e.completeNewPasswordChallenge(t,r,{onSuccess:function(t){return To(o,void 0,void 0,function(){var r,n;return Uo(this,function(o){switch(o.label){case 0:ko.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return r=o.sent(),ko.debug("succeed to get cognito credentials",r),[3,6];case 4:return n=o.sent(),ko.debug("cannot get cognito credentials",n),[3,6];case 5:return s.user=e,Ro("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}})})},onFailure:function(e){ko.debug("completeNewPassword failure",e),Ro("completeNewPassword_failure",e,o.user+" failed to complete the new password flow"),a(e)},mfaRequired:function(t,r){ko.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=r,i(e)},mfaSetup:function(t,r){ko.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=r,i(e)},totpRequired:function(t,r){ko.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=r,i(e)}},n)})},e.prototype.sendCustomChallengeAnswer=function(e,t,r){var n=this;return void 0===r&&(r=this._config.clientMetadata),this.userPool?t?new Promise(function(i,o){e.sendCustomChallengeAnswer(t,n.authCallbacks(e,i,o),r)}):this.rejectAuthError(i.EmptyChallengeResponse):this.rejectNoUserPool()},e.prototype.deleteUserAttributes=function(e,t){var r=this;return new Promise(function(n,i){r.userSession(e).then(function(r){e.deleteAttributes(t,function(e,t){return e?i(e):n(t)})})})},e.prototype.deleteUser=function(){return To(this,void 0,void 0,function(){var e,t,r=this;return Uo(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this._storageSync];case 1:return n.sent(),[3,3];case 2:throw e=n.sent(),ko.debug("Failed to sync cache info into memory",e),new Error(e);case 3:return t=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(e,n){return To(r,void 0,void 0,function(){var r,i=this;return Uo(this,function(o){if(this.userPool){if(!(r=this.userPool.getCurrentUser()))return ko.debug("Failed to get user from user pool"),[2,n(new Error("No current user."))];r.getSession(function(o,s){return To(i,void 0,void 0,function(){var i,s=this;return Uo(this,function(a){switch(a.label){case 0:if(!o)return[3,5];if(ko.debug("Failed to get the user session",o),!this.isSessionInvalid(o))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(r)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),n(new Error("Session is invalid due to: "+o.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,n(o)];case 5:r.deleteUser(function(i,o){if(i)n(i);else{Ro("userDeleted",o,"The authenticated user has been deleted."),r.signOut(),s.user=null;try{s.cleanCachedItems()}catch(e){ko.debug("failed to clear cached items")}t?s.oAuthSignOutRedirect(e,n):(Ro("signOut",s.user,"A user has been signed out"),e(o))}}),a.label=6;case 6:return[2]}})})})}else ko.debug("no Congito User pool"),n(new Error("Cognito User pool does not exist"));return[2]})})})]}})})},e.prototype.updateUserAttributes=function(e,t,r){void 0===r&&(r=this._config.clientMetadata);var n=[],i=this;return new Promise(function(o,s){i.userSession(e).then(function(i){for(var a in t)if("sub"!==a&&a.indexOf("_verified")<0){var u={Name:a,Value:t[a]};n.push(u)}e.updateAttributes(n,function(e,t){return e?s(e):o(t)},r)})})},e.prototype.userAttributes=function(e){var t=this;return new Promise(function(r,n){t.userSession(e).then(function(t){e.getUserAttributes(function(e,t){e?n(e):r(t)})})})},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then(function(e){var r=t.attributesToObject(e),n={},i={};return r.email&&(r.email_verified?i.email=r.email:n.email=r.email),r.phone_number&&(r.phone_number_verified?i.phone_number=r.phone_number:n.phone_number=r.phone_number),{verified:i,unverified:n}})},e.prototype.isErrorWithMessage=function(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"message")},e.prototype.isTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Access Token has been revoked"===e.message},e.prototype.isRefreshTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has been revoked"===e.message},e.prototype.isUserDisabledError=function(e){return this.isErrorWithMessage(e)&&"User is disabled."===e.message},e.prototype.isUserDoesNotExistError=function(e){return this.isErrorWithMessage(e)&&"User does not exist."===e.message},e.prototype.isRefreshTokenExpiredError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has expired"===e.message},e.prototype.isSignedInHostedUI=function(){return this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI")},e.prototype.isSessionInvalid=function(e){return this.isUserDisabledError(e)||this.isUserDoesNotExistError(e)||this.isTokenRevokedError(e)||this.isRefreshTokenRevokedError(e)||this.isRefreshTokenExpiredError(e)},e.prototype.cleanUpInvalidSession=function(e){return To(this,void 0,void 0,function(){var t=this;return Uo(this,function(r){switch(r.label){case 0:e.signOut(),this.user=null,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.cleanCachedItems()];case 2:return r.sent(),[3,4];case 3:return r.sent(),ko.debug("failed to clear cached items"),[3,4];case 4:return this.isSignedInHostedUI()?[2,new Promise(function(e,r){t.oAuthSignOutRedirect(e,r)})]:(Ro("signOut",this.user,"A user has been signed out"),[2])}})})},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise(function(r,n){t._storageSync.then(function(){return To(t,void 0,void 0,function(){var t,i,o=this;return Uo(this,function(s){switch(s.label){case 0:return this.isOAuthInProgress()?(ko.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise(function(e){var t=setTimeout(function(){ko.debug("OAuth signIn in progress timeout"),w.remove("auth",r),e()},1e4);function r(n){var i=n.payload.event;"cognitoHostedUI"!==i&&"cognitoHostedUI_failure"!==i||(ko.debug("OAuth signIn resolved: "+i),clearTimeout(t),w.remove("auth",r),e())}w.listen("auth",r)})]):[3,2];case 1:s.sent(),s.label=2;case 2:return(t=this.userPool.getCurrentUser())?(i=this._config.clientMetadata,t.getSession(function(i,s){return To(o,void 0,void 0,function(){var o,a,u,c,l=this;return Uo(this,function(f){switch(f.label){case 0:if(!i)return[3,5];if(ko.debug("Failed to get the user session",i),!this.isSessionInvalid(i))return[3,4];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return f.sent(),[3,4];case 3:return o=f.sent(),n(new Error("Session is invalid due to: "+i.message+" and failed to clean up invalid session: "+o.message)),[2];case 4:return n(i),[2];case 5:return(a=!!e&&e.bypassCache)?[4,this.Credentials.clear()]:[3,7];case 6:f.sent(),f.label=7;case 7:return u=this._config.clientMetadata,(void 0===(c=s.getAccessToken().decodePayload().scope)?"":c).split(" ").includes(Mo)?(t.getUserData(function(e,i){return To(l,void 0,void 0,function(){var o,s,a,u,c,l,f;return Uo(this,function(h){switch(h.label){case 0:if(!e)return[3,7];if(ko.debug("getting user data failed",e),!this.isSessionInvalid(e))return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return h.sent(),[3,4];case 3:return o=h.sent(),n(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+o.message)),[2];case 4:return n(e),[3,6];case 5:r(t),h.label=6;case 6:return[2];case 7:for(s=i.PreferredMfaSetting||"NOMFA",a=[],u=0;u<i.UserAttributes.length;u++)c={Name:i.UserAttributes[u].Name,Value:i.UserAttributes[u].Value},l=new Li(c),a.push(l);return f=this.attributesToObject(a),Object.assign(t,{attributes:f,preferredMFA:s}),[2,r(t)]}})})},{bypassCache:a,clientMetadata:u}),[2]):(ko.debug("Unable to get the user data because the "+Mo+" is not in the scopes of the access token"),[2,r(t)])}})})},{clientMetadata:i}),[2]):(ko.debug("Failed to get user from user pool"),n("No current user"),[2])}})})}).catch(function(e){return ko.debug("Failed to sync cache info into memory",e),n(e)})}):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return To(this,void 0,void 0,function(){var t,r,n,i,o;return Uo(this,function(s){switch(s.label){case 0:ko.debug("getting current authenticated user"),t=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this._storageSync];case 2:return s.sent(),[3,4];case 3:throw r=s.sent(),ko.debug("Failed to sync cache info into memory",r),r;case 4:try{(n=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")))&&(t=Po(Po({},n.user),{token:n.token}))}catch(e){ko.debug("cannot load federated user from auth storage")}return t?(this.user=t,ko.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:ko.debug("get current authenticated userpool user"),i=null,s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return i=s.sent(),[3,9];case 8:return"No userPool"===(o=s.sent())&&ko.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),ko.debug("The user is not authenticated by the error",o),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=i,[2,this.user]}})})},e.prototype.currentSession=function(){var e=this;return ko.debug("Getting current session"),this.userPool?new Promise(function(t,r){e.currentUserPoolUser().then(function(n){e.userSession(n).then(function(e){t(e)}).catch(function(e){ko.debug("Failed to get the current session",e),r(e)})}).catch(function(e){ko.debug("Failed to get the current user",e),r(e)})}):Promise.reject(new Error("No User Pool in the configuration."))},e.prototype.userSession=function(e){var t=this;if(!e)return ko.debug("the user is null"),this.rejectAuthError(i.NoUserSession);var r=this._config.clientMetadata;return new Promise(function(n,i){ko.debug("Getting the session from this user:",e),e.getSession(function(r,o){return To(t,void 0,void 0,function(){var t;return Uo(this,function(s){switch(s.label){case 0:if(!r)return[3,5];if(ko.debug("Failed to get the session from user",e),!this.isSessionInvalid(r))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return t=s.sent(),i(new Error("Session is invalid due to: "+r.message+" and failed to clean up invalid session: "+t.message)),[2];case 4:return i(r),[2];case 5:return ko.debug("Succeed to get the user session",o),n(o),[2]}})})},{clientMetadata:r})})},e.prototype.currentUserCredentials=function(){return To(this,void 0,void 0,function(){var e,t,r=this;return Uo(this,function(n){switch(n.label){case 0:ko.debug("Getting current user credentials"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),[3,4];case 3:throw e=n.sent(),ko.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(e){ko.debug("failed to get or parse item aws-amplify-federatedInfo",e)}return t?[2,this.Credentials.refreshFederatedToken(t)]:[2,this.currentSession().then(function(e){return ko.debug("getting session success",e),r.Credentials.set(e,"session")}).catch(function(){return ko.debug("getting guest credentials"),r.Credentials.set(null,"guest")})]}})})},e.prototype.currentCredentials=function(){return ko.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,r){return void 0===r&&(r=this._config.clientMetadata),new Promise(function(n,i){e.getAttributeVerificationCode(t,{onSuccess:function(e){return n(e)},onFailure:function(e){return i(e)}},r)})},e.prototype.verifyUserAttributeSubmit=function(e,t,r){return r?new Promise(function(n,i){e.verifyAttribute(t,r,{onSuccess:function(e){n(e)},onFailure:function(e){i(e)}})}):this.rejectAuthError(i.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then(function(r){return t.verifyUserAttribute(r,e)})},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var r=this;return r.currentUserPoolUser().then(function(n){return r.verifyUserAttributeSubmit(n,e,t)})},e.prototype.cognitoIdentitySignOut=function(e,t){return To(this,void 0,void 0,function(){var r,n,i=this;return Uo(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw r=o.sent(),ko.debug("Failed to sync cache info into memory",r),r;case 3:return n=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(r,o){if(e&&e.global){ko.debug("user global sign out",t);var s=i._config.clientMetadata;t.getSession(function(e,s){return To(i,void 0,void 0,function(){var i,s=this;return Uo(this,function(a){switch(a.label){case 0:if(!e)return[3,5];if(ko.debug("failed to get the user session",e),!this.isSessionInvalid(e))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),o(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,o(e)];case 5:return t.globalSignOut({onSuccess:function(e){if(ko.debug("global sign out success"),!n)return r();s.oAuthSignOutRedirect(r,o)},onFailure:function(e){return ko.debug("global sign out failed",e),o(e)}}),[2]}})})},{clientMetadata:s})}else ko.debug("user sign out",t),t.signOut(function(){if(!n)return r();i.oAuthSignOutRedirect(r,o)})})]}})})},e.prototype.oAuthSignOutRedirect=function(e,t){M().isBrowser?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout(function(){return e(Error("Signout timeout fail"))},3e3)},e.prototype.signOut=function(e){return To(this,void 0,void 0,function(){var t;return Uo(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return r.sent(),[3,3];case 2:return r.sent(),ko.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser())?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]:[3,7];case 4:return r.sent(),[3,6];case 5:ko.debug("no current Cognito user"),r.label=6;case 6:return[3,8];case 7:ko.debug("no Cognito User pool"),r.label=8;case 8:return Ro("signOut",this.user,"A user has been signed out"),this.user=null,[2]}})})},e.prototype.cleanCachedItems=function(){return To(this,void 0,void 0,function(){return Uo(this,function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}})})},e.prototype.changePassword=function(e,t,r,n){var i=this;return void 0===n&&(n=this._config.clientMetadata),new Promise(function(o,s){i.userSession(e).then(function(i){e.changePassword(t,r,function(e,t){return e?(ko.debug("change password failure",e),s(e)):o(t)},n)})})},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var r=this.createCognitoUser(e);return new Promise(function(n,i){r.forgotPassword({onSuccess:function(){n()},onFailure:function(t){ko.debug("forgot password failure",t),Ro("forgotPassword_failure",t,e+" forgotPassword failed"),i(t)},inputVerificationCode:function(t){Ro("forgotPassword",r,e+" has initiated forgot password flow"),n(t)}},t)})},e.prototype.forgotPasswordSubmit=function(e,t,r,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);if(!r)return this.rejectAuthError(i.EmptyPassword);var o=this.createCognitoUser(e);return new Promise(function(i,s){o.confirmPassword(t,r,{onSuccess:function(t){Ro("forgotPasswordSubmit",o,e+" forgotPasswordSubmit successful"),i(t)},onFailure:function(t){Ro("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),s(t)}},n)})},e.prototype.currentUserInfo=function(){return To(this,void 0,void 0,function(){var e,t,r,n,i,o,s;return Uo(this,function(a){switch(a.label){case 0:return(e=this.Credentials.getCredSource())&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch(function(e){return ko.error(e)})];case 1:if(!(s=a.sent()))return[2,null];a.label=2;case 2:return a.trys.push([2,8,,9]),[4,this.userAttributes(s)];case 3:t=a.sent(),r=this.attributesToObject(t),n=null,a.label=4;case 4:return a.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return n=a.sent(),[3,7];case 6:return i=a.sent(),ko.debug("Failed to retrieve credentials while getting current user info",i),[3,7];case 7:return[2,{id:n?n.identityId:void 0,username:s.getUsername(),attributes:r}];case 8:return o=a.sent(),ko.error("currentUserInfo error",o),[2,{}];case 9:return"federated"===e?[2,(s=this.user)||{}]:[2]}})})},e.prototype.federatedSignIn=function(e,t,r){return To(this,void 0,void 0,function(){var i,o,u,c,l,f,h,d,p,g,y;return Uo(this,function(v){switch(v.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if(void 0===e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return s(e)||(m=e)&&["customProvider"].find(function(e){return m.hasOwnProperty(e)})||function(e){return e&&!!["customState"].find(function(t){return e.hasOwnProperty(t)})}(e)||void 0===e?(i=e||{provider:n.Cognito},l=s(i)?i.provider:i.customProvider,s(i),o=i.customState,this._config.userPoolId&&(u=a(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,c=a(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,c,u,l,o)),[3,4]):[3,1];case 1:l=e;try{(f=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&ko.warn("There is already a signed in user: "+f+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(e){}return h=t.token,d=t.identity_id,p=t.expires_at,[4,this.Credentials.set({provider:l,token:h,identity_id:d,user:r,expires_at:p},"federation")];case 2:return g=v.sent(),[4,this.currentAuthenticatedUser()];case 3:return y=v.sent(),Ro("signIn",y,"A user "+y.username+" has been signed in"),ko.debug("federated sign in credentials",g),[2,g];case 4:return[2]}var m})})},e.prototype._handleAuthResponse=function(e){return To(this,void 0,void 0,function(){var t,r,n,i,o,s,a,u,c,l,f,h,d,p;return Uo(this,function(g){switch(g.label){case 0:if(this.oAuthFlowInProgress)return ko.debug("Skipping URL "+e+" current flow in progress"),[2];g.label=1;case 1:if(g.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(Ro("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||(M().isBrowser?window.location.href:""),r=!!((0,co.qg)(t).query||"").split("&").map(function(e){return e.split("=")}).find(function(e){var t=Oo(e,1)[0];return"code"===t||"error"===t}),n=!!((0,co.qg)(t).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).find(function(e){var t=Oo(e,1)[0];return"access_token"===t||"error"===t}),!r&&!n)return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),g.label=2;case 2:return g.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:return i=g.sent(),o=i.accessToken,s=i.idToken,a=i.refreshToken,u=i.state,c=new Di({IdToken:new ki({IdToken:s}),RefreshToken:new Mi({RefreshToken:a}),AccessToken:new Ui({AccessToken:o})}),l=void 0,this._config.identityPoolId?[4,this.Credentials.set(c,"session")]:[3,5];case 4:l=g.sent(),ko.debug("AWS credentials",l),g.label=5;case 5:return f=/-/.test(u),(h=this.createCognitoUser(c.getIdToken().decodePayload()["cognito:username"])).setSignInUserSession(c),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),Ro("signIn",h,"A user "+h.getUsername()+" has been signed in"),Ro("cognitoHostedUI",h,"A user "+h.getUsername()+" has been signed in via Cognito Hosted UI"),f&&(d=u.split("-").splice(1).join("-"),Ro("customOAuthState",d.match(/.{2}/g).map(function(e){return String.fromCharCode(parseInt(e,16))}).join(""),"State for user "+h.getUsername())),[2,l];case 6:return p=g.sent(),ko.debug("Error in cognito hosted auth response",p),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),Ro("signIn_failure",p,"The OAuth response flow failed"),Ro("cognitoHostedUI_failure",p,"A failure occurred when returning to the Cognito Hosted UI"),Ro("customState_failure",p,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}})})},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,r={};return e&&e.map(function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?r[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:r[e.Name]=e.Value}),r},e.prototype.isTruthyString=function(e){return"function"==typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var r=this._config.authenticationFlowType,n=new Vi(t);return r&&n.setAuthenticationFlowType(r),n},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?i.NoConfig:i.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new Eo(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new Io(e))},e.prototype.rememberDevice=function(){return To(this,void 0,void 0,function(){var e,t;return Uo(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=r.sent(),[3,3];case 2:return t=r.sent(),ko.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,r){e.setDeviceStatusRemembered({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?r(new Eo(i.DeviceConfig)):"NetworkError"===e.code?r(new Eo(i.NetworkError)):r(e)}})})]}})})},e.prototype.forgetDevice=function(){return To(this,void 0,void 0,function(){var e,t;return Uo(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=r.sent(),[3,3];case 2:return t=r.sent(),ko.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,r){e.forgetDevice({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?r(new Eo(i.DeviceConfig)):"NetworkError"===e.code?r(new Eo(i.NetworkError)):r(e)}})})]}})})},e.prototype.fetchDevices=function(){return To(this,void 0,void 0,function(){var e,t;return Uo(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=r.sent(),[3,3];case 2:throw t=r.sent(),ko.debug("The user is not authenticated by the error",t),new Error("The user is not authenticated");case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,r){var n={onSuccess:function(e){var r=e.Devices.map(function(e){var t=e.DeviceAttributes.find(function(e){return"device_name"===e.Name})||{};return{id:e.DeviceKey,name:t.Value}});t(r)},onFailure:function(e){"InvalidParameterException"===e.code?r(new Eo(i.DeviceConfig)):"NetworkError"===e.code?r(new Eo(i.NetworkError)):r(e)}};e.listDevices(60,null,n)})]}})})},e}(),Fo=new Do(null);ee.register(Fo);const No=Fo},58068:e=>{"use strict";e.exports=SyntaxError},58145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},58859:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&u&&"function"==typeof u.get?u.get:null,l=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,v=String.prototype.match,m=String.prototype.slice,w=String.prototype.replace,b=String.prototype.toUpperCase,S=String.prototype.toLowerCase,_=RegExp.prototype.test,A=Array.prototype.concat,E=Array.prototype.join,I=Array.prototype.slice,C=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,x=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-C(-e):C(e);if(n!==e){var i=String(n),o=m.call(t,i.length+1);return w.call(i,r,"$&_")+"."+w.call(w.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(t,r,"$&_")}var D=r(42634),F=D.custom,N=z(F)?F:null,j={__proto__:null,double:'"',single:"'"},L={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function B(e,t,r){var n=r.quoteStyle||t,i=j[n];return i+e+i}function q(e){return w.call(String(e),/"/g,"&quot;")}function K(e){return!k||!("object"==typeof e&&(k in e||void 0!==e[k]))}function H(e){return"[object Array]"===Y(e)&&K(e)}function V(e){return"[object RegExp]"===Y(e)&&K(e)}function z(e){if(O)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!U)return!1;try{return U.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,i,a){var u=n||{};if(G(u,"quoteStyle")&&!G(j,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!G(u,"customInspect")||u.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=u.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return J(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return b?R(t,_):_}if("bigint"==typeof t){var C=String(t)+"n";return b?R(t,C):C}var T=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=T&&T>0&&"object"==typeof t)return H(t)?"[Array]":"[Object]";var F,L=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=E.call(Array(e.indent+1)," ")}return{base:r,prev:E.call(Array(t+1),r)}}(u,i);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function W(t,r,n){if(r&&(a=I.call(a)).push(r),n){var o={depth:u.depth};return G(u,"quoteStyle")&&(o.quoteStyle=u.quoteStyle),e(t,o,i+1,a)}return e(t,u,i+1,a)}if("function"==typeof t&&!V(t)){var Z=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ne=re(t,W);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(ne.length>0?" { "+E.call(ne,", ")+" }":"")}if(z(t)){var ie=O?w.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(t);return"object"!=typeof t||O?ie:Q(ie)}if((F=t)&&"object"==typeof F&&("undefined"!=typeof HTMLElement&&F instanceof HTMLElement||"string"==typeof F.nodeName&&"function"==typeof F.getAttribute)){for(var oe="<"+S.call(String(t.nodeName)),se=t.attributes||[],ae=0;ae<se.length;ae++)oe+=" "+se[ae].name+"="+B(q(se[ae].value),"double",u);return oe+=">",t.childNodes&&t.childNodes.length&&(oe+="..."),oe+"</"+S.call(String(t.nodeName))+">"}if(H(t)){if(0===t.length)return"[]";var ue=re(t,W);return L&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],"\n")>=0)return!1;return!0}(ue)?"["+te(ue,L)+"]":"[ "+E.call(ue,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&K(e)}(t)){var ce=re(t,W);return"cause"in Error.prototype||!("cause"in t)||M.call(t,"cause")?0===ce.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ce,", ")+" }":"{ ["+String(t)+"] "+E.call(A.call("[cause]: "+W(t.cause),ce),", ")+" }"}if("object"==typeof t&&g){if(N&&"function"==typeof t[N]&&D)return D(t,{depth:T-i});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var le=[];return s&&s.call(t,function(e,r){le.push(W(r,t,!0)+" => "+W(e,t))}),ee("Map",o.call(t),le,L)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var fe=[];return l&&l.call(t,function(e){fe.push(W(e,t))}),ee("Set",c.call(t),fe,L)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if(function(e){return"[object Number]"===Y(e)&&K(e)}(t))return Q(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}(t))return Q(W(P.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&K(e)}(t))return Q(p.call(t));if(function(e){return"[object String]"===Y(e)&&K(e)}(t))return Q(W(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&K(e)}(t)&&!V(t)){var he=re(t,W),de=x?x(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",ge=!de&&k&&Object(t)===t&&k in t?m.call(Y(t),8,-1):pe?"Object":"",ye=(de||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ge||pe?"["+E.call(A.call([],ge||[],pe||[]),": ")+"] ":"");return 0===he.length?ye+"{}":L?ye+"{"+te(he,L)+"}":ye+"{ "+E.call(he,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return W.call(e,t)}function Y(e){return g.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function J(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return J(m.call(e,0,t.maxStringLength),t)+n}var i=L[t.quoteStyle||"single"];return i.lastIndex=0,B(w.call(w.call(e,i,"\\$1"),/[\x00-\x1f]/g,Z),"single",t)}function Z(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Q(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function ee(e,t,r,n){return e+" ("+t+") {"+(n?te(r,n):E.call(r,", "))+"}"}function te(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+E.call(e,","+r)+"\n"+t.prev}function re(e,t){var r=H(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=G(e,i)?t(e[i],e):""}var o,s="function"==typeof T?T(e):[];if(O){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var u in e)G(e,u)&&(r&&String(Number(u))===u&&u<e.length||O&&o["$"+u]instanceof Symbol||(_.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof T)for(var c=0;c<s.length;c++)M.call(e,s[c])&&n.push("["+t(s[c])+"]: "+t(e[s[c]],e));return n}},58968:e=>{"use strict";e.exports=Math.floor},60471:e=>{for(var t=[],r=0;r<256;++r)t[r]=(r+256).toString(16).substr(1);e.exports=function(e,r){var n=r||0,i=t;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},61270:function(e,t,r){var n;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var o,s=2147483647,a=36,u=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,d=String.fromCharCode;function p(e){throw new RangeError(f[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(l,".")).split("."),t).join(".")}function v(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function m(e){return g(e,function(e){var t="";return e>65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+d(e)}).join("")}function w(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:a}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=a)e=h(e/35);return h(n+36*e/(e+38))}function _(e){var t,r,n,i,o,u,c,l,f,d,g=[],y=e.length,v=0,b=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&p("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=v,u=1,c=a;i>=y&&p("invalid-input"),((l=w(e.charCodeAt(i++)))>=a||l>h((s-v)/u))&&p("overflow"),v+=l*u,!(l<(f=c<=_?1:c>=_+26?26:c-_));c+=a)u>h(s/(d=a-f))&&p("overflow"),u*=d;_=S(v-o,t=g.length+1,0==o),h(v/t)>s-b&&p("overflow"),b+=h(v/t),v%=t,g.splice(v++,0,b)}return m(g)}function A(e){var t,r,n,i,o,u,c,l,f,g,y,m,w,_,A,E=[];for(m=(e=v(e)).length,t=128,r=0,o=72,u=0;u<m;++u)(y=e[u])<128&&E.push(d(y));for(n=i=E.length,i&&E.push("-");n<m;){for(c=s,u=0;u<m;++u)(y=e[u])>=t&&y<c&&(c=y);for(c-t>h((s-r)/(w=n+1))&&p("overflow"),r+=(c-t)*w,t=c,u=0;u<m;++u)if((y=e[u])<t&&++r>s&&p("overflow"),y==t){for(l=r,f=a;!(l<(g=f<=o?1:f>=o+26?26:f-o));f+=a)A=l-g,_=a-g,E.push(d(b(g+A%_,0))),l=h(A/_);E.push(d(b(l,0))),o=S(r,w,n==i),r=0,++n}++r,++t}return E.join("")}o={version:"1.4.1",ucs2:{decode:v,encode:m},decode:_,encode:A,toASCII:function(e){return y(e,function(e){return c.test(e)?"xn--"+A(e):e})},toUnicode:function(e){return y(e,function(e){return u.test(e)?_(e.slice(4).toLowerCase()):e})}},void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},62642:(e,t,r)=>{"use strict";var n=r(37720),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},u=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},c=function(e,t,r,o){if(e){var s=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=r.depth>0&&/(\[[^[\]]*])/.exec(s),l=c?s.slice(0,c.index):s,f=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)&&!r.allowPrototypes)return;f.push(l)}for(var h=0;r.depth>0&&null!==(c=a.exec(s))&&h<r.depth;){if(h+=1,!r.plainObjects&&i.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(c[1])}if(c){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");f.push("["+s.slice(c.index)+"]")}return function(e,t,r,i){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var s=e.slice(0,-1).join("");o=Array.isArray(t)&&t[s]?t[s].length:0}for(var a=i?t:u(t,r,o),c=e.length-1;c>=0;--c){var l,f=e[c];if("[]"===f&&r.parseArrays)l=r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:n.combine([],a);else{l=r.plainObjects?{__proto__:null}:{};var h="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,d=r.decodeDotInKeys?h.replace(/%2E/g,"."):h,p=parseInt(d,10);r.parseArrays||""!==d?!isNaN(p)&&f!==d&&String(p)===d&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(l=[])[p]=a:"__proto__"!==d&&(l[d]=a):l={0:a}}a=l}return a}(f,t,r,o)}};e.exports=function(e,t){var r=function(e){if(!e)return s;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");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");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?s.charset:e.charset,r=void 0===e.duplicates?s.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||s.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:s.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var l="string"==typeof e?function(e,t){var r={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=t.parameterLimit===1/0?void 0:t.parameterLimit,f=c.split(t.delimiter,t.throwOnLimitExceeded?l+1:l);if(t.throwOnLimitExceeded&&f.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var h,d=-1,p=t.charset;if(t.charsetSentinel)for(h=0;h<f.length;++h)0===f[h].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[h]?p="utf-8":"utf8=%26%2310003%3B"===f[h]&&(p="iso-8859-1"),d=h,h=f.length);for(h=0;h<f.length;++h)if(h!==d){var g,y,v=f[h],m=v.indexOf("]="),w=-1===m?v.indexOf("="):m+1;-1===w?(g=t.decoder(v,s.decoder,p,"key"),y=t.strictNullHandling?null:""):(g=t.decoder(v.slice(0,w),s.decoder,p,"key"),y=n.maybeMap(u(v.slice(w+1),t,o(r[g])?r[g].length:0),function(e){return t.decoder(e,s.decoder,p,"value")})),y&&t.interpretNumericEntities&&"iso-8859-1"===p&&(y=a(String(y))),v.indexOf("[]=")>-1&&(y=o(y)?[y]:y);var b=i.call(r,g);b&&"combine"===t.duplicates?r[g]=n.combine(r[g],y):b&&"last"!==t.duplicates||(r[g]=y)}return r}(e,r):e,f=r.plainObjects?{__proto__:null}:{},h=Object.keys(l),d=0;d<h.length;++d){var p=h[d],g=c(p,l[p],r,"string"==typeof e);f=n.merge(f,g,r)}return!0===r.allowSparse?f:n.compact(f)}},63009:function(e,t,r){var n;e.exports=(n=r(19021),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(a[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],l=r[5],f=r[6],h=r[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,y=c[d-2],v=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[d]=g+c[d-7]+v+c[d-16]}var m=n&i^n&o^i&o,w=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&f)+u[d]+c[d];h=f,f=l,l=a,a=s+b|0,s=o,o=i,i=n,n=b+(w+m)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),n.SHA256)},64039:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(41333);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},65388:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(51024);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(70165);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(15413);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var s=r(82110);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})},65494:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},66743:(e,t,r)=>{"use strict";var n=r(89353);e.exports=Function.prototype.bind||n},67526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),l=0,f=u>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},68002:e=>{"use strict";e.exports=Math.min},68414:(e,t,r)=>{var n=r(41033),i=r(12550),o=i;o.v1=n,o.v4=i,e.exports=o},69258:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(71195),i=r(32038),o=r(33523),s=r(23469),a=r(18086),u=r(77226),c=function(){function e(e){(0,s.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new i.Sha256(e):(0,a.isMsWindow)((0,u.locateWindow)())?this.hash=new n.Sha256(e):this.hash=new o.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},69383:e=>{"use strict";e.exports=Error},69675:e=>{"use strict";e.exports=TypeError},70165:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},70414:e=>{"use strict";e.exports=Math.round},70453:(e,t,r)=>{"use strict";var n,i=r(79612),o=r(69383),s=r(41237),a=r(79290),u=r(79538),c=r(58068),l=r(69675),f=r(35345),h=r(71514),d=r(58968),p=r(6188),g=r(68002),y=r(75880),v=r(70414),m=r(73093),w=Function,b=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},S=r(75795),_=r(30655),A=function(){throw new l},E=S?function(){try{return A}catch(e){try{return S(arguments,"callee").get}catch(e){return A}}}():A,I=r(64039)(),C=r(93628),P=r(71064),T=r(48648),U=r(11002),O=r(10076),k={},M="undefined"!=typeof Uint8Array&&C?C(Uint8Array):n,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":I&&C?C([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":k,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&C?C(C([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&I&&C?C((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&I&&C?C((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&C?C(""[Symbol.iterator]()):n,"%Symbol%":I?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":E,"%TypedArray%":M,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":U,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":P,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":v,"%Math.sign%":m,"%Reflect.getPrototypeOf%":T};if(C)try{null.error}catch(e){var R=C(C(e));x["%Error.prototype%"]=R}var D=function e(t){var r;if("%AsyncFunction%"===t)r=b("async function () {}");else if("%GeneratorFunction%"===t)r=b("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=b("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&C&&(r=C(i.prototype))}return x[t]=r,r},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=r(66743),j=r(9957),L=N.call(O,Array.prototype.concat),B=N.call(U,Array.prototype.splice),q=N.call(O,String.prototype.replace),K=N.call(O,String.prototype.slice),H=N.call(O,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,W=function(e,t){var r,n=e;if(j(F,n)&&(n="%"+(r=F[n])[0]+"%"),j(x,n)){var i=x[n];if(i===k&&(i=D(n)),void 0===i&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=K(e,0,1),r=K(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return q(e,V,function(e,t,r,i){n[n.length]=r?q(i,z,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",i=W("%"+n+"%",t),o=i.name,s=i.value,a=!1,u=i.alias;u&&(n=u[0],B(r,L([0,1],u)));for(var f=1,h=!0;f<r.length;f+=1){var d=r[f],p=K(d,0,1),g=K(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===g||"'"===g||"`"===g)&&p!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==d&&h||(a=!0),j(x,o="%"+(n+="."+d)+"%"))s=x[o];else if(null!=s){if(!(d in s)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&f+1>=r.length){var y=S(s,d);s=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else h=j(s,d),s=s[d];h&&!a&&(x[o]=s)}}return s}},71064:(e,t,r)=>{"use strict";var n=r(79612);e.exports=n.getPrototypeOf||null},71195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(85787),i=r(14955),o=r(17620),s=r(77226),a=function(){function e(e){e?(this.operation=function(e){return new Promise(function(t,r){var n=(0,s.locateWindow)().msCrypto.subtle.importKey("raw",u(e),i.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),r(new Error("ImportKey completed without importing key."))},n.onerror=function(){r(new Error("ImportKey failed to import key."))}})}(e).then(function(e){return(0,s.locateWindow)().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,e)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,s.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,n.isEmptyData)(e)||(this.operation=this.operation.then(function(r){return r.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},r.process(u(e)),r}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(e){return new Promise(function(t,r){e.onerror=function(){r(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),r(new Error("Error encountered finalizing hash"))},e.finish()})})},e}();function u(e){return"string"==typeof e?(0,o.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},71514:e=>{"use strict";e.exports=Math.abs},72271:(e,t,r)=>{"use strict";var n=r(70453),i=r(36556),o=r(58859),s=r(80507),a=r(69675),u=n("%WeakMap%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),h=i("WeakMap.prototype.delete",!0);e.exports=u?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+o(e))},delete:function(r){if(u&&r&&("object"==typeof r||"function"==typeof r)){if(e)return h(e,r)}else if(s&&t)return t.delete(r);return!1},get:function(r){return u&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):t&&t.get(r)},has:function(r){return u&&r&&("object"==typeof r||"function"==typeof r)&&e?f(e,r):!!t&&t.has(r)},set:function(r,n){u&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new u),l(e,r,n)):s&&(t||(t=s()),t.set(r,n))}};return r}:s},73093:(e,t,r)=>{"use strict";var n=r(94459);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},73126:(e,t,r)=>{"use strict";var n=r(66743),i=r(69675),o=r(10076),s=r(13144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return s(n,o,e)}},74765:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},75795:(e,t,r)=>{"use strict";var n=r(6549);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},75880:e=>{"use strict";e.exports=Math.pow},76782:(e,t,r)=>{"use strict";function n(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,r){o.push(t=t.toLowerCase()),s.push([t,r]),a[t]=a[t]?a[t]+","+r:r}),r(u())},i.onerror=n,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)})}r.r(t),r.d(t,{default:()=>n})},77226:(e,t,r)=>{"use strict";r.r(t),r.d(t,{locateWindow:()=>i});const n={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:n}},79290:e=>{"use strict";e.exports=RangeError},79538:e=>{"use strict";e.exports=ReferenceError},79612:e=>{"use strict";e.exports=Object},80256:(e,t,r)=>{"use strict";r.r(t),r.d(t,{fromUtf8:()=>n,toUtf8:()=>i});const n=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let r=0,n=e.length;r<n;r++){const n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(r+1<e.length&&55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))){const i=65536+((1023&n)<<10)+(1023&e.charCodeAt(++r));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n<128)t+=String.fromCharCode(n);else if(192<=n&&n<224){const i=e[++r];t+=String.fromCharCode((31&n)<<6|63&i)}else if(240<=n&&n<365){const i="%"+[n,e[++r],e[++r],e[++r]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t})(e)},80507:(e,t,r)=>{"use strict";var n=r(70453),i=r(36556),o=r(58859),s=r(69675),a=n("%Map%",!0),u=i("Map.prototype.get",!0),c=i("Map.prototype.set",!0),l=i("Map.prototype.has",!0),f=i("Map.prototype.delete",!0),h=i("Map.prototype.size",!0);e.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new s("Side channel does not contain "+o(e))},delete:function(t){if(e){var r=f(e,t);return 0===h(e)&&(e=void 0),r}return!1},get:function(t){if(e)return u(e,t)},has:function(t){return!!e&&l(e,t)},set:function(t,r){e||(e=new a),c(e,t,r)}};return t}},80754:function(e,t,r){var n,i,o;e.exports=(n=r(19021),o=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var s=(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;a<4&&o+.75*a<r;a++)i.push(n.charAt(s>>>6*(3-a)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i<r.length;i++)n[r.charCodeAt(i)]=i}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return function(e,t,r){for(var n=[],i=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;n[i>>>2]|=a<<24-i%4*8,i++}return o.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},82110:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},85787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},88835:(e,t,r)=>{"use strict";var n=r(61270);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(55373);function m(e,t,r){if(e&&"object"==typeof e&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var m=e=u.join(s);if(m=m.trim(),!r&&1===e.split("#").length){var w=a.exec(m);if(w)return this.path=m,this.href=m,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var b=o.exec(m);if(b){var S=(b=b[0]).toLowerCase();this.protocol=S,m=m.substr(b.length)}if(r||b||m.match(/^\/\/[^@/]+@[^@/]+/)){var _="//"===m.substr(0,2);!_||b&&g[b]||(m=m.substr(2),this.slashes=!0)}if(!g[b]&&(_||b&&!y[b])){for(var A,E,I=-1,C=0;C<f.length;C++)-1!==(P=m.indexOf(f[C]))&&(-1===I||P<I)&&(I=P);for(-1!==(E=-1===I?m.lastIndexOf("@"):m.lastIndexOf("@",I))&&(A=m.slice(0,E),m=m.slice(E+1),this.auth=decodeURIComponent(A)),I=-1,C=0;C<l.length;C++){var P;-1!==(P=m.indexOf(l[C]))&&(-1===I||P<I)&&(I=P)}-1===I&&(I=m.length),this.host=m.slice(0,I),m=m.slice(I),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var U=this.hostname.split(/\./),O=(C=0,U.length);C<O;C++){var k=U[C];if(k&&!k.match(h)){for(var M="",x=0,R=k.length;x<R;x++)k.charCodeAt(x)>127?M+="x":M+=k[x];if(!M.match(h)){var D=U.slice(0,C),F=U.slice(C+1),N=k.match(d);N&&(D.push(N[1]),F.unshift(N[2])),F.length&&(m="/"+F.join(".")+m),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var j=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+j,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!p[S])for(C=0,O=c.length;C<O;C++){var B=c[C];if(-1!==m.indexOf(B)){var q=encodeURIComponent(B);q===B&&(q=escape(B)),m=m.split(B).join(q)}}var K=m.indexOf("#");-1!==K&&(this.hash=m.substr(K),m=m.slice(0,K));var H=m.indexOf("?");if(-1!==H?(this.search=m.substr(H),this.query=m.substr(H+1),t&&(this.query=v.parse(this.query)),m=m.slice(0,H)):t&&(this.search="",this.query={}),m&&(this.pathname=m),y[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var V=this.search||"";this.path=j+V}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(o=v.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(m(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if("string"==typeof e){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var c=a[u];"protocol"!==c&&(r[c]=e[c])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var h=l[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var p=r.pathname||"",v=r.search||"";r.path=p+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=w||m||r.host&&e.pathname,S=b,_=r.pathname&&r.pathname.split("/")||[],A=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===_[0]?_[0]=r.host:_.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),b=b&&(""===d[0]||""===_[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search)return A&&(r.host=_.shift(),r.hostname=r.host,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)),r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=_.slice(-1)[0],I=(r.host||e.host||_.length>1)&&("."===E||".."===E)||""===E,C=0,P=_.length;P>=0;P--)"."===(E=_[P])?_.splice(P,1):".."===E?(_.splice(P,1),C++):C&&(_.splice(P,1),C--);if(!b&&!S)for(;C--;C)_.unshift("..");!b||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),I&&"/"!==_.join("/").substr(-1)&&_.push("");var T,U=""===_[0]||_[0]&&"/"===_[0].charAt(0);return A&&(r.hostname=U?"":_.length?_.shift():"",r.host=r.hostname,(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname)),(b=b||r.host&&_.length)&&!U&&_.unshift(""),_.length>0?r.pathname=_.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.qg=m},89353:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r};e.exports=function(e){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,s=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),a=r(0,i.length-s.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(o=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(u)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof o){var t=i.apply(this,n(s,arguments));return Object(t)===t?t:this}return i.apply(e,n(s,arguments))}),i.prototype){var l=function(){};l.prototype=i.prototype,o.prototype=new l,l.prototype=null}return o}},90304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},93628:(e,t,r)=>{"use strict";var n=r(48648),i=r(71064),o=r(7176);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},94459:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},98636:(e,t,r)=>{"use strict";var n=r(920),i=r(37720),o=r(74765),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,h=o.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},p={},g=function e(t,r,o,s,a,c,f,h,g,y,v,m,w,b,S,_,A,E){for(var I,C=t,P=E,T=0,U=!1;void 0!==(P=P.get(p))&&!U;){var O=P.get(t);if(T+=1,void 0!==O){if(O===T)throw new RangeError("Cyclic object value");U=!0}void 0===P.get(p)&&(T=0)}if("function"==typeof y?C=y(r,C):C instanceof Date?C=w(C):"comma"===o&&u(C)&&(C=i.maybeMap(C,function(e){return e instanceof Date?w(e):e})),null===C){if(c)return g&&!_?g(r,d.encoder,A,"key",b):r;C=""}if("string"==typeof(I=C)||"number"==typeof I||"boolean"==typeof I||"symbol"==typeof I||"bigint"==typeof I||i.isBuffer(C))return g?[S(_?r:g(r,d.encoder,A,"key",b))+"="+S(g(C,d.encoder,A,"value",b))]:[S(r)+"="+S(String(C))];var k,M=[];if(void 0===C)return M;if("comma"===o&&u(C))_&&g&&(C=i.maybeMap(C,g)),k=[{value:C.length>0?C.join(",")||null:void 0}];else if(u(y))k=y;else{var x=Object.keys(C);k=v?x.sort(v):x}var R=h?String(r).replace(/\./g,"%2E"):String(r),D=s&&u(C)&&1===C.length?R+"[]":R;if(a&&u(C)&&0===C.length)return D+"[]";for(var F=0;F<k.length;++F){var N=k[F],j="object"==typeof N&&N&&void 0!==N.value?N.value:C[N];if(!f||null!==j){var L=m&&h?String(N).replace(/\./g,"%2E"):String(N),B=u(C)?"function"==typeof o?o(D,L):D:D+(m?"."+L:"["+L+"]");E.set(t,T);var q=n();q.set(p,E),l(M,e(j,B,o,s,a,c,f,h,"comma"===o&&_&&u(C)?null:g,y,v,m,w,b,S,_,A,q))}}return M};e.exports=function(e,t){var r,i=e,c=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||d.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 r=o.default;if(void 0!==e.format){if(!s.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n,i=o.formatters[r],c=d.filter;if(("function"==typeof e.filter||u(e.filter))&&(c=e.filter),n=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:l,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:c,format:r,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(r=c.filter);var f=[];if("object"!=typeof i||null===i)return"";var h=a[c.arrayFormat],p="comma"===h&&c.commaRoundTrip;r||(r=Object.keys(i)),c.sort&&r.sort(c.sort);for(var y=n(),v=0;v<r.length;++v){var m=r[v],w=i[m];c.skipNulls&&null===w||l(f,g(w,m,h,p,c.allowEmptyArrays,c.strictNullHandling,c.skipNulls,c.encodeDotInKeys,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,y))}var b=f.join(c.delimiter),S=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),b.length>0?S+b:""}}}]);