@saasquatch/mint-components 2.5.5-1 → 2.5.5

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 (1068) hide show
  1. package/dist/cjs/AsYouType-5f15a922.js +4764 -0
  2. package/dist/cjs/{ErrorView-17578c10.js → ErrorView-8f6cf1cb.js} +1 -1
  3. package/dist/cjs/{GenericTableView-4c48c630.js → GenericTableView-12d35117.js} +17 -15
  4. package/dist/cjs/{JSS-8503a151.js → JSS-bf8078e9.js} +342 -338
  5. package/dist/cjs/{ShadowViewAddon-f57cb460.js → ShadowViewAddon-ee16ec1d.js} +312 -292
  6. package/dist/cjs/{copy-text-view-bb2c0ea7.js → copy-text-view-49517b2a.js} +2 -2
  7. package/dist/cjs/{data-ae38fa86.js → data-77273531.js} +5 -5
  8. package/dist/cjs/demoMerge-6f125494.js +203 -0
  9. package/dist/cjs/{dom-context-hooks.module-e7b6727c.js → dom-context-hooks.module-735c3942.js} +133 -76
  10. package/dist/cjs/{email-registration-view-306c8878.js → email-registration-view-36a74293.js} +10 -9
  11. package/dist/cjs/{global-3ba30270.js → global-973bc63c.js} +587 -583
  12. package/dist/cjs/{index.module-3221a469.js → index-8530c62f.js} +2911 -511
  13. package/dist/cjs/{index-8277cbb3.js → index-d41c2c94.js} +766 -340
  14. package/dist/cjs/{index-8c6255f5.js → index-f1dd6136.js} +47 -29
  15. package/dist/cjs/{jsonpointer-11327262.js → jsonpointer-0db21316.js} +8 -4
  16. package/dist/cjs/loader.cjs.js +6 -5
  17. package/dist/cjs/{luxon-c1ad356a.js → luxon-d3612a3d.js} +486 -299
  18. package/dist/cjs/mint-components.cjs.js +11 -7
  19. package/dist/cjs/{mockRewardData-ed603fca.js → mockRewardData-e6a0a048.js} +5 -3
  20. package/dist/cjs/{parseStates-d1effc19.js → parseStates-35013ba4.js} +3 -0
  21. package/dist/cjs/raisins-plop-target.cjs.entry.js +1 -1
  22. package/dist/cjs/{re-render-34b36aca.js → re-render-51c48d7c.js} +5 -5
  23. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +399 -1395
  24. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +818 -2891
  25. package/dist/cjs/{sqm-close-button-view-e9f2a454.js → sqm-close-button-view-74e5e1e9.js} +2 -2
  26. package/dist/cjs/sqm-close-button.cjs.entry.js +6 -11
  27. package/dist/cjs/sqm-code-verification.cjs.entry.js +20 -47
  28. package/dist/cjs/sqm-context-router.cjs.entry.js +9 -8
  29. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +71 -182
  30. package/dist/cjs/sqm-empty_4.cjs.entry.js +21 -58
  31. package/dist/cjs/sqm-form-message_2.cjs.entry.js +7 -19
  32. package/dist/cjs/sqm-google-sign-in.cjs.entry.js +10 -9
  33. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +11 -10
  34. package/dist/cjs/sqm-header-logo.cjs.entry.js +4 -19
  35. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +14 -89
  36. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +6 -8
  37. package/dist/cjs/{sqm-lead-checkbox-field-view-d6df81c7.js → sqm-lead-checkbox-field-view-24ac7358.js} +12 -11
  38. package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +14 -30
  39. package/dist/cjs/sqm-lead-input-field-view-7dfbc714.js +52 -0
  40. package/dist/cjs/sqm-lead-input-field.cjs.entry.js +15 -31
  41. package/dist/cjs/{sqm-leaderboard-rank-view-67fd7934.js → sqm-leaderboard-rank-view-e992762c.js} +1 -1
  42. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +25 -22
  43. package/dist/cjs/{sqm-logout-current-user-view-f330d641.js → sqm-logout-current-user-view-ebee238e.js} +2 -2
  44. package/dist/cjs/sqm-logout-current-user.cjs.entry.js +17 -28
  45. package/dist/cjs/{sqm-navigation-sidebar-item-view-9134e64e.js → sqm-navigation-sidebar-item-view-a2cab80e.js} +4 -4
  46. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +23 -18
  47. package/dist/cjs/{sqm-navigation-sidebar-view-6616e3e0.js → sqm-navigation-sidebar-view-873e0c44.js} +2 -2
  48. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +12 -17
  49. package/dist/cjs/sqm-pagination_3.cjs.entry.js +40 -102
  50. package/dist/cjs/{sqm-partner-info-modal-view-6173c618.js → sqm-partner-info-modal-view-c8972001.js} +4 -4
  51. package/dist/cjs/sqm-password-field.cjs.entry.js +186 -86
  52. package/dist/cjs/sqm-popup-container.cjs.entry.js +12 -12
  53. package/dist/cjs/{sqm-portal-container-view-757f921b.js → sqm-portal-container-view-c0cf9af9.js} +2 -2
  54. package/dist/cjs/{sqm-portal-email-verification-view-38d8344c.js → sqm-portal-email-verification-view-92866725.js} +4 -4
  55. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +22 -52
  56. package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +101 -429
  57. package/dist/cjs/sqm-portal-logout.cjs.entry.js +7 -13
  58. package/dist/cjs/{sqm-portal-profile-view-062eda68.js → sqm-portal-profile-view-60e78cdb.js} +20 -17
  59. package/dist/cjs/sqm-portal-profile.cjs.entry.js +20 -56
  60. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +11 -24
  61. package/dist/cjs/{sqm-portal-registration-form-view-a45f7a52.js → sqm-portal-registration-form-view-5473e24d.js} +26 -21
  62. package/dist/cjs/{sqm-portal-reset-password-view-b2c546bd.js → sqm-portal-reset-password-view-7a6f55c5.js} +3 -3
  63. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +21 -89
  64. package/dist/cjs/{sqm-portal-verify-email-view-2a120d0a.js → sqm-portal-verify-email-view-7efa70c9.js} +48 -45
  65. package/dist/cjs/{sqm-qr-code-view-0d43424e.js → sqm-qr-code-view-70da70f9.js} +3 -3
  66. package/dist/cjs/sqm-qr-code.cjs.entry.js +22 -48
  67. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +37 -140
  68. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +5 -4
  69. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -7
  70. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +98 -217
  71. package/dist/cjs/sqm-route.cjs.entry.js +2 -1
  72. package/dist/cjs/sqm-scroll.cjs.entry.js +12 -8
  73. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2892 -2264
  74. package/dist/cjs/sqm-tab.cjs.entry.js +5 -4
  75. package/dist/cjs/sqm-tabs.cjs.entry.js +9 -8
  76. package/dist/cjs/{sqm-text-span-view-b9e10f5d.js → sqm-text-span-view-c6938acd.js} +2 -2
  77. package/dist/cjs/sqm-text-span.cjs.entry.js +8 -4
  78. package/dist/cjs/{sqm-user-info-form-view-aedca5fe.js → sqm-user-info-form-view-e878a9a3.js} +173 -163
  79. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +6 -11
  80. package/dist/cjs/subregions-3dbacb18.js +1467 -0
  81. package/dist/cjs/{useChildElements-36f7e4bb.js → useChildElements-e5e26816.js} +3 -3
  82. package/dist/cjs/{useIndirectTaxForm-7656fc63.js → useIndirectTaxForm-691691c2.js} +42 -38
  83. package/dist/cjs/{useInstantAccessRegistration-43514e50.js → useInstantAccessRegistration-9201777d.js} +6 -6
  84. package/dist/cjs/{useLeadFormState-34f9834b.js → useLeadFormState-f5b768b9.js} +20 -20
  85. package/dist/cjs/{usePortalRegistrationForm-b18a1f6b.js → usePortalRegistrationForm-b3c0451b.js} +16 -13
  86. package/dist/cjs/{useReferralCodes-25d5320a.js → useReferralCodes-5794a177.js} +11 -11
  87. package/dist/cjs/{useReferralTable-ad86986b.js → useReferralTable-32b3541b.js} +19 -19
  88. package/dist/cjs/{useRegistrationFormState-ea81d55a.js → useRegistrationFormState-feccd2c8.js} +3 -3
  89. package/dist/cjs/{useVerificationEmail-70aad5f1.js → useVerificationEmail-f0807562.js} +17 -15
  90. package/dist/cjs/{utilities-dfc34bea.js → utilities-04345466.js} +3 -3
  91. package/dist/collection/ShadowViewAddon.js +1 -2
  92. package/dist/collection/collection-manifest.json +2 -2
  93. package/dist/collection/components/raisins-plop-target/raisins-plop-target.js +36 -34
  94. package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +3 -7
  95. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +11 -23
  96. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +11 -27
  97. package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +2 -16
  98. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +1 -4
  99. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +294 -298
  100. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +3 -3
  101. package/dist/collection/components/sqm-brand/SqmBrand.stories.js +4 -72
  102. package/dist/collection/components/sqm-brand/sqm-brand.js +61 -58
  103. package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +43 -120
  104. package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +1 -5
  105. package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +55 -59
  106. package/dist/collection/components/sqm-checkbox-field/CheckboxField.stories.js +17 -22
  107. package/dist/collection/components/sqm-checkbox-field/UseCheckboxField.stories.js +5 -19
  108. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +18 -21
  109. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +167 -179
  110. package/dist/collection/components/sqm-close-button/CloseButton.stories.js +3 -5
  111. package/dist/collection/components/sqm-close-button/sqm-close-button-view.js +1 -5
  112. package/dist/collection/components/sqm-close-button/sqm-close-button.js +32 -35
  113. package/dist/collection/components/sqm-context-router/ContextRouter.js +4 -33
  114. package/dist/collection/components/sqm-context-router/sqm-context-router.js +39 -33
  115. package/dist/collection/components/sqm-coupon-code/CouponCode.stories.js +13 -13
  116. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +1 -7
  117. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +601 -695
  118. package/dist/collection/components/sqm-coupon-code/useCouponCode.js +10 -5
  119. package/dist/collection/components/sqm-divided-layout/DividedLayout.stories.js +19 -36
  120. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +1 -5
  121. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +129 -135
  122. package/dist/collection/components/sqm-dropdown-field/DropdownField.stories.js +7 -7
  123. package/dist/collection/components/sqm-dropdown-field/UseDropdownField.stories.js +3 -15
  124. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +13 -15
  125. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +128 -133
  126. package/dist/collection/components/sqm-edit-profile/EditProfileForm.stories.js +2 -2
  127. package/dist/collection/components/sqm-edit-profile/UseEditProfile.stories.js +9 -9
  128. package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +27 -45
  129. package/dist/collection/components/sqm-edit-profile/sqm-edit-profile.js +272 -264
  130. package/dist/collection/components/sqm-edit-profile/useEditProfile.js +4 -3
  131. package/dist/collection/components/sqm-empty/EmptyState.stories.js +4 -7
  132. package/dist/collection/components/sqm-empty/sqm-empty-view.js +6 -12
  133. package/dist/collection/components/sqm-empty/sqm-empty.js +102 -95
  134. package/dist/collection/components/sqm-form-message/FormMessage.stories.js +9 -27
  135. package/dist/collection/components/sqm-form-message/sqm-form-message.js +102 -108
  136. package/dist/collection/components/sqm-google-sign-in/sqm-google-sign-in.js +61 -56
  137. package/dist/collection/components/sqm-graphql-client-provider/sqm-graphql-client-provider.js +32 -28
  138. package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +147 -161
  139. package/dist/collection/components/sqm-hero/Hero.stories.js +20 -54
  140. package/dist/collection/components/sqm-hero/sqm-hero-view.js +5 -11
  141. package/dist/collection/components/sqm-hero/sqm-hero.js +177 -202
  142. package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +9 -26
  143. package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +533 -590
  144. package/dist/collection/components/sqm-hook-story-container/sqm-hook-story-container.js +28 -23
  145. package/dist/collection/components/sqm-image/sqm-image-view.js +1 -6
  146. package/dist/collection/components/sqm-image/sqm-image.js +131 -131
  147. package/dist/collection/components/sqm-input-field/InputField.stories.js +17 -17
  148. package/dist/collection/components/sqm-input-field/UseInputField.stories.js +7 -22
  149. package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +14 -15
  150. package/dist/collection/components/sqm-input-field/sqm-input-field.js +156 -162
  151. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +410 -481
  152. package/dist/collection/components/sqm-invoice-table/InvoiceTable.stories.js +2 -18
  153. package/dist/collection/components/sqm-invoice-table/UseInvoiceTable.stories.js +2 -14
  154. package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-data-cell.js +27 -23
  155. package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-date-cell.js +44 -40
  156. package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-download-cell.js +29 -29
  157. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.js +85 -80
  158. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.js +68 -64
  159. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.js +40 -39
  160. package/dist/collection/components/sqm-invoice-table/sqm-invoice-table-view.js +1 -8
  161. package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +287 -310
  162. package/dist/collection/components/sqm-invoice-table/useInvoiceTable.js +1 -3
  163. package/dist/collection/components/sqm-lead-form/LeadCheckboxField.stories.js +7 -7
  164. package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +6 -10
  165. package/dist/collection/components/sqm-lead-form/LeadFormDropdownField.stories.js +10 -10
  166. package/dist/collection/components/sqm-lead-form/LeadInputField.stories.js +7 -7
  167. package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field-view.js +20 -24
  168. package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field.js +167 -179
  169. package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field-view.js +13 -17
  170. package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +174 -189
  171. package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +22 -48
  172. package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +365 -420
  173. package/dist/collection/components/sqm-lead-form/sqm-lead-input-field-view.js +13 -16
  174. package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +179 -191
  175. package/dist/collection/components/sqm-lead-form/useLeadForm.js +3 -1
  176. package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +23 -29
  177. package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +3 -15
  178. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +11 -35
  179. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +553 -563
  180. package/dist/collection/components/sqm-leaderboard-rank/LeaderboardRank.stories.js +3 -12
  181. package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +200 -192
  182. package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +4 -3
  183. package/dist/collection/components/sqm-link-button/LinkButton.stories.js +2 -2
  184. package/dist/collection/components/sqm-link-button/sqm-link-button-view.js +1 -6
  185. package/dist/collection/components/sqm-link-button/sqm-link-button.js +73 -77
  186. package/dist/collection/components/sqm-logout-current-user/LogoutCurrentUser.stories.js +1 -1
  187. package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user-view.js +1 -9
  188. package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +106 -115
  189. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +104 -109
  190. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -2
  191. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +21 -20
  192. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +104 -109
  193. package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu-view.js +6 -9
  194. package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu.js +92 -82
  195. package/dist/collection/components/sqm-navigation-sidebar/NavigationSidebar.stories.js +1 -3
  196. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +1 -8
  197. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar.js +71 -73
  198. package/dist/collection/components/sqm-navigation-sidebar-item/SidebarItem.stories.js +2 -2
  199. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +1 -4
  200. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +315 -308
  201. package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +1 -9
  202. package/dist/collection/components/sqm-pagination/sqm-pagination.js +94 -100
  203. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +13 -13
  204. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +22 -54
  205. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +515 -603
  206. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +3 -3
  207. package/dist/collection/components/sqm-password-field/passwordValidation.js +8 -20
  208. package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +16 -18
  209. package/dist/collection/components/sqm-password-field/sqm-password-field.js +197 -219
  210. package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -7
  211. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -4
  212. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +82 -84
  213. package/dist/collection/components/sqm-popup-container/PopupContainer.stories.js +1 -2
  214. package/dist/collection/components/sqm-popup-container/sqm-popup-container-view.js +1 -5
  215. package/dist/collection/components/sqm-popup-container/sqm-popup-container.js +161 -155
  216. package/dist/collection/components/sqm-portal-change-marketing/ChangeMarketing.stories.js +5 -5
  217. package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing-view.js +8 -17
  218. package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing.js +142 -154
  219. package/dist/collection/components/sqm-portal-change-password/ChangePassword.stories.js +6 -6
  220. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +8 -24
  221. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +380 -436
  222. package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +5 -2
  223. package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +16 -119
  224. package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +1 -5
  225. package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +280 -299
  226. package/dist/collection/components/sqm-portal-email-verification/PortalEmailVerification.stories.js +5 -5
  227. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +13 -25
  228. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +216 -243
  229. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
  230. package/dist/collection/components/sqm-portal-footer/PortalFooter.stories.js +6 -6
  231. package/dist/collection/components/sqm-portal-footer/PoweredByImg.js +1 -12
  232. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +6 -16
  233. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +317 -351
  234. package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -4
  235. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +1 -14
  236. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +279 -316
  237. package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +2 -1
  238. package/dist/collection/components/sqm-portal-frame/PortalFrame.stories.js +14 -55
  239. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +1 -7
  240. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +141 -158
  241. package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +295 -342
  242. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +19 -26
  243. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +645 -749
  244. package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +2 -5
  245. package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +1 -17
  246. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +255 -292
  247. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
  248. package/dist/collection/components/sqm-portal-logout/sqm-portal-logout.js +33 -36
  249. package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +6 -6
  250. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +15 -26
  251. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +282 -314
  252. package/dist/collection/components/sqm-portal-protected-route/sqm-portal-protected-route.js +72 -82
  253. package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +8 -13
  254. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +15 -28
  255. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +525 -610
  256. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -1
  257. package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +10 -15
  258. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +20 -33
  259. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +573 -663
  260. package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +5 -2
  261. package/dist/collection/components/sqm-portal-reset-password/PortalResetPassword.stories.js +6 -6
  262. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +7 -29
  263. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +449 -514
  264. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +2 -1
  265. package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +2 -2
  266. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -14
  267. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +196 -222
  268. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +4 -2
  269. package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +20 -32
  270. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +1 -7
  271. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +84 -78
  272. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +4 -10
  273. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +231 -220
  274. package/dist/collection/components/sqm-program-menu/ProgramMenu.stories.js +8 -25
  275. package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +8 -9
  276. package/dist/collection/components/sqm-qr-code/QRCode.stories.js +8 -8
  277. package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +2 -11
  278. package/dist/collection/components/sqm-qr-code/sqm-qr-code.js +206 -230
  279. package/dist/collection/components/sqm-radio-card/RadioCard.stories.js +2 -2
  280. package/dist/collection/components/sqm-radio-card/sqm-radio-card-view.js +1 -9
  281. package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +29 -86
  282. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +3 -11
  283. package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +304 -335
  284. package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +14 -14
  285. package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +369 -410
  286. package/dist/collection/components/sqm-referral-code/useReferralCode.js +3 -3
  287. package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +9 -36
  288. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +3 -14
  289. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +167 -175
  290. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +2 -4
  291. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -3
  292. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +125 -132
  293. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +9 -24
  294. package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +1 -1
  295. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +5 -8
  296. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +1 -1
  297. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +30 -30
  298. package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +8 -30
  299. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-cell.js +28 -23
  300. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +44 -40
  301. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +219 -278
  302. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +81 -76
  303. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +24 -20
  304. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +65 -61
  305. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +120 -139
  306. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +260 -300
  307. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +208 -225
  308. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +124 -133
  309. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +229 -253
  310. package/dist/collection/components/sqm-referral-table/useReferralTable.js +1 -3
  311. package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +479 -557
  312. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +1 -1
  313. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +1 -0
  314. package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +5 -26
  315. package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +8 -18
  316. package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +26 -28
  317. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +96 -174
  318. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +618 -726
  319. package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +16 -31
  320. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +12 -15
  321. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +11 -11
  322. package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +8 -30
  323. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.js +45 -40
  324. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +44 -40
  325. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +97 -103
  326. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +160 -156
  327. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +336 -332
  328. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +96 -105
  329. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.js +67 -66
  330. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +127 -135
  331. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +173 -197
  332. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +390 -463
  333. package/dist/collection/components/sqm-rewards-table/mockRewardData.js +4 -2
  334. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +206 -219
  335. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -3
  336. package/dist/collection/components/sqm-route/sqm-route.js +31 -26
  337. package/dist/collection/components/sqm-router/Router.stories.js +4 -33
  338. package/dist/collection/components/sqm-router/sqm-router.js +17 -14
  339. package/dist/collection/components/sqm-scroll/Scroll.stories.js +6 -89
  340. package/dist/collection/components/sqm-scroll/sqm-scroll.js +259 -255
  341. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +12 -46
  342. package/dist/collection/components/sqm-share-button/UseShareButton.stories.js +2 -7
  343. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -6
  344. package/dist/collection/components/sqm-share-button/sqm-share-button.js +509 -521
  345. package/dist/collection/components/sqm-share-code/ShareCode.stories.js +13 -13
  346. package/dist/collection/components/sqm-share-code/sqm-share-code.js +329 -360
  347. package/dist/collection/components/sqm-share-code/useShareCode.js +3 -3
  348. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +85 -86
  349. package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +17 -20
  350. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +21 -49
  351. package/dist/collection/components/sqm-share-link/sqm-share-link.js +987 -1192
  352. package/dist/collection/components/sqm-share-link/useShareLink.js +3 -3
  353. package/dist/collection/components/sqm-skeleton/sqm-skeleton.js +55 -59
  354. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +1 -5
  355. package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +162 -185
  356. package/dist/collection/components/sqm-stencilbook/AutoColor.js +1 -1
  357. package/dist/collection/components/sqm-stencilbook/BrandSelector.js +12 -15
  358. package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +1 -5
  359. package/dist/collection/components/sqm-stencilbook/HookStoryAddon.js +1 -2
  360. package/dist/collection/components/sqm-stencilbook/Matrix.js +4 -13
  361. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +8 -13
  362. package/dist/collection/components/sqm-tab/sqm-tab.js +27 -25
  363. package/dist/collection/components/sqm-table-cell/sqm-table-cell.js +47 -49
  364. package/dist/collection/components/sqm-table-row/sqm-table-row.js +27 -30
  365. package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +10 -17
  366. package/dist/collection/components/sqm-tabs/sqm-tabs.js +62 -59
  367. package/dist/collection/components/sqm-tabs/useTabs.js +1 -2
  368. package/dist/collection/components/sqm-task-card/DetailsView.js +1 -7
  369. package/dist/collection/components/sqm-task-card/SVGs.js +3 -7
  370. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +31 -277
  371. package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +1 -17
  372. package/dist/collection/components/sqm-task-card/progress-bar/ProgressBar.stories.js +1 -1
  373. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +2 -10
  374. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +10 -13
  375. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +56 -83
  376. package/dist/collection/components/sqm-task-card/sqm-task-card.js +780 -860
  377. package/dist/collection/components/sqm-text/Text.stories.js +2 -4
  378. package/dist/collection/components/sqm-text/sqm-text.js +61 -57
  379. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -5
  380. package/dist/collection/components/sqm-text-span/sqm-text-span.js +109 -101
  381. package/dist/collection/components/sqm-timeline/SVGs.js +3 -9
  382. package/dist/collection/components/sqm-timeline/Timeline.stories.js +5 -57
  383. package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +1 -16
  384. package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +178 -166
  385. package/dist/collection/components/sqm-timeline/sqm-timeline.js +41 -45
  386. package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +5 -206
  387. package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +1 -4
  388. package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +129 -148
  389. package/dist/collection/components/sqm-user-attribute/UserAttribute.stories.js +4 -7
  390. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute-view.js +1 -3
  391. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute.js +146 -137
  392. package/dist/collection/components/sqm-user-name/sqm-user-name.js +82 -84
  393. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +6 -26
  394. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +215 -240
  395. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +12 -22
  396. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +12 -30
  397. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +177 -195
  398. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +33 -41
  399. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +776 -921
  400. package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +4 -2
  401. package/dist/collection/components/tax-and-cash/SVGs.js +1 -4
  402. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -3
  403. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +188 -198
  404. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +34 -83
  405. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +1864 -2210
  406. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +8 -7
  407. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +13 -31
  408. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +26 -53
  409. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +565 -660
  410. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +6 -3
  411. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +24 -63
  412. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +699 -816
  413. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +11 -7
  414. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +1 -4
  415. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +5 -20
  416. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +130 -147
  417. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +12 -33
  418. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +910 -1035
  419. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/ErrorView.js +1 -3
  420. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/LoadingView.js +2 -19
  421. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4760 -5686
  422. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +89 -176
  423. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +1857 -2159
  424. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +1 -0
  425. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +27 -27
  426. package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/DocusignExpiredView.js +5 -9
  427. package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.js +24 -44
  428. package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/SlotViews.stories.js +6 -6
  429. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +120 -157
  430. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +713 -823
  431. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -7
  432. package/dist/collection/components/views/EmailRegistration.stories.js +60 -60
  433. package/dist/collection/components/views/copy-text-view.js +6 -17
  434. package/dist/collection/components/views/email-registration-view.js +14 -28
  435. package/dist/collection/global/styles.js +8 -4
  436. package/dist/collection/stories/NewPortal.stories.js +106 -178
  437. package/dist/collection/tables/GenericTableView.js +19 -27
  438. package/dist/collection/tables/TableSlots.js +5 -19
  439. package/dist/collection/utils/DefaultTemplateView.js +6 -24
  440. package/dist/collection/utils/RequiredPropsError.js +10 -24
  441. package/dist/collection/utils/TemplateView.js +1 -3
  442. package/dist/collection/utils/demoMerge.js +10 -0
  443. package/dist/esm/AsYouType-cc09fa68.js +4746 -0
  444. package/dist/esm/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
  445. package/dist/esm/{GenericTableView-471a9386.js → GenericTableView-4f7ac63d.js} +17 -15
  446. package/dist/esm/{JSS-67b5cff8.js → JSS-e97b34f4.js} +341 -337
  447. package/dist/esm/{ShadowViewAddon-e1375e0d.js → ShadowViewAddon-0c8005bd.js} +284 -264
  448. package/dist/esm/{copy-text-view-87259b11.js → copy-text-view-e1c3f2cd.js} +2 -2
  449. package/dist/esm/{data-04d2da44.js → data-510cc9b7.js} +1 -1
  450. package/dist/esm/demoMerge-a0320a8e.js +201 -0
  451. package/dist/esm/{dom-context-hooks.module-50442785.js → dom-context-hooks.module-f88a3e54.js} +129 -72
  452. package/dist/esm/{email-registration-view-4cdb4129.js → email-registration-view-7a63a912.js} +10 -9
  453. package/dist/esm/{global-f019575d.js → global-cf0cc6b1.js} +586 -582
  454. package/dist/esm/{index-38ad4957.js → index-7a8b0c0b.js} +766 -341
  455. package/dist/esm/{index.module-cc08450c.js → index-b04013cc.js} +2873 -473
  456. package/dist/esm/{index-ffa26b43.js → index-e6f5153e.js} +47 -29
  457. package/dist/esm/{jsonpointer-388a7082.js → jsonpointer-c5423376.js} +8 -4
  458. package/dist/esm/loader.js +6 -5
  459. package/dist/esm/{luxon-1be92a8e.js → luxon-40b943cb.js} +486 -299
  460. package/dist/esm/mint-components.js +8 -7
  461. package/dist/esm/{mockRewardData-9b27d6f1.js → mockRewardData-2cceba7a.js} +5 -3
  462. package/dist/esm/{parseStates-ed75e224.js → parseStates-0c27f2de.js} +3 -1
  463. package/dist/esm/polyfills/css-shim.js +1 -1
  464. package/dist/esm/raisins-plop-target.entry.js +1 -1
  465. package/dist/esm/{re-render-380499f8.js → re-render-e911a0f7.js} +5 -5
  466. package/dist/esm/sqm-banking-info-form_10.entry.js +381 -1377
  467. package/dist/esm/sqm-big-stat_47.entry.js +767 -2840
  468. package/dist/esm/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +2 -2
  469. package/dist/esm/sqm-close-button.entry.js +5 -10
  470. package/dist/esm/sqm-code-verification.entry.js +19 -46
  471. package/dist/esm/sqm-context-router.entry.js +6 -5
  472. package/dist/esm/sqm-email-verification_2.entry.js +43 -154
  473. package/dist/esm/sqm-empty_4.entry.js +21 -58
  474. package/dist/esm/sqm-form-message_2.entry.js +7 -19
  475. package/dist/esm/sqm-google-sign-in.entry.js +4 -3
  476. package/dist/esm/sqm-graphql-client-provider.entry.js +9 -8
  477. package/dist/esm/sqm-header-logo.entry.js +4 -19
  478. package/dist/esm/sqm-instant-access-registration.entry.js +12 -87
  479. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +6 -8
  480. package/dist/esm/{sqm-lead-checkbox-field-view-04aa32a7.js → sqm-lead-checkbox-field-view-d055e7bd.js} +12 -11
  481. package/dist/esm/sqm-lead-checkbox-field.entry.js +12 -28
  482. package/dist/esm/sqm-lead-input-field-view-b0d62f1c.js +50 -0
  483. package/dist/esm/sqm-lead-input-field.entry.js +13 -29
  484. package/dist/esm/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
  485. package/dist/esm/sqm-leaderboard-rank.entry.js +22 -19
  486. package/dist/esm/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +2 -2
  487. package/dist/esm/sqm-logout-current-user.entry.js +12 -23
  488. package/dist/esm/{sqm-navigation-sidebar-item-view-40837457.js → sqm-navigation-sidebar-item-view-754b2484.js} +4 -4
  489. package/dist/esm/sqm-navigation-sidebar-item.entry.js +21 -16
  490. package/dist/esm/{sqm-navigation-sidebar-view-2b66457a.js → sqm-navigation-sidebar-view-e2094399.js} +2 -2
  491. package/dist/esm/sqm-navigation-sidebar.entry.js +11 -16
  492. package/dist/esm/sqm-pagination_3.entry.js +35 -97
  493. package/dist/esm/{sqm-partner-info-modal-view-e02fb63a.js → sqm-partner-info-modal-view-3b59be37.js} +4 -4
  494. package/dist/esm/sqm-password-field.entry.js +185 -85
  495. package/dist/esm/sqm-popup-container.entry.js +12 -12
  496. package/dist/esm/{sqm-portal-container-view-200c9df8.js → sqm-portal-container-view-fcd53673.js} +2 -2
  497. package/dist/esm/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +4 -4
  498. package/dist/esm/sqm-portal-email-verification.entry.js +18 -48
  499. package/dist/esm/sqm-portal-forgot-password_6.entry.js +73 -401
  500. package/dist/esm/sqm-portal-logout.entry.js +5 -11
  501. package/dist/esm/{sqm-portal-profile-view-41894261.js → sqm-portal-profile-view-f27adfba.js} +20 -17
  502. package/dist/esm/sqm-portal-profile.entry.js +16 -52
  503. package/dist/esm/sqm-portal-protected-route.entry.js +8 -21
  504. package/dist/esm/{sqm-portal-registration-form-view-79265df5.js → sqm-portal-registration-form-view-113e1969.js} +26 -21
  505. package/dist/esm/{sqm-portal-reset-password-view-c7dd1c01.js → sqm-portal-reset-password-view-f9fb6355.js} +3 -3
  506. package/dist/esm/sqm-portal-reset-password.entry.js +18 -86
  507. package/dist/esm/{sqm-portal-verify-email-view-c102aa7c.js → sqm-portal-verify-email-view-ee40e3f2.js} +48 -45
  508. package/dist/esm/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +3 -3
  509. package/dist/esm/sqm-qr-code.entry.js +18 -44
  510. package/dist/esm/sqm-referral-table_11.entry.js +36 -139
  511. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +5 -4
  512. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +4 -7
  513. package/dist/esm/sqm-rewards-table_9.entry.js +55 -174
  514. package/dist/esm/sqm-route.entry.js +2 -1
  515. package/dist/esm/sqm-scroll.entry.js +12 -8
  516. package/dist/esm/sqm-stencilbook.entry.js +4808 -4180
  517. package/dist/esm/sqm-tab.entry.js +5 -4
  518. package/dist/esm/sqm-tabs.entry.js +9 -8
  519. package/dist/esm/{sqm-text-span-view-72f43dff.js → sqm-text-span-view-ed92b3c6.js} +2 -2
  520. package/dist/esm/sqm-text-span.entry.js +8 -4
  521. package/dist/esm/{sqm-user-info-form-view-8a95c5eb.js → sqm-user-info-form-view-c044a385.js} +173 -163
  522. package/dist/esm/sqm-widget-verification-controller.entry.js +4 -9
  523. package/dist/esm/subregions-d9f177f6.js +1452 -0
  524. package/dist/esm/{useChildElements-aa9eb7c9.js → useChildElements-a69f208f.js} +3 -3
  525. package/dist/esm/{useIndirectTaxForm-8d2e873d.js → useIndirectTaxForm-64a3ca69.js} +32 -28
  526. package/dist/esm/{useInstantAccessRegistration-7b11eb02.js → useInstantAccessRegistration-8c678a5a.js} +6 -6
  527. package/dist/esm/{useLeadFormState-b67018f2.js → useLeadFormState-34e05463.js} +7 -7
  528. package/dist/esm/{usePortalRegistrationForm-91e5786d.js → usePortalRegistrationForm-c6519939.js} +14 -11
  529. package/dist/esm/{useReferralCodes-a0a271ca.js → useReferralCodes-d0a384e4.js} +9 -9
  530. package/dist/esm/{useReferralTable-670580ff.js → useReferralTable-214dff06.js} +11 -11
  531. package/dist/esm/{useRegistrationFormState-95a75c57.js → useRegistrationFormState-72b4786d.js} +3 -3
  532. package/dist/esm/{useVerificationEmail-99d9f705.js → useVerificationEmail-b2c349a3.js} +12 -10
  533. package/dist/esm/{utilities-23a276e0.js → utilities-ceab25cd.js} +2 -2
  534. package/dist/esm-es5/AsYouType-cc09fa68.js +1 -0
  535. package/dist/esm-es5/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
  536. package/dist/esm-es5/GenericTableView-4f7ac63d.js +1 -0
  537. package/dist/esm-es5/JSS-e97b34f4.js +8 -0
  538. package/dist/esm-es5/ShadowViewAddon-0c8005bd.js +1 -0
  539. package/dist/esm-es5/copy-text-view-e1c3f2cd.js +1 -0
  540. package/dist/esm-es5/data-510cc9b7.js +1 -0
  541. package/dist/esm-es5/demoMerge-a0320a8e.js +1 -0
  542. package/dist/esm-es5/dom-context-hooks.module-f88a3e54.js +53 -0
  543. package/dist/esm-es5/email-registration-view-7a63a912.js +1 -0
  544. package/dist/esm-es5/global-cf0cc6b1.js +271 -0
  545. package/dist/esm-es5/imageUrl-4775f17b.js +1 -1
  546. package/dist/esm-es5/index-7a8b0c0b.js +2 -0
  547. package/dist/esm-es5/index-b04013cc.js +1 -0
  548. package/dist/esm-es5/index-e6f5153e.js +1 -0
  549. package/dist/esm-es5/jsonpointer-c5423376.js +1 -0
  550. package/dist/esm-es5/loader.js +1 -1
  551. package/dist/esm-es5/luxon-40b943cb.js +1 -0
  552. package/dist/esm-es5/mint-components.js +1 -1
  553. package/dist/esm-es5/mockRewardData-2cceba7a.js +1 -0
  554. package/dist/esm-es5/parseStates-0c27f2de.js +1 -0
  555. package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
  556. package/dist/esm-es5/re-render-e911a0f7.js +1 -0
  557. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  558. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  559. package/dist/esm-es5/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +1 -1
  560. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  561. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  562. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  563. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  564. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  565. package/dist/esm-es5/sqm-form-message_2.entry.js +1 -1
  566. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  567. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  568. package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
  569. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  570. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -1
  571. package/dist/esm-es5/sqm-lead-checkbox-field-view-d055e7bd.js +1 -0
  572. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  573. package/dist/esm-es5/sqm-lead-input-field-view-b0d62f1c.js +1 -0
  574. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  575. package/dist/esm-es5/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
  576. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  577. package/dist/esm-es5/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +1 -1
  578. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  579. package/dist/esm-es5/sqm-navigation-sidebar-item-view-754b2484.js +1 -0
  580. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  581. package/dist/esm-es5/sqm-navigation-sidebar-view-e2094399.js +1 -0
  582. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  583. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  584. package/dist/esm-es5/sqm-partner-info-modal-view-3b59be37.js +1 -0
  585. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  586. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  587. package/dist/esm-es5/sqm-portal-container-view-fcd53673.js +1 -0
  588. package/dist/esm-es5/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +1 -1
  589. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  590. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  591. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  592. package/dist/esm-es5/sqm-portal-profile-view-f27adfba.js +1 -0
  593. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  594. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  595. package/dist/esm-es5/sqm-portal-registration-form-view-113e1969.js +1 -0
  596. package/dist/esm-es5/sqm-portal-reset-password-view-f9fb6355.js +1 -0
  597. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  598. package/dist/esm-es5/sqm-portal-verify-email-view-ee40e3f2.js +1 -0
  599. package/dist/esm-es5/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +1 -1
  600. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  601. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  602. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  603. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  604. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  605. package/dist/esm-es5/sqm-route.entry.js +1 -1
  606. package/dist/esm-es5/sqm-scroll.entry.js +1 -1
  607. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  608. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  609. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  610. package/dist/esm-es5/sqm-text-span-view-ed92b3c6.js +1 -0
  611. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  612. package/dist/esm-es5/sqm-user-info-form-view-c044a385.js +1 -0
  613. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  614. package/dist/esm-es5/subregions-d9f177f6.js +1 -0
  615. package/dist/esm-es5/useChildElements-a69f208f.js +1 -0
  616. package/dist/esm-es5/useIndirectTaxForm-64a3ca69.js +6 -0
  617. package/dist/esm-es5/useInstantAccessRegistration-8c678a5a.js +1 -0
  618. package/dist/esm-es5/useLeadFormState-34e05463.js +1 -0
  619. package/dist/esm-es5/usePortalRegistrationForm-c6519939.js +1 -0
  620. package/dist/esm-es5/useReferralCodes-d0a384e4.js +1 -0
  621. package/dist/esm-es5/useReferralTable-214dff06.js +1 -0
  622. package/dist/esm-es5/useRegistrationFormState-72b4786d.js +1 -0
  623. package/dist/esm-es5/useVerificationEmail-b2c349a3.js +1 -0
  624. package/dist/esm-es5/utilities-ceab25cd.js +1 -0
  625. package/dist/esm-es5/utils-334c1e34.js +1 -1
  626. package/dist/loader/index.d.ts +9 -1
  627. package/dist/loader/package.json +1 -0
  628. package/dist/mint-components/mint-components.esm.js +1 -1
  629. package/dist/mint-components/mint-components.js +2 -1
  630. package/dist/mint-components/p-029ee766.system.js +1 -0
  631. package/dist/mint-components/p-04eaa3bb.system.js +1 -0
  632. package/dist/mint-components/p-056845fb.js +56 -0
  633. package/dist/mint-components/p-05715d8c.system.entry.js +1 -0
  634. package/dist/mint-components/p-0650e0f1.system.js +1 -0
  635. package/dist/mint-components/p-09a6ab1f.entry.js +1 -0
  636. package/dist/mint-components/p-0a8c9f35.system.entry.js +1 -0
  637. package/dist/mint-components/{p-11c127f5.js → p-0b77b3fe.js} +1 -1
  638. package/dist/mint-components/p-0bc61e27.system.entry.js +1 -0
  639. package/dist/mint-components/p-0bdacc2d.system.js +1 -0
  640. package/dist/mint-components/p-0c81f11f.system.entry.js +1 -0
  641. package/dist/mint-components/p-0c97293e.entry.js +1 -0
  642. package/dist/mint-components/p-0d69fc17.system.entry.js +1 -0
  643. package/dist/mint-components/p-0daa339e.entry.js +1 -0
  644. package/dist/mint-components/p-0f65e4ad.system.js +1 -0
  645. package/dist/mint-components/p-11028f98.system.js +1 -0
  646. package/dist/mint-components/p-119b9680.system.js +1 -0
  647. package/dist/mint-components/{p-ed741b3b.js → p-125c5bec.js} +6 -6
  648. package/dist/mint-components/p-12ae9c97.entry.js +1 -0
  649. package/dist/mint-components/p-139825b2.entry.js +1 -0
  650. package/dist/mint-components/p-14f0af4c.system.entry.js +1 -0
  651. package/dist/mint-components/{p-1a3a57c0.js → p-159a9368.js} +1 -1
  652. package/dist/mint-components/{p-78e98761.js → p-15f170d4.js} +4 -4
  653. package/dist/mint-components/p-162e5426.system.js +1 -0
  654. package/dist/mint-components/p-1933e4cc.system.entry.js +1 -0
  655. package/dist/mint-components/p-1aa5cdff.entry.js +1 -0
  656. package/dist/mint-components/p-1b673705.system.js +1 -0
  657. package/dist/mint-components/p-1e1543c7.entry.js +1 -0
  658. package/dist/mint-components/p-201ae45a.js +1 -0
  659. package/dist/mint-components/p-20b90db3.system.entry.js +1 -0
  660. package/dist/mint-components/p-2380b28e.system.entry.js +1 -0
  661. package/dist/mint-components/p-258152c8.system.entry.js +1 -0
  662. package/dist/mint-components/p-29be0454.system.entry.js +1 -0
  663. package/dist/mint-components/p-2af001d4.system.js +1 -0
  664. package/dist/mint-components/{p-88e16945.js → p-2b052eed.js} +1 -1
  665. package/dist/mint-components/p-2b5c577a.system.js +1 -0
  666. package/dist/mint-components/p-2ff39583.entry.js +33 -0
  667. package/dist/mint-components/p-3104b4ba.entry.js +1 -0
  668. package/dist/mint-components/p-324dd9c9.system.entry.js +1 -0
  669. package/dist/mint-components/p-32b3c92e.system.entry.js +1 -0
  670. package/dist/mint-components/{p-c813ec64.js → p-3595dbe3.js} +1 -1
  671. package/dist/mint-components/p-384d4366.system.entry.js +1 -0
  672. package/dist/mint-components/{p-a417a4c7.js → p-388fdcdc.js} +1 -1
  673. package/dist/mint-components/{p-acaf505d.entry.js → p-39e59497.entry.js} +1 -1
  674. package/dist/mint-components/p-3a8fa8df.system.entry.js +1 -0
  675. package/dist/mint-components/{p-456ccda6.system.js → p-3aab5e80.system.js} +1 -1
  676. package/dist/mint-components/p-3b7eac48.js +1 -0
  677. package/dist/mint-components/p-3f9d4025.js +254 -0
  678. package/dist/mint-components/p-4639a9ed.entry.js +1 -0
  679. package/dist/mint-components/p-483c2ce0.system.entry.js +1 -0
  680. package/dist/mint-components/p-487dac4b.system.js +271 -0
  681. package/dist/mint-components/p-49ca1533.system.entry.js +1 -0
  682. package/dist/mint-components/p-49d4188a.system.js +1 -0
  683. package/dist/mint-components/p-4be3689e.system.entry.js +1 -0
  684. package/dist/mint-components/p-4d690bf1.system.js +1 -0
  685. package/dist/mint-components/p-4ea630ba.system.js +1 -0
  686. package/dist/mint-components/p-5a1be3aa.entry.js +83 -0
  687. package/dist/mint-components/p-5a2c495f.js +1 -0
  688. package/dist/mint-components/p-5b043988.system.entry.js +1 -0
  689. package/dist/mint-components/p-5bacacba.entry.js +13 -0
  690. package/dist/mint-components/p-5e7e4e54.system.entry.js +1 -0
  691. package/dist/mint-components/p-6333265f.system.js +1 -1
  692. package/dist/mint-components/p-643a756b.system.js +53 -0
  693. package/dist/mint-components/p-647ca265.entry.js +1 -0
  694. package/dist/mint-components/p-647ffff2.entry.js +1 -0
  695. package/dist/mint-components/p-64c93b03.system.js +1 -0
  696. package/dist/mint-components/p-6708043c.entry.js +1 -0
  697. package/dist/mint-components/p-6a7c9ae4.system.entry.js +1 -0
  698. package/dist/mint-components/p-6a7cd966.system.js +1 -0
  699. package/dist/mint-components/p-6b9ff091.system.js +1 -0
  700. package/dist/mint-components/p-6be0e0a7.system.entry.js +1 -0
  701. package/dist/mint-components/p-6ccdf33a.js +1 -0
  702. package/dist/mint-components/p-6cdde5e8.system.js +1 -0
  703. package/dist/mint-components/p-6cfca206.js +1 -0
  704. package/dist/mint-components/{p-d276468c.js → p-6e00edce.js} +1 -1
  705. package/dist/mint-components/p-6eb14db9.system.entry.js +1 -0
  706. package/dist/mint-components/p-6f3ba1ad.system.js +1 -0
  707. package/dist/mint-components/p-6f66bb97.system.js +1 -0
  708. package/dist/mint-components/p-7127e360.system.entry.js +1 -0
  709. package/dist/mint-components/{p-d0559e66.js → p-71759064.js} +1 -1
  710. package/dist/mint-components/p-72f11f03.js +1 -0
  711. package/dist/mint-components/p-732ac03d.js +1 -0
  712. package/dist/mint-components/p-74f50554.js +1 -0
  713. package/dist/mint-components/p-7558fe46.js +499 -0
  714. package/dist/mint-components/{p-c43e1d3b.js → p-75b7496e.js} +1 -1
  715. package/dist/mint-components/p-76d36b05.js +1 -0
  716. package/dist/mint-components/p-7a8ed2f3.system.entry.js +1 -0
  717. package/dist/mint-components/{p-3390f1f2.system.js → p-7d992af1.system.js} +2 -2
  718. package/dist/mint-components/p-7f71b56b.system.entry.js +1 -0
  719. package/dist/mint-components/p-81b63e83.system.entry.js +1 -0
  720. package/dist/mint-components/p-83330731.system.js +1 -0
  721. package/dist/mint-components/p-834cd992.js +2 -0
  722. package/dist/mint-components/p-843c9997.system.js +1 -0
  723. package/dist/mint-components/{p-956f9479.system.js → p-8680e52b.system.js} +1 -1
  724. package/dist/mint-components/p-8740794e.system.js +2 -0
  725. package/dist/mint-components/p-885630e6.entry.js +1 -0
  726. package/dist/mint-components/p-8886a874.system.js +1 -0
  727. package/dist/mint-components/p-88b65807.system.js +1 -0
  728. package/dist/mint-components/p-89b410d5.system.entry.js +1 -0
  729. package/dist/mint-components/p-89eef397.entry.js +1 -0
  730. package/dist/mint-components/p-8aae5dba.system.entry.js +1 -0
  731. package/dist/mint-components/p-8ba39302.entry.js +1 -0
  732. package/dist/mint-components/{p-c2254b88.js → p-8d85f34c.js} +1 -1
  733. package/dist/mint-components/p-8f67c580.js +1 -0
  734. package/dist/mint-components/p-8fa1f8e3.entry.js +1 -0
  735. package/dist/mint-components/p-930cc94f.system.js +1 -0
  736. package/dist/mint-components/p-94f3e0a2.js +1 -0
  737. package/dist/mint-components/p-96e332db.entry.js +17 -0
  738. package/dist/mint-components/p-9755e82a.system.entry.js +1 -0
  739. package/dist/mint-components/p-9a7f186b.entry.js +1 -0
  740. package/dist/mint-components/p-9c2e286c.entry.js +11 -0
  741. package/dist/mint-components/{p-e30abc44.js → p-9cabd2d1.js} +1 -1
  742. package/dist/mint-components/p-9d06abb3.entry.js +13 -0
  743. package/dist/mint-components/p-9d1659c4.entry.js +308 -0
  744. package/dist/mint-components/p-9d6ef5ca.entry.js +11 -0
  745. package/dist/mint-components/p-a0e6ccbc.system.js +1 -0
  746. package/dist/mint-components/p-a35191ca.system.js +1 -0
  747. package/dist/mint-components/p-a3d1c665.system.entry.js +1 -0
  748. package/dist/mint-components/p-a43a9fa9.system.js +1 -1
  749. package/dist/mint-components/{p-04da3964.system.js → p-a6c96b8a.system.js} +1 -1
  750. package/dist/mint-components/p-a75748c4.js +13 -0
  751. package/dist/mint-components/{p-f9fcc772.js → p-a7a74002.js} +1 -1
  752. package/dist/mint-components/{p-3484f1c1.js → p-a8e2f45b.js} +1 -1
  753. package/dist/mint-components/p-a976d930.system.entry.js +1 -0
  754. package/dist/mint-components/p-aadbe44d.js +1 -0
  755. package/dist/mint-components/p-aaf15612.entry.js +1 -0
  756. package/dist/mint-components/p-ab1e96ea.system.js +1 -0
  757. package/dist/mint-components/p-abd9e52b.system.entry.js +1 -0
  758. package/dist/mint-components/{p-19aebd7d.js → p-ac32d96a.js} +1 -1
  759. package/dist/mint-components/{p-381af581.js → p-acd3e9e3.js} +1 -1
  760. package/dist/mint-components/{p-9a69f781.system.js → p-ae5f7df6.system.js} +1 -1
  761. package/dist/mint-components/p-af9d3491.js +1 -0
  762. package/dist/mint-components/p-b1f880ee.entry.js +1 -0
  763. package/dist/mint-components/p-b492fd4b.system.entry.js +1 -0
  764. package/dist/mint-components/p-b652d3b3.js +1 -0
  765. package/dist/mint-components/p-b6f5ab75.system.entry.js +1 -0
  766. package/dist/mint-components/p-b907384d.entry.js +1 -0
  767. package/dist/mint-components/p-bbb494a8.system.js +1 -0
  768. package/dist/mint-components/p-bd1a14ba.js +1 -0
  769. package/dist/mint-components/p-bd66c171.js +1 -0
  770. package/dist/mint-components/p-be38ae67.js +1 -0
  771. package/dist/mint-components/p-c30dfd5d.entry.js +92 -0
  772. package/dist/mint-components/p-c380988f.system.js +1 -0
  773. package/dist/mint-components/{p-104f6ced.entry.js → p-c3a07f51.entry.js} +1 -1
  774. package/dist/mint-components/p-c50c206e.system.js +1 -0
  775. package/dist/mint-components/p-c6d2a452.js +1 -0
  776. package/dist/mint-components/p-c7dd2eaa.system.entry.js +1 -0
  777. package/dist/mint-components/p-c8f697e4.system.js +1 -0
  778. package/dist/mint-components/p-c980e369.entry.js +1 -0
  779. package/dist/mint-components/p-cb714df1.system.js +1 -0
  780. package/dist/mint-components/p-cdf099fe.js +108 -0
  781. package/dist/mint-components/p-ce06d498.js +52 -0
  782. package/dist/mint-components/p-d08ebaa9.js +1 -0
  783. package/dist/mint-components/p-d8fac546.entry.js +1 -0
  784. package/dist/mint-components/p-d91a97d2.js +1 -0
  785. package/dist/mint-components/p-da6cb2c3.system.entry.js +1 -0
  786. package/dist/mint-components/p-dd7e8c95.system.js +8 -0
  787. package/dist/mint-components/p-dd82a675.system.entry.js +1 -0
  788. package/dist/mint-components/p-df1206f0.entry.js +1 -0
  789. package/dist/mint-components/p-df45273e.js +1 -0
  790. package/dist/mint-components/p-df531a5d.entry.js +1 -0
  791. package/dist/mint-components/p-e1c55f04.system.entry.js +1 -0
  792. package/dist/mint-components/p-e33839b3.system.js +1 -0
  793. package/dist/mint-components/p-e389aded.entry.js +1 -0
  794. package/dist/mint-components/p-e73e0fc4.system.js +1 -0
  795. package/dist/mint-components/p-e7f7b9c6.entry.js +1 -0
  796. package/dist/mint-components/{p-b47e3740.system.js → p-e9942aae.system.js} +1 -1
  797. package/dist/mint-components/p-eac100d1.system.js +1 -0
  798. package/dist/mint-components/p-eb47b174.entry.js +1 -0
  799. package/dist/mint-components/p-eba82926.js +1 -0
  800. package/dist/mint-components/p-ec00bb5f.js +1 -0
  801. package/dist/mint-components/p-edc8d9bc.system.js +1 -0
  802. package/dist/mint-components/p-f0e1d538.entry.js +147 -0
  803. package/dist/mint-components/{p-ff75998a.system.entry.js → p-f53c7a87.system.entry.js} +1 -1
  804. package/dist/mint-components/p-f686c142.system.js +1 -0
  805. package/dist/mint-components/{p-5b0de730.js → p-fa2edc58.js} +152 -152
  806. package/dist/mint-components/p-fab41ea8.system.entry.js +1 -0
  807. package/dist/mint-components/p-fd14377b.entry.js +1 -0
  808. package/dist/mint-components/p-ff1336b3.entry.js +148 -0
  809. package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -1
  810. package/dist/types/components/sqm-context-router/useContextRouter.d.ts +1 -1
  811. package/dist/types/components/sqm-coupon-code/useCouponCode.d.ts +1 -1
  812. package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +1 -1
  813. package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +2 -2
  814. package/dist/types/components/sqm-lead-form/useLeadFormState.d.ts +3 -3
  815. package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -2
  816. package/dist/types/components/sqm-pagination/usePagination.d.ts +1 -1
  817. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +3 -3
  818. package/dist/types/components/sqm-popup-container/sqm-popup-container-view.d.ts +1 -1
  819. package/dist/types/components/sqm-popup-container/usePopupContainer.d.ts +2 -2
  820. package/dist/types/components/sqm-portal-footer/PoweredByImg.d.ts +1 -1
  821. package/dist/types/components/sqm-portal-footer/sqm-portal-footer-view.d.ts +1 -1
  822. package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +1 -1
  823. package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -1
  824. package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +1 -1
  825. package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +3 -3
  826. package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +2 -2
  827. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -1
  828. package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +1 -1
  829. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +2 -2
  830. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +5 -5
  831. package/dist/types/components/sqm-router/useRouter.d.ts +1 -1
  832. package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +1 -1
  833. package/dist/types/components/sqm-stencilbook/Matrix.d.ts +1 -1
  834. package/dist/types/components/sqm-tab/sqm-tab-view.d.ts +1 -1
  835. package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -1
  836. package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +1 -1
  837. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +1 -1
  838. package/dist/types/components/sqm-widget-verification/getVerificationStep.d.ts +2 -2
  839. package/dist/types/components/tax-and-cash/data.d.ts +13 -13
  840. package/dist/types/components/tax-and-cash/sqm-banking-info-form/mockData.d.ts +1 -1
  841. package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -2
  842. package/dist/types/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.d.ts +1 -1
  843. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +5 -5
  844. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +6 -6
  845. package/dist/types/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.d.ts +1 -1
  846. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -3
  847. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/extractProps.d.ts +1 -1
  848. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  849. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.d.ts +1 -1
  850. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  851. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +5 -5
  852. package/dist/types/components/tax-and-cash/subregions.d.ts +1 -1
  853. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  854. package/dist/types/components.d.ts +3771 -3
  855. package/dist/types/global/mixins.d.ts +5 -5
  856. package/dist/types/stencil-public-runtime.d.ts +275 -193
  857. package/dist/types/utils/RequiredPropsError.d.ts +1 -1
  858. package/dist/types/utils/demoMerge.d.ts +8 -0
  859. package/dist/types/utils/utils.d.ts +1 -1
  860. package/docs/docs.docx +0 -0
  861. package/docs/stats.json +120116 -0
  862. package/grapesjs/grapesjs.js +1 -1
  863. package/package.json +34 -45
  864. package/dist/cjs/AsYouType-d15caac8.js +0 -4128
  865. package/dist/cjs/cjs-1066ec21.js +0 -135
  866. package/dist/cjs/eventKeys-7af4df4d.js +0 -5
  867. package/dist/cjs/sqm-lead-input-field-view-cd3f8076.js +0 -51
  868. package/dist/cjs/subregions-36662566.js +0 -1101
  869. package/dist/esm/AsYouType-2d56519e.js +0 -4108
  870. package/dist/esm/cjs-bdfb4486.js +0 -133
  871. package/dist/esm/eventKeys-f76b6a03.js +0 -3
  872. package/dist/esm/sqm-lead-input-field-view-919dc0a9.js +0 -49
  873. package/dist/esm/subregions-16dc47a9.js +0 -1086
  874. package/dist/esm-es5/AsYouType-2d56519e.js +0 -1
  875. package/dist/esm-es5/GenericTableView-471a9386.js +0 -1
  876. package/dist/esm-es5/JSS-67b5cff8.js +0 -8
  877. package/dist/esm-es5/ShadowViewAddon-e1375e0d.js +0 -1
  878. package/dist/esm-es5/cjs-bdfb4486.js +0 -1
  879. package/dist/esm-es5/copy-text-view-87259b11.js +0 -1
  880. package/dist/esm-es5/data-04d2da44.js +0 -1
  881. package/dist/esm-es5/dom-context-hooks.module-50442785.js +0 -53
  882. package/dist/esm-es5/email-registration-view-4cdb4129.js +0 -1
  883. package/dist/esm-es5/eventKeys-f76b6a03.js +0 -1
  884. package/dist/esm-es5/global-f019575d.js +0 -271
  885. package/dist/esm-es5/index-38ad4957.js +0 -1
  886. package/dist/esm-es5/index-ffa26b43.js +0 -1
  887. package/dist/esm-es5/index.module-cc08450c.js +0 -1
  888. package/dist/esm-es5/jsonpointer-388a7082.js +0 -1
  889. package/dist/esm-es5/luxon-1be92a8e.js +0 -1
  890. package/dist/esm-es5/mockRewardData-9b27d6f1.js +0 -1
  891. package/dist/esm-es5/parseStates-ed75e224.js +0 -1
  892. package/dist/esm-es5/re-render-380499f8.js +0 -1
  893. package/dist/esm-es5/sqm-lead-checkbox-field-view-04aa32a7.js +0 -1
  894. package/dist/esm-es5/sqm-lead-input-field-view-919dc0a9.js +0 -1
  895. package/dist/esm-es5/sqm-navigation-sidebar-item-view-40837457.js +0 -1
  896. package/dist/esm-es5/sqm-navigation-sidebar-view-2b66457a.js +0 -1
  897. package/dist/esm-es5/sqm-partner-info-modal-view-e02fb63a.js +0 -1
  898. package/dist/esm-es5/sqm-portal-container-view-200c9df8.js +0 -1
  899. package/dist/esm-es5/sqm-portal-profile-view-41894261.js +0 -1
  900. package/dist/esm-es5/sqm-portal-registration-form-view-79265df5.js +0 -1
  901. package/dist/esm-es5/sqm-portal-reset-password-view-c7dd1c01.js +0 -1
  902. package/dist/esm-es5/sqm-portal-verify-email-view-c102aa7c.js +0 -1
  903. package/dist/esm-es5/sqm-text-span-view-72f43dff.js +0 -1
  904. package/dist/esm-es5/sqm-user-info-form-view-8a95c5eb.js +0 -1
  905. package/dist/esm-es5/subregions-16dc47a9.js +0 -1
  906. package/dist/esm-es5/useChildElements-aa9eb7c9.js +0 -1
  907. package/dist/esm-es5/useIndirectTaxForm-8d2e873d.js +0 -6
  908. package/dist/esm-es5/useInstantAccessRegistration-7b11eb02.js +0 -1
  909. package/dist/esm-es5/useLeadFormState-b67018f2.js +0 -1
  910. package/dist/esm-es5/usePortalRegistrationForm-91e5786d.js +0 -1
  911. package/dist/esm-es5/useReferralCodes-a0a271ca.js +0 -1
  912. package/dist/esm-es5/useReferralTable-670580ff.js +0 -1
  913. package/dist/esm-es5/useRegistrationFormState-95a75c57.js +0 -1
  914. package/dist/esm-es5/useVerificationEmail-99d9f705.js +0 -1
  915. package/dist/esm-es5/utilities-23a276e0.js +0 -1
  916. package/dist/mint-components/p-0306ce68.js +0 -1
  917. package/dist/mint-components/p-03361685.system.entry.js +0 -1
  918. package/dist/mint-components/p-036b876f.system.js +0 -1
  919. package/dist/mint-components/p-083180bf.js +0 -1
  920. package/dist/mint-components/p-08f36275.entry.js +0 -92
  921. package/dist/mint-components/p-08f82f9e.system.entry.js +0 -1
  922. package/dist/mint-components/p-092305db.entry.js +0 -1
  923. package/dist/mint-components/p-0ac8d8f4.system.js +0 -1
  924. package/dist/mint-components/p-0b1e90fe.system.js +0 -1
  925. package/dist/mint-components/p-0dca7884.entry.js +0 -148
  926. package/dist/mint-components/p-0ec9eb9b.entry.js +0 -1
  927. package/dist/mint-components/p-115dfc03.system.js +0 -1
  928. package/dist/mint-components/p-128610fb.system.js +0 -1
  929. package/dist/mint-components/p-13d1b10d.entry.js +0 -1
  930. package/dist/mint-components/p-13f3a647.js +0 -1
  931. package/dist/mint-components/p-16bd4751.system.entry.js +0 -1
  932. package/dist/mint-components/p-1a673057.system.js +0 -8
  933. package/dist/mint-components/p-1cf59d96.system.js +0 -1
  934. package/dist/mint-components/p-1ee1dd9c.system.entry.js +0 -1
  935. package/dist/mint-components/p-1f292473.entry.js +0 -1
  936. package/dist/mint-components/p-220cd813.system.entry.js +0 -1
  937. package/dist/mint-components/p-2392aabe.entry.js +0 -1
  938. package/dist/mint-components/p-263ca1be.system.js +0 -1
  939. package/dist/mint-components/p-274816ae.entry.js +0 -1
  940. package/dist/mint-components/p-2786819c.js +0 -1
  941. package/dist/mint-components/p-28ed2ae9.js +0 -1
  942. package/dist/mint-components/p-28fa5159.entry.js +0 -1
  943. package/dist/mint-components/p-290314a6.js +0 -52
  944. package/dist/mint-components/p-2cc01e0a.system.js +0 -1
  945. package/dist/mint-components/p-319bf866.system.entry.js +0 -1
  946. package/dist/mint-components/p-31b7d861.entry.js +0 -1
  947. package/dist/mint-components/p-31c5f477.entry.js +0 -1
  948. package/dist/mint-components/p-31cfa118.system.entry.js +0 -1
  949. package/dist/mint-components/p-3268c98c.system.entry.js +0 -1
  950. package/dist/mint-components/p-34917ee4.system.js +0 -1
  951. package/dist/mint-components/p-34bea1be.system.js +0 -1
  952. package/dist/mint-components/p-3db7a3c0.system.entry.js +0 -1
  953. package/dist/mint-components/p-429fa431.js +0 -1
  954. package/dist/mint-components/p-44ce74b6.js +0 -1
  955. package/dist/mint-components/p-45be99ae.system.js +0 -1
  956. package/dist/mint-components/p-47dc2362.system.entry.js +0 -1
  957. package/dist/mint-components/p-48b25874.system.js +0 -1
  958. package/dist/mint-components/p-4bd679a7.system.js +0 -1
  959. package/dist/mint-components/p-4ca6cc3c.system.entry.js +0 -1
  960. package/dist/mint-components/p-51d06654.system.js +0 -1
  961. package/dist/mint-components/p-5218d9dd.system.entry.js +0 -1
  962. package/dist/mint-components/p-5264ea68.js +0 -1
  963. package/dist/mint-components/p-5300edb5.js +0 -1
  964. package/dist/mint-components/p-556338c3.system.js +0 -1
  965. package/dist/mint-components/p-573ea3fd.system.entry.js +0 -1
  966. package/dist/mint-components/p-57c693ef.system.entry.js +0 -1
  967. package/dist/mint-components/p-59d5f239.system.entry.js +0 -1
  968. package/dist/mint-components/p-5c3cdefe.entry.js +0 -1
  969. package/dist/mint-components/p-5cda271c.system.entry.js +0 -1
  970. package/dist/mint-components/p-5d99dbc9.js +0 -1
  971. package/dist/mint-components/p-641f968d.system.js +0 -1
  972. package/dist/mint-components/p-686dd5eb.system.js +0 -1
  973. package/dist/mint-components/p-6b5528b1.entry.js +0 -33
  974. package/dist/mint-components/p-6c3a1d86.js +0 -1
  975. package/dist/mint-components/p-6c8758ac.entry.js +0 -1
  976. package/dist/mint-components/p-6dffb326.entry.js +0 -13
  977. package/dist/mint-components/p-6e9738a4.js +0 -1
  978. package/dist/mint-components/p-6f8dde97.system.js +0 -1
  979. package/dist/mint-components/p-7010498f.js +0 -1
  980. package/dist/mint-components/p-7062154c.system.js +0 -1
  981. package/dist/mint-components/p-717fa601.js +0 -1
  982. package/dist/mint-components/p-732907b1.system.entry.js +0 -1
  983. package/dist/mint-components/p-7562cd98.system.js +0 -1
  984. package/dist/mint-components/p-7ae8fb53.system.js +0 -1
  985. package/dist/mint-components/p-808f7f22.entry.js +0 -1
  986. package/dist/mint-components/p-80cee817.system.js +0 -1
  987. package/dist/mint-components/p-8452837a.system.js +0 -1
  988. package/dist/mint-components/p-85996c52.system.entry.js +0 -1
  989. package/dist/mint-components/p-8629d0be.system.entry.js +0 -1
  990. package/dist/mint-components/p-86c430f8.system.entry.js +0 -1
  991. package/dist/mint-components/p-8707c7fb.entry.js +0 -1
  992. package/dist/mint-components/p-8899ff38.system.entry.js +0 -1
  993. package/dist/mint-components/p-88a5350b.entry.js +0 -11
  994. package/dist/mint-components/p-8d363802.js +0 -1
  995. package/dist/mint-components/p-93e4954e.entry.js +0 -308
  996. package/dist/mint-components/p-952eefec.system.js +0 -1
  997. package/dist/mint-components/p-95f82a6f.entry.js +0 -9
  998. package/dist/mint-components/p-9715be5b.entry.js +0 -1
  999. package/dist/mint-components/p-97b8073f.system.js +0 -1
  1000. package/dist/mint-components/p-99f7e6f1.js +0 -1
  1001. package/dist/mint-components/p-9f517f81.entry.js +0 -1
  1002. package/dist/mint-components/p-9f7d1197.system.entry.js +0 -1
  1003. package/dist/mint-components/p-a04be06d.system.entry.js +0 -1
  1004. package/dist/mint-components/p-a08157c4.js +0 -1
  1005. package/dist/mint-components/p-a495e3a5.entry.js +0 -1
  1006. package/dist/mint-components/p-a52a961e.entry.js +0 -1
  1007. package/dist/mint-components/p-a6920cc9.system.entry.js +0 -1
  1008. package/dist/mint-components/p-a7fc1e02.js +0 -42
  1009. package/dist/mint-components/p-ab8a551f.system.entry.js +0 -1
  1010. package/dist/mint-components/p-ac65d2c1.entry.js +0 -1
  1011. package/dist/mint-components/p-ad9ea625.system.entry.js +0 -1
  1012. package/dist/mint-components/p-b0aa9348.entry.js +0 -1
  1013. package/dist/mint-components/p-b2295bc5.system.js +0 -1
  1014. package/dist/mint-components/p-b56f3e55.js +0 -1
  1015. package/dist/mint-components/p-b61be711.entry.js +0 -1
  1016. package/dist/mint-components/p-b6504987.system.js +0 -53
  1017. package/dist/mint-components/p-b69dbed8.system.js +0 -1
  1018. package/dist/mint-components/p-b6b5fa4f.system.entry.js +0 -1
  1019. package/dist/mint-components/p-bc625793.system.js +0 -1
  1020. package/dist/mint-components/p-bee4af5d.js +0 -1
  1021. package/dist/mint-components/p-c03131dd.js +0 -1
  1022. package/dist/mint-components/p-c09ae087.system.js +0 -1
  1023. package/dist/mint-components/p-c1086930.js +0 -1
  1024. package/dist/mint-components/p-c50e77ad.entry.js +0 -1
  1025. package/dist/mint-components/p-c5698ef9.system.js +0 -1
  1026. package/dist/mint-components/p-ca872769.system.entry.js +0 -1
  1027. package/dist/mint-components/p-ca90ea64.js +0 -499
  1028. package/dist/mint-components/p-cdf5354f.entry.js +0 -1
  1029. package/dist/mint-components/p-cef45012.js +0 -1
  1030. package/dist/mint-components/p-d028db52.system.entry.js +0 -1
  1031. package/dist/mint-components/p-d0318b41.entry.js +0 -13
  1032. package/dist/mint-components/p-d0ce74bd.system.js +0 -1
  1033. package/dist/mint-components/p-d267f4bb.system.js +0 -1
  1034. package/dist/mint-components/p-d26df2da.entry.js +0 -1
  1035. package/dist/mint-components/p-d3b1ab20.system.entry.js +0 -1
  1036. package/dist/mint-components/p-d463fa82.system.js +0 -1
  1037. package/dist/mint-components/p-d46a048d.system.entry.js +0 -1
  1038. package/dist/mint-components/p-d533ff7b.system.js +0 -271
  1039. package/dist/mint-components/p-d6a7f402.entry.js +0 -1
  1040. package/dist/mint-components/p-d9dbbf22.system.entry.js +0 -1
  1041. package/dist/mint-components/p-db30fbd1.js +0 -13
  1042. package/dist/mint-components/p-de8d7e90.entry.js +0 -17
  1043. package/dist/mint-components/p-df28013f.system.entry.js +0 -1
  1044. package/dist/mint-components/p-dffad4a8.entry.js +0 -1
  1045. package/dist/mint-components/p-e006b6ad.entry.js +0 -1
  1046. package/dist/mint-components/p-e0578030.system.js +0 -1
  1047. package/dist/mint-components/p-e31c7242.system.entry.js +0 -1
  1048. package/dist/mint-components/p-e4eac70d.js +0 -108
  1049. package/dist/mint-components/p-e506bf7f.entry.js +0 -1
  1050. package/dist/mint-components/p-e66187b6.system.entry.js +0 -1
  1051. package/dist/mint-components/p-e7cf6632.js +0 -1
  1052. package/dist/mint-components/p-e7d6e1e0.entry.js +0 -11
  1053. package/dist/mint-components/p-e7e129ac.js +0 -1
  1054. package/dist/mint-components/p-eb992f94.js +0 -1
  1055. package/dist/mint-components/p-ec3e44c8.system.js +0 -1
  1056. package/dist/mint-components/p-ec58040a.system.js +0 -1
  1057. package/dist/mint-components/p-eedda43c.system.js +0 -1
  1058. package/dist/mint-components/p-f0b63c48.entry.js +0 -83
  1059. package/dist/mint-components/p-f1584abb.system.entry.js +0 -1
  1060. package/dist/mint-components/p-f381533a.js +0 -1
  1061. package/dist/mint-components/p-f45e076d.system.js +0 -1
  1062. package/dist/mint-components/p-f507b364.system.entry.js +0 -1
  1063. package/dist/mint-components/p-f69a4eb1.system.entry.js +0 -1
  1064. package/dist/mint-components/p-f89c6a57.system.js +0 -1
  1065. package/dist/mint-components/p-f982278b.entry.js +0 -1
  1066. package/dist/mint-components/p-fbdd8c2a.system.entry.js +0 -1
  1067. package/dist/mint-components/p-fdc4f293.system.entry.js +0 -1
  1068. package/dist/mint-components/p-ff1a5481.system.js +0 -1
