@saasquatch/mint-components 2.1.9-6 → 2.1.9-8
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/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/{sqm-big-stat_45.cjs.entry.js → sqm-big-stat_46.cjs.entry.js} +367 -3
- package/dist/cjs/sqm-code-verification.cjs.entry.js +3 -4
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +8 -11
- package/dist/cjs/{sqm-partner-info-modal-view-e3faede9.js → sqm-partner-info-modal-view-cd758f12.js} +1 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +27 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +1 -2
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +10 -11
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +1 -1
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
- package/dist/collection/components/sqm-widget-verification/WidgetVerification.stories.js +16 -0
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +3 -4
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +0 -2
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +49 -1
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +1 -0
- package/dist/esm/{ShadowViewAddon-d382a63e.js → ShadowViewAddon-657d18f0.js} +5 -5
- package/dist/esm/{data-a6752028.js → data-2b0feb3f.js} +2 -2
- package/dist/esm/{global-b2ee3a12.js → global-39f55ec2.js} +1 -1
- package/dist/esm/{index.module-e266b4d7.js → index.module-cede12c6.js} +1 -1
- package/dist/esm/{keys-406491dc.js → keys-db1897ae.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mint-components.js +3 -3
- package/dist/esm/{re-render-4f4bd4da.js → re-render-7a0c7976.js} +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +9 -9
- package/dist/esm/{sqm-big-stat_45.entry.js → sqm-big-stat_46.entry.js} +379 -16
- package/dist/esm/sqm-close-button.entry.js +1 -1
- package/dist/esm/sqm-code-verification.entry.js +7 -8
- package/dist/esm/sqm-context-router.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +12 -15
- package/dist/esm/sqm-empty_4.entry.js +2 -2
- package/dist/esm/sqm-google-sign-in.entry.js +1 -1
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
- package/dist/esm/{sqm-lead-checkbox-field-view-00d76ba1.js → sqm-lead-checkbox-field-view-7cee2b4e.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +4 -4
- package/dist/esm/{sqm-lead-input-field-view-d8f76a9d.js → sqm-lead-input-field-view-11a4f9a9.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +4 -4
- package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
- package/dist/esm/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm/{sqm-navigation-sidebar-item-view-7f966119.js → sqm-navigation-sidebar-item-view-48e7e0d3.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
- package/dist/esm/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +3 -3
- package/dist/esm/{sqm-partner-info-modal-view-77c231af.js → sqm-partner-info-modal-view-dbedda28.js} +1 -2
- package/dist/esm/sqm-password-field.entry.js +2 -2
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-13e25037.js → sqm-portal-email-verification-view-80736644.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +4 -4
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-a172bdcc.js → sqm-portal-profile-view-a6be8558.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +4 -4
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/{sqm-portal-verify-email-view-c1a72c4f.js → sqm-portal-verify-email-view-92297506.js} +1 -1
- package/dist/esm/sqm-qr-code.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +5 -5
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
- package/dist/esm/sqm-stencilbook.entry.js +41 -15
- package/dist/esm/sqm-tab.entry.js +2 -2
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{sqm-user-info-form-view-ef04a79f.js → sqm-user-info-form-view-f9026468.js} +2 -2
- package/dist/esm/sqm-widget-verification-controller.entry.js +2 -2
- package/dist/esm/{useChildElements-31ba3daf.js → useChildElements-c26d7347.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-1388dace.js → useInstantAccessRegistration-e2392f42.js} +2 -2
- package/dist/esm/{useLeadFormState-cec544ea.js → useLeadFormState-9099c8d4.js} +2 -2
- package/dist/esm/{usePayoutStatus-24145412.js → usePayoutStatus-fa504d49.js} +1 -1
- package/dist/esm/{usePortalRegistrationForm-6d562bf8.js → usePortalRegistrationForm-5844032a.js} +2 -2
- package/dist/esm/{useReferralCodes-1ca1fda0.js → useReferralCodes-3cde72d4.js} +1 -1
- package/dist/esm/{useReferralTable-456931fd.js → useReferralTable-35e6d4c1.js} +3 -3
- package/dist/esm/{useRegistrationFormState-0cee2d21.js → useRegistrationFormState-1813bdef.js} +1 -1
- package/dist/esm/{useVerificationEmail-5c6cd733.js → useVerificationEmail-cb3d51e3.js} +1 -1
- package/dist/esm/{utilities-f05633da.js → utilities-c9e730ed.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-d382a63e.js → ShadowViewAddon-657d18f0.js} +1 -1
- package/dist/esm-es5/{data-a6752028.js → data-2b0feb3f.js} +1 -1
- package/dist/esm-es5/{global-b2ee3a12.js → global-39f55ec2.js} +1 -1
- package/dist/esm-es5/{index.module-e266b4d7.js → index.module-cede12c6.js} +1 -1
- package/dist/esm-es5/{keys-406491dc.js → keys-db1897ae.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-4f4bd4da.js → re-render-7a0c7976.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -0
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.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-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-00d76ba1.js → sqm-lead-checkbox-field-view-7cee2b4e.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-d8f76a9d.js → sqm-lead-input-field-view-11a4f9a9.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.entry.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-7f966119.js → sqm-navigation-sidebar-item-view-48e7e0d3.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-partner-info-modal-view-dbedda28.js +1 -0
- 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-13e25037.js → sqm-portal-email-verification-view-80736644.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-a172bdcc.js → sqm-portal-profile-view-a6be8558.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-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-c1a72c4f.js → sqm-portal-verify-email-view-92297506.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.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-user-info-form-view-ef04a79f.js → sqm-user-info-form-view-f9026468.js} +1 -1
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/{useChildElements-31ba3daf.js → useChildElements-c26d7347.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-1388dace.js → useInstantAccessRegistration-e2392f42.js} +1 -1
- package/dist/esm-es5/{useLeadFormState-cec544ea.js → useLeadFormState-9099c8d4.js} +1 -1
- package/dist/esm-es5/{usePayoutStatus-24145412.js → usePayoutStatus-fa504d49.js} +1 -1
- package/dist/esm-es5/{usePortalRegistrationForm-6d562bf8.js → usePortalRegistrationForm-5844032a.js} +1 -1
- package/dist/esm-es5/{useReferralCodes-1ca1fda0.js → useReferralCodes-3cde72d4.js} +1 -1
- package/dist/esm-es5/{useReferralTable-456931fd.js → useReferralTable-35e6d4c1.js} +1 -1
- package/dist/esm-es5/{useRegistrationFormState-0cee2d21.js → useRegistrationFormState-1813bdef.js} +1 -1
- package/dist/esm-es5/{useVerificationEmail-5c6cd733.js → useVerificationEmail-cb3d51e3.js} +1 -1
- package/dist/esm-es5/{utilities-f05633da.js → utilities-c9e730ed.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-51b8ed78.js → p-014977d7.js} +1 -1
- package/dist/mint-components/{p-30967f75.js → p-092db51a.js} +1 -1
- package/dist/mint-components/{p-bd804f4c.js → p-095b7128.js} +1 -1
- package/dist/mint-components/{p-bae7d6b5.system.entry.js → p-098d134a.system.entry.js} +1 -1
- package/dist/mint-components/{p-504ed1f2.entry.js → p-0c43b6ff.entry.js} +1 -1
- package/dist/mint-components/{p-ab678644.js → p-0d75a207.js} +1 -1
- package/dist/mint-components/{p-473562fc.system.js → p-140e6a15.system.js} +1 -1
- package/dist/mint-components/{p-fa32d8eb.system.entry.js → p-15a703c7.system.entry.js} +1 -1
- package/dist/mint-components/p-160764bc.system.entry.js +1 -0
- package/dist/mint-components/{p-b9652150.entry.js → p-160828b4.entry.js} +1 -1
- package/dist/mint-components/{p-878bb2cf.system.entry.js → p-16deb1a9.system.entry.js} +1 -1
- package/dist/mint-components/{p-1435edd4.entry.js → p-1b0cbbae.entry.js} +1 -1
- package/dist/mint-components/{p-f50c3306.entry.js → p-1b2fcd7f.entry.js} +1 -1
- package/dist/mint-components/p-1c413a06.system.js +1 -0
- package/dist/mint-components/{p-2774c704.system.entry.js → p-21e7079a.system.entry.js} +1 -1
- package/dist/mint-components/{p-695ec086.system.js → p-28e0062c.system.js} +1 -1
- package/dist/mint-components/{p-c8060ef5.system.entry.js → p-2f4d8ab8.system.entry.js} +1 -1
- package/dist/mint-components/{p-dfb50245.entry.js → p-3181e54a.entry.js} +1 -1
- package/dist/mint-components/{p-5d79c8a0.system.js → p-31dde9fc.system.js} +1 -1
- package/dist/mint-components/{p-d863acaa.js → p-32d078a3.js} +1 -1
- package/dist/mint-components/{p-7528770e.entry.js → p-3461a8cb.entry.js} +1 -1
- package/dist/mint-components/{p-6e816a17.system.entry.js → p-357040e6.system.entry.js} +1 -1
- package/dist/mint-components/{p-452f644f.system.js → p-36395228.system.js} +1 -1
- package/dist/mint-components/{p-5245e4ce.system.entry.js → p-3756d0d1.system.entry.js} +1 -1
- package/dist/mint-components/{p-5f6d617a.entry.js → p-37658fec.entry.js} +1 -1
- package/dist/mint-components/p-39840341.js +1 -0
- package/dist/mint-components/{p-5126508b.js → p-3c333076.js} +1 -1
- package/dist/mint-components/{p-6684e9ad.js → p-3c555674.js} +1 -1
- package/dist/mint-components/{p-21851092.js → p-3c88d2ed.js} +2 -2
- package/dist/mint-components/{p-e7a9ce16.js → p-438f6702.js} +1 -1
- package/dist/mint-components/{p-fe0eceba.system.entry.js → p-45475cf9.system.entry.js} +1 -1
- package/dist/mint-components/{p-f7948b16.system.entry.js → p-52748a87.system.entry.js} +1 -1
- package/dist/mint-components/{p-614630a8.system.js → p-54bf015a.system.js} +1 -1
- package/dist/mint-components/{p-d2d2c4ea.system.entry.js → p-59f69bdc.system.entry.js} +1 -1
- package/dist/mint-components/{p-96cbca52.system.entry.js → p-5c9d030a.system.entry.js} +1 -1
- package/dist/mint-components/{p-1b7b65ef.entry.js → p-5dc9e95b.entry.js} +2 -2
- package/dist/mint-components/{p-82be3d10.system.entry.js → p-60085f20.system.entry.js} +1 -1
- package/dist/mint-components/{p-cc0fe4a3.entry.js → p-608da224.entry.js} +1 -1
- package/dist/mint-components/{p-5825aee6.system.entry.js → p-6194855b.system.entry.js} +1 -1
- package/dist/mint-components/{p-b8766db9.entry.js → p-62212b9a.entry.js} +1 -1
- package/dist/mint-components/{p-f3ddbe2f.system.entry.js → p-62e1c8b2.system.entry.js} +1 -1
- package/dist/mint-components/p-63c299f1.system.js +1 -0
- package/dist/mint-components/{p-adb56df3.system.entry.js → p-64b56141.system.entry.js} +1 -1
- package/dist/mint-components/{p-1b9705fd.system.js → p-64f56cc9.system.js} +1 -1
- package/dist/mint-components/p-6638c7c6.system.js +1 -0
- package/dist/mint-components/{p-f95952a0.system.entry.js → p-66c0100c.system.entry.js} +1 -1
- package/dist/mint-components/{p-2ad9470d.system.entry.js → p-6a4496b3.system.entry.js} +1 -1
- package/dist/mint-components/{p-1775cb0c.system.js → p-70e34ae1.system.js} +2 -2
- package/dist/mint-components/p-7144ac40.js +1 -0
- package/dist/mint-components/{p-20280398.system.entry.js → p-71545bfd.system.entry.js} +1 -1
- package/dist/mint-components/{p-6d444f3f.system.js → p-74aac245.system.js} +1 -1
- package/dist/mint-components/{p-59644ef8.system.js → p-7547180f.system.js} +1 -1
- package/dist/mint-components/{p-f84605ec.system.js → p-77117f6c.system.js} +1 -1
- package/dist/mint-components/p-7a5814ef.system.entry.js +1 -0
- package/dist/mint-components/{p-a03189bd.js → p-7e36a1ff.js} +1 -1
- package/dist/mint-components/{p-5450693e.entry.js → p-8139fdec.entry.js} +1 -1
- package/dist/mint-components/{p-320b306b.js → p-8474aa63.js} +1 -1
- package/dist/mint-components/{p-33a6ab09.js → p-857a2d77.js} +1 -1
- package/dist/mint-components/{p-b179621d.system.js → p-86381dc7.system.js} +1 -1
- package/dist/mint-components/{p-e502fd80.entry.js → p-86a70151.entry.js} +1 -1
- package/dist/mint-components/{p-a30f0ffd.entry.js → p-886fb141.entry.js} +1 -1
- package/dist/mint-components/{p-b6fc53c9.entry.js → p-88c9cc1b.entry.js} +1 -1
- package/dist/mint-components/{p-97b8c481.js → p-896390f9.js} +1 -1
- package/dist/mint-components/{p-fca34d77.js → p-8f9c1387.js} +1 -1
- package/dist/mint-components/{p-44afc747.entry.js → p-93c5c8ec.entry.js} +1 -1
- package/dist/mint-components/{p-9c381424.system.entry.js → p-95aaf35a.system.entry.js} +1 -1
- package/dist/mint-components/{p-f6fc7569.entry.js → p-96e4e6a4.entry.js} +1 -1
- package/dist/mint-components/{p-ed17e1b8.entry.js → p-991f60fc.entry.js} +1 -1
- package/dist/mint-components/{p-353ab6db.entry.js → p-996eb820.entry.js} +1 -1
- package/dist/mint-components/{p-b8288385.system.entry.js → p-998c989a.system.entry.js} +1 -1
- package/dist/mint-components/{p-82905fda.system.js → p-9b33e2a7.system.js} +1 -1
- package/dist/mint-components/{p-7767314d.system.entry.js → p-9bd53e4d.system.entry.js} +1 -1
- package/dist/mint-components/{p-89f8ab67.entry.js → p-9c1b0c8b.entry.js} +1 -1
- package/dist/mint-components/{p-07f3b868.entry.js → p-9e43f1eb.entry.js} +1 -1
- package/dist/mint-components/{p-9fa6606e.js → p-a5912b2f.js} +1 -1
- package/dist/mint-components/{p-7a7ebf08.js → p-a7ee6531.js} +1 -1
- package/dist/mint-components/{p-83277c69.system.js → p-a86ce218.system.js} +1 -1
- package/dist/mint-components/{p-d6c1e876.system.js → p-a8ecdc44.system.js} +1 -1
- package/dist/mint-components/p-a9bf9d3c.entry.js +291 -0
- package/dist/mint-components/p-adcc37f3.entry.js +105 -0
- package/dist/mint-components/{p-f3b21df2.system.js → p-b1b8e629.system.js} +1 -1
- package/dist/mint-components/{p-93cb9438.system.entry.js → p-b297016f.system.entry.js} +1 -1
- package/dist/mint-components/p-b2a99637.system.js +1 -0
- package/dist/mint-components/p-b2bde2f5.entry.js +1 -0
- package/dist/mint-components/{p-d2448c85.system.entry.js → p-b451970a.system.entry.js} +1 -1
- package/dist/mint-components/{p-4da8028d.system.entry.js → p-b5c0bad5.system.entry.js} +1 -1
- package/dist/mint-components/{p-ad017a39.js → p-b5f57914.js} +1 -1
- package/dist/mint-components/{p-80174c14.entry.js → p-b5fed7c6.entry.js} +1 -1
- package/dist/mint-components/{p-c2c01ab5.entry.js → p-ba953c21.entry.js} +1 -1
- package/dist/mint-components/{p-47f594c3.entry.js → p-bba694e4.entry.js} +1 -1
- package/dist/mint-components/{p-d5375baf.js → p-bcadd021.js} +1 -1
- package/dist/mint-components/{p-79854479.system.js → p-be63f29b.system.js} +1 -1
- package/dist/mint-components/p-bfbfde38.entry.js +33 -0
- package/dist/mint-components/{p-07da0ddd.system.entry.js → p-c7535e70.system.entry.js} +1 -1
- package/dist/mint-components/{p-d42aba0e.system.js → p-c84a2512.system.js} +1 -1
- package/dist/mint-components/{p-55b1be64.system.entry.js → p-c8e45671.system.entry.js} +1 -1
- package/dist/mint-components/{p-e5e8e13e.js → p-ce11858c.js} +1 -1
- package/dist/mint-components/{p-1d450b85.js → p-d20188db.js} +1 -1
- package/dist/mint-components/{p-6a754f51.entry.js → p-d2927531.entry.js} +2 -2
- package/dist/mint-components/{p-e4d3b7a9.system.js → p-d355336b.system.js} +1 -1
- package/dist/mint-components/{p-5822a43f.system.entry.js → p-d5a1c979.system.entry.js} +1 -1
- package/dist/mint-components/p-d6714617.entry.js +1 -0
- package/dist/mint-components/{p-5e106c95.system.js → p-d798004f.system.js} +1 -1
- package/dist/mint-components/p-dac1f2cb.system.entry.js +1 -0
- package/dist/mint-components/{p-7333d103.system.entry.js → p-dbdb2a46.system.entry.js} +1 -1
- package/dist/mint-components/{p-c756bc32.system.js → p-e4dbca9a.system.js} +1 -1
- package/dist/mint-components/{p-7c0255ad.entry.js → p-e5ee6cf5.entry.js} +2 -2
- package/dist/mint-components/{p-8f5b316e.js → p-e95402dc.js} +1 -1
- package/dist/mint-components/{p-0a900fb1.system.entry.js → p-e9e05970.system.entry.js} +1 -1
- package/dist/mint-components/{p-546a65c7.system.js → p-eaf5d0af.system.js} +1 -1
- package/dist/mint-components/{p-84866680.entry.js → p-f11d29fd.entry.js} +1 -1
- package/dist/mint-components/{p-dece706f.js → p-f18a6658.js} +1 -1
- package/dist/mint-components/{p-06ca4346.entry.js → p-f4a57aed.entry.js} +1 -1
- package/dist/mint-components/{p-2e2c5ec4.entry.js → p-f972e5c9.entry.js} +1 -1
- package/dist/mint-components/{p-91c4b8d5.system.entry.js → p-fb4ab5ba.system.entry.js} +1 -1
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +3 -3
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +1 -0
- package/dist/types/components/sqm-widget-verification/WidgetVerification.stories.d.ts +8 -0
- package/dist/types/components.d.ts +5 -5
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/cjs/extractProps-fd93ba62.js +0 -21
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -314
- package/dist/esm/extractProps-ae1afbb3.js +0 -19
- package/dist/esm/sqm-widget-verification.entry.js +0 -310
- package/dist/esm-es5/extractProps-ae1afbb3.js +0 -1
- package/dist/esm-es5/sqm-big-stat_45.entry.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-77c231af.js +0 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +0 -1
- package/dist/mint-components/p-0f723dbb.entry.js +0 -19
- package/dist/mint-components/p-1b0d7020.js +0 -1
- package/dist/mint-components/p-26468242.js +0 -1
- package/dist/mint-components/p-2c0bb139.entry.js +0 -33
- package/dist/mint-components/p-35724e1c.entry.js +0 -1
- package/dist/mint-components/p-38c7775a.js +0 -1
- package/dist/mint-components/p-4b365f1f.system.js +0 -1
- package/dist/mint-components/p-515ac953.system.entry.js +0 -1
- package/dist/mint-components/p-57dd28bd.system.js +0 -1
- package/dist/mint-components/p-5a446168.entry.js +0 -273
- package/dist/mint-components/p-71c585b7.entry.js +0 -1
- package/dist/mint-components/p-78909fc0.system.js +0 -1
- package/dist/mint-components/p-a8645c1b.system.js +0 -1
- package/dist/mint-components/p-ac3148b1.system.entry.js +0 -1
- package/dist/mint-components/p-aeb01a77.system.entry.js +0 -1
- package/dist/mint-components/p-e44c816e.system.js +0 -1
- package/dist/mint-components/p-e9a596d6.system.entry.js +0 -1
- package/dist/mint-components/p-eca21075.entry.js +0 -105
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import{h as r,r as t}from"./p-083180bf.js";import{i as o}from"./p-438f6702.js";import{k as n,f as e,n as a}from"./p-a7fc1e02.js";import{d as i,t as s,w as l,J as c,$ as u,i as d,r as p,L as m}from"./p-d20188db.js";import{c as b}from"./p-c1086930.js";import{g as v}from"./p-9ec99ced.js";import{c as f}from"./p-cef45012.js";import{T as h}from"./p-cabf6326.js";import{P as y}from"./p-7144ac40.js";import{S as g,a as q,V as x}from"./p-39840341.js";import{T as w}from"./p-28ed2ae9.js";import{p as k}from"./p-13f3a647.js";import{u as C}from"./p-0d75a207.js";const S=i.gql`
|
|
2
|
+
mutation upsertUser($userInput: UserInput!) {
|
|
3
|
+
upsertUser(userInput: $userInput) {
|
|
4
|
+
id
|
|
5
|
+
accountId
|
|
6
|
+
email
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
`,I=i.gql`
|
|
10
|
+
query user {
|
|
11
|
+
viewer {
|
|
12
|
+
... on User {
|
|
13
|
+
id
|
|
14
|
+
accountId
|
|
15
|
+
email
|
|
16
|
+
impactConnection {
|
|
17
|
+
user {
|
|
18
|
+
id
|
|
19
|
+
email
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;const P=f({Wrapper:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",marginTop:"var(--sl-spacing-medium)"},InputsContainer:{display:"flex",gap:"var(--sl-spacing-medium)",position:"relative",flexDirection:"column"},ContinueButton:{width:"100%"},SkeletonOne:{width:"50%",height:"16px"},SkeletonTwo:{width:"30%",height:"34px"},SkeletonThree:{width:"15%",height:"24px"},ErrorInput:{"&::part(base)":{border:"var(--sqm-border-thickness) solid var(--sqm-danger-color-border)",borderRadius:"var(--sqm-input-border-radius)"},"&::part(help-text)":{color:"var(--sqm-danger-color-text)"}}}),T=P.toString();function j(t){const{states:n,callbacks:e,text:a}=t;return r("div",{part:"sqm-base"},r("style",{type:"text/css"},'\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n\na {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n\n*::part(primarybutton-base),\nsl-button[type="primary"]::part(base) {\n font-family: var(--sqm-primary-font);\n width: 100%;\n background-color: var(--sqm-primary-button-background);\n color: var(--sqm-primary-button-color);\n border-color: var(--sqm-primary-button-color-border);\n border-radius: var(--sqm-primary-button-radius);\n}\n\n*::part(primarybutton-base):hover,\nsl-button[type="primary"]::part(base):hover{\n background-color: var(--sqm-primary-button-background-hover);\n border-color: var(--sqm-primary-button-border-color-hover);\n color: var(--sqm-primary-button-color-hover);\n}\n\n\n*::part(primarybutton-base):focus,\nsl-button[type="primary"]::part(base):focus {\n box-shadow: none;\n}\n\n*::part(secondarybutton-base),\nsl-button[type="secondary"]::part(base) {\nfont-family: var(--sqm-primary-font);\n background-color: var(--sqm-secondary-button-background);\n color: var(--sqm-secondary-button-color);\n border-color: var(--sqm-secondary-button-color-border);\n border-radius: var(--sqm-secondary-button-radius);\n}\n\n*::part(secondarybutton-base):hover,\nsl-button[type="secondary"]::part(base):hover {\n background-color: var(--sqm-secondary-button-background-hover);\n color: var(--sqm-secondary-button-color-hover);\n border-color: var(--sqm-secondary-button-border-color-hover);\n}\n\n*::part(input-label), *::part(select-label), *::part(textarea-label){\n font-family: var(--sqm-primary-font);\n font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));\n font-weight: var(--sl-font-weight-semibold);\n color: var(--sqm-input-label-color, var(--sqm-text), black);\n}\n\n*::part(input-base), *::part(select-base), *::part(textarea-base){\n font-family: var(--sqm-primary-font);\n background-color: var(--sqm-input-background, #fff);\n border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);\n color: var(--sqm-input-color, white);\n border-width: var(--sqm-border-thickness, 1px);\n}\n\n*::part(input-base):hover, *::part(select-base):hover, *::part(textarea-base):hover{\n border-color: var(--sqm-border-color-hover);\n}\n\n*::part(input-base):focus, *::part(select-base):focus, *::part(textarea-base):focus{\n border-color: var(--sqm-border-color-focus);\n}\n\nsqm-name-fields::part(input-base) {\n font-family: var(--sqm-primary-font);\n background-color: var(--sqm-input-background, #fff);\n border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);\n color: var(--sqm-input-color, white);\n border-width: var(--sqm-border-thickness, 1px);\n}\n\nsl-input::part(base):focus,\nsl-select::part(form-control-wrapper):focus,\nsl-textarea::part(textarea-label):focus {\n border-color: var(--sqm-border-color-focus);\n}\n\n*::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{\n background: var(--sqm-input-disabled-background, #f5f5f5);\n color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));\n}\n\n*::part(input):-webkit-autofill {\n box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;\n -webkit-text-fill-color: var(--sqm-input-color, white) !important;\n}\n\n*::part(input):-webkit-autofill:hover {\n box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;\n -webkit-text-fill-color: var(--sqm-input-color, white) !important;\n}\n\n*::part(input):-webkit-autofill:focus {\n box-shadow: 0 0 0 50px var(--sqm-input-background, #fff) inset !important;\n -webkit-text-fill-color: var(--sqm-input-color, white) !important;\n}\n\n*::part(input)::placeholder,\n*::part(select)::placeholder, \n*::part(textarea)::placeholder {\n font-family: var(--sqm-primary-font);\n color: var(--sqm-text-subdued);\n}\n\n*::part(input)::-webkit-input-placeholder,\n*::part(select)::-webkit-input-placeholder,\n*::part(textarea)::-webkit-input-placeholder {\n font-family: var(--sqm-primary-font);\n color: var(--sqm-text-subdued);\n}\n\n*::part(input)::-moz-placeholder,\n*::part(select)::-moz-placeholder,\n*::part(textarea)::-moz-placeholder {\n font-family: var(--sqm-primary-font);\n opacity: 1; /* Firefox adds an opacity to placeholders by default */\n color: var(--sqm-text-subdued);\n}\n\n*::part(input)::-ms-input-placeholder,\n*::part(select)::-ms-input-placeholder,\n*::part(textarea)::-ms-input-placeholder {\n font-family: var(--sqm-primary-font);\n color: var(--sqm-text-subdued);\n}\n\n\n',T),n.sendCodeError&&r("sqm-form-message",{type:"error"},r("p",{part:"alert-title"},a.sendCodeErrorHeader),o.formatMessage({id:"sendCodeErrorDescription",defaultMessage:a.sendCodeErrorDescription},{supportLink:r("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},a.supportLink)})),n.initialLoading?r("div",{class:P.classes.Wrapper},r("sqm-skeleton",{height:"16px",width:"50%"}),r("sqm-skeleton",{height:"16px",width:"50%"}),r("sqm-skeleton",{height:"16px",width:"50%"}),r("sqm-skeleton",{height:"34px",width:"30%"}),r("sqm-skeleton",{height:"24px",width:"15%"}),r("sl-button",{submit:!0,class:P.classes.ContinueButton,loading:!0,exportparts:"base: primarybutton-base",type:"primary"},a.sendCodeText)):r("div",{class:P.classes.Wrapper},r(h,{type:"p"},a.verifyEmailHeaderText),r("sl-form",{"onSl-submit":e.submitEmail},r("div",{class:P.classes.InputsContainer},r("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",label:a.emailLabel,value:n.email||"",type:"email",id:"email",name:"email",disabled:!!n.email||n.loading},n.error?{class:P.classes.ErrorInput,helpText:a.emailValidationErrorText}:{})),r("sl-button",{submit:!0,class:P.classes.ContinueButton,loading:n.loading,exportparts:"base: primarybutton-base",type:"primary"},a.sendCodeText)))))}const E=class{constructor(r){t(this,r),this.verifyEmailHeaderText="Start by verifying your email. We’ll send you a code through our referral provider, impact.com.",this.sendCodeErrorHeader="There was an error sending your code",this.supportLink="support team",this.sendCodeErrorDescription="Please try again. If this problem continues, contact our program {supportLink}.",this.emailLabel="Email",this.sendCodeText="Send code",this.emailValidationErrorText="Please enter a valid email",a(this)}disconnectedCallback(){}getTextProps(){return v(this)}render(){const t=d()?function(r){const t=p(g);return b({states:{error:!0,initialLoading:!1,loading:!1,email:"test@example.com",sendCodeError:!0},callbacks:{submitEmail:async()=>t(!0)},text:r.getTextProps()},r.demoData||{},{arrayMerge:(r,t)=>t})}(this):function(r){const[t,o]=s(g),[a,i]=s(q),[d,p]=n(!1),[m,b]=n(!1),[v,f]=n(!1),{initialized:h,send:[y,{}]}=C(),[x]=function(){const r=c(),[t,{loading:o,data:n,errors:e}]=u(S);return[async o=>{try{const n=await t({userInput:{id:r.id,accountId:r.accountId,email:o}});if(n instanceof Error||!n)throw new Error;return n}catch(r){return void console.error("Could not set email on user",r)}},{loading:o,data:n,errors:e}]}(),[w,k]=n(!0),{data:P,loading:T}=l(I,{}),j=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e((()=>{(null==P?void 0:P.viewer)&&p(!!P.viewer.email)}),[P]),e((()=>{h&&k(!1)}),[h]),{callbacks:{submitEmail:async r=>{if(r.preventDefault(),!(null==P?void 0:P.viewer))return;k(!0);const t=P.viewer.email;if(!t){const t=r.detail.formData.get("email").toString();if(!j.test(t))return void b(!0);const o=await x(t);o&&o.user.email||b(!0)}if(!h)return;const n=await y();n&&n.success?(i(t),o(!0)):f(!0),k(!1)}},states:{loading:w,initialLoading:T&&!h,error:m,email:null==P?void 0:P.viewer.email,sendCodeError:v},text:r.getTextProps()}}(this);return r(j,Object.assign({},t))}},N=i.gql`
|
|
26
|
+
query getUserPartnerInfo {
|
|
27
|
+
user: viewer {
|
|
28
|
+
... on User {
|
|
29
|
+
id
|
|
30
|
+
accountId
|
|
31
|
+
firstName
|
|
32
|
+
lastName
|
|
33
|
+
email
|
|
34
|
+
countryCode
|
|
35
|
+
customFields
|
|
36
|
+
impactConnection {
|
|
37
|
+
connected
|
|
38
|
+
publisher {
|
|
39
|
+
phoneNumber
|
|
40
|
+
phoneNumberCountryCode
|
|
41
|
+
countryCode
|
|
42
|
+
currency
|
|
43
|
+
requiredTaxDocumentType
|
|
44
|
+
currentTaxDocument {
|
|
45
|
+
type
|
|
46
|
+
status
|
|
47
|
+
}
|
|
48
|
+
withdrawalSettings {
|
|
49
|
+
paymentMethod
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`,L=i.gql`
|
|
57
|
+
query getCountries {
|
|
58
|
+
impactPayoutCountries(limit: 1000) {
|
|
59
|
+
data {
|
|
60
|
+
countryCode
|
|
61
|
+
displayName
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`,z=i.gql`
|
|
66
|
+
query currencies($locale: RSLocale) {
|
|
67
|
+
currencies(limit: 300) {
|
|
68
|
+
data {
|
|
69
|
+
displayName(locale: $locale)
|
|
70
|
+
currencyCode
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`,D=i.gql`
|
|
75
|
+
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
76
|
+
createImpactConnection(impactConnectionInput: $vars) {
|
|
77
|
+
success
|
|
78
|
+
validationErrors {
|
|
79
|
+
field
|
|
80
|
+
message
|
|
81
|
+
}
|
|
82
|
+
user {
|
|
83
|
+
id
|
|
84
|
+
accountId
|
|
85
|
+
impactConnection {
|
|
86
|
+
connected
|
|
87
|
+
publisher {
|
|
88
|
+
brandedSignup
|
|
89
|
+
requiredTaxDocumentType
|
|
90
|
+
currentTaxDocument {
|
|
91
|
+
type
|
|
92
|
+
status
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`,$=i.gql`
|
|
100
|
+
query getTenantSettings {
|
|
101
|
+
tenantSettings {
|
|
102
|
+
companyName
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`,U=class{constructor(r){t(this,r),this.brandName="",this.modalHeader="Let's get you ready for rewards",this.modalHeaderExistingPartner="We found an existing account",this.descriptionNewPartner="Confirm your country and currency now to get your future rewards faster.",this.descriptionExistingPartner="We found an account with this email on our referral program provider, impact.com. Please confirm your country and currency now to get your future rewards faster.",this.supportDescriptionExistingPartner="If this is a mistake, please contact Support or sign up for this referral program with a different email.",this.countryLabel="Country",this.currencyLabel="Currency",this.submitButtonLabel="Submit",this.confirmButtonLabel="Confirm",this.searchCountryPlaceholder="Search for a country",this.searchCurrencyPlaceholder="Search for a currency",this.networkErrorText="An error occurred. Please try again.",this.missingFieldsErrorText="Please select both a country and currency.",this.stateController="{}",a(this)}disconnectedCallback(){}getTextProps(){return v(this)}render(){const t=d()?function(r){const[t,o]=n("US"),[e,a]=n(""),[i,s]=n(""),l=k(r.stateController);return b({states:{brandName:"Test Brand",open:!0,loading:!1,submitting:!1,isExistingPartner:!1,countryCode:t,currency:e,error:i,success:!1,filteredCountries:[],filteredCurrencies:[]},callbacks:{onCountryChange:r=>{var t,n;const e=null===(n=null===(t=null==r?void 0:r.detail)||void 0===t?void 0:t.item)||void 0===n?void 0:n.__value;e&&(o(e),a(""))},onCurrencyChange:r=>{var t,o;const n=null===(o=null===(t=null==r?void 0:r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&a(n)},setCountrySearch:()=>{},setCurrencySearch:()=>{},onSubmit:()=>{s(t&&e?"":r.missingFieldsErrorText)},onClose:()=>{}},text:{modalHeader:r.modalHeader,descriptionNewPartner:r.descriptionNewPartner,descriptionExistingPartner:r.descriptionExistingPartner,countryLabel:r.countryLabel,currencyLabel:r.currencyLabel,submitButtonLabel:r.submitButtonLabel,confirmButtonLabel:r.confirmButtonLabel,searchCountryPlaceholder:r.searchCountryPlaceholder,searchCurrencyPlaceholder:r.searchCurrencyPlaceholder,supportDescriptionExistingPartner:r.supportDescriptionExistingPartner,modalHeaderExistingPartner:r.modalHeaderExistingPartner}},r.demoData||((null==l?void 0:l["sqm-partner-info-modal"])||l||{}),{arrayMerge:(r,t)=>t})}(this):function(r){var t,o,a,i,s,c,d,b,v;const f=m(),h=p(x),{data:y,loading:g,refetch:q}=l(N,{}),k=null==y?void 0:y.user,{data:C,loading:S}=l(z,{variables:{locale:f}}),{data:I,loading:P}=l(L,{}),{data:T}=l($,{}),[j,{loading:E}]=u(D),[U,_]=n((null===(o=null===(t=null==k?void 0:k.impactConnection)||void 0===t?void 0:t.publisher)||void 0===o?void 0:o.countryCode)||""),[M,B]=n((null===(i=null===(a=null==k?void 0:k.impactConnection)||void 0===a?void 0:a.publisher)||void 0===i?void 0:i.currency)||"");console.log(U,M,"initial country and currency state");const[O,W]=n(""),[A,F]=n(""),[R,H]=n((null===(s=null==I?void 0:I.impactPayoutCountries)||void 0===s?void 0:s.data)||[]),[Z,V]=n((null===(c=null==C?void 0:C.currencies)||void 0===c?void 0:c.data)||[]),[G,J]=n(""),[K,Q]=n(!1),X=(null===(d=null==I?void 0:I.impactPayoutCountries)||void 0===d?void 0:d.data)||[],Y=(null===(b=null==C?void 0:C.currencies)||void 0===b?void 0:b.data)||[];console.log(k,"user data from partner info query"),e((()=>{var r;y&&(null===(r=k.impactConnection)||void 0===r?void 0:r.publisher)&&(_(k.impactConnection.publisher.countryCode),B(k.impactConnection.publisher.currency))}),[y]),e((()=>{(null==X?void 0:X.length)&&(""===O.trim()?H(X||[]):H(X.filter((r=>r.displayName.toLowerCase().includes(O.toLowerCase())))||[]))}),[O,X]),e((()=>{(null==Y?void 0:Y.length)&&(""===A.trim()?V(Y||[]):V(Y.filter((r=>r.currencyCode.toLowerCase().includes(A.toLowerCase())))||[]))}),[A,Y]);const rr=null==k?void 0:k.impactConnection;console.log(K,"success state in partner info modal");const tr=!(K||g||(null==rr?void 0:rr.connected)&&(null==rr?void 0:rr.publisher));return console.log(tr,"showModal condition in partner info modal"),{states:{open:tr,loading:g||P||S,submitting:E,isExistingPartner:null==rr?void 0:rr.publisher,countryCode:U,currency:M,error:G,success:K,brandName:(null===(v=null==T?void 0:T.tenantSettings)||void 0===v?void 0:v.companyName)||"",filteredCountries:R||[],filteredCurrencies:Z||[]},callbacks:{onCountryChange:function(r){var t,o;const n=null===(o=null===(t=r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&(_(n),B(""),J(""))},onCurrencyChange:function(r){var t,o;const n=null===(o=null===(t=r.detail)||void 0===t?void 0:t.item)||void 0===o?void 0:o.__value;n&&(B(n),J(""))},setCurrencySearch:F,setCountrySearch:W,onSubmit:async function(){var t,o;if(U&&M){J("");try{const n={user:{id:k.id,accountId:k.accountId},firstName:k.firstName,lastName:k.lastName,countryCode:U,currency:M},e=await j({vars:n});if(!e||(null===(t=e)||void 0===t?void 0:t.message))return void J(r.networkErrorText);const a=e.createImpactConnection;if(console.log(e,a,"result and connectionResult from creating partner from modal"),!(null==a?void 0:a.success)){const t=null===(o=null==a?void 0:a.validationErrors)||void 0===o?void 0:o.map((r=>r.message)).join(". ");return J(t||r.networkErrorText),void console.error("Failed to create Impact connection:",null==a?void 0:a.validationErrors)}window.dispatchEvent(new Event(w)),await q(),Q(!0),h(!0)}catch(t){console.error("Partner creation error:",t),J(r.networkErrorText)}}else J(r.missingFieldsErrorText)},onClose:()=>Q(!0)},text:r.getTextProps()}}(this);return r(y,Object.assign({},t))}};export{E as sqm_email_verification,U as sqm_partner_info_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-b6504987.system.js","./p-
|
|
1
|
+
System.register(["./p-b6504987.system.js","./p-a8ecdc44.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.f},function(e){n=e._;r=e.y}],execute:function(){e({a:s,u:i});var u="sqm:request-rerender";function s(e){var r=n();t((function(){r.dispatchEvent(new CustomEvent(u,{detail:true,bubbles:true,composed:true}))}),e)}function i(){var e=n();var s=r(),i=s[0],o=s[1];t((function(){var t=function(e){e.stopPropagation();o()};e.addEventListener(u,t);return function(){e.removeEventListener(u,t)}}),[]);return i}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,s){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,s){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function n(e){try{d(s.next(e))}catch(e){a(e)}}function i(e){try{d(s["throw"](e))}catch(e){a(e)}}function d(e){e.done?r(e.value):o(e.value).then(n,i)}d((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,o,a,n;return n={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function i(e){return function(t){return d([e,t])}}function d(n){if(s)throw new TypeError("Generator is already executing.");while(r)try{if(s=1,o&&(a=n[0]&2?o["return"]:n[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;if(o=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;o=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){r.label=n[1];break}if(n[0]===6&&r.label<a[1]){r.label=a[1];a=n;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(n);break}if(a[2])r.ops.pop();r.trys.pop();continue}n=t.call(e,r)}catch(e){n=[6,e];o=0}finally{s=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-a8ecdc44.system.js","./p-b2295bc5.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-8a6494c7.system.js","./p-7b909aa5.system.js","./p-3c46b4dd.system.js"],(function(e){"use strict";var t,r,s,o,a,n,i,d,c,u,l,f,w;return{setters:[function(e){t=e.r;r=e.h},function(e){s=e.k;o=e.f;a=e.n},function(e){n=e.o;i=e.T;d=e.j;c=e.i},function(e){u=e.j},function(e){l=e.c},function(e){f=e.s},function(){},function(){},function(){},function(e){w=e.P}],execute:function(){function h(e){var t=this;var r,a,c,l,w,h,p,m,x,v;var T=s(false),b=T[0],g=T[1];var P=s(""),y=P[0],E=P[1];var _=n(),R=_[0],M=_[1];var k=i(),q=k[0],C=k[1];var j=new URLSearchParams(d.location.search);var L=j.get("oobCode");j.delete("oobCode");var S=j.get("nextPage");var B=function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:return[4,R({oobCode:L})];case 1:t=r.sent();if(t instanceof Error){E(e.networkErrorMessage)}return[2]}}))}))};o((function(){B()}),[]);var F=function(r){return __awaiter(t,void 0,void 0,(function(){var t,s,o;return __generator(this,(function(a){switch(a.label){case 0:E("");t=r.detail.formData;t===null||t===void 0?void 0:t.forEach((function(e,r){u.set(t,r,e)}));s={oobCode:L,password:t.password};if(t.password!==t.confirmPassword){E(e.passwordMismatchText);return[2]}return[4,q(s)];case 1:o=a.sent();if(o instanceof Error){return[2,E(e.networkErrorMessage)]}if(o.resetManagedIdentityPassword){g(true);setTimeout((function(){H()}),5e3)}return[2]}}))}))};var H=function(){j.delete("nextPage");var t=f(S||e.nextPage);d.push(t.href)};var I=function(){d.push({pathname:e.failedPage,search:j.toString()&&"?"+j.toString()})};return{states:{loading:C.loading,reset:b,confirmPassword:e.confirmPassword,error:((w=(l=(c=(a=(r=C.errors)===null||r===void 0?void 0:r.response)===null||a===void 0?void 0:a.errors)===null||c===void 0?void 0:c[0])===null||l===void 0?void 0:l.extensions)===null||w===void 0?void 0:w.message)||((x=(m=(p=(h=C.errors)===null||h===void 0?void 0:h.response)===null||p===void 0?void 0:p.errors)===null||m===void 0?void 0:m[0])===null||x===void 0?void 0:x.message)||y,oobCodeValidating:M.loading,oobCodeValid:(v=M.data)===null||v===void 0?void 0:v.verifyManagedIdentityPasswordResetCode.success,content:{passwordResetHeader:e.passwordResetHeader,resetPasswordHeader:e.resetPasswordHeader,continueButtonText:e.continueButtonText,resetPasswordButtonText:e.resetPasswordButtonText,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,passwordFieldLabel:e.passwordFieldLabel,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText,passwordMismatchText:e.passwordMismatchText,codeInvalidText:e.codeInvalidText,resetSuccessText:e.resetSuccessText}},callbacks:{submit:F,failed:I,gotoNextPage:H}}}var p=e("sqm_portal_reset_password",function(){function e(e){t(this,e);this.ignored=true;this.nextPage="/";this.failedPage="/";this.confirmPassword=false;this.resetPasswordHeader="Reset your password";this.passwordResetHeader="Password reset";this.resetPasswordButtonText="Reset Password";this.continueButtonText="Continue";this.confirmPasswordFieldLabel="Confirm Password";this.passwordFieldLabel="New Password";this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";this.passwordMismatchText="Passwords do not match.";this.codeInvalidText="The password reset code is invalid or has expired, please try again.";this.resetSuccessText="Your password has been reset and you are being redirected. If you are not redirected, please click Continue.";this.networkErrorMessage="An error occurred while resetting your password. Please refresh the page and try again.";a(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=c()?m(this):h(this),t=e.states,s=e.callbacks;return r(w,{states:t,callbacks:s})};return e}());function m(e){var t=this;return l({states:{error:"",loading:false,reset:false,confirmPassword:e.confirmPassword,oobCodeValidating:false,oobCodeValid:true,content:{passwordResetHeader:e.passwordResetHeader,resetPasswordHeader:e.resetPasswordHeader,continueButtonText:e.continueButtonText,resetPasswordButtonText:e.resetPasswordButtonText,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,passwordFieldLabel:e.passwordFieldLabel,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText,passwordMismatchText:e.passwordMismatchText,codeInvalidText:e.codeInvalidText,resetSuccessText:e.resetSuccessText}},callbacks:{submit:function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){console.log("submit");return[2]}))}))},failed:function(){},gotoNextPage:function(){}}},e.demoData||{},{arrayMerge:function(e,t){return t}})}}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register([],(function(e){"use strict";return{execute:function(){var i=e("S","sq:code-verification");var r=e("a","sq:verification-email");var t=e("V","sq:verification-context");var c=e("b","sq:code-verified")}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as t,c as a}from"./p-083180bf.js";import{o,f as r,n}from"./p-a7fc1e02.js";import{G as c,f as i,E as e,P as l}from"./p-d20188db.js";const p=class{constructor(t){s(this,t),this.ignored=!0,n(this)}disconnectedCallback(){}render(){return async function({domain:s}){const t=c(),a=s,n=i(),p=e(a,n,t),[,d]=o(l,p);r((()=>{d(p)}),[p])}(this),t(a,{style:{display:"contents"}},t("slot",null))}};export{p as sqm_graphql_client_provider}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-
|
|
1
|
+
System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-a8ecdc44.system.js"],(function(e){"use strict";var t,r,i,n,a,o,s,c,u;return{setters:[function(e){t=e.r;r=e.h;i=e.c},function(e){n=e.f;a=e.n},function(e){o=e.J;s=e.k;c=e.j;u=e.i}],execute:function(){function d(e){var t=e.requireEmailVerification,r=e.redirectTo,i=e.redirectToUnverified;var a;var u=o();var d=!!(u===null||u===void 0?void 0:u.jwt);var f=(a=u===null||u===void 0?void 0:u.managedIdentity)===null||a===void 0?void 0:a.emailVerified;var l=s(),v=l.pathname,h=l.search;var p=new URLSearchParams;p.append("nextPage",""+v+h);n((function(){if(!d){return c.push({pathname:r,search:"?"+p.toString()})}if(t&&!f){return c.push({pathname:i||r,search:"?"+p.toString()})}}),[]);return!!u}var f=e("sqm_portal_protected_route",function(){function e(e){t(this,e);this.ignored=true;this.redirectTo="/";this.requireEmailVerification=false;this.redirectToUnverified="/emailVerification";a(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=u()?l():d(this);return r(i,{style:{display:e?"contents":"none"}},r("slot",null))};return e}());function l(e){return true}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __makeTemplateObject=this&&this.__makeTemplateObject||function(t,e){if(Object.defineProperty){Object.defineProperty(t,"raw",{value:e})}else{t.raw=e}return t};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++){e=arguments[n];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,n,a){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(a.next(t))}catch(t){o(t)}}function s(t){try{l(a["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):r(t.value).then(i,s)}l((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,r,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(a)throw new TypeError("Generator is already executing.");while(n)try{if(a=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];r=0}finally{a=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-641f968d.system.js","./p-1b9705fd.system.js","./p-b6504987.system.js","./p-d6c1e876.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-c756bc32.system.js","./p-8a6494c7.system.js","./p-97b8073f.system.js"],(function(t){"use strict";var e,n,a,r,o,i,s,l,u,c,d,p,f,v,g,y,h,m,b,x,C,T;return{setters:[function(t){e=t.h;n=t.F;a=t.r},function(t){r=t.i},function(t){o=t.n;i=t.k},function(t){s=t.F;l=t.i;u=t.d;c=t.H;d=t.J;p=t.B;f=t.w;v=t.$},function(t){g=t.c},function(t){y=t.g},function(t){h=t.c},function(t){m=t.R;b=t.a;x=t.S;C=t.u},function(){},function(t){T=t.C}],execute:function(){var _={Container:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"var(--sl-spacing-small)",width:"100%"},TextContainer:{display:"flex",gap:"var(--sl-spacing-xx-small)"}};var w=h(_);var P=w.toString();function S(t){var a=t.states,r=t.callbacks,o=t.text,i=t.buttonType;var s=r.onNext,l=r.onPrev;var u=a.currentPage,c=a.totalPages,d=a.loading;if(c===1)return e(n,null);return e("span",{class:w.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},P),!d&&e(n,null,e("sl-button",{exportparts:"base: "+i+"button-base",onClick:l,part:"sqm-pagination-button",circle:true,disabled:u===1},e("sl-icon",{name:"chevron-left",label:"Previous Page"})),e("div",{class:w.classes.TextContainer},o.paginationText)),e("sl-button",{exportparts:"base: "+i+"button-base",onClick:s,part:"sqm-pagination-button",circle:true,disabled:u===c},e("sl-icon",{name:"chevron-right",label:"Previous Page"})))}function j(t){var e;var n=s(m);var a=n.states.currentPage+1;var o=(e=n.states)===null||e===void 0?void 0:e.pageCount;return{states:{currentPage:a,totalPages:o,loading:n.states.loading},callbacks:{onNext:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)+1)},onPrev:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText},{currentPage:a,totalPages:o})}}}var k=t("sqm_pagination",function(){function t(t){a(this,t);this.ignored=true;this.paginationText="{currentPage} of {totalPages}";this.buttonType="secondary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=l()?I(y(this)):j(y(this));return e(S,Object.assign({},t))};return t}());function I(t){var e=i(1),n=e[0],a=e[1];return g({states:{currentPage:n,totalPages:5,loading:false},buttonType:t.buttonType,callbacks:{onNext:function(){return a(n+1)},onPrev:function(){return a(n-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText||"{currentPage} of {totalPages}"},{currentPage:n,totalPages:5})}},t.demoData||{},{arrayMerge:function(t,e){return e}})}var E=u.gql(__makeTemplateObject(["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"],["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"]));var M=u.gql(__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"]));function q(t){var e,n;var a=t.programId,r=a===void 0?c():a;var o=d();var l=p();var u=s(b);var g=f(E,{programId:r},!(o===null||o===void 0?void 0:o.jwt)||(u===null||u===void 0?void 0:u.referralCode)!==undefined).data;var y=v(M)[0];var h=v(x)[0];var m=(n=(u===null||u===void 0?void 0:u.referralCode)||((e=g===null||g===void 0?void 0:g.user)===null||e===void 0?void 0:e.referralCode))!==null&&n!==void 0?n:"...";var C=i(false),T=C[0],_=C[1];function w(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!u)return[3,2];return[4,h({referralCode:u.referralCode})];case 1:e.sent();u.refresh();e.label=2;case 2:navigator.clipboard.writeText(m);_(true);setTimeout((function(){return _(false)}),t.tooltiplifespan);y({eventMeta:{programId:r,id:o===null||o===void 0?void 0:o.id,accountId:o===null||o===void 0?void 0:o.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:l,shareMedium:"DIRECT"}}});return[2]}}))}))}return __assign(__assign({},t),{onClick:w,open:T,copyString:m,isCopied:u===null||u===void 0?void 0:u.isCopied,showNotificationText:t.showNotificationText&&!!(u===null||u===void 0?void 0:u.singleUse)})}var R=t("sqm_referral_code",function(){function t(t){a(this,t);this.tooltiptext="Copied to Clipboard";this.showNotificationText=false;this.notificationText="You've copied this code before";this.tooltiplifespan=1e3;this.textAlign="left";this.copyButtonLabel="Copy Code";this.buttonStyle="icon";this.buttonType="primary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?A(t):q(t);return e(T,Object.assign({},n))};return t}());function A(t){var e=i(false),n=e[0],a=e[1];var r="REFERRALCODE001";return g({copyString:r,tooltiptext:t.tooltiptext,textAlign:t.textAlign,copyButtonLabel:t.copyButtonLabel,buttonStyle:t.buttonStyle,notificationText:t.notificationText,showNotificationText:t.showNotificationText,isCopied:t.showNotificationText,borderColor:t.borderColor,backgroundColor:t.backgroundColor,textColor:t.textColor,borderRadius:t.borderRadius,buttonType:t.buttonType,isUsed:false,rewardStatus:"AVAILABLE",open:n,onClick:function(){navigator.clipboard.writeText(r);a(true);setTimeout((function(){return a(false)}),t.tooltiplifespan)}},t.demoData||{},{arrayMerge:function(t,e){return e}})}function O(t){var n=t.slots,a=t.titleText,r=t.states,o=t.textColor,i=o===void 0?"var(--sqm-text-subdued)":o;var s={Wrapper:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column",gap:"var(--sl-spacing-large)",color:i},HeaderContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},ShareCodeContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},ShareButtonContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},TitleText:{fontSize:"var(--sl-font-size-large)",margin:"0"}};var l="\n :host {\n display: block;\n }\n :host([hidden]): {\n display: none;\n }\n ";var u=h(s);var c=u.toString();var d=function(t){if(t.noCodes){return n.empty}if(t.loading){return n.loading}return e("div",{class:u.classes.Wrapper},e("div",{class:u.classes.ShareCodeContainer},n.shareCodes),e("div",{class:u.classes.ShareButtonContainer},n.shareButtons))};return e("div",{class:u.classes.Wrapper,part:"sqm-base"},e("style",{type:"text/css"},l,c),e("div",{class:u.classes.HeaderContainer},e("h2",{class:u.classes.TitleText},a),!r.noCodes&&!r.loading&&n.pagination),d(r))}var U=t("sqm_referral_codes",function(){function t(t){a(this,t);this.titleText="Start sharing";this.emptyStateHeaderText="Your new codes and links aren’t ready yet";this.emptyStateDescriptionText="Please contact our program support team to let them know you’re out of codes.";this.emptyStateImageUrl="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?$(t):C(t);var a={shareButtons:e("slot",{name:"shareButtons"}),shareCodes:e("slot",{name:"shareCodes"}),pagination:e("slot",{name:"pagination"}),empty:e(D,{headerText:this.emptyStateHeaderText,descriptionText:this.emptyStateDescriptionText,imageUrl:this.emptyStateImageUrl}),loading:e(N,null)};var r=__assign(__assign({slots:a},n),{loading:n.states.loading,noCodes:n.states.noCodes});return e(O,Object.assign({},r))};return t}());function D(t){var n=t.headerText,a=t.descriptionText,r=t.imageUrl;return e("slot",{name:"empty"},e("sqm-empty",{emptyStateHeader:n,emptyStateText:a,emptyStateImage:r}))}function N(){return e("slot",{name:"loading"},e(B,null),e(B,null),e(B,null),e(B,null))}function B(){return e("sqm-skeleton",null)}function $(t){return g({titleText:t.titleText,textColor:t.textColor,states:{noCodes:false,loading:false}},t.demoData||{},{arrayMerge:function(t,e){return e}})}}}}));
|
|
1
|
+
var __makeTemplateObject=this&&this.__makeTemplateObject||function(t,e){if(Object.defineProperty){Object.defineProperty(t,"raw",{value:e})}else{t.raw=e}return t};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++){e=arguments[n];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,n,a){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(a.next(t))}catch(t){o(t)}}function s(t){try{l(a["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):r(t.value).then(i,s)}l((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,r,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(a)throw new TypeError("Generator is already executing.");while(n)try{if(a=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];r=0}finally{a=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-641f968d.system.js","./p-64f56cc9.system.js","./p-b6504987.system.js","./p-a8ecdc44.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-e4dbca9a.system.js","./p-8a6494c7.system.js","./p-97b8073f.system.js"],(function(t){"use strict";var e,n,a,r,o,i,s,l,u,c,d,p,f,v,g,y,h,m,b,x,C,T;return{setters:[function(t){e=t.h;n=t.F;a=t.r},function(t){r=t.i},function(t){o=t.n;i=t.k},function(t){s=t.F;l=t.i;u=t.d;c=t.H;d=t.J;p=t.B;f=t.w;v=t.$},function(t){g=t.c},function(t){y=t.g},function(t){h=t.c},function(t){m=t.R;b=t.a;x=t.S;C=t.u},function(){},function(t){T=t.C}],execute:function(){var _={Container:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"var(--sl-spacing-small)",width:"100%"},TextContainer:{display:"flex",gap:"var(--sl-spacing-xx-small)"}};var w=h(_);var P=w.toString();function S(t){var a=t.states,r=t.callbacks,o=t.text,i=t.buttonType;var s=r.onNext,l=r.onPrev;var u=a.currentPage,c=a.totalPages,d=a.loading;if(c===1)return e(n,null);return e("span",{class:w.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},P),!d&&e(n,null,e("sl-button",{exportparts:"base: "+i+"button-base",onClick:l,part:"sqm-pagination-button",circle:true,disabled:u===1},e("sl-icon",{name:"chevron-left",label:"Previous Page"})),e("div",{class:w.classes.TextContainer},o.paginationText)),e("sl-button",{exportparts:"base: "+i+"button-base",onClick:s,part:"sqm-pagination-button",circle:true,disabled:u===c},e("sl-icon",{name:"chevron-right",label:"Previous Page"})))}function j(t){var e;var n=s(m);var a=n.states.currentPage+1;var o=(e=n.states)===null||e===void 0?void 0:e.pageCount;return{states:{currentPage:a,totalPages:o,loading:n.states.loading},callbacks:{onNext:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)+1)},onPrev:function(){var t,e;return(t=n.callbacks)===null||t===void 0?void 0:t.setCurrentPage(((e=n.states)===null||e===void 0?void 0:e.currentPage)-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText},{currentPage:a,totalPages:o})}}}var k=t("sqm_pagination",function(){function t(t){a(this,t);this.ignored=true;this.paginationText="{currentPage} of {totalPages}";this.buttonType="secondary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=l()?I(y(this)):j(y(this));return e(S,Object.assign({},t))};return t}());function I(t){var e=i(1),n=e[0],a=e[1];return g({states:{currentPage:n,totalPages:5,loading:false},buttonType:t.buttonType,callbacks:{onNext:function(){return a(n+1)},onPrev:function(){return a(n-1)}},text:{paginationText:r.formatMessage({id:"paginationText",defaultMessage:t.paginationText||"{currentPage} of {totalPages}"},{currentPage:n,totalPages:5})}},t.demoData||{},{arrayMerge:function(t,e){return e}})}var E=u.gql(__makeTemplateObject(["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"],["\n query getReferralCode($programId: ID) {\n user: viewer {\n ... on User {\n referralCode(programId: $programId)\n }\n }\n }\n"]));var M=u.gql(__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"]));function q(t){var e,n;var a=t.programId,r=a===void 0?c():a;var o=d();var l=p();var u=s(b);var g=f(E,{programId:r},!(o===null||o===void 0?void 0:o.jwt)||(u===null||u===void 0?void 0:u.referralCode)!==undefined).data;var y=v(M)[0];var h=v(x)[0];var m=(n=(u===null||u===void 0?void 0:u.referralCode)||((e=g===null||g===void 0?void 0:g.user)===null||e===void 0?void 0:e.referralCode))!==null&&n!==void 0?n:"...";var C=i(false),T=C[0],_=C[1];function w(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!u)return[3,2];return[4,h({referralCode:u.referralCode})];case 1:e.sent();u.refresh();e.label=2;case 2:navigator.clipboard.writeText(m);_(true);setTimeout((function(){return _(false)}),t.tooltiplifespan);y({eventMeta:{programId:r,id:o===null||o===void 0?void 0:o.id,accountId:o===null||o===void 0?void 0:o.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:l,shareMedium:"DIRECT"}}});return[2]}}))}))}return __assign(__assign({},t),{onClick:w,open:T,copyString:m,isCopied:u===null||u===void 0?void 0:u.isCopied,showNotificationText:t.showNotificationText&&!!(u===null||u===void 0?void 0:u.singleUse)})}var R=t("sqm_referral_code",function(){function t(t){a(this,t);this.tooltiptext="Copied to Clipboard";this.showNotificationText=false;this.notificationText="You've copied this code before";this.tooltiplifespan=1e3;this.textAlign="left";this.copyButtonLabel="Copy Code";this.buttonStyle="icon";this.buttonType="primary";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?A(t):q(t);return e(T,Object.assign({},n))};return t}());function A(t){var e=i(false),n=e[0],a=e[1];var r="REFERRALCODE001";return g({copyString:r,tooltiptext:t.tooltiptext,textAlign:t.textAlign,copyButtonLabel:t.copyButtonLabel,buttonStyle:t.buttonStyle,notificationText:t.notificationText,showNotificationText:t.showNotificationText,isCopied:t.showNotificationText,borderColor:t.borderColor,backgroundColor:t.backgroundColor,textColor:t.textColor,borderRadius:t.borderRadius,buttonType:t.buttonType,isUsed:false,rewardStatus:"AVAILABLE",open:n,onClick:function(){navigator.clipboard.writeText(r);a(true);setTimeout((function(){return a(false)}),t.tooltiplifespan)}},t.demoData||{},{arrayMerge:function(t,e){return e}})}function O(t){var n=t.slots,a=t.titleText,r=t.states,o=t.textColor,i=o===void 0?"var(--sqm-text-subdued)":o;var s={Wrapper:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column",gap:"var(--sl-spacing-large)",color:i},HeaderContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},ShareCodeContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},ShareButtonContainer:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column"},TitleText:{fontSize:"var(--sl-font-size-large)",margin:"0"}};var l="\n :host {\n display: block;\n }\n :host([hidden]): {\n display: none;\n }\n ";var u=h(s);var c=u.toString();var d=function(t){if(t.noCodes){return n.empty}if(t.loading){return n.loading}return e("div",{class:u.classes.Wrapper},e("div",{class:u.classes.ShareCodeContainer},n.shareCodes),e("div",{class:u.classes.ShareButtonContainer},n.shareButtons))};return e("div",{class:u.classes.Wrapper,part:"sqm-base"},e("style",{type:"text/css"},l,c),e("div",{class:u.classes.HeaderContainer},e("h2",{class:u.classes.TitleText},a),!r.noCodes&&!r.loading&&n.pagination),d(r))}var U=t("sqm_referral_codes",function(){function t(t){a(this,t);this.titleText="Start sharing";this.emptyStateHeaderText="Your new codes and links aren’t ready yet";this.emptyStateDescriptionText="Please contact our program support team to let them know you’re out of codes.";this.emptyStateImageUrl="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=y(this);var n=l()?$(t):C(t);var a={shareButtons:e("slot",{name:"shareButtons"}),shareCodes:e("slot",{name:"shareCodes"}),pagination:e("slot",{name:"pagination"}),empty:e(D,{headerText:this.emptyStateHeaderText,descriptionText:this.emptyStateDescriptionText,imageUrl:this.emptyStateImageUrl}),loading:e(N,null)};var r=__assign(__assign({slots:a},n),{loading:n.states.loading,noCodes:n.states.noCodes});return e(O,Object.assign({},r))};return t}());function D(t){var n=t.headerText,a=t.descriptionText,r=t.imageUrl;return e("slot",{name:"empty"},e("sqm-empty",{emptyStateHeader:n,emptyStateText:a,emptyStateImage:r}))}function N(){return e("slot",{name:"loading"},e(B,null),e(B,null),e(B,null),e(B,null))}function B(){return e("sqm-skeleton",null)}function $(t){return g({titleText:t.titleText,textColor:t.textColor,states:{noCodes:false,loading:false}},t.demoData||{},{arrayMerge:function(t,e){return e}})}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./p-083180bf.js";import{i as a}from"./p-
|
|
1
|
+
import{h as e}from"./p-083180bf.js";import{i as a}from"./p-438f6702.js";import{c as l}from"./p-cef45012.js";import{T as t}from"./p-cabf6326.js";function s(s){var i,r,o,n,p;const{states:d,callbacks:m}=s,{text:u,formState:b}=d,{errors:c,error:v}=b,x=l({Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-xxx-large)"},FormStyle:{width:"100%",minWidth:"700px","& >*:not(:last-child)":{"margin-bottom":"32px"},"@media screen and (max-width: 1100px)":{minWidth:"100%"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"32px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"32px"}},NameInputStyle:{width:"50%","@media screen and (max-width: 860px)":{width:"100%","margin-right":"0"}},NameInputContainer:{display:"flex",gap:"32px",width:"100%","@media screen and (max-width: 860px)":{flexDirection:"column"}}}),f=x.toString(),g=(null===(i=d.user)||void 0===i?void 0:i.countryCode)?a.formatDisplayName(null===(r=d.user)||void 0===r?void 0:r.countryCode,{type:"region"}):"";return e("div",{class:x.classes.Container,part:"sqm-base"},e("style",{type:"text/css"},f),e(t,Object.assign({},{type:"h1"}),u.editProfileHeader),e(t,Object.assign({},{type:"h2"}),u.editProfileSubHeader),e("form",{class:x.classes.FormStyle,onSubmit:m.onSubmit},d.success&&e("sqm-form-message",{class:x.classes.Success,exportparts:"success-icon"},e("div",{part:"successalert-text"},u.submissionSuccessText)),v&&e("sqm-form-message",{class:x.classes.Error,type:"error",exportparts:"erroralert-icon"},e("div",{part:"erroralert-text"},v)),e("div",{class:x.classes.NameInputContainer},e("sl-input",Object.assign({class:x.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:null===(o=d.user)||void 0===o?void 0:o.firstName,onInput:m.onChange,label:u.firstnametext,disabled:d.loading},(null==c?void 0:c.firstName)&&"valid"!==(null==c?void 0:c.firstName.status)?{class:"ErrorStyles",helpText:u.fieldEmptyText}:[],{id:"firstName",name:"firstName",error:(null==c?void 0:c.firstName)&&"valid"!==(null==c?void 0:c.firstName.status)?null==c?void 0:c.firstName.message:void 0})),e("sl-input",Object.assign({class:x.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:null===(n=d.user)||void 0===n?void 0:n.lastName,onInput:m.onChange,label:u.lastnametext,disabled:d.loading,id:"lastName",name:"lastName"},(null==c?void 0:c.lastName)&&"valid"!==(null==c?void 0:c.lastName.status)?{class:"ErrorStyles",helpText:u.fieldEmptyText}:[],{error:(null==c?void 0:c.lastName)&&"valid"!==(null==c?void 0:c.lastName.status)?null==c?void 0:c.lastName.message:void 0}))),e("sl-input",{label:u.emailtext,value:null===(p=d.user)||void 0===p?void 0:p.email,exportparts:"label: input-label, base: input-base",disabled:!0}),d.showCountry&&e("sl-input",{label:u.countrytext,value:g,exportparts:"label: input-label, base: input-base",disabled:!0}),e("sl-button",{type:"primary",exportparts:"base: primarybutton-base",loading:d.loading,disabled:d.submitDisabled,onClick:e=>{m.onSubmit(e)},submit:!0},u.submitChangeButtonText)))}export{s as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as s,c as e}from"./p-083180bf.js";import{n as t}from"./p-a7fc1e02.js";import"./p-
|
|
1
|
+
import{r,h as s,c as e}from"./p-083180bf.js";import{n as t}from"./p-a7fc1e02.js";import"./p-d20188db.js";import{a as o}from"./p-092db51a.js";const a=class{constructor(s){r(this,s),this.columnTitle="Note",t(this)}disconnectedCallback(){}async renderCell(r,e){var t;return s("sqm-rewards-table-customer-note-cell",{note:null===(t=null==r?void 0:r.meta)||void 0===t?void 0:t.message,locale:null==e?void 0:e.locale})}async renderLabel(){return this.columnTitle}render(){return o([this.columnTitle]),s(e,{style:{display:"none"}})}};export{a as sqm_rewards_table_customer_note_column}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i}from"./p-083180bf.js";import"./p-
|
|
1
|
+
import{r as e,h as i}from"./p-083180bf.js";import"./p-438f6702.js";import{k as a,m as t,f as s,n}from"./p-a7fc1e02.js";import{l as r,n as o,J as l,j as c,b as d,i as v}from"./p-d20188db.js";import{c as u}from"./p-c1086930.js";import"./p-cef45012.js";import"./p-49b20dae.js";import"./p-cabf6326.js";import{P as m}from"./p-a7ee6531.js";const f=class{constructor(i){e(this,i),this.ignored=!0,this.redirectPath="/verifyEmail",this.emailVerificationHeader="Verify your email",this.resendEmailButtonText="Re-send Email",this.verifyMessage="A verification email was sent to {email}. Please verify your email to continue to the portal. Resending an email will invalidate the previous email.",this.verificationStatusMessage="Checking verification status in {countdown}",this.verificationLoadingMessage="Checking verification status",this.verificationResentMessage="Your verification email has been resent successfully",this.networkErrorMessage="An error occurred while verifying your password. Please refresh the page.",n(this)}disconnectedCallback(){}render(){const{states:e,callbacks:n,content:f}=v()?u({states:{error:"",loading:!1,success:!1,countdown:10},callbacks:{submit:async()=>{}},content:{email:"test@example.com",verifyMessage:(h=this).verifyMessage,emailVerificationHeader:h.emailVerificationHeader,resendEmailButtonText:h.resendEmailButtonText,verificationLoadingMessage:h.verificationLoadingMessage,verificationStatusMessage:h.verificationStatusMessage,verificationResentMessage:h.verificationResentMessage,networkErrorMessage:h.networkErrorMessage}},h.demoData||{},{arrayMerge:(e,i)=>i}):function(e){var i,n,v,u,m,f,h,g,p;const[y,{loading:b,errors:w}]=r(),[M,{data:j,loading:k}]=o(),I=l(),P=null===(i=null==I?void 0:I.managedIdentity)||void 0===i?void 0:i.email,E=new URLSearchParams(c.location.search),x=E.get("nextPage"),[R,V]=a(!1),[C,L]=a(""),[S,_]=a(10),A=t(void 0),B=t(void 0);async function H(){var i;const a=await M();if(null===(i=null==a?void 0:a.managedIdentitySession)||void 0===i?void 0:i.emailVerified)return clearInterval(A.current),c.push({pathname:e.redirectPath,search:E.toString()&&"?"+E.toString()});U(10)}const T=(e=1e4)=>setInterval(H,e),q=e=>setInterval((()=>_(e)),1e3);function U(e){if(clearInterval(B.current),clearInterval(A.current),"hidden"===document.visibilityState)return;e&&_(e);let i=S||10;B.current=q(e-1||i-1),A.current=T(1e3*e||1e3*i)}const Y=d((()=>U()),[S]);return s((()=>(A.current||(H(),A.current=T()),()=>{clearInterval(A.current)})),[]),s((()=>(S>0&&(clearInterval(B.current),B.current=q(S-1)),document.addEventListener("visibilitychange",Y),()=>{clearInterval(B.current),document.removeEventListener("visibilitychange",Y)})),[S]),{states:{loading:b,error:(null===(m=null===(u=null===(v=null===(n=null==w?void 0:w.response)||void 0===n?void 0:n.errors)||void 0===v?void 0:v[0])||void 0===u?void 0:u.extensions)||void 0===m?void 0:m.message)||(null===(g=null===(h=null===(f=null==w?void 0:w.response)||void 0===f?void 0:f.errors)||void 0===h?void 0:h[0])||void 0===g?void 0:g.message)||C,success:R,loadingVerification:k,isVerified:!!(null===(p=null==j?void 0:j.managedIdentitySession)||void 0===p?void 0:p.emailVerified),countdown:S},callbacks:{submit:async()=>{var i;if(!P)return;L(""),V(!1);const a={email:P,urlParams:x?{nextPage:x}:null,redirectPath:e.redirectPath},t=await y(a);t instanceof Error?t.message&&L(e.networkErrorMessage):(null===(i=t.requestManagedIdentityVerificationEmail)||void 0===i?void 0:i.success)&&V(!0)}},content:{email:P,verifyMessage:e.verifyMessage,emailVerificationHeader:e.emailVerificationHeader,resendEmailButtonText:e.resendEmailButtonText,verificationLoadingMessage:e.verificationLoadingMessage,verificationStatusMessage:e.verificationStatusMessage,verificationResentMessage:e.verificationResentMessage,networkErrorMessage:e.networkErrorMessage}}}(this);var h;return i(m,{states:e,callbacks:n,content:f})}};export{f as sqm_portal_email_verification}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-083180bf.js";import{k as e,n as o,m as i,f as a}from"./p-a7fc1e02.js";import{u as r,j as l,i as n,a as d,h as c,V as u,b as h,J as m,c as v,e as g}from"./p-1d450b85.js";import{j as b}from"./p-e7e129ac.js";import{c as f}from"./p-c1086930.js";import{s as p,g as w}from"./p-9ec99ced.js";import{c as y}from"./p-cef45012.js";import"./p-49b20dae.js";import"./p-cabf6326.js";import{P,a as x,b as k,c as E}from"./p-dece706f.js";import{A as T,u as C}from"./p-33a6ab09.js";import{u as L}from"./p-e5e8e13e.js";import{P as q}from"./p-669d52c4.js";const R=class{constructor(t){s(this,t),this.ignored=!0,this.redirectPath="/resetPassword",this.emailLabel="Email",this.submitLabel="Request Password Reset",this.loginPath="/login",this.headerText="Enter your email below to receive a password reset link.",this.loginText="Sign In",this.networkErrorMessage="An error occurred while loading this page. Please refresh the page.",this.successAlertText="If an account with that email exists, a password reset email will be sent.",this.backgroundColor="var(--sqm-portal-background, #ffffff)",this.borderRadius="var(--sqm-border-radius-normal, 8px)",this.border="var(--sqm-border-thickness, 1px) solid var(--sqm-border-color, #eaeaea)",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:o}=n()?f({states:{error:"",loading:!1,success:!1},callbacks:{submit:async()=>{}},content:{secondaryButton:t("sl-button",{type:"secondary",exportparts:"base: secondarybutton-base",disabled:!1,onClick:()=>l.push(i.loginPath)},(i=this).loginText),messageSlot:t("span",null,i.headerText),emailLabel:i.emailLabel,submitLabel:i.submitLabel,successAlertText:i.successAlertText,loginText:i.loginText,backgroundColor:i.backgroundColor,borderRadius:i.borderRadius,border:i.border}},i.demoData||{},{arrayMerge:(s,t)=>t}):function(s){var t,o,i,a,n,d,c;const[u,h]=e(!1),[m,v]=e(""),[g,{loading:f,errors:p}]=r(),w=new URLSearchParams(l.location.search).get("nextPage");return{states:{loading:f,error:(null===(a=null===(i=null===(o=null===(t=null==p?void 0:p.response)||void 0===t?void 0:t.errors)||void 0===o?void 0:o[0])||void 0===i?void 0:i.extensions)||void 0===a?void 0:a.message)||(null===(c=null===(d=null===(n=null==p?void 0:p.response)||void 0===n?void 0:n.errors)||void 0===d?void 0:d[0])||void 0===c?void 0:c.message)||m,success:u,loginPath:s.loginPath,headerText:s.headerText,loginText:s.loginText},callbacks:{submit:async t=>{var e;v(""),h(!1);let o=t.detail.formData;null==o||o.forEach(((s,t)=>{b.set(o,t,s)}));const i={email:o.email,urlParams:w?{nextPage:w}:null,redirectPath:s.redirectPath},a=await g(i);a instanceof Error?a.message&&v(s.networkErrorMessage):(null===(e=a.requestManagedIdentityPasswordResetEmail)||void 0===e?void 0:e.success)&&h(!0)}}}}(this);var i;const a={messageSlot:t("slot",{name:"messageSlot"},this.headerText),emailLabel:this.emailLabel,submitLabel:this.submitLabel,successAlertText:this.successAlertText,loginText:this.loginText,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:this.border};return t(P,{states:s,callbacks:o,content:a})}};function S(s){var t,o,i,a,r,n,u,h,m,v,g,f,w,y;const[P,{loading:x,errors:k}]=d(),[E,{loading:T,errors:C}]=c(),[L,q]=e(""),R=new URLSearchParams(l.location.search),S=R.get("nextPage"),M=(null===(a=null===(i=null===(o=null===(t=null==k?void 0:k.response)||void 0===t?void 0:t.errors)||void 0===o?void 0:o[0])||void 0===i?void 0:i.extensions)||void 0===a?void 0:a.message)||(null===(u=null===(n=null===(r=null==k?void 0:k.response)||void 0===r?void 0:r.errors)||void 0===n?void 0:n[0])||void 0===u?void 0:u.message)||L,B=(null===(g=null===(v=null===(m=null===(h=null==C?void 0:C.response)||void 0===h?void 0:h.errors)||void 0===m?void 0:m[0])||void 0===v?void 0:v.extensions)||void 0===g?void 0:g.message)||(null===(y=null===(w=null===(f=null==C?void 0:C.response)||void 0===f?void 0:f.errors)||void 0===w?void 0:w[0])||void 0===y?void 0:y.message)||L;return{states:{loading:x||T,error:M||B,registerPath:s.registerPath,forgotPasswordPath:s.forgotPasswordPath},callbacks:{googleSubmit:async t=>{var e,o,i,a;if(!(null===(e=t.detail)||void 0===e?void 0:e.credential))return;const r=await E({idToken:t.detail.credential});if(r instanceof Error)((null==r?void 0:r.message)||(null===(o=null==r?void 0:r.response)||void 0===o?void 0:o.error))&&((null===(i=null==r?void 0:r.response)||void 0===i?void 0:i.errors.some((s=>{var t;return"Invalid Credentials."===(null===(t=null==s?void 0:s.extensions)||void 0===t?void 0:t.message)})))?q(s.googleUserNotRegisteredError):q(s.networkErrorMessage));else if(null===(a=r.authenticateManagedIdentityWithGoogle)||void 0===a?void 0:a.token){R.delete("nextPage");const t=p(S||s.nextPage);l.push(t.href)}},submit:async t=>{var e,o;q("");let i=t.detail.formData;null==i||i.forEach(((s,t)=>{b.set(i,t,s)}));const a={email:i.email,password:i.password},r=await P(a);if(r instanceof Error)((null==r?void 0:r.message)||(null===(e=null==r?void 0:r.response)||void 0===e?void 0:e.error))&&q(s.networkErrorMessage);else if(null===(o=r.authenticateManagedIdentityWithEmailAndPassword)||void 0===o?void 0:o.token){R.delete("nextPage");const t=p(S||s.nextPage);l.push(t.href)}}}}}const M=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",this.googleUserNotRegisteredError="Your Google account has not registered on our platform. Please complete the registration process with your Google account.",this.registerCTA="Don't have an account?",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e}=n()?f({states:{error:(null===(i=null===(o=this.demoData)||void 0===o?void 0:o.states)||void 0===i?void 0:i.error)||"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register",showLoginForm:"manual"},callbacks:{googleSubmit:async()=>{console.log("google submit")},submit:async()=>{console.log("submit")}},content:{googleButton:null}},this.demoData||{},{arrayMerge:(s,t)=>t}):S(this);var o,i;const a=y({RegisterButton:{"&::part(label)":{padding:"0"}}}),r=a.toString(),d={forgotPasswordButton:t("slot",{name:"forgotPassword"},t("a",{onClick:()=>l.push(s.forgotPasswordPath)},this.forgotPasswordLabel)),googleButton:t("sqm-google-sign-in",{onInitComplete:e.googleSubmit}),secondaryButton:t("slot",{name:"secondaryButton"},t("style",null,r),t("span",null,this.registerCTA," ",t("sl-button",{size:"large",type:"text",disabled:s.loading,onClick:()=>l.push(s.registerPath),className:a.classes.RegisterButton},this.registerLabel))),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return t(x,{states:s,callbacks:e,content:d})}},B=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e}=n()?f({states:{error:"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register",showLoginForm:"manual"},callbacks:{googleSubmit:async()=>{console.log("google submit")},submit:async()=>{console.log("submit")}},content:{googleButton:null}},this.demoData||{},{arrayMerge:(s,t)=>t}):S(this),o=y({RegisterButton:{"&::part(label)":{padding:"0"}}}).toString(),i={forgotPasswordButton:t("slot",{name:"forgotPassword"},t("a",{onClick:()=>l.push(s.forgotPasswordPath)},this.forgotPasswordLabel)),googleButton:null,secondaryButton:t("slot",{name:"secondaryButton"},t("style",null,o),t("sl-button",{exportparts:"base: secondarybutton-base",type:"text",disabled:s.loading,onClick:()=>l.push(s.registerPath)},this.registerLabel)),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return t(x,{states:s,callbacks:e,content:i})}},j=class{constructor(t){s(this,t),this.ignored=!1,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e,refs:o}=n()?f({states:{error:"",loading:!1,confirmPassword:(r=this).confirmPassword,hideInputs:r.hideInputs||!1,customPasswordField:!1,loginPath:r.loginPath,disablePasswordValidation:r.disablePasswordValidation},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},r.demoData||{},{arrayMerge:(s,t)=>t}):function(s){var t,e,o,r,n,d,c,m,v;const g=i(null),{registrationFormState:f,setRegistrationFormState:p}=L({}),[w,{loading:y,errors:P}]=u();a((()=>{if(!g.current)return;const s=g.current;return s.addEventListener("sl-input",x),()=>{s.removeEventListener("sl-input",x)}}),[g.current]);const x=h((s=>{var t,e;if("tel"!==(null===(e=null===(t=s.target)||void 0===t?void 0:t.type)||void 0===e?void 0:e.toLowerCase()))return;const o=new T("US");s.target.value=o.input(s.target.value)}),[]);let k="";return k=(null===(t=null==P?void 0:P.response)||void 0===t?void 0:t.error)||(null==P?void 0:P.message)&&!(null===(e=null==P?void 0:P.response)||void 0===e?void 0:e.errors.length)?s.networkErrorMessage:(null===(d=null===(n=null===(r=null===(o=null==P?void 0:P.response)||void 0===o?void 0:o.errors)||void 0===r?void 0:r[0])||void 0===n?void 0:n.extensions)||void 0===d?void 0:d.message)||(null===(v=null===(m=null===(c=null==P?void 0:P.response)||void 0===c?void 0:c.errors)||void 0===m?void 0:m[0])||void 0===v?void 0:v.message)||(null==f?void 0:f.error),{states:{loading:y,error:k,registrationFormState:f,confirmPassword:s.confirmPassword,hideInputs:s.hideInputs,loginPath:s.loginPath,disablePasswordValidation:s.disablePasswordValidation},callbacks:{submit:async t=>{var e;let o=t.target.getFormControls(),i={},a={};if(null==o||o.forEach((t=>{if(!t.name)return;const e=t.name,o=t.value;if(b.set(i,e,o),t.required&&!o&&b.set(a,e,s.requiredFieldErrorMessage),"function"==typeof t.validationError){const s=(0,t.validationError)({control:t,key:e,value:o});s&&b.set(a,e,s)}})),(s.confirmPassword||i.confirmPassword)&&i.password!==i.confirmPassword&&(a={...a,confirmPassword:s.passwordMismatchErrorMessage}),Object.keys(a).length)return void p({loading:!1,error:"",validationErrors:a});p({loading:!0,error:"",validationErrors:{}});const{email:r,password:n}=i;delete i.email,delete i.password,delete i.confirmPassword,i={...i};const d={email:r,password:n,formData:i,redirectPath:s.redirectPath};try{const t=await w(d);if(t instanceof Error)throw t;p({loading:!1,error:"",validationErrors:{}}),(null===(e=t.registerManagedIdentityWithEmailAndPassword)||void 0===e?void 0:e.token)&&l.push(s.nextPage)}catch(t){p({loading:!1,error:s.networkErrorMessage,validationErrors:{}})}},inputFunction:x},refs:{formRef:g}}}(this);var r;const d={formData:t("slot",{name:"formData"}),secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:s.loading,onClick:()=>l.push(s.loginPath)},this.loginLabel)),terms:t("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return t(k,{states:s,callbacks:e,content:d,refs:o})}},_=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.formDisabledErrorMessage="The registration form is currently disabled.",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e,refs:o}=n()?f({states:{error:"",loading:!1,confirmPassword:this.confirmPassword,hideInputs:this.hideInputs||!1,customPasswordField:!1,loginPath:"/login"},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},this.demoData||{},{arrayMerge:(s,t)=>t}):C(this);const i={formData:t("slot",{name:"formData"}),secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:s.loading,onClick:()=>l.push(s.loginPath)},this.loginLabel)),terms:t("slot",{name:"terms"}),emailOptIn:t("slot",{name:"emailOptIn"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,networkErrorMessage:this.networkErrorMessage,passwordMismatchErrorMessage:this.passwordMismatchErrorMessage,invalidEmailErrorMessage:this.invalidEmailErrorMessage,formDisabledErrorMessage:this.formDisabledErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return t(q,{states:s,callbacks:e,content:i,refs:o})}};let I=null;const F=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.failedPage="/",this.verifyEmailText="Verify your email",this.verifySuccessText="Your email has been verified and you are being redirected. If you are not redirected, please click Continue.",this.verifyInvalidText="The email verification code is invalid or has expired, please try again.",this.continueText="Continue",this.networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.",o(this)}disconnectedCallback(){}render(){const{states:s,data:o,callbacks:i,content:r}=n()?(d=w(this),f({states:{error:"",loading:!1,success:!0},data:{oobCode:"code"},callbacks:{failed:()=>{console.log("failed")},gotoNextPage:()=>{}},content:{verifySuccessText:d.verifySuccessText,verifyEmailText:d.verifyEmailText,verifyInvalidText:d.verifyInvalidText,continueText:d.continueText}},d.demoData||{},{arrayMerge:(s,t)=>t})):function({nextPage:s,failedPage:t,verifySuccessText:o,verifyEmailText:i,verifyInvalidText:r,networkErrorMessage:n,continueText:d}){var c,u,h,b,f,w,y,P,x,k;const[E,T]=e(!1),[C,L]=e(!1),q=m(),[R,{loading:S,data:M,errors:B}]=v(),j=new URLSearchParams(l.location.search),_=j.get("oobCode"),F=j.get("email"),A=j.get("nextPage"),D=void 0===M&&void 0===B&&!!_,N=!!((null===(c=null==q?void 0:q.managedIdentity)||void 0===c?void 0:c.emailVerified)||(null===(u=null==M?void 0:M.verifyManagedIdentityEmail)||void 0===u?void 0:u.success)||C),U=(null===(h=null==q?void 0:q.managedIdentity)||void 0===h?void 0:h.email)===F,V=()=>{j.delete("nextPage");const t=p(A||s);l.push(t.href)};return a((()=>{(async()=>{I||(I=R({oobCode:_}));const s=await I;s instanceof Error||!s.verifyManagedIdentityEmail.success||L(!0),T(!0)})()}),[]),a((()=>{E&&(N&&U?setTimeout(V,3e3):setTimeout((()=>{g(void 0),V()}),3e3))}),[E,N]),{states:{loading:S||!E,disableContinue:D,error:(null===(y=null===(w=null===(f=null===(b=null==B?void 0:B.response)||void 0===b?void 0:b.errors)||void 0===f?void 0:f[0])||void 0===w?void 0:w.extensions)||void 0===y?void 0:y.message)||(null===(k=null===(x=null===(P=null==B?void 0:B.response)||void 0===P?void 0:P.errors)||void 0===x?void 0:x[0])||void 0===k?void 0:k.message)||((null==B?void 0:B.message)||!U)&&n,success:E&&C&&(N||U)},data:{oobCode:_},callbacks:{failed:()=>l.push({pathname:t,search:j.toString()&&"?"+j.toString()}),gotoNextPage:V},content:{verifySuccessText:o,verifyEmailText:i,verifyInvalidText:r,continueText:d}}}(w(this));var d;return t(E,{states:s,data:o,callbacks:i,content:r})}};export{R as sqm_portal_forgot_password,M as sqm_portal_google_login,B as sqm_portal_login,j as sqm_portal_register,_ as sqm_portal_registration_form,F as sqm_portal_verify_email}
|
|
1
|
+
import{r as s,h as t}from"./p-083180bf.js";import{k as e,n as o,m as i,f as a}from"./p-a7fc1e02.js";import{u as r,j as l,i as n,a as d,h as c,V as u,b as h,J as m,c as v,e as g}from"./p-d20188db.js";import{j as b}from"./p-e7e129ac.js";import{c as f}from"./p-c1086930.js";import{s as p,g as w}from"./p-9ec99ced.js";import{c as y}from"./p-cef45012.js";import"./p-49b20dae.js";import"./p-cabf6326.js";import{P,a as x,b as k,c as E}from"./p-f18a6658.js";import{A as T,u as C}from"./p-857a2d77.js";import{u as L}from"./p-ce11858c.js";import{P as q}from"./p-669d52c4.js";const R=class{constructor(t){s(this,t),this.ignored=!0,this.redirectPath="/resetPassword",this.emailLabel="Email",this.submitLabel="Request Password Reset",this.loginPath="/login",this.headerText="Enter your email below to receive a password reset link.",this.loginText="Sign In",this.networkErrorMessage="An error occurred while loading this page. Please refresh the page.",this.successAlertText="If an account with that email exists, a password reset email will be sent.",this.backgroundColor="var(--sqm-portal-background, #ffffff)",this.borderRadius="var(--sqm-border-radius-normal, 8px)",this.border="var(--sqm-border-thickness, 1px) solid var(--sqm-border-color, #eaeaea)",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:o}=n()?f({states:{error:"",loading:!1,success:!1},callbacks:{submit:async()=>{}},content:{secondaryButton:t("sl-button",{type:"secondary",exportparts:"base: secondarybutton-base",disabled:!1,onClick:()=>l.push(i.loginPath)},(i=this).loginText),messageSlot:t("span",null,i.headerText),emailLabel:i.emailLabel,submitLabel:i.submitLabel,successAlertText:i.successAlertText,loginText:i.loginText,backgroundColor:i.backgroundColor,borderRadius:i.borderRadius,border:i.border}},i.demoData||{},{arrayMerge:(s,t)=>t}):function(s){var t,o,i,a,n,d,c;const[u,h]=e(!1),[m,v]=e(""),[g,{loading:f,errors:p}]=r(),w=new URLSearchParams(l.location.search).get("nextPage");return{states:{loading:f,error:(null===(a=null===(i=null===(o=null===(t=null==p?void 0:p.response)||void 0===t?void 0:t.errors)||void 0===o?void 0:o[0])||void 0===i?void 0:i.extensions)||void 0===a?void 0:a.message)||(null===(c=null===(d=null===(n=null==p?void 0:p.response)||void 0===n?void 0:n.errors)||void 0===d?void 0:d[0])||void 0===c?void 0:c.message)||m,success:u,loginPath:s.loginPath,headerText:s.headerText,loginText:s.loginText},callbacks:{submit:async t=>{var e;v(""),h(!1);let o=t.detail.formData;null==o||o.forEach(((s,t)=>{b.set(o,t,s)}));const i={email:o.email,urlParams:w?{nextPage:w}:null,redirectPath:s.redirectPath},a=await g(i);a instanceof Error?a.message&&v(s.networkErrorMessage):(null===(e=a.requestManagedIdentityPasswordResetEmail)||void 0===e?void 0:e.success)&&h(!0)}}}}(this);var i;const a={messageSlot:t("slot",{name:"messageSlot"},this.headerText),emailLabel:this.emailLabel,submitLabel:this.submitLabel,successAlertText:this.successAlertText,loginText:this.loginText,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:this.border};return t(P,{states:s,callbacks:o,content:a})}};function S(s){var t,o,i,a,r,n,u,h,m,v,g,f,w,y;const[P,{loading:x,errors:k}]=d(),[E,{loading:T,errors:C}]=c(),[L,q]=e(""),R=new URLSearchParams(l.location.search),S=R.get("nextPage"),M=(null===(a=null===(i=null===(o=null===(t=null==k?void 0:k.response)||void 0===t?void 0:t.errors)||void 0===o?void 0:o[0])||void 0===i?void 0:i.extensions)||void 0===a?void 0:a.message)||(null===(u=null===(n=null===(r=null==k?void 0:k.response)||void 0===r?void 0:r.errors)||void 0===n?void 0:n[0])||void 0===u?void 0:u.message)||L,B=(null===(g=null===(v=null===(m=null===(h=null==C?void 0:C.response)||void 0===h?void 0:h.errors)||void 0===m?void 0:m[0])||void 0===v?void 0:v.extensions)||void 0===g?void 0:g.message)||(null===(y=null===(w=null===(f=null==C?void 0:C.response)||void 0===f?void 0:f.errors)||void 0===w?void 0:w[0])||void 0===y?void 0:y.message)||L;return{states:{loading:x||T,error:M||B,registerPath:s.registerPath,forgotPasswordPath:s.forgotPasswordPath},callbacks:{googleSubmit:async t=>{var e,o,i,a;if(!(null===(e=t.detail)||void 0===e?void 0:e.credential))return;const r=await E({idToken:t.detail.credential});if(r instanceof Error)((null==r?void 0:r.message)||(null===(o=null==r?void 0:r.response)||void 0===o?void 0:o.error))&&((null===(i=null==r?void 0:r.response)||void 0===i?void 0:i.errors.some((s=>{var t;return"Invalid Credentials."===(null===(t=null==s?void 0:s.extensions)||void 0===t?void 0:t.message)})))?q(s.googleUserNotRegisteredError):q(s.networkErrorMessage));else if(null===(a=r.authenticateManagedIdentityWithGoogle)||void 0===a?void 0:a.token){R.delete("nextPage");const t=p(S||s.nextPage);l.push(t.href)}},submit:async t=>{var e,o;q("");let i=t.detail.formData;null==i||i.forEach(((s,t)=>{b.set(i,t,s)}));const a={email:i.email,password:i.password},r=await P(a);if(r instanceof Error)((null==r?void 0:r.message)||(null===(e=null==r?void 0:r.response)||void 0===e?void 0:e.error))&&q(s.networkErrorMessage);else if(null===(o=r.authenticateManagedIdentityWithEmailAndPassword)||void 0===o?void 0:o.token){R.delete("nextPage");const t=p(S||s.nextPage);l.push(t.href)}}}}}const M=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",this.googleUserNotRegisteredError="Your Google account has not registered on our platform. Please complete the registration process with your Google account.",this.registerCTA="Don't have an account?",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e}=n()?f({states:{error:(null===(i=null===(o=this.demoData)||void 0===o?void 0:o.states)||void 0===i?void 0:i.error)||"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register",showLoginForm:"manual"},callbacks:{googleSubmit:async()=>{console.log("google submit")},submit:async()=>{console.log("submit")}},content:{googleButton:null}},this.demoData||{},{arrayMerge:(s,t)=>t}):S(this);var o,i;const a=y({RegisterButton:{"&::part(label)":{padding:"0"}}}),r=a.toString(),d={forgotPasswordButton:t("slot",{name:"forgotPassword"},t("a",{onClick:()=>l.push(s.forgotPasswordPath)},this.forgotPasswordLabel)),googleButton:t("sqm-google-sign-in",{onInitComplete:e.googleSubmit}),secondaryButton:t("slot",{name:"secondaryButton"},t("style",null,r),t("span",null,this.registerCTA," ",t("sl-button",{size:"large",type:"text",disabled:s.loading,onClick:()=>l.push(s.registerPath),className:a.classes.RegisterButton},this.registerLabel))),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return t(x,{states:s,callbacks:e,content:d})}},B=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e}=n()?f({states:{error:"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register",showLoginForm:"manual"},callbacks:{googleSubmit:async()=>{console.log("google submit")},submit:async()=>{console.log("submit")}},content:{googleButton:null}},this.demoData||{},{arrayMerge:(s,t)=>t}):S(this),o=y({RegisterButton:{"&::part(label)":{padding:"0"}}}).toString(),i={forgotPasswordButton:t("slot",{name:"forgotPassword"},t("a",{onClick:()=>l.push(s.forgotPasswordPath)},this.forgotPasswordLabel)),googleButton:null,secondaryButton:t("slot",{name:"secondaryButton"},t("style",null,o),t("sl-button",{exportparts:"base: secondarybutton-base",type:"text",disabled:s.loading,onClick:()=>l.push(s.registerPath)},this.registerLabel)),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return t(x,{states:s,callbacks:e,content:i})}},j=class{constructor(t){s(this,t),this.ignored=!1,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e,refs:o}=n()?f({states:{error:"",loading:!1,confirmPassword:(r=this).confirmPassword,hideInputs:r.hideInputs||!1,customPasswordField:!1,loginPath:r.loginPath,disablePasswordValidation:r.disablePasswordValidation},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},r.demoData||{},{arrayMerge:(s,t)=>t}):function(s){var t,e,o,r,n,d,c,m,v;const g=i(null),{registrationFormState:f,setRegistrationFormState:p}=L({}),[w,{loading:y,errors:P}]=u();a((()=>{if(!g.current)return;const s=g.current;return s.addEventListener("sl-input",x),()=>{s.removeEventListener("sl-input",x)}}),[g.current]);const x=h((s=>{var t,e;if("tel"!==(null===(e=null===(t=s.target)||void 0===t?void 0:t.type)||void 0===e?void 0:e.toLowerCase()))return;const o=new T("US");s.target.value=o.input(s.target.value)}),[]);let k="";return k=(null===(t=null==P?void 0:P.response)||void 0===t?void 0:t.error)||(null==P?void 0:P.message)&&!(null===(e=null==P?void 0:P.response)||void 0===e?void 0:e.errors.length)?s.networkErrorMessage:(null===(d=null===(n=null===(r=null===(o=null==P?void 0:P.response)||void 0===o?void 0:o.errors)||void 0===r?void 0:r[0])||void 0===n?void 0:n.extensions)||void 0===d?void 0:d.message)||(null===(v=null===(m=null===(c=null==P?void 0:P.response)||void 0===c?void 0:c.errors)||void 0===m?void 0:m[0])||void 0===v?void 0:v.message)||(null==f?void 0:f.error),{states:{loading:y,error:k,registrationFormState:f,confirmPassword:s.confirmPassword,hideInputs:s.hideInputs,loginPath:s.loginPath,disablePasswordValidation:s.disablePasswordValidation},callbacks:{submit:async t=>{var e;let o=t.target.getFormControls(),i={},a={};if(null==o||o.forEach((t=>{if(!t.name)return;const e=t.name,o=t.value;if(b.set(i,e,o),t.required&&!o&&b.set(a,e,s.requiredFieldErrorMessage),"function"==typeof t.validationError){const s=(0,t.validationError)({control:t,key:e,value:o});s&&b.set(a,e,s)}})),(s.confirmPassword||i.confirmPassword)&&i.password!==i.confirmPassword&&(a={...a,confirmPassword:s.passwordMismatchErrorMessage}),Object.keys(a).length)return void p({loading:!1,error:"",validationErrors:a});p({loading:!0,error:"",validationErrors:{}});const{email:r,password:n}=i;delete i.email,delete i.password,delete i.confirmPassword,i={...i};const d={email:r,password:n,formData:i,redirectPath:s.redirectPath};try{const t=await w(d);if(t instanceof Error)throw t;p({loading:!1,error:"",validationErrors:{}}),(null===(e=t.registerManagedIdentityWithEmailAndPassword)||void 0===e?void 0:e.token)&&l.push(s.nextPage)}catch(t){p({loading:!1,error:s.networkErrorMessage,validationErrors:{}})}},inputFunction:x},refs:{formRef:g}}}(this);var r;const d={formData:t("slot",{name:"formData"}),secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:s.loading,onClick:()=>l.push(s.loginPath)},this.loginLabel)),terms:t("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return t(k,{states:s,callbacks:e,content:d,refs:o})}},_=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.formDisabledErrorMessage="The registration form is currently disabled.",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",o(this)}disconnectedCallback(){}render(){const{states:s,callbacks:e,refs:o}=n()?f({states:{error:"",loading:!1,confirmPassword:this.confirmPassword,hideInputs:this.hideInputs||!1,customPasswordField:!1,loginPath:"/login"},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},this.demoData||{},{arrayMerge:(s,t)=>t}):C(this);const i={formData:t("slot",{name:"formData"}),secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:s.loading,onClick:()=>l.push(s.loginPath)},this.loginLabel)),terms:t("slot",{name:"terms"}),emailOptIn:t("slot",{name:"emailOptIn"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,networkErrorMessage:this.networkErrorMessage,passwordMismatchErrorMessage:this.passwordMismatchErrorMessage,invalidEmailErrorMessage:this.invalidEmailErrorMessage,formDisabledErrorMessage:this.formDisabledErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return t(q,{states:s,callbacks:e,content:i,refs:o})}};let I=null;const F=class{constructor(t){s(this,t),this.ignored=!0,this.nextPage="/",this.failedPage="/",this.verifyEmailText="Verify your email",this.verifySuccessText="Your email has been verified and you are being redirected. If you are not redirected, please click Continue.",this.verifyInvalidText="The email verification code is invalid or has expired, please try again.",this.continueText="Continue",this.networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.",o(this)}disconnectedCallback(){}render(){const{states:s,data:o,callbacks:i,content:r}=n()?(d=w(this),f({states:{error:"",loading:!1,success:!0},data:{oobCode:"code"},callbacks:{failed:()=>{console.log("failed")},gotoNextPage:()=>{}},content:{verifySuccessText:d.verifySuccessText,verifyEmailText:d.verifyEmailText,verifyInvalidText:d.verifyInvalidText,continueText:d.continueText}},d.demoData||{},{arrayMerge:(s,t)=>t})):function({nextPage:s,failedPage:t,verifySuccessText:o,verifyEmailText:i,verifyInvalidText:r,networkErrorMessage:n,continueText:d}){var c,u,h,b,f,w,y,P,x,k;const[E,T]=e(!1),[C,L]=e(!1),q=m(),[R,{loading:S,data:M,errors:B}]=v(),j=new URLSearchParams(l.location.search),_=j.get("oobCode"),F=j.get("email"),A=j.get("nextPage"),D=void 0===M&&void 0===B&&!!_,N=!!((null===(c=null==q?void 0:q.managedIdentity)||void 0===c?void 0:c.emailVerified)||(null===(u=null==M?void 0:M.verifyManagedIdentityEmail)||void 0===u?void 0:u.success)||C),U=(null===(h=null==q?void 0:q.managedIdentity)||void 0===h?void 0:h.email)===F,V=()=>{j.delete("nextPage");const t=p(A||s);l.push(t.href)};return a((()=>{(async()=>{I||(I=R({oobCode:_}));const s=await I;s instanceof Error||!s.verifyManagedIdentityEmail.success||L(!0),T(!0)})()}),[]),a((()=>{E&&(N&&U?setTimeout(V,3e3):setTimeout((()=>{g(void 0),V()}),3e3))}),[E,N]),{states:{loading:S||!E,disableContinue:D,error:(null===(y=null===(w=null===(f=null===(b=null==B?void 0:B.response)||void 0===b?void 0:b.errors)||void 0===f?void 0:f[0])||void 0===w?void 0:w.extensions)||void 0===y?void 0:y.message)||(null===(k=null===(x=null===(P=null==B?void 0:B.response)||void 0===P?void 0:P.errors)||void 0===x?void 0:x[0])||void 0===k?void 0:k.message)||((null==B?void 0:B.message)||!U)&&n,success:E&&C&&(N||U)},data:{oobCode:_},callbacks:{failed:()=>l.push({pathname:t,search:j.toString()&&"?"+j.toString()}),gotoNextPage:V},content:{verifySuccessText:o,verifyEmailText:i,verifyInvalidText:r,continueText:d}}}(w(this));var d;return t(E,{states:s,data:o,callbacks:i,content:r})}};export{R as sqm_portal_forgot_password,M as sqm_portal_google_login,B as sqm_portal_login,j as sqm_portal_register,_ as sqm_portal_registration_form,F as sqm_portal_verify_email}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./p-083180bf.js";import{i as a}from"./p-
|
|
1
|
+
import{h as e}from"./p-083180bf.js";import{i as a}from"./p-438f6702.js";import{j as l,a as o}from"./p-cef45012.js";l.setup(o());const r=l.createStyleSheet({ErrorStyle:{"&::part(control)":{borderColor:"var(--sl-color-danger-500)",outline:"var(--sl-color-danger-500)"},"&:host":{"--focus-ring":"0 0 0 var(--sl-focus-ring-width) red !important"}},ErrorMessageStyle:{margin:0,marginTop:"5px",color:"var(--sl-color-danger-500)",fontSize:"var(--sl-input-help-text-font-size-medium)",fontFamily:"var(--sl-font-sans)",fontWeight:"var(--sl-font-weight-normal)"},FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}}),n=r.toString();function t(l){var o,t,s,i,c;const{states:d,content:b}=l,p=null===(o=null==d?void 0:d.leadFormState)||void 0===o?void 0:o.validationErrors,v=({checkboxLabel:e})=>a.formatMessage({id:`requiredFieldErrorMessage-${e}`,defaultMessage:b.errorMessage},{checkboxLabel:e});return e("div",{class:r.classes.FieldContainer,part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\nsl-checkbox::part(label){\n font-size: var(--sl-input-label-font-size-small);\n font-weight: var(--sl-font-weight-normal);\n line-height: 20px;\n}\nsl-checkbox::part(base){\n align-items: start;\n}\n",n),e("sl-checkbox",Object.assign({exportparts:"label: input-label, base: input-base",name:`/${b.checkboxName}`,"onSl-change":e=>{e.target.value=e.target.checked}},b.checkboxOptional?[]:{required:!1},{disabled:(null===(t=d.leadFormState)||void 0===t?void 0:t.loading)||(null===(s=d.leadFormState)||void 0===s?void 0:s.disabled),validationError:({value:e})=>{if(!e&&!b.checkboxOptional)return v({checkboxLabel:b.checkboxLabel})}},(null===(c=null===(i=d.leadFormState)||void 0===i?void 0:i.validationErrors)||void 0===c?void 0:c[b.checkboxName])?{class:r.classes.ErrorStyle}:[]),a.formatMessage({id:b.checkboxName+"-message",defaultMessage:b.checkboxLabel},{labelLink:e("a",{href:b.checkboxLabelLink,target:"_blank"},b.checkboxLabelLinkText||b.checkboxLabelLink)})),(null==p?void 0:p[b.checkboxName])&&e("p",{class:r.classes.ErrorMessageStyle},v({checkboxLabel:b.checkboxLabel})))}export{t as L}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var r,s=1,t=arguments.length;s<t;s++){r=arguments[s];for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a))e[a]=r[a]}return e};return __assign.apply(this,arguments)};System.register(["./p-641f968d.system.js","./p-
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var r,s=1,t=arguments.length;s<t;s++){r=arguments[s];for(var a in r)if(Object.prototype.hasOwnProperty.call(r,a))e[a]=r[a]}return e};return __assign.apply(this,arguments)};System.register(["./p-641f968d.system.js","./p-a8ecdc44.system.js","./p-1a673057.system.js","./p-8a6494c7.system.js","./p-7b909aa5.system.js"],(function(e){"use strict";var r,s,t,a,o,n,i,l,d;return{setters:[function(e){r=e.h},function(e){s=e.j},function(e){t=e.c},function(e){a=e.A;o=e.a;n=e.b;i=e.H;l=e.E},function(e){d=e.T}],execute:function(){e({P:p,a:g,b:q,c:S});var u="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";function p(e){var i=e.states,l=e.callbacks,p=e.content;var c={FormWrapper:__assign(__assign({},a),{background:p.backgroundColor||"var(--sqm-portal-background)",borderRadius:p.borderRadius||"var(--sqm-border-radius-normal)",border:p.border||"var(--sqm-border-thickness) solid var(--sqm-border-color)"}),Column:__assign({},o),ButtonsContainer:n,SecondaryButton:{margin:"auto",display:"block",cursor:"pointer"}};var m=t(c);var b=m.toString();return r("div",{class:m.classes.FormWrapper,part:"sqm-base"},r("style",{type:"text/css"},u,b),r(d,{type:"h3"},p.messageSlot),r("sl-form",{class:m.classes.Column,"onSl-submit":l.submit},e.states.error&&r("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},r("div",{part:"erroralert-text"},e.states.error)),e.states.success&&r("sqm-form-message",{type:"success",exportparts:"successalert-icon"},r("div",{part:"successalert-text"},p.successAlertText)),r("sl-input",{exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:p.emailLabel||"Email",disabled:i.loading,required:true}),r("div",{class:m.classes.ButtonsContainer},r("sl-button",{submit:true,loading:i.loading,exportparts:"base: primarybutton-base",type:"primary"},p.submitLabel||"Reset Password"),r("sl-button",{type:"secondary",exportparts:"base: secondarybutton-base",class:m.classes.SecondaryButton,disabled:i.loading,onClick:function(){return s.push(i.loginPath)}},p.loginText))))}var c={Wrapper:a,Column:o,ForgotButtonContainer:{display:"inline",cursor:"pointer","font-size":"13px","font-weight":"600",color:"var(--sqm-text-subdued)",margin:"0"},ButtonsContainer:__assign(__assign({},n),{gap:"var(--sl-spacing-medium)","& > *":{margin:"0 !important"}})};var m="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var b=t(c);var v=b.toString();function g(e){var s=e.states,t=e.callbacks,a=e.content;return r("div",{class:b.classes.Wrapper,part:"sqm-base"},r("style",{type:"text/css"},m,v),r(d,{type:"h3"},a.pageLabel),r("sl-form",{class:b.classes.Column,"onSl-submit":t.submit},e.states.error&&r("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},r("div",{part:"erroralert-text"},e.states.error)),r("sl-input",{exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:a.emailLabel||"Email",disabled:s.loading,required:true}),r("div",null,r("sl-input",{exportparts:"label: input-label, base: input-base",type:"password",name:"/password",label:a.passwordLabel||"Password",disabled:s.loading,required:true}),r("div",{class:b.classes.ForgotButtonContainer},a.forgotPasswordButton)),r("div",{class:b.classes.ButtonsContainer},r("sl-button",{submit:true,loading:s.loading,exportparts:"base: primarybutton-base",type:"primary"},a.submitLabel||"Login"),a.googleButton&&r("sl-menu-divider",null),a.googleButton,a.secondaryButton)))}var y={Wrapper:__assign(__assign({},a),{"max-width":"600px"}),Column:o,HostBlock:i,":host":{margin:"0 auto",width:"100%"},ButtonsContainer:n,ErrorStyle:l};var f="\nsqm-portal-register {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n\n:host{\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n";var x=t(y);var h=x.toString();function q(e){var s,t,a,o,n,i,l,u,p,c,m,b,v;var g=e.states,y=e.refs,q=e.callbacks,w=e.content;if(g.error){window.scrollTo({top:0,left:0,behavior:"smooth"})}return r("div",{class:x.classes.Wrapper,part:"sqm-base"},r("style",{type:"text/css"},f,h),r(d,{type:"h3"},w.pageLabel),r("sl-form",{class:x.classes.Column,"onSl-submit":q.submit,ref:function(e){return y.formRef.current=e},novalidate:true},g.error&&r("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},r("div",{part:"erroralert-text"},e.states.error)),w.formData,!g.hideInputs&&r("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:w.emailLabel||"Email",disabled:g.loading,required:true,validationError:function(e){var r=e.value;if(!r){return w.requiredFieldErrorMessage}if(!r.includes("@")){return w.invalidEmailErrorMessage}}},((t=(s=g.registrationFormState)===null||s===void 0?void 0:s.validationErrors)===null||t===void 0?void 0:t.email)?{class:x.classes.ErrorStyle,helpText:((o=(a=g.registrationFormState)===null||a===void 0?void 0:a.validationErrors)===null||o===void 0?void 0:o.email)||w.requiredFieldErrorMessage}:[])),!g.hideInputs&&r("sqm-password-field",{fieldLabel:w.passwordLabel,"disable-validation":g.disablePasswordValidation,meetsRequirementsText:w.meetsRequirementsText,doesNotMeetRequirementsText:w.doesNotMeetRequirementsText,minErrorText:w.minErrorText,uppercaseErrorText:w.uppercaseErrorText,lowercaseErrorText:w.lowercaseErrorText,hasErrorText:w.hasErrorText}),w.passwordField,!g.hideInputs&&g.confirmPassword&&r("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"password",name:"/confirmPassword",label:w.confirmPasswordLabel,disabled:g.loading||((n=g.registrationFormState)===null||n===void 0?void 0:n.disabled),required:true},((l=(i=g.registrationFormState)===null||i===void 0?void 0:i.initialData)===null||l===void 0?void 0:l.confirmPassword)?{value:(p=(u=g.registrationFormState)===null||u===void 0?void 0:u.initialData)===null||p===void 0?void 0:p.confirmPassword}:{},((m=(c=g.registrationFormState)===null||c===void 0?void 0:c.validationErrors)===null||m===void 0?void 0:m.confirmPassword)?{class:x.classes.ErrorStyle,helpText:((v=(b=g.registrationFormState)===null||b===void 0?void 0:b.validationErrors)===null||v===void 0?void 0:v.confirmPassword)||w.requiredFieldErrorMessage}:[])),w.terms,r("div",{class:x.classes.ButtonsContainer},r("sl-button",{submit:true,loading:g.loading,exportparts:"base: primarybutton-base",type:"primary"},w.submitLabel||"Register"),w.secondaryButton)))}var w={Wrapper:a,Column:o,ContinueButton:{width:"100%"}};var E="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var T=t(w);var C=T.toString();function S(e){var s=e.states,t=e.data,a=e.callbacks,o=e.content;if(s.loading)return;if(s.success){return r("div",{class:T.classes.Wrapper,part:"sqm-base"},r("style",{type:"text/css"},E,C),r(d,{type:"h3"},o.verifyEmailText),r("sqm-form-message",{exportparts:"success-icon"},r("div",{part:"successalert-text"},o.verifySuccessText)),r("sl-button",{class:T.classes.ContinueButton,onClick:a.gotoNextPage,loading:s.loading,exportparts:"base: primarybutton-base",type:"primary"},o.continueText))}if(s.error||!t.oobCode){return r("div",{class:T.classes.Wrapper,part:"sqm-base"},r("style",{type:"text/css"},C),r(d,{type:"h3"},o.verifyEmailText),r("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},r("div",{part:"erroralert-text"},o.verifyInvalidText)),r("sl-button",{class:T.classes.ContinueButton,onClick:a.failed,disabled:s.loading,exportparts:"base: primarybutton-base",type:"primary"},o.continueText))}}}}}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{r as t,h as e}from"./p-083180bf.js";import"./p-438f6702.js";import{k as r,f as i,n as o}from"./p-a7fc1e02.js";import{d as s,J as a,w as l,$ as n,i as u}from"./p-d20188db.js";import{c as d}from"./p-c1086930.js";import{g as m}from"./p-9ec99ced.js";import"./p-cef45012.js";import"./p-cabf6326.js";import{P as c}from"./p-b5f57914.js";import{i as f}from"./p-8f9c1387.js";const v=s.gql`
|
|
2
|
+
query {
|
|
3
|
+
viewer {
|
|
4
|
+
... on User {
|
|
5
|
+
id
|
|
6
|
+
accountId
|
|
7
|
+
firstName
|
|
8
|
+
lastName
|
|
9
|
+
email
|
|
10
|
+
countryCode
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`,h=s.gql`
|
|
15
|
+
mutation (
|
|
16
|
+
$id: String!
|
|
17
|
+
$accountId: String!
|
|
18
|
+
$firstName: String!
|
|
19
|
+
$lastName: String!
|
|
20
|
+
) {
|
|
21
|
+
upsertUser(
|
|
22
|
+
userInput: {
|
|
23
|
+
id: $id
|
|
24
|
+
accountId: $accountId
|
|
25
|
+
firstName: $firstName
|
|
26
|
+
lastName: $lastName
|
|
27
|
+
}
|
|
28
|
+
) {
|
|
29
|
+
firstName
|
|
30
|
+
lastName
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`,p={country:"",email:"",firstName:"",lastName:"",errors:{},error:""},b=class{constructor(e){t(this,e),this.ignored=!0,this.firstnametext="First Name",this.lastnametext="Last Name",this.emailtext="Email",this.countrytext="Country",this.editProfileHeader="Edit your profile",this.editProfileSubHeader="Personal Information",this.submitChangeButtonText="Submit Changes",this.hideCountry=!1,this.networkRequestMessage="An error occurred while loading this page. Please refresh the page.",this.fieldEmptyText="Field is required",this.formErrorText="Please correct the errors below to update your profile.",this.submissionSuccessText="Your profile has been successfully updated.",o(this)}disconnectedCallback(){}render(){const t=u()?function(t){return d({states:{success:!1,loading:!1,submitDisabled:!1,showCountry:!t.hideCountry,user:{id:"01",accountId:"111100000",firstName:"Joe",lastName:"Smith",email:"jsmith@gmail.com",countryCode:"CA"},text:{firstnametext:t.firstnametext,lastnametext:t.lastnametext,emailtext:t.emailtext,countrytext:t.countrytext,editProfileHeader:t.editProfileHeader,editProfileSubHeader:t.editProfileSubHeader,submitChangeButtonText:t.submitChangeButtonText,submissionSuccessText:t.submissionSuccessText,fieldEmptyText:t.fieldEmptyText},formState:{country:"Canada",firstName:"Joe",lastName:"Smith",errors:null,error:""}},callbacks:{onSubmit:t=>console.log(t),onChange:t=>console.log(t)}},t.demoData||{},{arrayMerge:(t,e)=>e})}(m(this)):function(t){const e=a(),[o,s]=r(!1),[u,d]=r(void 0),[m,c]=r(p),b=l(v,{},!(null==e?void 0:e.jwt)),[N,g]=n(h);return i((()=>{(null==g?void 0:g.loading)||((null==g?void 0:g.errors)?c((t=>{var e,r,i;return{...t,error:null===(i=null===(r=null===(e=null==g?void 0:g.errors)||void 0===e?void 0:e.response)||void 0===r?void 0:r.errors)||void 0===i?void 0:i[0].message}})):(d((t=>{var e;return{...t,...null===(e=null==g?void 0:g.data)||void 0===e?void 0:e.upsertUser}})),(null==g?void 0:g.data)&&s(!0)))}),[null==g?void 0:g.loading]),i((()=>{var t,e;d((t=>{var e;return{...t,...null===(e=null==b?void 0:b.data)||void 0===e?void 0:e.viewer}})),c({...p,...null===(t=b.data)||void 0===t?void 0:t.viewer,...null===(e=g.data)||void 0===e?void 0:e.upsertUser})}),[null==b?void 0:b.data]),i((()=>{var e,r;(null===(e=null==g?void 0:g.errors)||void 0===e?void 0:e.message)&&c({...null===(r=b.data)||void 0===r?void 0:r.viewer,error:t.networkRequestMessage})}),[null==g?void 0:g.errors]),{states:{success:o,loading:(null==b?void 0:b.loading)||g.loading,submitDisabled:!1,showCountry:!t.hideCountry,formState:m,user:u,text:{firstnametext:t.firstnametext,lastnametext:t.lastnametext,countrytext:t.countrytext,emailtext:t.emailtext,editProfileHeader:t.editProfileHeader,editProfileSubHeader:t.editProfileSubHeader,submitChangeButtonText:t.submitChangeButtonText}},callbacks:{onSubmit:()=>{if(s(!1),m.firstName&&m.lastName)return N({id:null==e?void 0:e.id,accountId:null==e?void 0:e.accountId,firstName:m.firstName,lastName:m.lastName}),void c((t=>({...t,errors:{},error:""})));const r={};m.firstName||(r.firstName={message:t.fieldEmptyText}),m.lastName||(r.lastName={message:t.fieldEmptyText}),f(r)||c((e=>({...e,error:t.formErrorText}))),c((t=>({...t,errors:r})))},onChange:t=>{const{name:e,value:r}=t.target;c((t=>({...t,[e]:r})))}}}}(m(this));return e(c,Object.assign({},t))}};export{b as sqm_portal_profile}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-
|
|
1
|
+
System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-a8ecdc44.system.js"],(function(t){"use strict";var n,e,s,i,o;return{setters:[function(t){n=t.r},function(t){e=t.n},function(t){s=t.e;i=t.j;o=t.i}],execute:function(){function r(t){var n=t.nextPage;s(undefined);i.push({pathname:n,search:""})}var c=t("sqm_portal_logout",function(){function t(t){n(this,t);this.ignored=true;this.nextPage="/";e(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){o()?u():r(this)};return t}());function u(t){}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-b6504987.system.js","./p-
|
|
1
|
+
System.register(["./p-b6504987.system.js","./p-a8ecdc44.system.js"],(function(n){"use strict";var e,t,r;return{setters:[function(n){e=n.k;t=n.f},function(n){r=n.b}],execute:function(){n({a:u,b:i,i:s});function i(n){var i=e(window.innerWidth),u=i[0],s=i[1];var o=r((function(){return s(window.innerWidth)}),[]);t((function(){window.addEventListener("resize",o);return function(){return window.removeEventListener("resize",o)}}),[]);return u>n?false:true}function u(n){return CSS.supports("(color: "+n+")")}function s(n){return!n||Object.keys(n).length===0&&n.constructor===Object}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,r){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):n(e.value).then(s,o)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,n&&(a=s[0]&2?n["return"]:s[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;if(n=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];n=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,r){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):n(e.value).then(s,o)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,n&&(a=s[0]&2?n["return"]:s[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;if(n=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];n=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-a8ecdc44.system.js","./p-b2295bc5.system.js","./p-4bd679a7.system.js","./p-1a673057.system.js","./p-8a6494c7.system.js","./p-9b33e2a7.system.js","./p-f45e076d.system.js","./p-140e6a15.system.js"],(function(e){"use strict";var t,i,r,n,a,s,o,l;return{setters:[function(e){t=e.r;i=e.h},function(e){r=e.n},function(e){n=e.i;a=e.e},function(){},function(e){s=e.c},function(){},function(){},function(){},function(e){o=e.E},function(e){l=e.u}],execute:function(){var c=e("sqm_instant_access_registration",function(){function e(e){t(this,e);this.ignored=true;this.emailLabel="Email";this.firstNameLabel="First Name";this.lastNameLabel="Last Name";this.registerLabel="Start Referring";this.includeName=false;this.hideBorder=false;this.requiredFieldErrorMessage="Cannot be empty";this.invalidEmailErrorMessage="Please enter a valid email address";this.networkErrorMessage="There was a problem signing you in. Please wait a moment and try again. If this problem continues, contact Support for help resolving this issue.";this.paddingTop="large";this.paddingRight="large";this.paddingBottom="large";this.paddingLeft="large";this.backgroundColor="var(--sqm-portal-background)";this.includeCookies=false;r(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=n()?u(this):l(this),t=e.states,r=e.callbacks;var a={emailLabel:this.emailLabel,registerLabel:this.registerLabel,firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel,includeName:this.includeName,hideBorder:this.hideBorder,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,paddingTop:this.paddingTop,paddingBottom:this.paddingBottom,paddingLeft:this.paddingLeft,paddingRight:this.paddingRight,backgroundColor:this.backgroundColor,topSlot:i("slot",{name:"top"}),bottomSlot:i("slot",{name:"bottom"})};return i(o,{states:t,callbacks:r,content:a})};return e}());function u(e){var t=this;var i=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){a({id:"referrer@example.com",accountId:"referrer@example.com",jwt:"eyJraWQiOiJlNjI2NzQxNy1jMzZlLTRlM2EtYjM5NS1lYTFmY2YyNmU3YzIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjbVZtWlhKeVpYSkFaWGhoYlhCc1pTNWpiMjA9OmNtVm1aWEp5WlhKQVpYaGhiWEJzWlM1amIyMD1AdGVzdF9heGJndGF0dzF0Y2NwOnVzZXJzIiwicGFzc3dvcmRsZXNzIjp0cnVlLCJpc3MiOiJodHRwczovL3N0YWdpbmcucmVmZXJyYWxzYWFzcXVhdGNoLmNvbS8iLCJleHAiOjE2ODA4ODU5MTksImlhdCI6MTY4MDc5OTUxOX0.kjmTVVf_BTb-uMNKnadLyNLxMFwpkefsY02O3iAfBVIJJZZfeZMwunPlKsS3Vbp28aYRClBjH5Wj4pYxDn23D0CdZx8KNCqiJ8yF6149O9SPMkRseoJkliqS6LyvMOEDjGDkuLfcC8_hq1AHBXFt5BdCtWOk1gwf_5R9A0w5gXEIvprBzbNDLbuo88bVAlrmFNvfttXXryrpUeruMal7cBKuy02YblBrB4kKoyJiprU5GLEjciBA4A56u8TwQc0kbsPf2YcQaJsY_IvkC7S1u4sPyObpq6iF6Ed8UYHAo6nU5KjZXyVtoUyeIS11mf_6OtDO6LyMNHV2FtEUUDdPCg"});return[2]}))}))};return s({states:{loading:false,error:""},callbacks:{submit:i}},e.demoData||{},{arrayMerge:function(e,t){return t}})}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as t,y as r}from"./p-a7fc1e02.js";import{_ as s}from"./p-
|
|
1
|
+
import{i as t,y as r}from"./p-a7fc1e02.js";import{_ as s}from"./p-d20188db.js";const o="sq:registration-form-state";function i(){const r=t("sq:registration-form-state-internal"),s=t("sq:registration-form-state");return r?[s,r[1]]:[void 0,void 0]}function a(t){const o=s(),[i,a]=r(o,"sq:registration-form-state",t);return r(o,"sq:registration-form-state-internal",[i,a]),{registrationFormState:i,setRegistrationFormState:a}}export{o as R,i as a,a as u}
|