@saasquatch/mint-components 1.13.0-40 → 1.13.0-42
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.
- package/dist/cjs/{ShadowViewAddon-44cb1a98.js → ShadowViewAddon-37f2cd8b.js} +132 -182
- package/dist/cjs/{copy-text-view-9b950efe.js → copy-text-view-67cb700e.js} +13 -12
- package/dist/cjs/{global-19fc8a7a.js → global-6fe7c678.js} +161 -10
- package/dist/cjs/index-e6bafae4.js +2227 -0
- package/dist/cjs/{index.module-57703088.js → index.module-b880d18a.js} +1196 -229
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{luxon-2926d85f.js → luxon-78820ce9.js} +1 -1
- package/dist/cjs/mint-components.cjs.js +4 -4
- package/dist/cjs/{mockRewardData-272e22d6.js → mockRewardData-d117428d.js} +1 -1
- package/dist/cjs/{re-render-35b016ed.js → re-render-050852fe.js} +2 -2
- package/dist/cjs/sqm-asset-card.cjs.entry.js +3 -3
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +404 -403
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +71 -144
- package/dist/cjs/sqm-close-button.cjs.entry.js +3 -3
- package/dist/cjs/sqm-context-router.cjs.entry.js +3 -3
- package/dist/cjs/sqm-empty_4.cjs.entry.js +6 -6
- package/dist/cjs/sqm-form-message.cjs.entry.js +2 -2
- package/dist/cjs/sqm-google-sign-in.cjs.entry.js +3 -3
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +3 -3
- package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +6 -6
- package/dist/cjs/{sqm-invoice-table-view-9dfa2a16.js → sqm-invoice-table-view-9b735809.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +9 -8
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +8 -7
- package/dist/cjs/{sqm-navigation-sidebar-item-view-9bba5f7e.js → sqm-navigation-sidebar-item-view-b76869c1.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +4 -4
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +10 -9
- package/dist/cjs/sqm-password-field.cjs.entry.js +4 -4
- package/dist/cjs/sqm-popup-container.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-email-verification-view-98d84549.js → sqm-portal-email-verification-view-39add3d2.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-google-login.cjs.entry.js +130 -0
- package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +9 -7
- package/dist/cjs/sqm-portal-login-view-761a4d8e.js +58 -0
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-profile-view-bae28ea0.js → sqm-portal-profile-view-a722b40a.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +12 -11
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-registration-form-view-bd72eeff.js → sqm-portal-registration-form-view-ebf355a6.js} +12 -11
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +8 -7
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +3 -3
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +17 -16
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +6 -6
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -4
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +62 -61
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +22 -31
- package/dist/cjs/sqm-tab.cjs.entry.js +4 -4
- package/dist/cjs/sqm-tabs.cjs.entry.js +5 -5
- package/dist/cjs/sqm-text-span.cjs.entry.js +2 -2
- package/dist/cjs/{stencil-hooks.module-3a336b0f.js → stencil-hooks.module-b248b384.js} +1 -4
- package/dist/cjs/{useChildElements-854cd1e5.js → useChildElements-e2139cb4.js} +2 -2
- package/dist/cjs/{useInstantAccessRegistration-daff8290.js → useInstantAccessRegistration-653d2aba.js} +3 -3
- package/dist/cjs/usePortalLogin-521b6d8f.js +74 -0
- package/dist/cjs/{usePortalRegistrationForm-a89d736e.js → usePortalRegistrationForm-f7dfd694.js} +5 -4
- package/dist/cjs/{useReferralTable-283d2316.js → useReferralTable-43818f78.js} +14 -13
- package/dist/cjs/{useRegistrationFormState-986b5ea1.js → useRegistrationFormState-9aa98cfa.js} +2 -2
- package/dist/cjs/{utilities-c135f16f.js → utilities-d691629b.js} +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +428 -0
- package/dist/collection/components/sqm-portal-google-login/usePortalGoogleLogin.js +0 -0
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +3 -2
- package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +2 -13
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +2 -56
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +3 -4
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +12 -11
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +1 -1
- package/dist/esm/{ShadowViewAddon-eba44767.js → ShadowViewAddon-864e3ca8.js} +107 -156
- package/dist/esm/{copy-text-view-b060162f.js → copy-text-view-4655f200.js} +3 -2
- package/dist/esm/{global-bedc4329.js → global-2f2a008c.js} +161 -10
- package/dist/esm/index-c5f8b525.js +2225 -0
- package/dist/esm/{index.module-a2989d3c.js → index.module-863d1595.js} +1194 -224
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{luxon-8d51c92b.js → luxon-e0fc3e69.js} +1 -1
- package/dist/esm/mint-components.js +4 -4
- package/dist/esm/{mockRewardData-8bd1b356.js → mockRewardData-6c2e62c8.js} +1 -1
- package/dist/esm/{re-render-268bb9c8.js → re-render-fcba2f50.js} +2 -2
- package/dist/esm/sqm-asset-card.entry.js +2 -2
- package/dist/esm/sqm-banking-info-form_16.entry.js +10 -9
- package/dist/esm/sqm-big-stat_38.entry.js +17 -90
- package/dist/esm/sqm-close-button.entry.js +2 -2
- package/dist/esm/sqm-context-router.entry.js +2 -2
- package/dist/esm/sqm-empty_4.entry.js +3 -3
- package/dist/esm/sqm-form-message.entry.js +1 -1
- package/dist/esm/sqm-google-sign-in.entry.js +2 -2
- package/dist/esm/sqm-graphql-client-provider.entry.js +2 -2
- package/dist/esm/sqm-header-logo.entry.js +1 -1
- package/dist/esm/sqm-instant-access-registration.entry.js +5 -5
- package/dist/esm/{sqm-invoice-table-view-8e2bb54a.js → sqm-invoice-table-view-c58334ce.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +4 -3
- package/dist/esm/sqm-logout-current-user.entry.js +3 -2
- package/dist/esm/{sqm-navigation-sidebar-item-view-56da6bca.js → sqm-navigation-sidebar-item-view-306c5953.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
- package/dist/esm/sqm-navigation-sidebar.entry.js +2 -2
- package/dist/esm/sqm-pagination_3.entry.js +5 -4
- package/dist/esm/sqm-password-field.entry.js +3 -3
- package/dist/esm/sqm-popup-container.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-44c8970f.js → sqm-portal-email-verification-view-d6b1ddab.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
- package/dist/esm/sqm-portal-forgot-password.entry.js +3 -3
- package/dist/esm/sqm-portal-google-login.entry.js +126 -0
- package/dist/esm/sqm-portal-google-registration-form.entry.js +8 -6
- package/dist/esm/sqm-portal-login-view-7e49609a.js +56 -0
- package/dist/esm/sqm-portal-logout.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-39039274.js → sqm-portal-profile-view-61c075cb.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +6 -5
- package/dist/esm/sqm-portal-protected-route.entry.js +2 -2
- package/dist/esm/{sqm-portal-registration-form-view-c08eafea.js → sqm-portal-registration-form-view-32c4b488.js} +12 -11
- package/dist/esm/sqm-portal-registration-form.entry.js +7 -6
- package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
- package/dist/esm/sqm-portal-verify-email.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +9 -8
- package/dist/esm/sqm-referred-registration.entry.js +5 -5
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +3 -3
- package/dist/esm/sqm-rewards-table_9.entry.js +9 -8
- package/dist/esm/sqm-stencilbook.entry.js +18 -27
- package/dist/esm/sqm-tab.entry.js +3 -3
- package/dist/esm/sqm-tabs.entry.js +4 -4
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm/{stencil-hooks.module-4bc38af4.js → stencil-hooks.module-bb10e6ff.js} +1 -1
- package/dist/esm/{useChildElements-38c11321.js → useChildElements-9d51a845.js} +2 -2
- package/dist/esm/{useInstantAccessRegistration-7255b0ca.js → useInstantAccessRegistration-b1ce1e58.js} +3 -3
- package/dist/esm/usePortalLogin-79bf5c9d.js +72 -0
- package/dist/esm/{usePortalRegistrationForm-5715c7a5.js → usePortalRegistrationForm-be236318.js} +4 -3
- package/dist/esm/{useReferralTable-d77b11f5.js → useReferralTable-4d03e881.js} +5 -4
- package/dist/esm/{useRegistrationFormState-01cdd8c7.js → useRegistrationFormState-f63404a4.js} +2 -2
- package/dist/esm/{utilities-863d06d1.js → utilities-6b8f9180.js} +2 -2
- package/dist/esm-es5/ShadowViewAddon-864e3ca8.js +1 -0
- package/dist/esm-es5/copy-text-view-4655f200.js +1 -0
- package/dist/esm-es5/global-2f2a008c.js +285 -0
- package/dist/esm-es5/index-c5f8b525.js +1 -0
- package/dist/esm-es5/index.module-863d1595.js +53 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{luxon-8d51c92b.js → luxon-e0fc3e69.js} +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{mockRewardData-8bd1b356.js → mockRewardData-6c2e62c8.js} +1 -1
- package/dist/esm-es5/{re-render-268bb9c8.js → re-render-fcba2f50.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message.entry.js +1 -1
- package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-8e2bb54a.js → sqm-invoice-table-view-c58334ce.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-item-view-56da6bca.js → sqm-navigation-sidebar-item-view-306c5953.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-44c8970f.js → sqm-portal-email-verification-view-d6b1ddab.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-google-login.entry.js +1 -0
- package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-login-view-7e49609a.js +1 -0
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-39039274.js → sqm-portal-profile-view-61c075cb.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form-view-32c4b488.js +1 -0
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/{stencil-hooks.module-4bc38af4.js → stencil-hooks.module-bb10e6ff.js} +1 -1
- package/dist/esm-es5/useChildElements-9d51a845.js +1 -0
- package/dist/esm-es5/{useInstantAccessRegistration-7255b0ca.js → useInstantAccessRegistration-b1ce1e58.js} +1 -1
- package/dist/esm-es5/usePortalLogin-79bf5c9d.js +1 -0
- package/dist/esm-es5/usePortalRegistrationForm-be236318.js +1 -0
- package/dist/esm-es5/useReferralTable-4d03e881.js +1 -0
- package/dist/esm-es5/{useRegistrationFormState-01cdd8c7.js → useRegistrationFormState-f63404a4.js} +1 -1
- package/dist/esm-es5/{utilities-863d06d1.js → utilities-6b8f9180.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-04172660.entry.js +1 -0
- package/dist/mint-components/p-0700c219.system.entry.js +1 -0
- package/dist/mint-components/{p-1c5cffae.js → p-07606410.js} +1 -1
- package/dist/mint-components/p-0cb8e830.entry.js +1 -0
- package/dist/mint-components/{p-5bedb58c.js → p-0d2cd2a9.js} +1 -1
- package/dist/mint-components/p-0ebab63e.system.js +1 -0
- package/dist/mint-components/{p-8056fd5b.system.entry.js → p-0f91825b.system.entry.js} +1 -1
- package/dist/mint-components/p-11f8a69e.system.js +53 -0
- package/dist/mint-components/p-1340e1f7.js +391 -0
- package/dist/mint-components/p-1b448f3c.system.entry.js +1 -0
- package/dist/mint-components/p-1bbbaae1.entry.js +1 -0
- package/dist/mint-components/p-1dc033fc.entry.js +1 -0
- package/dist/mint-components/{p-3972037c.system.entry.js → p-1df12a3a.system.entry.js} +1 -1
- package/dist/mint-components/{p-bd4810c7.system.entry.js → p-1f969054.system.entry.js} +1 -1
- package/dist/mint-components/{p-8d77feee.js → p-1f98e479.js} +1 -1
- package/dist/mint-components/{p-57bcf2d0.system.entry.js → p-220ab3d5.system.entry.js} +1 -1
- package/dist/mint-components/{p-857947fa.system.entry.js → p-231def02.system.entry.js} +1 -1
- package/dist/mint-components/{p-4ae54b04.entry.js → p-2857247a.entry.js} +1 -1
- package/dist/mint-components/{p-48135f99.system.js → p-28bb7dca.system.js} +2 -2
- package/dist/mint-components/{p-b9d17fa1.entry.js → p-2a543e93.entry.js} +3 -3
- package/dist/mint-components/p-2c26f787.system.entry.js +1 -0
- package/dist/mint-components/p-2def85b5.system.js +1 -0
- package/dist/mint-components/{p-a4a5beb5.system.entry.js → p-30e2f7d0.system.entry.js} +1 -1
- package/dist/mint-components/p-3205d5e4.system.entry.js +1 -0
- package/dist/mint-components/{p-75f50e5a.entry.js → p-35287ac8.entry.js} +1 -1
- package/dist/mint-components/p-37d6e0ec.entry.js +1 -0
- package/dist/mint-components/{p-f2fd1910.system.js → p-3b51a63e.system.js} +22 -22
- package/dist/mint-components/{p-79ea1597.system.entry.js → p-3f3accb6.system.entry.js} +1 -1
- package/dist/mint-components/{p-380bfde1.entry.js → p-432ca81a.entry.js} +1 -1
- package/dist/mint-components/{p-8413ade9.system.js → p-457d9d1d.system.js} +1 -1
- package/dist/mint-components/{p-35698aaa.system.js → p-49534fa6.system.js} +1 -1
- package/dist/mint-components/p-49e4c6e3.js +13 -0
- package/dist/mint-components/p-4f9f85e9.system.js +1 -0
- package/dist/mint-components/p-546c3b82.system.js +1 -0
- package/dist/mint-components/{p-faba3198.entry.js → p-5567b408.entry.js} +1 -1
- package/dist/mint-components/p-558141b7.entry.js +9 -0
- package/dist/mint-components/{p-3bdd338c.system.js → p-558fd481.system.js} +1 -1
- package/dist/mint-components/{p-2ab3b8d6.js → p-5e8d57ba.js} +3 -3
- package/dist/mint-components/p-5ef1b48a.system.entry.js +1 -0
- package/dist/mint-components/p-6094ba6f.entry.js +11 -0
- package/dist/mint-components/{p-2126e1e6.entry.js → p-6529dfc7.entry.js} +1 -1
- package/dist/mint-components/{p-8975c2be.entry.js → p-65af5296.entry.js} +3 -3
- package/dist/mint-components/{p-09c5e3ee.system.js → p-697dd7e7.system.js} +1 -1
- package/dist/mint-components/{p-046f4631.system.js → p-6ba5d2b9.system.js} +1 -1
- package/dist/mint-components/p-6bcb0866.entry.js +13 -0
- package/dist/mint-components/{p-19bc3406.system.entry.js → p-6bcfb9cf.system.entry.js} +1 -1
- package/dist/mint-components/p-6c6a7851.js +1 -0
- package/dist/mint-components/p-6c6edca0.system.entry.js +1 -0
- package/dist/mint-components/{p-1b3ab15a.system.entry.js → p-6cc9ec64.system.entry.js} +1 -1
- package/dist/mint-components/p-76ba0be8.js +1 -0
- package/dist/mint-components/{p-31a691af.js → p-78454d0a.js} +1 -1
- package/dist/mint-components/p-793d2130.js +1 -0
- package/dist/mint-components/{p-571c451e.entry.js → p-7957b8c3.entry.js} +1 -1
- package/dist/mint-components/{p-4f45be94.system.js → p-7a1f55af.system.js} +1 -1
- package/dist/mint-components/{p-492fdaf9.js → p-7bde0cf0.js} +1 -1
- package/dist/mint-components/p-7f65b53e.system.entry.js +1 -0
- package/dist/mint-components/p-851c9fe2.system.entry.js +1 -0
- package/dist/mint-components/{p-988ea164.system.entry.js → p-8793aebf.system.entry.js} +1 -1
- package/dist/mint-components/{p-2bbff88f.entry.js → p-879cf5af.entry.js} +1 -1
- package/dist/mint-components/{p-cd651f81.js → p-8b34d321.js} +1 -1
- package/dist/mint-components/{p-1ef299d7.js → p-8c4cbcde.js} +4 -4
- package/dist/mint-components/{p-bc2fdf20.entry.js → p-8d49ad11.entry.js} +16 -16
- package/dist/mint-components/{p-7dabdca6.system.entry.js → p-97ef59a8.system.entry.js} +1 -1
- package/dist/mint-components/p-99053795.entry.js +1 -0
- package/dist/mint-components/{p-6de85677.js → p-9b0c0d2e.js} +1 -1
- package/dist/mint-components/p-9f4dd5f8.system.entry.js +1 -0
- package/dist/mint-components/p-a0ba1119.system.entry.js +1 -0
- package/dist/mint-components/{p-e544bb9a.entry.js → p-a1a22146.entry.js} +1 -1
- package/dist/mint-components/p-a2e9c945.entry.js +1 -0
- package/dist/mint-components/p-a765b696.system.js +1 -0
- package/dist/mint-components/{p-a21d1a30.system.entry.js → p-a7cac365.system.entry.js} +1 -1
- package/dist/mint-components/{p-506679e9.js → p-a9c24c77.js} +153 -153
- package/dist/mint-components/{p-aee674c8.entry.js → p-ab3dc379.entry.js} +1 -1
- package/dist/mint-components/p-acef9f8b.entry.js +1 -0
- package/dist/mint-components/p-afee1c9d.system.entry.js +1 -0
- package/dist/mint-components/{p-aaeaff1a.system.entry.js → p-b494d7ca.system.entry.js} +1 -1
- package/dist/mint-components/{p-ac2b7eb8.system.js → p-b4cfad1f.system.js} +1 -1
- package/dist/mint-components/{p-b207beeb.entry.js → p-b583ae26.entry.js} +1 -1
- package/dist/mint-components/p-b93047d2.entry.js +1 -0
- package/dist/mint-components/p-bab24c42.system.js +1 -0
- package/dist/mint-components/p-bb0f585c.system.js +1 -0
- package/dist/mint-components/p-bcc4a18b.system.entry.js +1 -0
- package/dist/mint-components/p-bd8beca3.js +1 -0
- package/dist/mint-components/p-c1371461.system.entry.js +1 -0
- package/dist/mint-components/{p-726a9924.js → p-c45b3e78.js} +1 -1
- package/dist/mint-components/p-c6cbe2d5.system.js +1 -0
- package/dist/mint-components/p-c7570a8d.system.js +1 -0
- package/dist/mint-components/p-c9f568b2.js +1 -0
- package/dist/mint-components/p-ca0f7772.entry.js +1 -0
- package/dist/mint-components/{p-2dc5e60a.entry.js → p-cca54a99.entry.js} +1 -1
- package/dist/mint-components/{p-ca740238.system.entry.js → p-cfdd5894.system.entry.js} +1 -1
- package/dist/mint-components/p-d0091b40.entry.js +1 -0
- package/dist/mint-components/{p-9f231a48.system.entry.js → p-d10037c5.system.entry.js} +1 -1
- package/dist/mint-components/{p-f9de8a59.system.js → p-d1608ef4.system.js} +1 -1
- package/dist/mint-components/{p-f32c8cb5.entry.js → p-d3b9ccb7.entry.js} +1 -1
- package/dist/mint-components/{p-1833c4f5.js → p-d9b04935.js} +1 -1
- package/dist/mint-components/p-dbcb5359.js +1 -0
- package/dist/mint-components/{p-b114e746.entry.js → p-dd16dde6.entry.js} +1 -1
- package/dist/mint-components/{p-635aaf11.system.entry.js → p-dd170c45.system.entry.js} +1 -1
- package/dist/mint-components/{p-28042d23.entry.js → p-de524512.entry.js} +10 -10
- package/dist/mint-components/p-de6b3ed7.system.entry.js +1 -0
- package/dist/mint-components/p-eb333400.entry.js +1 -0
- package/dist/mint-components/p-edcc6bdf.js +42 -0
- package/dist/mint-components/p-ee2bf706.system.js +1 -0
- package/dist/mint-components/p-ef6f9d3f.entry.js +1 -0
- package/dist/mint-components/{p-f4a1dc19.entry.js → p-ef848304.entry.js} +1 -1
- package/dist/mint-components/{p-f0c23e81.system.entry.js → p-efe87bd6.system.entry.js} +1 -1
- package/dist/mint-components/{p-cd480e3f.entry.js → p-f065a5d3.entry.js} +3 -3
- package/dist/mint-components/{p-9a16a3d8.system.entry.js → p-f0c830ec.system.entry.js} +1 -1
- package/dist/mint-components/p-f0d145d4.system.js +1 -0
- package/dist/mint-components/p-f3a4ed64.entry.js +1 -0
- package/dist/mint-components/p-f41cf5f2.system.entry.js +1 -0
- package/dist/mint-components/{p-7989a098.system.entry.js → p-f676b27e.system.entry.js} +1 -1
- package/dist/mint-components/p-f8c32c82.system.entry.js +1 -0
- package/dist/mint-components/{p-6d9e52c7.system.js → p-fa43f96c.system.js} +1 -1
- package/dist/mint-components/p-fbbc27c5.system.entry.js +1 -0
- package/dist/mint-components/{p-81665df6.system.entry.js → p-fe65104b.system.entry.js} +1 -1
- package/dist/mint-components/{p-618e1342.entry.js → p-fe75c80f.entry.js} +1 -1
- package/dist/mint-components/p-feb44492.js +1 -0
- package/dist/types/components/sqm-portal-google-login/sqm-portal-google-login.d.ts +74 -0
- package/dist/types/components/sqm-portal-google-login/usePortalGoogleLogin.d.ts +0 -0
- package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +0 -9
- package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +2 -1
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +1 -0
- package/dist/types/components.d.ts +134 -17
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/sqm-portal-google-registration-form/small-views/RegistrationFieldsView.js +0 -86
- package/dist/esm-es5/ShadowViewAddon-eba44767.js +0 -1
- package/dist/esm-es5/copy-text-view-b060162f.js +0 -1
- package/dist/esm-es5/global-bedc4329.js +0 -285
- package/dist/esm-es5/index.module-a2989d3c.js +0 -1
- package/dist/esm-es5/sqm-portal-registration-form-view-c08eafea.js +0 -1
- package/dist/esm-es5/useChildElements-38c11321.js +0 -1
- package/dist/esm-es5/usePortalRegistrationForm-5715c7a5.js +0 -1
- package/dist/esm-es5/useReferralTable-d77b11f5.js +0 -1
- package/dist/mint-components/p-0873eaa8.entry.js +0 -1
- package/dist/mint-components/p-0aa62b64.entry.js +0 -1
- package/dist/mint-components/p-0c5dae79.entry.js +0 -1
- package/dist/mint-components/p-0e53c59e.system.js +0 -1
- package/dist/mint-components/p-168a3298.entry.js +0 -1
- package/dist/mint-components/p-16c7bfda.js +0 -391
- package/dist/mint-components/p-1b0c58bc.system.entry.js +0 -1
- package/dist/mint-components/p-24c4e0b8.system.entry.js +0 -1
- package/dist/mint-components/p-30108c0e.js +0 -1
- package/dist/mint-components/p-35a20e65.system.entry.js +0 -1
- package/dist/mint-components/p-36233648.js +0 -1
- package/dist/mint-components/p-39b1a7fe.js +0 -1
- package/dist/mint-components/p-3ec660e9.js +0 -1
- package/dist/mint-components/p-3f6e0197.system.entry.js +0 -1
- package/dist/mint-components/p-40e99b24.js +0 -1
- package/dist/mint-components/p-4448febd.entry.js +0 -1
- package/dist/mint-components/p-45436d5a.entry.js +0 -1
- package/dist/mint-components/p-46ab5f80.system.js +0 -1
- package/dist/mint-components/p-53aaa0a4.entry.js +0 -1
- package/dist/mint-components/p-550ef977.js +0 -13
- package/dist/mint-components/p-7166caa6.system.js +0 -1
- package/dist/mint-components/p-731aa5c6.system.entry.js +0 -1
- package/dist/mint-components/p-749c7c9c.system.js +0 -1
- package/dist/mint-components/p-7bcf4467.system.entry.js +0 -1
- package/dist/mint-components/p-7cb919d4.system.entry.js +0 -1
- package/dist/mint-components/p-80fc549b.entry.js +0 -1
- package/dist/mint-components/p-85c49452.system.entry.js +0 -1
- package/dist/mint-components/p-868f176e.entry.js +0 -1
- package/dist/mint-components/p-92a25556.system.entry.js +0 -1
- package/dist/mint-components/p-95c64cfd.system.js +0 -1
- package/dist/mint-components/p-9a0c3ed9.system.entry.js +0 -1
- package/dist/mint-components/p-9b779add.entry.js +0 -1
- package/dist/mint-components/p-9e49479a.entry.js +0 -13
- package/dist/mint-components/p-9fc19501.system.entry.js +0 -1
- package/dist/mint-components/p-a8524459.system.js +0 -1
- package/dist/mint-components/p-b58661b3.system.js +0 -1
- package/dist/mint-components/p-b611eefd.entry.js +0 -1
- package/dist/mint-components/p-c450a678.entry.js +0 -9
- package/dist/mint-components/p-c470caf6.entry.js +0 -11
- package/dist/mint-components/p-c4b21562.system.entry.js +0 -1
- package/dist/mint-components/p-ca04737a.entry.js +0 -1
- package/dist/mint-components/p-cf505e92.system.js +0 -1
- package/dist/mint-components/p-d671e44e.system.js +0 -1
- package/dist/mint-components/p-de9afac2.system.entry.js +0 -1
- package/dist/mint-components/p-e0b344fb.entry.js +0 -1
- package/dist/mint-components/p-ea2257f8.system.entry.js +0 -1
- package/dist/mint-components/p-ebdcea27.system.entry.js +0 -1
- package/dist/mint-components/p-fe4a9dfe.system.entry.js +0 -1
- package/dist/types/components/sqm-portal-google-registration-form/small-views/RegistrationFieldsView.d.ts +0 -31
|
@@ -1,204 +1,207 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const index = require('./index-a29c60ef.js');
|
|
4
|
+
const stencilHooks_module = require('./stencil-hooks.module-b248b384.js');
|
|
4
5
|
|
|
5
6
|
const useCallback = (fn, inputs) => stencilHooks_module.useMemo(() => fn, inputs);
|
|
6
7
|
|
|
7
8
|
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";
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
case '[object
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
case '[object
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
case '[object
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
case '[object
|
|
112
|
-
case '[object
|
|
113
|
-
case '[object
|
|
114
|
-
case '[object
|
|
115
|
-
case '[object
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
case '[object
|
|
133
|
-
case '[object
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
//
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
10
|
+
function t$1(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i);}}function n$1(n,e,i){return e&&t$1(n.prototype,e),i&&t$1(n,i),n}var s=function(){function t(t){var n=this,e=this;this._status="Initial",this.onChange=function(t,n){e.options.onChange&&e.options.onChange(t,n);},this.onConnect=function(t){try{return n.status="Connected",n.options.onChange&&n.options.onChange(t,t),Promise.resolve(new Promise(function(t){n.resolvePromise=t;}))}catch(t){return Promise.reject(t)}},this.onDisconnect=function(){e.status="Connecting",e.start();},this.options=t;}var e=t.prototype;return e.start=function(){var t=this,n=0;this.status="Connecting";var e=function(){return t.status},i=a(this.options.attempts)||10,o=function(){if("Connected"!==e()){var o=new CustomEvent(t.options.contextName,{bubbles:!0,cancelable:!0,composed:!0,detail:{onConnect:t.onConnect,onChange:t.onChange,onDisconnect:t.onDisconnect}});a(t.options.element).dispatchEvent(o),"Connected"!==e()?++n>=i&&(t._interval&&clearInterval(t._interval),t.status="Timeout"):"Connected"===e()&&t._interval&&clearInterval(t._interval);}};return (a(this.options.pollingMs)||100)>0&&i>1&&(this._interval=setInterval(o,a(this.options.pollingMs)||100)),o(),this},e.stop=function(){return this._interval&&clearInterval(this._interval),this.resolvePromise&&this.resolvePromise(),this.status="Initial",this},n$1(t,[{key:"status",set:function(t){this._status=t,this.options.onStatus&&this.options.onStatus(t);},get:function(){return this._status}}]),t}(),c=function(){function t(t){var n=this;this.__listeners=[],this.connectListener=function(t){try{t.stopPropagation(),n.__listeners=[].concat(n.__listeners,[t.detail]);var e=function(e,i){try{var o=Promise.resolve(t.detail.onConnect(n.__current)).then(function(){});}catch(t){return i(!0,t)}return o&&o.then?o.then(i.bind(null,!1),i.bind(null,!0)):i(!1,o)}(0,function(e,i){var o,r;if(n.__listeners=(r=(o=n.__listeners).indexOf(t.detail),o.slice(0,r).concat(o.slice(r+1,o.length))),e)throw i;return i});return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},this.options=t,this.__current=a(t.initialState);}var e=t.prototype;return e.start=function(){return a(this.options.element).addEventListener(this.options.contextName,this.connectListener),this},e.stop=function(){return a(this.options.element).removeEventListener(this.options.contextName,this.connectListener),this.__listeners.map(function(t){t.onDisconnect();}),this.__listeners=[],this},n$1(t,[{key:"context",set:function(t){var n=this.__current;this.__current=t,this.__listeners.forEach(function(e){return e.onChange(t,n)});},get:function(){return a(this.__current)}},{key:"listeners",get:function(){return Object.freeze([].concat(this.__listeners))}}]),t}();function a(t){return "function"==typeof typeof t?t():t}
|
|
11
|
+
|
|
12
|
+
var _a = Object.prototype, toString = _a.toString, hasOwnProperty = _a.hasOwnProperty;
|
|
13
|
+
var fnToStr = Function.prototype.toString;
|
|
14
|
+
var previousComparisons = new Map();
|
|
15
|
+
/**
|
|
16
|
+
* Performs a deep equality check on two JavaScript values, tolerating cycles.
|
|
17
|
+
*/
|
|
18
|
+
function equal(a, b) {
|
|
19
|
+
try {
|
|
20
|
+
return check(a, b);
|
|
21
|
+
}
|
|
22
|
+
finally {
|
|
23
|
+
previousComparisons.clear();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function check(a, b) {
|
|
27
|
+
// If the two values are strictly equal, our job is easy.
|
|
28
|
+
if (a === b) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
// Object.prototype.toString returns a representation of the runtime type of
|
|
32
|
+
// the given value that is considerably more precise than typeof.
|
|
33
|
+
var aTag = toString.call(a);
|
|
34
|
+
var bTag = toString.call(b);
|
|
35
|
+
// If the runtime types of a and b are different, they could maybe be equal
|
|
36
|
+
// under some interpretation of equality, but for simplicity and performance
|
|
37
|
+
// we just return false instead.
|
|
38
|
+
if (aTag !== bTag) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
switch (aTag) {
|
|
42
|
+
case '[object Array]':
|
|
43
|
+
// Arrays are a lot like other objects, but we can cheaply compare their
|
|
44
|
+
// lengths as a short-cut before comparing their elements.
|
|
45
|
+
if (a.length !== b.length)
|
|
46
|
+
return false;
|
|
47
|
+
// Fall through to object case...
|
|
48
|
+
case '[object Object]': {
|
|
49
|
+
if (previouslyCompared(a, b))
|
|
50
|
+
return true;
|
|
51
|
+
var aKeys = definedKeys(a);
|
|
52
|
+
var bKeys = definedKeys(b);
|
|
53
|
+
// If `a` and `b` have a different number of enumerable keys, they
|
|
54
|
+
// must be different.
|
|
55
|
+
var keyCount = aKeys.length;
|
|
56
|
+
if (keyCount !== bKeys.length)
|
|
57
|
+
return false;
|
|
58
|
+
// Now make sure they have the same keys.
|
|
59
|
+
for (var k = 0; k < keyCount; ++k) {
|
|
60
|
+
if (!hasOwnProperty.call(b, aKeys[k])) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// Finally, check deep equality of all child properties.
|
|
65
|
+
for (var k = 0; k < keyCount; ++k) {
|
|
66
|
+
var key = aKeys[k];
|
|
67
|
+
if (!check(a[key], b[key])) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
case '[object Error]':
|
|
74
|
+
return a.name === b.name && a.message === b.message;
|
|
75
|
+
case '[object Number]':
|
|
76
|
+
// Handle NaN, which is !== itself.
|
|
77
|
+
if (a !== a)
|
|
78
|
+
return b !== b;
|
|
79
|
+
// Fall through to shared +a === +b case...
|
|
80
|
+
case '[object Boolean]':
|
|
81
|
+
case '[object Date]':
|
|
82
|
+
return +a === +b;
|
|
83
|
+
case '[object RegExp]':
|
|
84
|
+
case '[object String]':
|
|
85
|
+
return a == "" + b;
|
|
86
|
+
case '[object Map]':
|
|
87
|
+
case '[object Set]': {
|
|
88
|
+
if (a.size !== b.size)
|
|
89
|
+
return false;
|
|
90
|
+
if (previouslyCompared(a, b))
|
|
91
|
+
return true;
|
|
92
|
+
var aIterator = a.entries();
|
|
93
|
+
var isMap = aTag === '[object Map]';
|
|
94
|
+
while (true) {
|
|
95
|
+
var info = aIterator.next();
|
|
96
|
+
if (info.done)
|
|
97
|
+
break;
|
|
98
|
+
// If a instanceof Set, aValue === aKey.
|
|
99
|
+
var _a = info.value, aKey = _a[0], aValue = _a[1];
|
|
100
|
+
// So this works the same way for both Set and Map.
|
|
101
|
+
if (!b.has(aKey)) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
// However, we care about deep equality of values only when dealing
|
|
105
|
+
// with Map structures.
|
|
106
|
+
if (isMap && !check(aValue, b.get(aKey))) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
case '[object Uint16Array]':
|
|
113
|
+
case '[object Uint8Array]': // Buffer, in Node.js.
|
|
114
|
+
case '[object Uint32Array]':
|
|
115
|
+
case '[object Int32Array]':
|
|
116
|
+
case '[object Int8Array]':
|
|
117
|
+
case '[object Int16Array]':
|
|
118
|
+
case '[object ArrayBuffer]':
|
|
119
|
+
// DataView doesn't need these conversions, but the equality check is
|
|
120
|
+
// otherwise the same.
|
|
121
|
+
a = new Uint8Array(a);
|
|
122
|
+
b = new Uint8Array(b);
|
|
123
|
+
// Fall through...
|
|
124
|
+
case '[object DataView]': {
|
|
125
|
+
var len = a.byteLength;
|
|
126
|
+
if (len === b.byteLength) {
|
|
127
|
+
while (len-- && a[len] === b[len]) {
|
|
128
|
+
// Keep looping as long as the bytes are equal.
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return len === -1;
|
|
132
|
+
}
|
|
133
|
+
case '[object AsyncFunction]':
|
|
134
|
+
case '[object GeneratorFunction]':
|
|
135
|
+
case '[object AsyncGeneratorFunction]':
|
|
136
|
+
case '[object Function]': {
|
|
137
|
+
var aCode = fnToStr.call(a);
|
|
138
|
+
if (aCode !== fnToStr.call(b)) {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
// We consider non-native functions equal if they have the same code
|
|
142
|
+
// (native functions require === because their code is censored).
|
|
143
|
+
// Note that this behavior is not entirely sound, since !== function
|
|
144
|
+
// objects with the same code can behave differently depending on
|
|
145
|
+
// their closure scope. However, any function can behave differently
|
|
146
|
+
// depending on the values of its input arguments (including this)
|
|
147
|
+
// and its calling context (including its closure scope), even
|
|
148
|
+
// though the function object is === to itself; and it is entirely
|
|
149
|
+
// possible for functions that are not === to behave exactly the
|
|
150
|
+
// same under all conceivable circumstances. Because none of these
|
|
151
|
+
// factors are statically decidable in JavaScript, JS function
|
|
152
|
+
// equality is not well-defined. This ambiguity allows us to
|
|
153
|
+
// consider the best possible heuristic among various imperfect
|
|
154
|
+
// options, and equating non-native functions that have the same
|
|
155
|
+
// code has enormous practical benefits, such as when comparing
|
|
156
|
+
// functions that are repeatedly passed as fresh function
|
|
157
|
+
// expressions within objects that are otherwise deeply equal. Since
|
|
158
|
+
// any function created from the same syntactic expression (in the
|
|
159
|
+
// same code location) will always stringify to the same code
|
|
160
|
+
// according to fnToStr.call, we can reasonably expect these
|
|
161
|
+
// repeatedly passed function expressions to have the same code, and
|
|
162
|
+
// thus behave "the same" (with all the caveats mentioned above),
|
|
163
|
+
// even though the runtime function objects are !== to one another.
|
|
164
|
+
return !endsWith(aCode, nativeCodeSuffix);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// Otherwise the values are not equal.
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
function definedKeys(obj) {
|
|
171
|
+
// Remember that the second argument to Array.prototype.filter will be
|
|
172
|
+
// used as `this` within the callback function.
|
|
173
|
+
return Object.keys(obj).filter(isDefinedKey, obj);
|
|
174
|
+
}
|
|
175
|
+
function isDefinedKey(key) {
|
|
176
|
+
return this[key] !== void 0;
|
|
177
|
+
}
|
|
178
|
+
var nativeCodeSuffix = "{ [native code] }";
|
|
179
|
+
function endsWith(full, suffix) {
|
|
180
|
+
var fromIndex = full.length - suffix.length;
|
|
181
|
+
return fromIndex >= 0 &&
|
|
182
|
+
full.indexOf(suffix, fromIndex) === fromIndex;
|
|
183
|
+
}
|
|
184
|
+
function previouslyCompared(a, b) {
|
|
185
|
+
// Though cyclic references can make an object graph appear infinite from the
|
|
186
|
+
// perspective of a depth-first traversal, the graph still contains a finite
|
|
187
|
+
// number of distinct object references. We use the previousComparisons cache
|
|
188
|
+
// to avoid comparing the same pair of object references more than once, which
|
|
189
|
+
// guarantees termination (even if we end up comparing every object in one
|
|
190
|
+
// graph to every object in the other graph, which is extremely unlikely),
|
|
191
|
+
// while still allowing weird isomorphic structures (like rings with different
|
|
192
|
+
// lengths) a chance to pass the equality test.
|
|
193
|
+
var bSet = previousComparisons.get(a);
|
|
194
|
+
if (bSet) {
|
|
195
|
+
// Return true here because we can be sure false will be returned somewhere
|
|
196
|
+
// else if the objects are not equivalent.
|
|
197
|
+
if (bSet.has(b))
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
previousComparisons.set(a, bSet = new Set);
|
|
202
|
+
}
|
|
203
|
+
bSet.add(b);
|
|
204
|
+
return false;
|
|
202
205
|
}
|
|
203
206
|
|
|
204
207
|
var __defProp = Object.defineProperty;
|
|
@@ -518,7 +521,7 @@ function lazilyStartLocaleContext() {
|
|
|
518
521
|
debug3("Creating locale context provider");
|
|
519
522
|
const locale = ((_a = window.widgetIdent) == null ? void 0 : _a.locale) ?? validateLocale(navigator.language.replaceAll("-", "_"));
|
|
520
523
|
debug3("initializing with locale:", locale);
|
|
521
|
-
globalProvider = new
|
|
524
|
+
globalProvider = new c({
|
|
522
525
|
element: document.documentElement,
|
|
523
526
|
initialState: locale,
|
|
524
527
|
contextName: LOCALE_CONTEXT_NAME
|
|
@@ -579,7 +582,7 @@ var userContextListenerDiv = (() => {
|
|
|
579
582
|
}
|
|
580
583
|
return div;
|
|
581
584
|
})();
|
|
582
|
-
var userContextListenerForLocale = new
|
|
585
|
+
var userContextListenerForLocale = new s({
|
|
583
586
|
contextName: USER_CONTEXT_NAME,
|
|
584
587
|
element: userContextListenerDiv,
|
|
585
588
|
onChange: async (next) => {
|
|
@@ -610,7 +613,7 @@ function lazilyStartUserContext() {
|
|
|
610
613
|
let globalProvider = window.squatchUserIdentity;
|
|
611
614
|
if (!globalProvider) {
|
|
612
615
|
debug6("Creating user context provider");
|
|
613
|
-
globalProvider = new
|
|
616
|
+
globalProvider = new c({
|
|
614
617
|
element: document.documentElement,
|
|
615
618
|
initialState: _getInitialValue(),
|
|
616
619
|
contextName: USER_CONTEXT_NAME
|
|
@@ -634,6 +637,7 @@ function userIdentityFromJwt(jwt) {
|
|
|
634
637
|
const exp = decoded.exp;
|
|
635
638
|
let userId = void 0;
|
|
636
639
|
let accountId = void 0;
|
|
640
|
+
let email = void 0;
|
|
637
641
|
if (isDecodedWidgetAPIJWT(decoded)) {
|
|
638
642
|
const matches = decoded.sub.match(/(.*):(.*)@(.*):users/);
|
|
639
643
|
if (matches == null ? void 0 : matches[1])
|
|
@@ -643,6 +647,7 @@ function userIdentityFromJwt(jwt) {
|
|
|
643
647
|
} else if (isDecodedSquatchJWT(decoded)) {
|
|
644
648
|
accountId = decoded.user.accountId;
|
|
645
649
|
userId = decoded.user.id;
|
|
650
|
+
email = decoded.user.email;
|
|
646
651
|
}
|
|
647
652
|
if (!userId || !accountId) {
|
|
648
653
|
debug6("No user information");
|
|
@@ -655,6 +660,7 @@ function userIdentityFromJwt(jwt) {
|
|
|
655
660
|
return {
|
|
656
661
|
id: userId,
|
|
657
662
|
accountId,
|
|
663
|
+
email,
|
|
658
664
|
jwt
|
|
659
665
|
};
|
|
660
666
|
} catch (e) {
|
|
@@ -676,6 +682,7 @@ function _getInitialValue() {
|
|
|
676
682
|
return {
|
|
677
683
|
id: sdk.widgetIdent.userId,
|
|
678
684
|
accountId: sdk.widgetIdent.accountId,
|
|
685
|
+
email: sdk.widgetIdent.email,
|
|
679
686
|
jwt: sdk.widgetIdent.token
|
|
680
687
|
};
|
|
681
688
|
case "SquatchPortal":
|
|
@@ -723,7 +730,7 @@ function lazilyStartProgramContext() {
|
|
|
723
730
|
let globalProvider = window.squatchProgramId;
|
|
724
731
|
if (!globalProvider) {
|
|
725
732
|
debug7("Creating program context provider");
|
|
726
|
-
globalProvider = new
|
|
733
|
+
globalProvider = new c({
|
|
727
734
|
element: document.documentElement,
|
|
728
735
|
initialState: ((_a = window.widgetIdent) == null ? void 0 : _a.programId) || void 0,
|
|
729
736
|
contextName: PROGRAM_CONTEXT_NAME
|
|
@@ -740,6 +747,8 @@ function setProgramId(programId) {
|
|
|
740
747
|
}
|
|
741
748
|
}
|
|
742
749
|
|
|
750
|
+
function c$1(){return (c$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var u=1e3,C=60*u,l=60*C,d=24*l,f=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\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(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*l;case"minutes":case"minute":case"mins":case"min":case"m":return n*C;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=d?g(e,t,d,"day"):t>=l?g(e,t,l,"hour"):t>=C?g(e,t,C,"minute"):t>=u?g(e,t,u,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=d?Math.round(e/d)+"d":t>=l?Math.round(e/l)+"h":t>=C?Math.round(e/C)+"m":t>=u?Math.round(e/u)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function g(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}var p,m=(function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(o=r));}),t.splice(o,0,n);},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug");}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.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+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.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`."));}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=function(e){function t(e){let r,o=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date);n.diff=o-(r||o),n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return "%";a++;const s=t.formatters[o];return "function"==typeof s&&(r=s.call(n,e[a]),e.splice(a,1),a--),r}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e);}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?t.enabled(e):o,set:e=>{o=e;}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));},t.enabled=function(e){if("*"===e[e.length-1])return !0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return !1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return !0;return !1},t.humanize=f,t.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(n=>{t[n]=e[n];}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(p={exports:{}},p.exports),p.exports)("useDomContext");function h(e,n,i){void 0===i&&(i={});var u=stencilHooks_module.useRef(void 0),C=stencilHooks_module.useState(void 0),l=C[0],d=C[1],f=stencilHooks_module.useMemo(function(){var r;try{(r=new s(c$1({contextName:n,element:e,onChange:function(e){u&&(u.current=e),d(e);}},i))).start();}catch(e){m("Listener failed to start",e);}return m("Listener initialized",r),{listener:r}},[n,u]).listener;return stencilHooks_module.useEffect(function(){return m("Listener starting (or restarting)",f),f.start(),function(){m("Listener stopping (or restopping)",f),f.stop();}},[f,e.isConnected]),l||(null==u?void 0:u.current)}function y(e,t,r){var o=stencilHooks_module.useMemo(function(){var o=new c({contextName:t,element:e,initialState:r});return o.start(),m("Provider initialized",o),o},[t,e]);stencilHooks_module.useEffect(function(){return m("Provider starting (or restarting)",o),o.start(),function(){m("Provider stopping (or re-stopping)",o),o.stop();}},[o,e.isConnected]);var c$1=stencilHooks_module.useReducer(function(e,t){var n;return m("New context value",t),n="function"==typeof t?t(o.context):t,o.context=n,o.context},o.context);return [c$1[0],c$1[1],o]}
|
|
751
|
+
|
|
743
752
|
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); }
|
|
744
753
|
|
|
745
754
|
/**
|
|
@@ -1492,7 +1501,6 @@ function devAssert(condition, message) {
|
|
|
1492
1501
|
* A replacement for instanceof which includes an error warning when multi-realm
|
|
1493
1502
|
* constructors are detected.
|
|
1494
1503
|
*/
|
|
1495
|
-
|
|
1496
1504
|
// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
|
|
1497
1505
|
// See: https://webpack.js.org/guides/production/
|
|
1498
1506
|
const instanceOf = // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
|
|
@@ -4521,8 +4529,6 @@ function hasMultilineItems(maybeArray) {
|
|
|
4521
4529
|
return maybeArray != null && maybeArray.some(isMultiline);
|
|
4522
4530
|
}
|
|
4523
4531
|
|
|
4524
|
-
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";
|
|
4525
|
-
|
|
4526
4532
|
//
|
|
4527
4533
|
// Main
|
|
4528
4534
|
//
|
|
@@ -4669,11 +4675,6 @@ var strategies = {
|
|
|
4669
4675
|
};
|
|
4670
4676
|
src.strategies = strategies;
|
|
4671
4677
|
|
|
4672
|
-
const memoize$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), src, {
|
|
4673
|
-
'default': src,
|
|
4674
|
-
strategies: strategies
|
|
4675
|
-
}));
|
|
4676
|
-
|
|
4677
4678
|
var utils = stencilHooks_module.createCommonjsModule(function (module, exports) {
|
|
4678
4679
|
var __assign = (stencilHooks_module.commonjsGlobal && stencilHooks_module.commonjsGlobal.__assign) || function () {
|
|
4679
4680
|
__assign = Object.assign || function(t) {
|
|
@@ -4923,15 +4924,14 @@ exports.default = combinedQuery;
|
|
|
4923
4924
|
const M = /*@__PURE__*/stencilHooks_module.getDefaultExportFromCjs(dist);
|
|
4924
4925
|
|
|
4925
4926
|
var browserPonyfill = stencilHooks_module.createCommonjsModule(function (module, exports) {
|
|
4926
|
-
var
|
|
4927
|
-
var __self__ = (function () {
|
|
4927
|
+
var __self__ = (function (root) {
|
|
4928
4928
|
function F() {
|
|
4929
4929
|
this.fetch = false;
|
|
4930
|
-
this.DOMException =
|
|
4930
|
+
this.DOMException = root.DOMException;
|
|
4931
4931
|
}
|
|
4932
|
-
F.prototype =
|
|
4932
|
+
F.prototype = root;
|
|
4933
4933
|
return new F();
|
|
4934
|
-
})();
|
|
4934
|
+
})(typeof self !== 'undefined' ? self : stencilHooks_module.commonjsGlobal);
|
|
4935
4935
|
(function(self) {
|
|
4936
4936
|
|
|
4937
4937
|
var irrelevant = (function (exports) {
|
|
@@ -5458,24 +5458,17 @@ var irrelevant = (function (exports) {
|
|
|
5458
5458
|
exports.Response = Response;
|
|
5459
5459
|
exports.fetch = fetch;
|
|
5460
5460
|
|
|
5461
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5462
|
-
|
|
5463
5461
|
return exports;
|
|
5464
5462
|
|
|
5465
|
-
}
|
|
5463
|
+
}({}));
|
|
5466
5464
|
})(__self__);
|
|
5467
|
-
__self__.fetch.ponyfill = true;
|
|
5468
|
-
// Remove "polyfill" property added by whatwg-fetch
|
|
5469
5465
|
delete __self__.fetch.polyfill;
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
exports =
|
|
5474
|
-
exports.
|
|
5475
|
-
exports.
|
|
5476
|
-
exports.Headers = ctx.Headers;
|
|
5477
|
-
exports.Request = ctx.Request;
|
|
5478
|
-
exports.Response = ctx.Response;
|
|
5466
|
+
exports = __self__.fetch; // To enable: import fetch from 'cross-fetch'
|
|
5467
|
+
exports.default = __self__.fetch; // For TypeScript consumers without esModuleInterop.
|
|
5468
|
+
exports.fetch = __self__.fetch; // To enable: import {fetch} from 'cross-fetch'
|
|
5469
|
+
exports.Headers = __self__.Headers;
|
|
5470
|
+
exports.Request = __self__.Request;
|
|
5471
|
+
exports.Response = __self__.Response;
|
|
5479
5472
|
module.exports = exports;
|
|
5480
5473
|
});
|
|
5481
5474
|
|
|
@@ -8202,6 +8195,983 @@ function dispatchBufferClose(arg) {
|
|
|
8202
8195
|
subscriber.closeContext(context);
|
|
8203
8196
|
}
|
|
8204
8197
|
|
|
8198
|
+
/**
|
|
8199
|
+
* @license
|
|
8200
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8201
|
+
* This code may only be used under the BSD style license found at
|
|
8202
|
+
* http://polymer.github.io/LICENSE.txt
|
|
8203
|
+
* The complete set of authors may be found at
|
|
8204
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
8205
|
+
* The complete set of contributors may be found at
|
|
8206
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8207
|
+
* Code distributed by Google as part of the polymer project is also
|
|
8208
|
+
* subject to an additional IP rights grant found at
|
|
8209
|
+
* http://polymer.github.io/PATENTS.txt
|
|
8210
|
+
*/
|
|
8211
|
+
/**
|
|
8212
|
+
* An expression marker with embedded unique key to avoid collision with
|
|
8213
|
+
* possible text in templates.
|
|
8214
|
+
*/
|
|
8215
|
+
const marker = `{{lit-${String(Math.random()).slice(2)}}}`;
|
|
8216
|
+
|
|
8217
|
+
/**
|
|
8218
|
+
* @license
|
|
8219
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8220
|
+
* This code may only be used under the BSD style license found at
|
|
8221
|
+
* http://polymer.github.io/LICENSE.txt
|
|
8222
|
+
* The complete set of authors may be found at
|
|
8223
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
8224
|
+
* The complete set of contributors may be found at
|
|
8225
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8226
|
+
* Code distributed by Google as part of the polymer project is also
|
|
8227
|
+
* subject to an additional IP rights grant found at
|
|
8228
|
+
* http://polymer.github.io/PATENTS.txt
|
|
8229
|
+
*/
|
|
8230
|
+
/**
|
|
8231
|
+
* Our TrustedTypePolicy for HTML which is declared using the html template
|
|
8232
|
+
* tag function.
|
|
8233
|
+
*
|
|
8234
|
+
* That HTML is a developer-authored constant, and is parsed with innerHTML
|
|
8235
|
+
* before any untrusted expressions have been mixed in. Therefor it is
|
|
8236
|
+
* considered safe by construction.
|
|
8237
|
+
*/
|
|
8238
|
+
const policy = window.trustedTypes &&
|
|
8239
|
+
trustedTypes.createPolicy('lit-html', { createHTML: (s) => s });
|
|
8240
|
+
|
|
8241
|
+
/**
|
|
8242
|
+
* @license
|
|
8243
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8244
|
+
* This code may only be used under the BSD style license found at
|
|
8245
|
+
* http://polymer.github.io/LICENSE.txt
|
|
8246
|
+
* The complete set of authors may be found at
|
|
8247
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
8248
|
+
* The complete set of contributors may be found at
|
|
8249
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8250
|
+
* Code distributed by Google as part of the polymer project is also
|
|
8251
|
+
* subject to an additional IP rights grant found at
|
|
8252
|
+
* http://polymer.github.io/PATENTS.txt
|
|
8253
|
+
*/
|
|
8254
|
+
// Wrap into an IIFE because MS Edge <= v41 does not support having try/catch
|
|
8255
|
+
// blocks right into the body of a module
|
|
8256
|
+
(() => {
|
|
8257
|
+
try {
|
|
8258
|
+
const options = {
|
|
8259
|
+
get capture() {
|
|
8260
|
+
return false;
|
|
8261
|
+
}
|
|
8262
|
+
};
|
|
8263
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8264
|
+
window.addEventListener('test', options, options);
|
|
8265
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8266
|
+
window.removeEventListener('test', options, options);
|
|
8267
|
+
}
|
|
8268
|
+
catch (_e) {
|
|
8269
|
+
// event options not supported
|
|
8270
|
+
}
|
|
8271
|
+
})();
|
|
8272
|
+
|
|
8273
|
+
/**
|
|
8274
|
+
* @license
|
|
8275
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8276
|
+
* This code may only be used under the BSD style license found at
|
|
8277
|
+
* http://polymer.github.io/LICENSE.txt
|
|
8278
|
+
* The complete set of authors may be found at
|
|
8279
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
8280
|
+
* The complete set of contributors may be found at
|
|
8281
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8282
|
+
* Code distributed by Google as part of the polymer project is also
|
|
8283
|
+
* subject to an additional IP rights grant found at
|
|
8284
|
+
* http://polymer.github.io/PATENTS.txt
|
|
8285
|
+
*/
|
|
8286
|
+
// IMPORTANT: do not change the property name or the assignment expression.
|
|
8287
|
+
// This line will be used in regexes to search for lit-html usage.
|
|
8288
|
+
// TODO(justinfagnani): inject version number at build time
|
|
8289
|
+
if (typeof window !== 'undefined') {
|
|
8290
|
+
(window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.4.1');
|
|
8291
|
+
}
|
|
8292
|
+
|
|
8293
|
+
let current;
|
|
8294
|
+
let currentId = 0;
|
|
8295
|
+
function notify() {
|
|
8296
|
+
return currentId++;
|
|
8297
|
+
}
|
|
8298
|
+
|
|
8299
|
+
const hookSymbol = Symbol('haunted.hook');
|
|
8300
|
+
const effectsSymbol = Symbol('haunted.effects');
|
|
8301
|
+
const layoutEffectsSymbol = Symbol('haunted.layoutEffects');
|
|
8302
|
+
const contextEvent = 'haunted.context';
|
|
8303
|
+
|
|
8304
|
+
const defer = Promise.resolve().then.bind(Promise.resolve());
|
|
8305
|
+
|
|
8306
|
+
class Hook {
|
|
8307
|
+
constructor(id, state) {
|
|
8308
|
+
this.id = id;
|
|
8309
|
+
this.state = state;
|
|
8310
|
+
}
|
|
8311
|
+
}
|
|
8312
|
+
function use(Hook, ...args) {
|
|
8313
|
+
let id = notify();
|
|
8314
|
+
let hooks = current[hookSymbol];
|
|
8315
|
+
let hook = hooks.get(id);
|
|
8316
|
+
if (!hook) {
|
|
8317
|
+
hook = new Hook(id, current, ...args);
|
|
8318
|
+
hooks.set(id, hook);
|
|
8319
|
+
}
|
|
8320
|
+
return hook.update(...args);
|
|
8321
|
+
}
|
|
8322
|
+
function hook(Hook) {
|
|
8323
|
+
return use.bind(null, Hook);
|
|
8324
|
+
}
|
|
8325
|
+
|
|
8326
|
+
function createEffect(setEffects) {
|
|
8327
|
+
return hook(class extends Hook {
|
|
8328
|
+
constructor(id, state, ignored1, ignored2) {
|
|
8329
|
+
super(id, state);
|
|
8330
|
+
setEffects(state, this);
|
|
8331
|
+
}
|
|
8332
|
+
update(callback, values) {
|
|
8333
|
+
this.callback = callback;
|
|
8334
|
+
this.values = values;
|
|
8335
|
+
}
|
|
8336
|
+
call() {
|
|
8337
|
+
if (!this.values || this.hasChanged()) {
|
|
8338
|
+
this.run();
|
|
8339
|
+
}
|
|
8340
|
+
this.lastValues = this.values;
|
|
8341
|
+
}
|
|
8342
|
+
run() {
|
|
8343
|
+
this.teardown();
|
|
8344
|
+
this._teardown = this.callback.call(this.state);
|
|
8345
|
+
}
|
|
8346
|
+
teardown() {
|
|
8347
|
+
if (typeof this._teardown === 'function') {
|
|
8348
|
+
this._teardown();
|
|
8349
|
+
}
|
|
8350
|
+
}
|
|
8351
|
+
hasChanged() {
|
|
8352
|
+
return !this.lastValues || this.values.some((value, i) => this.lastValues[i] !== value);
|
|
8353
|
+
}
|
|
8354
|
+
});
|
|
8355
|
+
}
|
|
8356
|
+
|
|
8357
|
+
function setEffects(state, cb) {
|
|
8358
|
+
state[effectsSymbol].push(cb);
|
|
8359
|
+
}
|
|
8360
|
+
const useEffect = createEffect(setEffects);
|
|
8361
|
+
|
|
8362
|
+
const useContext = hook(class extends Hook {
|
|
8363
|
+
constructor(id, state, _) {
|
|
8364
|
+
super(id, state);
|
|
8365
|
+
this._updater = this._updater.bind(this);
|
|
8366
|
+
this._ranEffect = false;
|
|
8367
|
+
this._unsubscribe = null;
|
|
8368
|
+
setEffects(state, this);
|
|
8369
|
+
}
|
|
8370
|
+
update(Context) {
|
|
8371
|
+
if (this.state.virtual) {
|
|
8372
|
+
throw new Error('can\'t be used with virtual components');
|
|
8373
|
+
}
|
|
8374
|
+
if (this.Context !== Context) {
|
|
8375
|
+
this._subscribe(Context);
|
|
8376
|
+
this.Context = Context;
|
|
8377
|
+
}
|
|
8378
|
+
return this.value;
|
|
8379
|
+
}
|
|
8380
|
+
call() {
|
|
8381
|
+
if (!this._ranEffect) {
|
|
8382
|
+
this._ranEffect = true;
|
|
8383
|
+
if (this._unsubscribe)
|
|
8384
|
+
this._unsubscribe();
|
|
8385
|
+
this._subscribe(this.Context);
|
|
8386
|
+
this.state.update();
|
|
8387
|
+
}
|
|
8388
|
+
}
|
|
8389
|
+
_updater(value) {
|
|
8390
|
+
this.value = value;
|
|
8391
|
+
this.state.update();
|
|
8392
|
+
}
|
|
8393
|
+
_subscribe(Context) {
|
|
8394
|
+
const detail = { Context, callback: this._updater };
|
|
8395
|
+
this.state.host.dispatchEvent(new CustomEvent(contextEvent, {
|
|
8396
|
+
detail,
|
|
8397
|
+
bubbles: true,
|
|
8398
|
+
cancelable: true,
|
|
8399
|
+
composed: true,
|
|
8400
|
+
}));
|
|
8401
|
+
const { unsubscribe = null, value } = detail;
|
|
8402
|
+
this.value = unsubscribe ? value : Context.defaultValue;
|
|
8403
|
+
this._unsubscribe = unsubscribe;
|
|
8404
|
+
}
|
|
8405
|
+
teardown() {
|
|
8406
|
+
if (this._unsubscribe) {
|
|
8407
|
+
this._unsubscribe();
|
|
8408
|
+
}
|
|
8409
|
+
}
|
|
8410
|
+
});
|
|
8411
|
+
|
|
8412
|
+
const useMemo = hook(class extends Hook {
|
|
8413
|
+
constructor(id, state, fn, values) {
|
|
8414
|
+
super(id, state);
|
|
8415
|
+
this.value = fn();
|
|
8416
|
+
this.values = values;
|
|
8417
|
+
}
|
|
8418
|
+
update(fn, values) {
|
|
8419
|
+
if (this.hasChanged(values)) {
|
|
8420
|
+
this.values = values;
|
|
8421
|
+
this.value = fn();
|
|
8422
|
+
}
|
|
8423
|
+
return this.value;
|
|
8424
|
+
}
|
|
8425
|
+
hasChanged(values = []) {
|
|
8426
|
+
return values.some((value, i) => this.values[i] !== value);
|
|
8427
|
+
}
|
|
8428
|
+
});
|
|
8429
|
+
|
|
8430
|
+
function setLayoutEffects(state, cb) {
|
|
8431
|
+
state[layoutEffectsSymbol].push(cb);
|
|
8432
|
+
}
|
|
8433
|
+
const useLayoutEffect = createEffect(setLayoutEffects);
|
|
8434
|
+
|
|
8435
|
+
const useState = hook(class extends Hook {
|
|
8436
|
+
constructor(id, state, initialValue) {
|
|
8437
|
+
super(id, state);
|
|
8438
|
+
this.updater = this.updater.bind(this);
|
|
8439
|
+
if (typeof initialValue === 'function') {
|
|
8440
|
+
initialValue = initialValue();
|
|
8441
|
+
}
|
|
8442
|
+
this.makeArgs(initialValue);
|
|
8443
|
+
}
|
|
8444
|
+
update() {
|
|
8445
|
+
return this.args;
|
|
8446
|
+
}
|
|
8447
|
+
updater(value) {
|
|
8448
|
+
if (typeof value === 'function') {
|
|
8449
|
+
const updaterFn = value;
|
|
8450
|
+
const [previousValue] = this.args;
|
|
8451
|
+
value = updaterFn(previousValue);
|
|
8452
|
+
}
|
|
8453
|
+
this.makeArgs(value);
|
|
8454
|
+
this.state.update();
|
|
8455
|
+
}
|
|
8456
|
+
makeArgs(value) {
|
|
8457
|
+
this.args = Object.freeze([value, this.updater]);
|
|
8458
|
+
}
|
|
8459
|
+
});
|
|
8460
|
+
|
|
8461
|
+
const useReducer = hook(class extends Hook {
|
|
8462
|
+
constructor(id, state, _, initialState, init) {
|
|
8463
|
+
super(id, state);
|
|
8464
|
+
this.dispatch = this.dispatch.bind(this);
|
|
8465
|
+
this.currentState = init !== undefined ? init(initialState) : initialState;
|
|
8466
|
+
}
|
|
8467
|
+
update(reducer) {
|
|
8468
|
+
this.reducer = reducer;
|
|
8469
|
+
return [this.currentState, this.dispatch];
|
|
8470
|
+
}
|
|
8471
|
+
dispatch(action) {
|
|
8472
|
+
this.currentState = this.reducer(this.currentState, action);
|
|
8473
|
+
this.state.update();
|
|
8474
|
+
}
|
|
8475
|
+
});
|
|
8476
|
+
|
|
8477
|
+
/**
|
|
8478
|
+
* Helpers.
|
|
8479
|
+
*/
|
|
8480
|
+
|
|
8481
|
+
var s$1 = 1000;
|
|
8482
|
+
var m$1 = s$1 * 60;
|
|
8483
|
+
var h$1 = m$1 * 60;
|
|
8484
|
+
var d$1 = h$1 * 24;
|
|
8485
|
+
var w = d$1 * 7;
|
|
8486
|
+
var y$1 = d$1 * 365.25;
|
|
8487
|
+
|
|
8488
|
+
/**
|
|
8489
|
+
* Parse or format the given `val`.
|
|
8490
|
+
*
|
|
8491
|
+
* Options:
|
|
8492
|
+
*
|
|
8493
|
+
* - `long` verbose formatting [false]
|
|
8494
|
+
*
|
|
8495
|
+
* @param {String|Number} val
|
|
8496
|
+
* @param {Object} [options]
|
|
8497
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
8498
|
+
* @return {String|Number}
|
|
8499
|
+
* @api public
|
|
8500
|
+
*/
|
|
8501
|
+
|
|
8502
|
+
var ms = function(val, options) {
|
|
8503
|
+
options = options || {};
|
|
8504
|
+
var type = typeof val;
|
|
8505
|
+
if (type === 'string' && val.length > 0) {
|
|
8506
|
+
return parse$1(val);
|
|
8507
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
8508
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
8509
|
+
}
|
|
8510
|
+
throw new Error(
|
|
8511
|
+
'val is not a non-empty string or a valid number. val=' +
|
|
8512
|
+
JSON.stringify(val)
|
|
8513
|
+
);
|
|
8514
|
+
};
|
|
8515
|
+
|
|
8516
|
+
/**
|
|
8517
|
+
* Parse the given `str` and return milliseconds.
|
|
8518
|
+
*
|
|
8519
|
+
* @param {String} str
|
|
8520
|
+
* @return {Number}
|
|
8521
|
+
* @api private
|
|
8522
|
+
*/
|
|
8523
|
+
|
|
8524
|
+
function parse$1(str) {
|
|
8525
|
+
str = String(str);
|
|
8526
|
+
if (str.length > 100) {
|
|
8527
|
+
return;
|
|
8528
|
+
}
|
|
8529
|
+
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(
|
|
8530
|
+
str
|
|
8531
|
+
);
|
|
8532
|
+
if (!match) {
|
|
8533
|
+
return;
|
|
8534
|
+
}
|
|
8535
|
+
var n = parseFloat(match[1]);
|
|
8536
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
8537
|
+
switch (type) {
|
|
8538
|
+
case 'years':
|
|
8539
|
+
case 'year':
|
|
8540
|
+
case 'yrs':
|
|
8541
|
+
case 'yr':
|
|
8542
|
+
case 'y':
|
|
8543
|
+
return n * y$1;
|
|
8544
|
+
case 'weeks':
|
|
8545
|
+
case 'week':
|
|
8546
|
+
case 'w':
|
|
8547
|
+
return n * w;
|
|
8548
|
+
case 'days':
|
|
8549
|
+
case 'day':
|
|
8550
|
+
case 'd':
|
|
8551
|
+
return n * d$1;
|
|
8552
|
+
case 'hours':
|
|
8553
|
+
case 'hour':
|
|
8554
|
+
case 'hrs':
|
|
8555
|
+
case 'hr':
|
|
8556
|
+
case 'h':
|
|
8557
|
+
return n * h$1;
|
|
8558
|
+
case 'minutes':
|
|
8559
|
+
case 'minute':
|
|
8560
|
+
case 'mins':
|
|
8561
|
+
case 'min':
|
|
8562
|
+
case 'm':
|
|
8563
|
+
return n * m$1;
|
|
8564
|
+
case 'seconds':
|
|
8565
|
+
case 'second':
|
|
8566
|
+
case 'secs':
|
|
8567
|
+
case 'sec':
|
|
8568
|
+
case 's':
|
|
8569
|
+
return n * s$1;
|
|
8570
|
+
case 'milliseconds':
|
|
8571
|
+
case 'millisecond':
|
|
8572
|
+
case 'msecs':
|
|
8573
|
+
case 'msec':
|
|
8574
|
+
case 'ms':
|
|
8575
|
+
return n;
|
|
8576
|
+
default:
|
|
8577
|
+
return undefined;
|
|
8578
|
+
}
|
|
8579
|
+
}
|
|
8580
|
+
|
|
8581
|
+
/**
|
|
8582
|
+
* Short format for `ms`.
|
|
8583
|
+
*
|
|
8584
|
+
* @param {Number} ms
|
|
8585
|
+
* @return {String}
|
|
8586
|
+
* @api private
|
|
8587
|
+
*/
|
|
8588
|
+
|
|
8589
|
+
function fmtShort(ms) {
|
|
8590
|
+
var msAbs = Math.abs(ms);
|
|
8591
|
+
if (msAbs >= d$1) {
|
|
8592
|
+
return Math.round(ms / d$1) + 'd';
|
|
8593
|
+
}
|
|
8594
|
+
if (msAbs >= h$1) {
|
|
8595
|
+
return Math.round(ms / h$1) + 'h';
|
|
8596
|
+
}
|
|
8597
|
+
if (msAbs >= m$1) {
|
|
8598
|
+
return Math.round(ms / m$1) + 'm';
|
|
8599
|
+
}
|
|
8600
|
+
if (msAbs >= s$1) {
|
|
8601
|
+
return Math.round(ms / s$1) + 's';
|
|
8602
|
+
}
|
|
8603
|
+
return ms + 'ms';
|
|
8604
|
+
}
|
|
8605
|
+
|
|
8606
|
+
/**
|
|
8607
|
+
* Long format for `ms`.
|
|
8608
|
+
*
|
|
8609
|
+
* @param {Number} ms
|
|
8610
|
+
* @return {String}
|
|
8611
|
+
* @api private
|
|
8612
|
+
*/
|
|
8613
|
+
|
|
8614
|
+
function fmtLong(ms) {
|
|
8615
|
+
var msAbs = Math.abs(ms);
|
|
8616
|
+
if (msAbs >= d$1) {
|
|
8617
|
+
return plural(ms, msAbs, d$1, 'day');
|
|
8618
|
+
}
|
|
8619
|
+
if (msAbs >= h$1) {
|
|
8620
|
+
return plural(ms, msAbs, h$1, 'hour');
|
|
8621
|
+
}
|
|
8622
|
+
if (msAbs >= m$1) {
|
|
8623
|
+
return plural(ms, msAbs, m$1, 'minute');
|
|
8624
|
+
}
|
|
8625
|
+
if (msAbs >= s$1) {
|
|
8626
|
+
return plural(ms, msAbs, s$1, 'second');
|
|
8627
|
+
}
|
|
8628
|
+
return ms + ' ms';
|
|
8629
|
+
}
|
|
8630
|
+
|
|
8631
|
+
/**
|
|
8632
|
+
* Pluralization helper.
|
|
8633
|
+
*/
|
|
8634
|
+
|
|
8635
|
+
function plural(ms, msAbs, n, name) {
|
|
8636
|
+
var isPlural = msAbs >= n * 1.5;
|
|
8637
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
8638
|
+
}
|
|
8639
|
+
|
|
8640
|
+
/**
|
|
8641
|
+
* This is the common logic for both the Node.js and web browser
|
|
8642
|
+
* implementations of `debug()`.
|
|
8643
|
+
*/
|
|
8644
|
+
|
|
8645
|
+
function setup(env) {
|
|
8646
|
+
createDebug.debug = createDebug;
|
|
8647
|
+
createDebug.default = createDebug;
|
|
8648
|
+
createDebug.coerce = coerce;
|
|
8649
|
+
createDebug.disable = disable;
|
|
8650
|
+
createDebug.enable = enable;
|
|
8651
|
+
createDebug.enabled = enabled;
|
|
8652
|
+
createDebug.humanize = ms;
|
|
8653
|
+
createDebug.destroy = destroy;
|
|
8654
|
+
|
|
8655
|
+
Object.keys(env).forEach(key => {
|
|
8656
|
+
createDebug[key] = env[key];
|
|
8657
|
+
});
|
|
8658
|
+
|
|
8659
|
+
/**
|
|
8660
|
+
* The currently active debug mode names, and names to skip.
|
|
8661
|
+
*/
|
|
8662
|
+
|
|
8663
|
+
createDebug.names = [];
|
|
8664
|
+
createDebug.skips = [];
|
|
8665
|
+
|
|
8666
|
+
/**
|
|
8667
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
8668
|
+
*
|
|
8669
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
8670
|
+
*/
|
|
8671
|
+
createDebug.formatters = {};
|
|
8672
|
+
|
|
8673
|
+
/**
|
|
8674
|
+
* Selects a color for a debug namespace
|
|
8675
|
+
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
|
8676
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
8677
|
+
* @api private
|
|
8678
|
+
*/
|
|
8679
|
+
function selectColor(namespace) {
|
|
8680
|
+
let hash = 0;
|
|
8681
|
+
|
|
8682
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
8683
|
+
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
8684
|
+
hash |= 0; // Convert to 32bit integer
|
|
8685
|
+
}
|
|
8686
|
+
|
|
8687
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
8688
|
+
}
|
|
8689
|
+
createDebug.selectColor = selectColor;
|
|
8690
|
+
|
|
8691
|
+
/**
|
|
8692
|
+
* Create a debugger with the given `namespace`.
|
|
8693
|
+
*
|
|
8694
|
+
* @param {String} namespace
|
|
8695
|
+
* @return {Function}
|
|
8696
|
+
* @api public
|
|
8697
|
+
*/
|
|
8698
|
+
function createDebug(namespace) {
|
|
8699
|
+
let prevTime;
|
|
8700
|
+
let enableOverride = null;
|
|
8701
|
+
|
|
8702
|
+
function debug(...args) {
|
|
8703
|
+
// Disabled?
|
|
8704
|
+
if (!debug.enabled) {
|
|
8705
|
+
return;
|
|
8706
|
+
}
|
|
8707
|
+
|
|
8708
|
+
const self = debug;
|
|
8709
|
+
|
|
8710
|
+
// Set `diff` timestamp
|
|
8711
|
+
const curr = Number(new Date());
|
|
8712
|
+
const ms = curr - (prevTime || curr);
|
|
8713
|
+
self.diff = ms;
|
|
8714
|
+
self.prev = prevTime;
|
|
8715
|
+
self.curr = curr;
|
|
8716
|
+
prevTime = curr;
|
|
8717
|
+
|
|
8718
|
+
args[0] = createDebug.coerce(args[0]);
|
|
8719
|
+
|
|
8720
|
+
if (typeof args[0] !== 'string') {
|
|
8721
|
+
// Anything else let's inspect with %O
|
|
8722
|
+
args.unshift('%O');
|
|
8723
|
+
}
|
|
8724
|
+
|
|
8725
|
+
// Apply any `formatters` transformations
|
|
8726
|
+
let index = 0;
|
|
8727
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
8728
|
+
// If we encounter an escaped % then don't increase the array index
|
|
8729
|
+
if (match === '%%') {
|
|
8730
|
+
return '%';
|
|
8731
|
+
}
|
|
8732
|
+
index++;
|
|
8733
|
+
const formatter = createDebug.formatters[format];
|
|
8734
|
+
if (typeof formatter === 'function') {
|
|
8735
|
+
const val = args[index];
|
|
8736
|
+
match = formatter.call(self, val);
|
|
8737
|
+
|
|
8738
|
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
8739
|
+
args.splice(index, 1);
|
|
8740
|
+
index--;
|
|
8741
|
+
}
|
|
8742
|
+
return match;
|
|
8743
|
+
});
|
|
8744
|
+
|
|
8745
|
+
// Apply env-specific formatting (colors, etc.)
|
|
8746
|
+
createDebug.formatArgs.call(self, args);
|
|
8747
|
+
|
|
8748
|
+
const logFn = self.log || createDebug.log;
|
|
8749
|
+
logFn.apply(self, args);
|
|
8750
|
+
}
|
|
8751
|
+
|
|
8752
|
+
debug.namespace = namespace;
|
|
8753
|
+
debug.useColors = createDebug.useColors();
|
|
8754
|
+
debug.color = createDebug.selectColor(namespace);
|
|
8755
|
+
debug.extend = extend;
|
|
8756
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
8757
|
+
|
|
8758
|
+
Object.defineProperty(debug, 'enabled', {
|
|
8759
|
+
enumerable: true,
|
|
8760
|
+
configurable: false,
|
|
8761
|
+
get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,
|
|
8762
|
+
set: v => {
|
|
8763
|
+
enableOverride = v;
|
|
8764
|
+
}
|
|
8765
|
+
});
|
|
8766
|
+
|
|
8767
|
+
// Env-specific initialization logic for debug instances
|
|
8768
|
+
if (typeof createDebug.init === 'function') {
|
|
8769
|
+
createDebug.init(debug);
|
|
8770
|
+
}
|
|
8771
|
+
|
|
8772
|
+
return debug;
|
|
8773
|
+
}
|
|
8774
|
+
|
|
8775
|
+
function extend(namespace, delimiter) {
|
|
8776
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
8777
|
+
newDebug.log = this.log;
|
|
8778
|
+
return newDebug;
|
|
8779
|
+
}
|
|
8780
|
+
|
|
8781
|
+
/**
|
|
8782
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
8783
|
+
* separated by a colon and wildcards.
|
|
8784
|
+
*
|
|
8785
|
+
* @param {String} namespaces
|
|
8786
|
+
* @api public
|
|
8787
|
+
*/
|
|
8788
|
+
function enable(namespaces) {
|
|
8789
|
+
createDebug.save(namespaces);
|
|
8790
|
+
|
|
8791
|
+
createDebug.names = [];
|
|
8792
|
+
createDebug.skips = [];
|
|
8793
|
+
|
|
8794
|
+
let i;
|
|
8795
|
+
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
8796
|
+
const len = split.length;
|
|
8797
|
+
|
|
8798
|
+
for (i = 0; i < len; i++) {
|
|
8799
|
+
if (!split[i]) {
|
|
8800
|
+
// ignore empty strings
|
|
8801
|
+
continue;
|
|
8802
|
+
}
|
|
8803
|
+
|
|
8804
|
+
namespaces = split[i].replace(/\*/g, '.*?');
|
|
8805
|
+
|
|
8806
|
+
if (namespaces[0] === '-') {
|
|
8807
|
+
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
|
8808
|
+
} else {
|
|
8809
|
+
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
8810
|
+
}
|
|
8811
|
+
}
|
|
8812
|
+
}
|
|
8813
|
+
|
|
8814
|
+
/**
|
|
8815
|
+
* Disable debug output.
|
|
8816
|
+
*
|
|
8817
|
+
* @return {String} namespaces
|
|
8818
|
+
* @api public
|
|
8819
|
+
*/
|
|
8820
|
+
function disable() {
|
|
8821
|
+
const namespaces = [
|
|
8822
|
+
...createDebug.names.map(toNamespace),
|
|
8823
|
+
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
8824
|
+
].join(',');
|
|
8825
|
+
createDebug.enable('');
|
|
8826
|
+
return namespaces;
|
|
8827
|
+
}
|
|
8828
|
+
|
|
8829
|
+
/**
|
|
8830
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
8831
|
+
*
|
|
8832
|
+
* @param {String} name
|
|
8833
|
+
* @return {Boolean}
|
|
8834
|
+
* @api public
|
|
8835
|
+
*/
|
|
8836
|
+
function enabled(name) {
|
|
8837
|
+
if (name[name.length - 1] === '*') {
|
|
8838
|
+
return true;
|
|
8839
|
+
}
|
|
8840
|
+
|
|
8841
|
+
let i;
|
|
8842
|
+
let len;
|
|
8843
|
+
|
|
8844
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
8845
|
+
if (createDebug.skips[i].test(name)) {
|
|
8846
|
+
return false;
|
|
8847
|
+
}
|
|
8848
|
+
}
|
|
8849
|
+
|
|
8850
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
8851
|
+
if (createDebug.names[i].test(name)) {
|
|
8852
|
+
return true;
|
|
8853
|
+
}
|
|
8854
|
+
}
|
|
8855
|
+
|
|
8856
|
+
return false;
|
|
8857
|
+
}
|
|
8858
|
+
|
|
8859
|
+
/**
|
|
8860
|
+
* Convert regexp to namespace
|
|
8861
|
+
*
|
|
8862
|
+
* @param {RegExp} regxep
|
|
8863
|
+
* @return {String} namespace
|
|
8864
|
+
* @api private
|
|
8865
|
+
*/
|
|
8866
|
+
function toNamespace(regexp) {
|
|
8867
|
+
return regexp.toString()
|
|
8868
|
+
.substring(2, regexp.toString().length - 2)
|
|
8869
|
+
.replace(/\.\*\?$/, '*');
|
|
8870
|
+
}
|
|
8871
|
+
|
|
8872
|
+
/**
|
|
8873
|
+
* Coerce `val`.
|
|
8874
|
+
*
|
|
8875
|
+
* @param {Mixed} val
|
|
8876
|
+
* @return {Mixed}
|
|
8877
|
+
* @api private
|
|
8878
|
+
*/
|
|
8879
|
+
function coerce(val) {
|
|
8880
|
+
if (val instanceof Error) {
|
|
8881
|
+
return val.stack || val.message;
|
|
8882
|
+
}
|
|
8883
|
+
return val;
|
|
8884
|
+
}
|
|
8885
|
+
|
|
8886
|
+
/**
|
|
8887
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
8888
|
+
* XXX It WILL be removed in the next major release.
|
|
8889
|
+
*/
|
|
8890
|
+
function destroy() {
|
|
8891
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
8892
|
+
}
|
|
8893
|
+
|
|
8894
|
+
createDebug.enable(createDebug.load());
|
|
8895
|
+
|
|
8896
|
+
return createDebug;
|
|
8897
|
+
}
|
|
8898
|
+
|
|
8899
|
+
var common = setup;
|
|
8900
|
+
|
|
8901
|
+
var browser$1 = stencilHooks_module.createCommonjsModule(function (module, exports) {
|
|
8902
|
+
/* eslint-env browser */
|
|
8903
|
+
|
|
8904
|
+
/**
|
|
8905
|
+
* This is the web browser implementation of `debug()`.
|
|
8906
|
+
*/
|
|
8907
|
+
|
|
8908
|
+
exports.formatArgs = formatArgs;
|
|
8909
|
+
exports.save = save;
|
|
8910
|
+
exports.load = load;
|
|
8911
|
+
exports.useColors = useColors;
|
|
8912
|
+
exports.storage = localstorage();
|
|
8913
|
+
exports.destroy = (() => {
|
|
8914
|
+
let warned = false;
|
|
8915
|
+
|
|
8916
|
+
return () => {
|
|
8917
|
+
if (!warned) {
|
|
8918
|
+
warned = true;
|
|
8919
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
8920
|
+
}
|
|
8921
|
+
};
|
|
8922
|
+
})();
|
|
8923
|
+
|
|
8924
|
+
/**
|
|
8925
|
+
* Colors.
|
|
8926
|
+
*/
|
|
8927
|
+
|
|
8928
|
+
exports.colors = [
|
|
8929
|
+
'#0000CC',
|
|
8930
|
+
'#0000FF',
|
|
8931
|
+
'#0033CC',
|
|
8932
|
+
'#0033FF',
|
|
8933
|
+
'#0066CC',
|
|
8934
|
+
'#0066FF',
|
|
8935
|
+
'#0099CC',
|
|
8936
|
+
'#0099FF',
|
|
8937
|
+
'#00CC00',
|
|
8938
|
+
'#00CC33',
|
|
8939
|
+
'#00CC66',
|
|
8940
|
+
'#00CC99',
|
|
8941
|
+
'#00CCCC',
|
|
8942
|
+
'#00CCFF',
|
|
8943
|
+
'#3300CC',
|
|
8944
|
+
'#3300FF',
|
|
8945
|
+
'#3333CC',
|
|
8946
|
+
'#3333FF',
|
|
8947
|
+
'#3366CC',
|
|
8948
|
+
'#3366FF',
|
|
8949
|
+
'#3399CC',
|
|
8950
|
+
'#3399FF',
|
|
8951
|
+
'#33CC00',
|
|
8952
|
+
'#33CC33',
|
|
8953
|
+
'#33CC66',
|
|
8954
|
+
'#33CC99',
|
|
8955
|
+
'#33CCCC',
|
|
8956
|
+
'#33CCFF',
|
|
8957
|
+
'#6600CC',
|
|
8958
|
+
'#6600FF',
|
|
8959
|
+
'#6633CC',
|
|
8960
|
+
'#6633FF',
|
|
8961
|
+
'#66CC00',
|
|
8962
|
+
'#66CC33',
|
|
8963
|
+
'#9900CC',
|
|
8964
|
+
'#9900FF',
|
|
8965
|
+
'#9933CC',
|
|
8966
|
+
'#9933FF',
|
|
8967
|
+
'#99CC00',
|
|
8968
|
+
'#99CC33',
|
|
8969
|
+
'#CC0000',
|
|
8970
|
+
'#CC0033',
|
|
8971
|
+
'#CC0066',
|
|
8972
|
+
'#CC0099',
|
|
8973
|
+
'#CC00CC',
|
|
8974
|
+
'#CC00FF',
|
|
8975
|
+
'#CC3300',
|
|
8976
|
+
'#CC3333',
|
|
8977
|
+
'#CC3366',
|
|
8978
|
+
'#CC3399',
|
|
8979
|
+
'#CC33CC',
|
|
8980
|
+
'#CC33FF',
|
|
8981
|
+
'#CC6600',
|
|
8982
|
+
'#CC6633',
|
|
8983
|
+
'#CC9900',
|
|
8984
|
+
'#CC9933',
|
|
8985
|
+
'#CCCC00',
|
|
8986
|
+
'#CCCC33',
|
|
8987
|
+
'#FF0000',
|
|
8988
|
+
'#FF0033',
|
|
8989
|
+
'#FF0066',
|
|
8990
|
+
'#FF0099',
|
|
8991
|
+
'#FF00CC',
|
|
8992
|
+
'#FF00FF',
|
|
8993
|
+
'#FF3300',
|
|
8994
|
+
'#FF3333',
|
|
8995
|
+
'#FF3366',
|
|
8996
|
+
'#FF3399',
|
|
8997
|
+
'#FF33CC',
|
|
8998
|
+
'#FF33FF',
|
|
8999
|
+
'#FF6600',
|
|
9000
|
+
'#FF6633',
|
|
9001
|
+
'#FF9900',
|
|
9002
|
+
'#FF9933',
|
|
9003
|
+
'#FFCC00',
|
|
9004
|
+
'#FFCC33'
|
|
9005
|
+
];
|
|
9006
|
+
|
|
9007
|
+
/**
|
|
9008
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
9009
|
+
* and the Firebug extension (any Firefox version) are known
|
|
9010
|
+
* to support "%c" CSS customizations.
|
|
9011
|
+
*
|
|
9012
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
9013
|
+
*/
|
|
9014
|
+
|
|
9015
|
+
// eslint-disable-next-line complexity
|
|
9016
|
+
function useColors() {
|
|
9017
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
|
9018
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
9019
|
+
// explicitly
|
|
9020
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
9021
|
+
return true;
|
|
9022
|
+
}
|
|
9023
|
+
|
|
9024
|
+
// Internet Explorer and Edge do not support colors.
|
|
9025
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
9026
|
+
return false;
|
|
9027
|
+
}
|
|
9028
|
+
|
|
9029
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
9030
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
9031
|
+
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
9032
|
+
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
9033
|
+
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
9034
|
+
// Is firefox >= v31?
|
|
9035
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
9036
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
9037
|
+
// Double check webkit in userAgent just in case we are in a worker
|
|
9038
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
9039
|
+
}
|
|
9040
|
+
|
|
9041
|
+
/**
|
|
9042
|
+
* Colorize log arguments if enabled.
|
|
9043
|
+
*
|
|
9044
|
+
* @api public
|
|
9045
|
+
*/
|
|
9046
|
+
|
|
9047
|
+
function formatArgs(args) {
|
|
9048
|
+
args[0] = (this.useColors ? '%c' : '') +
|
|
9049
|
+
this.namespace +
|
|
9050
|
+
(this.useColors ? ' %c' : ' ') +
|
|
9051
|
+
args[0] +
|
|
9052
|
+
(this.useColors ? '%c ' : ' ') +
|
|
9053
|
+
'+' + module.exports.humanize(this.diff);
|
|
9054
|
+
|
|
9055
|
+
if (!this.useColors) {
|
|
9056
|
+
return;
|
|
9057
|
+
}
|
|
9058
|
+
|
|
9059
|
+
const c = 'color: ' + this.color;
|
|
9060
|
+
args.splice(1, 0, c, 'color: inherit');
|
|
9061
|
+
|
|
9062
|
+
// The final "%c" is somewhat tricky, because there could be other
|
|
9063
|
+
// arguments passed either before or after the %c, so we need to
|
|
9064
|
+
// figure out the correct index to insert the CSS into
|
|
9065
|
+
let index = 0;
|
|
9066
|
+
let lastC = 0;
|
|
9067
|
+
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
9068
|
+
if (match === '%%') {
|
|
9069
|
+
return;
|
|
9070
|
+
}
|
|
9071
|
+
index++;
|
|
9072
|
+
if (match === '%c') {
|
|
9073
|
+
// We only are interested in the *last* %c
|
|
9074
|
+
// (the user may have provided their own)
|
|
9075
|
+
lastC = index;
|
|
9076
|
+
}
|
|
9077
|
+
});
|
|
9078
|
+
|
|
9079
|
+
args.splice(lastC, 0, c);
|
|
9080
|
+
}
|
|
9081
|
+
|
|
9082
|
+
/**
|
|
9083
|
+
* Invokes `console.debug()` when available.
|
|
9084
|
+
* No-op when `console.debug` is not a "function".
|
|
9085
|
+
* If `console.debug` is not available, falls back
|
|
9086
|
+
* to `console.log`.
|
|
9087
|
+
*
|
|
9088
|
+
* @api public
|
|
9089
|
+
*/
|
|
9090
|
+
exports.log = console.debug || console.log || (() => {});
|
|
9091
|
+
|
|
9092
|
+
/**
|
|
9093
|
+
* Save `namespaces`.
|
|
9094
|
+
*
|
|
9095
|
+
* @param {String} namespaces
|
|
9096
|
+
* @api private
|
|
9097
|
+
*/
|
|
9098
|
+
function save(namespaces) {
|
|
9099
|
+
try {
|
|
9100
|
+
if (namespaces) {
|
|
9101
|
+
exports.storage.setItem('debug', namespaces);
|
|
9102
|
+
} else {
|
|
9103
|
+
exports.storage.removeItem('debug');
|
|
9104
|
+
}
|
|
9105
|
+
} catch (error) {
|
|
9106
|
+
// Swallow
|
|
9107
|
+
// XXX (@Qix-) should we be logging these?
|
|
9108
|
+
}
|
|
9109
|
+
}
|
|
9110
|
+
|
|
9111
|
+
/**
|
|
9112
|
+
* Load `namespaces`.
|
|
9113
|
+
*
|
|
9114
|
+
* @return {String} returns the previously persisted debug modes
|
|
9115
|
+
* @api private
|
|
9116
|
+
*/
|
|
9117
|
+
function load() {
|
|
9118
|
+
let r;
|
|
9119
|
+
try {
|
|
9120
|
+
r = exports.storage.getItem('debug');
|
|
9121
|
+
} catch (error) {
|
|
9122
|
+
// Swallow
|
|
9123
|
+
// XXX (@Qix-) should we be logging these?
|
|
9124
|
+
}
|
|
9125
|
+
|
|
9126
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
9127
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
9128
|
+
r = process.env.DEBUG;
|
|
9129
|
+
}
|
|
9130
|
+
|
|
9131
|
+
return r;
|
|
9132
|
+
}
|
|
9133
|
+
|
|
9134
|
+
/**
|
|
9135
|
+
* Localstorage attempts to return the localstorage.
|
|
9136
|
+
*
|
|
9137
|
+
* This is necessary because safari throws
|
|
9138
|
+
* when a user disables cookies/localstorage
|
|
9139
|
+
* and you attempt to access it.
|
|
9140
|
+
*
|
|
9141
|
+
* @return {LocalStorage}
|
|
9142
|
+
* @api private
|
|
9143
|
+
*/
|
|
9144
|
+
|
|
9145
|
+
function localstorage() {
|
|
9146
|
+
try {
|
|
9147
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
9148
|
+
// The Browser also has localStorage in the global context.
|
|
9149
|
+
return localStorage;
|
|
9150
|
+
} catch (error) {
|
|
9151
|
+
// Swallow
|
|
9152
|
+
// XXX (@Qix-) should we be logging these?
|
|
9153
|
+
}
|
|
9154
|
+
}
|
|
9155
|
+
|
|
9156
|
+
module.exports = common(exports);
|
|
9157
|
+
|
|
9158
|
+
const {formatters} = module.exports;
|
|
9159
|
+
|
|
9160
|
+
/**
|
|
9161
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
9162
|
+
*/
|
|
9163
|
+
|
|
9164
|
+
formatters.j = function (v) {
|
|
9165
|
+
try {
|
|
9166
|
+
return JSON.stringify(v);
|
|
9167
|
+
} catch (error) {
|
|
9168
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
9169
|
+
}
|
|
9170
|
+
};
|
|
9171
|
+
});
|
|
9172
|
+
|
|
9173
|
+
function s$2(){return index.getRenderingRef()}function l$1(){var e=s$2();return index.getElement(e)}function d$2(e,t){void 0===t&&(t={});var n=l$1();return h(n,e,t)}var p$1=browser$1("stencil-hook");
|
|
9174
|
+
|
|
8205
9175
|
var umd = stencilHooks_module.createCommonjsModule(function (module, exports) {
|
|
8206
9176
|
(function (global, factory) {
|
|
8207
9177
|
factory(exports) ;
|
|
@@ -8761,7 +9731,7 @@ var umd = stencilHooks_module.createCommonjsModule(function (module, exports) {
|
|
|
8761
9731
|
|
|
8762
9732
|
});
|
|
8763
9733
|
|
|
8764
|
-
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 stencilHooks_module.h(t,LOCALE_CONTEXT_NAME)}function H(){lazilyStartProgramContext();var e=_();return stencilHooks_module.h(e,PROGRAM_CONTEXT_NAME)}function G(){var e;return null==(e=J())?void 0:e.jwt}function J(){lazilyStartUserContext();var e=_(),n=stencilHooks_module.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(a,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=stencilHooks_module.h(s,"sq:graphql-client",{attempts:0}))?u:i),d=stencilHooks_module.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=stencilHooks_module.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;stencilHooks_module.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=stencilHooks_module.useRef(e),t=stencilHooks_module.useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),stencilHooks_module.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=stencilHooks_module.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=stencilHooks_module.useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function yn(){return stencilHooks_module.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=stencilHooks_module.y(n,Mn(e.namespace),e.initialValue),r=t[0],a=t[1];return stencilHooks_module.y(n,Dn(e.namespace),[r,a]),[r,a]}function Pn(e){var n=stencilHooks_module.d(Dn(e)),t=stencilHooks_module.d(Mn(e));return n?[t,n[1]]:[void 0,void 0]}function En(e){var n=stencilHooks_module.d(Dn(e));if(n)return n[1]}function Fn(e){return stencilHooks_module.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=stencilHooks_module.y(n,Mn(e.namespace),t),a=r[0],o=r[1];return stencilHooks_module.useEffect(function(){umd.deepEqual(t,a)||o(t);},[t,a]),t}function $n(e){return stencilHooks_module.d(Mn(e))||{data:null,loading:!0,refetch:function(){return console.warn("component still loading")}}}function kn(){var e=yn()[1];return stencilHooks_module.useEffect(function(){return history_default.listen(function(){e();})},[]),history_default.location}var An,jn=history_default;function qn(e){var n=stencilHooks_module.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"])));
|
|
9734
|
+
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(a,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=stencilHooks_module.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(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(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$1=t.errors,i=stencilHooks_module.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$1=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$1&&null!=(r=o$1.result)&&null!=(a=r.results)&&a.length){var i=o$1.result.results[0];if(i.success){var c=i.data.token,d=o(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$1,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(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;stencilHooks_module.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=stencilHooks_module.useRef(e),t=stencilHooks_module.useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),stencilHooks_module.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=stencilHooks_module.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(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=stencilHooks_module.useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function yn(){return stencilHooks_module.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$2(Dn(e)),t=d$2(Mn(e));return n?[t,n[1]]:[void 0,void 0]}function En(e){var n=d$2(Dn(e));if(n)return n[1]}function Fn(e){return d$2(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 stencilHooks_module.useEffect(function(){umd.deepEqual(t,a)||o(t);},[t,a]),t}function $n(e){return d$2(Mn(e))||{data:null,loading:!0,refetch:function(){return console.warn("component still loading")}}}function kn(){var e=yn()[1];return stencilHooks_module.useEffect(function(){return history_default.listen(function(){e();})},[]),history_default.location}var An,jn=history_default;function qn(e){var n=stencilHooks_module.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"])));
|
|
8765
9735
|
|
|
8766
9736
|
exports.$e = $e;
|
|
8767
9737
|
exports.$n = $n;
|
|
@@ -8790,7 +9760,6 @@ exports.Ve = Ve;
|
|
|
8790
9760
|
exports.Xe = Xe;
|
|
8791
9761
|
exports._ = _;
|
|
8792
9762
|
exports.an = an;
|
|
8793
|
-
exports.dist = dist$1;
|
|
8794
9763
|
exports.getEnvironmentSDK = getEnvironmentSDK;
|
|
8795
9764
|
exports.hn = hn;
|
|
8796
9765
|
exports.isDemo = isDemo;
|
|
@@ -8798,11 +9767,9 @@ exports.je = je;
|
|
|
8798
9767
|
exports.jn = jn;
|
|
8799
9768
|
exports.kn = kn;
|
|
8800
9769
|
exports.ln = ln;
|
|
8801
|
-
exports.memoize = memoize$1;
|
|
8802
9770
|
exports.nn = nn;
|
|
8803
9771
|
exports.setProgramId = setProgramId;
|
|
8804
9772
|
exports.setUserIdentity = setUserIdentity;
|
|
8805
|
-
exports.src = src;
|
|
8806
9773
|
exports.un = un;
|
|
8807
9774
|
exports.useCallback = useCallback;
|
|
8808
9775
|
exports.vn = vn;
|