@@ -1,6 +1,6 @@
1
- import { d as c, s, u as useMemo, c as createCommonjsModule, a as commonjsGlobal, e as getDefaultExportFromCjs, f as useEffect, h, y, i as d, j as useReducer, k as useState, m as useRef } from './dom-context-hooks.module-50442785.js';
1
+ import { d as c, s, u as useMemo, c as createCommonjsModule, a as commonjsGlobal, e as getDefaultExportFromCjs, h, y, f as d, i as useReducer, j as useEffect, k as useState, m as useRef } from './dom-context-hooks.module-f88a3e54.js';
2
2
 
3
- function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
3
+ function e$1(e){this.message=e;}e$1.prototype=new Error,e$1.prototype.name="InvalidCharacterError";var r$1="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t$1(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r$1(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r$1(t)}}function n$1(e){this.message=e;}function o$1(e,r){if("string"!=typeof e)throw new n$1("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t$1(e.split(".")[o]))}catch(e){throw new n$1("Invalid token specified: "+e.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";
4
4
 
5
5
  const { toString, hasOwnProperty } = Object.prototype;
6
6
  const fnToStr = Function.prototype.toString;
@@ -197,25 +197,25 @@ function previouslyCompared(a, b) {
197
197
  return false;
198
198
  }
199
199
 
200
- var __defProp = Object.defineProperty;
201
- var __defProps = Object.defineProperties;
202
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
203
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
204
- var __hasOwnProp = Object.prototype.hasOwnProperty;
205
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
206
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
207
- var __spreadValues = (a, b) => {
200
+ var __defProp$1 = Object.defineProperty;
201
+ var __defProps$1 = Object.defineProperties;
202
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
203
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
204
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
205
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
206
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
207
+ var __spreadValues$1 = (a, b) => {
208
208
  for (var prop in b || (b = {}))
209
- if (__hasOwnProp.call(b, prop))
210
- __defNormalProp(a, prop, b[prop]);
211
- if (__getOwnPropSymbols)
212
- for (var prop of __getOwnPropSymbols(b)) {
213
- if (__propIsEnum.call(b, prop))
214
- __defNormalProp(a, prop, b[prop]);
209
+ if (__hasOwnProp$1.call(b, prop))
210
+ __defNormalProp$1(a, prop, b[prop]);
211
+ if (__getOwnPropSymbols$1)
212
+ for (var prop of __getOwnPropSymbols$1(b)) {
213
+ if (__propIsEnum$1.call(b, prop))
214
+ __defNormalProp$1(a, prop, b[prop]);
215
215
  }
216
216
  return a;
217
217
  };
218
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
218
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
219
219
 
220
220
  // src/types.ts
221
221
  var USER_CONTEXT_NAME = "sq:user-identity";
@@ -431,7 +431,7 @@ var MemoryHistory = class {
431
431
  state
432
432
  };
433
433
  } else {
434
- entry = __spreadProps(__spreadValues({}, to), {
434
+ entry = __spreadProps$1(__spreadValues$1({}, to), {
435
435
  state
436
436
  });
437
437
  }
@@ -448,7 +448,7 @@ var MemoryHistory = class {
448
448
  state
449
449
  };
450
450
  } else {
451
- this.history[this.index] = __spreadProps(__spreadValues({}, to), {
451
+ this.history[this.index] = __spreadProps$1(__spreadValues$1({}, to), {
452
452
  state
453
453
  });
454
454
  }
@@ -626,7 +626,7 @@ function userIdentityFromJwt(jwt) {
626
626
  if (!jwt)
627
627
  return void 0;
628
628
  try {
629
- const decoded = o(jwt);
629
+ const decoded = o$1(jwt);
630
630
  const exp = decoded.exp;
631
631
  let userId = void 0;
632
632
  let accountId = void 0;
@@ -692,7 +692,7 @@ function _getInitialValue() {
692
692
  const potentialUserIdent = JSON.parse(stored);
693
693
  const identity = userIdentityFromJwt(potentialUserIdent.jwt);
694
694
  if (identity) {
695
- return __spreadValues(__spreadValues({}, potentialUserIdent), identity);
695
+ return __spreadValues$1(__spreadValues$1({}, potentialUserIdent), identity);
696
696
  }
697
697
  return void 0;
698
698
  } catch (e) {
@@ -742,16 +742,31 @@ function setProgramId(programId) {
742
742
  }
743
743
  }
744
744
 
745
+ /**
746
+ * @function
747
+ * @template {Function} T
748
+ * @param {T} fn - callback to memoize
749
+ * @param {unknown[]} inputs - dependencies to callback memoization
750
+ * @return {T}
751
+ */
745
752
  const useCallback = (fn, inputs) => useMemo(() => fn, inputs);
746
753
 
747
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
754
+ function devAssert(condition, message) {
755
+ var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
756
+
757
+ if (!booleanCondition) {
758
+ throw new Error(message);
759
+ }
760
+ }
761
+
762
+ function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
748
763
 
749
764
  /**
750
765
  * Return true if `value` is object-like. A value is object-like if it's not
751
766
  * `null` and has a `typeof` result of "object".
752
767
  */
753
768
  function isObjectLike(value) {
754
- return _typeof(value) == 'object' && value !== null;
769
+ return _typeof$2(value) == 'object' && value !== null;
755
770
  }
756
771
 
757
772
  // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator
@@ -850,11 +865,17 @@ function leftPad(len, str) {
850
865
 
851
866
  function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
852
867
 
868
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
869
+
870
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
871
+
872
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
873
+
853
874
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
854
875
 
855
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
876
+ function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
856
877
 
857
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
878
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
858
879
 
859
880
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
860
881
 
@@ -887,14 +908,6 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
887
908
 
888
909
  var _super = _createSuper(GraphQLError);
889
910
 
890
- /**
891
- * A message describing the Error for debugging purposes.
892
- *
893
- * Enumerable, and appears in the result of JSON.stringify().
894
- *
895
- * Note: should be treated as readonly, despite invariant usage.
896
- */
897
-
898
911
  /**
899
912
  * An array of { line, column } locations within the source GraphQL document
900
913
  * which correspond to this error.
@@ -937,117 +950,79 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
937
950
  * Extension fields to add to the formatted error.
938
951
  */
939
952
  function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {
940
- var _locations2, _source2, _positions2, _extensions2;
953
+ var _nodeLocations, _nodeLocations2, _nodeLocations3;
941
954
 
942
955
  var _this;
943
956
 
944
957
  _classCallCheck(this, GraphQLError);
945
958
 
946
- _this = _super.call(this, message); // Compute list of blame nodes.
947
-
948
- var _nodes = Array.isArray(nodes) ? nodes.length !== 0 ? nodes : undefined : nodes ? [nodes] : undefined; // Compute locations in the source for the given nodes/positions.
949
-
950
-
951
- var _source = source;
952
-
953
- if (!_source && _nodes) {
954
- var _nodes$0$loc;
955
-
956
- _source = (_nodes$0$loc = _nodes[0].loc) === null || _nodes$0$loc === void 0 ? void 0 : _nodes$0$loc.source;
957
- }
959
+ _this = _super.call(this, message);
960
+ _this.name = 'GraphQLError';
961
+ _this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.
958
962
 
959
- var _positions = positions;
963
+ _this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);
964
+ var nodeLocations = [];
960
965
 
961
- if (!_positions && _nodes) {
962
- _positions = _nodes.reduce(function (list, node) {
963
- if (node.loc) {
964
- list.push(node.loc.start);
965
- }
966
+ for (var _i2 = 0, _ref3 = (_this$nodes = _this.nodes) !== null && _this$nodes !== void 0 ? _this$nodes : []; _i2 < _ref3.length; _i2++) {
967
+ var _this$nodes;
966
968
 
967
- return list;
968
- }, []);
969
- }
969
+ var _ref4 = _ref3[_i2];
970
+ var loc = _ref4.loc;
970
971
 
971
- if (_positions && _positions.length === 0) {
972
- _positions = undefined;
972
+ if (loc != null) {
973
+ nodeLocations.push(loc);
974
+ }
973
975
  }
974
976
 
975
- var _locations;
976
-
977
- if (positions && source) {
978
- _locations = positions.map(function (pos) {
979
- return getLocation(source, pos);
980
- });
981
- } else if (_nodes) {
982
- _locations = _nodes.reduce(function (list, node) {
983
- if (node.loc) {
984
- list.push(getLocation(node.loc.source, node.loc.start));
985
- }
986
-
987
- return list;
988
- }, []);
989
- }
977
+ nodeLocations = undefinedIfEmpty(nodeLocations); // Compute locations in the source for the given nodes/positions.
990
978
 
991
- var _extensions = extensions;
979
+ _this.source = source !== null && source !== void 0 ? source : (_nodeLocations = nodeLocations) === null || _nodeLocations === void 0 ? void 0 : _nodeLocations[0].source;
980
+ _this.positions = positions !== null && positions !== void 0 ? positions : (_nodeLocations2 = nodeLocations) === null || _nodeLocations2 === void 0 ? void 0 : _nodeLocations2.map(function (loc) {
981
+ return loc.start;
982
+ });
983
+ _this.locations = positions && source ? positions.map(function (pos) {
984
+ return getLocation(source, pos);
985
+ }) : (_nodeLocations3 = nodeLocations) === null || _nodeLocations3 === void 0 ? void 0 : _nodeLocations3.map(function (loc) {
986
+ return getLocation(loc.source, loc.start);
987
+ });
988
+ _this.path = path !== null && path !== void 0 ? path : undefined;
989
+ var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;
992
990
 
993
- if (_extensions == null && originalError != null) {
994
- var originalExtensions = originalError.extensions;
991
+ if (extensions == null && isObjectLike(originalExtensions)) {
992
+ _this.extensions = _objectSpread({}, originalExtensions);
993
+ } else {
994
+ _this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};
995
+ } // By being enumerable, JSON.stringify will include bellow properties in the resulting output.
996
+ // This ensures that the simplest possible GraphQL service adheres to the spec.
995
997
 
996
- if (isObjectLike(originalExtensions)) {
997
- _extensions = originalExtensions;
998
- }
999
- }
1000
998
 
1001
999
  Object.defineProperties(_assertThisInitialized(_this), {
1002
- name: {
1003
- value: 'GraphQLError'
1004
- },
1005
1000
  message: {
1006
- value: message,
1007
- // By being enumerable, JSON.stringify will include `message` in the
1008
- // resulting output. This ensures that the simplest possible GraphQL
1009
- // service adheres to the spec.
1010
- enumerable: true,
1011
- writable: true
1001
+ enumerable: true
1012
1002
  },
1013
1003
  locations: {
1014
- // Coercing falsy values to undefined ensures they will not be included
1015
- // in JSON.stringify() when not provided.
1016
- value: (_locations2 = _locations) !== null && _locations2 !== void 0 ? _locations2 : undefined,
1017
- // By being enumerable, JSON.stringify will include `locations` in the
1018
- // resulting output. This ensures that the simplest possible GraphQL
1019
- // service adheres to the spec.
1020
- enumerable: _locations != null
1004
+ enumerable: _this.locations != null
1021
1005
  },
1022
1006
  path: {
1023
- // Coercing falsy values to undefined ensures they will not be included
1024
- // in JSON.stringify() when not provided.
1025
- value: path !== null && path !== void 0 ? path : undefined,
1026
- // By being enumerable, JSON.stringify will include `path` in the
1027
- // resulting output. This ensures that the simplest possible GraphQL
1028
- // service adheres to the spec.
1029
- enumerable: path != null
1007
+ enumerable: _this.path != null
1008
+ },
1009
+ extensions: {
1010
+ enumerable: _this.extensions != null && Object.keys(_this.extensions).length > 0
1011
+ },
1012
+ name: {
1013
+ enumerable: false
1030
1014
  },
1031
1015
  nodes: {
1032
- value: _nodes !== null && _nodes !== void 0 ? _nodes : undefined
1016
+ enumerable: false
1033
1017
  },
1034
1018
  source: {
1035
- value: (_source2 = _source) !== null && _source2 !== void 0 ? _source2 : undefined
1019
+ enumerable: false
1036
1020
  },
1037
1021
  positions: {
1038
- value: (_positions2 = _positions) !== null && _positions2 !== void 0 ? _positions2 : undefined
1022
+ enumerable: false
1039
1023
  },
1040
1024
  originalError: {
1041
- value: originalError
1042
- },
1043
- extensions: {
1044
- // Coercing falsy values to undefined ensures they will not be included
1045
- // in JSON.stringify() when not provided.
1046
- value: (_extensions2 = _extensions) !== null && _extensions2 !== void 0 ? _extensions2 : undefined,
1047
- // By being enumerable, JSON.stringify will include `path` in the
1048
- // resulting output. This ensures that the simplest possible GraphQL
1049
- // service adheres to the spec.
1050
- enumerable: _extensions != null
1025
+ enumerable: false
1051
1026
  }
1052
1027
  }); // Include (non-enumerable) stack trace.
1053
1028
 
@@ -1074,10 +1049,15 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
1074
1049
  return _this;
1075
1050
  }
1076
1051
 
1077
- _createClass(GraphQLError, [{
1052
+ _createClass$1(GraphQLError, [{
1078
1053
  key: "toString",
1079
1054
  value: function toString() {
1080
1055
  return printError(this);
1056
+ }
1057
+ }, {
1058
+ key: "toJSON",
1059
+ value: function toJSON() {
1060
+ return formatError(this);
1081
1061
  } // FIXME: workaround to not break chai comparisons, should be remove in v16
1082
1062
  // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
1083
1063
 
@@ -1090,31 +1070,63 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
1090
1070
 
1091
1071
  return GraphQLError;
1092
1072
  }( /*#__PURE__*/_wrapNativeSuper(Error));
1073
+
1074
+ function undefinedIfEmpty(array) {
1075
+ return array === undefined || array.length === 0 ? undefined : array;
1076
+ }
1093
1077
  /**
1094
1078
  * Prints a GraphQLError to a string, representing useful location information
1095
1079
  * about the error's position in the source.
1096
1080
  */
1097
1081
 
1082
+
1098
1083
  function printError(error) {
1099
1084
  var output = error.message;
1100
1085
 
1101
1086
  if (error.nodes) {
1102
- for (var _i2 = 0, _error$nodes2 = error.nodes; _i2 < _error$nodes2.length; _i2++) {
1103
- var node = _error$nodes2[_i2];
1087
+ for (var _i4 = 0, _error$nodes2 = error.nodes; _i4 < _error$nodes2.length; _i4++) {
1088
+ var node = _error$nodes2[_i4];
1104
1089
 
1105
1090
  if (node.loc) {
1106
1091
  output += '\n\n' + printLocation(node.loc);
1107
1092
  }
1108
1093
  }
1109
1094
  } else if (error.source && error.locations) {
1110
- for (var _i4 = 0, _error$locations2 = error.locations; _i4 < _error$locations2.length; _i4++) {
1111
- var location = _error$locations2[_i4];
1095
+ for (var _i6 = 0, _error$locations2 = error.locations; _i6 < _error$locations2.length; _i6++) {
1096
+ var location = _error$locations2[_i6];
1112
1097
  output += '\n\n' + printSourceLocation(error.source, location);
1113
1098
  }
1114
1099
  }
1115
1100
 
1116
1101
  return output;
1117
1102
  }
1103
+ /**
1104
+ * Given a GraphQLError, format it according to the rules described by the
1105
+ * Response Format, Errors section of the GraphQL Specification.
1106
+ */
1107
+
1108
+ function formatError(error) {
1109
+ var _error$message;
1110
+
1111
+ error || devAssert(0, 'Received null or undefined error.');
1112
+ var message = (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : 'An unknown error occurred.';
1113
+ var locations = error.locations;
1114
+ var path = error.path;
1115
+ var extensions = error.extensions;
1116
+ return extensions && Object.keys(extensions).length > 0 ? {
1117
+ message: message,
1118
+ locations: locations,
1119
+ path: path,
1120
+ extensions: extensions
1121
+ } : {
1122
+ message: message,
1123
+ locations: locations,
1124
+ path: path
1125
+ };
1126
+ }
1127
+ /**
1128
+ * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors
1129
+ */
1118
1130
 
1119
1131
  /**
1120
1132
  * Produces a GraphQLError representing a syntax error, containing useful
@@ -1362,7 +1374,7 @@ var TokenKind = Object.freeze({
1362
1374
  * The enum type representing the token kinds values.
1363
1375
  */
1364
1376
 
1365
- function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
1377
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1366
1378
  var MAX_ARRAY_LENGTH = 10;
1367
1379
  var MAX_RECURSIVE_DEPTH = 2;
1368
1380
  /**
@@ -1374,7 +1386,7 @@ function inspect(value) {
1374
1386
  }
1375
1387
 
1376
1388
  function formatValue(value, seenValues) {
1377
- switch (_typeof$2(value)) {
1389
+ switch (_typeof(value)) {
1378
1390
  case 'string':
1379
1391
  return JSON.stringify(value);
1380
1392
 
@@ -1484,14 +1496,6 @@ function getObjectTag(object) {
1484
1496
  return tag;
1485
1497
  }
1486
1498
 
1487
- function devAssert(condition, message) {
1488
- var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
1489
-
1490
- if (!booleanCondition) {
1491
- throw new Error(message);
1492
- }
1493
- }
1494
-
1495
1499
  /**
1496
1500
  * A replacement for instanceof which includes an error warning when multi-realm
1497
1501
  * constructors are detected.
@@ -1499,15 +1503,15 @@ function devAssert(condition, message) {
1499
1503
 
1500
1504
  // See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
1501
1505
  // See: https://webpack.js.org/guides/production/
1502
- const instanceOf = // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
1506
+ const instanceOf = // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
1503
1507
  // eslint-disable-next-line no-shadow
1504
1508
  function instanceOf(value, constructor) {
1505
1509
  return value instanceof constructor;
1506
1510
  } ;
1507
1511
 
1508
- function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1512
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1509
1513
 
1510
- function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
1514
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
1511
1515
 
1512
1516
  /**
1513
1517
  * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
@@ -1532,7 +1536,7 @@ var Source = /*#__PURE__*/function () {
1532
1536
  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
1533
1537
 
1534
1538
 
1535
- _createClass$1(Source, [{
1539
+ _createClass(Source, [{
1536
1540
  key: SYMBOL_TO_STRING_TAG,
1537
1541
  get: function get() {
1538
1542
  return 'Source';
@@ -4525,7 +4529,7 @@ function hasMultilineItems(maybeArray) {
4525
4529
  return maybeArray != null && maybeArray.some(isMultiline);
4526
4530
  }
4527
4531
 
4528
- function e$1(e){this.message=e;}e$1.prototype=new Error,e$1.prototype.name="InvalidCharacterError";var r$1="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t$1(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r$1(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r$1(t)}}function n$1(e){this.message=e;}function o$1(e,r){if("string"!=typeof e)throw new n$1("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t$1(e.split(".")[o]))}catch(e){throw new n$1("Invalid token specified: "+e.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";
4532
+ function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
4529
4533
 
4530
4534
  //
4531
4535
  // Main
@@ -4762,10 +4766,10 @@ function renameVariables(variables, renameFn) {
4762
4766
  }, {});
4763
4767
  }
4764
4768
  exports.renameVariables = renameVariables;
4765
-
4769
+ //# sourceMappingURL=utils.js.map
4766
4770
  });
4767
4771
 
4768
- var dist = createCommonjsModule(function (module, exports) {
4772
+ var dist$1 = createCommonjsModule(function (module, exports) {
4769
4773
  var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
4770
4774
  var extendStatics = function (d, b) {
4771
4775
  extendStatics = Object.setPrototypeOf ||
@@ -4830,15 +4834,15 @@ var CombinedQueryBuilderImpl = /** @class */ (function () {
4830
4834
  otherOpDefs.forEach(function (_def) {
4831
4835
  var _a, _b;
4832
4836
  if (_def.operation !== def.operation) {
4833
- throw new CombinedQueryError("expected all operations to be of the smae type, but " + ((_a = _def.name) === null || _a === void 0 ? void 0 : _a.value) + " is " + _def.operation + " and " + ((_b = def.name) === null || _b === void 0 ? void 0 : _b.value) + " is " + def.operation);
4837
+ throw new CombinedQueryError("expected all operations to be of the same type, but " + ((_a = _def.name) === null || _a === void 0 ? void 0 : _a.value) + " is " + _def.operation + " and " + ((_b = def.name) === null || _b === void 0 ? void 0 : _b.value) + " is " + def.operation);
4834
4838
  }
4835
4839
  });
4836
- // all top level fields mut be unique. doesn't drill down framgents tho. maybe someday
4840
+ // all top level fields mut be unique. doesn't drill down fragments tho. maybe someday
4837
4841
  (_a = def.selectionSet.selections) === null || _a === void 0 ? void 0 : _a.filter(function (s) { return s.kind === 'Field'; }).forEach(function (sel) {
4838
4842
  otherOpDefs.forEach(function (_def) { var _a; return (_a = _def.selectionSet.selections) === null || _a === void 0 ? void 0 : _a.filter(function (s) { return s.kind === 'Field'; }).forEach(function (_sel) {
4839
4843
  var _a, _b, _c, _d;
4840
4844
  if ((((_a = sel.alias) === null || _a === void 0 ? void 0 : _a.value) || sel.name.value) === (((_b = _sel.alias) === null || _b === void 0 ? void 0 : _b.value) || _sel.name.value)) {
4841
- throw new CombinedQueryError("duplicate field definition " + _sel.name.value + " for oprations " + ((_c = def.name) === null || _c === void 0 ? void 0 : _c.value) + " and " + ((_d = _def.name) === null || _d === void 0 ? void 0 : _d.value));
4845
+ throw new CombinedQueryError("duplicate field definition " + _sel.name.value + " for operations " + ((_c = def.name) === null || _c === void 0 ? void 0 : _c.value) + " and " + ((_d = _def.name) === null || _d === void 0 ? void 0 : _d.value));
4842
4846
  }
4843
4847
  }); });
4844
4848
  });
@@ -4847,7 +4851,7 @@ var CombinedQueryBuilderImpl = /** @class */ (function () {
4847
4851
  otherOpDefs.forEach(function (_def) { var _a; return (_a = _def.variableDefinitions) === null || _a === void 0 ? void 0 : _a.forEach(function (_variable) {
4848
4852
  var _a, _b;
4849
4853
  if (variable.variable.name.value === _variable.variable.name.value) {
4850
- throw new CombinedQueryError("duplicate variable definition " + _variable.variable.name.value + " for oprations " + ((_a = def.name) === null || _a === void 0 ? void 0 : _a.value) + " and " + ((_b = _def.name) === null || _b === void 0 ? void 0 : _b.value));
4854
+ throw new CombinedQueryError("duplicate variable definition " + _variable.variable.name.value + " for operations " + ((_a = def.name) === null || _a === void 0 ? void 0 : _a.value) + " and " + ((_b = _def.name) === null || _b === void 0 ? void 0 : _b.value));
4851
4855
  }
4852
4856
  }); });
4853
4857
  });
@@ -4916,31 +4920,46 @@ function combinedQuery(operationName) {
4916
4920
  };
4917
4921
  }
4918
4922
  exports.default = combinedQuery;
4919
-
4923
+ //# sourceMappingURL=index.js.map
4920
4924
  });
4921
4925
 
4922
- const M = /*@__PURE__*/getDefaultExportFromCjs(dist);
4926
+ const combineQuery = /*@__PURE__*/getDefaultExportFromCjs(dist$1);
4923
4927
 
4924
4928
  var browserPonyfill = createCommonjsModule(function (module, exports) {
4925
- var global = typeof self !== 'undefined' ? self : commonjsGlobal;
4926
- var __self__ = (function () {
4929
+ // Save global object in a variable
4930
+ var __global__ =
4931
+ (typeof globalThis !== 'undefined' && globalThis) ||
4932
+ (typeof self !== 'undefined' && self) ||
4933
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal);
4934
+ // Create an object that extends from __global__ without the fetch function
4935
+ var __globalThis__ = (function () {
4927
4936
  function F() {
4928
4937
  this.fetch = false;
4929
- this.DOMException = global.DOMException;
4938
+ this.DOMException = __global__.DOMException;
4930
4939
  }
4931
- F.prototype = global;
4940
+ F.prototype = __global__; // Needed for feature detection on whatwg-fetch's code
4932
4941
  return new F();
4933
4942
  })();
4934
- (function(self) {
4943
+ // Wraps whatwg-fetch with a function scope to hijack the global object
4944
+ // "globalThis" that's going to be patched
4945
+ (function(globalThis) {
4935
4946
 
4936
- var irrelevant = (function (exports) {
4947
+ ((function (exports) {
4948
+
4949
+ /* eslint-disable no-prototype-builtins */
4950
+ var g =
4951
+ (typeof globalThis !== 'undefined' && globalThis) ||
4952
+ (typeof self !== 'undefined' && self) ||
4953
+ // eslint-disable-next-line no-undef
4954
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal) ||
4955
+ {};
4937
4956
 
4938
4957
  var support = {
4939
- searchParams: 'URLSearchParams' in self,
4940
- iterable: 'Symbol' in self && 'iterator' in Symbol,
4958
+ searchParams: 'URLSearchParams' in g,
4959
+ iterable: 'Symbol' in g && 'iterator' in Symbol,
4941
4960
  blob:
4942
- 'FileReader' in self &&
4943
- 'Blob' in self &&
4961
+ 'FileReader' in g &&
4962
+ 'Blob' in g &&
4944
4963
  (function() {
4945
4964
  try {
4946
4965
  new Blob();
@@ -4949,8 +4968,8 @@ var irrelevant = (function (exports) {
4949
4968
  return false
4950
4969
  }
4951
4970
  })(),
4952
- formData: 'FormData' in self,
4953
- arrayBuffer: 'ArrayBuffer' in self
4971
+ formData: 'FormData' in g,
4972
+ arrayBuffer: 'ArrayBuffer' in g
4954
4973
  };
4955
4974
 
4956
4975
  function isDataView(obj) {
@@ -4981,8 +5000,8 @@ var irrelevant = (function (exports) {
4981
5000
  if (typeof name !== 'string') {
4982
5001
  name = String(name);
4983
5002
  }
4984
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
4985
- throw new TypeError('Invalid character in header field name')
5003
+ if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
5004
+ throw new TypeError('Invalid character in header field name: "' + name + '"')
4986
5005
  }
4987
5006
  return name.toLowerCase()
4988
5007
  }
@@ -5021,6 +5040,9 @@ var irrelevant = (function (exports) {
5021
5040
  }, this);
5022
5041
  } else if (Array.isArray(headers)) {
5023
5042
  headers.forEach(function(header) {
5043
+ if (header.length != 2) {
5044
+ throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
5045
+ }
5024
5046
  this.append(header[0], header[1]);
5025
5047
  }, this);
5026
5048
  } else if (headers) {
@@ -5091,6 +5113,7 @@ var irrelevant = (function (exports) {
5091
5113
  }
5092
5114
 
5093
5115
  function consumed(body) {
5116
+ if (body._noBody) return
5094
5117
  if (body.bodyUsed) {
5095
5118
  return Promise.reject(new TypeError('Already read'))
5096
5119
  }
@@ -5118,7 +5141,9 @@ var irrelevant = (function (exports) {
5118
5141
  function readBlobAsText(blob) {
5119
5142
  var reader = new FileReader();
5120
5143
  var promise = fileReaderReady(reader);
5121
- reader.readAsText(blob);
5144
+ var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
5145
+ var encoding = match ? match[1] : 'utf-8';
5146
+ reader.readAsText(blob, encoding);
5122
5147
  return promise
5123
5148
  }
5124
5149
 
@@ -5146,8 +5171,21 @@ var irrelevant = (function (exports) {
5146
5171
  this.bodyUsed = false;
5147
5172
 
5148
5173
  this._initBody = function(body) {
5174
+ /*
5175
+ fetch-mock wraps the Response object in an ES6 Proxy to
5176
+ provide useful test harness features such as flush. However, on
5177
+ ES5 browsers without fetch or Proxy support pollyfills must be used;
5178
+ the proxy-pollyfill is unable to proxy an attribute unless it exists
5179
+ on the object before the Proxy is created. This change ensures
5180
+ Response.bodyUsed exists on the instance, while maintaining the
5181
+ semantic of setting Request.bodyUsed in the constructor before
5182
+ _initBody is called.
5183
+ */
5184
+ // eslint-disable-next-line no-self-assign
5185
+ this.bodyUsed = this.bodyUsed;
5149
5186
  this._bodyInit = body;
5150
5187
  if (!body) {
5188
+ this._noBody = true;
5151
5189
  this._bodyText = '';
5152
5190
  } else if (typeof body === 'string') {
5153
5191
  this._bodyText = body;
@@ -5195,15 +5233,29 @@ var irrelevant = (function (exports) {
5195
5233
  return Promise.resolve(new Blob([this._bodyText]))
5196
5234
  }
5197
5235
  };
5236
+ }
5198
5237
 
5199
- this.arrayBuffer = function() {
5200
- if (this._bodyArrayBuffer) {
5201
- return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
5238
+ this.arrayBuffer = function() {
5239
+ if (this._bodyArrayBuffer) {
5240
+ var isConsumed = consumed(this);
5241
+ if (isConsumed) {
5242
+ return isConsumed
5243
+ } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
5244
+ return Promise.resolve(
5245
+ this._bodyArrayBuffer.buffer.slice(
5246
+ this._bodyArrayBuffer.byteOffset,
5247
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
5248
+ )
5249
+ )
5202
5250
  } else {
5203
- return this.blob().then(readBlobAsArrayBuffer)
5251
+ return Promise.resolve(this._bodyArrayBuffer)
5204
5252
  }
5205
- };
5206
- }
5253
+ } else if (support.blob) {
5254
+ return this.blob().then(readBlobAsArrayBuffer)
5255
+ } else {
5256
+ throw new Error('could not read as ArrayBuffer')
5257
+ }
5258
+ };
5207
5259
 
5208
5260
  this.text = function() {
5209
5261
  var rejected = consumed(this);
@@ -5236,7 +5288,7 @@ var irrelevant = (function (exports) {
5236
5288
  }
5237
5289
 
5238
5290
  // HTTP methods whose capitalization should be normalized
5239
- var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
5291
+ var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
5240
5292
 
5241
5293
  function normalizeMethod(method) {
5242
5294
  var upcased = method.toUpperCase();
@@ -5244,6 +5296,10 @@ var irrelevant = (function (exports) {
5244
5296
  }
5245
5297
 
5246
5298
  function Request(input, options) {
5299
+ if (!(this instanceof Request)) {
5300
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
5301
+ }
5302
+
5247
5303
  options = options || {};
5248
5304
  var body = options.body;
5249
5305
 
@@ -5273,13 +5329,33 @@ var irrelevant = (function (exports) {
5273
5329
  }
5274
5330
  this.method = normalizeMethod(options.method || this.method || 'GET');
5275
5331
  this.mode = options.mode || this.mode || null;
5276
- this.signal = options.signal || this.signal;
5332
+ this.signal = options.signal || this.signal || (function () {
5333
+ if ('AbortController' in g) {
5334
+ var ctrl = new AbortController();
5335
+ return ctrl.signal;
5336
+ }
5337
+ }());
5277
5338
  this.referrer = null;
5278
5339
 
5279
5340
  if ((this.method === 'GET' || this.method === 'HEAD') && body) {
5280
5341
  throw new TypeError('Body not allowed for GET or HEAD requests')
5281
5342
  }
5282
5343
  this._initBody(body);
5344
+
5345
+ if (this.method === 'GET' || this.method === 'HEAD') {
5346
+ if (options.cache === 'no-store' || options.cache === 'no-cache') {
5347
+ // Search for a '_' parameter in the query string
5348
+ var reParamSearch = /([?&])_=[^&]*/;
5349
+ if (reParamSearch.test(this.url)) {
5350
+ // If it already exists then set the value with the current time
5351
+ this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
5352
+ } else {
5353
+ // Otherwise add a new '_' parameter to the end with the current time
5354
+ var reQueryString = /\?/;
5355
+ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
5356
+ }
5357
+ }
5358
+ }
5283
5359
  }
5284
5360
 
5285
5361
  Request.prototype.clone = function() {
@@ -5307,28 +5383,46 @@ var irrelevant = (function (exports) {
5307
5383
  // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
5308
5384
  // https://tools.ietf.org/html/rfc7230#section-3.2
5309
5385
  var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
5310
- preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
5311
- var parts = line.split(':');
5312
- var key = parts.shift().trim();
5313
- if (key) {
5314
- var value = parts.join(':').trim();
5315
- headers.append(key, value);
5316
- }
5317
- });
5386
+ // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
5387
+ // https://github.com/github/fetch/issues/748
5388
+ // https://github.com/zloirock/core-js/issues/751
5389
+ preProcessedHeaders
5390
+ .split('\r')
5391
+ .map(function(header) {
5392
+ return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
5393
+ })
5394
+ .forEach(function(line) {
5395
+ var parts = line.split(':');
5396
+ var key = parts.shift().trim();
5397
+ if (key) {
5398
+ var value = parts.join(':').trim();
5399
+ try {
5400
+ headers.append(key, value);
5401
+ } catch (error) {
5402
+ console.warn('Response ' + error.message);
5403
+ }
5404
+ }
5405
+ });
5318
5406
  return headers
5319
5407
  }
5320
5408
 
5321
5409
  Body.call(Request.prototype);
5322
5410
 
5323
5411
  function Response(bodyInit, options) {
5412
+ if (!(this instanceof Response)) {
5413
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
5414
+ }
5324
5415
  if (!options) {
5325
5416
  options = {};
5326
5417
  }
5327
5418
 
5328
5419
  this.type = 'default';
5329
5420
  this.status = options.status === undefined ? 200 : options.status;
5421
+ if (this.status < 200 || this.status > 599) {
5422
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
5423
+ }
5330
5424
  this.ok = this.status >= 200 && this.status < 300;
5331
- this.statusText = 'statusText' in options ? options.statusText : 'OK';
5425
+ this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
5332
5426
  this.headers = new Headers(options.headers);
5333
5427
  this.url = options.url || '';
5334
5428
  this._initBody(bodyInit);
@@ -5346,7 +5440,9 @@ var irrelevant = (function (exports) {
5346
5440
  };
5347
5441
 
5348
5442
  Response.error = function() {
5349
- var response = new Response(null, {status: 0, statusText: ''});
5443
+ var response = new Response(null, {status: 200, statusText: ''});
5444
+ response.ok = false;
5445
+ response.status = 0;
5350
5446
  response.type = 'error';
5351
5447
  return response
5352
5448
  };
@@ -5361,7 +5457,7 @@ var irrelevant = (function (exports) {
5361
5457
  return new Response(null, {status: status, headers: {location: url}})
5362
5458
  };
5363
5459
 
5364
- exports.DOMException = self.DOMException;
5460
+ exports.DOMException = g.DOMException;
5365
5461
  try {
5366
5462
  new exports.DOMException();
5367
5463
  } catch (err) {
@@ -5391,28 +5487,50 @@ var irrelevant = (function (exports) {
5391
5487
 
5392
5488
  xhr.onload = function() {
5393
5489
  var options = {
5394
- status: xhr.status,
5395
5490
  statusText: xhr.statusText,
5396
5491
  headers: parseHeaders(xhr.getAllResponseHeaders() || '')
5397
5492
  };
5493
+ // This check if specifically for when a user fetches a file locally from the file system
5494
+ // Only if the status is out of a normal range
5495
+ if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
5496
+ options.status = 200;
5497
+ } else {
5498
+ options.status = xhr.status;
5499
+ }
5398
5500
  options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
5399
5501
  var body = 'response' in xhr ? xhr.response : xhr.responseText;
5400
- resolve(new Response(body, options));
5502
+ setTimeout(function() {
5503
+ resolve(new Response(body, options));
5504
+ }, 0);
5401
5505
  };
5402
5506
 
5403
5507
  xhr.onerror = function() {
5404
- reject(new TypeError('Network request failed'));
5508
+ setTimeout(function() {
5509
+ reject(new TypeError('Network request failed'));
5510
+ }, 0);
5405
5511
  };
5406
5512
 
5407
5513
  xhr.ontimeout = function() {
5408
- reject(new TypeError('Network request failed'));
5514
+ setTimeout(function() {
5515
+ reject(new TypeError('Network request timed out'));
5516
+ }, 0);
5409
5517
  };
5410
5518
 
5411
5519
  xhr.onabort = function() {
5412
- reject(new exports.DOMException('Aborted', 'AbortError'));
5520
+ setTimeout(function() {
5521
+ reject(new exports.DOMException('Aborted', 'AbortError'));
5522
+ }, 0);
5413
5523
  };
5414
5524
 
5415
- xhr.open(request.method, request.url, true);
5525
+ function fixUrl(url) {
5526
+ try {
5527
+ return url === '' && g.location.href ? g.location.href : url
5528
+ } catch (e) {
5529
+ return url
5530
+ }
5531
+ }
5532
+
5533
+ xhr.open(request.method, fixUrl(request.url), true);
5416
5534
 
5417
5535
  if (request.credentials === 'include') {
5418
5536
  xhr.withCredentials = true;
@@ -5420,13 +5538,32 @@ var irrelevant = (function (exports) {
5420
5538
  xhr.withCredentials = false;
5421
5539
  }
5422
5540
 
5423
- if ('responseType' in xhr && support.blob) {
5424
- xhr.responseType = 'blob';
5541
+ if ('responseType' in xhr) {
5542
+ if (support.blob) {
5543
+ xhr.responseType = 'blob';
5544
+ } else if (
5545
+ support.arrayBuffer
5546
+ ) {
5547
+ xhr.responseType = 'arraybuffer';
5548
+ }
5425
5549
  }
5426
5550
 
5427
- request.headers.forEach(function(value, name) {
5428
- xhr.setRequestHeader(name, value);
5429
- });
5551
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
5552
+ var names = [];
5553
+ Object.getOwnPropertyNames(init.headers).forEach(function(name) {
5554
+ names.push(normalizeName(name));
5555
+ xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
5556
+ });
5557
+ request.headers.forEach(function(value, name) {
5558
+ if (names.indexOf(name) === -1) {
5559
+ xhr.setRequestHeader(name, value);
5560
+ }
5561
+ });
5562
+ } else {
5563
+ request.headers.forEach(function(value, name) {
5564
+ xhr.setRequestHeader(name, value);
5565
+ });
5566
+ }
5430
5567
 
5431
5568
  if (request.signal) {
5432
5569
  request.signal.addEventListener('abort', abortXhr);
@@ -5445,11 +5582,11 @@ var irrelevant = (function (exports) {
5445
5582
 
5446
5583
  fetch.polyfill = true;
5447
5584
 
5448
- if (!self.fetch) {
5449
- self.fetch = fetch;
5450
- self.Headers = Headers;
5451
- self.Request = Request;
5452
- self.Response = Response;
5585
+ if (!g.fetch) {
5586
+ g.fetch = fetch;
5587
+ g.Headers = Headers;
5588
+ g.Request = Request;
5589
+ g.Response = Response;
5453
5590
  }
5454
5591
 
5455
5592
  exports.Headers = Headers;
@@ -5461,14 +5598,13 @@ var irrelevant = (function (exports) {
5461
5598
 
5462
5599
  return exports;
5463
5600
 
5464
- })({});
5465
- })(__self__);
5466
- __self__.fetch.ponyfill = true;
5467
- // Remove "polyfill" property added by whatwg-fetch
5468
- delete __self__.fetch.polyfill;
5469
- // Choose between native implementation (global) or custom implementation (__self__)
5470
- // var ctx = global.fetch ? global : __self__;
5471
- var ctx = __self__; // this line disable service worker support temporarily
5601
+ }))({});
5602
+ })(__globalThis__);
5603
+ // This is a ponyfill, so...
5604
+ __globalThis__.fetch.ponyfill = true;
5605
+ delete __globalThis__.fetch.polyfill;
5606
+ // Choose between native implementation (__global__) or custom implementation (__globalThis__)
5607
+ var ctx = __global__.fetch ? __global__ : __globalThis__;
5472
5608
  exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
5473
5609
  exports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.
5474
5610
  exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
@@ -6661,7 +6797,7 @@ function hasMultilineItems(maybeArray) {
6661
6797
  }
6662
6798
  });
6663
6799
 
6664
- var ReactNativeFile = function ReactNativeFile(_ref) {
6800
+ var ReactNativeFile$1 = function ReactNativeFile(_ref) {
6665
6801
  var uri = _ref.uri,
6666
6802
  name = _ref.name,
6667
6803
  type = _ref.type;
@@ -6670,21 +6806,21 @@ var ReactNativeFile = function ReactNativeFile(_ref) {
6670
6806
  this.type = type;
6671
6807
  };
6672
6808
 
6673
- var isExtractableFile = function isExtractableFile(value) {
6809
+ var isExtractableFile$1 = function isExtractableFile(value) {
6674
6810
  return (
6675
6811
  (typeof File !== 'undefined' && value instanceof File) ||
6676
6812
  (typeof Blob !== 'undefined' && value instanceof Blob) ||
6677
- value instanceof ReactNativeFile
6813
+ value instanceof ReactNativeFile$1
6678
6814
  );
6679
6815
  };
6680
6816
 
6681
- var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
6817
+ var extractFiles$1 = function extractFiles(value, path, isExtractableFile) {
6682
6818
  if (path === void 0) {
6683
6819
  path = '';
6684
6820
  }
6685
6821
 
6686
- if (isExtractableFile$1 === void 0) {
6687
- isExtractableFile$1 = isExtractableFile;
6822
+ if (isExtractableFile === void 0) {
6823
+ isExtractableFile = isExtractableFile$1;
6688
6824
  }
6689
6825
 
6690
6826
  var clone;
@@ -6696,7 +6832,7 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
6696
6832
  else files.set(file, paths);
6697
6833
  }
6698
6834
 
6699
- if (isExtractableFile$1(value)) {
6835
+ if (isExtractableFile(value)) {
6700
6836
  clone = null;
6701
6837
  addFile([path], value);
6702
6838
  } else {
@@ -6708,7 +6844,7 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
6708
6844
  });
6709
6845
  else if (Array.isArray(value))
6710
6846
  clone = value.map(function (child, i) {
6711
- var result = extractFiles(child, '' + prefix + i, isExtractableFile$1);
6847
+ var result = extractFiles(child, '' + prefix + i, isExtractableFile);
6712
6848
  result.files.forEach(addFile);
6713
6849
  return result.clone;
6714
6850
  });
@@ -6716,7 +6852,7 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
6716
6852
  clone = {};
6717
6853
 
6718
6854
  for (var i in value) {
6719
- var result = extractFiles(value[i], '' + prefix + i, isExtractableFile$1);
6855
+ var result = extractFiles(value[i], '' + prefix + i, isExtractableFile);
6720
6856
  result.files.forEach(addFile);
6721
6857
  clone[i] = result.clone;
6722
6858
  }
@@ -6729,18 +6865,18 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
6729
6865
  };
6730
6866
  };
6731
6867
 
6732
- var ReactNativeFile$1 = ReactNativeFile;
6733
- var extractFiles$1 = extractFiles;
6734
- var isExtractableFile$1 = isExtractableFile;
6868
+ var ReactNativeFile = ReactNativeFile$1;
6869
+ var extractFiles = extractFiles$1;
6870
+ var isExtractableFile = isExtractableFile$1;
6735
6871
 
6736
6872
  var _public = {
6737
- ReactNativeFile: ReactNativeFile$1,
6738
- extractFiles: extractFiles$1,
6739
- isExtractableFile: isExtractableFile$1
6873
+ ReactNativeFile: ReactNativeFile,
6874
+ extractFiles: extractFiles,
6875
+ isExtractableFile: isExtractableFile
6740
6876
  };
6741
6877
 
6742
6878
  /* eslint-env browser */
6743
- var browser = typeof self == 'object' ? self.FormData : window.FormData;
6879
+ var browser = typeof self === 'object' ? self.FormData : window.FormData;
6744
6880
 
6745
6881
  var createRequestBody_1 = createCommonjsModule(function (module, exports) {
6746
6882
  var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
@@ -6762,10 +6898,21 @@ var isExtractableFileEnhanced = function (value) {
6762
6898
  * (https://github.com/jaydenseric/graphql-multipart-request-spec)
6763
6899
  * Otherwise returns JSON
6764
6900
  */
6765
- function createRequestBody(query, variables) {
6766
- var _a = _public.extractFiles({ query: query, variables: variables }, '', isExtractableFileEnhanced), clone = _a.clone, files = _a.files;
6901
+ function createRequestBody(query, variables, operationName) {
6902
+ var _a = _public.extractFiles({ query: query, variables: variables, operationName: operationName }, '', isExtractableFileEnhanced), clone = _a.clone, files = _a.files;
6767
6903
  if (files.size === 0) {
6768
- return JSON.stringify(clone);
6904
+ if (!Array.isArray(query)) {
6905
+ return JSON.stringify(clone);
6906
+ }
6907
+ if (typeof variables !== 'undefined' && !Array.isArray(variables)) {
6908
+ throw new Error('Cannot create request body with given variable type, array expected');
6909
+ }
6910
+ // Batch support
6911
+ var payload = query.reduce(function (accu, currentQuery, index) {
6912
+ accu.push({ query: currentQuery, variables: variables ? variables[index] : undefined });
6913
+ return accu;
6914
+ }, []);
6915
+ return JSON.stringify(payload);
6769
6916
  }
6770
6917
  var Form = typeof FormData === 'undefined' ? form_data_1.default : FormData;
6771
6918
  var form = new Form();
@@ -6783,7 +6930,7 @@ function createRequestBody(query, variables) {
6783
6930
  return form;
6784
6931
  }
6785
6932
  exports.default = createRequestBody;
6786
-
6933
+ //# sourceMappingURL=createRequestBody.js.map
6787
6934
  });
6788
6935
 
6789
6936
  var types = createCommonjsModule(function (module, exports) {
@@ -6795,6 +6942,8 @@ var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
6795
6942
  return extendStatics(d, b);
6796
6943
  };
6797
6944
  return function (d, b) {
6945
+ if (typeof b !== "function" && b !== null)
6946
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
6798
6947
  extendStatics(d, b);
6799
6948
  function __() { this.constructor = d; }
6800
6949
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -6831,10 +6980,10 @@ var ClientError = /** @class */ (function (_super) {
6831
6980
  return ClientError;
6832
6981
  }(Error));
6833
6982
  exports.ClientError = ClientError;
6834
-
6983
+ //# sourceMappingURL=types.js.map
6835
6984
  });
6836
6985
 
6837
- var dist$1 = createCommonjsModule(function (module, exports) {
6986
+ var dist = createCommonjsModule(function (module, exports) {
6838
6987
  var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
6839
6988
  __assign = Object.assign || function(t) {
6840
6989
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -6916,13 +7065,12 @@ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || func
6916
7065
  return (mod && mod.__esModule) ? mod : { "default": mod };
6917
7066
  };
6918
7067
  Object.defineProperty(exports, "__esModule", { value: true });
6919
- exports.gql = exports.request = exports.rawRequest = exports.GraphQLClient = exports.ClientError = void 0;
7068
+ exports.gql = exports.batchRequests = exports.request = exports.rawRequest = exports.GraphQLClient = exports.ClientError = void 0;
6920
7069
  var cross_fetch_1 = __importStar(browserPonyfill), CrossFetch = cross_fetch_1;
6921
7070
 
6922
7071
  var createRequestBody_1$1 = __importDefault(createRequestBody_1);
6923
7072
 
6924
- var types_2 = types;
6925
- Object.defineProperty(exports, "ClientError", { enumerable: true, get: function () { return types_2.ClientError; } });
7073
+ Object.defineProperty(exports, "ClientError", { enumerable: true, get: function () { return types.ClientError; } });
6926
7074
  /**
6927
7075
  * Convert the given headers configuration into a plain object.
6928
7076
  */
@@ -6945,6 +7093,85 @@ var resolveHeaders = function (headers) {
6945
7093
  }
6946
7094
  return oHeaders;
6947
7095
  };
7096
+ /**
7097
+ * Clean a GraphQL document to send it via a GET query
7098
+ *
7099
+ * @param {string} str GraphQL query
7100
+ * @returns {string} Cleaned query
7101
+ */
7102
+ var queryCleanner = function (str) { return str.replace(/([\s,]|#[^\n\r]+)+/g, ' ').trim(); };
7103
+ /**
7104
+ * Create query string for GraphQL request
7105
+ *
7106
+ * @param {object} param0 -
7107
+ *
7108
+ * @param {string|string[]} param0.query the GraphQL document or array of document if it's a batch request
7109
+ * @param {string|undefined} param0.operationName the GraphQL operation name
7110
+ * @param {any|any[]} param0.variables the GraphQL variables to use
7111
+ */
7112
+ var buildGetQueryParams = function (_a) {
7113
+ var query = _a.query, variables = _a.variables, operationName = _a.operationName;
7114
+ if (!Array.isArray(query)) {
7115
+ var search = ["query=" + encodeURIComponent(queryCleanner(query))];
7116
+ if (variables) {
7117
+ search.push("variables=" + encodeURIComponent(JSON.stringify(variables)));
7118
+ }
7119
+ if (operationName) {
7120
+ search.push("operationName=" + encodeURIComponent(operationName));
7121
+ }
7122
+ return search.join('&');
7123
+ }
7124
+ if (typeof variables !== 'undefined' && !Array.isArray(variables)) {
7125
+ throw new Error('Cannot create query with given variable type, array expected');
7126
+ }
7127
+ // Batch support
7128
+ var payload = query.reduce(function (accu, currentQuery, index) {
7129
+ accu.push({
7130
+ query: queryCleanner(currentQuery),
7131
+ variables: variables ? JSON.stringify(variables[index]) : undefined,
7132
+ });
7133
+ return accu;
7134
+ }, []);
7135
+ return "query=" + encodeURIComponent(JSON.stringify(payload));
7136
+ };
7137
+ /**
7138
+ * Fetch data using POST method
7139
+ */
7140
+ var post = function (_a) {
7141
+ var url = _a.url, query = _a.query, variables = _a.variables, operationName = _a.operationName, headers = _a.headers, fetch = _a.fetch, fetchOptions = _a.fetchOptions;
7142
+ return __awaiter(void 0, void 0, void 0, function () {
7143
+ var body;
7144
+ return __generator(this, function (_b) {
7145
+ switch (_b.label) {
7146
+ case 0:
7147
+ body = createRequestBody_1$1.default(query, variables, operationName);
7148
+ return [4 /*yield*/, fetch(url, __assign({ method: 'POST', headers: __assign(__assign({}, (typeof body === 'string' ? { 'Content-Type': 'application/json' } : {})), headers), body: body }, fetchOptions))];
7149
+ case 1: return [2 /*return*/, _b.sent()];
7150
+ }
7151
+ });
7152
+ });
7153
+ };
7154
+ /**
7155
+ * Fetch data using GET method
7156
+ */
7157
+ var get = function (_a) {
7158
+ var url = _a.url, query = _a.query, variables = _a.variables, operationName = _a.operationName, headers = _a.headers, fetch = _a.fetch, fetchOptions = _a.fetchOptions;
7159
+ return __awaiter(void 0, void 0, void 0, function () {
7160
+ var queryParams;
7161
+ return __generator(this, function (_b) {
7162
+ switch (_b.label) {
7163
+ case 0:
7164
+ queryParams = buildGetQueryParams({
7165
+ query: query,
7166
+ variables: variables,
7167
+ operationName: operationName,
7168
+ });
7169
+ return [4 /*yield*/, fetch(url + "?" + queryParams, __assign({ method: 'GET', headers: headers }, fetchOptions))];
7170
+ case 1: return [2 /*return*/, _b.sent()];
7171
+ }
7172
+ });
7173
+ });
7174
+ };
6948
7175
  /**
6949
7176
  * todo
6950
7177
  */
@@ -6954,27 +7181,44 @@ var GraphQLClient = /** @class */ (function () {
6954
7181
  this.options = options || {};
6955
7182
  }
6956
7183
  GraphQLClient.prototype.rawRequest = function (query, variables, requestHeaders) {
7184
+ var _a = this.options, headers = _a.headers, _b = _a.fetch, fetch = _b === void 0 ? cross_fetch_1.default : _b, _c = _a.method, method = _c === void 0 ? 'POST' : _c, fetchOptions = __rest(_a, ["headers", "fetch", "method"]);
7185
+ var url = this.url;
7186
+ return makeRequest({
7187
+ url: url,
7188
+ query: query,
7189
+ variables: variables,
7190
+ headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(requestHeaders)),
7191
+ operationName: undefined,
7192
+ fetch: fetch,
7193
+ method: method,
7194
+ fetchOptions: fetchOptions,
7195
+ });
7196
+ };
7197
+ /**
7198
+ * Send a GraphQL document to the server.
7199
+ */
7200
+ GraphQLClient.prototype.request = function (document, variables, requestHeaders) {
6957
7201
  return __awaiter(this, void 0, void 0, function () {
6958
- var _a, headers, _b, localFetch, others, body, response, result, headers_1, status_1, errorResult;
6959
- return __generator(this, function (_c) {
6960
- switch (_c.label) {
7202
+ var _a, headers, _b, fetch, _c, method, fetchOptions, url, _d, query, operationName, data;
7203
+ return __generator(this, function (_e) {
7204
+ switch (_e.label) {
6961
7205
  case 0:
6962
- _a = this.options, headers = _a.headers, _b = _a.fetch, localFetch = _b === void 0 ? cross_fetch_1.default : _b, others = __rest(_a, ["headers", "fetch"]);
6963
- body = createRequestBody_1$1.default(query, variables);
6964
- return [4 /*yield*/, localFetch(this.url, __assign({ method: 'POST', headers: __assign(__assign(__assign({}, (typeof body === 'string' ? { 'Content-Type': 'application/json' } : {})), resolveHeaders(headers)), resolveHeaders(requestHeaders)), body: body }, others))];
7206
+ _a = this.options, headers = _a.headers, _b = _a.fetch, fetch = _b === void 0 ? cross_fetch_1.default : _b, _c = _a.method, method = _c === void 0 ? 'POST' : _c, fetchOptions = __rest(_a, ["headers", "fetch", "method"]);
7207
+ url = this.url;
7208
+ _d = resolveRequestDocument(document), query = _d.query, operationName = _d.operationName;
7209
+ return [4 /*yield*/, makeRequest({
7210
+ url: url,
7211
+ query: query,
7212
+ variables: variables,
7213
+ headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(requestHeaders)),
7214
+ operationName: operationName,
7215
+ fetch: fetch,
7216
+ method: method,
7217
+ fetchOptions: fetchOptions,
7218
+ })];
6965
7219
  case 1:
6966
- response = _c.sent();
6967
- return [4 /*yield*/, getResult(response)];
6968
- case 2:
6969
- result = _c.sent();
6970
- if (response.ok && !result.errors && result.data) {
6971
- headers_1 = response.headers, status_1 = response.status;
6972
- return [2 /*return*/, __assign(__assign({}, result), { headers: headers_1, status: status_1 })];
6973
- }
6974
- else {
6975
- errorResult = typeof result === 'string' ? { error: result } : result;
6976
- throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status, headers: response.headers }), { query: query, variables: variables });
6977
- }
7220
+ data = (_e.sent()).data;
7221
+ return [2 /*return*/, data];
6978
7222
  }
6979
7223
  });
6980
7224
  });
@@ -6982,28 +7226,35 @@ var GraphQLClient = /** @class */ (function () {
6982
7226
  /**
6983
7227
  * Send a GraphQL document to the server.
6984
7228
  */
6985
- GraphQLClient.prototype.request = function (document, variables, requestHeaders) {
7229
+ GraphQLClient.prototype.batchRequests = function (documents, requestHeaders) {
6986
7230
  return __awaiter(this, void 0, void 0, function () {
6987
- var _a, headers, _b, localFetch, others, resolvedDoc, body, response, result, errorResult;
6988
- return __generator(this, function (_c) {
6989
- switch (_c.label) {
7231
+ var _a, headers, _b, fetch, _c, method, fetchOptions, url, queries, variables, data;
7232
+ return __generator(this, function (_d) {
7233
+ switch (_d.label) {
6990
7234
  case 0:
6991
- _a = this.options, headers = _a.headers, _b = _a.fetch, localFetch = _b === void 0 ? cross_fetch_1.default : _b, others = __rest(_a, ["headers", "fetch"]);
6992
- resolvedDoc = resolveRequestDocument(document);
6993
- body = createRequestBody_1$1.default(resolvedDoc, variables);
6994
- return [4 /*yield*/, localFetch(this.url, __assign({ method: 'POST', headers: __assign(__assign(__assign({}, (typeof body === 'string' ? { 'Content-Type': 'application/json' } : {})), resolveHeaders(headers)), resolveHeaders(requestHeaders)), body: body }, others))];
7235
+ _a = this.options, headers = _a.headers, _b = _a.fetch, fetch = _b === void 0 ? cross_fetch_1.default : _b, _c = _a.method, method = _c === void 0 ? 'POST' : _c, fetchOptions = __rest(_a, ["headers", "fetch", "method"]);
7236
+ url = this.url;
7237
+ queries = documents.map(function (_a) {
7238
+ var document = _a.document;
7239
+ return resolveRequestDocument(document).query;
7240
+ });
7241
+ variables = documents.map(function (_a) {
7242
+ var variables = _a.variables;
7243
+ return variables;
7244
+ });
7245
+ return [4 /*yield*/, makeRequest({
7246
+ url: url,
7247
+ query: queries,
7248
+ variables: variables,
7249
+ headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(requestHeaders)),
7250
+ operationName: undefined,
7251
+ fetch: fetch,
7252
+ method: method,
7253
+ fetchOptions: fetchOptions,
7254
+ })];
6995
7255
  case 1:
6996
- response = _c.sent();
6997
- return [4 /*yield*/, getResult(response)];
6998
- case 2:
6999
- result = _c.sent();
7000
- if (response.ok && !result.errors && result.data) {
7001
- return [2 /*return*/, result.data];
7002
- }
7003
- else {
7004
- errorResult = typeof result === 'string' ? { error: result } : result;
7005
- throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status }), { query: resolvedDoc, variables: variables });
7006
- }
7256
+ data = (_d.sent()).data;
7257
+ return [2 /*return*/, data];
7007
7258
  }
7008
7259
  });
7009
7260
  });
@@ -7028,18 +7279,64 @@ var GraphQLClient = /** @class */ (function () {
7028
7279
  }
7029
7280
  return this;
7030
7281
  };
7282
+ /**
7283
+ * Change the client endpoint. All subsequent requests will send to this endpoint.
7284
+ */
7285
+ GraphQLClient.prototype.setEndpoint = function (value) {
7286
+ this.url = value;
7287
+ return this;
7288
+ };
7031
7289
  return GraphQLClient;
7032
7290
  }());
7033
7291
  exports.GraphQLClient = GraphQLClient;
7292
+ function makeRequest(_a) {
7293
+ var url = _a.url, query = _a.query, variables = _a.variables, headers = _a.headers, operationName = _a.operationName, fetch = _a.fetch, _b = _a.method, method = _b === void 0 ? 'POST' : _b, fetchOptions = _a.fetchOptions;
7294
+ return __awaiter(this, void 0, void 0, function () {
7295
+ var fetcher, isBathchingQuery, response, result, successfullyReceivedData, headers_1, status_1, errorResult;
7296
+ return __generator(this, function (_c) {
7297
+ switch (_c.label) {
7298
+ case 0:
7299
+ fetcher = method.toUpperCase() === 'POST' ? post : get;
7300
+ isBathchingQuery = Array.isArray(query);
7301
+ return [4 /*yield*/, fetcher({
7302
+ url: url,
7303
+ query: query,
7304
+ variables: variables,
7305
+ operationName: operationName,
7306
+ headers: headers,
7307
+ fetch: fetch,
7308
+ fetchOptions: fetchOptions,
7309
+ })];
7310
+ case 1:
7311
+ response = _c.sent();
7312
+ return [4 /*yield*/, getResult(response)];
7313
+ case 2:
7314
+ result = _c.sent();
7315
+ successfullyReceivedData = isBathchingQuery && Array.isArray(result) ? !result.some(function (_a) {
7316
+ var data = _a.data;
7317
+ return !data;
7318
+ }) : !!result.data;
7319
+ if (response.ok && !result.errors && successfullyReceivedData) {
7320
+ headers_1 = response.headers, status_1 = response.status;
7321
+ return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: result } : result)), { headers: headers_1, status: status_1 })];
7322
+ }
7323
+ else {
7324
+ errorResult = typeof result === 'string' ? { error: result } : result;
7325
+ throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status, headers: response.headers }), { query: query, variables: variables });
7326
+ }
7327
+ }
7328
+ });
7329
+ });
7330
+ }
7034
7331
  /**
7035
7332
  * todo
7036
7333
  */
7037
- function rawRequest(url, query, variables) {
7334
+ function rawRequest(url, query, variables, requestHeaders) {
7038
7335
  return __awaiter(this, void 0, void 0, function () {
7039
7336
  var client;
7040
7337
  return __generator(this, function (_a) {
7041
7338
  client = new GraphQLClient(url);
7042
- return [2 /*return*/, client.rawRequest(query, variables)];
7339
+ return [2 /*return*/, client.rawRequest(query, variables, requestHeaders)];
7043
7340
  });
7044
7341
  });
7045
7342
  }
@@ -7078,16 +7375,60 @@ exports.rawRequest = rawRequest;
7078
7375
  * await request('https://foo.bar/graphql', gql`...`)
7079
7376
  * ```
7080
7377
  */
7081
- function request(url, document, variables) {
7378
+ function request(url, document, variables, requestHeaders) {
7082
7379
  return __awaiter(this, void 0, void 0, function () {
7083
7380
  var client;
7084
7381
  return __generator(this, function (_a) {
7085
7382
  client = new GraphQLClient(url);
7086
- return [2 /*return*/, client.request(document, variables)];
7383
+ return [2 /*return*/, client.request(document, variables, requestHeaders)];
7087
7384
  });
7088
7385
  });
7089
7386
  }
7090
7387
  exports.request = request;
7388
+ /**
7389
+ * Send a batch of GraphQL Document to the GraphQL server for exectuion.
7390
+ *
7391
+ * @example
7392
+ *
7393
+ * ```ts
7394
+ * // You can pass a raw string
7395
+ *
7396
+ * await batchRequests('https://foo.bar/graphql', [
7397
+ * {
7398
+ * query: `
7399
+ * {
7400
+ * query {
7401
+ * users
7402
+ * }
7403
+ * }`
7404
+ * },
7405
+ * {
7406
+ * query: `
7407
+ * {
7408
+ * query {
7409
+ * users
7410
+ * }
7411
+ * }`
7412
+ * }])
7413
+ *
7414
+ * // You can also pass a GraphQL DocumentNode as query. Convenient if you
7415
+ * // are using graphql-tag package.
7416
+ *
7417
+ * import gql from 'graphql-tag'
7418
+ *
7419
+ * await batchRequests('https://foo.bar/graphql', [{ query: gql`...` }])
7420
+ * ```
7421
+ */
7422
+ function batchRequests(url, documents, requestHeaders) {
7423
+ return __awaiter(this, void 0, void 0, function () {
7424
+ var client;
7425
+ return __generator(this, function (_a) {
7426
+ client = new GraphQLClient(url);
7427
+ return [2 /*return*/, client.batchRequests(documents, requestHeaders)];
7428
+ });
7429
+ });
7430
+ }
7431
+ exports.batchRequests = batchRequests;
7091
7432
  exports.default = request;
7092
7433
  /**
7093
7434
  * todo
@@ -7105,9 +7446,15 @@ function getResult(response) {
7105
7446
  * helpers
7106
7447
  */
7107
7448
  function resolveRequestDocument(document) {
7449
+ var _a;
7108
7450
  if (typeof document === 'string')
7109
- return document;
7110
- return printer.print(document);
7451
+ return { query: document };
7452
+ var operationName = undefined;
7453
+ var operationDefinitions = document.definitions.filter(function (definition) { return definition.kind === 'OperationDefinition'; });
7454
+ if (operationDefinitions.length === 1) {
7455
+ operationName = (_a = operationDefinitions[0].name) === null || _a === void 0 ? void 0 : _a.value;
7456
+ }
7457
+ return { query: printer.print(document), operationName: operationName };
7111
7458
  }
7112
7459
  /**
7113
7460
  * Convenience passthrough template tag to get the benefits of tooling for the gql template tag. This does not actually parse the input into a GraphQL DocumentNode like graphql-tag package does. It just returns the string with any variables given interpolated. Can save you a bit of performance and having to install another package.
@@ -7140,37 +7487,23 @@ function HeadersInstanceToPlainObject(headers) {
7140
7487
  });
7141
7488
  return o;
7142
7489
  }
7143
-
7490
+ //# sourceMappingURL=index.js.map
7144
7491
  });
7145
7492
 
7146
- // This file replaces `index.js` in bundlers like webpack or Rollup,
7147
-
7148
- let nanoid = (size = 21) => {
7149
- let id = '';
7150
- let bytes = crypto.getRandomValues(new Uint8Array(size));
7151
-
7152
- // A compact alternative for `for (var i = 0; i < step; i++)`.
7153
- while (size--) {
7154
- // It is incorrect to use bytes exceeding the alphabet size.
7155
- // The following mask reduces the random byte in the 0-255 value
7156
- // range to the 0-63 value range. Therefore, adding hacks, such
7157
- // as empty string fallback or magic numbers, is unneccessary because
7158
- // the bitmask trims bytes down to the alphabet size.
7159
- let byte = bytes[size] & 63;
7493
+ let nanoid = (size = 21) =>
7494
+ crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
7495
+ byte &= 63;
7160
7496
  if (byte < 36) {
7161
- // `0-9a-z`
7162
7497
  id += byte.toString(36);
7163
7498
  } else if (byte < 62) {
7164
- // `A-Z`
7165
7499
  id += (byte - 26).toString(36).toUpperCase();
7166
- } else if (byte < 63) {
7167
- id += '_';
7168
- } else {
7500
+ } else if (byte > 62) {
7169
7501
  id += '-';
7502
+ } else {
7503
+ id += '_';
7170
7504
  }
7171
- }
7172
- return id
7173
- };
7505
+ return id
7506
+ }, '');
7174
7507
 
7175
7508
  function isFunction(x) {
7176
7509
  return typeof x === 'function';
@@ -7729,7 +8062,7 @@ Observable.create = (subscribe) => {
7729
8062
  };
7730
8063
  function getPromiseCtor(promiseCtor) {
7731
8064
  if (!promiseCtor) {
7732
- promiseCtor = Promise;
8065
+ promiseCtor = Promise;
7733
8066
  }
7734
8067
  if (!promiseCtor) {
7735
8068
  throw new Error('no Promise impl found');
@@ -8203,10 +8536,11 @@ function dispatchBufferClose(arg) {
8203
8536
 
8204
8537
  var umd = createCommonjsModule(function (module, exports) {
8205
8538
  (function (global, factory) {
8206
- factory(exports) ;
8539
+ factory(exports) ;
8207
8540
  })(commonjsGlobal, (function (exports) {
8208
- var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
8209
- var hasOwnProperty = Object.prototype.hasOwnProperty;
8541
+ const { getOwnPropertyNames, getOwnPropertySymbols } = Object;
8542
+ // eslint-disable-next-line @typescript-eslint/unbound-method
8543
+ const { hasOwnProperty } = Object.prototype;
8210
8544
  /**
8211
8545
  * Combine two comparators into a single comparators.
8212
8546
  */
@@ -8225,20 +8559,26 @@ var umd = createCommonjsModule(function (module, exports) {
8225
8559
  if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {
8226
8560
  return areItemsEqual(a, b, state);
8227
8561
  }
8228
- var cache = state.cache;
8229
- var cachedA = cache.get(a);
8230
- var cachedB = cache.get(b);
8562
+ const { cache } = state;
8563
+ const cachedA = cache.get(a);
8564
+ const cachedB = cache.get(b);
8231
8565
  if (cachedA && cachedB) {
8232
8566
  return cachedA === b && cachedB === a;
8233
8567
  }
8234
8568
  cache.set(a, b);
8235
8569
  cache.set(b, a);
8236
- var result = areItemsEqual(a, b, state);
8570
+ const result = areItemsEqual(a, b, state);
8237
8571
  cache.delete(a);
8238
8572
  cache.delete(b);
8239
8573
  return result;
8240
8574
  };
8241
8575
  }
8576
+ /**
8577
+ * Get the `@@toStringTag` of the value, if it exists.
8578
+ */
8579
+ function getShortTag(value) {
8580
+ return value != null ? value[Symbol.toStringTag] : undefined;
8581
+ }
8242
8582
  /**
8243
8583
  * Get the properties to strictly examine, which include both own properties that are
8244
8584
  * not enumerable and symbol properties.
@@ -8249,24 +8589,43 @@ var umd = createCommonjsModule(function (module, exports) {
8249
8589
  /**
8250
8590
  * Whether the object contains the property passed as an own property.
8251
8591
  */
8252
- var hasOwn = Object.hasOwn ||
8253
- (function (object, property) {
8254
- return hasOwnProperty.call(object, property);
8255
- });
8592
+ const hasOwn =
8593
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
8594
+ Object.hasOwn || ((object, property) => hasOwnProperty.call(object, property));
8256
8595
  /**
8257
8596
  * Whether the values passed are strictly equal or both NaN.
8258
8597
  */
8259
8598
  function sameValueZeroEqual(a, b) {
8260
- return a || b ? a === b : a === b || (a !== a && b !== b);
8599
+ return a === b || (!a && !b && a !== a && b !== b);
8261
8600
  }
8262
8601
 
8263
- var OWNER = '_owner';
8264
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, keys = Object.keys;
8602
+ const PREACT_VNODE = '__v';
8603
+ const PREACT_OWNER = '__o';
8604
+ const REACT_OWNER = '_owner';
8605
+ /**
8606
+ * Above this many keys, out-of-position keys are checked with `propertyIsEnumerable` rather than by
8607
+ * scanning the other object's keys. Measured in V8: scanning wins up to 50 keys and loses from 100.
8608
+ */
8609
+ const MAX_SCANNED_PROPERTIES = 64;
8610
+ const { getOwnPropertyDescriptor, keys } = Object;
8611
+ // eslint-disable-next-line @typescript-eslint/unbound-method
8612
+ const { propertyIsEnumerable } = Object.prototype;
8613
+ /**
8614
+ * Identify the element type of TypedArrays across realms and subclasses.
8615
+ */
8616
+ // eslint-disable-next-line @typescript-eslint/unbound-method
8617
+ const getTypedArrayTag = getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype), Symbol.toStringTag).get;
8618
+ /**
8619
+ * Whether the array buffers are equal in value.
8620
+ */
8621
+ function areArrayBuffersEqual(a, b) {
8622
+ return a.byteLength === b.byteLength && areTypedArraysEqual(new Uint8Array(a), new Uint8Array(b));
8623
+ }
8265
8624
  /**
8266
8625
  * Whether the arrays are equal in value.
8267
8626
  */
8268
8627
  function areArraysEqual(a, b, state) {
8269
- var index = a.length;
8628
+ let index = a.length;
8270
8629
  if (b.length !== index) {
8271
8630
  return false;
8272
8631
  }
@@ -8277,6 +8636,13 @@ var umd = createCommonjsModule(function (module, exports) {
8277
8636
  }
8278
8637
  return true;
8279
8638
  }
8639
+ /**
8640
+ * Whether the dataviews are equal in value.
8641
+ */
8642
+ function areDataViewsEqual(a, b) {
8643
+ return (a.byteLength === b.byteLength
8644
+ && areTypedArraysEqual(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)));
8645
+ }
8280
8646
  /**
8281
8647
  * Whether the dates passed are equal in value.
8282
8648
  */
@@ -8284,36 +8650,118 @@ var umd = createCommonjsModule(function (module, exports) {
8284
8650
  return sameValueZeroEqual(a.getTime(), b.getTime());
8285
8651
  }
8286
8652
  /**
8287
- * Whether the `Map`s are equal in value.
8653
+ * Whether the errors passed are equal in value.
8654
+ *
8655
+ * @note
8656
+ * `name`, `message` and `stack` are own properties but are not enumerable, so they are compared
8657
+ * explicitly. `cause` and `errors` are compared by value rather than by reference, matching how
8658
+ * every other nested value in the comparison is treated. They are compared exactly once, regardless
8659
+ * of whether they were assigned (enumerable) or set by the constructor (non-enumerable). Other own
8660
+ * enumerable properties (which custom `Error` subclasses commonly add) are compared afterward.
8661
+ *
8662
+ * The own property comparison is inlined rather than extracted, which measured faster in V8 when
8663
+ * recursing through `cause`. Keep the bytecode under V8's 460-byte TurboFan inlining limit (383 bytes
8664
+ * at time of writing; check with `node --print-bytecode --print-bytecode-filter=areErrorsEqual`), or
8665
+ * this stops being inlined into its callers.
8288
8666
  */
8289
- function areMapsEqual(a, b, state) {
8290
- if (a.size !== b.size) {
8667
+ function areErrorsEqual(a, b, state) {
8668
+ if (a.name !== b.name || a.message !== b.message || a.stack !== b.stack) {
8291
8669
  return false;
8292
8670
  }
8293
- var matchedIndices = {};
8294
- var aIterable = a.entries();
8295
- var index = 0;
8296
- var aResult;
8297
- var bResult;
8298
- while ((aResult = aIterable.next())) {
8299
- if (aResult.done) {
8300
- break;
8301
- }
8302
- var bIterable = b.entries();
8303
- var hasMatch = false;
8304
- var matchIndex = 0;
8305
- while ((bResult = bIterable.next())) {
8671
+ const causeA = a.cause;
8672
+ const causeB = b.cause;
8673
+ if (causeA !== causeB && !state.equals(causeA, causeB, 'cause', 'cause', a, b, state)) {
8674
+ return false;
8675
+ }
8676
+ const errorsA = a.errors;
8677
+ const errorsB = b.errors;
8678
+ if (errorsA !== errorsB && !state.equals(errorsA, errorsB, 'errors', 'errors', a, b, state)) {
8679
+ return false;
8680
+ }
8681
+ const propertiesA = keys(a);
8682
+ const propertiesB = keys(b);
8683
+ let index = propertiesA.length;
8684
+ // Constructed errors rarely have enumerable own properties.
8685
+ if (!index && !propertiesB.length) {
8686
+ return true;
8687
+ }
8688
+ let compared = 0;
8689
+ let property;
8690
+ while (index-- > 0) {
8691
+ property = propertiesA[index];
8692
+ // Already compared above regardless of enumerability, so we can ignore them.
8693
+ if (property === 'cause' || property === 'errors') {
8694
+ continue;
8695
+ }
8696
+ // `propertyIsEnumerable` rather than `hasOwn`, so that a non-enumerable own property on `b` cannot
8697
+ // stand in for an enumerable one. Keys in the same position are trivially enumerable on `b`.
8698
+ if ((property !== propertiesB[index] && !propertyIsEnumerable.call(b, property))
8699
+ || !state.equals(a[property], b[property], property, property, a, b, state)) {
8700
+ return false;
8701
+ }
8702
+ ++compared;
8703
+ }
8704
+ // Every compared key is enumerable on `b`, so any of `b`'s keys left over must be `cause` / `errors`.
8705
+ const remaining = propertiesB.length - compared;
8706
+ return (!remaining
8707
+ || remaining === (propertyIsEnumerable.call(b, 'cause') ? 1 : 0) + (propertyIsEnumerable.call(b, 'errors') ? 1 : 0));
8708
+ }
8709
+ /**
8710
+ * Whether the functions passed are equal in value.
8711
+ */
8712
+ function areFunctionsEqual(a, b) {
8713
+ return a === b;
8714
+ }
8715
+ /**
8716
+ * Whether the errors passed are equal in value.
8717
+ *
8718
+ * @note
8719
+ * `name`, `message` and `stack` are own properties but are not enumerable, so they are compared
8720
+ * explicitly. `cause` and `errors` are own properties, so `areObjectsEqualStrict` compares them along
8721
+ * with every other own property; they are not compared explicitly to avoid comparing them twice.
8722
+ */
8723
+ function areErrorsEqualStrict(a, b, state) {
8724
+ return a.name === b.name && a.message === b.message && a.stack === b.stack && areObjectsEqualStrict(a, b, state);
8725
+ }
8726
+ /**
8727
+ * Whether the `Map`s are equal in value.
8728
+ */
8729
+ function areMapsEqual(a, b, state) {
8730
+ const size = a.size;
8731
+ if (size !== b.size) {
8732
+ return false;
8733
+ }
8734
+ if (!size) {
8735
+ return true;
8736
+ }
8737
+ const matchedIndices = new Array(size);
8738
+ const aIterable = a.entries();
8739
+ let aResult;
8740
+ let bResult;
8741
+ let index = 0;
8742
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
8743
+ while ((aResult = aIterable.next())) {
8744
+ if (aResult.done) {
8745
+ break;
8746
+ }
8747
+ const bIterable = b.entries();
8748
+ let hasMatch = false;
8749
+ let matchIndex = 0;
8750
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
8751
+ while ((bResult = bIterable.next())) {
8306
8752
  if (bResult.done) {
8307
8753
  break;
8308
8754
  }
8309
- var _a = aResult.value, aKey = _a[0], aValue = _a[1];
8310
- var _b = bResult.value, bKey = _b[0], bValue = _b[1];
8311
- if (!hasMatch &&
8312
- !matchedIndices[matchIndex] &&
8313
- (hasMatch =
8314
- state.equals(aKey, bKey, index, matchIndex, a, b, state) &&
8315
- state.equals(aValue, bValue, aKey, bKey, a, b, state))) {
8316
- matchedIndices[matchIndex] = true;
8755
+ if (matchedIndices[matchIndex]) {
8756
+ matchIndex++;
8757
+ continue;
8758
+ }
8759
+ const aEntry = aResult.value;
8760
+ const bEntry = bResult.value;
8761
+ if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state)
8762
+ && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
8763
+ hasMatch = matchedIndices[matchIndex] = true;
8764
+ break;
8317
8765
  }
8318
8766
  matchIndex++;
8319
8767
  }
@@ -8324,29 +8772,39 @@ var umd = createCommonjsModule(function (module, exports) {
8324
8772
  }
8325
8773
  return true;
8326
8774
  }
8775
+ /**
8776
+ * Whether the numbers are equal in value.
8777
+ */
8778
+ const areNumbersEqual = sameValueZeroEqual;
8327
8779
  /**
8328
8780
  * Whether the objects are equal in value.
8329
8781
  */
8330
8782
  function areObjectsEqual(a, b, state) {
8331
- var properties = keys(a);
8332
- var index = properties.length;
8333
- if (keys(b).length !== index) {
8783
+ const properties = keys(a);
8784
+ const propertiesB = keys(b);
8785
+ let index = properties.length;
8786
+ if (propertiesB.length !== index) {
8334
8787
  return false;
8335
8788
  }
8336
- var property;
8789
+ const isScannable = index <= MAX_SCANNED_PROPERTIES;
8790
+ let property;
8337
8791
  // Decrementing `while` showed faster results than either incrementing or
8338
8792
  // decrementing `for` loop and than an incrementing `while` loop. Declarative
8339
8793
  // methods like `some` / `every` were not used to avoid incurring the garbage
8340
8794
  // cost of anonymous callbacks.
8341
8795
  while (index-- > 0) {
8342
8796
  property = properties[index];
8343
- if (property === OWNER &&
8344
- (a.$$typeof || b.$$typeof) &&
8345
- a.$$typeof !== b.$$typeof) {
8346
- return false;
8797
+ if (isReactProperty(a, b, property)) {
8798
+ continue;
8347
8799
  }
8348
- if (!hasOwn(b, property) ||
8349
- !state.equals(a[property], b[property], property, property, a, b, state)) {
8800
+ // Objects built the same way list their keys in the same order, in which case the key is
8801
+ // already known to be an own enumerable property of `b` and the lookup can be skipped.
8802
+ // Otherwise, `propertiesB` is exactly `b`'s own enumerable keys. Scanning it is faster than
8803
+ // `propertyIsEnumerable` for smaller objects, but it is linear per key, so larger objects
8804
+ // (where reordering would make it quadratic) use the lookup instead.
8805
+ if ((property !== propertiesB[index]
8806
+ && !(isScannable ? propertiesB.includes(property) : propertyIsEnumerable.call(b, property)))
8807
+ || !state.equals(a[property], b[property], property, property, a, b, state)) {
8350
8808
  return false;
8351
8809
  }
8352
8810
  }
@@ -8356,39 +8814,32 @@ var umd = createCommonjsModule(function (module, exports) {
8356
8814
  * Whether the objects are equal in value with strict property checking.
8357
8815
  */
8358
8816
  function areObjectsEqualStrict(a, b, state) {
8359
- var properties = getStrictProperties(a);
8360
- var index = properties.length;
8817
+ const properties = getStrictProperties(a);
8818
+ let index = properties.length;
8361
8819
  if (getStrictProperties(b).length !== index) {
8362
8820
  return false;
8363
8821
  }
8364
- var property;
8365
- var descriptorA;
8366
- var descriptorB;
8822
+ let property;
8823
+ let descriptorA;
8824
+ let descriptorB;
8367
8825
  // Decrementing `while` showed faster results than either incrementing or
8368
8826
  // decrementing `for` loop and than an incrementing `while` loop. Declarative
8369
8827
  // methods like `some` / `every` were not used to avoid incurring the garbage
8370
8828
  // cost of anonymous callbacks.
8371
8829
  while (index-- > 0) {
8372
8830
  property = properties[index];
8373
- if (property === OWNER &&
8374
- (a.$$typeof || b.$$typeof) &&
8375
- a.$$typeof !== b.$$typeof) {
8376
- return false;
8377
- }
8378
- if (!hasOwn(b, property)) {
8379
- return false;
8380
- }
8381
- if (!state.equals(a[property], b[property], property, property, a, b, state)) {
8831
+ if (!isReactProperty(a, b, property)
8832
+ && (!hasOwn(b, property) || !state.equals(a[property], b[property], property, property, a, b, state))) {
8382
8833
  return false;
8383
8834
  }
8384
8835
  descriptorA = getOwnPropertyDescriptor(a, property);
8385
8836
  descriptorB = getOwnPropertyDescriptor(b, property);
8386
- if ((descriptorA || descriptorB) &&
8387
- (!descriptorA ||
8388
- !descriptorB ||
8389
- descriptorA.configurable !== descriptorB.configurable ||
8390
- descriptorA.enumerable !== descriptorB.enumerable ||
8391
- descriptorA.writable !== descriptorB.writable)) {
8837
+ if ((descriptorA || descriptorB)
8838
+ && (!descriptorA
8839
+ || !descriptorB
8840
+ || descriptorA.configurable !== descriptorB.configurable
8841
+ || descriptorA.enumerable !== descriptorB.enumerable
8842
+ || descriptorA.writable !== descriptorB.writable)) {
8392
8843
  return false;
8393
8844
  }
8394
8845
  }
@@ -8410,28 +8861,34 @@ var umd = createCommonjsModule(function (module, exports) {
8410
8861
  * Whether the `Set`s are equal in value.
8411
8862
  */
8412
8863
  function areSetsEqual(a, b, state) {
8413
- if (a.size !== b.size) {
8864
+ const size = a.size;
8865
+ if (size !== b.size) {
8414
8866
  return false;
8415
8867
  }
8416
- var matchedIndices = {};
8417
- var aIterable = a.values();
8418
- var aResult;
8419
- var bResult;
8868
+ if (!size) {
8869
+ return true;
8870
+ }
8871
+ const matchedIndices = new Array(size);
8872
+ const aIterable = a.values();
8873
+ let aResult;
8874
+ let bResult;
8875
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
8420
8876
  while ((aResult = aIterable.next())) {
8421
8877
  if (aResult.done) {
8422
8878
  break;
8423
8879
  }
8424
- var bIterable = b.values();
8425
- var hasMatch = false;
8426
- var matchIndex = 0;
8880
+ const bIterable = b.values();
8881
+ let hasMatch = false;
8882
+ let matchIndex = 0;
8883
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
8427
8884
  while ((bResult = bIterable.next())) {
8428
8885
  if (bResult.done) {
8429
8886
  break;
8430
8887
  }
8431
- if (!hasMatch &&
8432
- !matchedIndices[matchIndex] &&
8433
- (hasMatch = state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state))) {
8434
- matchedIndices[matchIndex] = true;
8888
+ if (!matchedIndices[matchIndex]
8889
+ && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
8890
+ hasMatch = matchedIndices[matchIndex] = true;
8891
+ break;
8435
8892
  }
8436
8893
  matchIndex++;
8437
8894
  }
@@ -8445,10 +8902,24 @@ var umd = createCommonjsModule(function (module, exports) {
8445
8902
  * Whether the TypedArray instances are equal in value.
8446
8903
  */
8447
8904
  function areTypedArraysEqual(a, b) {
8448
- var index = a.length;
8449
- if (b.length !== index) {
8905
+ let index = a.length;
8906
+ if (b.length !== index || a.byteOffset !== b.byteOffset) {
8450
8907
  return false;
8451
8908
  }
8909
+ // Only float-backed views can hold `NaN`, and the additional check needed to treat it as equal
8910
+ // to itself measurably slows the loop, so integer views keep the plain comparison. This is
8911
+ // hoisted out of the loop so the cost is paid once per call rather than once per element.
8912
+ const tag = getTypedArrayTag.call(a);
8913
+ if (tag === 'Float64Array' || tag === 'Float32Array' || tag === 'Float16Array') {
8914
+ while (index-- > 0) {
8915
+ // `NaN` is the only value not equal to itself, and it is treated as equal here to match
8916
+ // the SameValueZero semantics used for every other numeric comparison in the library.
8917
+ if (a[index] !== b[index] && (a[index] === a[index] || b[index] === b[index])) {
8918
+ return false;
8919
+ }
8920
+ }
8921
+ return true;
8922
+ }
8452
8923
  while (index-- > 0) {
8453
8924
  if (a[index] !== b[index]) {
8454
8925
  return false;
@@ -8456,27 +8927,87 @@ var umd = createCommonjsModule(function (module, exports) {
8456
8927
  }
8457
8928
  return true;
8458
8929
  }
8459
-
8460
- var ARGUMENTS_TAG = '[object Arguments]';
8461
- var BOOLEAN_TAG = '[object Boolean]';
8462
- var DATE_TAG = '[object Date]';
8463
- var MAP_TAG = '[object Map]';
8464
- var NUMBER_TAG = '[object Number]';
8465
- var OBJECT_TAG = '[object Object]';
8466
- var REG_EXP_TAG = '[object RegExp]';
8467
- var SET_TAG = '[object Set]';
8468
- var STRING_TAG = '[object String]';
8469
- var isArray = Array.isArray;
8470
- var isTypedArray = typeof ArrayBuffer === 'function' && ArrayBuffer.isView
8471
- ? ArrayBuffer.isView
8472
- : null;
8473
- var assign = Object.assign;
8474
- var getTag = Object.prototype.toString.call.bind(Object.prototype.toString);
8930
+ /**
8931
+ * Whether the URL instances are equal in value.
8932
+ */
8933
+ function areUrlsEqual(a, b) {
8934
+ // `href` is the normalized serialization of every component, so matching hrefs are equal without
8935
+ // any further work. Only a difference in query parameter ordering can survive a mismatch here.
8936
+ if (a.href === b.href) {
8937
+ return true;
8938
+ }
8939
+ return (a.protocol === b.protocol
8940
+ && a.username === b.username
8941
+ && a.password === b.password
8942
+ // `host` covers both the hostname and the port.
8943
+ && a.host === b.host
8944
+ && a.pathname === b.pathname
8945
+ && a.hash === b.hash
8946
+ && areSearchParamsEqual(a.searchParams, b.searchParams));
8947
+ }
8948
+ /**
8949
+ * Whether the search params passed are equal in value.
8950
+ *
8951
+ * @note
8952
+ * Order is not significant, matching how the other unordered collections in the library are
8953
+ * compared. Repeated keys are, so this is a comparison of multisets rather than of sets:
8954
+ * `a=1&a=2` is equal to `a=2&a=1`, but not to `a=1&a=1`.
8955
+ */
8956
+ function areSearchParamsEqual(a, b) {
8957
+ const serializedA = a.toString();
8958
+ const serializedB = b.toString();
8959
+ // Identical serializations are equal under any ordering, and this is by far the common case, so
8960
+ // it is worth checking before sorting anything.
8961
+ return serializedA === serializedB || sortSearchParams(serializedA) === sortSearchParams(serializedB);
8962
+ }
8963
+ /**
8964
+ * Reorder a serialized query string so that params holding the same pairs compare as equal
8965
+ * regardless of the order they appear in.
8966
+ *
8967
+ * @note
8968
+ * The serializer percent-encodes `&` and `=` wherever they appear inside a name or a value, so
8969
+ * splitting on `&` recovers exactly the pairs and nothing else.
8970
+ */
8971
+ function sortSearchParams(serialized) {
8972
+ return serialized.split('&').sort().join('&');
8973
+ }
8974
+ function isReactProperty(a, b, property) {
8975
+ return ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && !!(a.$$typeof || b.$$typeof));
8976
+ }
8977
+
8978
+ const ARRAY_BUFFER_TAG = '[object ArrayBuffer]';
8979
+ const ARGUMENTS_TAG = '[object Arguments]';
8980
+ const BOOLEAN_TAG = '[object Boolean]';
8981
+ const DATA_VIEW_TAG = '[object DataView]';
8982
+ const DATE_TAG = '[object Date]';
8983
+ const ERROR_TAG = '[object Error]';
8984
+ const MAP_TAG = '[object Map]';
8985
+ const NUMBER_TAG = '[object Number]';
8986
+ const OBJECT_TAG = '[object Object]';
8987
+ const REG_EXP_TAG = '[object RegExp]';
8988
+ const SET_TAG = '[object Set]';
8989
+ const STRING_TAG = '[object String]';
8990
+ const TYPED_ARRAY_TAGS = {
8991
+ '[object Int8Array]': true,
8992
+ '[object Uint8Array]': true,
8993
+ '[object Uint8ClampedArray]': true,
8994
+ '[object Int16Array]': true,
8995
+ '[object Uint16Array]': true,
8996
+ '[object Int32Array]': true,
8997
+ '[object Uint32Array]': true,
8998
+ '[object Float16Array]': true,
8999
+ '[object Float32Array]': true,
9000
+ '[object Float64Array]': true,
9001
+ '[object BigInt64Array]': true,
9002
+ '[object BigUint64Array]': true,
9003
+ };
9004
+ const URL_TAG = '[object URL]';
9005
+ // eslint-disable-next-line @typescript-eslint/unbound-method
9006
+ const toString = Object.prototype.toString;
8475
9007
  /**
8476
9008
  * Create a comparator method based on the type-specific equality comparators passed.
8477
9009
  */
8478
- function createEqualityComparator(_a) {
8479
- var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual, areTypedArraysEqual = _a.areTypedArraysEqual;
9010
+ function createEqualityComparator({ areArrayBuffersEqual, areArraysEqual, areDataViewsEqual, areDatesEqual, areErrorsEqual, areFunctionsEqual, areMapsEqual, areNumbersEqual, areObjectsEqual, arePrimitiveWrappersEqual, areRegExpsEqual, areSetsEqual, areTypedArraysEqual, areUrlsEqual, unknownTagComparators, }) {
8480
9011
  /**
8481
9012
  * compare the value of the two objects and return true if they are equivalent in values
8482
9013
  */
@@ -8485,17 +9016,26 @@ var umd = createCommonjsModule(function (module, exports) {
8485
9016
  if (a === b) {
8486
9017
  return true;
8487
9018
  }
8488
- // If the items are not non-nullish objects, then the only possibility
8489
- // of them being equal but not strictly is if they are both `NaN`. Since
8490
- // `NaN` is uniquely not equal to itself, we can use self-comparison of
8491
- // both objects, which is faster than `isNaN()`.
8492
- if (a == null ||
8493
- b == null ||
8494
- typeof a !== 'object' ||
8495
- typeof b !== 'object') {
8496
- return a !== a && b !== b;
9019
+ // If either of the items are nullish and fail the strictly equal check
9020
+ // above, then they must be unequal.
9021
+ if (a == null || b == null) {
9022
+ return false;
9023
+ }
9024
+ const type = typeof a;
9025
+ if (type !== typeof b) {
9026
+ return false;
9027
+ }
9028
+ if (type !== 'object') {
9029
+ if (type === 'number') {
9030
+ return areNumbersEqual(a, b, state);
9031
+ }
9032
+ if (type === 'function') {
9033
+ return areFunctionsEqual(a, b, state);
9034
+ }
9035
+ // If a primitive value that is not strictly equal, it must be unequal.
9036
+ return false;
8497
9037
  }
8498
- var constructor = a.constructor;
9038
+ const constructor = a.constructor;
8499
9039
  // Checks are listed in order of commonality of use-case:
8500
9040
  // 1. Common complex object types (plain object, array)
8501
9041
  // 2. Common data values (date, regexp)
@@ -8517,14 +9057,9 @@ var umd = createCommonjsModule(function (module, exports) {
8517
9057
  }
8518
9058
  // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing
8519
9059
  // the string tag or doing an `instanceof` check.
8520
- if (isArray(a)) {
9060
+ if (Array.isArray(a)) {
8521
9061
  return areArraysEqual(a, b, state);
8522
9062
  }
8523
- // `isTypedArray()` works on all possible TypedArray classes, so we can avoid
8524
- // capturing the string tag or comparing against all possible constructors.
8525
- if (isTypedArray != null && isTypedArray(a)) {
8526
- return areTypedArraysEqual(a, b, state);
8527
- }
8528
9063
  // Try to fast-path equality checks for other complex object types in the
8529
9064
  // same realm to avoid capturing the string tag. Strict equality is used
8530
9065
  // instead of `instanceof` because it is more performant for the common
@@ -8542,12 +9077,18 @@ var umd = createCommonjsModule(function (module, exports) {
8542
9077
  if (constructor === Set) {
8543
9078
  return areSetsEqual(a, b, state);
8544
9079
  }
9080
+ if (constructor == null) {
9081
+ // Objects with a prototype of `null` are plain objects.
9082
+ return areObjectsEqual(a, b, state);
9083
+ }
8545
9084
  // Since this is a custom object, capture the string tag to determing its type.
8546
9085
  // This is reasonably performant in modern environments like v8 and SpiderMonkey.
8547
- var tag = getTag(a);
9086
+ const tag = toString.call(a);
8548
9087
  if (tag === DATE_TAG) {
8549
9088
  return areDatesEqual(a, b, state);
8550
9089
  }
9090
+ // For RegExp, the properties are not enumerable, and therefore will give false positives if
9091
+ // tested like a standard object.
8551
9092
  if (tag === REG_EXP_TAG) {
8552
9093
  return areRegExpsEqual(a, b, state);
8553
9094
  }
@@ -8561,20 +9102,51 @@ var umd = createCommonjsModule(function (module, exports) {
8561
9102
  // The exception for value comparison is custom `Promise`-like class instances. These should
8562
9103
  // be treated the same as standard `Promise` objects, which means strict equality, and if
8563
9104
  // it reaches this point then that strict equality comparison has already failed.
8564
- return (typeof a.then !== 'function' &&
8565
- typeof b.then !== 'function' &&
8566
- areObjectsEqual(a, b, state));
9105
+ return typeof a.then !== 'function' && typeof b.then !== 'function' && areObjectsEqual(a, b, state);
9106
+ }
9107
+ // If a URL tag, it should be tested explicitly. Like RegExp, the properties are not
9108
+ // enumerable, and therefore will give false positives if tested like a standard object.
9109
+ if (tag === URL_TAG) {
9110
+ return areUrlsEqual(a, b, state);
9111
+ }
9112
+ // If an error tag, it should be tested explicitly. Like RegExp, the properties are not
9113
+ // enumerable, and therefore will give false positives if tested like a standard object.
9114
+ if (tag === ERROR_TAG) {
9115
+ return areErrorsEqual(a, b, state);
8567
9116
  }
8568
9117
  // If an arguments tag, it should be treated as a standard object.
8569
9118
  if (tag === ARGUMENTS_TAG) {
8570
9119
  return areObjectsEqual(a, b, state);
8571
9120
  }
9121
+ if (TYPED_ARRAY_TAGS[tag]) {
9122
+ return areTypedArraysEqual(a, b, state);
9123
+ }
9124
+ if (tag === ARRAY_BUFFER_TAG) {
9125
+ return areArrayBuffersEqual(a, b, state);
9126
+ }
9127
+ if (tag === DATA_VIEW_TAG) {
9128
+ return areDataViewsEqual(a, b, state);
9129
+ }
8572
9130
  // As the penultimate fallback, check if the values passed are primitive wrappers. This
8573
9131
  // is very rare in modern JS, which is why it is deprioritized compared to all other object
8574
9132
  // types.
8575
9133
  if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
8576
9134
  return arePrimitiveWrappersEqual(a, b, state);
8577
9135
  }
9136
+ if (unknownTagComparators) {
9137
+ let unknownTagComparator = unknownTagComparators[tag];
9138
+ if (!unknownTagComparator) {
9139
+ const shortTag = getShortTag(a);
9140
+ if (shortTag) {
9141
+ unknownTagComparator = unknownTagComparators[shortTag];
9142
+ }
9143
+ }
9144
+ // If the custom config has an unknown tag comparator that matches the captured tag or the
9145
+ // @@toStringTag, it is the source of truth for whether the values are equal.
9146
+ if (unknownTagComparator) {
9147
+ return unknownTagComparator(a, b, state);
9148
+ }
9149
+ }
8578
9150
  // If not matching any tags that require a specific type of comparison, then we hard-code false because
8579
9151
  // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:
8580
9152
  // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only
@@ -8592,41 +9164,47 @@ var umd = createCommonjsModule(function (module, exports) {
8592
9164
  /**
8593
9165
  * Create the configuration object used for building comparators.
8594
9166
  */
8595
- function createEqualityComparatorConfig(_a) {
8596
- var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;
8597
- var config = {
8598
- areArraysEqual: strict
8599
- ? areObjectsEqualStrict
8600
- : areArraysEqual,
9167
+ function createEqualityComparatorConfig({ circular, createCustomConfig, strict, }) {
9168
+ let config = {
9169
+ areArrayBuffersEqual,
9170
+ areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
9171
+ areDataViewsEqual,
8601
9172
  areDatesEqual: areDatesEqual,
8602
- areMapsEqual: strict
8603
- ? combineComparators(areMapsEqual, areObjectsEqualStrict)
8604
- : areMapsEqual,
8605
- areObjectsEqual: strict
8606
- ? areObjectsEqualStrict
8607
- : areObjectsEqual,
9173
+ // `name` / `message` / `stack` / `cause` / `errors` are not enumerable (unless assigned), which is why
9174
+ // errors need a comparator of their own rather than being treated as plain objects. Each variant also
9175
+ // compares the own properties that `Error` subclasses routinely carry (`status`, `code`, ...):
9176
+ // enumerable ones in loose mode, and all of them (via `areObjectsEqualStrict`) in strict mode.
9177
+ areErrorsEqual: strict ? areErrorsEqualStrict : areErrorsEqual,
9178
+ areFunctionsEqual: areFunctionsEqual,
9179
+ areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
9180
+ areNumbersEqual: areNumbersEqual,
9181
+ areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual,
8608
9182
  arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,
8609
9183
  areRegExpsEqual: areRegExpsEqual,
8610
- areSetsEqual: strict
8611
- ? combineComparators(areSetsEqual, areObjectsEqualStrict)
8612
- : areSetsEqual,
9184
+ areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
8613
9185
  areTypedArraysEqual: strict
8614
- ? areObjectsEqualStrict
9186
+ ? combineComparators(areTypedArraysEqual, areObjectsEqualStrict)
8615
9187
  : areTypedArraysEqual,
9188
+ areUrlsEqual: areUrlsEqual,
9189
+ unknownTagComparators: undefined,
8616
9190
  };
8617
9191
  if (createCustomConfig) {
8618
- config = assign({}, config, createCustomConfig(config));
9192
+ config = Object.assign({}, config, createCustomConfig(config));
8619
9193
  }
8620
9194
  if (circular) {
8621
- var areArraysEqual$1 = createIsCircular(config.areArraysEqual);
8622
- var areMapsEqual$1 = createIsCircular(config.areMapsEqual);
8623
- var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);
8624
- var areSetsEqual$1 = createIsCircular(config.areSetsEqual);
8625
- config = assign({}, config, {
8626
- areArraysEqual: areArraysEqual$1,
8627
- areMapsEqual: areMapsEqual$1,
8628
- areObjectsEqual: areObjectsEqual$1,
8629
- areSetsEqual: areSetsEqual$1,
9195
+ const areArraysEqual = createIsCircular(config.areArraysEqual);
9196
+ // Errors are included because comparing `cause` and own properties by value means an error
9197
+ // that references itself would otherwise recurse without bound.
9198
+ const areErrorsEqual = createIsCircular(config.areErrorsEqual);
9199
+ const areMapsEqual = createIsCircular(config.areMapsEqual);
9200
+ const areObjectsEqual = createIsCircular(config.areObjectsEqual);
9201
+ const areSetsEqual = createIsCircular(config.areSetsEqual);
9202
+ config = Object.assign({}, config, {
9203
+ areArraysEqual,
9204
+ areErrorsEqual,
9205
+ areMapsEqual,
9206
+ areObjectsEqual,
9207
+ areSetsEqual,
8630
9208
  });
8631
9209
  }
8632
9210
  return config;
@@ -8643,16 +9221,15 @@ var umd = createCommonjsModule(function (module, exports) {
8643
9221
  /**
8644
9222
  * Create the `isEqual` function used by the consuming application.
8645
9223
  */
8646
- function createIsEqual(_a) {
8647
- var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;
9224
+ function createIsEqual({ circular, comparator, createState, equals, strict }) {
8648
9225
  if (createState) {
8649
9226
  return function isEqual(a, b) {
8650
- var _a = createState(), _b = _a.cache, cache = _b === void 0 ? circular ? new WeakMap() : undefined : _b, meta = _a.meta;
9227
+ const { cache = circular ? new WeakMap() : undefined, meta } = createState();
8651
9228
  return comparator(a, b, {
8652
- cache: cache,
8653
- equals: equals,
8654
- meta: meta,
8655
- strict: strict,
9229
+ cache,
9230
+ equals,
9231
+ meta,
9232
+ strict,
8656
9233
  });
8657
9234
  };
8658
9235
  }
@@ -8660,17 +9237,17 @@ var umd = createCommonjsModule(function (module, exports) {
8660
9237
  return function isEqual(a, b) {
8661
9238
  return comparator(a, b, {
8662
9239
  cache: new WeakMap(),
8663
- equals: equals,
9240
+ equals,
8664
9241
  meta: undefined,
8665
- strict: strict,
9242
+ strict,
8666
9243
  });
8667
9244
  };
8668
9245
  }
8669
- var state = {
9246
+ const state = {
8670
9247
  cache: undefined,
8671
- equals: equals,
9248
+ equals,
8672
9249
  meta: undefined,
8673
- strict: strict,
9250
+ strict,
8674
9251
  };
8675
9252
  return function isEqual(a, b) {
8676
9253
  return comparator(a, b, state);
@@ -8680,50 +9257,50 @@ var umd = createCommonjsModule(function (module, exports) {
8680
9257
  /**
8681
9258
  * Whether the items passed are deeply-equal in value.
8682
9259
  */
8683
- var deepEqual = createCustomEqual();
9260
+ const deepEqual = createCustomEqual();
8684
9261
  /**
8685
9262
  * Whether the items passed are deeply-equal in value based on strict comparison.
8686
9263
  */
8687
- var strictDeepEqual = createCustomEqual({ strict: true });
9264
+ const strictDeepEqual = createCustomEqual({ strict: true });
8688
9265
  /**
8689
9266
  * Whether the items passed are deeply-equal in value, including circular references.
8690
9267
  */
8691
- var circularDeepEqual = createCustomEqual({ circular: true });
9268
+ const circularDeepEqual = createCustomEqual({ circular: true });
8692
9269
  /**
8693
9270
  * Whether the items passed are deeply-equal in value, including circular references,
8694
9271
  * based on strict comparison.
8695
9272
  */
8696
- var strictCircularDeepEqual = createCustomEqual({
9273
+ const strictCircularDeepEqual = createCustomEqual({
8697
9274
  circular: true,
8698
9275
  strict: true,
8699
9276
  });
8700
9277
  /**
8701
9278
  * Whether the items passed are shallowly-equal in value.
8702
9279
  */
8703
- var shallowEqual = createCustomEqual({
8704
- createInternalComparator: function () { return sameValueZeroEqual; },
9280
+ const shallowEqual = createCustomEqual({
9281
+ createInternalComparator: () => sameValueZeroEqual,
8705
9282
  });
8706
9283
  /**
8707
9284
  * Whether the items passed are shallowly-equal in value based on strict comparison
8708
9285
  */
8709
- var strictShallowEqual = createCustomEqual({
9286
+ const strictShallowEqual = createCustomEqual({
8710
9287
  strict: true,
8711
- createInternalComparator: function () { return sameValueZeroEqual; },
9288
+ createInternalComparator: () => sameValueZeroEqual,
8712
9289
  });
8713
9290
  /**
8714
9291
  * Whether the items passed are shallowly-equal in value, including circular references.
8715
9292
  */
8716
- var circularShallowEqual = createCustomEqual({
9293
+ const circularShallowEqual = createCustomEqual({
8717
9294
  circular: true,
8718
- createInternalComparator: function () { return sameValueZeroEqual; },
9295
+ createInternalComparator: () => sameValueZeroEqual,
8719
9296
  });
8720
9297
  /**
8721
9298
  * Whether the items passed are shallowly-equal in value, including circular references,
8722
9299
  * based on strict comparison.
8723
9300
  */
8724
- var strictCircularShallowEqual = createCustomEqual({
9301
+ const strictCircularShallowEqual = createCustomEqual({
8725
9302
  circular: true,
8726
- createInternalComparator: function () { return sameValueZeroEqual; },
9303
+ createInternalComparator: () => sameValueZeroEqual,
8727
9304
  strict: true,
8728
9305
  });
8729
9306
  /**
@@ -8734,15 +9311,14 @@ var umd = createCommonjsModule(function (module, exports) {
8734
9311
  * support for legacy environments that do not support expected features like
8735
9312
  * `RegExp.prototype.flags` out of the box.
8736
9313
  */
8737
- function createCustomEqual(options) {
8738
- if (options === void 0) { options = {}; }
8739
- var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;
8740
- var config = createEqualityComparatorConfig(options);
8741
- var comparator = createEqualityComparator(config);
8742
- var equals = createCustomInternalComparator
9314
+ function createCustomEqual(options = {}) {
9315
+ const { circular = false, createInternalComparator: createCustomInternalComparator, createState, strict = false, } = options;
9316
+ const config = createEqualityComparatorConfig(options);
9317
+ const comparator = createEqualityComparator(config);
9318
+ const equals = createCustomInternalComparator
8743
9319
  ? createCustomInternalComparator(comparator)
8744
9320
  : createInternalEqualityComparator(comparator);
8745
- return createIsEqual({ circular: circular, comparator: comparator, createState: createState, equals: equals, strict: strict });
9321
+ return createIsEqual({ circular, comparator, createState, equals, strict });
8746
9322
  }
8747
9323
 
8748
9324
  exports.circularDeepEqual = circularDeepEqual;
@@ -8757,9 +9333,1833 @@ var umd = createCommonjsModule(function (module, exports) {
8757
9333
  exports.strictShallowEqual = strictShallowEqual;
8758
9334
 
8759
9335
  }));
9336
+ //# sourceMappingURL=index.js.map
9337
+ });
9338
+
9339
+ var __create = Object.create;
9340
+ var __defProp = Object.defineProperty;
9341
+ var __defProps = Object.defineProperties;
9342
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9343
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9344
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9345
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9346
+ var __getProtoOf = Object.getPrototypeOf;
9347
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9348
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9349
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9350
+ var __spreadValues = (a, b) => {
9351
+ for (var prop in b || (b = {}))
9352
+ if (__hasOwnProp.call(b, prop))
9353
+ __defNormalProp(a, prop, b[prop]);
9354
+ if (__getOwnPropSymbols)
9355
+ for (var prop of __getOwnPropSymbols(b)) {
9356
+ if (__propIsEnum.call(b, prop))
9357
+ __defNormalProp(a, prop, b[prop]);
9358
+ }
9359
+ return a;
9360
+ };
9361
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9362
+ var __commonJS = (cb, mod) => function __require() {
9363
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9364
+ };
9365
+ var __copyProps = (to, from, except, desc) => {
9366
+ if (from && typeof from === "object" || typeof from === "function") {
9367
+ for (let key of __getOwnPropNames(from))
9368
+ if (!__hasOwnProp.call(to, key) && key !== except)
9369
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9370
+ }
9371
+ return to;
9372
+ };
9373
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
9374
+ // If the importer is in node compatibility mode or this is not an ESM
9375
+ // file that has been converted to a CommonJS file using a Babel-
9376
+ // compatible transform (i.e. "__esModule" has not been set), then set
9377
+ // "default" to the CommonJS "module.exports" for node compatibility.
9378
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
9379
+ mod
9380
+ ));
9381
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9382
+
9383
+ // node_modules/ms/index.js
9384
+ var require_ms = __commonJS({
9385
+ "node_modules/ms/index.js"(exports, module) {
9386
+ var s = 1e3;
9387
+ var m = s * 60;
9388
+ var h = m * 60;
9389
+ var d = h * 24;
9390
+ var w = d * 7;
9391
+ var y = d * 365.25;
9392
+ module.exports = function(val, options) {
9393
+ options = options || {};
9394
+ var type = typeof val;
9395
+ if (type === "string" && val.length > 0) {
9396
+ return parse3(val);
9397
+ } else if (type === "number" && isFinite(val)) {
9398
+ return options.long ? fmtLong(val) : fmtShort(val);
9399
+ }
9400
+ throw new Error(
9401
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
9402
+ );
9403
+ };
9404
+ function parse3(str) {
9405
+ str = String(str);
9406
+ if (str.length > 100) {
9407
+ return;
9408
+ }
9409
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
9410
+ str
9411
+ );
9412
+ if (!match) {
9413
+ return;
9414
+ }
9415
+ var n = parseFloat(match[1]);
9416
+ var type = (match[2] || "ms").toLowerCase();
9417
+ switch (type) {
9418
+ case "years":
9419
+ case "year":
9420
+ case "yrs":
9421
+ case "yr":
9422
+ case "y":
9423
+ return n * y;
9424
+ case "weeks":
9425
+ case "week":
9426
+ case "w":
9427
+ return n * w;
9428
+ case "days":
9429
+ case "day":
9430
+ case "d":
9431
+ return n * d;
9432
+ case "hours":
9433
+ case "hour":
9434
+ case "hrs":
9435
+ case "hr":
9436
+ case "h":
9437
+ return n * h;
9438
+ case "minutes":
9439
+ case "minute":
9440
+ case "mins":
9441
+ case "min":
9442
+ case "m":
9443
+ return n * m;
9444
+ case "seconds":
9445
+ case "second":
9446
+ case "secs":
9447
+ case "sec":
9448
+ case "s":
9449
+ return n * s;
9450
+ case "milliseconds":
9451
+ case "millisecond":
9452
+ case "msecs":
9453
+ case "msec":
9454
+ case "ms":
9455
+ return n;
9456
+ default:
9457
+ return void 0;
9458
+ }
9459
+ }
9460
+ function fmtShort(ms) {
9461
+ var msAbs = Math.abs(ms);
9462
+ if (msAbs >= d) {
9463
+ return Math.round(ms / d) + "d";
9464
+ }
9465
+ if (msAbs >= h) {
9466
+ return Math.round(ms / h) + "h";
9467
+ }
9468
+ if (msAbs >= m) {
9469
+ return Math.round(ms / m) + "m";
9470
+ }
9471
+ if (msAbs >= s) {
9472
+ return Math.round(ms / s) + "s";
9473
+ }
9474
+ return ms + "ms";
9475
+ }
9476
+ function fmtLong(ms) {
9477
+ var msAbs = Math.abs(ms);
9478
+ if (msAbs >= d) {
9479
+ return plural(ms, msAbs, d, "day");
9480
+ }
9481
+ if (msAbs >= h) {
9482
+ return plural(ms, msAbs, h, "hour");
9483
+ }
9484
+ if (msAbs >= m) {
9485
+ return plural(ms, msAbs, m, "minute");
9486
+ }
9487
+ if (msAbs >= s) {
9488
+ return plural(ms, msAbs, s, "second");
9489
+ }
9490
+ return ms + " ms";
9491
+ }
9492
+ function plural(ms, msAbs, n, name) {
9493
+ var isPlural = msAbs >= n * 1.5;
9494
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
9495
+ }
9496
+ }
9497
+ });
9498
+
9499
+ // node_modules/debug/src/common.js
9500
+ var require_common = __commonJS({
9501
+ "node_modules/debug/src/common.js"(exports, module) {
9502
+ function setup(env) {
9503
+ createDebug.debug = createDebug;
9504
+ createDebug.default = createDebug;
9505
+ createDebug.coerce = coerce;
9506
+ createDebug.disable = disable;
9507
+ createDebug.enable = enable;
9508
+ createDebug.enabled = enabled;
9509
+ createDebug.humanize = require_ms();
9510
+ createDebug.destroy = destroy;
9511
+ Object.keys(env).forEach((key) => {
9512
+ createDebug[key] = env[key];
9513
+ });
9514
+ createDebug.names = [];
9515
+ createDebug.skips = [];
9516
+ createDebug.formatters = {};
9517
+ function selectColor(namespace) {
9518
+ let hash = 0;
9519
+ for (let i = 0; i < namespace.length; i++) {
9520
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
9521
+ hash |= 0;
9522
+ }
9523
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
9524
+ }
9525
+ createDebug.selectColor = selectColor;
9526
+ function createDebug(namespace) {
9527
+ let prevTime;
9528
+ let enableOverride = null;
9529
+ let namespacesCache;
9530
+ let enabledCache;
9531
+ function debug3(...args) {
9532
+ if (!debug3.enabled) {
9533
+ return;
9534
+ }
9535
+ const self = debug3;
9536
+ const curr = Number(/* @__PURE__ */ new Date());
9537
+ const ms = curr - (prevTime || curr);
9538
+ self.diff = ms;
9539
+ self.prev = prevTime;
9540
+ self.curr = curr;
9541
+ prevTime = curr;
9542
+ args[0] = createDebug.coerce(args[0]);
9543
+ if (typeof args[0] !== "string") {
9544
+ args.unshift("%O");
9545
+ }
9546
+ let index = 0;
9547
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
9548
+ if (match === "%%") {
9549
+ return "%";
9550
+ }
9551
+ index++;
9552
+ const formatter = createDebug.formatters[format];
9553
+ if (typeof formatter === "function") {
9554
+ const val = args[index];
9555
+ match = formatter.call(self, val);
9556
+ args.splice(index, 1);
9557
+ index--;
9558
+ }
9559
+ return match;
9560
+ });
9561
+ createDebug.formatArgs.call(self, args);
9562
+ const logFn = self.log || createDebug.log;
9563
+ logFn.apply(self, args);
9564
+ }
9565
+ debug3.namespace = namespace;
9566
+ debug3.useColors = createDebug.useColors();
9567
+ debug3.color = createDebug.selectColor(namespace);
9568
+ debug3.extend = extend;
9569
+ debug3.destroy = createDebug.destroy;
9570
+ Object.defineProperty(debug3, "enabled", {
9571
+ enumerable: true,
9572
+ configurable: false,
9573
+ get: () => {
9574
+ if (enableOverride !== null) {
9575
+ return enableOverride;
9576
+ }
9577
+ if (namespacesCache !== createDebug.namespaces) {
9578
+ namespacesCache = createDebug.namespaces;
9579
+ enabledCache = createDebug.enabled(namespace);
9580
+ }
9581
+ return enabledCache;
9582
+ },
9583
+ set: (v) => {
9584
+ enableOverride = v;
9585
+ }
9586
+ });
9587
+ if (typeof createDebug.init === "function") {
9588
+ createDebug.init(debug3);
9589
+ }
9590
+ return debug3;
9591
+ }
9592
+ function extend(namespace, delimiter) {
9593
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
9594
+ newDebug.log = this.log;
9595
+ return newDebug;
9596
+ }
9597
+ function enable(namespaces) {
9598
+ createDebug.save(namespaces);
9599
+ createDebug.namespaces = namespaces;
9600
+ createDebug.names = [];
9601
+ createDebug.skips = [];
9602
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
9603
+ for (const ns of split) {
9604
+ if (ns[0] === "-") {
9605
+ createDebug.skips.push(ns.slice(1));
9606
+ } else {
9607
+ createDebug.names.push(ns);
9608
+ }
9609
+ }
9610
+ }
9611
+ function matchesTemplate(search, template) {
9612
+ let searchIndex = 0;
9613
+ let templateIndex = 0;
9614
+ let starIndex = -1;
9615
+ let matchIndex = 0;
9616
+ while (searchIndex < search.length) {
9617
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
9618
+ if (template[templateIndex] === "*") {
9619
+ starIndex = templateIndex;
9620
+ matchIndex = searchIndex;
9621
+ templateIndex++;
9622
+ } else {
9623
+ searchIndex++;
9624
+ templateIndex++;
9625
+ }
9626
+ } else if (starIndex !== -1) {
9627
+ templateIndex = starIndex + 1;
9628
+ matchIndex++;
9629
+ searchIndex = matchIndex;
9630
+ } else {
9631
+ return false;
9632
+ }
9633
+ }
9634
+ while (templateIndex < template.length && template[templateIndex] === "*") {
9635
+ templateIndex++;
9636
+ }
9637
+ return templateIndex === template.length;
9638
+ }
9639
+ function disable() {
9640
+ const namespaces = [
9641
+ ...createDebug.names,
9642
+ ...createDebug.skips.map((namespace) => "-" + namespace)
9643
+ ].join(",");
9644
+ createDebug.enable("");
9645
+ return namespaces;
9646
+ }
9647
+ function enabled(name) {
9648
+ for (const skip of createDebug.skips) {
9649
+ if (matchesTemplate(name, skip)) {
9650
+ return false;
9651
+ }
9652
+ }
9653
+ for (const ns of createDebug.names) {
9654
+ if (matchesTemplate(name, ns)) {
9655
+ return true;
9656
+ }
9657
+ }
9658
+ return false;
9659
+ }
9660
+ function coerce(val) {
9661
+ if (val instanceof Error) {
9662
+ return val.stack || val.message;
9663
+ }
9664
+ return val;
9665
+ }
9666
+ function destroy() {
9667
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
9668
+ }
9669
+ createDebug.enable(createDebug.load());
9670
+ return createDebug;
9671
+ }
9672
+ module.exports = setup;
9673
+ }
9674
+ });
8760
9675
 
9676
+ // node_modules/debug/src/browser.js
9677
+ var require_browser = __commonJS({
9678
+ "node_modules/debug/src/browser.js"(exports, module) {
9679
+ exports.formatArgs = formatArgs;
9680
+ exports.save = save;
9681
+ exports.load = load;
9682
+ exports.useColors = useColors;
9683
+ exports.storage = localstorage();
9684
+ exports.destroy = /* @__PURE__ */ (() => {
9685
+ let warned = false;
9686
+ return () => {
9687
+ if (!warned) {
9688
+ warned = true;
9689
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
9690
+ }
9691
+ };
9692
+ })();
9693
+ exports.colors = [
9694
+ "#0000CC",
9695
+ "#0000FF",
9696
+ "#0033CC",
9697
+ "#0033FF",
9698
+ "#0066CC",
9699
+ "#0066FF",
9700
+ "#0099CC",
9701
+ "#0099FF",
9702
+ "#00CC00",
9703
+ "#00CC33",
9704
+ "#00CC66",
9705
+ "#00CC99",
9706
+ "#00CCCC",
9707
+ "#00CCFF",
9708
+ "#3300CC",
9709
+ "#3300FF",
9710
+ "#3333CC",
9711
+ "#3333FF",
9712
+ "#3366CC",
9713
+ "#3366FF",
9714
+ "#3399CC",
9715
+ "#3399FF",
9716
+ "#33CC00",
9717
+ "#33CC33",
9718
+ "#33CC66",
9719
+ "#33CC99",
9720
+ "#33CCCC",
9721
+ "#33CCFF",
9722
+ "#6600CC",
9723
+ "#6600FF",
9724
+ "#6633CC",
9725
+ "#6633FF",
9726
+ "#66CC00",
9727
+ "#66CC33",
9728
+ "#9900CC",
9729
+ "#9900FF",
9730
+ "#9933CC",
9731
+ "#9933FF",
9732
+ "#99CC00",
9733
+ "#99CC33",
9734
+ "#CC0000",
9735
+ "#CC0033",
9736
+ "#CC0066",
9737
+ "#CC0099",
9738
+ "#CC00CC",
9739
+ "#CC00FF",
9740
+ "#CC3300",
9741
+ "#CC3333",
9742
+ "#CC3366",
9743
+ "#CC3399",
9744
+ "#CC33CC",
9745
+ "#CC33FF",
9746
+ "#CC6600",
9747
+ "#CC6633",
9748
+ "#CC9900",
9749
+ "#CC9933",
9750
+ "#CCCC00",
9751
+ "#CCCC33",
9752
+ "#FF0000",
9753
+ "#FF0033",
9754
+ "#FF0066",
9755
+ "#FF0099",
9756
+ "#FF00CC",
9757
+ "#FF00FF",
9758
+ "#FF3300",
9759
+ "#FF3333",
9760
+ "#FF3366",
9761
+ "#FF3399",
9762
+ "#FF33CC",
9763
+ "#FF33FF",
9764
+ "#FF6600",
9765
+ "#FF6633",
9766
+ "#FF9900",
9767
+ "#FF9933",
9768
+ "#FFCC00",
9769
+ "#FFCC33"
9770
+ ];
9771
+ function useColors() {
9772
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
9773
+ return true;
9774
+ }
9775
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
9776
+ return false;
9777
+ }
9778
+ let m;
9779
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
9780
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
9781
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
9782
+ typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
9783
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
9784
+ }
9785
+ function formatArgs(args) {
9786
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
9787
+ if (!this.useColors) {
9788
+ return;
9789
+ }
9790
+ const c = "color: " + this.color;
9791
+ args.splice(1, 0, c, "color: inherit");
9792
+ let index = 0;
9793
+ let lastC = 0;
9794
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
9795
+ if (match === "%%") {
9796
+ return;
9797
+ }
9798
+ index++;
9799
+ if (match === "%c") {
9800
+ lastC = index;
9801
+ }
9802
+ });
9803
+ args.splice(lastC, 0, c);
9804
+ }
9805
+ exports.log = console.debug || console.log || (() => {
9806
+ });
9807
+ function save(namespaces) {
9808
+ try {
9809
+ if (namespaces) {
9810
+ exports.storage.setItem("debug", namespaces);
9811
+ } else {
9812
+ exports.storage.removeItem("debug");
9813
+ }
9814
+ } catch (error) {
9815
+ }
9816
+ }
9817
+ function load() {
9818
+ let r;
9819
+ try {
9820
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
9821
+ } catch (error) {
9822
+ }
9823
+ if (!r && typeof process !== "undefined" && "env" in process) {
9824
+ r = process.env.DEBUG;
9825
+ }
9826
+ return r;
9827
+ }
9828
+ function localstorage() {
9829
+ try {
9830
+ return localStorage;
9831
+ } catch (error) {
9832
+ }
9833
+ }
9834
+ module.exports = require_common()(exports);
9835
+ var { formatters } = module.exports;
9836
+ formatters.j = function(v) {
9837
+ try {
9838
+ return JSON.stringify(v);
9839
+ } catch (error) {
9840
+ return "[UnexpectedJSONParseError]: " + error.message;
9841
+ }
9842
+ };
9843
+ }
8761
9844
  });
8762
9845
 
8763
- var N={current:void 0};function _(){if(void 0===N.current)throw new Error("no implementation of useHost provided");return N.current()}function U(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");N.current=e;}function L(){lazilyStartLocaleContext();var t=_();return h(t,LOCALE_CONTEXT_NAME)}function H(){lazilyStartProgramContext();var e=_();return h(e,PROGRAM_CONTEXT_NAME)}function G(){var e;return null==(e=J())?void 0:e.jwt}function J(){lazilyStartUserContext();var e=_(),n=h(e,USER_CONTEXT_NAME),t=userIdentityFromJwt(null==n?void 0:n.jwt);if(isDemo()||!n||t)return n;setUserIdentity(void 0);}var Q=getTenantAlias,z=getAppDomain,B=getEngagementMedium;function K(){return (K=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}function Z(e,n){return (Z=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function X(e,n){return n||(n=e.slice(0)),e.raw=n,e}function Y(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ee(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return "Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return (t=e[Symbol.iterator]()).next.bind(t)}var ne=function(){return (ne=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)},te=new Map,re=new Map,ae=!0,oe=!1;function ie(e){return e.replace(/[\s,]+/g," ").trim()}function se(e){var n,t,r,a=ie(e);if(!te.has(a)){var o=parse(e,{experimentalFragmentVariables:oe});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");te.set(a,function(e){var n=new Set(e.definitions);n.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var r=e[t];r&&"object"==typeof r&&n.add(r);});});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}((n=o,t=new Set,r=[],n.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,a=ie((i=e.loc).source.body.substring(i.start,i.end)),o=re.get(n);o&&!o.has(a)?ae&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||re.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),ne(ne({},n),{definitions:r}))));}return te.get(a)}function ue(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var r=e[0];return n.forEach(function(n,t){r+=n&&"Document"===n.kind?n.loc.source.body:n,r+=e[t+1];}),se(r)}var ce,de=ue;(ce=ue||(ue={})).gql=de,ce.resetCaches=function(){te.clear(),re.clear();},ce.disableFragmentWarnings=function(){ae=!1;},ce.enableExperimentalFragmentVariables=function(){oe=!0;},ce.disableExperimentalFragmentVariables=function(){oe=!1;},ue.default=ue;var le=ue;function fe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var me=function(e){var n,t;function r(n,t){var r;(r=e.call(this,n,t)||this).subject=new Subject;var a=new Subject;return r.subject.pipe(bufferTime(200,void 0,10)).subscribe(function(e){try{if(!e.length)return Promise.resolve();for(var n,t=pe(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=ee(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(fe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){be(e,s);})},function(e){if(e instanceof types.ClientError){var n=function(){var n=e.response,t=n.data,r=n.errors;if(!t)return {v:Ie(s,e)};for(var a,o=Object.keys(t),i=[].concat(s),u=function(){var n=a.value,t=void 0;n.path.find(function(r,a,s){if(o.includes(r)){var u=he(r),c=i.findIndex(function(e){return e.id===u});if(-1===c)return !1;o.splice(o.indexOf(r),1),t=i.splice(c,1)[0];var d=ye(e.response.data,t);s[a]=ge(s[a],u);var l=t.query,f=t.variables,m=K({},e.response,{errors:[n],data:d,path:s}),v=new types.ClientError(m,{query:"string"!=typeof l?print(l):l,variables:f});return we(t,v),!0}return !1});},c=ee(r);!(a=c()).done;)u();be(t,i);}();if("object"==typeof n)return n.v}else Ie(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=fe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Ce(n,e);})},function(n){we(e,n);});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),r}t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,Z(n,t);var a=r.prototype;return a.superRequest=function(n,t){return e.prototype.request.call(this,n,t)},a.request=function(e,n,t){var r=this;return new Promise(function(a,o){var i={query:e,variables:n,id:ve(),options:t,resolve:a,reject:o};r.subject.next(i);})},r}(dist$1.GraphQLClient),ve=function(){return nanoid().replace(/[-_]/g,"")},ge=function(e,n){return e.replace("_"+n,"")},he=function(e){var n=e.split("_");return n[n.length-1]},pe=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id,s=r.options;if(null==s||!s.batch)return t.push(r),e;try{var u="string"==typeof a?parse(a):a,c=u.definitions.find(function(e){return "FragmentDefinition"===e.kind}),d="string"==typeof a?a:print(a),l=/@/.test(d);if(c||l)return t.push(r),e;var f=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(u,[o],f,f),n.push(r),e}catch(n){return t.push(r),e}},M("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},ye=function(e,n){if(!e)return e;var t=Object.keys(e),r=n.id;return t.reduce(function(n,t){var a;return t.endsWith(r)&&(n=K({},n,((a={})[ge(t,r)]=e[t],a))),n},{})},Ce=function(e,n){(0, n.resolve)(e);},be=function(e,n){for(var t,r=ee(n);!(t=r()).done;){var a=t.value,o=ye(e,a);a.resolve(o);}},we=function(e,n){(0, e.reject)(n);},Ie=function(e,n){for(var t,r=ee(e);!(t=r()).done;)(0, t.value.reject)(n);},Pe="sq:graphql-client",Ee=src(function(e,n,t){return new me(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Fe(e,n){switch(n.type){case"loading":return {data:void 0,errors:void 0,loading:!0};case"data":return {data:n.payload,errors:void 0,loading:!1};case"errors":return {data:void 0,errors:n.payload,loading:!1}}}function Me(e,n,t){void 0===t&&(t={batch:!0});var r,a,o,i,s,u,c=(r=G(),a=z(),o=Q(),i=Ee(a,o,r),s=_(),null!=(u=h(s,"sq:graphql-client",{attempts:0}))?u:i),d=useReducer(Fe,n),l=d[1];return [d[0],useCallback(function(n,r){void 0===r&&(r=!1);try{if(!c){var a=new Error("No GraphQL client found");return l({type:"errors",payload:a}),Promise.resolve(a)}return Promise.resolve(function(a,o){try{var i=(r||l({type:"loading"}),Promise.resolve(c.request(e,n,t)).then(function(e){return l({type:"data",payload:e}),e}));}catch(e){return o(e)}return i&&i.then?i.then(void 0,o):i}(0,function(e){return l({type:"errors",payload:e}),e}))}catch(e){return Promise.reject(e)}},[c,e,l])]}var De,Se={loading:!1,data:void 0,errors:void 0};function $e(e){var n=Me(e,Se);return [n[1],n[0]]}var ke,Ae=le(De||(De=X(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function je(){var e=$e(Ae),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.authenticateManagedIdentityWithEmailAndPassword){var n=e.authenticateManagedIdentityWithEmailAndPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.authenticateManagedIdentityWithEmailAndPassword.email,emailVerified:e.authenticateManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.authenticateManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var qe,Re=le(ke||(ke=X(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Ve(){var e=$e(Re),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.registerManagedIdentityWithEmailAndPassword){var n=e.registerManagedIdentityWithEmailAndPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.registerManagedIdentityWithEmailAndPassword.email,emailVerified:e.registerManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.registerManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var xe,We=le(qe||(qe=X(["\n mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {\n submitForm(formSubmissionInput: { key: $key, formData: $formData }) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function Oe(){var e=$e(We),n=e[0],t=e[1],r=t.loading,a=t.data,o=t.errors,i=useState(null),s=i[1];return [function(e){try{return s(null),Promise.resolve(n(e)).then(function(e){var n,t,r,a;if(e instanceof Error)return e;var o=null==(n=e.submitForm)||null==(t=n.results)?void 0:t.find(function(e){var n;return "identity"===(null==e||null==(n=e.formHandler)?void 0:n.namespace)});if(o&&null!=(r=o.result)&&null!=(a=r.results)&&a.length){var i=o.result.results[0];if(i.success){var c=i.data.token,d=o$1(c).user;setUserIdentity({jwt:c,id:d.id,accountId:d.accountId,managedIdentity:{email:i.data.email,emailVerified:i.data.emailVerified,sessionData:i.data.sessionData}});}else s(i.message);}return e})}catch(e){return Promise.reject(e)}},{loading:r,data:a,errors:o,formError:i[0]}]}var Ne,_e=le(xe||(xe=X(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Ue(){var e=$e(_e),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Le,He=le(Ne||(Ne=X(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Te(){var e=$e(He),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.resetManagedIdentityPassword){var n=e.resetManagedIdentityPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.resetManagedIdentityPassword.email,emailVerified:e.resetManagedIdentityPassword.emailVerified,sessionData:e.resetManagedIdentityPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var Ge=le(Le||(Le=X(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function Je(){return $e(Ge)}function Qe(){var e=_();return {refresh:useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function ze(e){var n=e.skip,t=void 0!==n&&n,r=e.update,a=e.variables;useEffect(function(){var e=function(e){!t&&r(a,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=useRef(e),t=useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),useMemo(function(){return n.current},[t.current])}([a,r,t]));}var Be,Ke={loading:!1,data:void 0,errors:void 0},Ze=Symbol();function Xe(e){var n=Me(e,Ke),t=n[0],r=n[1],a=useRef(Ze);ze({skip:a.current===Ze,update:r,variables:a.current});var o=useCallback(function(e){return a.current=e,r(e)},[r]);return [r,K({},t,{refetch:o})]}var Ye,en=le(Be||(Be=X(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function nn(){var e=J(),n=Xe(en),t=n[0],r=n[1],a=r.refetch,o=function(n){n instanceof Error||!n.managedIdentitySession||setUserIdentity(K({},e,{managedIdentity:n.managedIdentitySession}));};return [function(){try{return Promise.resolve(t({})).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}},{loading:r.loading,data:r.data,errors:r.errors,refetch:function(){try{return Promise.resolve(a()).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}}}]}var tn,rn=le(Ye||(Ye=X(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function an(){var e=nn()[0],n=$e(rn),t=n[0],r=n[1];return [function(n){try{return Promise.resolve(t(n)).then(function(n){var t=function(){if(!(n instanceof Error)&&n.verifyManagedIdentityEmail.success)return Promise.resolve(e()).then(function(){})}();return t&&t.then?t.then(function(){return n}):n})}catch(n){return Promise.reject(n)}},{loading:r.loading,data:r.data,errors:r.errors}]}var on,sn=le(tn||(tn=X(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function un(){return $e(sn)}var cn,dn=le(on||(on=X(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function ln(){return $e(dn)}var fn,mn=le(cn||(cn=X(["\n mutation authenticateManagedIdentityWithInstantAccess(\n $email: String!\n $firstName: String\n $lastName: String\n $locale: RSLocale\n $countryCode: RSCountryCode\n $cookies: String\n ) {\n authenticateManagedIdentityWithInstantAccess(\n authenticateManagedIdentityWithInstantAccessInput: {\n email: $email\n firstName: $firstName\n lastName: $lastName\n locale: $locale\n countryCode: $countryCode\n cookies: $cookies\n }\n ) {\n email\n emailVerified\n sessionData\n token\n }\n }\n"])));function vn(){var e=H(),n=getEnvironment(),t=$e(mn),r=t[0],a=t[1];return [function(t){try{return Promise.resolve(r(t)).then(function(t){var r=function(){if(!(t instanceof Error)&&t.authenticateManagedIdentityWithInstantAccess)return Promise.resolve(function(e,n){try{return Promise.resolve(function(t,r){try{var a=Promise.resolve(fetch(getAppDomain()+"/api/v1/"+getTenantAlias()+"/graphql",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify({query:"\n query checkReferralFraudStatus($programId: ID) {\n viewer {\n ... on User {\n id\n instantAccessRewards(filter: { programId_eq: $programId }) {\n data {\n id\n pendingReasons\n cancelledReason\n }\n }\n }\n }\n }\n",variables:{programId:e}})})).then(function(e){if(!e.ok)throw new Error("Failed to fetch locale");return Promise.resolve(e.json()).then(function(e){var n;if(e.errors)throw new Error(JSON.stringify(e.errors,null,2));var t=(null==(n=e.data.viewer.instantAccessRewards)?void 0:n.data)||[];return t.some(function(e){return "SUSPECTED_FRAUD"===e.cancelledReason})?"DENIED":t.some(function(e){var n;return null==(n=e.pendingReasons)?void 0:n.includes("SUSPECTED_FRAUD")})?"PENDING_REVIEW":"APPROVED"})});}catch(e){return r(e)}return a&&a.then?a.then(void 0,r):a}(0,function(e){console.error(e);}))}catch(e){return Promise.reject(e)}}(e,t.authenticateManagedIdentityWithInstantAccess.token)).then(function(e){if("APPROVED"!==e)throw {name:"fraud_error",message:"Referral flagged as fraud."};var r=t.authenticateManagedIdentityWithInstantAccess.email;if(setUserIdentity({jwt:t.authenticateManagedIdentityWithInstantAccess.token,id:r,accountId:r}),"SquatchJS2"===n){var a=new CustomEvent("sq:user-registration",{bubbles:!0,detail:{userId:r,accountId:r}});document.dispatchEvent(a);}})}();return r&&r.then?r.then(function(e){return t}):t})}catch(e){return Promise.reject(e)}},{loading:a.loading,data:a.data,errors:a.errors}]}var gn=dist$1.gql(fn||(fn=X(["\n mutation authenticateManagedIdentityWithGoogle($idToken: String!) {\n authenticateManagedIdentityWithGoogle(\n authenticateManagedIdentityWithGoogleInput: { idToken: $idToken }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function hn(){var e=$e(gn),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.authenticateManagedIdentityWithGoogle){var n=e.authenticateManagedIdentityWithGoogle.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.authenticateManagedIdentityWithGoogle.email,emailVerified:e.authenticateManagedIdentityWithGoogle.emailVerified,sessionData:e.authenticateManagedIdentityWithGoogle.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}function pn(e,n){var t=useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function yn(){return useReducer(function(e){return e+1},0)}function Cn(e){for(var n,t=ee(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&Cn(r);}return Object.freeze(e)}var bn={loading:!0,data:void 0,errors:void 0};function wn(e,n,t,r){var a=Me(e,bn,K({batch:!0},r||{})),o=a[0],i=a[1],s=yn(),u=s[1];return pn(function(){!t&&i(n);},[e,n,i,s[0],t]),ze({skip:t,update:i,variables:n}),Cn(K({},o,{refetch:u}))}function In(e){var n=_(),t=y(n,Mn(e.namespace),e.initialValue),r=t[0],a=t[1];return y(n,Dn(e.namespace),[r,a]),[r,a]}function Pn(e){var n=d(Dn(e)),t=d(Mn(e));return n?[t,n[1]]:[void 0,void 0]}function En(e){var n=d(Dn(e));if(n)return n[1]}function Fn(e){return d(Mn(e))}function Mn(e){return e+"-value"}function Dn(e){return e+"-state"}function Sn(e){var n=_(),t=wn(e.query,e.variables||{},e.skip,K({batch:!0},e.options||{})),r=y(n,Mn(e.namespace),t),a=r[0],o=r[1];return useEffect(function(){umd.deepEqual(t,a)||o(t);},[t,a]),t}function $n(e){return d(Mn(e))||{data:null,loading:!0,refetch:function(){return console.warn("component still loading")}}}function kn(){var e=yn()[1];return useEffect(function(){return history_default.listen(function(){e();})},[]),history_default.location}var An,jn=history_default;function qn(e){var n=useState({limit:e.limit,offset:e.offset}),t=n[0],r=n[1],a=t.offset,o=t.limit,i=function(e,n){return e*n},s=function(e,n){return Math.ceil(e/n)||0};return {limit:o,setLimit:function(e){var n=s(a,e),o=i(e,n);r(K({},t,{limit:e,offset:o}));},offset:a,setCurrentPage:function(e){var n=i(e,o);r(function(e){return K({},e,{offset:n})});},calculatePagination:function(e,n){var t=s(a,o),r=function(e,n){return Math.ceil(e/n)||0}(n,o),i=0===e?"0":e>1?a+1+"-"+(a+e):""+(a+1);return {currentPage:t,pageCount:r,rangeOnPage:i,pageProgress:i+" of "+n}}}}function Rn(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=qn(t),s=i.limit,u=i.setLimit,c=i.setCurrentPage,d=i.calculatePagination,l=wn(e,K({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),h=d((null==g||null==(o=g.data)?void 0:o.length)||0,(null==g?void 0:g.totalCount)||0);return {envelope:g,states:{errors:m,loading:f,limit:s,currentPage:h.currentPage,pageCount:h.pageCount,pageProgress:h.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:c}}}var On=dist$1.gql(An||(An=X(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var _n=1e3,Un=60*_n,Ln=60*Un,Hn=24*Ln,Tn=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(n){var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return t*Hn;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Ln;case"minutes":case"minute":case"mins":case"min":case"m":return t*Un;case"seconds":case"second":case"secs":case"sec":case"s":return t*_n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);return n>=Hn?Gn(e,n,Hn,"day"):n>=Ln?Gn(e,n,Ln,"hour"):n>=Un?Gn(e,n,Un,"minute"):n>=_n?Gn(e,n,_n,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=Hn?Math.round(e/Hn)+"d":n>=Ln?Math.round(e/Ln)+"h":n>=Un?Math.round(e/Un)+"m":n>=_n?Math.round(e/_n)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Gn(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var Jn,Qn,zn,Bn,Kn,Zn=(function(e,n){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let r=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(a=r));}),n.splice(a,0,t);},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug");}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},n.useColors=function(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),e.exports=function(e){function n(e){let r,a=null;function o(...e){if(!o.enabled)return;const t=o,a=Number(new Date);t.diff=a-(r||a),t.prev=r,t.curr=a,r=a,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,a)=>{if("%%"===r)return "%";i++;const o=n.formatters[a];return "function"==typeof o&&(r=o.call(t,e[i]),e.splice(i,1),i--),r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e);}return o.namespace=e,o.useColors=n.useColors(),o.color=n.selectColor(e),o.extend=t,o.destroy=n.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===a?n.enabled(e):a,set:e=>{a=e;}}),"function"==typeof n.init&&n.init(o),o}function t(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(r),...n.skips.map(r).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(t=0;t<a;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));},n.enabled=function(e){if("*"===e[e.length-1])return !0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return !1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return !0;return !1},n.humanize=Tn,n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");},Object.keys(e).forEach(t=>{n[t]=e[t];}),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}(n);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(Jn={exports:{}},Jn.exports),Jn.exports),Xn=Zn("sq:load-event"),Yn=dist$1.gql(Qn||(Qn=X(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var nt=Zn("sq:useForm"),tt=dist$1.gql(zn||(zn=X(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),rt=dist$1.gql(Bn||(Bn=X(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),at=dist$1.gql(Kn||(Kn=X(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));
9846
+ // src/hooks/useHost.ts
9847
+ var ref = { current: void 0 };
9848
+ function useHost() {
9849
+ if (ref.current === void 0) {
9850
+ throw new Error("no implementation of useHost provided");
9851
+ }
9852
+ return ref.current();
9853
+ }
9854
+ function setImplementation(implementation) {
9855
+ if (!implementation) {
9856
+ throw new Error("Must supply an implementation");
9857
+ }
9858
+ if (typeof implementation !== "function") {
9859
+ throw new Error("implementation must be a function");
9860
+ }
9861
+ ref.current = implementation;
9862
+ }
9863
+
9864
+ // src/hooks/environment/useLocale.ts
9865
+ function useLocale() {
9866
+ lazilyStartLocaleContext();
9867
+ const host = useHost();
9868
+ return h(host, LOCALE_CONTEXT_NAME);
9869
+ }
9870
+ function useProgramId() {
9871
+ lazilyStartProgramContext();
9872
+ const host = useHost();
9873
+ return h(host, PROGRAM_CONTEXT_NAME);
9874
+ }
9875
+ function useToken() {
9876
+ var _a;
9877
+ return (_a = useUserIdentity()) == null ? void 0 : _a.jwt;
9878
+ }
9879
+ function useUserIdentity() {
9880
+ lazilyStartUserContext();
9881
+ const host = useHost();
9882
+ const identity = h(host, USER_CONTEXT_NAME);
9883
+ const validIdentity = userIdentityFromJwt(identity == null ? void 0 : identity.jwt);
9884
+ if (!isDemo() && identity && !validIdentity) {
9885
+ setUserIdentity(void 0);
9886
+ return void 0;
9887
+ }
9888
+ return identity;
9889
+ }
9890
+
9891
+ // src/hooks/environment/index.ts
9892
+ var useTenantAlias = getTenantAlias;
9893
+ var useAppDomain = getAppDomain;
9894
+ var useEngagementMedium = getEngagementMedium;
9895
+
9896
+ // node_modules/tslib/tslib.es6.mjs
9897
+ var __assign = function() {
9898
+ __assign = Object.assign || function __assign2(t) {
9899
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9900
+ s = arguments[i];
9901
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
9902
+ }
9903
+ return t;
9904
+ };
9905
+ return __assign.apply(this, arguments);
9906
+ };
9907
+ var docCache = /* @__PURE__ */ new Map();
9908
+ var fragmentSourceMap = /* @__PURE__ */ new Map();
9909
+ var printFragmentWarnings = true;
9910
+ var experimentalFragmentVariables = false;
9911
+ function normalize(string) {
9912
+ return string.replace(/[\s,]+/g, " ").trim();
9913
+ }
9914
+ function cacheKeyFromLoc(loc) {
9915
+ return normalize(loc.source.body.substring(loc.start, loc.end));
9916
+ }
9917
+ function processFragments(ast) {
9918
+ var seenKeys = /* @__PURE__ */ new Set();
9919
+ var definitions = [];
9920
+ ast.definitions.forEach(function(fragmentDefinition) {
9921
+ if (fragmentDefinition.kind === "FragmentDefinition") {
9922
+ var fragmentName = fragmentDefinition.name.value;
9923
+ var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);
9924
+ var sourceKeySet = fragmentSourceMap.get(fragmentName);
9925
+ if (sourceKeySet && !sourceKeySet.has(sourceKey)) {
9926
+ if (printFragmentWarnings) {
9927
+ console.warn("Warning: fragment with name " + fragmentName + " already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names");
9928
+ }
9929
+ } else if (!sourceKeySet) {
9930
+ fragmentSourceMap.set(fragmentName, sourceKeySet = /* @__PURE__ */ new Set());
9931
+ }
9932
+ sourceKeySet.add(sourceKey);
9933
+ if (!seenKeys.has(sourceKey)) {
9934
+ seenKeys.add(sourceKey);
9935
+ definitions.push(fragmentDefinition);
9936
+ }
9937
+ } else {
9938
+ definitions.push(fragmentDefinition);
9939
+ }
9940
+ });
9941
+ return __assign(__assign({}, ast), { definitions });
9942
+ }
9943
+ function stripLoc(doc) {
9944
+ var workSet = new Set(doc.definitions);
9945
+ workSet.forEach(function(node) {
9946
+ if (node.loc)
9947
+ delete node.loc;
9948
+ Object.keys(node).forEach(function(key) {
9949
+ var value = node[key];
9950
+ if (value && typeof value === "object") {
9951
+ workSet.add(value);
9952
+ }
9953
+ });
9954
+ });
9955
+ var loc = doc.loc;
9956
+ if (loc) {
9957
+ delete loc.startToken;
9958
+ delete loc.endToken;
9959
+ }
9960
+ return doc;
9961
+ }
9962
+ function parseDocument(source) {
9963
+ var cacheKey = normalize(source);
9964
+ if (!docCache.has(cacheKey)) {
9965
+ var parsed = parse(source, {
9966
+ experimentalFragmentVariables,
9967
+ allowLegacyFragmentVariables: experimentalFragmentVariables,
9968
+ experimentalFragmentArguments: experimentalFragmentVariables
9969
+ });
9970
+ if (!parsed || parsed.kind !== "Document") {
9971
+ throw new Error("Not a valid GraphQL document.");
9972
+ }
9973
+ docCache.set(cacheKey, stripLoc(processFragments(parsed)));
9974
+ }
9975
+ return docCache.get(cacheKey);
9976
+ }
9977
+ function gql(literals) {
9978
+ var args = [];
9979
+ for (var _i = 1; _i < arguments.length; _i++) {
9980
+ args[_i - 1] = arguments[_i];
9981
+ }
9982
+ if (typeof literals === "string") {
9983
+ literals = [literals];
9984
+ }
9985
+ var result = literals[0];
9986
+ args.forEach(function(arg, i) {
9987
+ if (arg && arg.kind === "Document") {
9988
+ result += arg.loc.source.body;
9989
+ } else {
9990
+ result += arg;
9991
+ }
9992
+ result += literals[i + 1];
9993
+ });
9994
+ return parseDocument(result);
9995
+ }
9996
+ function resetCaches() {
9997
+ docCache.clear();
9998
+ fragmentSourceMap.clear();
9999
+ }
10000
+ function disableFragmentWarnings() {
10001
+ printFragmentWarnings = false;
10002
+ }
10003
+ function enableExperimentalFragmentVariables() {
10004
+ experimentalFragmentVariables = true;
10005
+ }
10006
+ function disableExperimentalFragmentVariables() {
10007
+ experimentalFragmentVariables = false;
10008
+ }
10009
+ var extras = {
10010
+ gql,
10011
+ resetCaches,
10012
+ disableFragmentWarnings,
10013
+ enableExperimentalFragmentVariables,
10014
+ disableExperimentalFragmentVariables
10015
+ };
10016
+ (function(gql_1) {
10017
+ gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;
10018
+ })(gql || (gql = {}));
10019
+ gql["default"] = gql;
10020
+ var lib_default = gql;
10021
+ var MAX_REQUESTS = 10;
10022
+ var REQUEST_INTERVAL = 200;
10023
+ var BatchedGraphQLClient = class extends dist.GraphQLClient {
10024
+ constructor(url, opts) {
10025
+ super(url, opts);
10026
+ __publicField(this, "subject", new Subject());
10027
+ const unmergable = new Subject();
10028
+ const buffer = this.subject.pipe(
10029
+ bufferTime(REQUEST_INTERVAL, void 0, MAX_REQUESTS)
10030
+ );
10031
+ buffer.subscribe(async (queryAddedEvents) => {
10032
+ if (!queryAddedEvents.length) {
10033
+ return;
10034
+ }
10035
+ const {
10036
+ mergedQuery,
10037
+ mergedVariables,
10038
+ mergedQueryAddedEvents,
10039
+ unmergedQueryAddedEvents
10040
+ } = mergeQueryAddedEvents(queryAddedEvents);
10041
+ for (const unmergedQuery of unmergedQueryAddedEvents)
10042
+ unmergable.next(unmergedQuery);
10043
+ if (!mergedQueryAddedEvents.length) {
10044
+ return;
10045
+ }
10046
+ try {
10047
+ const mergedQueryResult = await this.superRequest(
10048
+ mergedQuery,
10049
+ mergedVariables
10050
+ );
10051
+ resolveMergedQueryResult(mergedQueryResult, mergedQueryAddedEvents);
10052
+ } catch (e) {
10053
+ if (e instanceof types.ClientError) {
10054
+ const { data, errors } = e.response;
10055
+ if (!data) {
10056
+ return rejectAllQueryAddedEventsWithError(
10057
+ mergedQueryAddedEvents,
10058
+ e
10059
+ );
10060
+ }
10061
+ const aliases = Object.keys(data);
10062
+ let eventsToResolve = [...mergedQueryAddedEvents];
10063
+ for (const error of errors) {
10064
+ let erroredEvent;
10065
+ error.path.find((key, index, path) => {
10066
+ if (aliases.includes(key)) {
10067
+ const erroredId = getIdFromAliasedField(key);
10068
+ const indexOfErroredEvent = eventsToResolve.findIndex(
10069
+ (event) => event.id === erroredId
10070
+ );
10071
+ if (indexOfErroredEvent === -1) return false;
10072
+ aliases.splice(aliases.indexOf(key), 1);
10073
+ erroredEvent = eventsToResolve.splice(
10074
+ indexOfErroredEvent,
10075
+ 1
10076
+ )[0];
10077
+ const eventSpecificData = removeAliasesFromDataResult(
10078
+ e.response.data,
10079
+ erroredEvent
10080
+ );
10081
+ path[index] = removeAliasFromField(path[index], erroredId);
10082
+ const { query, variables } = erroredEvent;
10083
+ const errorResponse = __spreadProps(__spreadValues({}, e.response), {
10084
+ errors: [error],
10085
+ data: eventSpecificData,
10086
+ path
10087
+ });
10088
+ const newError = new types.ClientError(errorResponse, {
10089
+ query: typeof query !== "string" ? print(query) : query,
10090
+ variables
10091
+ });
10092
+ rejectQueryAddedEventWithError(erroredEvent, newError);
10093
+ return true;
10094
+ }
10095
+ return false;
10096
+ });
10097
+ }
10098
+ resolveMergedQueryResult(data, eventsToResolve);
10099
+ } else rejectAllQueryAddedEventsWithError(mergedQueryAddedEvents, e);
10100
+ }
10101
+ });
10102
+ unmergable.subscribe(async (event) => {
10103
+ try {
10104
+ const { query, variables } = event;
10105
+ const result = await this.superRequest(query, variables);
10106
+ resolveSingleQueryResult(result, event);
10107
+ } catch (e) {
10108
+ rejectQueryAddedEventWithError(event, e);
10109
+ }
10110
+ });
10111
+ }
10112
+ superRequest(query, variables) {
10113
+ return super.request(query, variables);
10114
+ }
10115
+ request(query, variables, options) {
10116
+ return new Promise((resolve, reject) => {
10117
+ const queryAddedEvent = {
10118
+ query,
10119
+ variables,
10120
+ id: generateQueryAddedEventId(),
10121
+ options,
10122
+ resolve,
10123
+ reject
10124
+ };
10125
+ this.subject.next(queryAddedEvent);
10126
+ });
10127
+ }
10128
+ };
10129
+ var generateQueryAddedEventId = () => nanoid().replace(/[-_]/g, "");
10130
+ var aliasFieldOrVariableFn = (name, id) => `${name}_${id}`;
10131
+ var removeAliasFromField = (field, id) => field.replace(`_${id}`, "");
10132
+ var getIdFromAliasedField = (field) => {
10133
+ const fieldArray = field.split("_");
10134
+ return fieldArray[fieldArray.length - 1];
10135
+ };
10136
+ var mergeQueryAddedEvents = (events) => {
10137
+ const mergedQueryAddedEvents = [];
10138
+ const unmergedQueryAddedEvents = [];
10139
+ const { document: document2, variables } = events.reduce(
10140
+ (acc, curr) => {
10141
+ const { query, variables: variables2, id, options } = curr;
10142
+ if (!(options == null ? void 0 : options.batch)) {
10143
+ unmergedQueryAddedEvents.push(curr);
10144
+ return acc;
10145
+ }
10146
+ try {
10147
+ const parsedQuery = typeof query === "string" ? parse(query) : query;
10148
+ const fragmentDefinition = parsedQuery.definitions.find(
10149
+ (node) => node.kind === "FragmentDefinition"
10150
+ );
10151
+ const queryStr = typeof query === "string" ? query : print(query);
10152
+ const containsDirective = /@/.test(queryStr);
10153
+ if (fragmentDefinition || containsDirective) {
10154
+ unmergedQueryAddedEvents.push(curr);
10155
+ return acc;
10156
+ }
10157
+ const renameFn = (name) => aliasFieldOrVariableFn(name, id);
10158
+ acc = acc.addN(parsedQuery, [variables2], renameFn, renameFn);
10159
+ mergedQueryAddedEvents.push(curr);
10160
+ return acc;
10161
+ } catch (e) {
10162
+ unmergedQueryAddedEvents.push(curr);
10163
+ return acc;
10164
+ }
10165
+ },
10166
+ combineQuery("BatchedQuery")
10167
+ );
10168
+ const mergedQuery = document2 && print(document2);
10169
+ const mergedVariables = variables;
10170
+ return {
10171
+ mergedQuery,
10172
+ mergedVariables,
10173
+ mergedQueryAddedEvents,
10174
+ unmergedQueryAddedEvents
10175
+ };
10176
+ };
10177
+ var removeAliasesFromDataResult = (queryResult, event) => {
10178
+ if (!queryResult) return queryResult;
10179
+ const aliases = Object.keys(queryResult);
10180
+ const { id } = event;
10181
+ return aliases.reduce((data, key) => {
10182
+ if (key.endsWith(id)) {
10183
+ data = __spreadProps(__spreadValues({}, data), {
10184
+ [removeAliasFromField(key, id)]: queryResult[key]
10185
+ });
10186
+ }
10187
+ return data;
10188
+ }, {});
10189
+ };
10190
+ var resolveSingleQueryResult = (queryResult, event) => {
10191
+ const { resolve } = event;
10192
+ resolve(queryResult);
10193
+ };
10194
+ var resolveMergedQueryResult = (mergedQueryResult, events) => {
10195
+ for (const event of events) {
10196
+ const data = removeAliasesFromDataResult(mergedQueryResult, event);
10197
+ event.resolve(data);
10198
+ }
10199
+ };
10200
+ var rejectQueryAddedEventWithError = (event, err) => {
10201
+ const { reject } = event;
10202
+ reject(err);
10203
+ };
10204
+ var rejectAllQueryAddedEventsWithError = (events, err) => {
10205
+ for (const event of events) {
10206
+ const { reject } = event;
10207
+ reject(err);
10208
+ }
10209
+ };
10210
+
10211
+ // src/hooks/graphql/useGraphQLClient.ts
10212
+ var GRAPHQL_CONTEXT = "sq:graphql-client";
10213
+ function createGraphQlClient(appDomain, tenantAlias, token) {
10214
+ const uri = appDomain + "/api/v1/" + tenantAlias + "/graphql";
10215
+ const headers = {
10216
+ Authorization: `Bearer ${token || ""}`
10217
+ };
10218
+ const newClient = new BatchedGraphQLClient(uri, {
10219
+ headers
10220
+ });
10221
+ return newClient;
10222
+ }
10223
+ var memoizedGraphQLClient = src(createGraphQlClient);
10224
+ function useGraphQLClient() {
10225
+ const token = useToken();
10226
+ const appDomain = useAppDomain();
10227
+ const tenantAlias = useTenantAlias();
10228
+ const localClient = memoizedGraphQLClient(
10229
+ appDomain,
10230
+ tenantAlias,
10231
+ token
10232
+ );
10233
+ const host = useHost();
10234
+ const clientFromContext = h(
10235
+ host,
10236
+ GRAPHQL_CONTEXT,
10237
+ // Won't poll / re-attempt
10238
+ { attempts: 0 }
10239
+ );
10240
+ return clientFromContext != null ? clientFromContext : localClient;
10241
+ }
10242
+ var useGraphQLClient_default = useGraphQLClient;
10243
+
10244
+ // src/hooks/graphql/useBaseQuery.ts
10245
+ function reducer(state, action) {
10246
+ switch (action.type) {
10247
+ case "loading":
10248
+ return { data: void 0, errors: void 0, loading: true };
10249
+ case "data":
10250
+ return { data: action.payload, errors: void 0, loading: false };
10251
+ case "errors":
10252
+ return { data: void 0, errors: action.payload, loading: false };
10253
+ }
10254
+ }
10255
+ function useBaseQuery(query, initialState, options = { batch: true }) {
10256
+ const client = useGraphQLClient_default();
10257
+ const [state, dispatch] = useReducer(
10258
+ reducer,
10259
+ initialState
10260
+ );
10261
+ const update = useCallback(
10262
+ async function(variables, skipLoading = false) {
10263
+ if (!client) {
10264
+ const error = new Error("No GraphQL client found");
10265
+ dispatch({
10266
+ type: "errors",
10267
+ // @ts-expect-error -- Need to fix this
10268
+ payload: error
10269
+ });
10270
+ return error;
10271
+ }
10272
+ try {
10273
+ if (!skipLoading) dispatch({ type: "loading" });
10274
+ const res = await client.request(query, variables, options);
10275
+ dispatch({ type: "data", payload: res });
10276
+ return res;
10277
+ } catch (error) {
10278
+ dispatch({ type: "errors", payload: error });
10279
+ return error;
10280
+ }
10281
+ },
10282
+ [client, query, dispatch]
10283
+ );
10284
+ return [state, update];
10285
+ }
10286
+
10287
+ // src/hooks/graphql/useMutation.ts
10288
+ var initialMutationState = {
10289
+ loading: false,
10290
+ data: void 0,
10291
+ errors: void 0
10292
+ };
10293
+ function useMutation(query) {
10294
+ const [state, update] = useBaseQuery(
10295
+ query,
10296
+ initialMutationState
10297
+ );
10298
+ return [update, state];
10299
+ }
10300
+
10301
+ // src/hooks/managedIdentity/useAuthenticateWithEmailAndPasswordMutation.ts
10302
+ var AuthenticateWithEmailAndPasswordMutation = lib_default`
10303
+ mutation AuthenticateWithEmailAndPassword(
10304
+ $email: String!
10305
+ $password: String!
10306
+ ) {
10307
+ authenticateManagedIdentityWithEmailAndPassword(
10308
+ authenticateManagedIdentityWithEmailAndPasswordInput: {
10309
+ email: $email
10310
+ password: $password
10311
+ }
10312
+ ) {
10313
+ token
10314
+ email
10315
+ emailVerified
10316
+ sessionData
10317
+ }
10318
+ }
10319
+ `;
10320
+ function useAuthenticateWithEmailAndPasswordMutation() {
10321
+ const [request, { loading, data, errors }] = useMutation(
10322
+ AuthenticateWithEmailAndPasswordMutation
10323
+ );
10324
+ const requestAndSetUserIdentity = async (v) => {
10325
+ const result = await request(v);
10326
+ if (!(result instanceof Error) && result.authenticateManagedIdentityWithEmailAndPassword) {
10327
+ const jwt = result.authenticateManagedIdentityWithEmailAndPassword.token;
10328
+ const { user } = o(jwt);
10329
+ setUserIdentity({
10330
+ jwt,
10331
+ id: user.id,
10332
+ accountId: user.accountId,
10333
+ managedIdentity: {
10334
+ email: result.authenticateManagedIdentityWithEmailAndPassword.email,
10335
+ emailVerified: result.authenticateManagedIdentityWithEmailAndPassword.emailVerified,
10336
+ sessionData: result.authenticateManagedIdentityWithEmailAndPassword.sessionData
10337
+ }
10338
+ });
10339
+ }
10340
+ return result;
10341
+ };
10342
+ return [requestAndSetUserIdentity, { loading, data, errors }];
10343
+ }
10344
+ var RegisterWithEmailAndPasswordMutation = lib_default`
10345
+ mutation RegisterWithEmailAndPassword(
10346
+ $email: String!
10347
+ $password: String!
10348
+ $formData: RSJsonNode
10349
+ $redirectPath: String
10350
+ ) {
10351
+ registerManagedIdentityWithEmailAndPassword(
10352
+ registerManagedIdentityWithEmailAndPasswordInput: {
10353
+ email: $email
10354
+ password: $password
10355
+ formData: $formData
10356
+ redirectPath: $redirectPath
10357
+ }
10358
+ ) {
10359
+ token
10360
+ email
10361
+ emailVerified
10362
+ sessionData
10363
+ }
10364
+ }
10365
+ `;
10366
+ function useRegisterWithEmailAndPasswordMutation() {
10367
+ const [request, { loading, data, errors }] = useMutation(
10368
+ RegisterWithEmailAndPasswordMutation
10369
+ );
10370
+ const requestAndSetUserIdentity = async (v) => {
10371
+ const result = await request(v);
10372
+ if (!(result instanceof Error) && result.registerManagedIdentityWithEmailAndPassword) {
10373
+ const jwt = result.registerManagedIdentityWithEmailAndPassword.token;
10374
+ const { user } = o(jwt);
10375
+ setUserIdentity({
10376
+ jwt,
10377
+ id: user.id,
10378
+ accountId: user.accountId,
10379
+ managedIdentity: {
10380
+ email: result.registerManagedIdentityWithEmailAndPassword.email,
10381
+ emailVerified: result.registerManagedIdentityWithEmailAndPassword.emailVerified,
10382
+ sessionData: result.registerManagedIdentityWithEmailAndPassword.sessionData
10383
+ }
10384
+ });
10385
+ }
10386
+ return result;
10387
+ };
10388
+ return [requestAndSetUserIdentity, { loading, data, errors }];
10389
+ }
10390
+ var RegisterViaRegistrationFormMutation = lib_default`
10391
+ mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {
10392
+ submitForm(formSubmissionInput: { key: $key, formData: $formData }) {
10393
+ results {
10394
+ ... on FormHandlerSubmissionResult {
10395
+ result
10396
+ formHandler {
10397
+ namespace
10398
+ }
10399
+ }
10400
+ ... on FormHandlerError {
10401
+ errorCode
10402
+ error
10403
+ errorType
10404
+ formHandler {
10405
+ name
10406
+ endpointUrl
10407
+ }
10408
+ }
10409
+ }
10410
+ }
10411
+ }
10412
+ `;
10413
+ function useRegisterViaRegistrationFormMutation() {
10414
+ const [request, { loading, data, errors }] = useMutation(
10415
+ RegisterViaRegistrationFormMutation
10416
+ );
10417
+ const [formError, setFormError] = useState(null);
10418
+ const requestAndSetUserIdentityOrFormError = async (v) => {
10419
+ var _a, _b, _c, _d;
10420
+ setFormError(null);
10421
+ const result = await request(v);
10422
+ if (result instanceof Error) {
10423
+ return result;
10424
+ }
10425
+ const managedIdentityResponse = (_b = (_a = result.submitForm) == null ? void 0 : _a.results) == null ? void 0 : _b.find(
10426
+ (result2) => {
10427
+ var _a2;
10428
+ return ((_a2 = result2 == null ? void 0 : result2.formHandler) == null ? void 0 : _a2.namespace) === "identity";
10429
+ }
10430
+ );
10431
+ if (managedIdentityResponse && ((_d = (_c = managedIdentityResponse.result) == null ? void 0 : _c.results) == null ? void 0 : _d.length)) {
10432
+ const registrationResult = managedIdentityResponse.result.results[0];
10433
+ if (registrationResult.success) {
10434
+ const jwt = registrationResult.data.token;
10435
+ const { user } = o(jwt);
10436
+ setUserIdentity({
10437
+ jwt,
10438
+ id: user.id,
10439
+ accountId: user.accountId,
10440
+ managedIdentity: {
10441
+ email: registrationResult.data.email,
10442
+ emailVerified: registrationResult.data.emailVerified,
10443
+ sessionData: registrationResult.data.sessionData
10444
+ }
10445
+ });
10446
+ } else {
10447
+ setFormError(registrationResult.message);
10448
+ }
10449
+ }
10450
+ return result;
10451
+ };
10452
+ return [
10453
+ requestAndSetUserIdentityOrFormError,
10454
+ { loading, data, errors, formError }
10455
+ ];
10456
+ }
10457
+
10458
+ // src/hooks/managedIdentity/useChangePasswordMutation.ts
10459
+ var ChangePasswordMutation = lib_default`
10460
+ mutation ChangePassword($password: String!) {
10461
+ changeManagedIdentityPassword(
10462
+ changeManagedIdentityPasswordInput: { password: $password }
10463
+ ) {
10464
+ success
10465
+ }
10466
+ }
10467
+ `;
10468
+ function useChangePasswordMutation() {
10469
+ const [request, { loading, data, errors }] = useMutation(ChangePasswordMutation);
10470
+ return [request, { loading, data, errors }];
10471
+ }
10472
+ var ResetPasswordMutation = lib_default`
10473
+ mutation ResetPassword($oobCode: String!, $password: String!) {
10474
+ resetManagedIdentityPassword(
10475
+ resetManagedIdentityPasswordInput: {
10476
+ password: $password
10477
+ oobCode: $oobCode
10478
+ }
10479
+ ) {
10480
+ token
10481
+ email
10482
+ emailVerified
10483
+ sessionData
10484
+ }
10485
+ }
10486
+ `;
10487
+ function useResetPasswordMutation() {
10488
+ const [request, { loading, data, errors }] = useMutation(
10489
+ ResetPasswordMutation
10490
+ );
10491
+ const requestAndSetUserIdentity = async (v) => {
10492
+ const result = await request(v);
10493
+ if (!(result instanceof Error) && result.resetManagedIdentityPassword) {
10494
+ const jwt = result.resetManagedIdentityPassword.token;
10495
+ const { user } = o(jwt);
10496
+ setUserIdentity({
10497
+ jwt,
10498
+ id: user.id,
10499
+ accountId: user.accountId,
10500
+ managedIdentity: {
10501
+ email: result.resetManagedIdentityPassword.email,
10502
+ emailVerified: result.resetManagedIdentityPassword.emailVerified,
10503
+ sessionData: result.resetManagedIdentityPassword.sessionData
10504
+ }
10505
+ });
10506
+ }
10507
+ return result;
10508
+ };
10509
+ return [requestAndSetUserIdentity, { loading, data, errors }];
10510
+ }
10511
+
10512
+ // src/hooks/managedIdentity/useVerifyPasswordResetCodeMutation.ts
10513
+ var VerifyPasswordResetCodeMutation = lib_default`
10514
+ mutation VerifyPasswordResetCode($oobCode: String!) {
10515
+ verifyManagedIdentityPasswordResetCode(
10516
+ verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }
10517
+ ) {
10518
+ success
10519
+ }
10520
+ }
10521
+ `;
10522
+ function useVerifyPasswordResetCodeMutation() {
10523
+ return useMutation(
10524
+ VerifyPasswordResetCodeMutation
10525
+ );
10526
+ }
10527
+ function useDeepCompareMemoize(value) {
10528
+ const ref2 = useRef(value);
10529
+ const signalRef = useRef(0);
10530
+ if (!equal(value, ref2.current)) {
10531
+ ref2.current = value;
10532
+ signalRef.current += 1;
10533
+ }
10534
+ return useMemo(() => ref2.current, [signalRef.current]);
10535
+ }
10536
+ function useDeepCompareEffect(callback, dependencies) {
10537
+ return useEffect(callback, useDeepCompareMemoize(dependencies));
10538
+ }
10539
+
10540
+ // src/hooks/graphql/Refresh.ts
10541
+ var REFRESH_EVENT_NAME = "sq:refresh";
10542
+ function useRefreshDispatcher() {
10543
+ const host = useHost();
10544
+ const refresh = useCallback(() => {
10545
+ host.dispatchEvent(
10546
+ new CustomEvent(REFRESH_EVENT_NAME, {
10547
+ bubbles: true,
10548
+ composed: true,
10549
+ cancelable: true,
10550
+ detail: {
10551
+ // Could add some "scope" for more granular refresh
10552
+ }
10553
+ })
10554
+ );
10555
+ }, [host]);
10556
+ return { refresh };
10557
+ }
10558
+ function useRefreshListener({
10559
+ skip = false,
10560
+ update,
10561
+ variables
10562
+ }) {
10563
+ useDeepCompareEffect(() => {
10564
+ const listener = (e) => {
10565
+ !skip && update(variables, true);
10566
+ };
10567
+ document.addEventListener(REFRESH_EVENT_NAME, listener);
10568
+ return () => document.removeEventListener(REFRESH_EVENT_NAME, listener);
10569
+ }, [variables, update, skip]);
10570
+ }
10571
+
10572
+ // src/hooks/graphql/useLazyQuery.ts
10573
+ var initialLazyQueryState = {
10574
+ loading: false,
10575
+ data: void 0,
10576
+ errors: void 0
10577
+ };
10578
+ var NOTLOADED = /* @__PURE__ */ Symbol();
10579
+ function useLazyQuery(query) {
10580
+ const [state, update] = useBaseQuery(
10581
+ query,
10582
+ initialLazyQueryState
10583
+ );
10584
+ const variablesRef = useRef(NOTLOADED);
10585
+ const skip = variablesRef.current === NOTLOADED;
10586
+ useRefreshListener({
10587
+ skip,
10588
+ update,
10589
+ variables: variablesRef.current
10590
+ });
10591
+ const refetch = useCallback(
10592
+ (variables) => {
10593
+ variablesRef.current = variables;
10594
+ return update(variables);
10595
+ },
10596
+ [update]
10597
+ );
10598
+ return [
10599
+ update,
10600
+ __spreadProps(__spreadValues({}, state), {
10601
+ refetch
10602
+ })
10603
+ ];
10604
+ }
10605
+
10606
+ // src/hooks/managedIdentity/useManagedIdentitySessionQuery.ts
10607
+ var ManagedIdentitySessionQuery = lib_default`
10608
+ query ManagedIdentitySession {
10609
+ managedIdentitySession {
10610
+ email
10611
+ emailVerified
10612
+ sessionData
10613
+ }
10614
+ }
10615
+ `;
10616
+ function useManagedIdentitySessionQuery() {
10617
+ const userIdentity = useUserIdentity();
10618
+ const [request, { loading, data, errors, refetch }] = useLazyQuery(ManagedIdentitySessionQuery);
10619
+ const updateUserIdentity = (result) => {
10620
+ if (!(result instanceof Error) && result.managedIdentitySession) {
10621
+ setUserIdentity(__spreadProps(__spreadValues({}, userIdentity), {
10622
+ managedIdentity: result.managedIdentitySession
10623
+ }));
10624
+ }
10625
+ };
10626
+ const requestAndSetUserIdentity = async () => {
10627
+ const result = await request({});
10628
+ updateUserIdentity(result);
10629
+ return result;
10630
+ };
10631
+ const refetchAndSetUserIdentity = async () => {
10632
+ const result = await refetch();
10633
+ updateUserIdentity(result);
10634
+ return result;
10635
+ };
10636
+ return [
10637
+ requestAndSetUserIdentity,
10638
+ { loading, data, errors, refetch: refetchAndSetUserIdentity }
10639
+ ];
10640
+ }
10641
+
10642
+ // src/hooks/managedIdentity/useVerifyEmailMutation.ts
10643
+ var VerifyEmailMutation = lib_default`
10644
+ mutation VerifyEmail($oobCode: String!) {
10645
+ verifyManagedIdentityEmail(
10646
+ verifyManagedIdentityEmailInput: { oobCode: $oobCode }
10647
+ ) {
10648
+ success
10649
+ }
10650
+ }
10651
+ `;
10652
+ function useVerifyEmailMutation() {
10653
+ const [refreshManagedIdentitySession] = useManagedIdentitySessionQuery();
10654
+ const [request, { loading, data, errors }] = useMutation(VerifyEmailMutation);
10655
+ const requestAndRefreshManagedIdentitySession = async (e) => {
10656
+ const result = await request(e);
10657
+ if (!(result instanceof Error) && result.verifyManagedIdentityEmail.success) {
10658
+ await refreshManagedIdentitySession();
10659
+ }
10660
+ return result;
10661
+ };
10662
+ return [requestAndRefreshManagedIdentitySession, { loading, data, errors }];
10663
+ }
10664
+
10665
+ // src/hooks/managedIdentity/useRequestPasswordResetEmailMutation.ts
10666
+ var RequestPasswordResetEmailMutation = lib_default`
10667
+ mutation RequestPasswordResetEmail(
10668
+ $email: String!
10669
+ $urlParams: RSJsonNode
10670
+ $redirectPath: String
10671
+ ) {
10672
+ requestManagedIdentityPasswordResetEmail(
10673
+ requestManagedIdentityPasswordResetEmailInput: {
10674
+ email: $email
10675
+ urlParams: $urlParams
10676
+ redirectPath: $redirectPath
10677
+ }
10678
+ ) {
10679
+ success
10680
+ }
10681
+ }
10682
+ `;
10683
+ function useRequestPasswordResetEmailMutation() {
10684
+ return useMutation(
10685
+ RequestPasswordResetEmailMutation
10686
+ );
10687
+ }
10688
+
10689
+ // src/hooks/managedIdentity/useRequestVerificationEmailMutation.ts
10690
+ var RequestVerificationEmailMutation = lib_default`
10691
+ mutation RequestVerificationEmail(
10692
+ $email: String!
10693
+ $urlParams: RSJsonNode
10694
+ $redirectPath: String
10695
+ ) {
10696
+ requestManagedIdentityVerificationEmail(
10697
+ requestManagedIdentityVerificationEmailInput: {
10698
+ email: $email
10699
+ urlParams: $urlParams
10700
+ redirectPath: $redirectPath
10701
+ }
10702
+ ) {
10703
+ success
10704
+ }
10705
+ }
10706
+ `;
10707
+ function useRequestVerificationEmailMutation() {
10708
+ return useMutation(
10709
+ RequestVerificationEmailMutation
10710
+ );
10711
+ }
10712
+ var AuthenticateManagedIdentityWithInstantAccessMutation = lib_default`
10713
+ mutation authenticateManagedIdentityWithInstantAccess(
10714
+ $email: String!
10715
+ $firstName: String
10716
+ $lastName: String
10717
+ $locale: RSLocale
10718
+ $countryCode: RSCountryCode
10719
+ $cookies: String
10720
+ ) {
10721
+ authenticateManagedIdentityWithInstantAccess(
10722
+ authenticateManagedIdentityWithInstantAccessInput: {
10723
+ email: $email
10724
+ firstName: $firstName
10725
+ lastName: $lastName
10726
+ locale: $locale
10727
+ countryCode: $countryCode
10728
+ cookies: $cookies
10729
+ }
10730
+ ) {
10731
+ email
10732
+ emailVerified
10733
+ sessionData
10734
+ token
10735
+ }
10736
+ }
10737
+ `;
10738
+ var CheckReferralFraudStatusQuery = `
10739
+ query checkReferralFraudStatus($programId: ID) {
10740
+ viewer {
10741
+ ... on User {
10742
+ id
10743
+ instantAccessRewards(filter: { programId_eq: $programId }) {
10744
+ data {
10745
+ id
10746
+ pendingReasons
10747
+ cancelledReason
10748
+ }
10749
+ }
10750
+ }
10751
+ }
10752
+ }
10753
+ `;
10754
+ async function fetchFraud(programId, jwt) {
10755
+ var _a;
10756
+ try {
10757
+ const result = await fetch(
10758
+ `${getAppDomain()}/api/v1/${getTenantAlias()}/graphql`,
10759
+ {
10760
+ method: "POST",
10761
+ headers: {
10762
+ "Content-Type": "application/json",
10763
+ Authorization: `Bearer ${jwt}`
10764
+ },
10765
+ body: JSON.stringify({
10766
+ query: CheckReferralFraudStatusQuery,
10767
+ variables: {
10768
+ programId
10769
+ }
10770
+ })
10771
+ }
10772
+ );
10773
+ if (!result.ok) {
10774
+ throw new Error("Failed to fetch locale");
10775
+ }
10776
+ const json = await result.json();
10777
+ if (json.errors) {
10778
+ throw new Error(JSON.stringify(json.errors, null, 2));
10779
+ }
10780
+ const results = ((_a = json.data.viewer.instantAccessRewards) == null ? void 0 : _a.data) || [];
10781
+ if (results.some((r) => r.cancelledReason === "SUSPECTED_FRAUD"))
10782
+ return "DENIED";
10783
+ else if (results.some((r) => {
10784
+ var _a2;
10785
+ return (_a2 = r.pendingReasons) == null ? void 0 : _a2.includes("SUSPECTED_FRAUD");
10786
+ }))
10787
+ return "PENDING_REVIEW";
10788
+ else return "APPROVED";
10789
+ } catch (e) {
10790
+ console.error(e);
10791
+ return void 0;
10792
+ }
10793
+ }
10794
+ function useAuthenticateManagedIdentityWithInstantAccess() {
10795
+ const programId = useProgramId();
10796
+ const env = getEnvironment();
10797
+ const [request, { loading, data, errors }] = useMutation(
10798
+ AuthenticateManagedIdentityWithInstantAccessMutation
10799
+ );
10800
+ const requestAndSetUserIdentity = async (variables) => {
10801
+ const result = await request(variables);
10802
+ if (!(result instanceof Error) && result.authenticateManagedIdentityWithInstantAccess) {
10803
+ const fraudStatus = await fetchFraud(
10804
+ programId,
10805
+ result.authenticateManagedIdentityWithInstantAccess.token
10806
+ );
10807
+ if (fraudStatus === "APPROVED") {
10808
+ const jwt = result.authenticateManagedIdentityWithInstantAccess.token;
10809
+ const email = result.authenticateManagedIdentityWithInstantAccess.email;
10810
+ setUserIdentity({
10811
+ jwt,
10812
+ id: email,
10813
+ accountId: email
10814
+ });
10815
+ if (env === "SquatchJS2") {
10816
+ const event = new CustomEvent("sq:user-registration", {
10817
+ bubbles: true,
10818
+ detail: {
10819
+ userId: email,
10820
+ accountId: email
10821
+ }
10822
+ });
10823
+ document.dispatchEvent(event);
10824
+ }
10825
+ } else {
10826
+ throw {
10827
+ name: "fraud_error",
10828
+ message: "Referral flagged as fraud."
10829
+ };
10830
+ }
10831
+ }
10832
+ return result;
10833
+ };
10834
+ return [requestAndSetUserIdentity, { loading, data, errors }];
10835
+ }
10836
+ var AuthenticateWithGoogleMutation = dist.gql`
10837
+ mutation authenticateManagedIdentityWithGoogle($idToken: String!) {
10838
+ authenticateManagedIdentityWithGoogle(
10839
+ authenticateManagedIdentityWithGoogleInput: { idToken: $idToken }
10840
+ ) {
10841
+ token
10842
+ email
10843
+ emailVerified
10844
+ sessionData
10845
+ }
10846
+ }
10847
+ `;
10848
+ function useAuthenticateWithGoogle() {
10849
+ const [request, { loading, data, errors }] = useMutation(AuthenticateWithGoogleMutation);
10850
+ const updateUserIdentity = async (v) => {
10851
+ const result = await request(v);
10852
+ if (!(result instanceof Error) && result.authenticateManagedIdentityWithGoogle) {
10853
+ const jwt = result.authenticateManagedIdentityWithGoogle.token;
10854
+ const { user } = o(jwt);
10855
+ setUserIdentity({
10856
+ jwt,
10857
+ id: user.id,
10858
+ accountId: user.accountId,
10859
+ managedIdentity: {
10860
+ email: result.authenticateManagedIdentityWithGoogle.email,
10861
+ emailVerified: result.authenticateManagedIdentityWithGoogle.emailVerified,
10862
+ sessionData: result.authenticateManagedIdentityWithGoogle.sessionData
10863
+ }
10864
+ });
10865
+ }
10866
+ return result;
10867
+ };
10868
+ return [updateUserIdentity, { loading, data, errors }];
10869
+ }
10870
+ function useDeepMemo(memoFn, key) {
10871
+ const ref2 = useRef();
10872
+ if (!ref2.current || !equal(key, ref2.current.key)) {
10873
+ ref2.current = { key, value: memoFn() };
10874
+ }
10875
+ return ref2.current.value;
10876
+ }
10877
+ function useTick() {
10878
+ return useReducer((x) => x + 1, 0);
10879
+ }
10880
+
10881
+ // src/hooks/graphql/useQuery.ts
10882
+ function deepFreeze(object) {
10883
+ const propNames = Object.getOwnPropertyNames(object);
10884
+ for (const name of propNames) {
10885
+ const value = object[name];
10886
+ if (value && typeof value === "object") {
10887
+ deepFreeze(value);
10888
+ }
10889
+ }
10890
+ return Object.freeze(object);
10891
+ }
10892
+ var initialQueryState = {
10893
+ loading: true,
10894
+ data: void 0,
10895
+ errors: void 0
10896
+ };
10897
+ function useQuery(query, variables, skip, options) {
10898
+ const [state, update] = useBaseQuery(
10899
+ query,
10900
+ initialQueryState,
10901
+ __spreadValues({
10902
+ batch: true
10903
+ }, options || {})
10904
+ );
10905
+ const [tick, forceUpdate] = useTick();
10906
+ useDeepMemo(() => {
10907
+ !skip && update(variables);
10908
+ }, [query, variables, update, tick, skip]);
10909
+ useRefreshListener({ skip, update, variables });
10910
+ return deepFreeze(__spreadProps(__spreadValues({}, state), {
10911
+ // can override props when refetching for new pagination, offset, etc
10912
+ refetch: forceUpdate
10913
+ }));
10914
+ }
10915
+ function useParentState(props) {
10916
+ const host = useHost();
10917
+ const [value, setValue] = y(
10918
+ host,
10919
+ getContextValueName(props.namespace),
10920
+ props.initialValue
10921
+ );
10922
+ y(host, getContextName(props.namespace), [
10923
+ value,
10924
+ setValue
10925
+ ]);
10926
+ return [value, setValue];
10927
+ }
10928
+ function useParent(namespace) {
10929
+ const parent = d(
10930
+ getContextName(namespace)
10931
+ );
10932
+ const parentValue = d(
10933
+ getContextValueName(namespace)
10934
+ );
10935
+ if (!parent) return [void 0, void 0];
10936
+ return [parentValue, parent[1]];
10937
+ }
10938
+ function useSetParent(namespace) {
10939
+ const parent = d(
10940
+ getContextName(namespace)
10941
+ );
10942
+ if (!parent) return void 0;
10943
+ return parent[1];
10944
+ }
10945
+ function useParentValue(namespace) {
10946
+ const parentValue = d(
10947
+ getContextValueName(namespace)
10948
+ );
10949
+ return parentValue;
10950
+ }
10951
+ function getContextValueName(namespace) {
10952
+ return namespace + "-value";
10953
+ }
10954
+ function getContextName(namespace) {
10955
+ return namespace + "-state";
10956
+ }
10957
+
10958
+ // src/hooks/graphql/useParentQuery.ts
10959
+ function useParentQuery(props) {
10960
+ const host = useHost();
10961
+ const query = useQuery(props.query, props.variables || {}, props.skip, __spreadValues({
10962
+ batch: true
10963
+ }, props.options || {}));
10964
+ const [value, setValue] = y(
10965
+ host,
10966
+ getContextValueName(props.namespace),
10967
+ query
10968
+ );
10969
+ useEffect(() => {
10970
+ if (umd.deepEqual(query, value)) return;
10971
+ setValue(query);
10972
+ }, [query, value]);
10973
+ return query;
10974
+ }
10975
+ function useParentQueryValue(namespace) {
10976
+ const parentValue = d(
10977
+ getContextValueName(namespace)
10978
+ );
10979
+ if (!parentValue)
10980
+ return {
10981
+ data: null,
10982
+ loading: true,
10983
+ refetch: () => console.warn("component still loading")
10984
+ };
10985
+ return parentValue;
10986
+ }
10987
+ function useCurrentPage() {
10988
+ const [, tick] = useTick();
10989
+ useEffect(() => {
10990
+ const cleanup = history_default.listen(() => {
10991
+ tick();
10992
+ });
10993
+ return cleanup;
10994
+ }, []);
10995
+ return history_default.location;
10996
+ }
10997
+ var navigation = history_default;
10998
+ function usePagination(pageVars) {
10999
+ const [pageState, setPageState] = useState({
11000
+ limit: pageVars.limit,
11001
+ offset: pageVars.offset
11002
+ });
11003
+ const { offset, limit } = pageState;
11004
+ const calcOffset = (limit2, page) => limit2 * page;
11005
+ const calcPage = (offset2, limit2) => Math.ceil(offset2 / limit2) || 0;
11006
+ const calcPageCount = (totalCount, limit2) => Math.ceil(totalCount / limit2) || 0;
11007
+ const setLimit = (newLimit) => {
11008
+ const newPage = calcPage(offset, newLimit);
11009
+ const newOffset = calcOffset(newLimit, newPage);
11010
+ setPageState(__spreadProps(__spreadValues({}, pageState), {
11011
+ limit: newLimit,
11012
+ offset: newOffset
11013
+ }));
11014
+ };
11015
+ const setCurrentPage = (newPage) => {
11016
+ let newOffset = calcOffset(newPage, limit);
11017
+ setPageState((pageState2) => __spreadProps(__spreadValues({}, pageState2), {
11018
+ offset: newOffset
11019
+ }));
11020
+ };
11021
+ function calculatePagination(count, totalCount) {
11022
+ const currentPage = calcPage(offset, limit);
11023
+ const pageCount = calcPageCount(totalCount, limit);
11024
+ const rangeOnPage = count === 0 ? "0" : count > 1 ? `${offset + 1}-${offset + count}` : `${offset + 1}`;
11025
+ const pageProgress = `${rangeOnPage} of ${totalCount}`;
11026
+ return { currentPage, pageCount, rangeOnPage, pageProgress };
11027
+ }
11028
+ return {
11029
+ limit,
11030
+ setLimit,
11031
+ offset,
11032
+ setCurrentPage,
11033
+ calculatePagination
11034
+ };
11035
+ }
11036
+
11037
+ // src/hooks/pagination/usePaginatedQuery.ts
11038
+ function usePaginatedQuery(query, dataPath, pageVars, extraVars = {}, skip = false) {
11039
+ var _a;
11040
+ const {
11041
+ limit,
11042
+ offset,
11043
+ setLimit,
11044
+ setCurrentPage,
11045
+ calculatePagination
11046
+ } = usePagination(pageVars);
11047
+ const variables = __spreadValues({ limit, offset }, extraVars);
11048
+ const { loading, errors, data, refetch } = useQuery(query, variables, skip);
11049
+ const envelope = dataPath(data);
11050
+ const { currentPage, pageCount, pageProgress } = calculatePagination(
11051
+ ((_a = envelope == null ? void 0 : envelope.data) == null ? void 0 : _a.length) || 0,
11052
+ (envelope == null ? void 0 : envelope.totalCount) || 0
11053
+ );
11054
+ return {
11055
+ envelope,
11056
+ states: {
11057
+ errors,
11058
+ loading,
11059
+ limit,
11060
+ currentPage,
11061
+ pageCount,
11062
+ pageProgress
11063
+ },
11064
+ callbacks: {
11065
+ refetch,
11066
+ setLimit,
11067
+ setCurrentPage
11068
+ }
11069
+ };
11070
+ }
11071
+ dist.gql`
11072
+ mutation ($eventMeta: UserAnalyticsEvent!) {
11073
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
11074
+ }
11075
+ `;
11076
+
11077
+ // src/hooks/useLoadEvent.ts
11078
+ var import_debug = __toESM(require_browser());
11079
+ var LOAD_EVENT_CONTEXT_NAME = "sq:load-event";
11080
+ (0, import_debug.default)(LOAD_EVENT_CONTEXT_NAME);
11081
+ dist.gql`
11082
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
11083
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
11084
+ }
11085
+ `;
11086
+
11087
+ // src/hooks/useForm.ts
11088
+ var import_debug2 = __toESM(require_browser());
11089
+ (0, import_debug2.default)("sq:useForm");
11090
+ dist.gql`
11091
+ query ($key: String!) {
11092
+ form(key: $key) {
11093
+ schema
11094
+ initialData {
11095
+ initialData
11096
+ isEnabled
11097
+ isEnabledErrorMessage
11098
+ }
11099
+ }
11100
+ }
11101
+ `;
11102
+ dist.gql`
11103
+ mutation ($formSubmissionInput: FormSubmissionInput!) {
11104
+ submitForm(formSubmissionInput: $formSubmissionInput) {
11105
+ success
11106
+ results {
11107
+ ... on FormHandlerSubmissionResult {
11108
+ formHandler {
11109
+ name
11110
+ endpointUrl
11111
+ integration {
11112
+ name
11113
+ }
11114
+ }
11115
+ result
11116
+ }
11117
+ ... on FormHandlerError {
11118
+ formHandler {
11119
+ name
11120
+ endpointUrl
11121
+ integration {
11122
+ name
11123
+ }
11124
+ }
11125
+ errorType
11126
+ error
11127
+ errorCode
11128
+ }
11129
+ }
11130
+ }
11131
+ }
11132
+ `;
11133
+ dist.gql`
11134
+ query ($formValidationInput: FormValidationInput!) {
11135
+ validateForm(formValidationInput: $formValidationInput) {
11136
+ valid
11137
+ results {
11138
+ ... on FormHandlerValidationResult {
11139
+ formHandler {
11140
+ name
11141
+ endpointUrl
11142
+ integration {
11143
+ name
11144
+ }
11145
+ }
11146
+ result
11147
+ }
11148
+ ... on FormHandlerError {
11149
+ formHandler {
11150
+ name
11151
+ endpointUrl
11152
+ integration {
11153
+ name
11154
+ }
11155
+ }
11156
+ errorType
11157
+ error
11158
+ errorCode
11159
+ }
11160
+ }
11161
+ }
11162
+ }
11163
+ `;
8764
11164
 
8765
- export { $e as $, B, Ee as E, Fn as F, G, H, In as I, J, L, Mn as M, Oe as O, Pe as P, Qe as Q, Rn as R, Sn as S, Te as T, U, Ve as V, Xe as X, _, je as a, useCallback as b, an as c, dist$1 as d, Q as e, Je as f, getEnvironmentSDK as g, hn as h, isDemo as i, jn as j, kn as k, ln as l, setProgramId as m, nn as n, Ue as o, En as p, Pn as q, $n as r, setUserIdentity as s, un as u, vn as v, wn as w, yn as y };
11165
+ export { useTenantAlias as A, memoizedGraphQLClient as B, useAuthenticateManagedIdentityWithInstantAccess as C, useCurrentPage as D, useRequestVerificationEmailMutation as E, useManagedIdentitySessionQuery as F, GRAPHQL_CONTEXT as G, useVerifyPasswordResetCodeMutation as H, useResetPasswordMutation as I, setProgramId as J, useLazyQuery as K, useChangePasswordMutation as L, getContextValueName as M, useParentQuery as N, useSetParent as O, useParent as P, useParentQueryValue as Q, useProgramId as a, useUserIdentity as b, useEngagementMedium as c, dist as d, useQuery as e, useMutation as f, getEnvironmentSDK as g, useRefreshDispatcher as h, isDemo as i, usePaginatedQuery as j, useParentState as k, useRequestPasswordResetEmailMutation as l, useAuthenticateWithEmailAndPasswordMutation as m, navigation as n, useAuthenticateWithGoogle as o, useRegisterWithEmailAndPasswordMutation as p, useCallback as q, useVerifyEmailMutation as r, setImplementation as s, setUserIdentity as t, useParentValue as u, useLocale as v, useRegisterViaRegistrationFormMutation as w, useHost as x, useTick as y, useToken as z };